:root {
  --red: #e10600;
  --bg: #0b0b0d;
  --card: #17171b;
  --line: #2a2a30;
  --text: #f4efee;
  --muted: #a3a0a6;
  --radius: 20px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

h1, h2, h3, .brand { font-family: "Titillium Web", sans-serif; line-height: 1.1; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 11, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 22px; font-weight: 700; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand:hover { text-decoration: none; }
nav a { color: var(--muted); margin-left: 22px; font-size: 15px; }
nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.kicker { color: var(--red); font-family: "Titillium Web", sans-serif; font-weight: 700; letter-spacing: 3px; font-size: 13px; text-transform: uppercase; }
.hero h1 { font-size: clamp(42px, 7vw, 72px); margin: 12px 0 18px; font-weight: 700; }
.hero p.lead { color: var(--muted); font-size: 20px; max-width: 34ch; margin: 0 0 28px; }

.button {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--red); color: #fff; font-weight: 600;
  padding: 14px 22px; border-radius: 14px; font-size: 17px;
}
.button:hover { text-decoration: none; filter: brightness(1.08); }
.button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.note { color: var(--muted); font-size: 14px; margin-top: 14px; }

/* Phones: iPhone 17 Pro frame drawn in CSS around real 1206x2622
   simulator screenshots. */
.phones { position: relative; height: 600px; }
.phone {
  --w: 270px;
  position: absolute; width: var(--w); aspect-ratio: 1206 / 2622;
  padding: calc(var(--w) * 0.035);
  border-radius: calc(var(--w) * 0.19);
  /* Titanium edge, then the black bezel. */
  background:
    linear-gradient(#0a0a0b, #0a0a0b) padding-box,
    linear-gradient(145deg, #8a8580, #3d3a37 30%, #6d6863 55%, #2e2c2a 80%, #77726c) border-box;
  border: calc(var(--w) * 0.012) solid transparent;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 40px 80px rgba(225, 6, 0, 0.16),
    0 18px 40px rgba(0, 0, 0, 0.7);
}
.phone img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border-radius: calc(var(--w) * 0.155);
}
/* Dynamic Island */
.phone::before {
  content: ""; position: absolute; z-index: 2;
  top: calc(var(--w) * 0.068); left: 50%; transform: translateX(-50%);
  width: calc(var(--w) * 0.3); height: calc(var(--w) * 0.088);
  border-radius: 999px;
  /* Camera lens on the right of the pill. */
  background:
    radial-gradient(circle at 80% 50%, #1d2a44 0 4%, #0b0f19 5% 7%, transparent 8%),
    #050505;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07);
}
/* Action and volume buttons on the left, side button on the right. */
.phone::after {
  content: ""; position: absolute; z-index: -1;
  left: calc(var(--w) * -0.024); top: 18%;
  width: calc(var(--w) * 0.016); height: 26%;
  background: linear-gradient(#6d6863 0 18%, transparent 18% 30%, #6d6863 30% 62%, transparent 62% 70%, #6d6863 70%);
  border-radius: 3px;
  box-shadow: calc(var(--w) * 1.03) 4% 0 0 #6d6863;
}
.phone.front { left: 0; top: 40px; z-index: 2; }
.phone.back { right: 0; top: 0; rotate: 4deg; }

/* Sections */
section { padding: 56px 0; }
section h2 { font-size: clamp(30px, 4.5vw, 42px); margin: 0 0 10px; }
section p.sub { color: var(--muted); margin: 0 0 32px; max-width: 60ch; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.card .icon { font-size: 28px; }
.card h3 { font-size: 22px; margin: 12px 0 6px; }
.card p { color: var(--muted); margin: 0; font-size: 16px; }

.band {
  background: linear-gradient(135deg, #2a0302, var(--card));
  border: 1px solid var(--line); border-radius: 28px; padding: 40px;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.band h2 { margin: 0 0 6px; }
.band p { color: var(--muted); margin: 0; }

/* Text pages */
.doc { max-width: 760px; padding: 48px 20px 72px; margin: 0 auto; }
.doc h1 { font-size: 44px; margin: 0 0 6px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.doc h2 { font-size: 26px; margin: 36px 0 8px; }
.doc p, .doc li { color: #d9d4d3; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; }

/* Join page */
.join { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 20px; }
.join img.icon { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 18px; }
.join h1 { font-size: 36px; margin: 0 0 10px; }
.code {
  font-family: "Titillium Web", sans-serif; font-size: 40px; font-weight: 700; letter-spacing: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 10px 22px; display: inline-block; margin: 18px 0;
}
.steps { color: var(--muted); max-width: 420px; margin: 18px auto 0; text-align: left; }

footer.site { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; }
footer.site a { color: var(--muted); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  /* Side by side on phones, so the track map is not hidden. */
  .phones {
    height: auto; display: flex; justify-content: center; align-items: flex-start; gap: 4%;
    padding: 10px 0 30px;
  }
  .phone { --w: min(40vw, 190px); position: relative; flex: none; }
  .phone.front, .phone.back { left: auto; right: auto; top: auto; }
  .phone.front { order: 1; }
  .phone.back { order: 2; rotate: 0deg; margin-top: 36px; }
  .grid { grid-template-columns: 1fr; }
  nav a:not(:last-child) { display: none; }
  .band { padding: 28px; }
}

/* Motion (only when motion.js runs and "reduce motion" is off) */
.motion .hero-text > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.motion .hero-text > :nth-child(2) { animation-delay: 0.08s; }
.motion .hero-text > :nth-child(3) { animation-delay: 0.16s; }
.motion .hero-text > :nth-child(4) { animation-delay: 0.24s; }
.motion .hero-text > :nth-child(5) { animation-delay: 0.3s; }
.motion .phone.front { animation: rise 1s 0.25s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.motion .phone.back { animation: rise-tilt 1s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.motion .phone { transition: translate 0.1s linear; }

.motion .reveal {
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.motion .reveal.in { opacity: 1; transform: none; }

.card { transition: transform 0.25s ease, border-color 0.25s ease; }
.card:hover { border-color: rgba(225, 6, 0, 0.5); }
.motion .card.in:hover { transform: translateY(-4px); }

@keyframes rise {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-tilt {
  from { opacity: 0; transform: translateY(60px) rotate(10deg); }
  to { opacity: 1; transform: none; }
}

/* Waitlist */
.waitlist { max-width: 460px; }
.waitlist .field { display: flex; gap: 10px; }
.waitlist input[type=email] {
  flex: 1; min-width: 0;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; font-size: 17px; font-family: inherit;
}
.waitlist input[type=email]:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.waitlist .button { border: 0; cursor: pointer; font-family: inherit; white-space: nowrap; }
.waitlist .button:disabled { opacity: 0.6; cursor: default; }
.waitlist .trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--red); flex: none; }
.form-msg { min-height: 1.4em; margin: 10px 0 0; font-size: 15px; }
.form-msg.ok { color: #30d158; }
.form-msg.err { color: #ff6b63; }
@media (max-width: 480px) { .waitlist .field { flex-direction: column; } }

/* Header button that leads to the waitlist form. */
nav a.nav-cta {
  color: #fff; background: var(--red); font-weight: 600;
  padding: 8px 14px; border-radius: 10px;
}
nav a.nav-cta:hover { color: #fff; filter: brightness(1.08); }
#waitlist { scroll-margin-top: 120px; }
.waitlist.flash input[type=email] { animation: flash 1.2s ease; }
@keyframes flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 6, 0, 0); }
  30% { box-shadow: 0 0 0 6px rgba(225, 6, 0, 0.45); }
}
