/* Returnable website. Colours follow src/theme/colors.ts in the app. */
:root {
  color-scheme: dark;
  --bg: #0a0a1a;
  --bg-2: #0f0f24;
  --surface: #141428;
  --surface-2: #1e1e3a;
  --card: rgba(26, 26, 46, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f0edf6;
  --text-2: #a89bbe;
  --heading: #e2daf0;
  --cyan: #22d3ee;
  --brand-start: #06b6d4;
  --purple: #a855f7;
  --pink: #f472b6;
  --green: #10b981;
  --amber: #f59e0b;
  --grad: linear-gradient(100deg, #22d3ee 0%, #818cf8 38%, #c084fc 62%, #f472b6 100%);
  --radius: 28px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 26, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 28px; height: auto; }
.brand span { font-size: 21px; font-weight: 800; font-style: italic; letter-spacing: -0.02em; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 600; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--text); }

/* Language menu */
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--text); font-size: 14px; font-weight: 700; letter-spacing: 0.04em;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; color: var(--text-2); }
.lang[open] summary { background: var(--surface-2); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  min-width: 170px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.lang li a {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 10px; text-decoration: none; font-size: 15px; color: var(--text-2);
}
.lang li a:hover { background: var(--surface-2); color: var(--text); }
.lang li a[aria-current='true'] { color: var(--text); font-weight: 700; }
.lang li a[aria-current='true']::after { content: '✓'; color: var(--cyan); }

/* Hero */
.hero { position: relative; padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto -10%; height: 120%; pointer-events: none;
  background:
    radial-gradient(40% 45% at 18% 20%, rgba(6, 182, 212, 0.16), transparent 70%),
    radial-gradient(45% 50% at 78% 35%, rgba(168, 85, 247, 0.22), transparent 70%),
    radial-gradient(35% 40% at 92% 80%, rgba(244, 114, 182, 0.14), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 60%, transparent 92%);
  mask-image: linear-gradient(#000 60%, transparent 92%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(32px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 1.25rem + 2.3vw, 3.35rem); font-weight: 850; }
.hero h1 .grad-text { display: inline; }
.lead { margin-top: 24px; max-width: 34em; color: var(--text-2); font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); }
.hero .lead { color: #c3b8d6; text-shadow: 0 1px 14px rgba(10, 10, 26, 0.95), 0 0 2px rgba(10, 10, 26, 0.8); }
.get-app { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.closing .get-app { position: relative; justify-content: center; }
.soon { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--text-2); font-size: 15px; font-weight: 600; }
.soon svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--cyan); }
.badge-link { display: inline-block; border-radius: 12px; transition: transform 0.2s ease; }
.badge-link img { width: 200px; height: auto; }
.badge-link:hover { transform: translateY(-2px); }

.hero-visual { position: relative; display: flex; justify-content: center; padding: 24px 0; }
/* Animated light loop (fal.ai, in the app's colours) across the whole hero. */
.hero-backdrop {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.9;
  background: url('/assets/hero-still-wide.webp') center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 74%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 74%, transparent 100%);
}
.hero-backdrop video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.6s ease; }
.hero-backdrop video.is-playing { opacity: 1; }
/* Darker on the text side so the headline stays easy to read. */
.hero-backdrop::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 10, 26, 0.86) 0%, rgba(10, 10, 26, 0.62) 30%, rgba(10, 10, 26, 0.18) 55%, rgba(10, 10, 26, 0) 70%);
}

.phone {
  position: relative; margin: 0;
  width: clamp(230px, 26vw, 310px);
  padding: 9px; border-radius: 46px;
  background: linear-gradient(160deg, #2a2a48, #121226 60%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 80px rgba(168, 85, 247, 0.18);
}
.phone img { width: 100%; border-radius: 38px; aspect-ratio: 1170 / 2532; object-fit: cover; background: var(--bg-2); }

.float {
  position: absolute; z-index: 2; height: auto;
  border-radius: 18px; border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.float-a { width: clamp(190px, 20vw, 270px); left: -6%; bottom: 9%; }
.float-b { width: clamp(180px, 19vw, 260px); right: -8%; top: 38%; }

/* Sections */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section + .section { padding-top: 0; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.2rem); font-weight: 850; }
.eyebrow {
  display: inline-block; margin-bottom: 14px; font-size: 14px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan);
}

/* Steps */
.steps { display: grid; gap: clamp(20px, 3vw, 32px); }
.step {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(28px, 4.5vw, 64px);
  padding-bottom: 0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 30, 58, 0.75), rgba(20, 20, 40, 0.75));
  border: 1px solid var(--line);
}
.step::before {
  content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  right: -140px; bottom: -220px; filter: blur(10px);
  background: radial-gradient(closest-side, var(--glow, rgba(168, 85, 247, 0.28)), transparent);
}
.step:nth-child(1) { --glow: rgba(6, 182, 212, 0.26); }
.step:nth-child(2) { --glow: rgba(139, 92, 246, 0.3); }
.step:nth-child(3) { --glow: rgba(255, 107, 53, 0.22); }
.step:nth-child(4) { --glow: rgba(16, 185, 129, 0.24); }
.step-copy { position: relative; padding-bottom: clamp(28px, 4.5vw, 64px); align-self: center; }
.step-num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px;
  border-radius: 14px; font-weight: 850; font-size: 17px; color: #0a0a1a;
  background: var(--grad);
}
.step h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.35rem); font-weight: 850; margin-bottom: 18px; }
.step p { color: var(--text-2); max-width: 36em; }
.step p:last-child { margin-bottom: 0; }
.step-shot {
  position: relative; align-self: end; justify-self: center;
  width: min(100%, 320px); height: clamp(360px, 40vw, 520px); overflow: hidden;
  border-radius: 40px 40px 0 0;
  padding: 9px 9px 0;
  background: linear-gradient(160deg, #2a2a48, #121226 60%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 70px rgba(0, 0, 0, 0.5);
}
.step-shot img { width: 100%; border-radius: 32px 32px 0 0; }
.step:nth-child(even) { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); }
.step:nth-child(even) .step-shot { order: -1; }
.step:nth-child(even)::before { right: auto; left: -140px; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.features li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--heading); font-weight: 600; line-height: 1.45;
}
.features li svg { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 1px; }

/* Info cards */
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 28px); }
.info-card {
  padding: clamp(28px, 4vw, 48px); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 30, 58, 0.75), rgba(20, 20, 40, 0.75));
  border: 1px solid var(--line);
}
.info-card .icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong);
}
.info-card .icon svg { width: 26px; height: 26px; }
.info-card h2 { font-size: clamp(1.45rem, 1.15rem + 1vw, 2rem); font-weight: 850; margin-bottom: 16px; }
.info-card p { color: var(--text-2); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-2); }
.text-link { color: var(--cyan); font-weight: 700; text-underline-offset: 4px; }
.text-link:hover { color: var(--text); }

/* Closing */
.closing { text-align: center; padding: clamp(72px, 10vw, 130px) 0; position: relative; overflow: hidden; }
.closing::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 900px; height: 600px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(168, 85, 247, 0.22), transparent); pointer-events: none;
}
.closing .mark { position: relative; width: 84px; margin: 0 auto 28px; filter: drop-shadow(0 10px 40px rgba(168, 85, 247, 0.45)); }
.closing h2 { position: relative; max-width: 18em; margin: 0 auto; font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.1rem); font-weight: 850; }
.closing .badge-link { position: relative; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--text-2); font-size: 15px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: flex-start; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.footer-links a { text-decoration: none; color: var(--text); font-weight: 600; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-langs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.footer-langs a { color: var(--text-2); text-decoration: none; }
.footer-langs a:hover, .footer-langs a[aria-current='true'] { color: var(--text); }
.fine { margin-top: 28px; font-size: 13px; color: var(--text-2); }
.fine p { margin: 0 0 4px; }

/* Plain pages: support, privacy, 404 */
.page { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 120px); }
.page .wrap { max-width: 800px; }
.page h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); font-weight: 850; margin-bottom: 20px; }
.page .lead { margin-top: 0; }
.mail-button {
  display: inline-flex; align-items: center; gap: 12px; margin: 12px 0 28px;
  min-height: 56px; padding: 0 26px; border-radius: 999px;
  background: var(--grad); color: #0a0a1a; font-weight: 800; font-size: 18px; text-decoration: none;
  overflow-wrap: anywhere;
}
.mail-button svg { width: 22px; height: 22px; flex: 0 0 22px; }
.mail-button:hover { filter: brightness(1.08); }
.note { padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--text-2); }
.page h2 { font-size: 1.35rem; font-weight: 800; margin: 40px 0 14px; }
.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }

.prose { color: var(--text-2); }
.prose h1 { color: var(--text); }
.prose h2 { color: var(--heading); font-size: 1.3rem; margin: 2.2em 0 0.7em; letter-spacing: -0.01em; }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--cyan); text-underline-offset: 3px; }
.prose .updated { color: var(--text-2); font-size: 0.95rem; margin-bottom: 2rem; }
.prose .footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.95rem; }

/* Reveal on scroll (only when JS runs and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .float-a { animation: drift 7s ease-in-out infinite; }
  .float-b { animation: drift 8s ease-in-out -3s infinite; }
}
@keyframes drift { 50% { transform: translateY(-8px); } }
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .site-header { position: static; }
  .hero-backdrop { display: none; }
}

/* Responsive */
@media (max-width: 1000px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: left; }
  .hero { padding-bottom: 8px; }
  .hero-visual { margin-top: 8px; }
  .hero-backdrop {
    top: auto; height: 62%;
    background-image: url('/assets/hero-still.webp');
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 76%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 76%, transparent 100%);
  }
  .hero-backdrop::after { display: none; }
  .phone { width: min(62vw, 300px); }
  .float-a { width: min(52vw, 260px); left: 0; bottom: 10%; }
  .float-b { width: min(50vw, 250px); right: 0; top: 42%; }
  .step, .step:nth-child(even) { grid-template-columns: 1fr; padding-bottom: 0; }
  .step:nth-child(even) .step-shot { order: 0; }
  .step-copy { padding-bottom: 8px; }
  .step-shot { height: min(110vw, 460px); }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .features { grid-template-columns: 1fr; }
  .brand span { font-size: 19px; }
  .badge-link img { width: 186px; }
}
