/* Elixor marketing site.
   Every colour, radius and easing curve lives in :root so the whole page
   can be retuned from one place. */

:root {
  --bg: #0D100F;
  --surface: #151A17;
  --surface-2: #1B211E;
  --border: rgba(244, 245, 244, 0.08);
  --border-strong: rgba(244, 245, 244, 0.14);

  --text: #F4F5F4;
  --text-muted: #A3ABA7;
  --text-faint: #6B736F;

  --accent: #65D6A0;
  --accent-rgb: 101, 214, 160;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --container: 1120px;
  --gutter: 24px;
}

/* Served from this site, so visitors' browsers contact no third party
   (the privacy policy, Section 14, promises this). */
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01", "ss03";
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
::selection { background: rgba(var(--accent-rgb), 0.3); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Film grain keeps the large dark areas from looking flat. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out),
    box-shadow 0.35s var(--ease-out), transform 0.5s var(--ease-out);
  will-change: transform;
}
.btn svg { transition: transform 0.35s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }

.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 12px; }

.btn-light {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.4);
}
.btn-light:hover { background: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 8px 30px rgba(255,255,255,0.12); }

.btn-accent {
  background: var(--accent);
  color: #06120C;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.4), 0 10px 40px -10px rgba(var(--accent-rgb), 0.6);
}
.btn-accent:hover { background: #79E0AF; box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.6), 0 14px 50px -8px rgba(var(--accent-rgb), 0.75); }

.btn-link { color: var(--text); padding: 0 8px; }
.btn-link:hover { color: #fff; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out), backdrop-filter 0.4s;
}
.nav.is-scrolled {
  background: rgba(13, 16, 15, 0.72);
  border-bottom-color: var(--border);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.brand img { border-radius: 7px; }
/* Reading progress: a hairline along the bottom of the nav. */
.nav-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  transform-origin: left;
  transform: scaleX(var(--sp, 0));
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.2), var(--accent));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.nav.is-scrolled .nav-progress { opacity: 1; }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: 168px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -320px; left: 50%;
  width: 1200px; height: 800px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.13), transparent 62%);
  pointer-events: none;
}

/* A faint grid behind the hero, fading out towards the edges, drifting slowly. */
.hero-grid {
  position: absolute;
  inset: 0 0 auto;
  height: 900px;
  background-image:
    linear-gradient(rgba(244, 245, 244, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 245, 244, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
  animation: grid-drift 24s linear infinite;
  pointer-events: none;
}
@keyframes grid-drift { to { background-position: 0 64px, 64px 0; } }

/* Lets the badge's border light travel round smoothly. */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  margin-bottom: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(21, 26, 23, 0.6);
  font-size: 13px;
  color: var(--text-muted);
}
/* A short arc of light running round the badge's border. */
.eyebrow::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), transparent 0 70%, rgba(var(--accent-rgb), 0.9) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: orbit 4s linear infinite;
  pointer-events: none;
}
@keyframes orbit { to { --angle: 360deg; } }
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); }
}

.hero-title {
  max-width: 900px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.045em;
}
/* Masked text: main.js wraps each word (or letter) in .m > .mi. The outer span
   clips, the inner one rises into view from below its own baseline. */
.m {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.mi {
  display: inline-block;
  transform: translateY(108%) rotate(5deg);
  transform-origin: 0 100%;
  will-change: transform;
}
.nw { display: inline-block; white-space: nowrap; }

/* Hero headline: rises on load, word by word. */
.hero-title .mi {
  animation: rise 1.25s var(--ease-out) forwards;
  animation-delay: calc(140ms + var(--i) * 65ms);
  background: linear-gradient(180deg, #fff 20%, rgba(244, 245, 244, 0.72));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes rise { to { transform: none; } }

/* Section headings: rise when scrolled into view. */
[data-mask] .mi {
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i) * 45ms);
}
[data-mask].is-in .mi { transform: none; }
[data-mask="chars"] .mi { transition-duration: 0.9s; transition-delay: calc(var(--i) * 22ms); }

@keyframes word-in {
  to { opacity: 1; filter: blur(0); transform: none; }
}

.hero-sub {
  max-width: 580px;
  margin-top: 26px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

.reveal-load {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
  animation: word-in 1s var(--ease-out) forwards;
  animation-delay: calc(150ms + var(--d, 0) * 70ms);
}

/* The 3D product stage. main.js writes --p (0 → 1) as the hero scrolls away,
   which flattens the tilt. */
.stage {
  --p: 0;
  position: relative;
  height: clamp(460px, 62vw, 760px);
  margin-top: 72px;
  perspective: 2200px;
  perspective-origin: 50% 0%;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 60%, transparent 98%);
}
.hero .container { position: relative; z-index: 1; }

/* --tx/--ty: a few degrees of tilt toward the pointer, eased in main.js. */
.stage-inner {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(16px, 3vw, 40px);
  transform-style: preserve-3d;
  transform-origin: 50% 0%;
  transform:
    translateY(calc(40px * (1 - var(--p))))
    rotateX(calc(34deg * (1 - var(--p)) + var(--tx, 0deg)))
    rotateY(var(--ty, 0deg))
    rotateZ(calc(-9deg * (1 - var(--p))))
    scale(calc(0.92 + 0.08 * var(--p)));
  opacity: 0;
  animation: stage-in 1.6s var(--ease-out) 0.7s forwards;
  will-change: transform;
}
/* Depth: the middle phone floats forward, the sides drift at their own pace. */
.stage .phone-main { transform: translateZ(60px); }
.stage .phone-left { transform: translateY(calc(var(--p) * -36px)); }
.stage .phone-right { transform: translateY(calc(var(--p) * -64px)); }

/* One sweep of light across the screens as they arrive. */
.stage .phone::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 38px;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.16) 48%, rgba(255, 255, 255, 0.03) 54%, transparent 62%);
  background-size: 260% 100%;
  background-position: 120% 0;
  animation: sheen 1.8s var(--ease-in-out) 1.5s forwards;
  pointer-events: none;
}
.stage .phone-left::after { animation-delay: 1.65s; }
.stage .phone-right::after { animation-delay: 1.8s; }
@keyframes sheen { to { background-position: -40% 0; } }
@keyframes stage-in {
  from { opacity: 0; translate: 0 80px; }
  to { opacity: 1; translate: 0 0; }
}

/* ---------- Phone frame ---------- */

.phone {
  position: relative;
  flex: none;
  width: 300px;
  aspect-ratio: 720 / 1521;
  padding: 9px;
  border-radius: 46px;
  background: linear-gradient(160deg, #2A302D, #121614 40%, #0A0C0B);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 80px -20px rgba(0, 0, 0, 0.8),
    0 20px 40px -20px rgba(0, 0, 0, 0.6);
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 38px;
  background: var(--surface);
}
.phone-main { width: clamp(220px, 26vw, 320px); z-index: 2; }
.phone-side { width: clamp(190px, 22vw, 280px); margin-top: 60px; opacity: 0.85; }

/* ---------- Sections ---------- */

.section { position: relative; padding: 140px 0; }
.section-head { max-width: 640px; margin-bottom: 64px; }
.kicker {
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.005em;
}
h2 {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.lead {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Scroll reveal: main.js adds .is-in when an element enters the viewport. */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition:
    opacity 1s var(--ease-out),
    transform 1.1s var(--ease-out),
    filter 1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* Cursor spotlight: a soft light that follows the pointer across a card. */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.09), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.5), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  padding: 28px 24px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), rgba(21, 26, 23, 0.4));
}
.step-num {
  display: inline-block;
  margin-bottom: 40px;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  transition: color 0.6s var(--ease-out);
}
.step.is-lit .step-num { color: var(--accent); }
.step h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.step p { font-size: 15px; color: var(--text-muted); line-height: 1.55; }

/* Progress line under the steps; main.js drives --t from 0 to 1. */
.track {
  --t: 0;
  position: relative;
  height: 1px;
  margin-top: 40px;
  background: var(--border);
  overflow: hidden;
}
.track { overflow: visible; }
.track-fill {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(var(--t));
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0), var(--accent));
}
/* A bright head riding the end of the line, with a pulse running along behind it. */
.track-pulse {
  position: absolute;
  top: -3px;
  left: calc(var(--t) * 100%);
  width: 7px; height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15), 0 0 18px 4px rgba(var(--accent-rgb), 0.55);
  opacity: calc(min(1, var(--t) * 20));
}
.track-fill::after {
  content: "";
  position: absolute;
  inset: -1px 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  background-size: 18% 100%;
  background-repeat: no-repeat;
  animation: run 2.6s var(--ease-in-out) infinite;
}
@keyframes run { from { background-position: -20% 0; } to { background-position: 120% 0; } }

/* ---------- Projects ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
/* --rx/--ry: tilt under the pointer, set in main.js. */
.project {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform 0.9s var(--ease-out), opacity 1s var(--ease-out), filter 1s var(--ease-out),
    border-color 0.4s, box-shadow 0.6s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.project:hover {
  --lift: -4px;
  border-color: var(--border-strong);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(var(--accent-rgb), 0.06);
  transition: transform 0.25s var(--ease-out), border-color 0.4s, box-shadow 0.6s var(--ease-out);
  transition-delay: 0s;
}
/* data-reveal's transform would fight the tilt, so cards reveal by opacity and blur only. */
.project[data-reveal] { transform: perspective(1000px) translateY(26px); }
.project[data-reveal].is-in { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px)); }

.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.stage-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.stage-chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.project-cat { font-size: 12px; color: var(--text-faint); }

.project h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
.project-tagline { margin-top: 6px; color: var(--text-muted); font-size: 15px; }

.project-update {
  margin-top: 22px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(13, 16, 15, 0.6);
  border: 1px solid var(--border);
}
.label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.project-update p { font-size: 14px; line-height: 1.55; color: var(--text); }
.project-update time { display: block; margin-top: 8px; font-size: 12px; color: var(--text-faint); }

.project-needs { margin-top: 18px; }
.needs { display: flex; flex-wrap: wrap; gap: 6px; }
.need {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.project-link svg { transition: transform 0.35s var(--ease-out); }
.project:hover .project-link svg { transform: translateX(3px); }

.example-chip {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(244, 245, 244, 0.06);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Shown beside the example card until real projects are featured. */
.project-invite {
  justify-content: center;
  align-items: flex-start;
  border-style: dashed;
  background: transparent;
}
.project-invite h3 { font-size: 26px; line-height: 1.15; max-width: 340px; }
.project-invite p { margin-top: 12px; max-width: 360px; color: var(--text-muted); font-size: 15px; }
.project-invite .btn { margin-top: 28px; }

/* ---------- App showcase ---------- */

.showcase { padding-bottom: 60px; }
.showcase .section-head { margin-bottom: 0; }
.showcase-scroller { position: relative; height: 300vh; }
.showcase-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}
.showcase-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.showcase-step {
  position: relative;
  padding: 22px 0 22px 28px;
  opacity: 0.35;
  transition: opacity 0.6s var(--ease-out);
}
.showcase-step.is-active { opacity: 1; }
.showcase-step h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
.showcase-step p { margin-top: 8px; max-width: 420px; color: var(--text-muted); font-size: 16px; }
.showcase-bar {
  position: absolute;
  left: 0; top: 22px; bottom: 22px;
  width: 2px;
  border-radius: 2px;
  background: var(--border-strong);
  overflow: hidden;
}
.showcase-bar span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: top;
  transform: scaleY(var(--fill, 0));
}
.phone-inline { display: none; }

.showcase-device { display: flex; justify-content: center; }
.phone-showcase {
  width: clamp(260px, 26vw, 330px);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 1s var(--ease-out);
}
/* Screens change with a wipe: the new one is uncovered over the old one, which
   sinks back. data-dir="back" (scrolling up) runs the wipe the other way. */
.phone-showcase img {
  position: absolute;
  inset: 9px;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  z-index: 1;
  clip-path: inset(100% 0 0 0 round 38px);
  transform: scale(1.08);
  transition: clip-path 1s var(--ease-out), transform 1.3s var(--ease-out), filter 1s var(--ease-out);
}
.showcase-device[data-dir="back"] .phone-showcase img:not(.is-active):not(.was-active) { clip-path: inset(0 0 100% 0 round 38px); }
.phone-showcase img.is-active { z-index: 3; clip-path: inset(0 0 0 0 round 38px); transform: none; }
.phone-showcase img.was-active { z-index: 2; clip-path: inset(0 0 0 0 round 38px); transform: scale(0.94); filter: brightness(0.45); }

.showcase-device { position: relative; }
.showcase-device::before {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.12), transparent 65%);
  z-index: -1;
}

/* Labels that pop out beside the phone, two per step. */
.callout {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(21, 26, 23, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text);
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  pointer-events: none;
}
.callout i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
}
.callout.is-on {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease-out) 0.35s, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s;
  animation: bob 5s ease-in-out 1.2s infinite alternate;
}
.callout-br.is-on { transition-delay: 0.5s; animation-delay: 1.6s; }
.callout-tl { top: 22%; right: calc(50% + 120px); }
.callout-br { bottom: 24%; left: calc(50% + 120px); }
@keyframes bob { to { translate: 0 -7px; } }

.showcase-count {
  position: absolute;
  top: 8%;
  left: calc(50% + 190px);
  display: flex;
  gap: 6px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  overflow: hidden;
}
.showcase-num { display: inline-block; color: var(--text); font-weight: 600; }
.showcase-num.flip { animation: flip 0.6s var(--ease-out); }
@keyframes flip { from { transform: translateY(100%); opacity: 0; } }

/* ---------- Final CTA ---------- */

.final { padding: 180px 0 160px; text-align: center; overflow: hidden; }
/* --gx/--gy: the glow drifts toward the pointer (main.js); it rests low and centred. */
.final-glow {
  position: absolute;
  left: var(--gx, 50%);
  top: var(--gy, 100%);
  width: 1000px; height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.16), transparent 60%);
  pointer-events: none;
}
.final-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.final h2 { font-size: clamp(42px, 7vw, 80px); letter-spacing: -0.05em; }
.final .lead { max-width: 540px; margin: 20px auto 40px; }

.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  transition: border-color 0.3s, background-color 0.3s;
}
.store small { display: block; font-size: 10px; font-weight: 400; color: var(--text-faint); }
.store:hover { border-color: rgba(244, 245, 244, 0.3); background: rgba(244, 245, 244, 0.03); }
.store.is-soon { pointer-events: none; opacity: 0.7; }
.beta-note { margin-top: 20px; font-size: 13px; color: var(--text-faint); }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--border); padding: 48px 0; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 48px;
  align-items: start;
}
.footer-brand p { margin-top: 10px; font-size: 14px; color: var(--text-faint); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a { font-size: 14px; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { grid-column: 1 / -1; font-size: 13px; color: var(--text-faint); }

/* ---------- Legal pages (privacy.html, built by legal/build.js) ---------- */

.legal { max-width: 820px; padding-top: 128px; padding-bottom: 120px; }
.legal h1 {
  font-size: clamp(38px, 6vw, 56px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.045em;
}
.toc {
  margin: 40px 0 56px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.toc ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; }
.toc li { font-size: 14px; color: var(--text-faint); padding: 3px 0; break-inside: avoid; }
.toc a { color: var(--text-muted); transition: color 0.2s; }
.toc a:hover { color: var(--text); }

.prose { color: var(--text-muted); font-size: 16px; line-height: 1.7; }
.prose h2 {
  margin: 56px 0 16px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--text);
  scroll-margin-top: 88px;
}
.prose p, .prose ul, .prose .table-wrap { margin: 0 0 16px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(var(--accent-rgb), 0.4); }
.prose .updated { font-size: 14px; color: var(--text-faint); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th { color: var(--text); font-weight: 600; background: var(--surface); }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--text); min-width: 140px; }
/* Anything still to fill in before publishing stands out. */
mark.todo { background: rgba(255, 196, 64, 0.16); color: #FFC940; padding: 1px 4px; border-radius: 4px; }

/* ---------- Animated tour ---------- */

/* walkthrough.html runs inside this frame; main.js sets its height from the
   size the page reports, so it never scrolls on its own. */
.tour-frame iframe {
  display: block;
  width: 100%;
  height: 820px;
  border: 0;
  background: var(--bg);
}
.tour-open { margin-top: 32px; font-size: 14px; }
.tour-open a { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 4px; }
.tour-open a:hover { color: var(--text); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .track { display: none; }
}

@media (max-width: 860px) {
  .section { padding: 100px 0; }
  .projects { grid-template-columns: 1fr; }

  /* The sticky walkthrough becomes a simple stack on small screens. */
  .showcase-scroller { height: auto; }
  .showcase-sticky { position: static; height: auto; display: block; padding-top: 48px; }
  .showcase-device { display: none; }
  .showcase-steps { gap: 64px; }
  .showcase-step { opacity: 1; padding: 0; }
  .showcase-bar { display: none; }
  .phone-inline { display: block; width: min(280px, 76vw); margin: 32px auto 0; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .nav-links { display: none; }
  .hero { padding-top: 128px; }
  .stage { height: 520px; margin-top: 56px; }
  .phone-side { display: none; }
  .phone-main { width: 250px; }
  .steps { grid-template-columns: 1fr; }
  .step-num { margin-bottom: 20px; }
  .project { padding: 22px; }
  .footer-inner { grid-template-columns: 1fr; }
  .legal { padding-top: 104px; }
  .toc ul { columns: 1; }
}

/* Printing (and the PDF copy of the policy): plain black on white. */
@media print {
  .grain, .nav, .footer, .toc { display: none !important; }
  body { background: #fff; color: #111; }
  .legal { padding: 0; max-width: none; }
  .legal h1, .prose h2, .prose strong, .prose td:first-child, .prose th { color: #111; }
  .kicker { color: #1f7a52; }
  .prose { color: #333; font-size: 11pt; }
  .prose h2 { margin-top: 28px; break-after: avoid; }
  .prose a { color: #1f7a52; }
  .table-wrap { border-color: #ccc; overflow: visible; }
  .prose th { background: #f2f4f3; }
  .prose th, .prose td { border-color: #ddd; }
  .prose tr { break-inside: avoid; }
  mark.todo { background: #fff3c4; color: #7a5a00; }
}

/* Respect people who've asked their device for less motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .stage { --p: 1 !important; }
  .dot, .hero-grid, .eyebrow::before, .track-fill::after, .callout.is-on, .stage .phone::after { animation: none !important; }
  .mi { transform: none !important; }
}
