/* ==========================================================================
   Aperture — styles.css
   Design tokens · reset · layout · components · motion · responsive
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Palette */
  --ink: #0B0D10;
  --ink-soft: #1A1D22;
  --paper: #F4F1EA;
  --paper-warm: #EFEBE1;
  --aper: #C8FF4D;
  --aper-deep: #A9E42E;
  --slate: #4A5158;
  --slate-soft: #6B737B;
  --ember: #FF6A3D;

  /* Semantic */
  --bg: var(--paper);
  --bg-alt: var(--paper-warm);
  --fg: var(--ink);
  --fg-muted: var(--slate);
  --fg-subtle: var(--slate-soft);
  --line: rgba(11, 13, 16, 0.12);
  --line-strong: rgba(11, 13, 16, 0.22);
  --accent: var(--ember);
  --accent-ink: var(--ink);
  --focus: var(--aper-deep);
  --focus-ring: 0 0 0 2px var(--paper), 0 0 0 4px var(--aper-deep);
  --surface: #FBFAF6;
  --surface-ink: var(--ink-soft);

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: clamp(1.75rem, 1.2rem + 1.8vw, 2.25rem);
  --fs-3xl: clamp(2.25rem, 1.5rem + 3vw, 3.25rem);
  --fs-hero: clamp(2.75rem, 1.6rem + 5.4vw, 5rem);

  /* Space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 140ms;
  --dur-med: 260ms;
  --dur-slow: 560ms;

  /* Layout */
  --container: 1200px;
  --container-narrow: 720px;
  --header-h: 68px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(11, 13, 16, 0.06);
  --shadow-md: 0 8px 24px -12px rgba(11, 13, 16, 0.18);
  --shadow-lg: 0 30px 60px -30px rgba(11, 13, 16, 0.35);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:target-within { scroll-margin-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
  text-wrap: balance;
}
p { text-wrap: pretty; }

.section-title {
  font-size: var(--fs-3xl);
  max-width: 18ch;
}
.section-lede {
  color: var(--fg-muted);
  max-width: 60ch;
  font-size: var(--fs-lg);
  margin-top: var(--sp-4);
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.section {
  padding-block: clamp(4rem, 9vw, 7rem);
}
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 100;
  padding: var(--sp-2) var(--sp-4);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-sm);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--sp-3); }

/* ---------- Text link ---------- */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.text-link:hover { text-decoration-color: currentColor; color: var(--accent); }

/* ---------- Shimmer button ---------- */
.shimmer-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--sp-5);
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-med) var(--ease);
  box-shadow: var(--shadow-md);
}
.shimmer-button__sweep {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(200, 255, 77, 0.55) 48%,
    rgba(200, 255, 77, 0.15) 55%,
    transparent 75%
  );
  background-size: 220% 100%;
  background-position: 200% 0;
  animation: shimmer-sweep 4.5s var(--ease) infinite;
}
.shimmer-button__label { position: relative; z-index: 1; }
.shimmer-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -12px rgba(11, 13, 16, 0.35);
}
.shimmer-button:active { transform: translateY(0); }
.shimmer-button--sm { min-height: 40px; padding: 0 var(--sp-4); font-size: var(--fs-xs); }

@keyframes shimmer-sweep {
  0% { background-position: 200% 0; }
  60%, 100% { background-position: -100% 0; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-med) var(--ease), background var(--dur-med) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  height: var(--header-h);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.wordmark__glyph { color: var(--ink); }
.wordmark__text { line-height: 1; }
.wordmark:hover .wordmark__glyph { color: var(--accent); transition: color var(--dur-fast) var(--ease); }

.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}
.primary-nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.primary-nav__list a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--fg-muted);
  transition: color var(--dur-fast) var(--ease);
  padding-block: var(--sp-2);
}
.primary-nav__list a:hover { color: var(--fg); }
.primary-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.nav-signin { color: var(--fg-muted); text-decoration: none; }
.nav-signin:hover { color: var(--fg); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-sm);
}
.nav-toggle__bar {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--dur-med) var(--ease), opacity var(--dur-fast) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child {
  transform: translateY(4px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}
body.nav-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}
.hero__wash {
  position: absolute;
  top: -8rem;
  left: -6rem;
  width: min(720px, 80vw);
  height: 620px;
  background:
    radial-gradient(60% 55% at 30% 40%, rgba(200, 255, 77, 0.28), transparent 70%),
    radial-gradient(50% 60% at 70% 30%, rgba(255, 106, 61, 0.12), transparent 70%);
  filter: blur(10px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(75% 70% at 40% 40%, #000 55%, transparent 100%);
  mask-image: radial-gradient(75% 70% at 40% 40%, #000 55%, transparent 100%);
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__copy { max-width: 36ch; }
.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: var(--sp-4);
}
.hero__title {
  font-size: var(--fs-hero);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.hero__sub {
  margin-top: var(--sp-5);
  font-size: var(--fs-lg);
  color: var(--fg-muted);
  max-width: 44ch;
  line-height: 1.6;
}
.hero__cta-row {
  margin-top: var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
}

.hero__stage {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 560px;
  transform: rotate(-3deg) translateX(2%);
}

/* ---------- Macbook ---------- */
.macbook {
  --lid-open: 0;
  position: relative;
  width: 100%;
  perspective: 1600px;
  padding-bottom: 6%;
}
.macbook__lid {
  position: relative;
  transform-origin: center bottom;
  transform: rotateX(calc((1 - var(--lid-open)) * -68deg));
  transition: transform 0.2s var(--ease-out);
  will-change: transform;
}
.macbook__screen {
  position: relative;
  aspect-ratio: 16 / 10.5;
  border-radius: 14px 14px 0 0;
  padding: 10px;
  background: linear-gradient(160deg, #2a2d33, #14161a);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.macbook::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0;
  height: 5.2%;
  min-height: 14px;
  background: linear-gradient(180deg, #34373d, #1b1d22);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 14px 30px -14px rgba(11, 13, 16, 0.5);
}
.macbook::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1.4%;
  width: 14%;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 2;
}

/* Editor mock inside the screen */
.editor-mock {
  height: 100%;
  border-radius: 8px;
  background: #0f1115;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-body);
}
.editor-mock__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  background: #16191e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.editor-mock__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #3a3e46;
}
.editor-mock__dot:nth-child(1) { background: #ff5f57; }
.editor-mock__dot:nth-child(2) { background: #febc2e; }
.editor-mock__dot:nth-child(3) { background: #28c840; }
.editor-mock__title {
  margin-left: 10px;
  font-size: 10px;
  color: #8a919b;
  letter-spacing: 0.02em;
}
.editor-mock__body {
  flex: 1;
  display: grid;
  grid-template-columns: 96px 1fr;
  min-height: 0;
}
.editor-mock__rail {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #12141a;
}
.editor-mock__rail-item {
  font-size: 9.5px;
  color: #767d88;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-mock__rail-item--active {
  background: rgba(200, 255, 77, 0.12);
  color: var(--aper);
}
.editor-mock__doc {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10.5px;
  line-height: 1.7;
  overflow: hidden;
}
.editor-mock__line { color: #c6ccd4; white-space: nowrap; }
.editor-mock__line--gap { height: 4px; }
.tk-h { color: #e6edf3; font-weight: 600; }
.tk-p { color: #9aa2ad; }
.tk-c { color: var(--aper); }

/* ---------- Marquee ---------- */
.marquee-section {
  border-block: 1px solid var(--line);
  padding-block: var(--sp-5);
  overflow: hidden;
}
.marquee {
  position: relative;
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  flex-shrink: 0;
  gap: var(--sp-8);
  padding-right: var(--sp-8);
  animation: marquee-scroll 40s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--fg-subtle);
  white-space: nowrap;
  letter-spacing: -0.01em;
  font-style: italic;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sticky scroll (How it works) ---------- */
.how {
  padding-block: clamp(4rem, 9vw, 7rem);
}
.how__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.how__layout {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.how__steps {
  position: relative;
  padding-left: var(--sp-5);
  border-left: 1px solid var(--line);
}
.how__step {
  padding-block: var(--sp-5);
  opacity: 0.4;
  transition: opacity var(--dur-med) var(--ease);
}
.how__step.is-active { opacity: 1; }
.how__step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--sp-2);
  letter-spacing: 0.04em;
}
.how__step-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: var(--sp-3);
}
.how__step-body {
  color: var(--fg-muted);
  font-size: var(--fs-base);
  max-width: 44ch;
}
.how__panel {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-md);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  overflow: hidden;
}
.how__panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  align-self: flex-start;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: var(--fs-xs);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(200, 255, 77, 0.18);
  color: #3a4a00;
}
.how__panel-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 500;
}
.how__panel-visual {
  flex: 1;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  background:
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(11,13,16,0.02) 12px, rgba(11,13,16,0.02) 24px);
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--fg-subtle);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-lg);
  transition: opacity var(--dur-med) var(--ease);
}

/* ---------- Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: var(--sp-4);
}
.bento__card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
}
.bento__card:hover { border-color: var(--line-strong); }
.bento__card--lg { grid-column: span 4; grid-row: span 2; }
.bento__card--md { grid-column: span 2; }
.bento__card--sm { grid-column: span 2; }
.bento__card-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 500;
  margin-bottom: var(--sp-2);
}
.bento__card-body {
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  max-width: 40ch;
}
.bento__card-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}
.bento__card-art {
  margin-top: var(--sp-4);
  border-radius: var(--r-md);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(200, 255, 77, 0.28), transparent 55%),
    linear-gradient(135deg, var(--paper-warm), var(--surface));
  border: 1px solid var(--line);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--fg-subtle);
  font-size: var(--fs-sm);
  padding: var(--sp-4);
  text-align: center;
}
.bento__card--lg .bento__card-art { min-height: 220px; }

/* Spotlight hover glow */
.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(200, 255, 77, 0.16),
    transparent 70%
  );
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease);
  pointer-events: none;
}
.spotlight-card:hover::before { opacity: 1; }

/* ---------- Logo cloud ---------- */
.logo-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.logo-cloud__item {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem);
  color: var(--fg-subtle);
  letter-spacing: -0.01em;
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease);
}
.logo-cloud__item:hover { color: var(--fg); }

/* ---------- Pricing ---------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
  align-items: stretch;
}
.pricing__card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  overflow: hidden;
  isolation: isolate;
}
.pricing__card--featured {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
}
.pricing__card--featured .pricing__price,
.pricing__card--featured .pricing__name { color: var(--paper); }
.pricing__card--featured .pricing__desc,
.pricing__card--featured .pricing__feature { color: rgba(244, 241, 234, 0.72); }
.pricing__name {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
}
.pricing__price {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 500;
  line-height: 1;
}
.pricing__price small {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--fg-subtle);
  margin-left: 0.35em;
}
.pricing__card--featured .pricing__price small { color: rgba(244, 241, 234, 0.6); }
.pricing__desc { color: var(--fg-muted); font-size: var(--fs-sm); }
.pricing__features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.pricing__feature {
  display: flex;
  gap: 0.6em;
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  align-items: flex-start;
}
.pricing__feature::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
.pricing__cta { margin-top: auto; padding-top: var(--sp-4); }
.pricing__card--featured .shimmer-button {
  background: var(--paper);
  color: var(--ink);
}
.pricing__card--featured .shimmer-button__sweep {
  background: linear-gradient(110deg, transparent 20%, rgba(255, 106, 61, 0.35) 48%, rgba(255, 106, 61, 0.12) 55%, transparent 75%);
  background-size: 220% 100%;
}

/* ---------- Ink CTA (beams) ---------- */
.cta-final {
   position: relative;
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(4rem, 9vw, 7rem);
  overflow: hidden;
  isolation: isolate;
}
.cta-final__beams {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.85;
  -webkit-mask-image: radial-gradient(80% 90% at 50% 40%, #000 30%, transparent 90%);
  mask-image: radial-gradient(80% 90% at 50% 40%, #000 30%, transparent 90%);
}
.cta-final__beam {
  position: absolute;
  top: -30%;
  width: 2px;
  height: 160%;
  background: linear-gradient(180deg, transparent, rgba(200, 255, 77, 0.5), transparent);
  transform-origin: top center;
  opacity: 0;
  animation: beam-fall 9s var(--ease) infinite;
}
.cta-final__beam:nth-child(1) { left: 18%; animation-delay: 0s; }
.cta-final__beam:nth-child(2) { left: 37%; animation-delay: 1.6s; height: 140%; }
.cta-final__beam:nth-child(3) { left: 58%; animation-delay: 3.1s; }
.cta-final__beam:nth-child(4) { left: 76%; animation-delay: 4.4s; height: 150%; }
.cta-final__beam:nth-child(5) { left: 88%; animation-delay: 2.3s; }

@keyframes beam-fall {
  0% { opacity: 0; transform: translateY(-20%) scaleY(0.4); }
  20% { opacity: 0.9; }
  70% { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(20%) scaleY(1); }
}

.cta-final__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-5);
  max-width: var(--container-narrow);
}
.cta-final__title {
  font-size: var(--fs-3xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  max-width: 20ch;
  color: var(--paper);
}
.cta-final__sub {
  color: rgba(244, 241, 234, 0.7);
  font-size: var(--fs-lg);
  max-width: 48ch;
}
.cta-final__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
  margin-top: var(--sp-2);
}
.cta-final .shimmer-button {
  background: var(--paper);
  color: var(--ink);
}
.cta-final .text-link { color: var(--paper); text-decoration-color: rgba(244, 241, 234, 0.35); }
.cta-final .text-link:hover { color: var(--aper); text-decoration-color: var(--aper); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.footer__brand { max-width: 30ch; }
.footer__brand .wordmark { margin-bottom: var(--sp-4); }
.footer__tagline {
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.footer__col-title {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: var(--sp-4);
}
.footer__col ul { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer__col a {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  transition: color var(--dur-fast) var(--ease);
}
.footer__col a:hover { color: var(--fg); }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--fg-subtle);
}
.footer__bottom ul {
  display: flex;
  gap: var(--sp-5);
}
.footer__bottom a { color: var(--fg-subtle); }
.footer__bottom a:hover { color: var(--fg); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .shimmer-button__sweep { display: none; }
  .marquee__track { animation: none; }
  .cta-final__beam { display: none; }
  .macbook__lid { transform: none !important; }
  .hero__stage { transform: rotate(-3deg) translateX(2%); }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-5);
    padding: var(--sp-5) clamp(1.25rem, 4vw, 2.5rem) var(--sp-6);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--dur-med) var(--ease), opacity var(--dur-med) var(--ease), visibility var(--dur-med);
  }
  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .primary-nav__list a {
    display: block;
    padding-block: var(--sp-4);
    font-size: var(--fs-lg);
    color: var(--fg);
    border-bottom: 1px solid var(--line);
  }
  .primary-nav__actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: var(--sp-3);
  }
  .nav-signin { text-align: center; padding-block: var(--sp-2); }
  .primary-nav__actions .shimmer-button { width: 100%; }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-7);
  }
  .hero__copy { max-width: 100%; }
  .hero__stage {
    justify-self: center;
    max-width: 520px;
    transform: none;
    margin-top: var(--sp-4);
  }

  .how__layout {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
  .how__panel {
    position: relative;
    top: 0;
    order: -1;
    min-height: 240px;
  }
  .how__step { opacity: 1; }

  .bento__card--lg { grid-column: span 6; grid-row: auto; }
  .bento__card--md,
  .bento__card--sm { grid-column: span 3; }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
  }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .pricing { grid-template-columns: 1fr; }
  .bento__card--md,
  .bento__card--sm { grid-column: span 6; }
  .hero__cta-row { gap: var(--sp-4); }
}

@media (max-width: 480px) {
  :root { --header-h: 60px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .footer__bottom ul { flex-wrap: wrap; gap: var(--sp-4); }
  .hero__stage { margin-top: var(--sp-2); }
  .how__panel-visual { min-height: 140px; }
}

/* ---------- Dark color-scheme block ---------- */
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg: var(--ink);
    --bg-alt: var(--ink-soft);
    --fg: var(--paper);
    --fg-muted: rgba(244, 241, 234, 0.68);
    --fg-subtle: rgba(244, 241, 234, 0.48);
    --line: rgba(244, 241, 234, 0.14);
    --line-strong: rgba(244, 241, 234, 0.28);
    --surface: var(--ink-soft);
    --surface-ink: var(--paper);
    --focus-ring: 0 0 0 2px var(--ink), 0 0 0 4px var(--aper);
    color-scheme: dark;
  }
  html[data-theme="auto"] .site-header {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
  }
  html[data-theme="auto"] .wordmark__glyph { color: var(--paper); }
  html[data-theme="auto"] .nav-toggle__bar { background: var(--paper); }
  html[data-theme="auto"] .shimmer-button {
    background: var(--paper);
    color: var(--ink);
  }
  html[data-theme="auto"] .hero__wash {
    background:
      radial-gradient(60% 55% at 30% 40%, rgba(200, 255, 77, 0.22), transparent 70%),
      radial-gradient(50% 60% at 70% 30%, rgba(255, 106, 61, 0.14), transparent 70%);
  }
  html[data-theme="auto"] .bento__card-art {
    background:
      radial-gradient(120% 120% at 0% 0%, rgba(200, 255, 77, 0.2), transparent 55%),
      linear-gradient(135deg, var(--ink-soft), var(--surface));
  }
  html[data-theme="auto"] .pricing__card {
    background: var(--ink-soft);
  }
  html[data-theme="auto"] .pricing__card--featured {
    background: var(--paper);
    color: var(--ink);
  }
  html[data-theme="auto"] .pricing__card--featured .pricing__price,
  html[data-theme="auto"] .pricing__card--featured .pricing__name { color: var(--ink); }
  html[data-theme="auto"] .pricing__card--featured .pricing__desc,
  html[data-theme="auto"] .pricing__card--featured .pricing__feature { color: rgba(11, 13, 16, 0.7); }
  html[data-theme="auto"] .pricing__card--featured .pricing__price small { color: rgba(11, 13, 16, 0.55); }
  html[data-theme="auto"] .pricing__card--featured .shimmer-button {
    background: var(--ink);
    color: var(--paper);
  }
  html[data-theme="auto"] .how__panel-tag { color: var(--aper); }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .cta-final__beams, .marquee-section { display: none; }
  body { background: #fff; color: #000; }
  .section, .cta-final { padding-block: 1.5rem; }
}