/* 3pSpeed website. Same family as 3pNorth, 3pLevel, 3pMaster and 3pRally (Space Grotesk headings,
   system body, dark page, the app's own screens do the explaining), with its own colour: Midnight. */
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-latin-wght.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #07090f;          /* page, near black with a hint of midnight */
  --bg-alt: #0c1120;      /* alternate bands */
  --mid-top: #22356b;     /* Midnight, as the icon */
  --mid-bot: #121e42;
  --ink: #ffffff;
  --muted: #a3acc0;
  --faint: #6b7590;
  --line: #1c2540;
  --card: #0f1628;
  --accent: #8fb0ff;      /* Midnight's light tint, as the app's accent on dark */
  --red: #ff4a3f;
  --amber: #ffb020;
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: "Space Grotesk", -apple-system, system-ui, sans-serif; letter-spacing: -0.02em; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
h1 em, h2 em { font-style: normal; color: var(--muted); }
p { margin: 0; }
.eyebrow { font: 600 0.8rem/1 -apple-system, system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.note { color: var(--muted); font-size: 0.95rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36ch; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 16px; }
.top img { height: 36px; width: auto; }
.top nav { display: flex; gap: 22px; font-size: 0.95rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .hide-s { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: #0b0f1a;
  padding: 14px 22px; border-radius: 14px; text-decoration: none; font-weight: 600;
}
.btn[aria-disabled="true"] { opacity: 0.9; cursor: default; }
.cta { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 32px; }

/* hero: the Midnight band with the live gauge */
.band { background: linear-gradient(180deg, var(--mid-top), var(--mid-bot)); }
.hero { display: grid; gap: 40px; align-items: center; padding: 48px 0 72px; }
@media (min-width: 900px) { .hero { grid-template-columns: 0.85fr 1.15fr; padding: 64px 0 88px; } }
.hero .lead { margin-top: 22px; color: #c9d3ec; }
.hero h1 em { color: #8fb0ff; }

.gauge-card { display: flex; flex-direction: column; align-items: center; gap: 22px; }
/* hero devices: the live gauge runs inside the iPad; the iPhone in front shows another face */
.devices { position: relative; width: 100%; padding: 0 12% 9% 0; }
.ipad-live { border: 10px solid #101114; border-radius: 30px; box-shadow: 0 0 0 1px #3a3c42, var(--shadow); background: #000; }
.ipad-live .screen { position: relative; aspect-ratio: 1180 / 820; border-radius: 20px; overflow: hidden; background: #000; container-type: inline-size; }
.ipad-live .gauge { position: absolute; left: 4%; top: 16%; width: 50%; }
.ipad-live .sign { position: absolute; left: 4%; top: 6%; width: 7.5cqw; height: 7.5cqw; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 0.85cqw var(--red); color: #111418; font: 700 2.6cqw/7.5cqw "Space Grotesk", system-ui, sans-serif; text-align: center; transition: background .2s, color .2s; }
.ipad-live .pill { position: absolute; left: 50%; top: 5%; transform: translateX(-50%); padding: 0.7cqw 1.8cqw; border-radius: 99px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.62); font: 600 1.6cqw/1.4 -apple-system, system-ui, sans-serif; letter-spacing: .05em; white-space: nowrap; }
.ipad-live .mini-total { position: absolute; left: 57%; top: 26%; width: 22%; padding: 2.2cqw; border-radius: 2.4cqw; background: rgba(255,255,255,.08); display: grid; gap: 1.2cqw; color: rgba(255,255,255,.62); font: 600 1.7cqw/1.2 -apple-system, system-ui, sans-serif; }
.ipad-live .mini-total b { color: #fff; font-size: 3.4cqw; font-weight: 600; font-variant-numeric: tabular-nums; }
.ipad-live .mini-total .t { color: var(--accent); font-weight: 700; }
.gauge { position: relative; aspect-ratio: 1 / 0.9; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .readout { position: absolute; left: 0; right: 0; top: 40%; text-align: center; }
.gauge .num { font: 600 12cqw/1 "Space Grotesk", system-ui, sans-serif; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; transition: color .2s; }
.gauge .unit { font-weight: 600; color: rgba(255,255,255,.62); font-size: 2.2cqw; margin-top: 0.4cqw; }
.gauge-card.over .num { color: var(--red); }
.gauge-card.over .sign { background: var(--red); color: #fff; }
.iphone-front { position: absolute; right: 0; bottom: 0; width: 27%; border: 6px solid #101114; border-radius: 26px; overflow: hidden; box-shadow: 0 0 0 1px #3a3c42, 0 30px 60px -20px rgba(0,0,0,.9); background: #000; }
.iphone-front img { width: 100%; height: auto; }
@media (max-width: 600px) { .ipad-live { border-width: 6px; border-radius: 20px; } .ipad-live .screen { border-radius: 14px; } .iphone-front { border-width: 4px; border-radius: 16px; } }
.drive { width: min(100%, 380px); display: grid; gap: 6px; }
.drive label { font-size: 0.9rem; color: #c9d3ec; display: flex; justify-content: space-between; }
.drive input[type=range] { width: 100%; accent-color: #ffffff; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 28px 0; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: 8px 14px; font-size: 0.92rem; }

/* sections */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); }
.intro { max-width: 60ch; margin-bottom: 36px; }
.intro p { color: var(--muted); margin-top: 14px; }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.rev > :first-child { order: 2; } }
.split p.side { color: var(--muted); margin-top: 16px; max-width: 48ch; }
ul.ticks { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
ul.ticks li { padding-left: 30px; position: relative; color: var(--muted); }
ul.ticks li strong { color: var(--ink); font-weight: 600; }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 18px; height: 10px; border-radius: 3px;
  background: linear-gradient(90deg, #fff 0 22%, transparent 22% 39%, #fff 39% 61%, transparent 61% 78%, var(--red) 78%); }

/* framed screens */
.phone { width: min(70%, 300px); margin-inline: auto; border-radius: 40px; overflow: hidden; border: 9px solid #15171c; box-shadow: var(--shadow), 0 0 0 1px #2a2e38; background: #000; }
.land { border-radius: 30px; overflow: hidden; border: 8px solid #15171c; box-shadow: var(--shadow), 0 0 0 1px #2a2e38; background: #000; }
.two { display: grid; gap: 24px; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1fr; } }
figure { margin: 0; }
.tab { border-radius: 26px; overflow: hidden; border: 10px solid #15171c; box-shadow: var(--shadow), 0 0 0 1px #2a2e38; background: #000; }
.tab img { width: 100%; height: auto; }
.ipads { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) { .ipads { grid-template-columns: 1.44fr 1fr; } }
@media (max-width: 899px) { .ipads figure:last-child .tab { width: min(80%, 420px); margin-inline: auto; } }
figcaption { color: var(--faint); font-size: 0.9rem; margin-top: 12px; }

/* face picker */
.picker { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .picker { grid-template-columns: 1.1fr 1fr; } }
.picker .stage { border-radius: 28px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 1; background: linear-gradient(180deg, var(--mid-top), var(--mid-bot)); }
.picker .stage img { width: 100%; height: 100%; object-fit: cover; }
.land img, .phone img { width: 100%; height: auto; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 16px; padding: 8px 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; align-items: stretch; text-align: left; font: inherit; }
.tile img { width: 100%; height: auto; border-radius: 10px; aspect-ratio: 1; object-fit: cover; }
.tile span { font-size: 0.9rem; font-weight: 600; padding: 0 4px; }
.tile small { display: block; color: var(--faint); font-weight: 500; font-size: 0.78rem; }
.tile[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.picker .desc { color: var(--muted); margin-top: 14px; min-height: 3.2em; }

/* privacy */
.privacy-strip { display: grid; gap: 24px; }
@media (min-width: 900px) { .privacy-strip { grid-template-columns: 1fr 1.2fr; align-items: start; } }
.privacy-strip ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.privacy-strip li { padding-left: 28px; position: relative; color: var(--muted); }
.privacy-strip li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 10px; }

/* more apps */
.apps { display: grid; gap: 16px; }
@media (min-width: 700px) { .apps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .apps { grid-template-columns: repeat(4, 1fr); } }
.app { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.app-head { display: flex; align-items: center; gap: 14px; }
.app-head img { width: 56px; height: 56px; border-radius: 13px; }
.app p { color: var(--muted); }
.app .note { font-size: 0.88rem; }
.app-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: auto; padding-top: 8px; font-size: 0.95rem; }
.badge img { height: 40px; width: auto; }

/* closing */
.closing { text-align: center; padding: 80px 0; }
.closing .cta { justify-content: center; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 44px 0 56px; color: var(--muted); font-size: 0.93rem; }
.foot { display: grid; gap: 28px; }
@media (min-width: 900px) { .foot { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot img { height: 52px; width: auto; }
.foot h4 { font: 600 0.8rem/1 -apple-system, system-ui, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--faint); font-size: 0.85rem; }
