:root {
  --bg: #120E36;
  --bg-2: #1C1653;
  --indigo: #3A2F9E;
  --surface: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --text: #F4F1FF;
  --muted: #B9B3DA;
  --gold: #F5B942;
  --gold-light: #FFD36B;
  --radius: 22px;
  --max: 1080px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem; /* 17px at default size, scales with the reader's font setting */
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 50% -10%, var(--indigo) 0%, transparent 60%),
    var(--bg);
  background-color: var(--bg);
  min-height: 100vh;
}

a { color: var(--gold-light); }
@media (hover: hover) { a:hover { color: var(--gold); } }

/* Press feedback: instant on pointer-down, eased on release */
a, .badge { -webkit-tap-highlight-color: transparent; transition: opacity 0.2s ease, transform 0.2s ease, color 0.15s ease; }
a:active { opacity: 0.6; transition-duration: 0s; }
.nav .lang:active, a.badge:active { transform: scale(0.96); }

/* Keyboard focus */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
details summary:focus-visible { border-radius: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header: translucent layer, content scrolls under it */
.site-header {
  position: sticky; top: 0; z-index: 10;
  padding: 12px 0;
  background: rgba(18, 14, 54, 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 0.9375rem; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
@media (hover: hover) { .nav a:hover { color: var(--text); } }
.nav .lang { border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; color: var(--text); }

/* Hero */
.hero { text-align: center; padding: 56px 0 72px; }
.hero-icon { width: 148px; height: 148px; filter: drop-shadow(0 18px 40px rgba(128, 117, 242, 0.35)); }
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); line-height: 1.05; margin: 28px 0 14px; letter-spacing: -0.025em; }
.hero h1 span { color: var(--gold); }
.hero p.lead { font-size: clamp(1.125rem, 2.4vw, 1.375rem); line-height: 1.45; color: var(--muted); max-width: 620px; margin: 0 auto 32px; }

.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg);
  border-radius: 14px; padding: 12px 22px;
  font-weight: 700; text-decoration: none;
}
@media (hover: hover) { a.badge:hover { color: var(--bg); background: #fff; } }
.badge svg { width: 22px; height: 22px; }
/* Not a link yet, so it shouldn't look pressable: a quiet label, not a button */
.badge.soon { background: none; color: var(--text); padding: 4px 0; border-radius: 0; font-weight: 600; cursor: default; }
.badge.soon svg { width: 18px; height: 18px; opacity: 0.8; }
.hero .note { display: block; margin-top: 8px; color: var(--muted); font-size: 0.875rem; letter-spacing: 0.01em; }

/* Features */
.section-title { text-align: center; font-size: clamp(1.75rem, 4vw, 2.375rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 32px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding-bottom: 80px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card .emoji { font-size: 1.875rem; line-height: 1; }
.card h3 { margin: 14px 0 6px; font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); }

/* Prose pages */
.prose { max-width: 720px; margin: 0 auto; padding: 32px 20px 80px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.875rem); line-height: 1.1; letter-spacing: -0.02em; margin: 16px 0 8px; }
.prose .updated { color: var(--muted); margin: 0 0 32px; }
.prose h2 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; margin: 36px 0 8px; color: var(--gold-light); }
.prose p, .prose li { line-height: 1.6; } /* long-form reading keeps a little more leading */
.prose p, .prose li { color: #DCD8F2; }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose .card { margin: 28px 0; }

details { border-bottom: 1px solid var(--border); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 700; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 12px; -webkit-tap-highlight-color: transparent; transition: opacity 0.2s ease; }
details summary:active { opacity: 0.6; transition-duration: 0s; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--gold); font-size: 1.375rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 0.875rem; letter-spacing: 0.01em; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
@media (hover: hover) { .site-footer a:hover { color: var(--text); } }

@media (max-width: 560px) {
  /* Keep every destination reachable on phones: smaller brand, tighter nav */
  .brand { font-size: 1rem; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .nav { gap: 12px; font-size: 0.875rem; }
  .nav .lang { padding: 3px 10px; }
  .hero { padding-top: 32px; }
}
@media (max-width: 360px) {
  .brand { font-size: 0; gap: 0; } /* icon only on the narrowest screens */
}

/* ---------- App screenshots ---------- */

/* iPhone frame built in CSS so screenshots stay swappable per language. */
.phone {
  position: relative;
  width: 100%;
  /* The frame takes its height from the screenshot so nothing is cropped. The bezel is the
     screen's margin: % margins on the child are relative to the phone's width, whereas %
     padding on .phone would be relative to its parent's width. */
  display: flow-root;
  border-radius: 14.5% / 6.8%;
  background: #1b1826;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 40px 80px -20px rgba(0, 0, 0, 0.65),
    0 18px 36px -18px rgba(0, 0, 0, 0.5);
}
.phone > img,
.phone > video {
  display: block;
  margin: 1.8%;
  width: 96.4%;
  height: auto;
  aspect-ratio: 1206 / 2622;
  border-radius: 13% / 6%;
  background: #f3f0fb;
}

/* Hero: three phones fanned out */
.hero-phones {
  position: relative;
  height: clamp(380px, 62vw, 640px);
  max-width: 820px;
  margin: 56px auto 0;
}
.hero-phones .phone {
  position: absolute;
  bottom: 0;
  width: clamp(170px, 27vw, 280px);
  left: 50%;
  transform-origin: 50% 100%; /* fan out from a shared base */
  transition: transform 0.9s cubic-bezier(.2, .8, .2, 1), opacity 0.6s ease;
}
.hero-phones .phone.center { transform: translateX(-50%); z-index: 2; bottom: 4%; }
.hero-phones .phone.left   { transform: translateX(-118%) rotate(-7deg) scale(0.88); z-index: 1; opacity: 0.9; }
.hero-phones .phone.right  { transform: translateX(18%) rotate(7deg) scale(0.88); z-index: 1; opacity: 0.9; }
.hero-phones::after {
  content: "";
  position: absolute; inset: auto 10% -30px; height: 120px;
  background: radial-gradient(closest-side, rgba(245, 185, 66, 0.28), transparent);
  filter: blur(10px);
  z-index: 0;
}
.js .hero-phones:not(.in) .phone.left  { transform: translateX(-50%) rotate(0) scale(0.88); opacity: 0; }
.js .hero-phones:not(.in) .phone.right { transform: translateX(-50%) rotate(0) scale(0.88); opacity: 0; }
.js .hero-phones:not(.in) .phone.center { transform: translate(-50%, 40px); opacity: 0; }

/* Sneak peek: screen recording in a frame */
.peek { text-align: center; padding: 40px 0 96px; }
.peek h2 { font-size: clamp(1.875rem, 5vw, 3.25rem); line-height: 1.08; margin: 0 0 12px; letter-spacing: -0.025em; }
.peek h2 span { color: var(--gold); }
.peek .lead { color: var(--muted); font-size: clamp(1.0625rem, 2.2vw, 1.25rem); line-height: 1.45; max-width: 560px; margin: 0 auto 44px; }
.peek .phone { width: min(320px, 72vw); margin: 0 auto; }
.peek figcaption { margin-top: 18px; color: var(--muted); font-size: 0.875rem; letter-spacing: 0.01em; font-weight: 600; }

/* Showcase tiles: a phone rising out of a coloured panel */
.showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 96px;
}
.tile {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--border);
  padding: 32px 32px 0;
  display: flex; flex-direction: column;
  min-height: 560px;
  isolation: isolate;
}
.tile h3 { margin: 0 0 6px; font-size: clamp(1.375rem, 2.6vw, 1.75rem); line-height: 1.15; letter-spacing: -0.015em; }
.tile p { margin: 0; color: rgba(244, 241, 255, 0.78); max-width: 34ch; }
.tile .phone {
  width: min(250px, 62%);
  margin: 36px auto -22%;
  transition: transform 0.45s cubic-bezier(.2, .8, .2, 1);
}
/* Lift only where hover exists; touch screens never get a stuck hover state */
@media (hover: hover) { .tile:hover .phone { transform: translateY(-10px); } }
.tile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 40px; min-height: 0; padding: 0 48px; }
.tile.wide .copy { flex: 1; padding: 48px 0; }
.tile.wide .phones { flex: 1.2; display: flex; justify-content: center; align-items: flex-start; gap: 20px; align-self: flex-end; }
.tile.wide .phone { width: min(220px, 44%); margin: 48px 0 -18%; }
.tile.wide .phone + .phone { margin-top: 96px; }

.tile.gold   { background: radial-gradient(120% 90% at 0% 0%, #f5b94255, transparent 60%), linear-gradient(160deg, #3a2a52, #1c1653); }
.tile.violet { background: radial-gradient(120% 90% at 100% 0%, #8f7bff55, transparent 60%), linear-gradient(160deg, #2b2370, #161140); }
.tile.rose   { background: radial-gradient(120% 90% at 0% 0%, #ff6b9a44, transparent 60%), linear-gradient(160deg, #3a1f55, #1a1240); }
.tile.teal   { background: radial-gradient(120% 90% at 100% 0%, #3fd0b444, transparent 60%), linear-gradient(160deg, #173f5a, #131440); }

/* Scroll reveal */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.6s cubic-bezier(.2, .8, .2, 1); }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .showcase { grid-template-columns: 1fr; }
  .tile { min-height: 520px; padding: 28px 24px 0; }
  .tile.wide { flex-direction: column; padding: 28px 24px 0; gap: 0; }
  .tile.wide .copy { padding: 0; }
  .tile.wide .phones { align-self: stretch; }
  .tile.wide .phone { margin-top: 32px; }
  .tile.wide .phone + .phone { margin-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .hero-phones .phone, .tile .phone { transition: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .hero-phones:not(.in) .phone { opacity: 1; }
  a, .badge, details summary { transition: none; }
  .nav .lang:active, a.badge:active { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--border); }
}

@media (prefers-contrast: more) {
  :root { --border: rgba(255, 255, 255, 0.45); --muted: #DAD6F2; --surface: #241d63; }
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--border); }
  .tile p { color: var(--text); }
}
