/* ============================================================
   TURRIVO — silver/blue sci-fi UI over a bright digital ocean
   ============================================================ */
:root {
  --bg-0: #eef5fb;
  --bg-1: #e2edf7;
  --ink: #12233d;
  --ink-dim: #51678a;
  --cyan: #0f8fd0;
  --blue: #1c5fd0;
  --deep: #0d3f96;
  --silver: #8fa6c4;
  --line: rgba(28, 95, 208, 0.18);
  --glass: rgba(255, 255, 255, 0.6);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --font-display: "Orbitron", "Segoe UI", sans-serif;
  --font-body: "Rajdhani", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Consolas", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(28, 95, 208, 0.45) rgba(226, 237, 247, 0.9);
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-0);
  overflow-x: hidden;
}

::selection { background: rgba(15, 143, 208, 0.25); color: var(--deep); }

/* ---------- WebGL canvas + atmosphere overlays ---------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.no-webgl #scene { display: none; }
.no-webgl body,
.no-webgl .hero {
  background:
    radial-gradient(1100px 600px at 70% 20%, rgba(120, 190, 255, 0.35), transparent 60%),
    radial-gradient(900px 700px at 20% 85%, rgba(28, 95, 208, 0.14), transparent 60%),
    var(--bg-0);
}

/* subtle scanlines + soft edge vignette, over the canvas, under the UI */
.overlay-fx {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(28, 95, 208, 0.022) 0 1px, transparent 1px 4px),
    radial-gradient(130% 100% at 50% 45%, transparent 60%, rgba(178, 205, 230, 0.5) 100%);
}

/* ---------- Boot loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-content: center;
  gap: 22px;
  justify-items: center;
  background: var(--bg-0);
  transition: opacity 0.7s ease, visibility 0.7s;
}
.scene-ready .loader,
.no-webgl .loader { opacity: 0; visibility: hidden; }

.loader-hex {
  width: 58px;
  height: 58px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(135deg, #59b6e8, var(--blue));
  animation: hexSpin 1.4s cubic-bezier(0.6, 0.05, 0.3, 0.95) infinite;
}
@keyframes hexSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(0.72); }
  100% { transform: rotate(360deg) scale(1); }
}
.loader-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  animation: blink 1.2s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.45; } }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 50;
  background: rgba(28, 95, 208, 0.10);
}
.progress span {
  display: block;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--deep), var(--cyan), #7cc4ee);
  box-shadow: 0 0 12px rgba(15, 143, 208, 0.7);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px clamp(18px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(238, 245, 251, 0.9), rgba(238, 245, 251, 0));
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.32em;
}
.brand svg { filter: drop-shadow(0 2px 8px rgba(28, 95, 208, 0.35)); }

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--cyan); text-shadow: 0 0 14px rgba(15, 143, 208, 0.35); }

/* ---------- Buttons / chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--deep);
  border: 1px solid rgba(28, 95, 208, 0.35);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn-primary {
  background: linear-gradient(120deg, var(--deep), var(--cyan));
  color: #f4faff;
  border: none;
  box-shadow: 0 8px 26px rgba(28, 95, 208, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(28, 95, 208, 0.45); }
.btn-ghost { background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(8px); }
.btn-ghost:hover { color: var(--cyan); border-color: rgba(15, 143, 208, 0.55); box-shadow: 0 4px 18px rgba(15, 143, 208, 0.2); }
.nav-cta { padding: 9px 20px; font-size: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}
.chip-live {
  color: #0c7a4d;
  border-color: rgba(16, 160, 100, 0.35);
  box-shadow: 0 0 12px rgba(16, 160, 100, 0.15);
}
.chip-live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 8px;
  background: #12b673;
  box-shadow: 0 0 8px #12b673;
  animation: blink 1.6s ease infinite;
}

/* ---------- Layout ---------- */
main { position: relative; z-index: 2; }

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 110px clamp(18px, 6vw, 72px) 60px;
  position: relative;
}
.hero-inner { max-width: 660px; position: relative; }
.hero-inner::before {
  content: "";
  position: absolute;
  inset: -50px -80px;
  z-index: -1;
  background: radial-gradient(65% 60% at 42% 50%, rgba(238, 245, 251, 0.9), rgba(238, 245, 251, 0) 74%);
  filter: blur(6px);
  pointer-events: none;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.3em;
  color: var(--cyan);
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 10vw, 128px);
  line-height: 0.95;
  letter-spacing: 0.06em;
  background: linear-gradient(100deg, var(--deep) 15%, var(--blue) 45%, var(--cyan) 75%, #56aede 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 22px rgba(120, 180, 235, 0.55));
  animation: titleFlicker 9s linear infinite;
}
@keyframes titleFlicker {
  0%, 93%, 96.5%, 100% { opacity: 1; }
  94%, 96% { opacity: 0.75; filter: drop-shadow(2px 0 0 rgba(15, 143, 208, 0.7)) drop-shadow(-2px 0 0 rgba(28, 95, 208, 0.7)); }
}

.lead {
  margin-top: 22px;
  font-size: clamp(19px, 2.4vw, 25px);
  font-weight: 500;
  color: var(--ink-dim);
  max-width: 34ch;
}
.lead em {
  font-style: normal;
  color: var(--cyan);
  font-weight: 600;
}

/* boot log w/ CSS typing */
.boot {
  margin-top: 30px;
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink-dim);
}
.boot-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  max-width: 100%;
  animation: typing 1s steps(var(--n)) forwards;
  animation-delay: var(--d);
}
.boot-caret { border-right: 8px solid rgba(15, 143, 208, 0.75); }
@keyframes typing { to { width: calc(var(--n) * 1ch); } }

.cta-row { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 16px; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 26px; height: 44px;
  border: 1.5px solid rgba(28, 95, 208, 0.4);
  border-radius: 14px;
  display: block;
}
.scroll-hint span {
  position: absolute;
  left: 50%; top: 8px;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(15, 143, 208, 0.8);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot { 55% { transform: translateY(18px); opacity: 0.15; } 100% { transform: translateY(0); opacity: 1; } }

/* ---------- Sections ---------- */
.section {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(90px, 14vh, 150px) clamp(18px, 5vw, 48px);
}
.section-head { margin-bottom: 46px; }

.kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.34em;
  color: var(--cyan);
  margin-bottom: 14px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 30px; height: 1px;
  margin-right: 12px;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 50px);
  line-height: 1.12;
  letter-spacing: 0.04em;
  color: var(--deep);
  text-shadow: 0 2px 26px rgba(140, 190, 240, 0.5);
}

/* glass panels with HUD corner brackets */
.glass {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  box-shadow: 0 14px 44px rgba(48, 94, 160, 0.14);
}
.glass::before,
.glass::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  pointer-events: none;
  border: 2px solid rgba(15, 143, 208, 0.55);
}
.glass::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.glass::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }

.split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 26px;
  align-items: start;
}
.panel { padding: 34px 36px; font-size: 18.5px; color: var(--ink); }
.panel p + p { margin-top: 16px; }
.panel strong { color: var(--blue); font-weight: 600; }

.mono-note {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
}
.mono-note span { color: var(--cyan); }

.stats { display: grid; gap: 18px; }
.stat {
  padding: 22px 26px;
  display: grid;
  gap: 4px;
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 40px;
  background: linear-gradient(120deg, var(--deep), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  padding: 34px 30px;
  transition: transform 0.2s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.card:hover {
  border-color: rgba(15, 143, 208, 0.45);
  box-shadow: 0 22px 54px rgba(48, 94, 160, 0.22);
}
.card-icon {
  width: 58px; height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  color: #fff;
  background: linear-gradient(140deg, var(--blue), var(--cyan));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  box-shadow: 0 8px 20px rgba(28, 95, 208, 0.3);
}
.card-icon svg { width: 30px; height: 30px; }
.card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  color: var(--deep);
}
.card p { color: var(--ink-dim); font-size: 16.5px; }

/* product */
.product {
  display: flex;
  gap: 30px;
  padding: 38px 40px;
  align-items: flex-start;
  transition: transform 0.2s ease, border-color 0.35s ease;
  transform-style: preserve-3d;
}
.product:hover { border-color: rgba(15, 143, 208, 0.45); }
.product-badge {
  flex: 0 0 auto;
  width: 86px; height: 86px;
  display: grid;
  place-items: center;
  font-size: 40px;
  background: linear-gradient(140deg, var(--blue), var(--cyan));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  box-shadow: 0 10px 26px rgba(28, 95, 208, 0.35);
}
.product-title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.product h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--deep);
}
.product p { color: var(--ink); max-width: 62ch; }
.tag-row { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.product-more { margin-top: 26px; }

/* contact */
.section-contact { text-align: center; }
.section-contact .section-head { margin-bottom: 34px; }
.contact {
  max-width: 640px;
  margin: 0 auto;
  padding: 46px 40px;
  background: var(--glass-strong);
}
.contact-lead { color: var(--ink); font-size: 20px; }
.contact-mail {
  display: inline-block;
  margin: 18px 0 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 3.4vw, 30px);
  letter-spacing: 0.06em;
  text-decoration: none;
  background: linear-gradient(100deg, var(--deep), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  border-bottom: 1px solid rgba(15, 143, 208, 0.4);
  padding-bottom: 6px;
  transition: filter 0.3s;
}
.contact-mail:hover { filter: drop-shadow(0 4px 16px rgba(15, 143, 208, 0.5)); }
.contact-company { color: var(--ink-dim); font-size: 15.5px; letter-spacing: 0.06em; }
.contact-company strong { color: var(--deep); letter-spacing: 0.12em; }

/* footer */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 20px 46px;
  border-top: 1px solid rgba(28, 95, 208, 0.12);
  background: linear-gradient(180deg, rgba(238, 245, 251, 0), rgba(224, 236, 247, 0.9));
  color: var(--ink-dim);
  font-size: 15.5px;
}
.footer em { color: var(--blue); }
.footer-sub {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  color: rgba(81, 103, 138, 0.65);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 16px 14px; }
  .stat-num { font-size: 28px; }
  .stat-label { font-size: 12px; }
}
@media (max-width: 768px) {
  body { font-size: 16.5px; }
  .nav-links { display: none; }
  .hero { align-items: flex-end; padding-bottom: 96px; }
  .hero-inner {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.7) 26%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: 16px;
    padding: 22px 18px;
    margin: 0 -6px;
  }
  .stats { grid-template-columns: 1fr; }
  .product { flex-direction: column; padding: 28px 22px; }
  .panel { padding: 26px 22px; }
  .boot { font-size: 12px; }
  .scroll-hint { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-title { animation: none; }
  .boot-line { width: calc(var(--n) * 1ch); animation: none; }
  .loader-hex, .loader-label, .scroll-hint span, .chip-live::before { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .product { transition: none; }
}
