/* ===== Storyfolio landing + product redesign ===== */

:root {
  --cream-50: #FDFCFA;
  --cream-100: #FAF7F2;
  --cream-200: #F0EBE1;
  --cream-300: #E2D9CC;
  --cream-400: #C8B99A;
  --ochre-300: #E2C074;
  --ochre-400: #D4A54A;
  --ochre-500: #C8913A;
  --ochre-600: #A87530;
  --moss-400: #9AAB8C;
  --moss-500: #7A8C6E;
  --moss-600: #5C6E52;
  --ink-500: #4A4540;
  --ink-700: #2C2825;
  --ink-900: #1A1714;
  --rose: #D4A096;
  --midnight: #2C3A5C;

  --shadow-soft: 0 2px 8px rgba(74,69,64,0.08);
  --shadow-medium: 0 4px 16px rgba(74,69,64,0.12);
  --shadow-lifted: 0 10px 30px rgba(74,69,64,0.16);
  --shadow-press: 0 20px 60px rgba(74,69,64,0.22);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--cream-100);
  color: var(--ink-500);
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, h4, .serif {
  font-family: 'Lora', 'Georgia', serif;
  color: var(--ink-700);
  font-weight: 500;
  letter-spacing: -0.01em;
}

button, input, textarea { font-family: inherit; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ---------- Layout ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.wrap-narrow { max-width: 920px; margin: 0 auto; padding: 0 40px; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(74,69,64,0.55);
  font-weight: 500;
}

.rule {
  height: 1px;
  background: var(--cream-300);
  border: 0;
}

.dashed-rule {
  height: 1px;
  background-image: linear-gradient(to right, var(--cream-400) 50%, transparent 50%);
  background-size: 8px 1px;
  background-repeat: repeat-x;
  border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; padding: 12px 20px; border-radius: 14px;
  border: 1px solid transparent; cursor: pointer; transition: all 150ms;
  text-decoration: none;
}
.btn-primary { background: var(--ink-700); color: var(--cream-100); }
.btn-primary:hover { background: var(--ink-900); }
.btn-ghost { background: transparent; color: var(--ink-700); border-color: var(--cream-300); }
.btn-ghost:hover { background: var(--cream-200); }
.btn-accent { background: var(--ochre-500); color: #fff; }
.btn-accent:hover { background: var(--ochre-600); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,247,242,0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--cream-300);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: 'Lora', serif; font-size: 18px; color: var(--ink-700); }
.nav-logo .mark { color: var(--ochre-500); font-size: 18px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-500); text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: var(--ink-700); }

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 80px; align-items: center; }
.hero h1 {
  font-size: clamp(48px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 18px 0 24px;
  font-weight: 500;
}
.hero h1 em {
  font-style: italic;
  color: var(--ochre-600);
  font-weight: 400;
}
.hero-lede {
  font-size: 18px;
  line-height: 1.65;
  color: rgba(74,69,64,0.8);
  max-width: 480px;
  margin-bottom: 36px;
}
.hero-ctas { display: flex; gap: 14px; align-items: center; margin-bottom: 32px; }
.hero-note {
  font-size: 13px;
  color: rgba(74,69,64,0.55);
  display: flex; align-items: center; gap: 10px;
}
.hero-note .dot { width: 6px; height: 6px; background: var(--moss-500); border-radius: 50%; }

/* Hero illustration: taped postcard spread */
.hero-plate {
  position: relative;
  padding: 30px 0 10px 20px;
}
.postcard {
  position: relative;
  background: #FEFCF8;
  border: 1px solid var(--cream-300);
  box-shadow: var(--shadow-press);
  border-radius: 6px;
  transform: rotate(-1.4deg);
  padding: 18px 18px 22px;
  width: 100%;
}
.postcard::before, .postcard::after {
  content: "";
  position: absolute;
  width: 90px; height: 22px;
  background: rgba(210, 195, 160, 0.55);
  mix-blend-mode: multiply;
  border-left: 1px dashed rgba(120,100,60,0.2);
  border-right: 1px dashed rgba(120,100,60,0.2);
}
.postcard::before { top: -10px; left: 40px; transform: rotate(-6deg); }
.postcard::after { top: -10px; right: 60px; transform: rotate(5deg); }
.postcard .spread { aspect-ratio: 2/1.25; }
.postcard-caption {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(74,69,64,0.5);
}
.hero-secondary {
  position: absolute;
  right: -30px; top: 24px;
  width: 180px;
  background: #FFF;
  border: 1px solid var(--cream-300);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow-lifted);
  transform: rotate(4deg);
  z-index: 2;
}
.hero-secondary .mini-spread { aspect-ratio: 1.6/1; border-radius: 8px; }
.hero-thread {
  position: absolute;
  left: -20px; bottom: -6px;
  width: 210px;
  background: var(--cream-100);
  border: 1px solid var(--cream-300);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-medium);
  transform: rotate(-3deg);
  z-index: 3;
}
.hero-thread .role { font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ochre-600); }
.hero-thread p { margin: 4px 0 0; font-family: 'Lora', serif; font-size: 12px; line-height: 1.4; color: var(--ink-700); font-style: italic; }

/* ---------- Spread placeholder (faux watercolor paper) ---------- */
.spread {
  width: 100%;
  aspect-ratio: 2 / 1.25;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  background:
    /* grain */
    radial-gradient(circle at 22% 30%, rgba(212,165,74,0.14), transparent 40%),
    radial-gradient(circle at 78% 72%, rgba(154,171,140,0.22), transparent 45%),
    radial-gradient(circle at 48% 18%, rgba(212,160,150,0.10), transparent 38%),
    linear-gradient(135deg, #F6EFDE, #EDE2C9);
  display: flex;
}
.spread::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(120,100,60,0.04) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120,100,60,0.03) 0 1px, transparent 1px 4px);
  pointer-events: none;
  opacity: 0.6;
}
.spread .spine { width: 1px; background: rgba(120,100,60,0.14); height: 100%; }
.spread .half { flex: 1 1 50%; min-width: 0; position: relative; padding: 6%; display: flex; flex-direction: column; justify-content: flex-end; }

/* Spread moods — warm paper with gentle tint shift */
.spread.mood-dusk {
  background:
    radial-gradient(circle at 78% 35%, rgba(226,138,92,0.08), transparent 55%),
    linear-gradient(160deg, #FBF3DE 0%, #F2E5C6 100%);
}
.spread.mood-forest {
  background:
    radial-gradient(circle at 30% 40%, rgba(120,140,96,0.08), transparent 55%),
    linear-gradient(150deg, #F7F0D8 0%, #EBE2C1 100%);
}
.spread.mood-morning {
  background:
    radial-gradient(circle at 50% 45%, rgba(248,208,120,0.12), transparent 55%),
    linear-gradient(160deg, #FBF3DE 0%, #F3E6C4 100%);
}
.spread.mood-midnight {
  background:
    radial-gradient(circle at 30% 30%, rgba(60,70,108,0.18), transparent 55%),
    linear-gradient(160deg, #EFE6D0 0%, #D9CFB4 100%);
}
.spread.mood-midnight .spread-label,
.spread.mood-midnight .spread-text,
.spread.mood-midnight .spread-title,
.spread.mood-midnight .spread-caption { color: rgba(44,38,34,0.8); }
.spread.mood-cream {
  background:
    radial-gradient(circle at 20% 20%, rgba(226,192,116,0.10), transparent 50%),
    linear-gradient(160deg, #FBF4DE 0%, #F1E4C4 100%);
}
/* Add subtle paper grain to every spread */
.spread::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(120,100,60,0.05), transparent 35%),
    radial-gradient(circle at 85% 75%, rgba(120,100,60,0.05), transparent 35%);
  pointer-events: none;
  z-index: 0;
}

.spread-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(44,40,37,0.5);
  letter-spacing: 0.06em;
  align-self: flex-start;
  margin-bottom: auto;
  z-index: 3;
  position: relative;
}
.spread-text {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(44,40,37,0.72);
  max-width: 80%;
  position: relative;
  z-index: 3;
}
.spread.mood-midnight .spread-text,
.spread.mood-midnight .spread-title { color: rgba(250,247,242,0.9); }

/* ---------- Scene: illustration compositions inside .spread .half ---------- */
.scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.scene svg { width: 100%; height: 100%; display: block; }

.spread-title {
  font-family: 'Lora', serif;
  font-size: 18px;
  line-height: 1.1;
  color: rgba(44,40,37,0.85);
  letter-spacing: -0.01em;
  position: relative;
  z-index: 3;
  max-width: 88%;
}
.spread-title .drop {
  font-size: 2.8em;
  float: left;
  line-height: 0.85;
  margin: 2px 6px 0 0;
  color: var(--ochre-500);
  font-style: italic;
}
.spread-caption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(44,40,37,0.45);
  margin-top: 6px;
  position: relative;
  z-index: 3;
}
.spread.mood-midnight .spread-caption { color: rgba(250,247,242,0.6); }

/* tiny pencil-underline accents */
.spread .scratch {
  position: absolute;
  height: 1px;
  background: rgba(120,100,60,0.35);
}

/* ---------- Section header ---------- */
.section { padding: 96px 0; }
.section-head { margin-bottom: 56px; max-width: 720px; }
.section-head h2 { font-size: clamp(34px, 3.4vw, 44px); line-height: 1.1; margin: 16px 0 14px; letter-spacing: -0.02em; }
.section-head p { font-size: 17px; color: rgba(74,69,64,0.75); line-height: 1.6; margin: 0; }

/* ---------- Follow one book ---------- */
.follow {
  background: var(--cream-50);
  border-top: 1px solid var(--cream-300);
  border-bottom: 1px solid var(--cream-300);
}
.follow-scene {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: start;
  padding: 36px 0;
  border-top: 1px solid var(--cream-300);
}
.follow-scene:first-of-type { border-top: 0; }
.follow-scene .step {
  position: sticky; top: 120px;
}
.follow-scene .step .num {
  font-family: 'Lora', serif;
  font-size: 44px;
  color: var(--ochre-500);
  line-height: 1;
  margin-bottom: 12px;
  font-style: italic;
}
.follow-scene .step h3 { font-size: 22px; margin: 0 0 10px; }
.follow-scene .step p { margin: 0; font-size: 15px; color: rgba(74,69,64,0.7); }

/* ---------- Product screen frames ---------- */
.screen-frame {
  background: var(--cream-100);
  border: 1px solid var(--cream-300);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lifted);
}
.screen-bar {
  background: var(--cream-200);
  border-bottom: 1px solid var(--cream-300);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
}
.screen-bar .dot-trio { display: flex; gap: 6px; }
.screen-bar .dot-trio span { width: 10px; height: 10px; border-radius: 50%; background: var(--cream-300); }
.screen-bar .title { font-size: 11px; color: rgba(74,69,64,0.5); margin-left: 8px; font-family: 'JetBrains Mono', monospace; }

/* ---------- Feature grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--cream-300);
  border: 1px solid var(--cream-300);
  border-radius: 20px;
  overflow: hidden;
}
.feature {
  background: var(--cream-100);
  padding: 36px 28px 32px;
  display: flex; flex-direction: column;
  min-height: 280px;
}
.feature .icon {
  width: 44px; height: 44px;
  border: 1px solid var(--cream-300);
  border-radius: 12px;
  background: var(--cream-50);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--ochre-600);
  font-size: 18px;
}
.feature h4 { font-size: 18px; margin: 0 0 8px; }
.feature p { font-size: 14px; color: rgba(74,69,64,0.7); margin: 0; flex: 1; line-height: 1.55; }
.feature .learn { margin-top: 16px; font-size: 12px; color: var(--ochre-600); font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em; }

/* ---------- Testimonials ---------- */
.blurbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blurb {
  padding: 36px 32px;
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: 20px;
  display: flex; flex-direction: column; gap: 20px;
  position: relative;
}
.blurb-quote {
  font-family: 'Lora', serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-700);
  font-style: italic;
  margin: 0;
  text-wrap: pretty;
}
.blurb-quote::before {
  content: "“";
  font-size: 52px;
  line-height: 0.4;
  color: var(--ochre-400);
  margin-right: 2px;
  vertical-align: -0.28em;
}
.blurb-by {
  display: flex; align-items: center; gap: 12px;
  margin-top: auto;
}
.blurb-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ochre-400), var(--rose));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}
.blurb-by .name { font-size: 13px; color: var(--ink-700); font-weight: 500; }
.blurb-by .role { font-size: 12px; color: rgba(74,69,64,0.55); }

/* ---------- Pricing ---------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pricing.pricing-2 {
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 920px;
  margin: 0 auto;
}
.plan {
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: 20px;
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.plan.featured {
  background: var(--ink-700);
  color: var(--cream-100);
  border-color: var(--ink-700);
}
.plan.featured h3, .plan.featured .price { color: var(--cream-100); }
.plan.featured li { color: rgba(250,247,242,0.8); }
.plan.featured li::before { color: var(--ochre-300); }
.plan.featured .plan-blurb { color: rgba(250,247,242,0.7); }

.plan-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(74,69,64,0.5);
  display: inline-flex; align-items: center; gap: 6px;
}
.plan.featured .plan-tag { color: var(--ochre-300); }
.plan h3 { font-size: 24px; margin: 0; }
.plan .price { font-family: 'Lora', serif; font-size: 42px; color: var(--ink-700); margin: 4px 0 0; font-weight: 500; letter-spacing: -0.02em; }
.plan .price .per { font-size: 14px; color: rgba(74,69,64,0.5); font-family: 'DM Sans', sans-serif; margin-left: 4px; font-style: normal; }
.plan.featured .price .per { color: rgba(250,247,242,0.55); }
.plan .plan-blurb { margin: 0; font-size: 14px; color: rgba(74,69,64,0.7); line-height: 1.5; }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { font-size: 14px; color: rgba(74,69,64,0.75); position: relative; padding-left: 22px; line-height: 1.5; }
.plan li::before { content: "✦"; color: var(--ochre-500); position: absolute; left: 0; top: 0; font-size: 11px; }
.plan .btn { justify-content: center; width: 100%; }
.plan.featured .btn-primary { background: var(--ochre-500); }
.plan.featured .btn-primary:hover { background: var(--ochre-400); }

.plan-ribbon {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  background: rgba(226,192,116,0.14);
  color: var(--ochre-300);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(226,192,116,0.22);
  margin-bottom: -8px;
}
.ribbon-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ochre-300); }

.plan .price .strike {
  font-family: 'Lora', serif;
  font-size: 18px;
  color: rgba(74,69,64,0.35);
  text-decoration: line-through;
  margin-left: 10px;
  font-style: italic;
  font-weight: 400;
}
.plan.featured .price .strike { color: rgba(250,247,242,0.35); }
.plan-foot {
  margin: -4px 0 0;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(74,69,64,0.5);
  line-height: 1.5;
}
.plan.featured .plan-foot { color: rgba(250,247,242,0.55); }
.plan li strong { color: var(--ink-700); font-weight: 600; }
.plan.featured li strong { color: var(--cream-100); }
.plan li em { font-style: italic; color: rgba(74,69,64,0.55); }
.plan.featured li em { color: rgba(250,247,242,0.7); }

.pricing-footnote {
  max-width: 920px;
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  padding: 14px 18px;
  background: var(--cream-100);
  border: 1px dashed var(--cream-300);
  border-radius: 12px;
}
.pricing-footnote span { color: var(--ochre-500); font-size: 12px; line-height: 1.6; }
.pricing-footnote p {
  margin: 0;
  font-size: 13px;
  color: rgba(74,69,64,0.7);
  line-height: 1.6;
  font-family: 'Lora', serif;
  font-style: italic;
}

/* ---------- Makers note / footer ---------- */
.makers {
  padding: 120px 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(212,165,74,0.08), transparent 50%),
    radial-gradient(ellipse at 20% 90%, rgba(212,160,150,0.08), transparent 50%),
    var(--cream-100);
  border-top: 1px solid var(--cream-300);
}
.makers-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.makers-body { font-family: 'Lora', serif; font-size: 20px; line-height: 1.65; color: var(--ink-700); }
.makers-body p { margin: 0 0 18px; }
.makers-body p:first-letter { font-size: 40px; float: left; line-height: 1; padding: 4px 8px 0 0; color: var(--ochre-500); font-weight: 500; }
.makers-sig {
  margin-top: 28px;
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-500);
}

.final-cta {
  background: var(--ink-700);
  color: var(--cream-100);
  text-align: center;
  padding: 110px 20px;
  position: relative;
  overflow: hidden;
}
.final-cta h2 { color: var(--cream-100); font-size: clamp(40px, 5vw, 64px); margin: 0 0 18px; letter-spacing: -0.025em; }
.final-cta h2 em { color: var(--ochre-300); font-weight: 400; }
.final-cta p { max-width: 520px; margin: 0 auto 32px; font-size: 17px; color: rgba(250,247,242,0.7); }
.final-cta .btn-accent { font-size: 16px; padding: 14px 26px; }

footer.site {
  padding: 50px 0 40px;
  border-top: 1px solid var(--cream-300);
}
footer.site .foot-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
}
footer.site p { margin: 0; font-size: 13px; color: rgba(74,69,64,0.55); }
footer.site .foot-links { display: flex; gap: 24px; }
footer.site a { font-size: 13px; color: rgba(74,69,64,0.7); text-decoration: none; }
footer.site a:hover { color: var(--ink-700); }

/* ---------- Storyboard sheet (hero image) ---------- */
.sb-sheet {
  position: relative;
  background: #FEFCF8;
  padding: 46px 30px 44px;
  border-radius: 4px;
  box-shadow:
    0 18px 46px rgba(74,69,64,0.22),
    0 2px 6px rgba(74,69,64,0.08);
  transform: rotate(-1.2deg);
  max-width: 520px;
  margin: 0 auto;
}
.sb-sheet::before, .sb-sheet::after {
  content: "";
  position: absolute;
  width: 92px; height: 22px;
  background: rgba(212, 196, 160, 0.55);
  mix-blend-mode: multiply;
  border-left: 1px dashed rgba(120,100,60,0.2);
  border-right: 1px dashed rgba(120,100,60,0.2);
  top: -11px;
  pointer-events: none;
}
.sb-sheet::before { left: 44px; transform: rotate(-5deg); }
.sb-sheet::after  { right: 60px; transform: rotate(4deg); }

.sb-sheet-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(120,100,60,0.22);
}
.sb-sheet-head .title {
  font-family: 'Caveat', cursive;
  font-size: 30px;
  color: var(--ink-700);
  line-height: 1;
}
.sb-sheet-head .sub {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  color: rgba(74,69,64,0.55);
}

.sb-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Shared pencil panel — used in the hero sheet and the storyboard grid */
.sb-panel {
  position: relative;
  aspect-ratio: 10/7;
  background:
    radial-gradient(circle at 18% 22%, rgba(120,100,60,0.04), transparent 40%),
    radial-gradient(circle at 82% 78%, rgba(120,100,60,0.03), transparent 40%),
    #FDFBF5;
  border-radius: 2px;
  overflow: hidden;
}
.sb-panel .scene { position: absolute; inset: 0; }
.sb-panel-border {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
}
.sb-panel-num {
  position: absolute;
  top: 3px; right: 8px;
  font-family: 'Caveat', cursive;
  font-size: 15px;
  color: rgba(32,28,24,0.78);
  z-index: 3;
  line-height: 1;
}
.sb-panel-label {
  position: absolute;
  bottom: 4px; left: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(44,40,37,0.5);
  z-index: 3;
  letter-spacing: 0.04em;
}
.sb-panel-active { box-shadow: inset 0 0 0 1.5px rgba(200,145,58,0.4); }
.sb-panel-active::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(125deg, transparent 30%, rgba(246,214,80,0.38) 70%);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

/* Margin note on the hero sheet */
.sb-sheet-note {
  position: absolute;
  right: 22px; bottom: 14px;
  font-family: 'Caveat', cursive;
  font-size: 15px;
  color: rgba(74,69,64,0.68);
  transform: rotate(-2.5deg);
  max-width: 170px;
  text-align: right;
  pointer-events: none;
}
.sb-sheet-scribble {
  position: absolute;
  left: 28px; bottom: 14px;
  font-family: 'Caveat', cursive;
  font-size: 13px;
  color: rgba(74,69,64,0.48);
  transform: rotate(1.6deg);
  pointer-events: none;
}

/* Storyboard grid inside the product-screen mockup (step ii.) */
.sb-thumb-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.sb-thumb { display: flex; flex-direction: column; gap: 6px; }
.sb-thumb .sb-panel { aspect-ratio: 2/1.18; }
.sb-thumb-caption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(74,69,64,0.55);
  text-align: center;
  letter-spacing: 0.04em;
}
.sb-panel-spine {
  position: absolute;
  top: 6%; bottom: 6%; left: 50%;
  width: 1px;
  background: rgba(120,100,60,0.18);
  z-index: 2;
  pointer-events: none;
}

/* ---------- Tweaks panel ---------- */
.tweaks-panel {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  background: #fff;
  border: 1px solid var(--cream-300);
  border-radius: 18px;
  box-shadow: var(--shadow-lifted);
  padding: 16px;
  width: 280px;
  display: none;
  font-size: 13px;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h4 { font-family: 'Lora', serif; font-size: 15px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--cream-300); display: flex; align-items: center; justify-content: space-between; }
.tweaks-panel h4 .close { background: none; border: 0; color: rgba(74,69,64,0.5); cursor: pointer; font-size: 16px; line-height: 1; }
.tweaks-row { margin-bottom: 12px; }
.tweaks-row label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(74,69,64,0.55); margin-bottom: 6px; display: block; }
.tweaks-swatches { display: flex; gap: 8px; }
.tweaks-swatches button {
  width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent; cursor: pointer;
  transition: transform 120ms;
}
.tweaks-swatches button:hover { transform: scale(1.08); }
.tweaks-swatches button.active { border-color: var(--ink-700); }
.tweaks-toggle-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 99;
  background: var(--ink-700); color: var(--cream-100);
  border: 0; border-radius: 999px; padding: 10px 16px;
  font-size: 13px; font-family: inherit; cursor: pointer;
  box-shadow: var(--shadow-medium);
  display: none;
}
.tweaks-toggle-btn.shown { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Accent swap (applied via data-accent) ---------- */
body[data-accent="moss"] {
  --ochre-400: #9AAB8C;
  --ochre-500: #7A8C6E;
  --ochre-600: #5C6E52;
  --ochre-300: #B8C4AB;
}
body[data-accent="rose"] {
  --ochre-400: #E0B5AC;
  --ochre-500: #D4A096;
  --ochre-600: #B5867C;
  --ochre-300: #EBC9C1;
}
body[data-accent="midnight"] {
  --ochre-400: #4A5B80;
  --ochre-500: #2C3A5C;
  --ochre-600: #1E2844;
  --ochre-300: #6E7E9F;
}

/* ---------- Mobile (up to ~860px) ---------- */
@media (max-width: 860px) {
  .wrap, .wrap-narrow { padding: 0 22px; }

  /* Nav collapses to the logo + the primary CTA; hide the inline menu */
  .nav-links a:not(.btn) { display: none; }
  .nav-links { gap: 10px; }
  .nav-inner { padding: 14px 0; }

  /* Hero stacks vertically, text first, then the sketchbook sheet */
  .hero { padding: 48px 0 24px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero h1 { font-size: clamp(36px, 9vw, 52px); margin: 12px 0 18px; }
  .hero-lede { font-size: 16px; margin-bottom: 24px; max-width: none; }
  .hero-ctas { flex-wrap: wrap; }
  .hero-plate { padding: 10px 0 0; }
  .sb-sheet { padding: 34px 18px 28px; transform: rotate(-1deg); }
  .sb-sheet-head { margin-bottom: 14px; }
  .sb-sheet-head .title { font-size: 24px; }
  .sb-sheet-head .sub { font-size: 12px; }
  .sb-sheet-grid { gap: 7px; }
  .sb-sheet::before { left: 26px; width: 72px; }
  .sb-sheet::after  { right: 30px; width: 72px; }
  .sb-sheet-note { font-size: 13px; right: 14px; bottom: 10px; max-width: 130px; }
  .sb-sheet-scribble { left: 18px; bottom: 10px; font-size: 11px; }

  /* Section paddings */
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: clamp(26px, 6vw, 34px); }
  .section-head p { font-size: 15px; }

  /* Follow-one-book: steps stack above each mockup */
  .follow-scene {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 0;
  }
  .follow-scene .step { position: static; }
  .follow-scene .step .num { font-size: 34px; margin-bottom: 6px; }
  .follow-scene .step h3 { font-size: 19px; }
  .screen-frame { border-radius: 10px; }
  /* Step ii storyboard grid: 3 columns on mobile instead of 5 */
  .sb-thumb-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .sb-thumb-caption { font-size: 8px; }

  /* Features grid: single column */
  .features {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }
  .feature { min-height: auto; padding: 26px 22px 22px; }

  /* The three extra feature cards (Palette / Version / Locally) */
  #features > .wrap > div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
    margin-top: 16px !important;
  }

  /* Pricing: stack */
  .pricing.pricing-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .plan { padding: 28px 24px; }
  .plan h3 { font-size: 22px; }
  .plan .price { font-size: 36px; }

  /* Maker's note: stack */
  .makers { padding: 72px 0; }
  .makers-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .makers-grid h2 { font-size: 30px !important; }
  .makers-body { font-size: 17px; }

  /* Final CTA */
  .final-cta { padding: 72px 20px; }
  .final-cta h2 { font-size: clamp(30px, 7vw, 44px); }

  /* Footer stacks */
  footer.site .foot-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ---------- Very narrow phones ---------- */
@media (max-width: 420px) {
  .hero h1 { font-size: 34px; }
  .sb-sheet-grid { grid-template-columns: repeat(2, 1fr); }
  .sb-thumb-grid { grid-template-columns: repeat(2, 1fr); }
}
