:root {
  --ink: #0e0d0b;
  --paper: #fffefa;
  --paper-alt: #f4f0e6;
  --accent: #a9803c;
  --accent-deep: #8a6a2f;
  --accent-rgb: 169, 128, 60;
  --rule: #dedad0;
  --muted: #6b6a64;
  --shadow: 0 18px 40px rgba(14, 13, 11, 0.12);
  --shadow-sm: 0 6px 18px rgba(14, 13, 11, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 2000;
  transition: width 0.1s linear;
}

body.modal-open { overflow: hidden; }

/* ---------- reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-1 { transition-delay: 0.06s; }
.reveal-2 { transition-delay: 0.14s; }
.reveal-3 { transition-delay: 0.22s; }

/* ---------- masthead / nav ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(14, 13, 11, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

body.is-scrolled .masthead {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
  transition: padding 0.25s ease;
}

body.is-scrolled .masthead .wrap {
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand img {
  height: 24px;
  width: auto;
  display: block;
  transition: height 0.25s ease;
}
body.is-scrolled .brand img { height: 19px; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
}

/* On desktop the inner wrapper is inert (display:contents promotes its
   children to be direct flex items of .primary-nav); on mobile it becomes
   the real flex/padding box — see the max-height comment in the media
   query below for why. */
.primary-nav-inner {
  display: contents;
}

.primary-nav a {
  position: relative;
  text-decoration: none;
  color: rgba(255, 254, 250, 0.82);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
  letter-spacing: 0.01em;
}
.primary-nav a:hover { background: rgba(255, 255, 255, 0.08); color: var(--paper); }
.primary-nav a.is-active { color: var(--accent); }
.primary-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 254, 0.22);
  color: var(--paper);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.14);
}

.advertise-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  box-shadow: var(--shadow-sm);
}
.advertise-btn:hover {
  background: #c9a15c;
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.4);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--paper);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

/* ---------- luxury hero (home) ---------- */

.hero-lux {
  background: radial-gradient(ellipse 90% 70% at 50% -10%, #211d16 0%, var(--ink) 62%);
  color: var(--paper);
  padding: 76px 24px 88px;
  text-align: center;
  overflow: hidden;
}

.hero-lux-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero-lux-kicker::before,
.hero-lux-kicker::after {
  content: '';
  width: 28px;
  height: 1px;
  background: rgba(var(--accent-rgb), 0.6);
}

.hero-lux-tagline {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 4.4vw, 2.7rem);
  line-height: 1.28;
  max-width: 760px;
  margin: 0 auto;
}
.hero-lux-tagline em {
  font-style: italic;
  color: var(--accent);
}

/* ---------- magazine flip ---------- */

.magazine-flip-wrap {
  margin: 56px auto 0;
  perspective: 2000px;
}

.magazine-flip {
  width: 250px;
  aspect-ratio: 0.72;
  margin: 0 auto;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1.15s cubic-bezier(0.65, 0, 0.35, 1);
}
.magazine-flip.is-flipped { transform: rotateY(180deg); }

.magazine-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), 0 4px 0 rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
}
.magazine-face::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  pointer-events: none;
}
.magazine-face.is-back { transform: rotateY(180deg); }

.magazine-face img {
  width: 62%;
  height: auto;
}

.magazine-face-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.magazine-face-caption {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 16px;
  text-align: center;
}

.hero-lux-note {
  margin-top: 26px;
  font-size: 0.82rem;
  color: rgba(255, 254, 250, 0.42);
  letter-spacing: 0.02em;
}

/* ---------- section labels ---------- */

.section-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-label-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
  margin-left: 18px;
  min-width: 40px;
}

/* ---------- article grid ---------- */

.articles-section { padding: 64px 0 96px; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.article-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.article-card-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  background-color: var(--paper-alt);
  background-size: cover;
  background-position: center;
  margin-bottom: 18px;
  transition: transform 0.4s ease;
}

.article-card:hover .article-card-thumb { transform: scale(1.02); }
.article-card:hover .article-card-title { color: var(--accent); }

.article-card-kicker {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.article-card-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
  transition: color 0.15s ease;
}

.article-card-dek {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.55;
}

/* First card in the grid reads as the lead story — bigger image, larger
   type, laid out beside its text instead of stacked above it. Only kicks
   in with room to breathe (see the responsive block at the bottom). */
.article-card.is-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}
.article-card.is-featured .article-card-thumb {
  aspect-ratio: 16 / 11;
  margin-bottom: 0;
  border-radius: 6px;
}
.article-card.is-featured .article-card-title {
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  line-height: 1.22;
}
.article-card.is-featured .article-card-dek {
  font-size: 1rem;
  margin-top: 14px;
}

/* Coming-soon empty state — no fabricated headlines, just an honest
   placeholder shaped like the eventual card grid so the layout reads as
   "built and ready," not broken. */
.articles-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  border: 1.5px dashed var(--rule);
  border-radius: 6px;
}
.articles-empty img {
  height: 26px;
  opacity: 0.7;
  margin-bottom: 18px;
}
.articles-empty h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
}
.articles-empty p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.95rem;
}

/* ---------- generic page content (about / subscription) ---------- */

.page-hero {
  padding: 72px 24px 32px;
  text-align: center;
}
.page-hero-kicker {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-hero h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-top: 10px;
}
.page-hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  margin: 16px auto 0;
  line-height: 1.6;
}

.page-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 24px 100px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: #2b2a26;
}
.page-body p { margin-bottom: 18px; }

.placeholder-card {
  border: 1.5px dashed var(--rule);
  border-radius: 6px;
  padding: 40px 28px;
  text-align: center;
  color: var(--muted);
}

.signup-form {
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  padding: 40px 28px;
  text-align: center;
}
.signup-lead {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
}
.signup-row {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.signup-input {
  flex: 1;
  min-width: 220px;
  padding: 13px 16px;
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--ink);
}
.signup-input:focus {
  outline: none;
  border-color: var(--accent);
}
.signup-btn {
  padding: 13px 24px;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: var(--paper);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.signup-btn:hover { background: var(--accent-deep); }
.signup-status {
  margin-top: 14px;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.signup-status.is-success { color: var(--accent-deep); font-weight: 600; }
.signup-status.is-error { color: #b3261e; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  background: var(--ink);
  color: rgba(255, 254, 250, 0.7);
  padding: 44px 0 48px;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.footer-logo { height: 18px; opacity: 0.85; }
.footer-social {
  display: flex;
  gap: 10px;
}
.footer-nav {
  display: flex;
  gap: 20px;
  font-size: 13.5px;
  font-weight: 600;
}
.footer-nav a { text-decoration: none; color: rgba(255, 254, 250, 0.7); }
.footer-nav a:hover { color: var(--accent); }
.footer-meta {
  font-size: 12.5px;
  color: rgba(255, 254, 250, 0.4);
}

/* ---------- advertise modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 13, 11, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--paper);
  border-radius: 10px;
  padding: 40px;
  max-width: 860px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  position: relative;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}
.modal-overlay.is-open .modal-card { transform: none; }

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--paper-alt);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ink);
}
.modal-close:hover { background: var(--rule); }

.modal-head { text-align: center; margin-bottom: 32px; }
.modal-head .section-label { display: block; margin-bottom: 8px; }
.modal-head h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 700;
}
.modal-head p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.98rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pricing-card {
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 24px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.pricing-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

.pricing-swatch {
  width: 56px;
  height: 72px;
  border-radius: 3px;
  border: 2px solid var(--ink);
  margin-bottom: 18px;
  position: relative;
  background: var(--paper);
}
.pricing-swatch-fill {
  position: absolute;
  background: var(--accent);
  border-radius: 2px;
}
.pricing-swatch.is-quarter .pricing-swatch-fill { inset: 4px 4px auto 4px; height: 28px; }
.pricing-swatch.is-half .pricing-swatch-fill { inset: 4px 4px auto 4px; height: 50%; }
.pricing-swatch.is-full .pricing-swatch-fill { inset: 4px; }

.pricing-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
}

.pricing-price {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--accent);
  margin-top: 10px;
}
.pricing-cadence {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-top: 2px;
}

.pricing-cta {
  margin-top: 18px;
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.pricing-cta:hover { color: var(--accent); border-color: var(--accent); }

.modal-foot {
  text-align: center;
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  /* This element is the collapse-clamped shell — deliberately no padding
     of its own. In this browser, max-height:0 on a flex container doesn't
     reliably clip its own padding box (only its children's rendered
     content), so any padding placed directly here leaks a few pixels of
     hit-testable, paintable box even while "collapsed." The real flex
     layout + padding live on .primary-nav-inner instead, which content
     max-height correctly clips via overflow:hidden on this wrapper. */
  .primary-nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .masthead.nav-open .primary-nav { max-height: 320px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .primary-nav-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 20px 18px;
  }
  .primary-nav a { padding: 12px 10px; border-radius: 10px; }
  /* The active-link underline is a ::after positioned near the link's
     bottom edge — with the menu collapsed to max-height:0, a sliver of it
     can still bleed through the header's backdrop-filter blur. Simplest
     fix: the underline only makes sense as a horizontal-nav affordance
     anyway, so just skip it in the dropdown (color alone marks active). */
  .primary-nav a.is-active::after { display: none; }

  .article-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .article-card.is-featured {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .article-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 28px 20px; }
  .magazine-flip { width: 210px; }
}
