/* 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; }
.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 { position: relative; }
/* the menu as on 3pnorth.com: a row on wide screens, a menu button on narrow ones; without JS the links stay in a row */
.nav-menu { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; }
.nav-menu a { color: var(--muted); text-decoration: none; }
.nav-menu a:hover { color: var(--ink); }
.nav-toggle { background: none; border: 0; color: var(--ink); width: 44px; height: 44px; padding: 8px; margin-right: -8px; cursor: pointer; }
.nav-toggle[hidden] { display: none; }
@media (min-width: 901px) { .nav-toggle { display: none; } }
@media (max-width: 900px) {
  .js-nav .nav-menu {
    display: none; position: absolute; top: 100%; left: -16px; right: -16px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgb(34,53,107); border-bottom: 1px solid rgba(255,255,255,.1); padding: 8px 16px 20px;
  }
  .js-nav .nav-menu.open { display: flex; }
  .js-nav .nav-menu a { padding: 14px 0; font-size: 1.05rem; }
  html:not(.js-nav) .nav-menu { gap: 14px; overflow-x: auto; }
}

/* 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 app on iPad and iPhone */
.band { background: linear-gradient(180deg, var(--mid-top), var(--mid-bot)); }
/* the top bar stays in place while the page scrolls, as on the other Stooj sites */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(34, 53, 107, 0.88); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
section[id] { scroll-margin-top: 76px; }
.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 iPad in landscape; the iPhone in front shows another face */
/* the hero (DESIGN-DECISIONS.md, Screenshot plan, owner 29 Oct): the iPad in landscape behind, the iPhone in
   landscape in front, bottom right; the demo-drive video will sit in the iPhone's .screen with the still as poster */
.devices { position: relative; width: 100%; padding: 0 0 13% 0; }
.ipad-live { width: 84%; border: 5px solid #101114; border-radius: 3% / 4.3%; box-shadow: 0 0 0 1px #3a3c42, var(--shadow); background: #000; }
.ipad-live .screen { aspect-ratio: 1416 / 984; border-radius: 2.4% / 3.4%; overflow: hidden; }
.ipad-live .screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.phone-land { position: absolute; right: 0; bottom: 0; width: 60%; border: 5px solid #101114; border-radius: 7.2% / 15.6%; overflow: hidden; background: #000; box-shadow: 0 0 0 1.5px #3a3c42, 0 30px 60px -20px rgba(0,0,0,.9); }
.phone-land .screen { aspect-ratio: 1600 / 739; }
.phone-land .screen img, .phone-land .screen video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .ipad-live, .phone-land { border-width: 3px; } }
.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; }
/* Lock Screen: two portrait iPhones, the app behind, the Lock Screen in front and offset (DESIGN-DECISIONS.md,
   Screenshot plan: the same picture as the store card) */
.phone-pair { position: relative; width: min(100%, 460px); margin-inline: auto; aspect-ratio: 1 / 1.47; }   /* a phone is 62% wide = 1.348 tall; + the offset */
.phone-pair .phone { position: absolute; width: 62%; margin: 0; }
.phone-pair .back { left: 0; top: 0; opacity: .92; }
.phone-pair .front { right: 0; bottom: 0; box-shadow: 0 0 0 1px #2a2e38, 0 40px 80px -24px rgba(0,0,0,.95); }
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: thin bezels, as on 3pnorth.com and 3plevel.com */
.phone { width: min(70%, 300px); margin-inline: auto; border-radius: 12% / 5.6%; overflow: hidden; border: 4px solid #15171c; box-shadow: var(--shadow), 0 0 0 1px #2a2e38; background: #000; }
.land { border-radius: 5.6% / 12%; overflow: hidden; border: 3px 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: 2.4% / 3.4%; overflow: hidden; border: 5px solid #15171c; box-shadow: var(--shadow), 0 0 0 1px #2a2e38; background: #000; }
.tab img { width: 100%; height: auto; }
/* iPad section: two iPads at the SAME scale, one device turned (the portrait one's height = the landscape one's
   width): portrait behind top right, landscape in front bottom left, bottoms aligned (DESIGN-DECISIONS.md, 29 Oct) */
.pair { position: relative; width: min(100%, 1040px); margin-inline: auto; aspect-ratio: 1.46 / 1; }
.pair .tab { position: absolute; border-width: clamp(4px, 0.9vw, 9px); }
.pair .land { left: 0; bottom: 0; width: 68.5%; z-index: 2; box-shadow: 0 0 0 1px #2a2e38, 0 40px 80px -24px rgba(0,0,0,.95), 0 10px 30px rgba(0,0,0,.5); }
.pair .port { right: 0; top: 0; width: 47.6%; z-index: 1; border-radius: 3.4% / 2.4%; }
.pair-caps { display: flex; justify-content: space-between; gap: 24px; width: min(100%, 1040px); margin: 14px auto 0; color: var(--faint); font-size: 0.93rem; }
#ipad .stage { width: min(100%, 1040px); margin-inline: auto; }
@media (min-width: 900px) {
  #ipad .stage { position: relative; }
  #ipad .stage .intro { position: absolute; left: 0; top: 0; width: 46%; margin: 0; z-index: 3; }
}
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; }

/* privacy policy pages (the article is generated by build-privacy.py; 3pNorth's rules) */
.policy-doc { max-width: 720px; padding: 24px 0 72px; overflow-wrap: break-word; }
.policy-doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.policy-doc h2 { font-size: 1.4rem; margin-top: 40px; }
.policy-doc h3 { font-size: 1.1rem; margin-top: 28px; }
.policy-doc p, .policy-doc ul { margin-top: 14px; }
.policy-doc ul { padding-left: 1.2em; }
.policy-doc li { margin-top: 6px; }
.policy-doc hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0 0; }
.policy-doc h1 + p, .policy-doc em { color: var(--muted); }

/* 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; }
