@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/fonts/fraunces.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/inter.woff2) format('woff2');
}

:root {
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --bg:      #08040f;
  --bg2:     #0f0820;
  --text:    #efeaf8;
  --muted:   #a99fc4;
  --faint:   #6f6690;
  --violet:  #b78dff;
  --violet2: #7c4dff;
  --eden:    #8cf2b8;
  --line:    rgba(255,255,255,0.10);
  --panel:   rgba(10,6,20,0.42);
  --maxw:    1080px;
  --ease:    cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(124,77,255,0.30), transparent 55%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Living Lenia background (index only). Behind everything. */
#bg-canvas {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: -1; display: block;
}
/* Fallback shimmer if WebGL isn't available. */
.no-sim #bg-canvas { display: none; }
.no-sim body { background-size: 100% 200%; animation: drift 24s var(--ease) infinite alternate; }
@keyframes drift { to { background-position: 0 -18%; } }

a { color: var(--violet); text-decoration: none; }

/* ---- Nav ------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 40px);
  background: rgba(8,4,15,0.4);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-body);
  color: #fff; font-weight: 600; letter-spacing: 0.28em; font-size: 14px;
  display: inline-flex; align-items: center; gap: 9px;
}
.brand .star { color: var(--violet); letter-spacing: 0; filter: drop-shadow(0 0 10px rgba(183,141,255,0.85)); }
.nav .links { display: flex; gap: clamp(14px, 3vw, 30px); }
.nav .links a {
  color: var(--muted); font-size: 14px; letter-spacing: 0.01em;
  transition: color .2s var(--ease);
}
.nav .links a:hover { color: #fff; }

/* ---- Hero ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px clamp(20px, 6vw, 80px) 80px;
  max-width: var(--maxw); margin: 0 auto;
}
/* cinematic split: copy on glass, a real device floating on the live world */
.hero-grid {
  display: grid; grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(28px, 5vw, 68px); align-items: center; width: 100%;
}
.hero-card { max-width: 620px; }
.hero-device { display: flex; justify-content: center; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-device { margin-top: 6px; }
}
/* the living world spans the whole page; content floats over it on glass */
.below { position: relative; }

/* ---- Device frame ---------------------------------------------------- */
.phone {
  position: relative; border-radius: 42px; padding: 9px; width: 100%;
  background: linear-gradient(155deg, #38334d 0%, #120d20 52%, #060410 100%);
  box-shadow:
    0 52px 100px -34px rgba(0,0,0,0.85),
    0 0 0 1px rgba(255,255,255,0.06),
    inset 0 1.5px 0 rgba(255,255,255,0.20),
    0 0 90px -24px rgba(124,77,255,0.45);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 34px; }
.phone-hero { max-width: 300px; animation: float 7.5s var(--ease) infinite alternate; }
@keyframes float { to { transform: translateY(-15px); } }
.eyebrow {
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--violet); font-weight: 600; margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.98; font-weight: 600; letter-spacing: -0.03em;
  color: #fff; text-shadow: 0 4px 60px rgba(124,77,255,0.35);
  max-width: 14ch;
}
.hero h1 em { font-style: normal; color: var(--violet); }
.hero .sub {
  margin-top: 26px; font-size: clamp(17px, 2.4vw, 22px);
  color: var(--text); max-width: 46ch; font-weight: 300;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
/* primary = liquid glass tinted with the "light" violet */
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, rgba(183,141,255,0.46), rgba(183,141,255,0.18));
  border-color: rgba(183,141,255,0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.30), 0 14px 42px -14px rgba(183,141,255,0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(183,141,255,0.58), rgba(183,141,255,0.26));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.34), 0 20px 52px -14px rgba(183,141,255,0.7);
}
.btn-ghost { color: var(--text); background: rgba(255,255,255,0.045); }
.btn-ghost:hover { border-color: rgba(183,141,255,0.5); color: #fff; }
.hint {
  margin-top: 12px; color: var(--faint); font-size: 13px; letter-spacing: 0.02em;
}

/* ---- Sections -------------------------------------------------------- */
.band { padding: clamp(60px, 10vw, 130px) clamp(20px, 6vw, 80px); }
.band-inner { max-width: var(--maxw); margin: 0 auto; }
.section-label {
  font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--violet); font-weight: 600; margin-bottom: 16px;
  text-shadow: 0 1px 16px rgba(0,0,0,0.5);
}
.lede {
  font-family: var(--font-display);
  font-size: clamp(25px, 4vw, 42px); font-weight: 400; line-height: 1.22;
  letter-spacing: -0.015em; max-width: 22ch; color: #fff;
  text-shadow: 0 2px 34px rgba(0,0,0,0.55);
}
.lede strong { font-weight: 600; color: var(--violet); }
.prose { color: var(--muted); font-size: 18px; max-width: 60ch; margin-top: 22px; }
.muted-note { color: var(--faint); font-style: italic; }

/* a floating translucent panel that lets the sim glow at its edges */
.panel {
  background:
    linear-gradient(157deg, rgba(255,255,255,0.13) 0%, rgba(255,255,255,0.03) 34%, rgba(255,255,255,0) 62%),
    var(--panel);
  backdrop-filter: blur(50px) saturate(185%) brightness(1.06);
  -webkit-backdrop-filter: blur(50px) saturate(185%) brightness(1.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 28px;
  box-shadow:
    0 44px 100px -34px rgba(0,0,0,0.66),
    inset 0 1.5px 0 rgba(255,255,255,0.28),
    inset 0 0 0 1px rgba(255,255,255,0.04),
    inset 0 -40px 70px -40px rgba(124,77,255,0.20);
}
.pad { padding: clamp(30px, 5vw, 56px); }

/* Modes — real device screenshots, one per mode */
.mode-gallery {
  margin-top: clamp(30px, 4vw, 46px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 3.4vw, 40px);
}
.mode-card { text-align: left; }
.mode-card .phone { margin-bottom: 22px; transition: transform .3s var(--ease); }
.mode-card:hover .phone { transform: translateY(-6px); }
.mode-card .tagline {
  color: var(--violet); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 700; margin-bottom: 6px;
}
.mode-card h3 {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.5vw, 27px); font-weight: 500; letter-spacing: -0.01em; color: #fff;
  margin-bottom: 6px;
}
.mode-card p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.mode-card .eden { color: var(--eden); font-weight: 600; }

/* Together — a slim feature strip below the gallery */
.together {
  margin-top: clamp(28px, 4vw, 44px);
  display: flex; gap: 16px; align-items: center;
  padding: 18px 22px; border-radius: 18px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.together-glyph { font-size: 22px; color: var(--violet); filter: drop-shadow(0 0 12px rgba(183,141,255,0.7)); }
.together p { color: var(--muted); font-size: 15.5px; }
.together strong { color: #fff; font-weight: 600; }

/* Scroll reveal — tasteful fade-up */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Pro */
.pro { padding: 40px clamp(24px, 4vw, 48px); text-align: center; }
.pro .tag {
  display: inline-block; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 700; color: var(--violet);
  border: 1px solid rgba(183,141,255,0.4); border-radius: 999px; padding: 6px 14px;
}
.pro h2 { font-family: var(--font-display); font-size: clamp(28px, 5vw, 44px); font-weight: 600; letter-spacing: -0.02em; margin-top: 20px; color: #fff; }
.pro p { color: var(--muted); font-size: 18px; max-width: 44ch; margin: 16px auto 0; }
.pro .note { color: var(--faint); font-size: 14px; margin-top: 14px; }

/* ---- Footer ---------------------------------------------------------- */
footer.site {
  position: relative;
  text-align: center; color: var(--faint); font-size: 13px;
  padding: 46px 22px 60px; border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,6,20,0.42);
  backdrop-filter: blur(40px) saturate(150%); -webkit-backdrop-filter: blur(40px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}
footer.site .fbrand { color: var(--muted); letter-spacing: 0.24em; font-size: 13px; }
footer.site a { color: var(--faint); }
footer.site a:hover { color: var(--muted); }
footer.site .row { margin-top: 12px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- Document pages (privacy / terms / support) ---------------------- */
.doc {
  max-width: 760px; margin: 0 auto;
  padding: 120px clamp(20px, 6vw, 40px) 40px;
}
.doc h1 { font-family: var(--font-display); font-size: clamp(30px, 6vw, 44px); font-weight: 600; letter-spacing: -0.02em; color: #fff; }
.doc .updated { color: var(--faint); font-size: 13px; margin: 8px 0 30px; }
.doc h2 { font-size: 20px; font-weight: 600; color: #fff; margin: 34px 0 8px; }
.doc h3 { font-size: 16px; font-weight: 600; color: #fff; margin: 26px 0 6px; }
.doc p, .doc li { color: var(--muted); font-size: 16.5px; }
.doc .lead { font-size: 19px; color: var(--text); font-weight: 300; line-height: 1.5; }
.doc ul { padding-left: 22px; margin: 8px 0; }
.doc li { margin: 6px 0; }
.doc .card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.006)), var(--panel);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px; padding: 18px 22px; margin: 22px 0;
  backdrop-filter: blur(40px) saturate(150%); -webkit-backdrop-filter: blur(40px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.09);
}

@media (max-width: 760px) {
  .mode-gallery { grid-template-columns: 1fr; max-width: 320px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 640px) {
  .nav { padding: 12px 16px; }
  .brand { font-size: 13px; letter-spacing: 0.2em; }
  .nav .links { gap: 15px; }
  .nav .links a { font-size: 13px; }
  .nav .links a[href="#what"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
  .phone-hero { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
