/* ============================================================
   Story Bible Studio — Landing page styles
   Brand: airy off-white canvas · high-contrast serif display ·
   clean sans body · black primary actions · gold (#D4AF35) accent
   ============================================================ */

:root{
  /* surfaces */
  --bg:        #FAF9F5;
  --bg-2:      #F3F1EA;
  --surface:   #FFFFFF;
  --ink:       #1A1A1A;
  --ink-2:     #45433E;
  --muted:     #7A7771;
  --line:      #E8E5DC;
  --line-2:    #F0EEE7;
  --black:     #141414;

  /* accent (tweakable) */
  --gold:      #D4AF35;
  --gold-deep: #9A7A1C;
  --gold-soft: #EDDEAF;
  --gold-tint: #FBF6E4;

  /* type */
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;

  /* geometry */
  --maxw: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(20,20,20,.04), 0 8px 24px -12px rgba(20,20,20,.10);
  --shadow-float: 0 18px 40px -18px rgba(40,33,10,.30), 0 4px 12px -6px rgba(40,33,10,.12);
}

/* accent variants */
:root[data-accent="amber"]{ --gold:#C8791E; --gold-deep:#9C5A12; --gold-soft:#F1D9B6; --gold-tint:#FBF0E2; }
:root[data-accent="sage"] { --gold:#6E8B58; --gold-deep:#4F6B3D; --gold-soft:#D5E2C7; --gold-tint:#EEF3E8; }
:root[data-accent="plum"] { --gold:#8B5E9A; --gold-deep:#653F72; --gold-soft:#E0CDE6; --gold-tint:#F4ECF6; }

/* dark theme */
:root[data-theme="dark"]{
  --bg:        #16140F;
  --bg-2:      #1E1B15;
  --surface:   #211E18;
  --ink:       #F6F3EA;
  --ink-2:     #D8D3C6;
  --muted:     #A39E92;
  --line:      #34302A;
  --line-2:    #2A271F;
  --black:     #F6F3EA;
  --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.6);
  --shadow-float: 0 20px 44px -18px rgba(0,0,0,.7), 0 4px 12px -6px rgba(0,0,0,.5);
}
:root[data-theme="dark"] .btn--dark{ color:#16140F; }
:root[data-theme="dark"] img.shot{ filter:brightness(.92); }

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  transition:background .3s ease, color .3s ease;
}
img{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }

.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 28px; }
.section{ padding:104px 0; }
.section--tight{ padding:72px 0; }
.bg-alt{ background:var(--bg-2); }

/* ---------- type helpers ---------- */
h1,h2,h3{ font-family:var(--serif); font-weight:600; color:var(--ink); margin:0; line-height:1.14; letter-spacing:-.01em; }
.eyebrow{
  font-family:var(--sans); font-weight:700; font-size:12.5px; letter-spacing:.16em;
  text-transform:uppercase; color:var(--gold-deep); margin:0 0 18px;
  display:inline-flex; align-items:center; gap:9px;
}
.eyebrow::before{ content:""; width:22px; height:1.5px; background:var(--gold); display:inline-block; }
.eyebrow.center{ justify-content:center; }
.lede{ color:var(--muted); font-size:19px; line-height:1.65; max-width:54ch; }
.section-head{ max-width:720px; margin:0 auto 60px; text-align:center; }
.section-head h2{ font-size:clamp(34px,4.4vw,50px); }
.section-head .lede{ margin:20px auto 0; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  font-family:var(--sans); font-weight:700; font-size:16px; line-height:1;
  padding:16px 28px; border-radius:999px; border:1.5px solid transparent;
  cursor:pointer; transition:transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space:nowrap;
}
.btn svg{ width:18px; height:18px; }
.btn--dark{ background:var(--black); color:#FAF9F5; box-shadow:0 10px 24px -12px rgba(20,20,20,.5); }
.btn--dark:hover{ transform:translateY(-2px); box-shadow:0 16px 30px -12px rgba(20,20,20,.55); }
.btn--ghost{ background:transparent; color:var(--ink); border-color:var(--line); }
.btn--ghost:hover{ border-color:var(--ink); transform:translateY(-1px); }
.btn--gold{ background:var(--gold); color:#211B07; }
.btn--gold:hover{ transform:translateY(-2px); box-shadow:0 16px 30px -14px rgba(160,128,20,.6); }
.btn--lg{ padding:18px 34px; font-size:17px; }

/* ---------- nav ---------- */
.nav{
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter:saturate(140%) blur(12px);
  border-bottom:1px solid transparent;
  transition:border-color .25s ease, background .25s ease;
}
.nav.scrolled{ border-bottom-color:var(--line); }
.nav__in{ display:flex; align-items:center; justify-content:space-between; height:74px; }
.nav__logo{ height:26px; width:auto; }
:root[data-theme="dark"] .nav__logo{ filter:invert(1) brightness(1.6) contrast(1.1); }
.nav__links{ display:flex; align-items:center; gap:8px; }
.nav__link{ font-weight:600; font-size:15px; color:var(--ink-2); padding:9px 14px; border-radius:8px; transition:color .15s, background .15s; }
.nav__link:hover{ color:var(--ink); background:var(--line-2); }
.icon-btn{
  display:inline-grid; place-items:center; width:40px; height:40px; border-radius:10px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink-2); cursor:pointer;
  transition:border-color .15s, color .15s, transform .15s;
}
.icon-btn:hover{ color:var(--ink); border-color:var(--ink); }
.icon-btn svg{ width:18px; height:18px; }
.nav__cta{ padding:11px 22px; font-size:15px; }

/* ============================================================
   HERO
   ============================================================ */
.hero{ position:relative; overflow:hidden; }
.hero__glow{
  position:absolute; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--gold-soft) 40%, transparent), transparent 70%),
    radial-gradient(40% 40% at 12% 30%, rgba(190,150,210,.10), transparent 70%),
    radial-gradient(40% 40% at 88% 30%, rgba(120,170,120,.10), transparent 70%);
}
.hero__in{ position:relative; z-index:2; }

/* layout (centered = text over device cluster · split = text beside) */
.hero__layout{ padding:90px 0 96px; }
:root[data-hero="centered"] .hero__layout{ display:flex; flex-direction:column; align-items:center; text-align:center; }
:root[data-hero="split"] .hero__layout{ display:grid; grid-template-columns:0.92fr 1.18fr; gap:36px; align-items:center; text-align:left; padding:70px 0 86px; }

.hero__text{ max-width:760px; }
:root[data-hero="centered"] .hero__text{ margin:0 auto; }
.hero__badge{
  display:inline-flex; align-items:center; gap:9px; margin-bottom:28px; white-space:nowrap;
  padding:8px 16px 8px 10px; border-radius:999px;
  background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow-card);
  font-size:13.5px; font-weight:600; color:var(--ink-2);
}
.hero__badge .dot{ width:8px; height:8px; border-radius:50%; background:var(--gold); box-shadow:0 0 0 4px var(--gold-tint); }
.hero__badge b{ color:var(--ink); font-weight:700; }
.hero h1{ font-size:clamp(40px,5.2vw,62px); line-height:1.13; letter-spacing:-.02em; }
:root[data-hero="centered"] .hero h1{ margin-inline:auto; }
.hero h1 .accent{ font-style:italic; color:var(--gold-deep); }
:root[data-hero="split"] .hero h1{ font-size:clamp(32px,3.5vw,46px); }
.hero__tag{ margin:24px 0 0; font-size:clamp(18px,2.1vw,22px); color:var(--muted); max-width:46ch; }
:root[data-hero="centered"] .hero__tag{ margin-inline:auto; }
.hero__actions{ display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin-top:36px; }
:root[data-hero="centered"] .hero__actions{ justify-content:center; }
.hero__note{ margin-top:18px; font-size:14px; color:var(--muted); display:flex; gap:8px; align-items:center; }
:root[data-hero="centered"] .hero__note{ justify-content:center; }
.hero__note svg{ width:16px; height:16px; color:var(--gold-deep); }

/* ---------- device cluster ---------- */
.hero__devices{ position:relative; width:100%; }
:root[data-hero="centered"] .hero__devices{ margin-top:60px; }
.devices{ position:relative; height:var(--devh,620px); display:flex; align-items:flex-end; justify-content:center; }
.dev img.screen{ display:block; width:100%; height:100%; object-fit:cover; object-position:top; }

/* laptop (centre) */
.laptop{ position:relative; z-index:2; width:min(880px,94%); }
.laptop__lid{ background:#16140f; border:1px solid #2c281f; border-radius:18px 18px 6px 6px; padding:13px 13px 14px; box-shadow:0 40px 72px -30px rgba(40,33,10,.55); }
.laptop__view{ aspect-ratio:16/10; border-radius:7px; overflow:hidden; background:#fff; }
.laptop__base{ position:relative; width:117%; left:50%; transform:translateX(-50%); height:17px; margin-top:-1px; background:linear-gradient(#d2cfc6,#a8a49a); border-radius:0 0 14px 14px; box-shadow:0 20px 28px -14px rgba(40,33,10,.5); }
.laptop__base::after{ content:""; position:absolute; top:0; left:50%; transform:translateX(-50%); width:104px; height:8px; background:#9a968c; border-radius:0 0 9px 9px; }

/* phone (front, right) */
.phone{ position:absolute; z-index:3; right:0; bottom:-18px; width:248px; transform:rotate(4deg); background:#16140f; border:1px solid #2c281f; border-radius:38px; padding:9px; box-shadow:0 36px 64px -26px rgba(40,33,10,.55); }
.phone__notch{ position:absolute; top:17px; left:50%; transform:translateX(-50%); width:66px; height:8px; background:#000; border-radius:99px; z-index:4; }
.phone__view{ aspect-ratio:9/18; border-radius:30px; overflow:hidden; background:var(--surface); }

/* split-mode cluster sizing — prominent laptop, compact phone */
:root[data-hero="split"] .hero__devices{ --devh:540px; }
:root[data-hero="split"] .laptop{ width:100%; }
:root[data-hero="split"] .phone{ width:178px; right:-14px; bottom:-12px; }

/* ---------- browser frame ---------- */
.frame{
  border-radius:14px; overflow:hidden; background:var(--surface);
  border:1px solid var(--line); box-shadow:0 30px 70px -34px rgba(40,33,10,.4), 0 8px 22px -14px rgba(40,33,10,.2);
}
.frame__bar{ display:flex; align-items:center; gap:8px; padding:11px 14px; background:var(--bg-2); border-bottom:1px solid var(--line); }
.frame__dot{ width:11px; height:11px; border-radius:50%; background:#d6d2c8; }
.frame__dot:nth-child(1){ background:#E5897E; } .frame__dot:nth-child(2){ background:#E3C26A; } .frame__dot:nth-child(3){ background:#9CC08B; }
.frame__url{ margin-left:10px; flex:1; height:22px; border-radius:6px; background:var(--surface); border:1px solid var(--line); font-size:11.5px; color:var(--muted); display:flex; align-items:center; padding:0 12px; }
.frame img.shot{ width:100%; height:auto; }

/* ---------- logo strip ---------- */
.strip{ border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:30px 0; }
.strip__in{ display:flex; align-items:center; justify-content:center; gap:18px 46px; flex-wrap:wrap; }
.strip__label{ font-size:13px; font-weight:600; letter-spacing:.04em; color:var(--muted); }
.strip__item{ font-family:var(--serif); font-style:italic; font-size:18px; color:var(--ink-2); opacity:.8; }
.strip__sep{ width:5px; height:5px; border-radius:50%; background:var(--gold); opacity:.6; }

/* ============================================================
   FEATURES
   ============================================================ */
.grid{ display:grid; gap:22px; }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.feature{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:34px 32px; box-shadow:var(--shadow-card); transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover{ transform:translateY(-4px); box-shadow:0 1px 2px rgba(20,20,20,.04), 0 22px 44px -22px rgba(40,33,10,.26); border-color:var(--gold-soft); }
.tile{
  width:54px; height:54px; border-radius:13px; display:grid; place-items:center; margin-bottom:22px;
  background:var(--gold-tint); border:1px solid var(--gold-soft); color:var(--gold-deep);
}
.tile svg{ width:26px; height:26px; }
.feature h3{ font-size:23px; margin-bottom:12px; }
.feature p{ margin:0; color:var(--muted); font-size:15.5px; line-height:1.62; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps{ display:grid; grid-template-columns:repeat(3,1fr); gap:26px; counter-reset:step; }
.step{ position:relative; padding-top:18px; }
.step__n{
  font-family:var(--serif); font-size:18px; font-weight:700; color:var(--gold-deep);
  width:46px; height:46px; border-radius:50%; display:grid; place-items:center;
  background:var(--surface); border:1.5px solid var(--gold-soft); margin-bottom:22px;
}
.step h3{ font-size:24px; margin-bottom:10px; }
.step p{ margin:0; color:var(--muted); font-size:15.5px; }
.steps__line{ position:relative; }
.steps__line::before{
  content:""; position:absolute; top:40px; left:8%; right:8%; height:1.5px;
  background:repeating-linear-gradient(90deg, var(--gold-soft) 0 8px, transparent 8px 16px);
  z-index:0;
}
.steps{ position:relative; z-index:1; }

/* ============================================================
   SHOWCASE (alternating)
   ============================================================ */
.showcase{ display:grid; gap:96px; }
.show-row{ display:grid; grid-template-columns:1fr 1.15fr; gap:60px; align-items:center; }
.show-row.flip .show-copy{ order:2; }
.show-row.flip .show-media{ order:1; }
.show-copy h3{ font-size:clamp(28px,3.2vw,38px); margin:14px 0 16px; }
.show-copy p{ color:var(--muted); font-size:17px; margin:0 0 24px; }
.show-list{ list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.show-list li{ display:flex; gap:12px; align-items:flex-start; font-size:15.5px; color:var(--ink-2); }
.show-list svg{ width:20px; height:20px; color:var(--gold-deep); flex:none; margin-top:1px; }
.show-media{ position:relative; }
.show-media .pin{
  position:absolute; z-index:3; width:118px; border-radius:14px; overflow:hidden;
  border:5px solid #fff; box-shadow:var(--shadow-float); transform:rotate(var(--r,-6deg));
}
:root[data-theme="dark"] .show-media .pin{ border-color:#211E18; }
.show-media .pin.br{ right:-22px; bottom:-26px; }
.show-media .pin.bl{ left:-24px; bottom:-24px; --r:6deg; }

/* ============================================================
   PRICING
   ============================================================ */
.price-toggle{ display:flex; align-items:center; justify-content:center; gap:14px; margin:28px 0 56px; }
.seg{ display:inline-flex; background:var(--surface); border:1px solid var(--line); border-radius:999px; padding:4px; }
.seg button{ border:0; background:transparent; font-family:var(--sans); font-weight:700; font-size:14px; color:var(--muted); padding:9px 20px; border-radius:999px; cursor:pointer; transition:.18s; }
.seg button.on{ background:var(--black); color:#FAF9F5; }
.save-pill{ font-size:12px; font-weight:700; color:var(--gold-deep); background:var(--gold-tint); border:1px solid var(--gold-soft); padding:5px 11px; border-radius:999px; }

.tiers{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; align-items:start; }
.tier{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:30px 26px; box-shadow:var(--shadow-card); position:relative; display:flex; flex-direction:column; }
.tier.pop{ border:1.5px solid var(--gold); box-shadow:0 24px 50px -24px rgba(160,128,20,.4); }
.tier__pop{ position:absolute; top:-13px; left:50%; transform:translateX(-50%); background:var(--gold); color:#211B07; font-size:11.5px; font-weight:800; letter-spacing:.05em; padding:6px 16px; border-radius:999px; text-transform:uppercase; }
.tier h3{ font-size:22px; margin-bottom:6px; }
.tier__sub{ font-size:13.5px; color:var(--muted); min-height:38px; margin-bottom:14px; }
.tier__price{ font-family:var(--serif); font-size:42px; font-weight:700; color:var(--ink); line-height:1; }
.tier__price .per{ font-family:var(--sans); font-size:15px; font-weight:600; color:var(--muted); }
.tier__feats{ list-style:none; padding:20px 0 24px; margin:0; display:grid; gap:11px; border-top:1px solid var(--line-2); margin-top:20px; flex:1; }
.tier__feats li{ display:flex; gap:10px; font-size:14px; color:var(--ink-2); align-items:flex-start; }
.tier__feats li.off{ color:#B6B2A8; }
.tier__feats svg{ width:17px; height:17px; flex:none; margin-top:2px; color:var(--gold-deep); }
.tier__feats li.off svg{ color:#CFCBC1; }
.tier .btn{ width:100%; }
.price-foot{ text-align:center; color:var(--muted); font-size:14.5px; margin-top:34px; }

/* ============================================================
   CTA band
   ============================================================ */
.cta{ position:relative; overflow:hidden; background:var(--black); color:#FAF9F5; border-radius:28px; padding:84px 40px; text-align:center; }
:root[data-theme="dark"] .cta{ border:1px solid var(--line); background:linear-gradient(180deg,#211E18,#1A1813); }
.cta__glow{ position:absolute; inset:0; background:radial-gradient(55% 70% at 50% 0%, color-mix(in srgb,var(--gold) 30%, transparent), transparent 70%); opacity:.5; }
.cta h2{ position:relative; color:#FAF9F5; font-size:clamp(34px,4.6vw,54px); }
.cta h2 .accent{ font-style:italic; color:var(--gold); }
.cta p{ position:relative; color:#D9D5CC; font-size:19px; margin:20px auto 34px; max-width:48ch; }
.cta .hero__actions{ position:relative; }
.cta .btn--ghost{ color:#FAF9F5; border-color:rgba(250,249,245,.3); }
.cta .btn--ghost:hover{ border-color:#FAF9F5; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer{ border-top:1px solid var(--line); padding:72px 0 40px; }
.footer__top{ display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:48px; }
.footer__logo{ height:26px; margin-bottom:18px; }
:root[data-theme="dark"] .footer__logo{ filter:invert(1) brightness(1.6) contrast(1.1); }
.footer p{ color:var(--muted); font-size:15px; max-width:30ch; margin:0; }
.footer h4{ font-family:var(--serif); font-size:18px; margin:0 0 18px; }
.footer__links{ list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.footer__links a{ color:var(--muted); font-size:15px; transition:color .15s; }
.footer__links a:hover{ color:var(--ink); }
.footer__mail{ display:inline-flex; align-items:center; gap:9px; color:var(--muted); font-size:15px; margin-bottom:20px; }
.footer__mail svg{ width:17px; height:17px; }
.socials{ display:flex; gap:10px; }
.socials a{ width:38px; height:38px; border-radius:10px; border:1px solid var(--line); display:grid; place-items:center; color:var(--ink-2); transition:.15s; }
.socials a:hover{ color:var(--gold-deep); border-color:var(--gold-soft); background:var(--gold-tint); }
.socials svg{ width:17px; height:17px; }
.footer__bar{ display:flex; align-items:center; justify-content:space-between; margin-top:56px; padding-top:26px; border-top:1px solid var(--line-2); font-size:14px; color:var(--muted); }
.footer__bar .heart{ color:#D9534F; }

/* ---------- entrance (kept visible by default for reliability) ---------- */
.reveal{ }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:980px){
  .grid-3{ grid-template-columns:repeat(2,1fr); }
  .tiers{ grid-template-columns:repeat(2,1fr); }
  .show-row{ grid-template-columns:1fr; gap:34px; }
  :root[data-hero="split"] .hero__layout{ grid-template-columns:1fr; gap:40px; text-align:center; }
  :root[data-hero="split"] .hero__text{ margin:0 auto; }
  :root[data-hero="split"] .hero__actions, :root[data-hero="split"] .hero__note{ justify-content:center; }
  :root[data-hero="split"] .hero__devices{ --devh:520px; }
  :root[data-hero="split"] .phone{ width:200px; }
  .show-row.flip .show-copy{ order:1; } .show-row.flip .show-media{ order:2; }
  .footer__top{ grid-template-columns:1fr 1fr; }
}
@media (max-width:680px){
  .section{ padding:72px 0; }
  .grid-3,.steps{ grid-template-columns:1fr; }
  .tiers{ grid-template-columns:1fr; }
  .nav__links .nav__link{ display:none; }
  .steps__line::before{ display:none; }
  .footer__top{ grid-template-columns:1fr; gap:32px; }
  .footer__bar{ flex-direction:column; gap:12px; text-align:center; }
  .cta{ padding:60px 24px; }
  .devices{ --devh:420px; }
  .phone{ width:172px; }
}
@media (max-width:430px){
  .laptop{ width:98%; }
  .phone{ width:150px; right:-4px; }
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
