/* Vemila — vemila.app
   Hi-fi pass over the settled wireframes (see design handoff decisions.md).
   Brand: parchment ground + Vemila violet #5B3E8C, used sparingly (primary
   actions, progress, one closing band). Type: Satoshi Variable, self-hosted.
   Shape rule: interactive = pill · surfaces = 16px · media frames = 12px.
   Theme: light, locked — the parchment identity is the brand. */

@font-face {
  font-family: 'Satoshi';
  src: url('../../fonts/Satoshi-Variable.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../../fonts/Satoshi-VariableItalic.woff2') format('woff2');
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #F0EAE0;
  --paper-raised: #F7F3EB;
  --paper-sunk: #E8E0D2;
  --ink: #2B2530;
  --ink-soft: #574F5C;
  --ink-faint: #857D72;
  --violet: #5B3E8C;
  --violet-deep: #48316F;
  --violet-tint: rgba(91, 62, 140, 0.08);
  --ghost: #DBD3D9;
  --line: #DDD4C6;
  --radius-surface: 16px;
  --radius-media: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: 'Satoshi', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--violet); color: var(--paper-raised); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 18px;
  border-radius: 0 0 10px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  background: rgba(240, 234, 224, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: var(--nav-h); }
.wordmark {
  font-weight: 800; letter-spacing: 0.09em; font-size: 19px;
  color: var(--violet); text-decoration: none; text-transform: uppercase;
}
.nav-links { display: flex; gap: 26px; margin-left: 12px; }
.nav-links a {
  text-decoration: none; font-size: 15.5px; font-weight: 500; color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav-login { text-decoration: none; font-size: 15.5px; font-weight: 500; color: var(--ink-soft); }
.nav-login:hover { color: var(--ink); }

.nav-toggle { display: none; }

/* Buttons. Interactive = pill. Nav "Start free" is deliberately ink, not
   violet: one violet primary per screen (hero owns it). */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  font-size: 16px; line-height: 1; padding: 15px 28px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--violet); color: var(--paper-raised); }
.btn-primary:hover { background: var(--violet-deep); }
.btn-ink { background: var(--ink); color: var(--paper-raised); }
.btn-ink:hover { background: #3D3545; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-raised); }
.btn-paper { background: var(--paper-raised); color: var(--violet); }
.btn-paper:hover { background: var(--paper); }
.btn-sm { padding: 12px 22px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 96px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px; align-items: center;
}
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--violet); margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(40px, 5.2vw, 64px); font-weight: 750;
  letter-spacing: -0.025em; line-height: 1.02; margin-bottom: 22px;
}
.hero-sub { font-size: 18px; color: var(--ink-soft); max-width: 46ch; margin-bottom: 34px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { position: relative; }
.ghost-v {
  position: absolute; inset: -12% -6% auto auto; z-index: 0;
  font-weight: 900; font-size: clamp(280px, 30vw, 460px); line-height: 0.8;
  color: var(--ghost); opacity: 0.55; user-select: none; pointer-events: none;
}
.shot-frame {
  position: relative; z-index: 1;
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-media); overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(43, 37, 48, 0.28);
}
.shot-frame .chrome {
  display: flex; gap: 6px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); background: var(--paper-raised);
}
.chrome span { width: 9px; height: 9px; border-radius: 50%; background: var(--paper-sunk); }
.shot-crop { overflow: hidden; }
/* Crop the app screenshots past their sidebar: width 128% and a -27.5%
   shift shows the main content region edge to edge. Small bento cells also
   crop the app's header bar away so three frames don't repeat it. */
.shot-crop img { width: 134%; height: auto; max-width: none; margin-left: -33.5%; }
.shot-crop.crop-none img { width: 100%; margin-left: 0; }
.hero .shot-crop { max-height: 600px; }
.cell .shot-crop { max-height: 300px; }
.cell:not(.cell-wide) .shot-crop img { margin-top: -11%; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 72px 0; }
.section h2 {
  font-size: clamp(30px, 3.6vw, 44px); font-weight: 720;
  letter-spacing: -0.02em; line-height: 1.08; margin-bottom: 16px;
}
.section-sub { font-size: 17.5px; color: var(--ink-soft); max-width: 58ch; }

/* Problem: editorial stack, narrow measure */
.problem { border-top: 1px solid var(--line); }
.problem-body { max-width: 62ch; }
.problem-body p { margin: 18px 0 0; color: var(--ink-soft); font-size: 17.5px; }
.pull-quote {
  margin-top: 40px; padding-left: 26px; border-left: 3px solid var(--violet);
  max-width: 56ch;
}
.pull-quote p {
  font-size: clamp(21px, 2.3vw, 27px); font-weight: 560; font-style: italic;
  line-height: 1.35; color: var(--ink); padding-bottom: 4px;
}

/* Features: bento, 4 cells (large + 2 + de-emphasised Studio) */
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.cell {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-surface); padding: 30px; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
}
.cell h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.cell p { color: var(--ink-soft); font-size: 16px; max-width: 52ch; }
.cell-wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: center; }
.cell-wide > div:first-child { display: flex; flex-direction: column; gap: 10px; }
.cell .shot-frame { box-shadow: none; margin-top: 8px; }
.cell-tint { background: var(--violet-tint); border-color: rgba(91, 62, 140, 0.18); }
.cell-soon { background: transparent; border: 1.5px dashed var(--ink-faint); }
.cell-soon h3, .cell-soon p { color: var(--ink-soft); }
.badge-soon {
  align-self: flex-start; font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft);
  border: 1px solid var(--ink-faint); border-radius: 999px; padding: 4px 12px;
}
.cell-link { font-weight: 600; color: var(--violet); text-decoration: none; font-size: 16px; }
.cell-link:hover { text-decoration: underline; }

/* How it works: 3-step row */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.step-num { font-size: 15px; font-weight: 700; color: var(--violet); margin-bottom: 10px; }
.steps h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.steps p { color: var(--ink-soft); font-size: 16px; }
.steps-close { margin-top: 44px; font-size: 17.5px; font-weight: 560; max-width: 58ch; }

/* Audience: 3 plain text columns, no cards */
.audience { border-top: 1px solid var(--line); }
.aud-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 44px; }
.aud-cols h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.aud-cols p { color: var(--ink-soft); font-size: 16px; }

/* Comparison table */
.compare { margin-top: 44px; overflow-x: auto; }
.compare table {
  width: 100%; border-collapse: collapse; font-size: 16px;
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-surface); overflow: hidden;
}
.compare th, .compare td { text-align: left; padding: 15px 20px; }
.compare thead th {
  font-size: 14px; font-weight: 700; color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.compare tbody tr + tr td, .compare tbody tr + tr th { border-top: 1px solid var(--line); }
.compare tbody th { font-weight: 600; color: var(--ink-soft); width: 30%; }
.compare td.vs { color: var(--ink-soft); }
.compare td.vemila { background: var(--violet-tint); font-weight: 600; }
.compare-note { margin-top: 16px; font-size: 15.5px; color: var(--ink-faint); }

/* Pricing */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 48px; }
.tier {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-surface); padding: 26px 24px;
  display: flex; flex-direction: column; gap: 6px; position: relative;
}
.tier-popular { border: 2px solid var(--violet); }
.badge-popular {
  position: absolute; top: -13px; left: 22px;
  background: var(--violet); color: var(--paper-raised);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 12px;
}
.tier-soon { background: transparent; border-style: dashed; border-color: var(--ink-faint); }
.tier h3 { font-size: 19px; font-weight: 700; }
.tier .price { font-size: 32px; font-weight: 750; letter-spacing: -0.02em; }
.tier .price small { font-size: 15px; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.tier .for { font-size: 14.5px; color: var(--ink-faint); margin-bottom: 10px; }
.tier ul { list-style: none; display: grid; gap: 8px; margin-bottom: 20px; }
.tier li { font-size: 15px; color: var(--ink-soft); padding-left: 22px; position: relative; }
.tier li::before {
  content: ''; position: absolute; left: 0; top: 7px; width: 12px; height: 7px;
  border-left: 2px solid var(--violet); border-bottom: 2px solid var(--violet);
  transform: rotate(-45deg);
}
.tier-soon li::before { border-color: var(--ink-faint); }
.tier .btn { margin-top: auto; text-align: center; }
.pricing-note { margin-top: 22px; font-size: 15px; color: var(--ink-faint); }

/* Pricing page: comparison matrix */
.matrix { margin-top: 56px; overflow-x: auto; }
.matrix table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.matrix th, .matrix td { padding: 13px 16px; text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix thead th { font-weight: 700; border-bottom: 2px solid var(--ink); }
.matrix tbody tr + tr td, .matrix tbody tr + tr th { border-top: 1px solid var(--line); }
.matrix tbody th { font-weight: 500; color: var(--ink-soft); }
.matrix .yes { color: var(--violet); font-weight: 700; }
.matrix .no { color: var(--ink-faint); }

/* FAQ accordion */
.faq { max-width: 760px; margin-top: 44px; }
.faq details {
  border-top: 1px solid var(--line); padding: 4px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; padding: 18px 0;
  font-size: 17.5px; font-weight: 620;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-size: 22px; font-weight: 400; color: var(--ink-faint);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-soft); max-width: 64ch; }

/* Final CTA band: the page's one full-violet moment */
.cta-band { background: var(--violet); color: var(--paper-raised); }
.cta-band .wrap { padding-top: 88px; padding-bottom: 88px; text-align: center; }
.cta-band h2 { color: var(--paper-raised); max-width: 22ch; margin: 0 auto 16px; }
.cta-band p { color: rgba(247, 243, 235, 0.82); max-width: 52ch; margin: 0 auto 32px; font-size: 17.5px; }
.cta-trust { margin-top: 22px; font-size: 14.5px; color: rgba(247, 243, 235, 0.65); }

/* Footer */
.footer { padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer .wordmark { font-size: 22px; }
.made-by {
  display: block; margin-top: 6px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint);
  text-decoration: none;
}
.made-by:hover { color: var(--ink-soft); }
.footer-tag { margin-top: 14px; color: var(--ink-soft); font-size: 15.5px; }
.footer h4 { font-size: 13.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 9px; }
.footer ul a { text-decoration: none; font-size: 15.5px; color: var(--ink-soft); }
.footer ul a:hover { color: var(--ink); }
.footer-bar {
  margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 14px; color: var(--ink-faint);
}

/* Reveal on scroll. The hidden state only exists once JS tags the root with
   .js-motion, so no-JS and reduced-motion users always see the content. */
.js-motion .reveal { opacity: 0; transform: translateY(22px); }
.js-motion .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-sub { max-width: 60ch; }
  .ghost-v { font-size: 240px; inset: -40px -20px auto auto; }
  .bento { grid-template-columns: 1fr; }
  .cell-wide { grid-column: span 1; grid-template-columns: 1fr; }
  .steps, .aud-cols { grid-template-columns: 1fr; gap: 28px; }
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .section, .hero { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-toggle {
    display: block; margin-left: auto; background: none; border: none;
    font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
    padding: 8px;
  }
  .nav-cta { margin-left: 0; }
  .nav-cta .nav-login { display: none; }
  .nav-open .nav-links {
    display: grid; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--paper-raised); border-bottom: 1px solid var(--line);
    padding: 18px 24px 22px; gap: 16px;
  }
  .tiers { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
