/* ============================================================
   Stillwright — marketing site
   Design tokens vendored from the Stillwright design system
   (_ds colors_and_type). The --fw-* prefix is the internal token
   namespace, kept as-is; the brand is Stillwright.
   ============================================================ */

:root {
  /* Brand palette */
  --fw-ink: #080B1E;
  --fw-ink-2: #0E1533;
  --fw-ink-3: #18234C;
  --fw-blue: #3D7BFF;
  --fw-blue-soft: #8FB4FF;
  --fw-indigo: #2A4ED6;
  --fw-paper: #E7ECFB;
  --fw-muted: #9AA8D4;
  --fw-white: #FFFFFF;

  /* Backgrounds & lines */
  --bg-1: var(--fw-ink-2);
  --bg-glass: rgba(14, 21, 51, 0.55);
  --line: rgba(143, 180, 255, 0.16);
  --line-strong: rgba(143, 180, 255, 0.34);
  --fill-ghost: rgba(143, 180, 255, 0.10);
  --fill-ghost-hover: rgba(143, 180, 255, 0.18);

  /* Signature gradients */
  --grad-icon: linear-gradient(135deg, #142255 0%, #2A4ED6 55%, #3D7BFF 100%);
  --grad-aura-1: radial-gradient(1100px 700px at 78% -8%, rgba(61, 123, 255, 0.22), transparent 60%);
  --grad-aura-2: radial-gradient(900px 600px at 0% 100%, rgba(42, 78, 214, 0.22), transparent 55%);
  --bg-page: var(--grad-aura-1), var(--grad-aura-2), var(--fw-ink);

  /* Type */
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;

  /* Radii */
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Shadows */
  --sh-lg: 0 20px 50px rgba(3, 5, 16, 0.55);
  --sh-glow: 0 24px 60px rgba(45, 90, 230, 0.48);

  /* Motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--fw-paper);
  font-family: var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--fw-blue-soft); text-decoration: none; transition: color .18s var(--ease-out); }
a:hover { color: var(--fw-blue); }
img, svg { display: block; max-width: 100%; }
section { scroll-margin-top: 80px; }

/* Film-grain veil over the whole page */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.page { position: relative; z-index: 2; }
.wrap { max-width: 1200px; margin: 0 auto; }

/* Wordmark */
.wordmark { font-family: var(--body); font-weight: 800; letter-spacing: -0.035em; color: #fff; }
.wordmark .w { font-weight: 500; color: var(--fw-blue-soft); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--body); font-weight: 600; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .18s var(--ease-out), border-color .18s var(--ease-out), color .18s var(--ease-out);
  white-space: nowrap;
}
.btn-primary { background: var(--fw-blue); color: var(--fw-ink); }
.btn-primary:hover { background: #5A90FF; color: var(--fw-ink); }
.btn-ghost { background: var(--fill-ghost); color: var(--fw-paper); border-color: var(--line); }
.btn-ghost:hover { background: var(--fill-ghost-hover); border-color: var(--line-strong); color: var(--fw-paper); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-md { padding: 12px 22px; font-size: 15px; }
.btn-lg { padding: 15px 26px; font-size: 17px; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 56px);
  background: rgba(8, 11, 30, 0.62); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { width: 32px; height: 32px; border-radius: 22%; }
.nav-brand .wordmark { font-size: 21px; }
.nav-right { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--fw-muted); }
.nav-links a:hover { color: var(--fw-paper); }

/* ---- Section furniture ---- */
.eyebrow {
  font-family: var(--body); font-size: 13px; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--fw-blue-soft);
}
.rule { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; }
.rule .eyebrow { white-space: nowrap; }
.rule span.line { flex: 1; height: 1px; background: var(--line); }

/* ---- Hero ---- */
.header { padding: clamp(44px, 6vw, 84px) clamp(20px, 5vw, 56px) clamp(24px, 4vw, 48px); }
.sprockets { display: flex; gap: 14px; margin-bottom: clamp(36px, 5vw, 56px); }
.sprockets span { width: 26px; height: 16px; border-radius: 3px; background: var(--line); flex: 0 0 auto; }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-eyebrow { margin-bottom: 22px; }
h1.hero-title {
  font-family: var(--display); font-weight: 600; font-size: clamp(3rem, 6.4vw, 5.2rem);
  line-height: 0.95; letter-spacing: -0.02em; color: #fff; margin: 0 0 24px;
}
h1.hero-title .craft { font-style: italic; font-weight: 400; color: var(--fw-blue-soft); }
.hero-lede {
  font-family: var(--body); font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.6;
  color: var(--fw-muted); max-width: 47ch; margin: 0 0 34px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.appstore-pill {
  display: inline-flex; align-items: center; gap: 11px; background: var(--fill-ghost);
  border: 1px solid var(--line); border-radius: 999px; padding: 11px 22px 11px 18px;
  transition: background .18s var(--ease-out), border-color .18s var(--ease-out);
}
.appstore-pill:hover { background: var(--fill-ghost-hover); border-color: var(--line-strong); }
.appstore-pill .badge {
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 999px; background: var(--fw-blue); flex: 0 0 auto;
}
.appstore-pill .lines { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.appstore-pill .lines .top { font-size: 11px; color: var(--fw-muted); }
.appstore-pill .lines .bot { font-size: 15px; font-weight: 600; color: var(--fw-paper); }
.hero-more { margin-top: 18px; }
.hero-more a { font-size: 14px; font-weight: 500; }

/* Hero phone */
.hero-visual { display: flex; justify-content: center; }
.phone-float { position: relative; animation: fwFloat 7s ease-in-out infinite; }
.phone-sparkle { position: absolute; top: -30px; right: -14px; z-index: 5; color: var(--fw-blue-soft); animation: fwTwinkle 4s ease-in-out infinite; }
.phone {
  position: relative; width: min(340px, 80vw); aspect-ratio: 9 / 19.4; background: #05060f;
  border-radius: 46px; padding: 11px; border: 1px solid var(--line-strong);
  box-shadow: 0 50px 110px rgba(3, 5, 16, 0.66), var(--sh-glow);
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--fw-ink); }
.phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- Feature cards ---- */
.features { padding: clamp(48px, 6vw, 88px) clamp(20px, 5vw, 56px); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 32px; background: linear-gradient(165deg, rgba(61, 123, 255, 0.10), rgba(14, 21, 51, 0.45));
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .5s var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: var(--line-strong); }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--fill-ghost); border: 1px solid var(--line); margin-bottom: 22px; color: var(--fw-blue-soft);
}
.card .tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fw-ink); background: var(--fw-blue-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.card h3 { font-family: var(--body); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; color: #fff; margin: 0 0 10px; }
.card p { font-size: 1rem; line-height: 1.6; color: var(--fw-muted); margin: 0; max-width: 34ch; }

/* ---- Section headings ---- */
.section { padding: clamp(48px, 6vw, 88px) clamp(20px, 5vw, 56px); }
.section.tight { padding: clamp(32px, 5vw, 64px) clamp(20px, 5vw, 56px); }
h2.display {
  font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02; letter-spacing: -0.015em; color: #fff; margin: 0 0 18px;
}
.lead { font-size: 1.08rem; line-height: 1.65; color: var(--fw-muted); margin: 0 0 24px; max-width: 44ch; }
.mini-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--fw-blue-soft); margin-bottom: 18px; }

/* ---- Showcase ---- */
.showcase {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-xl);
  background: rgba(14, 21, 51, 0.5); display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px); align-items: center; padding: clamp(28px, 4vw, 52px);
}
.bullets { display: flex; flex-direction: column; gap: 14px; }
.bullets .b { display: flex; align-items: center; gap: 12px; font-size: 0.98rem; color: var(--fw-paper); }
.bullets .b .ci { color: var(--fw-blue-soft); flex: 0 0 auto; }
.frame {
  position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
}
.frame.wide { aspect-ratio: 16 / 10; }
.frame.wide img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Enhance / before-after ---- */
.enhance-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.enhance-tag { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--fw-blue-soft); }
.enhance-tag span { font-size: 13px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.spec { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; max-width: 420px; }
.spec .row { display: flex; justify-content: space-between; padding: 13px 18px; font-size: 0.92rem; }
.spec .row + .row { border-top: 1px solid var(--line); }
.spec .k { color: var(--fw-muted); }
.spec .v { color: var(--fw-paper); }

.compare {
  position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 16 / 11; box-shadow: var(--sh-lg); cursor: ew-resize; touch-action: none;
  --split: 46%;
}
.compare .before { position: absolute; inset: 0; filter: blur(3px) saturate(0.82) brightness(0.9); }
.compare .after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--split)); }
.compare .lbl {
  position: absolute; top: 12px; font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(8, 11, 30, 0.55); padding: 4px 10px; border-radius: 999px; z-index: 4;
}
.compare .lbl.b { left: 12px; }
.compare .lbl.a { right: 12px; display: flex; align-items: center; gap: 6px; color: var(--fw-ink); background: var(--fw-blue-soft); }
.compare .divider { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; background: #fff; z-index: 5; transform: translateX(-1px); }
.compare .divider .knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px;
  border-radius: 999px; background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4); color: var(--fw-ink);
}
.compare .hint {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font-size: 11px;
  color: rgba(231, 236, 251, 0.85); background: rgba(8, 11, 30, 0.5); padding: 4px 12px; border-radius: 999px; z-index: 4;
}

/* ---- Platforms ---- */
.platforms { text-align: center; }
.platforms h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -0.015em; color: #fff; margin: 0 0 14px; }
.platforms .lead { max-width: 44ch; margin: 0 auto 40px; text-align: center; }
.platform-row { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.platform {
  flex: 1 1 260px; max-width: 360px; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; background: var(--bg-1);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .5s var(--ease-out);
}
.platform:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: var(--line-strong); }
.platform .shot { position: relative; aspect-ratio: 16 / 10; background: var(--fw-ink); }
.platform .shot img { width: 100%; height: 100%; object-fit: cover; }
.platform .meta { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; }
.platform .meta .name { font-weight: 700; font-size: 1.15rem; color: #fff; }
.platform .meta .sub { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fw-blue-soft); }

/* ---- Etymology ---- */
.etym {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(14, 21, 51, 0.5);
  padding: clamp(24px, 3vw, 40px); display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap;
}
.etym .suffix { font-family: var(--display); font-size: 1.7rem; color: #fff; font-weight: 500; flex: 0 0 auto; }
.etym p { color: var(--fw-muted); flex: 1; min-width: 280px; font-size: 1.05rem; line-height: 1.65; margin: 0; }
.etym b { color: var(--fw-blue-soft); font-weight: 500; }

/* ---- CTA ---- */
.cta {
  position: relative; overflow: hidden; border-radius: var(--r-xl); border: 1px solid var(--line);
  background: var(--grad-icon); padding: clamp(40px, 6vw, 72px);
}
.cta .noise {
  position: absolute; inset: 0; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cta .spark { position: absolute; top: -24px; right: 36px; color: #fff; animation: fwTwinkle 5s ease-in-out infinite; }
.cta .inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: clamp(28px, 4vw, 56px); flex-wrap: wrap; }
.cta .col { flex: 1 1 380px; min-width: 300px; }
.cta h2 { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.02em; color: #fff; margin: 0 0 16px; line-height: 1; }
.cta p { color: rgba(231, 236, 251, 0.88); font-size: 1.12rem; line-height: 1.6; margin: 0 0 28px; }
.cta .row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta .dl { display: inline-flex; align-items: center; gap: 9px; background: #fff; color: var(--fw-ink); border-radius: 999px; padding: 14px 28px; font-weight: 700; font-size: 15px; }
.cta .dl:hover { color: var(--fw-ink); background: rgba(255, 255, 255, 0.9); }
.cta .contact { display: inline-flex; align-items: center; gap: 9px; color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px; padding: 14px 26px; font-weight: 600; font-size: 15px; }
.cta .contact:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }

/* ---- Footer ---- */
.footer {
  padding: 28px clamp(20px, 5vw, 56px) 56px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: center;
}
.footer .brand { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fw-muted); }
.footer .brand img { width: 24px; height: 24px; border-radius: 22%; }
.footer .links { display: flex; gap: 24px; align-items: center; font-size: 14px; color: var(--fw-muted); flex-wrap: wrap; }
.footer .links .site { color: var(--fw-blue-soft); font-weight: 500; }

/* ---- FilmStill (CSS port of the design-system component) ---- */
.filmstill { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, var(--s1), var(--s2)); }
.filmstill::after {
  content: ''; position: absolute; left: var(--sun-x, 68%); top: 24%; width: 22%; aspect-ratio: 1;
  border-radius: 50%; background: var(--sun); filter: blur(2px); transform: translate(-50%, -50%);
}
.filmstill .h1 { position: absolute; left: -20%; bottom: -30%; width: 90%; height: 70%; border-radius: 50%; background: var(--hl1); }
.filmstill .h2 { position: absolute; right: -25%; bottom: -34%; width: 95%; height: 64%; border-radius: 50%; background: var(--hl2); }
.filmstill.goldenHour { --s1: #FFE6B8; --s2: #FFB078; --sun: #FF9E57; --hl1: #6FB59A; --hl2: #4E9A86; }
.filmstill.dusk { --s1: #F4C7E8; --s2: #9B6FD0; --sun: #FFD08A; --hl1: #5B4B8A; --hl2: #3C2F66; }
.filmstill.teal { --s1: #BFEAE6; --s2: #5FAFC0; --sun: #E8F6F2; --hl1: #2E7E8C; --hl2: #1C5563; }
.filmstill.ember { --s1: #FFD3A8; --s2: #E8714B; --sun: #FFE9C2; --hl1: #8A3B3B; --hl2: #5E2630; }
.filmstill.night { --s1: #3A4C8A; --s2: #1B2350; --sun: #DCE3FF; --hl1: #222A55; --hl2: #10142E; }
.filmstill.meadow { --s1: #EAF2C0; --s2: #A7C957; --sun: #FBFFE0; --hl1: #5C8A3A; --hl2: #3A5E26; }

/* ---- Reveal-on-scroll ---- */
.reveal { opacity: 0; }
@keyframes fwRise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fwTwinkle { 0%, 100% { opacity: .3; transform: scale(.88) rotate(0deg); } 50% { opacity: 1; transform: scale(1.12) rotate(8deg); } }
@keyframes fwFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.fw-in { animation: fwRise .95s var(--ease-out) both; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .feature-grid { grid-template-columns: 1fr; }
  .showcase { grid-template-columns: 1fr; }
  .enhance-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; }
  .fw-in, .phone-float, .phone-sparkle, .cta .spark { animation: none !important; }
}
