/* ==========================================================================
   Aevinya — minimal 3D site
   ========================================================================== */

:root {
  --bg: #f5f6f3;
  --bg-2: #eceee9;
  --surface: #ffffff;
  --ink: #0d1014;
  --ink-2: #3b424c;
  --muted: #6b7380;
  --line: rgba(13, 16, 20, 0.09);
  --line-2: rgba(13, 16, 20, 0.16);
  --accent: #1ee8d8;
  --accent-ink: #078f86;       /* accent dark enough for text on light bg */
  --accent-soft: rgba(30, 232, 216, 0.14);
  --on-accent: #04201e;
  --shadow: 0 1px 2px rgba(13,16,20,.04), 0 8px 24px -12px rgba(13,16,20,.12);
  --shadow-lg: 0 2px 4px rgba(13,16,20,.04), 0 30px 60px -30px rgba(13,16,20,.25);
  --glass: rgba(245, 246, 243, 0.72);

  --radius: 22px;
  --radius-sm: 14px;
  --pad: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --font: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0d11;
  --bg-2: #0f1318;
  --surface: #12161c;
  --ink: #eef1f3;
  --ink-2: #c3c9d0;
  --muted: #8a929d;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --accent-ink: #1ee8d8;
  --accent-soft: rgba(30, 232, 216, 0.12);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 30px 60px -30px rgba(0,0,0,.8);
  --glass: rgba(10, 13, 17, 0.7);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; }
.display { font-size: clamp(44px, 7.4vw, 104px); letter-spacing: -0.05em; line-height: .96; }
.h2 { font-size: clamp(34px, 4.8vw, 64px); letter-spacing: -0.045em; }
.h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.03em; line-height: 1.15; }
.lead { font-size: clamp(17px, 1.35vw, 20px); color: var(--ink-2); line-height: 1.5; max-width: 34em; }
.muted { color: var(--muted); }
.accent-text { color: var(--accent-ink); }
.serif-i { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -0.02em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

/* ---------- buttons (label roll on hover) ---------- */
.btn {
  --h: 48px;
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  height: var(--h); padding: 0 22px; border-radius: 999px;
  font-weight: 500; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform .4s var(--ease-out), background-color .3s, color .3s, box-shadow .4s var(--ease-out);
  will-change: transform;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--ink) 60%, transparent); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { box-shadow: 0 12px 32px -10px rgba(30, 232, 216, .7); }
.btn-ghost { border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }

.roll { position: relative; display: inline-block; overflow: hidden; height: 1.3em; line-height: 1.3em; }
.roll > span { display: block; transition: transform .55s var(--ease-out); }
.roll > span + span { position: absolute; inset: 100% 0 auto 0; }
.btn:hover .roll > span, a:hover > .roll > span { transform: translateY(-100%); }

.btn .arrow { width: 16px; height: 16px; transition: transform .5s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px) rotate(-45deg); }

/* ---------- nav ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: var(--accent); }

.nav {
  position: fixed; top: 14px; left: 50%; z-index: 50;
  width: min(calc(100% - 24px), 1180px);
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 18px; border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .6s var(--ease-out), background-color .4s, border-color .4s, box-shadow .4s;
}
.nav.scrolled {
  background: var(--glass); border-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow);
}
.nav.hidden { transform: translate(-50%, -140%); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 19px; letter-spacing: -0.03em; }
.brand svg { width: 30px; height: 26px; }
.brand:hover .logo-a { transform: translateY(-2px); }
.brand:hover .logo-e { transform: translateY(2px); }
.logo-a, .logo-e { transition: transform .5s var(--ease-out); }

.nav-links { display: flex; align-items: center; gap: 2px; position: relative; margin: 0; padding: 0; list-style: none; }
.nav-links a { position: relative; z-index: 1; display: block; padding: 8px 14px; font-size: 14px; color: var(--ink-2); border-radius: 999px; transition: color .3s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-pill { position: absolute; z-index: 0; top: 0; height: 100%; border-radius: 999px; background: var(--line); opacity: 0; transition: left .45s var(--ease-out), width .45s var(--ease-out), opacity .3s; }

.nav-right { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line-2);
  transition: background-color .3s, transform .4s var(--ease-out);
}
.theme-toggle:hover { background: var(--surface); }
.theme-toggle:active { transform: scale(.92); }
.theme-toggle svg { width: 18px; height: 18px; overflow: visible; }
.theme-toggle .sun-core { transition: r .5s var(--ease-out), transform .5s var(--ease-out); transform-origin: center; }
.theme-toggle .moon-mask { transition: cx .6s var(--ease-out), cy .6s var(--ease-out); }
.theme-toggle .rays { transform-origin: 12px 12px; transition: transform .6s var(--ease-out), opacity .3s; }
[data-theme="dark"] .theme-toggle .sun-core { r: 9px; }
[data-theme="dark"] .theme-toggle .moon-mask { cx: 17px; cy: 7px; }
[data-theme="dark"] .theme-toggle .rays { transform: rotate(-90deg) scale(.4); opacity: 0; }

.menu-btn { display: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); place-items: center; align-content: center; }
.menu-btn span { display: block; width: 14px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease-out); }
.menu-btn span + span { margin-top: 4px; }
.menu-open .menu-btn span:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 40; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 90px var(--pad) 40px;
  clip-path: circle(0 at calc(100% - 40px) 34px); transition: clip-path .7s var(--ease-out); visibility: hidden;
}
.menu-open .mobile-menu { clip-path: circle(150% at calc(100% - 40px) 34px); visibility: visible; }
.mobile-menu a { font-size: 40px; letter-spacing: -0.04em; padding: 4px 0; opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .6s var(--ease-out); }
.menu-open .mobile-menu a { opacity: 1; transform: none; }
.menu-open .mobile-menu a:nth-child(2) { transition-delay: .05s; }
.menu-open .mobile-menu a:nth-child(3) { transition-delay: .1s; }
.menu-open .mobile-menu a:nth-child(4) { transition-delay: .15s; }
.menu-open .mobile-menu a:nth-child(5) { transition-delay: .2s; }

/* ---------- preloader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); transition: opacity .7s var(--ease), visibility .7s; }
.loader svg { width: 72px; height: 62px; }
.loader path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease-out) forwards; }
.loader path.logo-e { animation-delay: .2s; }
.loader .bar { position: absolute; bottom: 48px; width: 120px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.loader .bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .4s var(--ease-out); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.loaded .loader { opacity: 0; visibility: hidden; }

/* ---------- reveal ---------- */
.reveal-words .w { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(.35em); transition: opacity .9s var(--ease-out), filter .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i) * 45ms + var(--d, 0ms)); }
.reveal-words.in .w { opacity: 1; filter: blur(0); transform: none; }
.reveal { opacity: 0; transform: translateY(24px); filter: blur(6px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), filter 1s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; padding: 120px 0 56px; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; z-index: 0; }
.hero-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.hero::after { /* fade into page */
  content: ""; position: absolute; inset: auto 0 0 0; height: 30%; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; pointer-events: none; }
.hero-inner > * { pointer-events: auto; }
.hero h1 { max-width: 9.5em; }
.hero h1 .accent-dot { color: var(--accent); }
.hero-side { display: grid; gap: 22px; justify-items: start; padding-bottom: 10px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--glass);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 13px; line-height: 1.2; pointer-events: none;
}
.hero-chip b { display: block; font-size: 15px; font-weight: 500; letter-spacing: -0.02em; }
.hero-chip .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.hero-chip .ic svg { width: 16px; height: 16px; }
.chip-1 { top: 22%; left: 6%; animation: float 7s ease-in-out infinite; }
.chip-2 { top: 30%; right: 6%; animation: float 8s ease-in-out -3s infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

.scroll-hint { position: absolute; z-index: 2; left: 50%; bottom: 18px; transform: translateX(-50%); width: 22px; height: 34px; border-radius: 12px; border: 1.5px solid var(--line-2); }
.scroll-hint::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* ---------- marquee ---------- */
.marquee { position: relative; overflow: hidden; padding: 28px 0; border-block: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 56px; font-size: clamp(22px, 2.6vw, 34px); letter-spacing: -0.035em; color: var(--ink-2); white-space: nowrap; }
.marquee-item::after { content: ""; width: 14px; height: 14px; flex: none; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: clamp(80px, 12vw, 160px) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .eyebrow { margin-bottom: 20px; }
.section-head.center { grid-template-columns: 1fr; text-align: center; justify-items: center; }

/* ---------- feature cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; isolation: isolate;
  padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out), border-color .4s, background-color .5s;
  transform-style: preserve-3d;
}
.card::before { /* spotlight */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(380px circle at var(--mx) var(--my), var(--accent-soft), transparent 60%);
}
.card:hover { box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
.card .num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card h3 { margin: 56px 0 10px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-2); color: var(--ink); transition: background-color .4s, color .4s, transform .6s var(--ease-out); }
.card .icon svg { width: 20px; height: 20px; }
.card:hover .icon { background: var(--accent); color: var(--on-accent); transform: rotate(-8deg) scale(1.06); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- story (pinned 3D) ---------- */
.story { height: 400vh; }
.story-pin { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 24px; overflow: hidden; }
.story-canvas { position: relative; height: 100%; }
.story-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.story-text { padding-left: max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad))); position: relative; }
.story-text .h2 { margin: 18px 0 40px; max-width: 8.5em; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 460px; }
.step { position: relative; padding: 16px 0 16px 28px; border-top: 1px solid var(--line); color: var(--muted); transition: color .5s; }
.step::before { content: ""; position: absolute; left: 0; top: 24px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-2); transition: background-color .4s, border-color .4s, transform .5s var(--ease-out); }
.step h4 { font-size: 18px; letter-spacing: -0.02em; color: inherit; font-weight: 500; }
.step p { margin: 0; max-height: 0; overflow: hidden; opacity: 0; font-size: 15px; transition: max-height .6s var(--ease-out), opacity .5s, margin .5s; }
.step.active { color: var(--ink); }
.step.active::before { background: var(--accent); border-color: var(--accent); transform: scale(1.3); }
.step.active p { max-height: 120px; opacity: 1; margin-top: 6px; color: var(--muted); }
.story-meter { position: absolute; right: 24px; bottom: 24px; font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; gap: 12px; align-items: center; }
.story-meter .track { width: 120px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.story-meter .track i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 32px 24px 8px 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 24px; }
.stat:last-child { border-right: 0; }
.stat .val { font-size: clamp(56px, 8vw, 120px); letter-spacing: -0.06em; line-height: 1; font-weight: 400; font-variant-numeric: tabular-nums; }
.stat .val sup { font-size: .4em; vertical-align: top; position: relative; top: .25em; margin-left: 4px; color: var(--accent-ink); }
.stat .lbl { margin-top: 14px; color: var(--muted); font-size: 15px; max-width: 18em; }
.stat .bar { margin-top: 24px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.stat .bar i { display: block; height: 100%; width: var(--w); background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.6s var(--ease-out) .2s; }
.stat.in .bar i { transform: scaleX(1); }
.mini-stats { margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mini-stat { display: flex; gap: 18px; align-items: baseline; padding: 20px 22px; border-radius: var(--radius-sm); background: var(--bg-2); }
.mini-stat b { font-size: 32px; font-weight: 500; letter-spacing: -0.04em; min-width: 3ch; }
.mini-stat > span { color: var(--muted); font-size: 14px; line-height: 1.35; }

/* ---------- products ---------- */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.product {
  position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  border-radius: 28px; background: var(--surface); border: 1px solid var(--line);
  min-height: 640px; padding: 36px 36px 0; isolation: isolate;
  transition: box-shadow .6s var(--ease-out), border-color .4s, background-color .5s;
}
.product:hover { box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.product .tag { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.product h3 { font-size: clamp(32px, 3.6vw, 48px); margin: 12px 0 12px; }
.product p { margin: 0 0 22px; color: var(--muted); max-width: 30em; }
.product .row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .5s var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }
.phones { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0; margin-top: 32px; height: 100%; min-height: 380px; }
.phone {
  position: relative; width: 44%; max-width: 230px; aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden;
  border: 6px solid #0d1014; background: #0d1014; box-shadow: var(--shadow-lg);
  transition: transform .9s var(--ease-out);
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone.back { position: absolute; bottom: -40px; transform: translateX(-62%) rotate(-8deg) scale(.88); opacity: .95; }
.phone.back.r { transform: translateX(62%) rotate(8deg) scale(.88); }
.phone.front { z-index: 2; transform: translateY(40px); }
.product:hover .phone.front { transform: translateY(16px); }
.product:hover .phone.back { transform: translateX(-74%) rotate(-12deg) scale(.88); }
.product:hover .phone.back.r { transform: translateX(74%) rotate(12deg) scale(.88); }
.product-glow { position: absolute; z-index: -1; left: 50%; bottom: -30%; width: 120%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, var(--accent-soft), transparent); }

/* ---------- emission CTA ---------- */
.emission { overflow: hidden; }
.emission-box {
  position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
  border-radius: 32px; padding: clamp(32px, 6vw, 80px); overflow: hidden; isolation: isolate;
  background: #0d1014; color: #eef1f3;
}
[data-theme="dark"] .emission-box { background: var(--surface); border: 1px solid var(--line); }
.emission-box .lead { color: #b9c0c8; margin: 24px 0 32px; }
.emission-box .eyebrow { color: #8a929d; }
.emission-box .btn-accent { --h: 52px; }
.emission-canvas { position: absolute; inset: 0; z-index: -1; opacity: .9; }
.emission-art { position: relative; aspect-ratio: 16/10; }
.emission-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(0,0,0,.5)); }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan .price { font-size: 56px; letter-spacing: -0.05em; margin: 28px 0 4px; line-height: 1; }
.plan .period { color: var(--muted); font-size: 14px; }
.plan ul { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 10px; font-size: 15px; color: var(--ink-2); }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23078f86' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.plan .btn { margin-top: auto; justify-content: center; }
.plan h3 { margin: 0; }
.plan.featured { background: var(--ink); color: var(--bg); border-color: transparent; }
.plan.featured ul, .plan.featured .period, .plan.featured p { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.plan.featured::before { background: radial-gradient(380px circle at var(--mx) var(--my), rgba(30,232,216,.22), transparent 60%); }
.plan .badge { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }

/* ---------- contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); }
.contact-meta { display: grid; gap: 4px; margin-top: 40px; }
.contact-meta a, .contact-meta span { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 15px; }
.contact-meta a:hover { color: var(--accent-ink); }
.contact-meta small { color: var(--muted); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { position: relative; }
.field.full { grid-column: 1 / -1; }
.field input, .field textarea {
  width: 100%; padding: 26px 18px 10px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font: inherit; font-size: 16px; outline: none; resize: vertical;
  transition: border-color .3s, box-shadow .3s, background-color .5s;
}
.field textarea { min-height: 140px; }
.field label { position: absolute; left: 19px; top: 18px; color: var(--muted); font-size: 15px; pointer-events: none; transform-origin: 0 0; transition: transform .35s var(--ease-out), color .3s; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.78); }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.form-status { font-size: 14px; color: var(--muted); min-height: 1.4em; }
.form-status.ok { color: var(--accent-ink); }
.form-status.err { color: #e5484d; }
.btn .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: none; }
.btn.loading .spinner { display: block; }
.btn.loading .arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- footer ---------- */
.footer { padding: 80px 0 28px; border-top: 1px solid var(--line); overflow: hidden; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer h5 { margin: 0 0 14px; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--ink-2); transition: color .3s; }
.footer ul a:hover { color: var(--ink); }
.footer .about { color: var(--muted); max-width: 26em; margin: 16px 0 0; font-size: 15px; }
.wordmark { margin-top: 64px; padding-bottom: .16em; font-size: clamp(80px, 22vw, 340px); letter-spacing: -0.07em; line-height: .8; font-weight: 500; display: flex; justify-content: space-between; user-select: none; }
.wordmark span { display: inline-block; color: transparent; -webkit-text-stroke: 1px var(--line-2); transition: color .6s var(--ease-out), -webkit-text-stroke-color .6s, transform .8s var(--ease-out); }
.wordmark span:hover { color: var(--accent); -webkit-text-stroke-color: var(--accent); transform: translateY(-4%); }
.footer-bottom { margin-top: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.footer-bottom a:hover { color: var(--ink); }

/* ---------- product pages ---------- */
.page-hero { padding: 160px 0 60px; position: relative; overflow: hidden; }
.page-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.page-hero .display { font-size: clamp(44px, 6.4vw, 92px); margin: 20px 0 24px; }
.page-hero .hero-actions { margin-top: 32px; }
.hero-phones { position: relative; height: 620px; perspective: 1400px; }
.hero-phones .phone { position: absolute; width: 250px; max-width: none; left: 50%; top: 50%; }
.hero-phones .phone:nth-child(1) { transform: translate(-110%, -46%) rotateY(18deg) rotateZ(-4deg); }
.hero-phones .phone:nth-child(2) { z-index: 2; transform: translate(-50%, -54%); }
.hero-phones .phone:nth-child(3) { transform: translate(10%, -46%) rotateY(-18deg) rotateZ(4deg); }
.kpis { display: flex; gap: 20px 40px; flex-wrap: wrap; margin-top: 40px; }
.kpis div b { display: block; font-size: 36px; font-weight: 500; letter-spacing: -0.04em; }
.kpis div > span { color: var(--muted); font-size: 14px; }

.gallery { display: flex; gap: 16px; overflow-x: auto; padding: 8px var(--pad) 32px; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { margin: 0; flex: none; width: clamp(220px, 24vw, 290px); scroll-snap-align: center; }
.gallery .phone { width: 100%; max-width: none; transition: transform .6s var(--ease-out); }
.gallery figure:hover .phone { transform: translateY(-8px) rotate(-1deg); }
.gallery figcaption { margin-top: 16px; }
.gallery figcaption b { display: block; font-weight: 500; letter-spacing: -0.02em; }
.gallery figcaption span { font-size: 14px; color: var(--muted); }

.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: step; }
.process .card h3 { margin-top: 84px; }
.process .card::after { counter-increment: step; content: "0" counter(step); position: absolute; right: 24px; top: 18px; font-size: 72px; letter-spacing: -0.06em; color: var(--line-2); font-weight: 500; transition: color .5s; }
.process .card:hover::after { color: var(--accent); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.info-list { display: grid; }
.info-list div { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.info-list div span:first-child { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips span { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; transition: background-color .3s, color .3s, border-color .3s; }
.chips span:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---------- legal ---------- */
.legal { padding: 150px 0 100px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(36px, 5vw, 60px); margin-bottom: 12px; }
.legal h2 { font-size: 24px; margin: 48px 0 14px; letter-spacing: -0.025em; }
.legal h3 { font-size: 18px; margin: 28px 0 10px; letter-spacing: -0.015em; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .grid-3, .plans { grid-template-columns: 1fr 1fr; }
  .products { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-links, .nav-right .btn { display: none; }
  .menu-btn { display: grid; }
  .hero-inner, .section-head, .contact-wrap, .emission-box, .page-hero-grid, .info-grid { grid-template-columns: 1fr; }
  /* hero: 3D scene gets its own block above the copy */
  .hero { display: block; min-height: 0; padding: 0 0 64px; }
  .hero::after, .scroll-hint { display: none; }
  .hero-canvas {
    position: relative; inset: auto; height: 47svh; min-height: 300px; max-height: 480px; margin-bottom: -16px;
    -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent); mask-image: linear-gradient(to bottom, #000 78%, transparent);
  }
  .hero-inner { gap: 22px; }
  .hero-side { gap: 18px; padding-bottom: 0; }
  .chip-1 { top: 13svh; left: 4%; } .chip-2 { top: 18svh; right: 4%; }
  .story { height: auto; }
  .story-pin { position: relative; height: auto; grid-template-columns: 1fr; padding: 24px 0 40px; }
  .story-canvas { height: 52svh; min-height: 320px; order: -1; }
  .story-meter { display: none; }
  .story-text { padding-inline: var(--pad); }
  .step p { max-height: none; opacity: 1; margin-top: 6px; }
  .step { color: var(--ink); }
  .stats, .mini-stats, .process { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 0 !important; }
  .page-hero { padding: 120px 0 24px; }
  .page-hero-grid { gap: 8px; }
  .hero-phones { height: 440px; }
  .hero-phones .phone { width: 200px; }
}
@media (max-width: 600px) {
  .grid-3, .plans, .form { grid-template-columns: 1fr; }
  .product { min-height: 0; padding: 28px 24px 0; }
  .phones { min-height: 300px; margin-top: 8px; }
  .phone.back { bottom: -60px; }
  .hero-chip { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-phones { height: 360px; }
  .hero-phones .phone { width: 160px; }
  .card h3 { margin-top: 32px; }
  .hero { padding-bottom: 64px; }
  .hero h1 { font-size: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal, .reveal-words .w { opacity: 1; filter: none; transform: none; }
}

/* theme switch: circular reveal (View Transitions API) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---------- product page extras ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-4 .card h3 { margin-top: 40px; font-size: 21px; }
.card .benefits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.card .benefits span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.hero-phones-wrap { transition: transform .8s var(--ease-out); transform-style: preserve-3d; }

.predict { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
.predict .card h3 { margin-top: 12px; }
.range-row { display: flex; align-items: baseline; justify-content: space-between; padding: 22px 0; border-top: 1px solid var(--line); }
.range-row b { font-size: clamp(44px, 5vw, 72px); font-weight: 400; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.range-row small { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.range-row .spd { color: var(--muted); font-size: 15px; }
.range-row.best b { color: var(--accent-ink); }
.battery-meter { margin-top: 10px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line-2); padding: 4px; position: relative; }
.battery-meter::after { content: ""; position: absolute; right: -7px; top: 13px; width: 4px; height: 14px; border-radius: 0 3px 3px 0; background: var(--line-2); }
.battery-meter i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent) 0 30%, color-mix(in srgb, var(--accent) 35%, transparent) 30% 100%); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.8s var(--ease-out) .3s; }
.in .battery-meter i, .battery-meter.in i { transform: scaleX(1); }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.trust div { padding: 28px 20px 0 0; }
.trust b { display: block; font-size: clamp(40px, 5vw, 64px); font-weight: 400; letter-spacing: -0.05em; line-height: 1; }
.trust div > span { color: var(--muted); font-size: 14px; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .predict, .trust { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-4, .predict { grid-template-columns: 1fr; } }

/* ---------- platform: pinned 3D fly-through ---------- */
.fly { position: relative; height: 640vh; }
.fly-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  perspective: 900px; perspective-origin: 50% 50%;
}
.fly-tiles { position: absolute; inset: 0; transform-style: preserve-3d; }
.fly-tile {
  position: absolute; left: 50%; top: 50%; width: var(--w); margin: calc(var(--w) * var(--ar) / -2) 0 0 calc(var(--w) / -2);
  aspect-ratio: 1 / var(--ar); border-radius: 14px; overflow: hidden;
  background: var(--surface); box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .45);
  will-change: transform, opacity; backface-visibility: hidden; opacity: 0;
}
.fly-tile img { width: 100%; height: 100%; object-fit: cover; }
.fly-tile.contain { background: transparent; box-shadow: none; }
.fly-tile.contain img { object-fit: contain; }
.fly-tile.chip { border-radius: 30%; background: var(--accent); box-shadow: 0 0 40px rgba(30, 232, 216, .35); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }

.fly-slides { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fly-slides::before { /* soft halo keeps the copy readable over passing tiles */
  content: ""; position: absolute; left: 50%; top: 50%; width: min(760px, 110vw); aspect-ratio: 1.6; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--bg) 35%, transparent);
}
.fly-slide {
  position: absolute; left: 50%; top: 50%; width: min(640px, calc(100vw - 40px));
  display: grid; justify-items: center; gap: 14px; text-align: center;
  opacity: 0; will-change: transform, opacity, filter;
}
.fly-slide h3 { font-size: clamp(32px, 4.4vw, 60px); letter-spacing: -0.045em; line-height: 1.02; }
.fly-slide p { margin: 0; max-width: 30em; color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); }
.fly-intro .h2 { font-size: clamp(36px, 5.2vw, 72px); }
.fly-intro .eyebrow { margin-bottom: 4px; }
.fly-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 12px 40px -12px rgba(30, 232, 216, .6); }
.fly-icon svg { width: 24px; height: 24px; }
.fly-num { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.fly-progress { position: absolute; z-index: 3; left: 50%; bottom: 32px; width: 140px; height: 2px; margin-left: -70px; border-radius: 2px; background: var(--line); overflow: hidden; }
.fly-progress i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-width: 860px) {
  .fly { height: 560vh; }
  .fly-tile { border-radius: 10px; }
  .fly-slides::before { width: 170vw; aspect-ratio: 1.15; background: radial-gradient(closest-side, var(--bg) 55%, transparent); }
}

/* ---------- footer credit ---------- */
.footer-credit { white-space: nowrap; }
.footer-credit a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: text-decoration-color .3s, color .3s; }
.footer-credit a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
.footer-heart { display: inline-block; color: #e5484d; margin: 0 2px; transition: transform .3s var(--ease-out); }
.footer-credit:hover .footer-heart { animation: heartbeat 1s var(--ease) infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
