/*
Theme Name: Custom Auto Theme
Author: System
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --paper: #F5F0E8;
  --paper-dark: #EDE6D8;
  --brown: #2C1810;
  --brown-light: #4A3228;
  --olive: #6B7B5E;
  --olive-light: #8A9B7A;
  --olive-muted: rgba(107,123,94,0.12);
  --burgundy: #8B1A32;
  --burgundy-light: #A82848;
  --rule: rgba(44,24,16,0.2);
  --rule-dark: rgba(44,24,16,0.5);
  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --ff-sans: 'Segoe UI', system-ui, sans-serif;
  --max-w: 1200px;
  --gap: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--ff-body);
  background: var(--paper);
  color: var(--brown);
  line-height: 1.7;
  font-size: 1.125rem;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--burgundy); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--burgundy-light); }

/* ── HEADER / MASTHEAD ── */
.masthead {
  border-bottom: 3px double var(--rule-dark);
  padding: 1rem 0 0.5rem;
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
}
.masthead-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.masthead-logo {
  font-family: var(--ff-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--brown);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1;
}
.masthead-logo span {
  color: var(--burgundy);
  font-style: italic;
}
.masthead-tagline {
  font-family: var(--ff-body);
  font-size: 0.8rem;
  color: var(--olive);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: none;
}
.nav-links {
  display: none;
  list-style: none;
  gap: 1.5rem;
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0;
}
.nav-links a {
  color: var(--brown-light);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--burgundy);
  transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--burgundy); }

/* Burger */
.burger { display: flex; flex-direction: column; gap: 4px; cursor: pointer; background: none; border: none; padding: 8px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--brown); transition: 0.3s; }
.mobile-nav {
  display: none;
  list-style: none;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.mobile-nav.open { display: flex; flex-direction: column; gap: 0.75rem; }
.mobile-nav a {
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brown-light);
  padding: 0.25rem 0;
}

/* ── HERO NEWSPAPER ── */
.hero-newspaper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem var(--gap) 1rem;
  border-bottom: 2px solid var(--rule-dark);
}
.hero-dateline {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.hero-headline {
  font-family: var(--ff-display);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--brown);
  margin-bottom: 0.75rem;
  max-width: 700px;
}
.hero-subtitle {
  font-family: var(--ff-body);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--olive);
  margin-bottom: 1rem;
  max-width: 600px;
}
.hero-byline {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 1.5rem;
}
.hero-lead-cols {
  columns: 1;
  column-gap: 2rem;
  column-rule: 1px solid var(--rule);
  font-size: 1.1rem;
  line-height: 1.8;
}
.hero-lead-cols p { margin-bottom: 1rem; break-inside: avoid; }
.hero-lead-cols p:first-child::first-letter {
  font-family: var(--ff-display);
  font-size: 3.5em;
  float: left;
  line-height: 0.8;
  margin: 0.05em 0.1em 0 0;
  color: var(--burgundy);
  font-weight: 900;
}

/* ── EDITORIAL STRIP ── */
.editorial-strip {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem var(--gap);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.strip-item {
  padding: 0.75rem 0;
  border-top: 2px solid var(--burgundy);
}
.strip-item h3 {
  font-family: var(--ff-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.strip-item p {
  font-size: 0.9rem;
  color: var(--brown-light);
  line-height: 1.5;
}

/* ── MAIN ARTICLE LAYOUT ── */
.article-body-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem var(--gap);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.article-main { min-width: 0; }
.article-main h2 {
  font-family: var(--ff-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--brown);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4rem;
}
.article-main h3 {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: var(--brown-light);
}
.article-main p {
  margin-bottom: 1rem;
  line-height: 1.8;
}
.article-main .two-col-text {
  columns: 1;
  column-gap: 2rem;
  column-rule: 1px solid var(--rule);
}
.article-main .two-col-text p { break-inside: avoid; }

/* Drop cap */
.drop-cap::first-letter {
  font-family: var(--ff-display);
  font-size: 3.2em;
  float: left;
  line-height: 0.8;
  margin: 0.05em 0.1em 0 0;
  color: var(--burgundy);
  font-weight: 900;
}

/* ── SIDEBAR ── */
.article-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-box {
  background: var(--paper-dark);
  padding: 1.25rem;
  border-top: 3px solid var(--burgundy);
}
.sidebar-box h4 {
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-box li {
  font-size: 0.95rem;
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.sidebar-box li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--olive);
}
.sidebar-link {
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--ff-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brown);
  transition: padding-left 0.3s, color 0.3s;
}
.sidebar-link:hover {
  padding-left: 0.5rem;
  color: var(--burgundy);
}

/* ── QUOTE RAIL ── */
.pull-quote {
  border-left: 3px solid var(--burgundy);
  padding: 1.5rem 1.25rem;
  margin: 2rem 0;
  background: var(--olive-muted);
  position: relative;
}
.pull-quote::before {
  content: 'C';
  font-family: var(--ff-display);
  font-size: 4rem;
  color: var(--burgundy);
  position: absolute;
  top: -0.5rem;
  left: 0.5rem;
  line-height: 1;
  opacity: 0.3;
}
.pull-quote p {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--brown);
  margin-bottom: 0.5rem;
}
.pull-quote cite {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--olive);
  font-style: normal;
}

/* ── CARDS ── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}
.card-editorial {
  border: 1px solid var(--rule);
  padding: 1.5rem;
  background: var(--paper);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}
.card-editorial:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(44,24,16,0.1);
}
.card-editorial .card-number {
  font-family: var(--ff-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--burgundy);
  opacity: 0.15;
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  line-height: 1;
}
.card-editorial h3 {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--brown);
}
.card-editorial p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--brown-light);
}

/* ── IMAGE BLOCK ── */
.article-image {
  margin: 2rem 0;
  position: relative;
}
.article-image img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  filter: sepia(0.08) contrast(1.02);
}
.article-image figcaption {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  color: var(--olive);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
}

/* ── HIGHLIGHT BOX ── */
.highlight-box {
  background: var(--olive-muted);
  border: 1px solid rgba(107,123,94,0.25);
  padding: 1.5rem;
  margin: 2rem 0;
}
.highlight-box h3 {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--olive);
}
.highlight-box p { font-size: 0.95rem; line-height: 1.7; }

/* ── NEWSLETTER ── */
.newsletter-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem var(--gap);
  border-top: 3px double var(--rule-dark);
  border-bottom: 3px double var(--rule-dark);
  text-align: center;
}
.newsletter-section h2 {
  font-family: var(--ff-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.newsletter-section p {
  font-size: 1rem;
  color: var(--olive);
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  font-family: var(--ff-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  background: white;
  color: var(--brown);
  outline: none;
  transition: border-color 0.3s;
}
.newsletter-form input[type="email"]:focus { border-color: var(--burgundy); }
.newsletter-form button {
  font-family: var(--ff-sans);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  background: var(--burgundy);
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  min-height: 44px;
}
.newsletter-form button:hover { background: var(--burgundy-light); }

/* ── RELATED ARTICLES ── */
.related-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem var(--gap);
}
.related-section h2 {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.related-card {
  border: 1px solid var(--rule);
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}
.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(44,24,16,0.08);
}
.related-card .rc-cat {
  font-family: var(--ff-sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 0.5rem;
  display: block;
}
.related-card h3 {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.related-card p {
  font-size: 0.9rem;
  color: var(--brown-light);
  line-height: 1.5;
}
.related-card .rc-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--burgundy);
  border-bottom: 1px solid var(--burgundy);
  padding-bottom: 2px;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--brown);
  color: var(--paper);
  padding: 2.5rem var(--gap) 1.5rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-top {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(245,240,232,0.15);
}
.footer-brand {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--paper);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
}
.footer-links a {
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.7);
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--paper); }
.footer-bottom {
  padding-top: 1.5rem;
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  color: rgba(245,240,232,0.5);
  line-height: 1.8;
}
.footer-bottom p { margin-bottom: 0.5rem; }

/* ── COOKIES BANNER ── */
.cookie-banner-toggle { display: none; }
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  max-width: 360px;
  background: var(--brown);
  color: var(--paper);
  padding: 1.5rem;
  z-index: 999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  font-family: var(--ff-sans);
  font-size: 0.8rem;
  line-height: 1.6;
  transition: transform 0.4s, opacity 0.4s;
}
.cookie-banner-toggle:checked ~ .cookie-banner {
  transform: translateY(200%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner p { margin-bottom: 0.75rem; }
.cookie-banner a { color: var(--olive-light); }
.cookie-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-btns label,
.cookie-btns a.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
  text-align: center;
}
.cookie-accept {
  background: var(--burgundy);
  color: white;
  border: none;
}
.cookie-decline {
  background: transparent;
  border: 1px solid rgba(245,240,232,0.3);
  color: var(--paper);
}

/* ── LEGAL / ARTICLE PAGES ── */
.page-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem var(--gap);
}
.page-wrap h1 {
  font-family: var(--ff-display);
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  color: var(--brown);
  border-bottom: 2px solid var(--rule);
  padding-bottom: 0.75rem;
}
.page-wrap h2 {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}
.page-wrap p { margin-bottom: 1rem; line-height: 1.8; }
.page-wrap .byline-page {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 1.5rem;
}
.legal-section { margin-bottom: 1.5rem; }
.legal-section h2 {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.legal-section p { font-size: 0.95rem; }

/* ── SUCCESS / 404 ── */
.message-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem var(--gap);
  text-align: center;
}
.message-page h1 {
  font-family: var(--ff-display);
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--burgundy);
}
.message-page p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--olive);
}
.message-page .btn-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  background: var(--burgundy);
  color: white;
  font-family: var(--ff-sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 44px;
  transition: background 0.3s;
}
.message-page .btn-home:hover { background: var(--burgundy-light); }

/* ── FOLDED EDITORIAL STRIPS ── */
.folded-strip {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem var(--gap);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.fold-item {
  padding: 1rem;
  border-left: 3px solid var(--olive);
  background: var(--olive-muted);
  transition: border-color 0.3s, background 0.3s;
}
.fold-item:hover { border-color: var(--burgundy); background: rgba(139,26,50,0.05); }
.fold-item h4 {
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.fold-item p {
  font-size: 0.9rem;
  color: var(--brown-light);
  line-height: 1.5;
}

/* ── INLINE ARTICLE IMAGE ── */
.inline-img-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
  align-items: start;
}
.inline-img-block img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.inline-img-text h3 {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.inline-img-text p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.6s ease both;
}
.card-editorial:nth-child(2) { animation-delay: 0.1s; }
.card-editorial:nth-child(3) { animation-delay: 0.2s; }
.card-editorial:nth-child(4) { animation-delay: 0.3s; }

/* ── RESPONSIVE ── */
@media (min-width: 600px) {
  .hero-headline { font-size: 2.8rem; }
  .hero-lead-cols { columns: 2; }
  .editorial-strip { grid-template-columns: repeat(3, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: flex; }
  .burger { display: none; }
  .masthead-tagline { display: block; }
  .folded-strip { grid-template-columns: repeat(2, 1fr); }
  .inline-img-block { grid-template-columns: 1fr 1fr; }
  .newsletter-form { flex-direction: row; }
  .strip-item { border-right: 1px solid var(--rule); padding-right: 1rem; }
  .strip-item:last-child { border-right: none; }
}

@media (min-width: 960px) {
  .hero-headline { font-size: 3.2rem; }
  .article-body-wrap { grid-template-columns: 2fr 1fr; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .related-grid { grid-template-columns: repeat(3, 1fr); }
  .folded-strip { grid-template-columns: repeat(4, 1fr); }
  .footer-top { flex-direction: row; justify-content: space-between; align-items: center; }
  .page-wrap h1 { font-size: 2.5rem; }
}
