/* ==========================================================================
   VIRAAI — marketing site styles
   Design tokens → base → layout → components → sections → responsive → motion
   ========================================================================== */

:root {
  /* Brand palette */
  --green-900: #0b3d2e;
  --green-800: #0f5132;
  --green-700: #137a4c;
  --green-600: #1a9459;
  --green-500: #22b06a;
  --green-300: #7fe0ab;
  --green-100: #e4f7ec;

  --earth-600: #b4762b;
  --earth-500: #d98c34;
  --amber-400: #f2b84b;

  --ink-900: #0c1410;
  --ink-800: #16211b;
  --ink-700: #2b3a32;
  --ink-500: #5a6b61;
  --ink-400: #7d8c83;

  --paper: #ffffff;
  --paper-50: #f7faf8;
  --paper-100: #eef4f0;
  --line: #e2ebe5;

  /* Semantic */
  --bg: var(--paper);
  --bg-alt: var(--paper-50);
  --text: var(--ink-900);
  --text-soft: var(--ink-500);
  --brand: var(--green-700);
  --brand-strong: var(--green-800);
  --accent: var(--earth-500);

  /* Type */
  --font-head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Shape & depth */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(12, 20, 16, .06), 0 2px 8px rgba(12, 20, 16, .05);
  --shadow-md: 0 8px 24px rgba(12, 20, 16, .08), 0 2px 6px rgba(12, 20, 16, .05);
  --shadow-lg: 0 24px 60px rgba(11, 61, 46, .18);

  --container: 1140px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(64px, 9vw, 128px);
}

/* ------------------------------ Base ------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; color: var(--text); letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-strong); }
img, svg { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--green-500); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ----------------------------- Layout ----------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--dark {
  background: radial-gradient(1200px 600px at 80% -10%, rgba(34,176,106,.18), transparent 60%), var(--green-900);
  color: #ddeee5;
}
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .section-head p, .section--dark p { color: #a9c7ba; }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-soft); font-size: 1.125rem; margin: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--brand); border-radius: 2px; }
.section--dark .eyebrow { color: var(--green-300); }
.section--dark .eyebrow::before { background: var(--green-300); }
.center .eyebrow { justify-content: center; }

/* ----------------------------- Buttons ---------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .18s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(19,122,76,.28); }
.btn--primary:hover { background: var(--brand-strong); color: #fff; box-shadow: 0 12px 28px rgba(19,122,76,.36); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--light { background: #fff; color: var(--green-900); }
.btn--light:hover { background: var(--green-100); color: var(--green-900); transform: translateY(-2px); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ------------------------------ Header ---------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; letter-spacing: .02em; color: var(--ink-900); }
.brand:hover { color: var(--ink-900); }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand b { color: var(--brand); font-weight: 700; }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { color: var(--ink-700); font-weight: 500; font-size: .98rem; }
.nav-links a:hover { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 14px; }

.mobile-menu { display: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink-800); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle span + span { margin-top: 6px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ------------------------------- Hero ----------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 12% -20%, rgba(34,176,106,.14), transparent 55%),
    radial-gradient(700px 500px at 100% 0%, rgba(242,184,75,.12), transparent 50%),
    linear-gradient(180deg, var(--paper-50), var(--paper));
  padding-block: clamp(56px, 8vw, 104px) clamp(64px, 9vw, 120px);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px; border-radius: 999px;
  background: var(--green-100); color: var(--green-800); font-weight: 600; font-size: .85rem;
  border: 1px solid #cdeedd; margin-bottom: 24px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 4px rgba(34,176,106,.18); }
.hero h1 { margin-bottom: 20px; }
.hero h1 .hl { color: var(--brand); }
.hero-lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text-soft); max-width: 36ch; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-note { display: flex; align-items: center; gap: 10px; color: var(--ink-500); font-size: .92rem; }
.hero-note svg { color: var(--green-600); flex: none; }

.hero-visual { position: relative; }
.hero-visual .panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px; position: relative; z-index: 2;
}

/* ----------------------------- Stat bar --------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 28px); }
.stat { text-align: center; }
.stat .num { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); color: var(--brand); line-height: 1; }
.stat .lbl { color: var(--text-soft); font-size: .95rem; margin-top: 8px; }
.section--dark .stat .num { color: var(--green-300); }

/* ------------------------------ Cards ----------------------------------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfe3d7; }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-700); margin-bottom: 18px;
}
.card .ico svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-soft); margin: 0; font-size: .98rem; }

/* --------------------------- Steps (how) -------------------------------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { position: relative; padding-top: 14px; }
.step .k {
  counter-increment: step; font-family: var(--font-head); font-weight: 700;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--brand); border: 2px solid var(--green-300); margin-bottom: 18px; font-size: 1.15rem;
}
.step .k::before { content: counter(step, decimal-leading-zero); }
.step h3 { font-size: 1.15rem; margin-bottom: 7px; }
.step p { color: var(--text-soft); font-size: .96rem; margin: 0; }
.section--dark .step .k { background: rgba(255,255,255,.06); color: var(--green-300); border-color: rgba(127,224,171,.4); }
.section--dark .card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.section--dark .card:hover { border-color: rgba(127,224,171,.35); }
.section--dark .card p { color: #a9c7ba; }
.section--dark .card .ico { background: rgba(34,176,106,.16); color: var(--green-300); }

/* ------------------------- Split feature rows --------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split + .split { margin-top: clamp(48px, 7vw, 96px); }
.split.reverse .split-media { order: 2; }
.feature-list { display: grid; gap: 16px; margin-top: 22px; }
.feature-list li { display: flex; gap: 13px; align-items: flex-start; }
.feature-list .tick {
  flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-700); margin-top: 2px;
}
.feature-list b { font-weight: 600; }
.feature-list span { color: var(--text-soft); }

/* ------------------------------- Pilot ---------------------------------- */
.pilot-card {
  background: linear-gradient(135deg, var(--green-800), var(--green-900));
  border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px); color: #dff0e7;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  box-shadow: var(--shadow-lg);
}
.pilot-card h2 { color: #fff; }
.pilot-meta { display: grid; gap: 18px; }
.pilot-meta .row { display: flex; gap: 14px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.pilot-meta .row:last-child { border-bottom: 0; padding-bottom: 0; }
.pilot-meta .row svg { color: var(--green-300); flex: none; }
.pilot-meta .row b { color: #fff; display: block; font-family: var(--font-head); }
.pilot-meta .row span { color: #a9c7ba; font-size: .9rem; }

/* ------------------------------ Contact --------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-points { display: grid; gap: 22px; margin-top: 26px; }
.contact-points a { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.05rem; }
.contact-points .cp-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--green-100); color: var(--brand); display: grid; place-items: center; flex: none; }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 34px); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; font: inherit; font-size: 1rem; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-50);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green-500); background: #fff; box-shadow: 0 0 0 4px rgba(34,176,106,.14); }
.field textarea { resize: vertical; min-height: 120px; }
.form .btn { width: 100%; }
.form-hint { font-size: .85rem; color: var(--ink-400); margin: 14px 0 0; text-align: center; }
.form-status { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .95rem; display: none; }
.form-status.ok { display: block; background: var(--green-100); color: var(--green-800); }
.form-status.err { display: block; background: #fdeceb; color: #b4231c; }

/* ------------------------------ Footer ---------------------------------- */
.site-footer { background: var(--ink-900); color: #9fb3a8; padding-block: clamp(48px, 6vw, 72px) 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand b { color: var(--green-300); }
.footer-about { max-width: 34ch; font-size: .96rem; color: #8ca89a; }
.footer-col h4 { color: #fff; font-family: var(--font-head); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col a { display: block; color: #9fb3a8; padding: 5px 0; font-size: .96rem; }
.footer-col a:hover { color: var(--green-300); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: .88rem; color: #7b9488;
}
.footer-bottom .made { display: inline-flex; align-items: center; gap: 7px; }

/* ----------------------- Legal / content pages -------------------------- */
.legal { padding-block: clamp(48px, 7vw, 96px); }
.legal .container { max-width: 820px; }
.legal h1 { margin-bottom: 8px; }
.legal .updated { color: var(--text-soft); font-size: .95rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.5rem; margin-top: 44px; }
.legal h3 { font-size: 1.15rem; margin-top: 28px; }
.legal p, .legal li { color: var(--ink-700); }
.legal ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.legal li { margin-bottom: 8px; }
.legal a { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 28px; }

/* --------------------------- Reveal on scroll --------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split, .split.reverse .split-media { grid-template-columns: 1fr; order: 0; }
  .split-media { max-width: 560px; }
  .pilot-card { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu {
    position: fixed; inset: 72px 0 auto 0; background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); padding: 18px var(--gutter) 26px; display: none; z-index: 49;
  }
  .mobile-menu.open { display: block; animation: slideDown .28s ease; }
  .mobile-menu a { display: block; padding: 13px 0; font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid var(--line); color: var(--ink-800); }
  .mobile-menu a:last-of-type { border-bottom: 0; }
  .mobile-menu .btn { width: 100%; margin-top: 16px; border-bottom: 0; }
  .mobile-menu a.btn--primary { color: #fff; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .grid-3, .grid-2, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* Floating sensor-chip animation in hero panel */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
