/* AutoSimiX website. One stylesheet, no framework.
   Colors: the app's brand blue (#0209B9) and its six channel colors. */

:root {
  --brand: #0209b9;
  --brand-bright: #2f5bff;
  --ink: #0b0d14;
  --ink-soft: #4b5163;
  --paper: #f4f5f7;
  --night: #05060f;
  --night-2: #0b0e19;
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-light: rgba(11, 13, 20, 0.1);
  --ok: #4ade80;
  --warn: #fb923c;
  --radius: 18px;
  --nav-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--night);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: #fff; color: var(--ink); }
.btn-primary:hover { background: #e7eaf3; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.22); }
.btn-small { min-width: 0; padding: 8px 16px; font-size: 13px; }
.btn-large { min-width: 280px; padding: 15px 32px; font-size: 15px; }

/* ------------------------------------------------------------ Header */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(16px, 4vw, 40px);
  color: #fff;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(5, 6, 15, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line-dark);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin: 0 auto;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.12); }
.nav-cta { background: rgba(255, 255, 255, 0.14); color: #fff; }
.nav-cta:hover { background: rgba(255, 255, 255, 0.26); }
.menu-btn {
  display: none;
  margin-left: auto;
  padding: 7px 14px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: 600 14px var(--font);
  cursor: pointer;
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 80px 24px 32px;
  background: rgba(5, 6, 15, 0.97);
  color: #fff;
}
.menu[hidden] { display: none; }
.menu a {
  padding: 14px 12px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
}
.menu a:hover { background: rgba(255, 255, 255, 0.08); }
.menu .btn { margin-top: auto; min-width: 0; background: #fff; color: var(--ink); }
.menu-close {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 7px 14px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: 600 14px var(--font);
  cursor: pointer;
}

/* ------------------------------------------------------------ Sections */
section { position: relative; }

.dark { background: var(--night); color: #fff; }
.light { background: var(--paper); color: var(--ink); }
.light.alt { background: #fff; }
.blue {
  background: radial-gradient(120% 90% at 50% 0%, #1a2bff 0%, var(--brand) 45%, #01045c 100%);
  color: #fff;
}

.panel {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vh, 56px);
  padding: calc(var(--nav-h) + 40px) clamp(16px, 5vw, 64px) 72px;
  overflow: hidden;
}

.panel-head {
  max-width: 760px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.6;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }

h1 {
  font-size: clamp(56px, 11vw, 132px);
  font-weight: 600;
  line-height: 0.95;
}

h2 {
  font-size: clamp(34px, 5.6vw, 64px);
  font-weight: 600;
  line-height: 1.05;
}

h3 { font-size: 19px; font-weight: 600; }

.lead {
  margin: 18px 0 0;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 300;
  opacity: 0.85;
}

.sub {
  margin: 18px auto 0;
  max-width: 640px;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 400;
  opacity: 0.75;
}

/* ------------------------------------------------------------ Hero */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  align-items: center;
  padding: calc(var(--nav-h) + 24px) 16px 40px;
  overflow: hidden;
  text-align: center;
}
.hero-text { align-self: end; position: relative; z-index: 2; }
.hero-actions {
  align-self: start;
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

.hero-glow {
  position: absolute;
  inset: auto -20% -35% -20%;
  height: 90%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(47, 91, 255, 0.55), rgba(2, 9, 185, 0.18) 45%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  animation: breathe 7s ease-in-out infinite;
}
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 60% at 50% 55%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 55%, #000 30%, transparent 75%);
  pointer-events: none;
}

.device-art {
  position: relative;
  z-index: 1;
  width: min(680px, 92vw);
  margin: clamp(16px, 4vh, 40px) 0;
}
.device-svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.6)); }
.device-svg text { font-family: var(--font); }
.sockets text { fill: rgba(255, 255, 255, 0.7); font-size: 15px; font-weight: 600; }
.led-glow { animation: led 2.4s ease-in-out infinite; }

.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-right: 2px solid rgba(255, 255, 255, 0.6);
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  transform: rotate(45deg);
  animation: bob 2.2s ease-in-out infinite;
  z-index: 2;
}

/* A photo, once it exists, covers its slot (see js/main.js). */
.photo-slot {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  opacity: 0;
  transition: opacity 0.8s;
}
.photo-slot.loaded { opacity: 1; }
.hero-photo.loaded::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 6, 15, 0.55) 0%, rgba(5, 6, 15, 0.1) 40%, rgba(5, 6, 15, 0.6) 100%);
}
.hero.has-photo .device-art,
.hero.has-photo .hero-glow,
.hero.has-photo .grid-lines { display: none; }

/* ------------------------------------------------------------ Read */
.scope {
  position: relative;
  width: min(1100px, 100%);
  aspect-ratio: 16 / 8;
  border-radius: var(--radius);
  background: #020617;
  border: 1px solid var(--line-dark);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(47, 91, 255, 0.08);
  overflow: hidden;
}
.scope canvas { width: 100%; height: 100%; display: block; }
.scope-legend {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
}
.scope-legend span { color: var(--c); }
.scope-legend span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
  vertical-align: 1px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(28px, 8vw, 96px);
  text-align: center;
}
.stats strong {
  display: block;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.stats span { font-size: 14px; opacity: 0.6; }

/* ------------------------------------------------------------ Guide */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 8px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 23px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: var(--line-light);
}
.steps::after {
  content: "";
  position: absolute;
  top: 23px;
  left: 5%;
  height: 2px;
  width: calc(90% * var(--progress, 0));
  background: var(--brand-bright);
  transition: width 0.15s linear;
}
.steps li {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}
.steps b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line-light);
  color: var(--ink-soft);
  font-size: 17px;
  transition: background 0.35s, color 0.35s, border-color 0.35s, transform 0.35s;
}
.steps li.on b {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  transform: scale(1.06);
}
.steps li:last-child.on b { background: #16a34a; border-color: #16a34a; }
.steps small { font-weight: 400; color: var(--ink-soft); }

.cards {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.card {
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 0 var(--line-light), 0 12px 32px rgba(11, 13, 20, 0.06);
}
.card p { margin: 10px 0 0; color: var(--ink-soft); font-size: 15px; }
.card h3::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: var(--brand-bright);
}

/* ------------------------------------------------------------ Reference */
.ranges {
  width: min(820px, 100%);
  display: grid;
  gap: 18px;
  padding: clamp(20px, 4vw, 36px);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.range {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.range .label { opacity: 0.8; }
.bar {
  position: relative;
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}
.bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--lo);
  width: calc(var(--hi) - var(--lo));
  border-radius: 6px;
  background: rgba(74, 222, 128, 0.45);
}
.bar em {
  position: absolute;
  top: 50%;
  left: 0;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
  transition: left 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ranges.visible .bar em { left: var(--v); }
.bar em.warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.3), 0 0 18px var(--warn); }
.val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.val.ok { color: #fff; }
.val.warn { color: var(--warn); }
.note { margin: 0; opacity: 0.7; font-size: 15px; text-align: center; }

/* ------------------------------------------------------------ Emulate */
.wave {
  width: min(1100px, 100%);
  aspect-ratio: 16 / 6;
}
.wave canvas { width: 100%; height: 100%; display: block; }
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.chips span {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.05);
  font-size: 14px;
  font-weight: 600;
}

/* ------------------------------------------------------------ App */
.phones {
  width: min(1200px, 100%);
  display: flex;
  justify-content: safe center;
  gap: clamp(16px, 3vw, 32px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* room for the phones' shadows, which the scroll area would clip */
  padding: 12px 24px 40px;
  scrollbar-width: thin;
}
.phones figure {
  flex: 0 0 auto;
  /* five fit side by side on a desktop; fewer, and a sideways scroll, on
     smaller screens */
  width: clamp(190px, 15vw, 210px);
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}
.phone {
  padding: 10px;
  border-radius: 36px;
  background: #0b0d14;
  box-shadow: 0 14px 26px rgba(11, 13, 20, 0.18), inset 0 0 0 2px #2a2f3f;
}
.phone img { border-radius: 27px; width: 100%; height: auto; }
.phones figcaption { margin-top: 14px; font-size: 15px; font-weight: 600; }

/* ------------------------------------------------------------ Audience */
.duo {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.tile {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
}
.tile-pro { background: linear-gradient(160deg, #1b2b8f, var(--brand) 55%, #01045c); }
.tile-fan { background: linear-gradient(160deg, #0b0e19, #1d2440 55%, #0b0e19); }
.tile .photo-slot.loaded::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(5, 6, 15, 0.8));
}
.tile-text { position: relative; z-index: 1; padding: 32px; max-width: 460px; }
.tile-text h3 { font-size: clamp(24px, 3vw, 32px); }
.tile-text p { margin: 10px 0 0; opacity: 0.8; font-size: 16px; }

/* ------------------------------------------------------------ Specs */
.specs-photo {
  position: relative;
  width: min(900px, 100%);
  aspect-ratio: 16 / 7;
  border-radius: var(--radius);
  display: none;
}
.specs-photo.loaded { display: block; }
.specs {
  width: min(1000px, 100%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
  column-gap: 48px;
}
.specs div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-dark);
}
.specs dt { opacity: 0.55; font-size: 14px; }
.specs dd { margin: 0; font-size: 15px; font-weight: 500; }

/* ------------------------------------------------------------ Final call */
.cta {
  min-height: 90svh;
  display: grid;
  place-items: center;
  padding: 96px 16px;
  overflow: hidden;
  text-align: center;
}
.cta-inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 18px; }
.cta-inner h2 { font-size: clamp(38px, 6.4vw, 76px); }
.cta-inner .sub { margin-top: 0; }
.fine { margin: 4px 0 0; font-size: 13px; opacity: 0.6; }

/* ------------------------------------------------------------ Footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 28px 16px;
  background: var(--night);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }

/* ------------------------------------------------------------ Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@keyframes breathe {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes led {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(45deg); opacity: 0.6; }
  50% { transform: translateY(8px) rotate(45deg); opacity: 1; }
}

/* ------------------------------------------------------------ Smaller screens */
@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: block; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .specs { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .tile { min-height: 320px; }
}

@media (max-width: 640px) {
  .btn { min-width: 0; width: 100%; }
  .hero-actions { width: min(360px, 100%); }
  .scope { aspect-ratio: 4 / 5; }
  .scope-legend { left: 14px; right: auto; flex-wrap: wrap; gap: 8px; }
  .steps {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 22px;
  }
  .steps::before, .steps::after { display: none; }
  .cards { grid-template-columns: 1fr; }
  .range { grid-template-columns: 1fr 64px; }
  .range .label { grid-column: 1 / -1; }
  .wave { aspect-ratio: 4 / 3; }
  .specs div { grid-template-columns: 110px 1fr; }
  .btn-large { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-glow, .led-glow, .scroll-cue { animation: none; }
  .bar em { transition: none; }
}
