/* planna — marketing site styles
   The Digital Atelier: editorial, refined, quietly confident
*/

:root {
  /* Brand palette */
  --sage: #516353;
  --sage-light: #B2C5B2;
  --blush: #FCD7D7;
  --rose: #735B5B;
  --sand: #F9DFB8;
  --terracotta: #6E5C3E;

  /* Surfaces */
  --cream: #FBF9F9;
  --card: #FFFFFF;
  --surface-low: #F5F3F3;
  --surface-mid: #EFEDED;

  /* Type */
  --ink: #1B1C1C;
  --muted: #5C5F5C;

  /* Accent (driven by Tweaks) */
  --accent: var(--sage);
  --accent-light: var(--sage-light);
  --accent-fg: #ffffff;

  /* Shadows — always sage-tinted, never black */
  --shadow-xs: 0 1px 2px rgba(81,99,83,0.04);
  --shadow-sm: 0 2px 8px rgba(81,99,83,0.06);
  --shadow-md: 0 8px 24px rgba(81,99,83,0.08);
  --shadow-lg: 0 24px 60px rgba(81,99,83,0.10);

  /* Layout */
  --container: 1440px;
  --gutter: clamp(20px, 3.2vw, 56px);

  /* Direction-specific (overridden by data-direction) */
  --hero-bg: var(--cream);
  --section-alt: var(--surface-low);
  --feature-bg: var(--cream);
  --paper: var(--sand);
}

/* Direction A — Editorial magazine
   Big Playfair, lots of negative space, very bridal print */
[data-direction="A"] {
  --hero-bg: var(--cream);
  --section-alt: var(--cream);
  --feature-bg: var(--surface-low);
  --paper: var(--sand);
}

/* Direction B — Warm & reassuring
   Softer sand/blush surfaces, rounder, friendlier */
[data-direction="B"] {
  --hero-bg: #FBF5EE;
  --section-alt: #F9DFB8;
  --feature-bg: #FCEFE9;
  --paper: var(--sand);
}

/* Direction C — Premium minimal (default lead)
   Restrained, mostly cream/white, sage used sparingly */
[data-direction="C"] {
  --hero-bg: var(--cream);
  --section-alt: #FFFFFF;
  --feature-bg: var(--surface-low);
  --paper: var(--surface-mid);
}

/* Accent overrides (driven by Tweaks) */
[data-accent="sage"] {
  --accent: var(--sage);
  --accent-light: var(--sage-light);
}
[data-accent="rose"] {
  --accent: var(--rose);
  --accent-light: #C9A8A8;
}
[data-accent="terracotta"] {
  --accent: var(--terracotta);
  --accent-light: #C9B28F;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
/* Pre-hydration splash — mirrors the real hero so there is no jump when React
   mounts. Plain HTML, so it paints on the first byte even on a slow connection. */
.boot{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:clamp(28px,3.2vw,56px);align-items:center;max-width:var(--container);margin:0 auto;padding:clamp(34px,4vw,68px) var(--gutter) clamp(30px,3.4vw,56px);animation:boot-in .4s ease-out}
.boot-copy{display:flex;flex-direction:column;align-items:flex-start;max-width:38rem}
.boot-h1{margin:20px 0 0;text-align:left;font-family:Georgia,'Times New Roman',serif;font-weight:400;font-size:clamp(31px,3.4vw,50px);line-height:1.08;letter-spacing:-0.015em;color:var(--ink);text-wrap:normal}
.boot-copy p{margin:16px 0 0;color:var(--muted);font-size:clamp(15px,1.2vw,17.5px);line-height:1.6;max-width:52ch}
.boot-badge{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:999px;background:rgba(81,99,83,.08);color:var(--accent);font-size:12px;font-weight:600;letter-spacing:.03em}
.boot-dot{width:6px;height:6px;border-radius:999px;background:var(--accent-light);animation:boot-pulse 1.6s ease-in-out infinite}
.boot-form{display:flex;align-items:center;gap:8px;margin-top:26px;width:100%;max-width:540px;background:var(--card);border-radius:14px;padding:6px;box-shadow:var(--shadow-xs)}
.boot-input{flex:1;padding:13px 14px;font-size:15px;color:var(--muted);opacity:.6}
.boot-btn{padding:13px 20px;border-radius:10px;background:var(--accent);color:#fff;font-size:14.5px;font-weight:600;white-space:nowrap}
/* three shimmering placeholders where the phones land */
.boot-visual{position:relative;display:flex;justify-content:flex-start;align-items:center;margin-left:-14px}
.boot-phone{position:relative;display:block;border-radius:13.6%/6.4%;background:linear-gradient(100deg,rgba(81,99,83,.09),rgba(81,99,83,.16),rgba(81,99,83,.09));background-size:200% 100%;animation:boot-shimmer 1.5s ease-in-out infinite}
.boot-visual{width:100%;max-width:700px;aspect-ratio:528/522}
.boot-phone-c{position:absolute;left:27.5%;width:45%;aspect-ratio:9/19.02;top:0;z-index:2}
.boot-phone-l,.boot-phone-r{position:absolute;width:42%;aspect-ratio:9/19.02;top:5.5%}
.boot-phone-l{left:0}.boot-phone-r{right:0}
@keyframes boot-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes boot-pulse{0%,100%{opacity:1}50%{opacity:.35}}
@keyframes boot-shimmer{0%{background-position:0% 0}100%{background-position:-200% 0}}
@media (max-width:900px){.boot{grid-template-columns:1fr;gap:34px}.boot-copy{align-items:center;text-align:center;max-width:none}.boot-copy h1{text-align:center}.boot-visual{order:2;margin-left:0}}
/* Accessibility: honour reduced-motion, keep keyboard focus visible */
@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}html{scroll-behavior:auto}}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
body {
  background: var(--cream);
  color: var(--ink);
  overflow-x: clip;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Type system */
.serif { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
.accent-italic { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 400; }
.eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--ink);
  text-wrap: balance;
}
[data-direction="A"] .display { letter-spacing: -0.025em; }

h1.display { font-size: clamp(44px, 6.4vw, 84px); }
h2.display { font-size: clamp(32px, 4vw, 52px); }
h3.display { font-size: clamp(24px, 2.4vw, 32px); }

p.lead {
  font-size: clamp(17px, 1.2vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
  max-width: 56ch;
}

/* Layout helpers */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: clamp(22px, 2.2vw, 36px) 0;
  position: relative;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, background .25s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--accent-fg);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: var(--card);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(81,99,83,0.2);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px rgba(81,99,83,0.4); }
.btn-lg { height: 56px; padding: 0 26px; font-size: 16px; }
.btn-sm { height: 40px; padding: 0 14px; font-size: 13px; border-radius: 10px; }

/* Pill / chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}
.chip-ghost {
  background: rgba(81,99,83,0.06);
  color: var(--sage);
  box-shadow: none;
}
.chip-sand { background: var(--sand); color: var(--terracotta); }
.chip-blush { background: var(--blush); color: var(--rose); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,249,249,0.92);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.wordmark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
}
.wordmark::after { content: "."; color: var(--accent); }
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.78;
  transition: opacity .2s;
}
.nav-links a:hover { opacity: 1; }
@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* Waitlist input */
.waitlist {
  display: flex;
  background: var(--card);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-sm);
  max-width: 480px;
  margin: 0 auto;
  gap: 6px;
}
.waitlist input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  min-width: 0;
}
.waitlist input::placeholder { color: var(--muted); opacity: .7; }
.waitlist .btn { height: 44px; padding: 0 18px; }
.waitlist.success { box-shadow: 0 0 0 1px var(--accent-light), var(--shadow-sm); }
@media (max-width: 400px) {
  .waitlist { flex-wrap: wrap; }
  .waitlist input { flex: 1 1 100%; text-align: center; }
  .waitlist .btn { flex: 1 1 100%; }
}

/* Section title pattern */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 780px;
  margin-bottom: clamp(20px, 2.4vw, 34px);
}
.section-head .eyebrow { color: var(--accent); opacity: .85; }
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  align-items: center;
}

/* Reveal on scroll — only hides content when explicitly activated by JS.
   Without the .js-reveal class on <html>, elements stay visible (good for the
   sandboxed preview which throttles animations + good no-JS fallback). */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.js-reveal .reveal.in {
  opacity: 1;
  transform: none;
}
.js-reveal .reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.js-reveal .reveal-stagger.in > * { opacity: 1; transform: none; }
.js-reveal .reveal-stagger.in > *:nth-child(1) { transition-delay: 0s; }
.js-reveal .reveal-stagger.in > *:nth-child(2) { transition-delay: .08s; }
.js-reveal .reveal-stagger.in > *:nth-child(3) { transition-delay: .16s; }
.js-reveal .reveal-stagger.in > *:nth-child(4) { transition-delay: .24s; }
.js-reveal .reveal-stagger.in > *:nth-child(5) { transition-delay: .32s; }
.js-reveal .reveal-stagger.in > *:nth-child(6) { transition-delay: .40s; }
.js-reveal .reveal-stagger.in > *:nth-child(7) { transition-delay: .48s; }

/* Hero floating "highlight" card — appears beside the cycling phone,
   crossfades with each feature. Sized small (~240px) and never above 320px. */
.hl-card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 24px 48px rgba(81,99,83,0.16), 0 2px 6px rgba(81,99,83,0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hl-card-img {
  padding: 0;
  overflow: hidden;
}
.hl-img {
  width: 100%;
  height: 110px;
  background-position: center;
  background-size: cover;
}
.hl-card-img .hl-card-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.hl-eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.hl-big {
  font-size: 36px;
  color: var(--accent);
  line-height: 1;
  margin-top: 4px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.hl-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.hl-price {
  font-size: 18px;
  color: var(--ink);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.hl-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-mid);
  margin-top: 10px;
  display: flex;
  overflow: hidden;
  gap: 2px;
}
.hl-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 999px;
}
.editorial-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.frame {
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface-mid);
  position: relative;
}
.frame-tall { aspect-ratio: 4/5; }
.frame-wide { aspect-ratio: 16/10; }
.frame-square { aspect-ratio: 1/1; }

/* App device frame — brushed-titanium rail, black bezel, side buttons */
.phone {
  position: relative;
  width: 280px;
  aspect-ratio: 9/19.02;
  border-radius: 13.6%/6.4%;
  padding: 2.6%;
  flex-shrink: 0;
  background:
    linear-gradient(100deg, #6E6E71 0%, #C9C7C4 6%, #E9E7E3 13%, #A9A7A4 26%, #8A8887 50%, #A9A7A4 74%, #E9E7E3 87%, #C9C7C4 94%, #6E6E71 100%);
  box-shadow:
    var(--shadow-lg),
    inset 0 0 0 1px rgba(255,255,255,.5),
    inset 0 0 0 2.5px rgba(0,0,0,.22);
}
/* Side buttons — painted as gradient bars so they scale with the frame */
.phone::before, .phone::after {
  content: ''; position: absolute; width: 2.5px; z-index: 0;
  background-repeat: no-repeat;
  background-image: linear-gradient(90deg, #787674, #C4C2BE);
}
.phone::before {
  left: -2px; top: 19.5%; height: 21%;
  border-radius: 2px 0 0 2px;
  background-image:
    linear-gradient(90deg, #787674, #C4C2BE),
    linear-gradient(90deg, #787674, #C4C2BE),
    linear-gradient(90deg, #787674, #C4C2BE);
  background-size: 100% 17%, 100% 30%, 100% 30%;
  background-position: 0 0, 0 47%, 0 100%;
}
.phone::after {
  right: -2px; top: 27%; height: 9%;
  border-radius: 0 2px 2px 0;
}
.phone-shot-img{position:absolute;left:0;top:0;width:100%;height:auto;min-height:100%;object-fit:cover;object-position:50% 0;display:block}
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--cream);
  border-radius: 12.1%/5.72%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 1.2px #0B0B0C;
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 28px;
  background: #0a0a0a;
  border-radius: 999px;
  z-index: 3;
}
.phone-statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
  color: var(--ink);
}
.phone-statusbar .right { display: flex; gap: 5px; align-items: center; }

/* Cards */
.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.card-lg { padding: 32px; border-radius: 20px; }
.tile {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Feather-style icons drawn inline as SVG.
   Always 1.5px stroke, currentColor */

/* Visually hidden */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Footer (legacy block reset — actual footer styling lives in the component
   <style> block inside Footer / footer HTML — kept minimal here so the
   footer is laid out solely by its own rules). */
footer.site-foot {
  background: transparent;
  padding: 0;
  border-top: 0;
}

/* Direction-specific motifs */
[data-direction="A"] section.hero { padding-top: clamp(80px, 8vw, 120px); padding-bottom: clamp(80px, 9vw, 160px); }
[data-direction="A"] h1.display { font-size: clamp(48px, 8vw, 110px); }
[data-direction="A"] .feature-tile { background: var(--card); }

[data-direction="B"] .tile { border-radius: 28px; }
[data-direction="B"] .btn { border-radius: 14px; }
[data-direction="B"] section.hero { background: linear-gradient(180deg, #FBF5EE 0%, var(--cream) 100%); }

[data-direction="C"] section.hero { background: var(--cream); }
[data-direction="C"] .card { box-shadow: var(--shadow-xs); }

/* Utility flexes */
.row { display: flex; gap: 16px; align-items: center; }
.col { display: flex; flex-direction: column; }

/* Print-style rule / ornament */
.ornament {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  opacity: .55;
}
.ornament::before, .ornament::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

/* Nav wordmark emphasis */
.site-header .wordmark{font-size:31px;font-weight:400;color:#3A4A3C;letter-spacing:-0.01em}

/* hero CTA row — kept here so layout survives when the waitlist counter is hidden */
.hero-cta-row{position:relative;width:100%;display:flex;justify-content:center;align-items:center}
@media (max-width:900px){.hero-cta-row{flex-direction:column;gap:4px}}
