/* ─────────────────────────────────────────────
   IONIQ Telemetry — Design System
   ───────────────────────────────────────────── */

:root {
  --bg: #070A12;
  --bg-alt: #0B0F1A;
  --surface: #111827;
  --surface-hover: #1A2332;
  --line: rgba(148, 163, 184, 0.12);
  --line-strong: rgba(148, 163, 184, 0.22);

  --cyan: #22D3EE;
  --blue: #3B82F6;
  --green: #34D399;
  --amber: #FBBF24;

  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.15);

  --nav-h: 72px;
  --max-w: 1200px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Navigation ── */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(7, 10, 18, 0.85);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
}
.nav-wordmark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-wordmark em {
  font-style: normal;
  color: var(--cyan);
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--cyan); }
.nav-link--active { color: var(--cyan); font-weight: 600; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--cyan);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.4);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--bg);
  background: var(--cyan);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 211, 238, 0.4);
}
.btn-primary--large {
  padding: 1rem 2rem;
  font-size: 1rem;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.btn-ghost:hover {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  transform: translateY(-2px);
}

/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 5rem;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero-title-accent {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.hero-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.hero-stat {
  display: flex;
  flex-direction: column;
}
.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -0.02em;
}
.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--text-dim);
  font-weight: 500;
}
.hero-visual-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow), var(--shadow-glow);
}
.hero-visual-frame img {
  display: block;
  width: 100%;
  /* the feature graphic's native 1024x500 — cropping it to 4/3 cut the gauge */
  aspect-ratio: 1024/500;
  object-fit: cover;
}

/* ── Marquee ── */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 1.25rem 0;
  background: var(--bg-alt);
}
.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ── Sections ── */
.section { padding: 6rem 0; }
.section--alt { background: var(--bg-alt); }
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-head {
  max-width: 640px;
  margin-bottom: 3.5rem;
}
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.section-lede {
  font-size: 1.0625rem;
  color: var(--text-muted);
}

/* ── Copilot Grid ── */
.copilot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.copilot-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.copilot-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-glow);
}
.copilot-card--wide {
  grid-column: span 2;
}
.copilot-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border-radius: 12px;
  margin-bottom: 1rem;
}
.copilot-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.copilot-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ── Telemetry Grid ── */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.telemetry-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.2s, border-color 0.2s;
}
.telemetry-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}
.telemetry-number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.telemetry-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.telemetry-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ── Android Auto Panel ── */
.auto-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(34, 211, 238, 0.06));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 3rem;
}
.auto-copy .section-tag { margin-bottom: 1rem; }
.auto-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1.5rem;
}
.auto-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--text);
}
.auto-list li svg {
  color: var(--green);
  flex-shrink: 0;
}
/* Recreation of the app's real Android Auto GridTemplate. Not a photo of a car
   screen — the surrounding chrome is drawn by the host and varies by head unit. */
.aa-frame {
  background: #202124;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.aa-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #E8EAED;
}
.aa-bar-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.aa-bar-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  flex-shrink: 0;
}
.aa-bar-action {
  color: #8AB4F8;
  white-space: nowrap;
}
.aa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.aa-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
  padding: 1rem 0.5rem;
  background: #2A2D30;
  border-radius: 10px;
}
.aa-ico { margin-bottom: 0.25rem; }
.aa-ico--green { color: #34D399; }
.aa-ico--blue  { color: #8AB4F8; }
.aa-ico--red   { color: #F28B82; }
.aa-value {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: #E8EAED;
  line-height: 1.1;
}
.aa-label {
  font-size: 0.6875rem;
  color: #9AA0A6;
  line-height: 1.3;
}
.aa-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-dim);
}

/* ── Screens Grid ── */
.screens-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.screen-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.screen-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-glow);
}
.screen-card img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  object-position: top;
}
.screen-card figcaption {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.screen-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
}
.screen-desc {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* ── CTA ── */
.cta-section {
  padding: 6rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(34, 211, 238, 0.04) 100%);
}
.cta-inner {
  max-width: 560px;
  margin: 0 auto;
}
.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.cta-inner p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--bg-alt);
}
.footer-inner p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.footer-inner a {
  color: var(--cyan);
  transition: opacity 0.2s;
}
.footer-inner a:hover { opacity: 0.8; }
.footer-sub {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* ── Privacy ── */
.privacy-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.privacy-updated {
  color: var(--text-dim);
  font-size: 0.9375rem;
  margin-top: 0.25rem;
}
.privacy-container {
  max-width: 800px;
  margin: 4rem auto 6rem;
  padding: 0 1.5rem;
}
.privacy-container h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.privacy-container h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--cyan);
}
.privacy-container h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}
.privacy-container p,
.privacy-container ul {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1rem;
}
.privacy-container ul { padding-left: 1.5rem; list-style: disc; }
.privacy-container li { margin-bottom: 0.375rem; }
.privacy-container code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.875em;
  background: var(--surface);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  /* iOS permission keys are long single tokens
     (NSLocationAlwaysAndWhenInUseUsageDescription) and put the page into
     horizontal scroll on a phone unless they are allowed to break. */
  overflow-wrap: anywhere;
}
.privacy-container a {
  color: var(--cyan);
  transition: opacity 0.2s;
}
.privacy-container a:hover { opacity: 0.8; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .copilot-grid { grid-template-columns: repeat(2, 1fr); }
  .copilot-card--wide { grid-column: span 2; }
  .telemetry-grid { grid-template-columns: repeat(2, 1fr); }
  .screens-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .hero { padding: 4rem 0 3rem; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-desc { max-width: none; }
  .hero-stats { gap: 1.5rem; }
  .auto-panel {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
  .copilot-grid,
  .telemetry-grid,
  .screens-grid {
    grid-template-columns: 1fr;
  }
  .copilot-card--wide { grid-column: span 1; }
  .section { padding: 4rem 0; }
}

/* ─────────────────────────────────────────────
   Platform switch — Android / iPhone
   The page ships both platforms' copy and hides
   one set. These rules live last on purpose: they
   must win specificity ties against the component
   rules that set display on the same elements.
   ───────────────────────────────────────────── */

html[data-platform="android"] .p-ios,
html[data-platform="ios"] .p-android { display: none; }

.platform-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: rgba(148, 163, 184, 0.06);
}

.platform-btn {
  padding: 6px 14px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.platform-btn:hover { color: var(--text); }

.platform-btn--on {
  background: var(--surface-hover);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Not-yet-shipping stand-ins for the store links. Deliberately not anchors —
   there is nothing to link to until the App Store listing goes live. */
.nav-cta--soon,
.btn-primary--soon {
  cursor: default;
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--line-strong);
  box-shadow: none;
}

.btn-primary--soon:hover,
.nav-cta--soon:hover { transform: none; box-shadow: none; }

/* ── CarPlay mock ── */
.cp-list {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}

.cp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.cp-row:last-child { border-bottom: 0; }

.cp-key {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.cp-val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.cp-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.05);
}

.cp-tab {
  padding: 12px 4px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
}

.cp-tab--on { color: var(--cyan); }

/* The nav collapses at 768px but the switch must survive it — it sits outside
   .nav-menu in the markup, and shrinks rather than disappearing. */
@media (max-width: 768px) {
  .platform-switch { margin-left: auto; }
  .platform-btn { padding: 5px 11px; font-size: 0.78rem; }
  .cp-row { padding: 11px 14px; }
}
