/*
 * iFusion Volt — "Dark Precision" Design System
 * Apple Pro meets Tesla Energy. Cinematic darkness, typographic authority.
 * Shared across all pages of the multi-page site.
 */

/* ─────────────────────────── Tokens ─────────────────────────── */
:root {
  --black: #080808;
  --dark: #111111;
  --dark-2: #1a1a1a;
  --blue: #0A84FF;
  --blue-bright: #1a8fff;
  --blue-soft: #5AC8FA;
  --white: #ffffff;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.55);
  --dimmed: rgba(255, 255, 255, 0.56);
  --faint: rgba(255, 255, 255, 0.52);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --green: #30D158;
  --red: #FF453A;
  --amber: #FFD60A;

  --nav-h: 56px;
  --max: 1440px;
  --radius-s: 0.75rem;
  --radius-m: 1.25rem;
  --radius-l: 1.5rem;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background-color: var(--black);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background-color: rgba(10, 132, 255, 0.32); color: #fff; }

/* ─────────────────────────── Accessibility ─────────────────────────── */
/* Visible keyboard focus on all interactive elements */
:focus-visible {
  outline: 2px solid var(--blue-soft);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible, .nav-burger:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Skip-to-content link (visible only when focused) */
.skip-link {
  position: absolute; left: 8px; top: -56px; z-index: 1000;
  background: var(--blue); color: #fff;
  padding: 0.6rem 1rem; border-radius: 0.5rem;
  font-size: 0.875rem; font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 8px; outline: 2px solid #fff; outline-offset: 2px; }

/* Anchor target offset so #main clears the fixed nav */
main { scroll-margin-top: var(--nav-h); }

/* Screen-reader-only utility */
.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;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─────────────────────────── Layout ─────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
@media (min-width: 640px) { .container { padding-inline: 2rem; } }
@media (min-width: 1024px) { .container { padding-inline: 3rem; } }

.narrow { max-width: 880px; margin-inline: auto; }
.section { padding: 6rem 0; position: relative; }
.section-lg { padding: 8rem 0; position: relative; }
.bg-dark { background-color: var(--dark); }
.bg-black { background-color: var(--black); }
.text-center { text-align: center; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); border: 0; margin: 0; }

@media (max-width: 640px) {
  .section { padding: 4rem 0; }
  .section-lg { padding: 5rem 0; }
}

/* ─────────────────────────── Typography ─────────────────────────── */
.headline {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--white);
  margin: 0;
  text-wrap: balance;
}
.subhead {
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  text-wrap: pretty;
}
.blue { color: var(--blue); }
.eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
  margin: 0 0 1rem;
}
.h1 { font-size: clamp(2.75rem, 7vw, 5.5rem); }
.h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
.h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--muted);
  line-height: 1.7;
  text-wrap: pretty;
}
.gradient-text {
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.65) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─────────────────────────── Buttons ─────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.8rem 1.75rem;
  border-radius: 980px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-lg { font-size: 1rem; padding: 1rem 2.25rem; }
.btn-primary { background-color: #0a6fe0; color: #fff; }
.btn-primary:hover { background-color: var(--blue-bright); transform: translateY(-1px); box-shadow: 0 10px 30px rgba(10,132,255,0.35); }
.btn-outline { background: transparent; color: var(--blue); border-color: rgba(10,132,255,0.5); }
.btn-outline:hover { border-color: var(--blue); background-color: rgba(10,132,255,0.1); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.06); color: #fff; border-color: var(--border-strong); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }

/* ─────────────────────────── Pills / chips ─────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(10,132,255,0.12);
  border: 1px solid rgba(10,132,255,0.3);
  border-radius: 980px;
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
  color: var(--blue);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pill-green { background: rgba(48,209,88,0.1); border-color: rgba(48,209,88,0.25); color: var(--green); }

/* ─────────────────────────── Cards ─────────────────────────── */
.card {
  background-color: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.card-pad { padding: 1.75rem; }
.card-hover:hover { border-color: rgba(10,132,255,0.3); transform: translateY(-4px); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }

.icon-box {
  width: 3rem; height: 3rem;
  border-radius: 0.875rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-box.blue-tint { background: rgba(10,132,255,0.08); border-color: rgba(10,132,255,0.2); }
.icon-box svg { width: 20px; height: 20px; stroke: rgba(255,255,255,0.85); }

/* ─────────────────────────── Grids ─────────────────────────── */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: 1fr; gap: 2rem; }
.grid-3 { grid-template-columns: 1fr; }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 4rem; } }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.items-center { align-items: center; }

/* Stats */
.stat-number {
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
}
.stat-number .unit { color: var(--blue); font-weight: 400; font-size: 0.5em; }
.stat-label {
  font-size: 0.75rem; color: var(--dimmed); margin: 0.5rem 0 0;
  letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500;
}

/* ─────────────────────────── Navigation ─────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background-color: rgba(8,8,8,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled { background-color: rgba(8,8,8,0.95); border-bottom-color: rgba(255,255,255,0.1); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.nav-logo { display: flex; align-items: center; height: 44px; }
.nav-logo img { height: 44px; width: auto; object-fit: contain; }
.nav-links { display: none; align-items: center; gap: 1.75rem; }
.nav-links a {
  font-size: 0.875rem; color: rgba(255,255,255,0.7);
  transition: color 0.2s ease; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-cta { display: none; padding: 0.45rem 1.25rem; font-size: 0.875rem; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
}
.nav-burger {
  display: flex; flex-direction: column; gap: 5px;
  background: transparent; border: 0; padding: 8px;
}
.nav-burger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 900px) { .nav-burger { display: none; } }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99;
  background-color: rgba(8,8,8,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-size: 1.5rem; font-weight: 500; color: rgba(255,255,255,0.85);
  padding: 0.9rem 0; border-bottom: 1px solid var(--border);
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--blue); }
.mobile-menu .btn { margin-top: 1.5rem; }
@media (min-width: 900px) { .mobile-menu { display: none; } }

/* ─────────────────────────── Page hero (interior) ─────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 5rem) 0 4rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.page-hero .eyebrow { margin-bottom: 1.25rem; }

/* ─────────────────────────── Spec table ─────────────────────────── */
.spec-table {
  background-color: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.spec-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  padding: 0.95rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.spec-row:last-child { border-bottom: none; }
.spec-row:nth-child(even) { background-color: rgba(255,255,255,0.015); }
.spec-row .k { font-size: 0.9375rem; color: var(--dimmed); }
.spec-row .v { font-size: 0.9375rem; color: #fff; font-weight: 500; }

/* ─────────────────────────── Segmented switcher (calculator multiplier) ─────────────────────────── */
.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
}
.seg-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  height: calc(100% - 8px);
  border-radius: 980px;
  background: linear-gradient(180deg, var(--blue-bright), var(--blue));
  box-shadow: 0 6px 20px rgba(10, 132, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateX(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.seg-option {
  position: relative;
  z-index: 1;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.6rem 0;
  border-radius: 980px;
  transition: color 0.25s ease;
}
.seg-option.is-active { color: #fff; }
.seg-option:not(.is-active):hover { color: rgba(255, 255, 255, 0.85); }
@media (prefers-reduced-motion: reduce) { .seg-thumb { transition: none; } }

/* ─────────────────────────── Forms ─────────────────────────── */
.field { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.field label { font-size: 0.8125rem; color: var(--muted); font-weight: 500; letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
  width: 100%;
  background-color: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--blue);
  background-color: rgba(10,132,255,0.06);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%238e8e93' stroke-width='1.5' d='M1 1.5L6 6.5L11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0 1.25rem; }
@media (min-width: 600px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: 0.8125rem; color: var(--dimmed); margin-top: 0.5rem; }
.form-success {
  display: none;
  background: rgba(48,209,88,0.1); border: 1px solid rgba(48,209,88,0.3);
  border-radius: var(--radius-s); padding: 1.25rem 1.5rem; color: #fff;
  font-size: 0.9375rem;
}
.form-success.show { display: block; }
.form-error {
  display: none;
  background: rgba(255, 69, 58, 0.1); border: 1px solid rgba(255, 69, 58, 0.3);
  border-radius: var(--radius-s); padding: 0.85rem 1.1rem; color: #fff;
  font-size: 0.875rem; margin-top: 1rem;
}
.form-error.show { display: block; }

/* ─────────────────────────── Prose (legal pages) ─────────────────────────── */
.prose { max-width: 780px; margin-inline: auto; color: var(--muted); }
.prose h2 { color: #fff; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin: 2.75rem 0 0.75rem; }
.prose h3 { color: #fff; font-size: 1.0625rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }
.prose p { line-height: 1.75; margin: 0 0 1rem; font-size: 0.9688rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.prose li { line-height: 1.75; margin-bottom: 0.5rem; font-size: 0.9688rem; }
.prose strong { color: rgba(255,255,255,0.9); font-weight: 600; }
.prose a { color: var(--blue); }
.prose a:hover { text-decoration: underline; }
.prose .updated { font-size: 0.8125rem; color: var(--dimmed); margin-bottom: 2rem; }

/* ─────────────────────────── Footer ─────────────────────────── */
.footer { background-color: var(--black); border-top: 1px solid var(--border); padding: 4rem 0 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; } }
.footer-brand img { height: 44px; width: auto; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.875rem; color: var(--dimmed); line-height: 1.7; max-width: 280px; margin: 0 0 1rem; }
.footer-brand .email { font-size: 0.8125rem; color: var(--muted); }
.footer-col h3 { font-size: 0.8125rem; font-weight: 600; color: #fff; margin: 0 0 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a { font-size: 0.875rem; color: var(--dimmed); transition: color 0.2s ease; }
.footer-col a:hover { color: rgba(255,255,255,0.8); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.75rem;
}
.footer-bottom p, .footer-bottom a { font-size: 0.8125rem; color: var(--faint); margin: 0; }
.footer-legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-legal a:hover { color: var(--muted); }

/* ─────────────────────────── Scroll reveal ─────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-fade { opacity: 0; transition: opacity 0.8s ease; }
.reveal-fade.visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-fade { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* glow helper */
.glow-wrap { position: relative; }
.glow-wrap::before {
  content: ""; position: absolute; inset: -15%;
  background: radial-gradient(circle, rgba(10,132,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.blue-line { height: 2px; background: linear-gradient(90deg, transparent, var(--blue), transparent); opacity: 0.6; }
