/* AINA — tokens from Brand Book v1.0 */
:root {
  --midnight: #050B09;
  --forest: #071B15;
  --raised: #0D2A21;
  --emerald: #00C98D;
  --mint: #4FFFC3;
  --white: #FFFFFF;
  --gray: #B8C5BF;
  --line: rgba(184, 197, 191, .12);

  --light-surface: #F3F6F4;
  --light-sunken: #E6EDE9;
  --light-text-2: #4A5A53;
  --accent-on-light: #008F63;

  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px;
  --s6: 48px; --s7: 64px; --s8: 96px; --s9: 128px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-micro: 120ms; --t-base: 200ms; --t-slow: 320ms; --t-reveal: 800ms;

  --margin: 64px;
  --gutter: 24px;

  /* wordmark defaults: primary (white + emerald accent) */
  --wm-left: url(#aina-rise);
  --wm-ink: #FFFFFF;
  --wm-dot: #4FFFC3;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--midnight);
  color: var(--white);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--emerald), 0 0 0 4px rgba(0, 201, 141, .25); border-radius: var(--r-sm); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: var(--s3); top: -60px; z-index: 50; padding: var(--s2) var(--s3); background: var(--emerald); color: var(--midnight); border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: var(--s3); }

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

/* Type scale */
.display { font-size: clamp(40px, 6vw, 72px); line-height: 1; font-weight: 800; letter-spacing: -0.04em; }
.h-page { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.h-section { font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.h-sub { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.lead { font-size: clamp(16px, 1.6vw, 18px); color: var(--gray); }
.muted { color: var(--gray); font-size: 14px; }
.eyebrow, .label { font-size: 12px; line-height: 1; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { color: var(--emerald); margin-bottom: var(--s3); }
.label { color: var(--gray); }

/* Wordmark */
.wordmark { height: 28px; width: auto; aspect-ratio: 246 / 84; }
.symbol { width: 100%; height: 100%; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 var(--s4);
  border-radius: var(--r-md);
  font-size: 15px; line-height: 1; font-weight: 700; letter-spacing: .01em;
  transition: background-color var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease), color var(--t-micro) var(--ease), transform var(--t-micro) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--emerald); color: var(--midnight); }
.btn--primary:hover { background: var(--mint); }
.btn--secondary { border: 1px solid rgba(184, 197, 191, .28); color: var(--white); }
.btn--secondary:hover { border-color: var(--gray); background: rgba(255, 255, 255, .04); }

.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 var(--s3); border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.badge--concept { border: 1px dashed rgba(184, 197, 191, .45); color: var(--gray); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(5, 11, 9, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; height: 72px; gap: var(--s5); }
.nav__logo .wordmark { height: 22px; }
.nav__links { display: flex; gap: var(--s5); margin: 0 auto; }
.nav__links a, .footer__links a { font-size: 14px; line-height: 1; font-weight: 600; color: var(--gray); transition: color var(--t-micro) var(--ease); }
.nav__links a:hover, .footer__links a:hover { color: var(--white); }
.nav__end { display: flex; align-items: center; gap: var(--s4); }
.nav__cta { height: 40px; padding: 0 var(--s3); font-size: 14px; }
.lang { display: flex; gap: var(--s1); }
.lang button { padding: var(--s1) 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--gray); border-radius: 6px; transition: color var(--t-micro) var(--ease); }
.lang button:hover { color: var(--white); }
.lang button[aria-pressed="true"] { color: var(--white); }
.nav__menu { display: none; width: 40px; height: 40px; position: relative; border-radius: var(--r-sm); }
.nav__menu span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--white); transition: transform var(--t-base) var(--ease); }
.nav__menu span:first-child { top: 15px; }
.nav__menu span:last-child { top: 23px; }
.nav__menu[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__menu[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.sheet { border-top: 1px solid var(--line); background: var(--midnight); }
.sheet:not([hidden]) { animation: enter var(--t-slow) var(--ease); }
.sheet__inner { display: flex; flex-direction: column; padding-top: var(--s3); padding-bottom: var(--s5); }
.sheet__inner > a { padding: var(--s3) 0; font-size: 20px; font-weight: 600; border-bottom: 1px solid var(--line); }
.lang--sheet { margin-top: var(--s4); gap: var(--s2); }
.lang--sheet button { font-size: 14px; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-pill); }
.lang--sheet button[aria-pressed="true"] { border-color: var(--emerald); }

@keyframes enter { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }

/* Hero */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(70% 40% at 50% 100%, rgba(0, 201, 141, .2), transparent 70%),
    radial-gradient(40% 30% at 50% 30%, rgba(7, 27, 21, .9), transparent 70%),
    var(--midnight);
  overflow: hidden;
}
.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: var(--s8); }
.hero__logo { position: relative; width: clamp(220px, 30vw, 380px); aspect-ratio: 246 / 84; margin-bottom: var(--s6); }
.hero__mark { width: 100%; height: 100%; overflow: visible; }
/* 3D logo canvas: wider and taller than the wordmark so it can tilt without clipping (logo = 1/1.6 of its width) */
.hero__canvas { position: absolute; left: -30%; top: -60%; width: 160%; height: 220%; opacity: 0; pointer-events: none; transition: opacity 600ms var(--ease); }
.want3d .hero__mark, .want3d .hero__dot { animation-play-state: paused; }
.hero__logo.is-3d .hero__canvas { opacity: 1; }
.hero__logo.is-3d .hero__mark { visibility: hidden; }
.hero .display { max-width: 17ch; }
.hero .lead { margin-top: var(--s4); max-width: 46ch; }
.hero__actions { display: flex; gap: var(--s3); margin-top: var(--s5); flex-wrap: wrap; justify-content: center; }
.hero__phones { display: flex; justify-content: center; align-items: flex-start; gap: var(--s5); margin-top: var(--s7); padding: 0 var(--margin); height: clamp(420px, 46vw, 600px); }
.hero__phones .phone--main { width: clamp(220px, 24vw, 300px); }
.hero__phones .phone--side { width: clamp(190px, 20vw, 260px); margin-top: var(--s7); opacity: .72; }
.hero__foot { position: absolute; left: 0; right: 0; bottom: var(--s5); }

/* Phone screenshots, cropped to the device frame */
.phone { display: block; width: 100%; height: auto; aspect-ratio: 604 / 1310; border-radius: 15% / 7%; box-shadow: 0 24px 48px rgba(0, 0, 0, .6); }

/* Logo reveal · 800ms · wordmark fades up, dot lands last */
.hero__mark { --wm-dot: transparent; animation: rise var(--t-reveal) var(--ease) both; }
.hero__dot { fill: var(--mint); animation: land 320ms var(--ease) 640ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes land { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* Sections */
.section { padding: var(--s9) 0; }
.section--light { background: var(--white); color: var(--midnight); }
.section--light .eyebrow { color: var(--accent-on-light); }
.section--light .phone { box-shadow: 0 24px 48px rgba(5, 11, 9, .14); }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-top: var(--s6); }
.service { background: var(--forest); border: 1px solid rgba(184, 197, 191, .06); border-radius: var(--r-xl); padding: var(--s5); transition: border-color var(--t-micro) var(--ease); }
.service:hover { border-color: rgba(0, 201, 141, .35); }
.service__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-md); background: var(--raised); margin-bottom: var(--s5); }
.service__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--emerald); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.service p { color: var(--gray); font-size: 15px; margin-top: var(--s2); }

/* Client app steps */
.steps { list-style: none; padding: 0; margin: var(--s6) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.step .phone { margin-bottom: var(--s4); }
.step__n { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--accent-on-light); margin-bottom: var(--s2); font-variant-numeric: tabular-nums; }
.step p { color: var(--light-text-2); font-size: 15px; margin-top: var(--s2); }

/* Drivers */
.drivers { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s7); align-items: center; }
.drivers .lead { margin-top: var(--s4); }
.features { list-style: none; padding: 0; margin: var(--s6) 0; display: grid; gap: var(--s4); }
.features li { padding-left: var(--s4); border-left: 2px solid var(--raised); }
.features h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.features p { color: var(--gray); font-size: 15px; margin-top: var(--s1); }
.drivers__phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); align-items: start; }
.drivers__phones .phone:nth-child(2) { margin-top: var(--s7); }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); margin-top: var(--s6); }
.principle p { color: var(--light-text-2); font-size: 15px; margin-top: var(--s2); }
.principle .h-sub { margin-top: var(--s4); }
.principle__art { aspect-ratio: 1; border-radius: var(--r-xl); background: var(--light-surface); display: grid; place-items: center; }
.principle__art--dark { background: var(--forest); }
.principle__art--dark .symbol { width: 34%; height: auto; aspect-ratio: 1; }
.art-line { width: 40%; height: 2px; background: var(--midnight); border-radius: 2px; }
.art-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 14px rgba(0, 201, 141, .14), 0 0 0 28px rgba(0, 201, 141, .06); }
.art-square { width: 40%; aspect-ratio: 1; border: 1.75px solid var(--midnight); border-radius: var(--r-md); }

/* Download */
.download { background: radial-gradient(50% 60% at 50% 0%, rgba(0, 201, 141, .14), transparent 70%), var(--midnight); border-top: 1px solid var(--line); }
.download__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.app-icon { width: 96px; height: 96px; border-radius: 22%; background: var(--forest); padding: 17px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); border: 1px solid rgba(184, 197, 191, .08); }
.download__title { margin-top: var(--s5); }
.download .lead { margin-top: var(--s3); max-width: 40ch; }
.stores { display: flex; gap: var(--s3); margin-top: var(--s6); flex-wrap: wrap; justify-content: center; }
.store { display: inline-flex; align-items: center; gap: var(--s3); height: 56px; padding: 0 var(--s4) 0 var(--s3); border-radius: var(--r-md); border: 1px solid rgba(184, 197, 191, .28); text-align: left; cursor: default; }
.store__logo { width: 24px; height: 24px; }
.store--live { cursor: pointer; transition: border-color var(--t-micro) var(--ease), background-color var(--t-micro) var(--ease); }
.store--live:hover { border-color: var(--gray); background: rgba(255, 255, 255, .04); }
.store small { display: block; font-size: 11px; line-height: 1.2; color: var(--gray); font-weight: 500; }
.store b { display: block; font-size: 16px; line-height: 1.2; font-weight: 700; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: var(--s7) 0; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--gutter); align-items: start; }
.footer__head { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--white); }
.footer__mark { height: 22px; }
.footer__links { display: flex; flex-direction: column; gap: var(--s3); }
.footer__tag { color: var(--gray); font-size: 13px; margin-top: var(--s3); }
.footer__copy { color: var(--gray); font-size: 13px; text-align: right; }
.footer__copy p + p { margin-top: var(--s2); }
.footer__copy a { color: var(--gray); text-decoration: underline; text-underline-offset: 3px; }
.footer__copy a:hover { color: var(--white); }

/* Tablet · 768 · 8 col */
@media (max-width: 1080px) {
  :root { --margin: 32px; --gutter: 20px; }
  .nav__links { gap: var(--s4); }
  .services { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: var(--s6); }
  .steps .phone { max-width: 300px; }
  .drivers { grid-template-columns: 1fr; gap: var(--s6); }
  .principles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav__links, .nav__end > .lang { display: none; }
  .nav__inner { justify-content: space-between; }
  .nav__end { gap: var(--s2); }
  .nav__menu { display: block; }
}

/* Mobile · 390 · 4 col */
@media (max-width: 600px) {
  :root { --margin: 20px; --gutter: 16px; }
  .nav__inner { height: 64px; }
  .nav__cta { display: none; }
  .hero__inner { padding-top: var(--s7); }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
  .hero__phones { height: 440px; margin-top: var(--s6); }
  .hero__phones .phone--side { display: none; }
  .hero__phones .phone--main { width: 260px; }
  .hero__foot { display: none; }
  .section { padding: var(--s8) 0; }
  .services { grid-template-columns: 1fr; }
  .service { padding: var(--s4); display: grid; grid-template-columns: 48px 1fr; column-gap: var(--s3); }
  .service__icon { margin: 0; grid-row: span 2; }
  .service p { margin-top: var(--s1); }
  .steps { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--s3); margin-left: calc(-1 * var(--margin)); margin-right: calc(-1 * var(--margin)); padding: 0 var(--margin) var(--s2); scrollbar-width: none; }
  .steps::-webkit-scrollbar { display: none; }
  .step { flex: 0 0 72%; scroll-snap-align: center; }
  .drivers__phones { gap: var(--s2); }
  .drivers__phones .phone:nth-child(2) { margin-top: var(--s5); }
  .principles { grid-template-columns: 1fr; gap: var(--s5); }
  .principle__art { aspect-ratio: 16 / 10; }
  .stores { flex-direction: column; width: 100%; }
  .store { justify-content: center; }
  .footer__inner { grid-template-columns: 1fr; gap: var(--s5); }
  .footer__copy { text-align: left; }
}

/* ---------- Motion · quiet, quick, precise ----------
   One curve (--ease). Entrances: fade + small rise/scale. Everything else follows the user:
   scroll reveals, scroll parallax, pointer light, hover lift. Nothing loops. */

/* Hero entrance — runs once after the logo reveal */
.hero .display, .hero .lead, .hero__actions { animation: rise 700ms var(--ease) both; }
.hero .display { animation-delay: 240ms; }
.hero .lead { animation-delay: 360ms; }
.hero__actions { animation-delay: 460ms; }
.hero__phones .phone { animation: phone-in 1000ms var(--ease) both; translate: 0 var(--py, 0px); will-change: translate; }
.hero__phones .phone--main { animation-delay: 520ms; }
.hero__phones .phone--side:first-child { animation-delay: 680ms; }
.hero__phones .phone--side:last-child { animation-delay: 760ms; }
@keyframes phone-in { from { opacity: 0; transform: translateY(64px) scale(.96); } }

/* Safety net: if a browser never starts the entrance (no paint), show the content anyway */
.motion-done .hero__mark, .motion-done .hero__dot, .motion-done .hero .display, .motion-done .hero .lead,
.motion-done .hero__actions, .motion-done .hero__phones .phone { animation: none; }
.motion-done .hero__mark { --wm-dot: transparent; }

/* Pointer light in the hero (desktop) */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(0, 201, 141, .13), transparent 70%);
  transition: opacity var(--t-slow) var(--ease);
}
.hero.is-lit::before { opacity: 1; }
.hero__inner, .hero__phones { position: relative; }

/* Scroll reveal (set up by app.js; without JS everything is simply visible) */
.js [data-reveal] { opacity: 0; transform: translateY(20px) scale(.98); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .phone[data-reveal] { transform: translateY(40px) scale(.97); }
.js .phone[data-reveal].is-in { transform: none; }
.js .app-icon[data-reveal] { transform: scale(.86); }
.js .app-icon[data-reveal].is-in { transform: none; }

/* Header gets a firmer surface once the page moves */
.nav { transition: background-color var(--t-base) var(--ease), border-color var(--t-base) var(--ease); }
.nav.is-scrolled { background: rgba(5, 11, 9, .92); border-bottom-color: rgba(184, 197, 191, .16); }

/* Hover lift */
.service { transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease), background-color var(--t-base) var(--ease); }
.service:hover { transform: translateY(-4px); background: #0A2219; }
.service__icon { transition: background-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
.service:hover .service__icon { background: rgba(0, 201, 141, .16); box-shadow: 0 0 24px rgba(0, 201, 141, .25); }
.step .phone, .drivers__phones .phone { transition: translate var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease); }
.step:hover .phone, .drivers__phones .phone:hover { translate: 0 -8px; }
.principle__art { transition: transform var(--t-slow) var(--ease); }
.principle:hover .principle__art { transform: scale(1.02); }
.art-dot { transition: box-shadow var(--t-slow) var(--ease); }
.principle:hover .art-dot { box-shadow: 0 0 0 18px rgba(0, 201, 141, .16), 0 0 0 36px rgba(0, 201, 141, .07); }
.btn--primary:hover { box-shadow: 0 8px 24px rgba(0, 201, 141, .28); }
.btn { transition: background-color var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease), color var(--t-micro) var(--ease), transform var(--t-micro) var(--ease), box-shadow var(--t-base) var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__phones .phone { translate: none; }
  .hero::before { display: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
