/* Written — landing page styles */

:root {
  /* Mood: Lush (default) */
  --bg:        #efdfcd;
  --bg-deep:   #e6d3b8;
  --paper:     #f5e9d6;
  --ink:       #2a221f;
  --ink-soft:  #473c38;
  --ink-mute:  rgba(42, 34, 31, 0.62);
  --rule:      rgba(71, 60, 56, 0.18);
  --accent:    #99280f;
  --accent-2:  #b14a26;
  --gold:      #b8965a;
  --gold-soft: #d4b478;

  --vignette: radial-gradient(120% 90% at 50% 0%, transparent 50%, rgba(42, 34, 31, 0.10) 100%);
  --grain-opacity: 0.25;

  --serif:    "Cormorant Garamond", "Cormorant", "Merriweather", Georgia, serif;
  --body:     "Merriweather", Georgia, serif;
  --sans:     "Outfit", ui-sans-serif, system-ui, sans-serif;

  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
}

[data-mood="moonlit"] {
  --bg:        #1a1410;
  --bg-deep:   #120d0a;
  --paper:     #221a15;
  --ink:       #f3e6d0;
  --ink-soft:  #cfb797;
  --ink-mute:  rgba(243, 230, 208, 0.62);
  --rule:      rgba(207, 183, 151, 0.18);
  --accent:    #d05b32;
  --accent-2:  #99280f;
  --gold:      #d4b06b;
  --gold-soft: #e6c98d;
  --vignette: radial-gradient(120% 90% at 50% 0%, transparent 50%, rgba(0,0,0,0.55) 100%);
  --grain-opacity: 0.18;
}

[data-mood="golden"] {
  --bg:        #f5e9d6;
  --bg-deep:   #efdfcd;
  --paper:     #faf1e0;
  --ink:       #473c38;
  --ink-soft:  #6b554a;
  --ink-mute:  rgba(71, 60, 56, 0.6);
  --rule:      rgba(71, 60, 56, 0.15);
  --accent:    #b14a26;
  --accent-2:  #cf6b4a;
  --gold:      #c9a45f;
  --gold-soft: #dfbe83;
  --vignette: radial-gradient(140% 90% at 50% 0%, rgba(255,236,200,0.5) 0%, transparent 60%);
  --grain-opacity: 0.18;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Parchment grain texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
}

[data-mood="moonlit"] body::before { mix-blend-mode: overlay; }

/* Vignette */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: var(--vignette);
}

#root {
  position: relative;
  z-index: 3;
}

/* Type system */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.display em, .italic-serif {
  font-style: italic;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--accent);
  font-feature-settings: "swsh" 1, "calt" 1;
}

.subcopy {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 56ch;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-title em {
  font-style: italic;
  color: var(--accent);
}

.small-caps {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
}

/* Section-header eyebrows — made prominent to match the hero treatment */
.features-header .eyebrow,
.how-header .eyebrow,
.pricing-header .eyebrow {
  font-size: 14px;
  letter-spacing: 0.34em;
  font-weight: 500;
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--paper);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 8px 24px -8px rgba(153, 40, 15, 0.55);
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.btn-ghost:hover {
  background: rgba(0,0,0,0.04);
  border-color: var(--ink-soft);
}

[data-mood="moonlit"] .btn-ghost:hover {
  background: rgba(255,255,255,0.06);
}

.btn-link {
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.btn-link::after {
  content: "";
  display: block;
  margin-top: 2px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0.4);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.btn-link:hover::after { transform: scaleX(1); }

/* Layout */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  position: relative;
  padding: clamp(80px, 11vw, 140px) 0;
}

/* Ornamental divider */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 auto;
  width: max-content;
  color: var(--ink-mute);
}
.divider::before, .divider::after {
  content: "";
  width: 60px;
  height: 1px;
  background: var(--rule);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.nav-brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.nav-brand-word {
  font-family: var(--serif);
  font-size: 24px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
}
.nav-links {
  display: flex;
  gap: 36px;
}
.nav-link {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--accent); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Hero — always moonlit at top, fading into the body's lush parchment at the bottom.
   Local vars override the page palette so the hero reads as dawn-from-night even when
   the global mood is set to lush. */
.hero {
  position: relative;
  padding-top: clamp(80px, 10vw, 140px);
  padding-bottom: clamp(40px, 6vw, 80px);
  overflow: hidden;
  --ink:       #f3e6d0;
  --ink-soft:  #d8c4a0;
  --ink-mute:  rgba(243, 230, 208, 0.62);
  --rule:      rgba(207, 183, 151, 0.22);
  --accent:    #d05b32;
  --accent-2:  #e07a4a;
  --gold:      #d4b06b;
  --gold-soft: #e6c98d;
  --paper:     #efdfcd;
  color: var(--ink);
  background:
    radial-gradient(70% 40% at 50% 0%, rgba(208, 91, 50, 0.10) 0%, transparent 60%),
    radial-gradient(50% 30% at 50% 4%, rgba(212, 176, 107, 0.12) 0%, transparent 70%),
    linear-gradient(
      180deg,
      #15100c 0%,
      #1a1410 38%,
      #221913 58%,
      #3a281c 74%,
      #6f4a30 86%,
      #b08664 94%,
      var(--bg) 100%
    );
}
.hero::before {
  /* a soft moonlight pool behind the headline */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(45% 28% at 50% 32%, rgba(255, 240, 210, 0.06) 0%, transparent 70%);
}
.hero-inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
}
.hero-eyebrow .eyebrow {
  font-size: 15px;
  letter-spacing: 0.36em;
  font-weight: 500;
  color: var(--gold-soft);
}
.hero-eyebrow svg { color: var(--gold-soft); opacity: 0.85; }
.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(54px, 8.4vw, 124px);
  line-height: 0.98;
  font-weight: 400;
  letter-spacing: -0.018em;
  margin: 0;
  max-width: 18ch;
  color: var(--ink);
}
.hero-tagline em {
  font-style: italic;
  color: var(--accent);
  display: inline-block;
  position: relative;
}
.hero-tagline em::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -0.06em;
  height: 3px;
  background: var(--gold);
  opacity: 0.55;
  border-radius: 1px;
  transform: scaleX(0.92);
}
.hero-sub {
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 56ch;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero-meta-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-mute);
}

/* Hero ornaments — constellation always reads as stars over the dark sky */
.hero-constellation {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  color: var(--gold-soft);
  opacity: 0.55;
  /* fade out at the bottom so stars don't print on the parchment */
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 82%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 82%);
}

.hero-corner-flourish {
  position: absolute;
  width: 220px;
  height: 220px;
  color: var(--accent);
  opacity: 0.32;
  pointer-events: none;
}
.hero-corner-flourish.tl { top: 24px; left: 24px; }
.hero-corner-flourish.tr { top: 24px; right: 24px; transform: scaleX(-1); }
.hero-corner-flourish.bl { bottom: 24px; left: 24px; transform: scaleY(-1); }
.hero-corner-flourish.br { bottom: 24px; right: 24px; transform: scale(-1, -1); }

.hero-seal {
  position: absolute;
  right: clamp(20px, 6vw, 80px);
  top: clamp(20px, 6vw, 80px);
  width: 110px;
  height: 110px;
  z-index: 2;
  pointer-events: none;
  transform: rotate(-9deg);
}

/* Hero preview manuscript card */
.hero-manuscript {
  margin-top: 56px;
  position: relative;
  width: 100%;
  max-width: 980px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 30px 60px -30px rgba(42, 34, 31, 0.45),
    0 80px 120px -60px rgba(42, 34, 31, 0.35);
  overflow: hidden;
}

.hero-manuscript::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.18;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Features */
.features {
  background: var(--bg-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.features-header {
  text-align: center;
  margin: 0 auto clamp(56px, 8vw, 96px);
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

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

.feature-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  min-height: 320px;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -20px rgba(42, 34, 31, 0.35);
  border-color: var(--gold);
}
.feature-card.span-3 { grid-column: span 3; }
.feature-card.span-2 { grid-column: span 2; }

.feature-ornament {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--accent);
  margin-bottom: 4px;
}

.feature-number {
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--ink-mute);
}

.feature-title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
}
.feature-title em {
  font-style: italic;
  color: var(--accent);
}

.feature-desc {
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

.feature-meta {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed var(--rule);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* How it works */
.how-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 80px;
  gap: 40px;
  flex-wrap: wrap;
}
.how-header > div:first-child { max-width: 620px; }

.how-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.how-steps::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 24px;
  right: calc(25% - 24px);
  height: 2px;
  background-image: linear-gradient(to right, rgba(71, 60, 56, 0.55) 50%, transparent 50%);
  background-size: 14px 2px;
  background-repeat: repeat-x;
}
.how-step {
  padding: 0 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.how-step-marker {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}
.how-step-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}
.how-step-title em { font-style: italic; color: var(--accent); }
.how-step-desc {
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

/* Pricing */
.pricing {
  background: var(--bg-deep);
  border-top: 1px solid var(--rule);
}
.pricing-header {
  text-align: center;
  margin: 0 auto 72px;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.tiers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 880px;
  margin: 0 auto;
  align-items: stretch;
}
.tier {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tier.featured {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(42, 34, 31, 0.55);
}
[data-mood="moonlit"] .tier.featured {
  background: var(--accent);
  border-color: var(--accent);
}
.tier.featured .tier-name,
.tier.featured .tier-price-num,
.tier.featured .tier-desc,
.tier.featured .tier-feat {
  color: var(--paper);
}
.tier.featured .tier-feat svg { color: var(--gold-soft); }
.tier.featured .tier-rule { background: rgba(239, 223, 205, 0.18); }
.tier.featured .btn-ghost { color: var(--paper); border-color: rgba(239, 223, 205, 0.35); }
.tier.featured .btn-ghost:hover { background: rgba(255,255,255,0.08); }

.tier-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 2px;
}
.tier-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
  margin: 0;
  color: var(--ink);
}
.tier-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.tier-price-num {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.tier-price-unit {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tier.featured .tier-price-unit { color: rgba(239, 223, 205, 0.7); }
.tier-desc {
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}
.tier-rule {
  height: 1px;
  background: var(--rule);
}
.tier-feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tier-feat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.tier-feat svg {
  flex-shrink: 0;
  margin-top: 4px;
  color: var(--accent);
}

/* Footer */
.footer {
  padding: 80px 0 48px;
  border-top: 1px solid var(--rule);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}
.footer-brand p {
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 16px 0 0;
  max-width: 36ch;
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 18px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* Responsive */
@media (max-width: 980px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .how-steps { grid-template-columns: 1fr; gap: 36px; }
  .how-steps::before { display: none; }
  .tiers { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .hero-corner-flourish { display: none; }
  .hero-seal { display: none; }
}

@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}
