/* =============================================================
   Pitvolt - Atmospheric & Component Layer
   Sits on top of colors_and_type.css. All colors via tokens.
   ============================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(120% 80% at 18% 0%, rgba(255,230,0,0.06) 0%, transparent 55%),
    radial-gradient(90% 60% at 100% 100%, rgba(212,118,58,0.05) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-primary-warm) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- Subtle film-grain noise (SVG, ~4% opacity) --------- */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.65 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Atmospheric orbs ---------- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(var(--blur-orb-mobile));
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
@media (min-width: 1024px) {
  .orb { filter: blur(var(--blur-orb-desktop)); }
}
.orb--yellow { background: var(--orb-yellow); }
.orb--terracotta { background: var(--orb-terracotta); }

@media (prefers-reduced-motion: no-preference) {
  .orb--drift { animation: orb-drift var(--dur-orb-drift) ease-in-out infinite alternate; }
  @keyframes orb-drift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(40px, -30px, 0); }
  }
}

/* On mobile, hide all but the first orb */
@media (max-width: 767px) {
  .orb:nth-of-type(n + 2) { display: none; }
}

/* ---------- Glass-morphism panel ---------- */
.glass {
  background: var(--glass-fill);
  backdrop-filter: blur(var(--blur-glass-mobile)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--blur-glass-mobile)) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-glass);
}
@media (min-width: 1024px) {
  .glass {
    backdrop-filter: blur(var(--blur-glass-desktop)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--blur-glass-desktop)) saturate(1.2);
  }
}
.glass--bright { background: var(--glass-fill-bright); }

/* Panel on off-white */
.elevated-panel {
  background: var(--bg-elevated);
  color: var(--text-on-elevated);
  border-radius: var(--r-xl);
  position: relative;
}

/* ---------- Container & rhythm ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--gutter-mobile);
  position: relative;
  z-index: 2;
}
@media (min-width: 1024px) {
  .container { padding-inline: var(--gutter-desktop); }
}
.section {
  padding-block: var(--section-y-mobile);
  position: relative;
}
@media (min-width: 1024px) {
  .section { padding-block: var(--section-y-desktop); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;          /* spec: ≥44px touch */
  padding: 0 22px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-hover) var(--ease-out),
              background var(--dur-hover) var(--ease-out),
              color var(--dur-hover) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out),
              box-shadow var(--dur-hover) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent-primary);
  color: var(--text-on-elevated);
  box-shadow: var(--shadow-button-yellow);
}
.btn--primary:hover { background: #fff04a; }

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--glass-border);
}
.btn--ghost:hover { border-color: rgba(248,245,238,0.32); background: var(--glass-fill); }

.btn--on-elevated {
  background: var(--text-on-elevated);
  color: var(--bg-elevated);
}
.btn--on-elevated:hover { background: #1a1a1a; }

/* Inline link (text CTA) */
.link-arrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-body);
  color: var(--text-primary);
  border-bottom: 1px solid rgba(248,245,238,0.25);
  padding-bottom: 2px;
  transition: color var(--dur-hover) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out);
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}
.link-arrow:hover { color: var(--accent-primary); border-color: var(--accent-primary); }
.link-arrow--on-elevated { color: var(--text-on-elevated); border-color: rgba(10,10,10,0.25); }
.link-arrow--on-elevated:hover { color: var(--accent-secondary); border-color: var(--accent-secondary); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: 18px 0;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav__link {
  font-size: 0.9375rem;
  color: var(--text-muted);
  min-height: 44px;
  display: inline-flex; align-items: center;
  transition: color var(--dur-hover) var(--ease-out);
}
.nav__link:hover { color: var(--text-primary); }
@media (max-width: 540px) {
  .nav__link--secondary { display: none; } /* keep "Host a charger" CTA at minimum */
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: 64px 32px;
  margin-top: 80px;
  position: relative; z-index: 2;
}
.site-footer__grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 56px; }
}
.site-footer__col h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--tr-eyebrow);
  color: var(--text-muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer__col a {
  color: var(--text-primary);
  font-size: 0.9375rem;
  display: inline-block;
  min-height: 28px;
}
.site-footer__col a:hover { color: var(--accent-primary); }
.site-footer__bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--text-muted);
}

/* ---------- Eyebrow tag ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--tr-eyebrow);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(248,245,238,0.02);
}
.tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-primary);
}
.tag--terracotta::before { background: var(--accent-secondary); box-shadow: 0 0 12px var(--accent-secondary); }
.tag--on-elevated {
  color: var(--text-on-elevated);
  border-color: rgba(10,10,10,0.16);
  background: rgba(10,10,10,0.04);
}

/* ---------- Number / metric block ---------- */
.metric { display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--font-mono); }
.metric__num { font-size: 2rem; color: var(--text-primary); font-weight: 600; letter-spacing: -0.02em; }
.metric__unit { font-size: 0.875rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; }

/* ---------- Image slot (CLS=0) ---------- */
.imgslot {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  border: 1px dashed rgba(10,10,10,0.18);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(10,10,10,0.025) 0 1px,
      transparent 1px 14px
    ),
    rgba(10,10,10,0.03);
  display: flex; align-items: center; justify-content: center;
  color: rgba(10,10,10,0.4);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.imgslot--on-dark {
  border-color: var(--border-subtle);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(248,245,238,0.03) 0 1px,
      transparent 1px 14px
    ),
    rgba(248,245,238,0.02);
  color: var(--text-muted);
}

/* ---------- Asymmetric grid utilities ---------- */
.split { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; gap: 40px; } }
.split--asym { grid-template-columns: 1fr; }
@media (min-width: 1024px) { .split--asym { grid-template-columns: 5fr 7fr; gap: 80px; } }

/* ---------- Section divider rule ---------- */
.rule { height: 1px; background: var(--border-subtle); border: 0; margin: 0; }

/* ---------- Mailto pre-pop block ---------- */
.mailtoblock {
  display: grid; gap: 20px;
}
.mailtoblock ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-primary);
}
.mailtoblock ul li::before {
  content: "-";
  color: var(--accent-primary);
  margin-right: 12px;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0; }
.faq details {
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--border-subtle); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex; justify-content: space-between; gap: 24px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  min-height: 44px;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  transition: transform var(--dur-hover) var(--ease-out);
}
.faq details[open] summary::after { content: "−"; }
.faq__answer { color: var(--text-muted); margin: 12px 0 0; max-width: 60ch; }

/* ---------- Timeline (numbered, /hosts §4.5 + roadmap) ---------- */
.timeline { display: grid; gap: 0; counter-reset: ti; }
.timeline > li {
  list-style: none;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--border-subtle);
  align-items: baseline;
}
.timeline > li:last-child { border-bottom: 1px solid var(--border-subtle); }
.timeline__when {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--accent-primary);
  letter-spacing: 0.02em;
}
.timeline__what { font-size: var(--fs-body); color: var(--text-primary); }
.timeline__what em {
  font-style: normal; font-weight: 600; display: block; margin-bottom: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
