/* The APEX website (Site/index.html): the app's Glance look. Dark only, like the app. */

@font-face { font-family: "Space Grotesk"; font-weight: 400; font-display: swap; src: url("fonts/SpaceGrotesk-Regular.ttf") format("truetype"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("fonts/SpaceGrotesk-Medium.ttf") format("truetype"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("fonts/SpaceGrotesk-Bold.ttf") format("truetype"); }
@font-face { font-family: "Titillium Web"; font-weight: 900; font-display: swap; src: url("fonts/TitilliumWeb-Black.ttf") format("truetype"); }

:root {
  color-scheme: dark;
  --bg: #0B0C10;
  --band: #111217;
  --tile: #15171D;
  --tile-2: #1E2028;
  --line: #2E3039;
  --text: #F2F2F5;
  --muted: #A1A3AD;
  --faint: #8A8D98;
  --red: #FF3B30;
  --red-text: #FF5A50;
  /* The favourite in the mockups: Red Bull, the team colour mixed into the tile. */
  --team: #3671C6;
  --team-tint: #1E2E49;
  --team-label: #AFC6E8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 "Space Grotesk", system-ui, sans-serif; overflow-x: hidden; }
a { color: var(--text); }
a:hover { color: #FFFFFF; }
img { max-width: 100%; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.display { font-family: "Titillium Web", sans-serif; font-weight: 900; letter-spacing: -0.01em; line-height: 0.98; margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.eyebrow { font-size: 15px; font-weight: 700; color: var(--red-text); }
.lede { margin: 0; font-size: 17px; line-height: 1.5; color: var(--muted); }
.h2 { font-size: clamp(36px, 5vw, 56px); }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; }
.site-header img { height: 34px; width: auto; display: block; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 15px; font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--text); }
.site-nav a.strong { color: var(--text); font-weight: 700; }

/* Kerb stripe, like the wordmark's underline */
.kerb { display: flex; width: 120px; height: 6px; }
.kerb span { flex: 1; background: var(--red); }
.kerb span:nth-child(even) { background: var(--text); }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 96px; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(48px, 7vw, 88px); }
.hero .lede { font-size: 21px; max-width: 30ch; }
.hero-phones { display: flex; justify-content: center; align-items: flex-start; gap: 28px; }
.hero-phones .phone + .phone { margin-top: 88px; }

/* Store buttons: no listing is live yet, so they say so */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 6px 22px; border-radius: 14px; background: var(--text); color: var(--bg); text-decoration: none; font-weight: 700; font-size: 16px; line-height: 1.2; }
.store small { font-size: 12px; font-weight: 500; }
.store.dark { background: var(--tile-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.store.ink { background: var(--bg); color: var(--text); }

/* An iPhone 18 Pro Max: thin titanium band, side buttons, the screen's own corners */
.phone { position: relative; width: min(290px, 74vw); padding: 6px; border-radius: 16.5% / 7.4%; flex: none;
  background: linear-gradient(150deg, #5B5C61 0%, #26272B 22%, #1A1B1E 60%, #45464B 100%);
  box-shadow: inset 0 0 0 1.5px #77787D, inset 0 0 0 3px #0A0A0C, 0 40px 80px rgba(0, 0, 0, 0.55); }
.phone img { display: block; width: 100%; height: auto; border-radius: 14.2% / 6.3%; background: #000; }
.phone::before { content: ""; position: absolute; left: -3px; top: 17%; width: 3px; height: 19%; border-radius: 2px 0 0 2px;
  background: linear-gradient(#45464B 0 18%, transparent 18% 27%, #45464B 27% 60%, transparent 60% 69%, #45464B 69%); }
.phone::after { content: ""; position: absolute; right: -3px; top: 25%; width: 3px; height: 30%; border-radius: 0 2px 2px 0;
  background: linear-gradient(#45464B 0 34%, transparent 34% 62%, #45464B 62% 85%, transparent 85%); }
.phone.small { width: min(250px, 74vw); }

/* Sections */
.section { padding-bottom: 112px; display: flex; flex-direction: column; gap: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-head .lede { max-width: 38ch; }

/* Bento tiles, the same tiles as the app */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; } .s7 { grid-column: span 7; }
.tile { background: var(--tile); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.tile.big { padding: 40px; gap: 20px; }
.tile-label { font-size: 14px; color: var(--muted); }
.tile-title { font-size: 22px; font-weight: 700; line-height: 1.25; }
.grow { flex-grow: 1; }
.pill { align-self: flex-start; font-size: 14px; padding: 8px 12px; border-radius: 999px; background: var(--tile-2); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--tile-2); font-size: 15px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.driver { background: var(--team-tint); min-height: 340px; gap: 18px; }
.driver-top { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 500; color: var(--team-label); }
.driver-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-grow: 1; }
.driver-body > div { display: flex; flex-direction: column; gap: 10px; }
.driver .pos { font-size: 96px; font-weight: 700; line-height: 0.9; letter-spacing: -0.03em; }
.driver .name { font-size: 30px; font-weight: 700; line-height: 1.1; }
.driver .pts { font-size: 16px; color: var(--team-label); }
.driver .pill { background: rgba(255, 255, 255, 0.1); padding: 6px 12px; }
.driver .number { width: 132px; height: 132px; border-radius: 28px; background: var(--team); display: flex; align-items: center; justify-content: center; font-size: 72px; font-weight: 700; color: #FFFFFF; flex: none; }

.countdown { font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.text-link { font-size: 15px; font-weight: 700; text-decoration: none; }

.poll { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.poll div { display: flex; justify-content: space-between; }
.bar { height: 8px; border-radius: 4px; background: var(--tile-2); }
.bar span { display: block; height: 8px; border-radius: 4px; background: #5A5D69; }
.bar span.team { background: var(--team); }

.hidden-result { height: 12px; border-radius: 6px; background: var(--line); }

.standings { display: flex; flex-direction: column; gap: 4px; }
.standing { display: grid; grid-template-columns: 32px 32px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; }
.standing.you { background: var(--team-tint); }
.standing small { display: block; font-size: 14px; color: var(--muted); }
.standing .num { font-weight: 700; }
.standing .end { text-align: right; }

.widgets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 360px; }
.widgets div { aspect-ratio: 1; border-radius: 18px; background: var(--tile-2); display: flex; align-items: flex-end; padding: 10px; font-weight: 700; font-size: 18px; }
.widgets div:first-child { background: var(--team-tint); font-size: 22px; }

/* The weekend */
.weekend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.weekend li { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 4px dashed var(--line); }
.weekend .day { font-size: 44px; color: #6E7180; }
.weekend strong { font-size: 19px; }
.weekend span:last-child { font-size: 15px; line-height: 1.5; color: var(--muted); }
.weekend li.now { border-top: 4px solid var(--red); }
.weekend li.now .day { color: var(--red-text); }

/* Screens */
.screens { background: var(--band); padding: 104px 0; }
.screens .wrap { display: flex; flex-direction: column; gap: 48px; }
.screens-head { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.screens-head .lede { max-width: 46ch; }
.screens-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 40px 32px; justify-items: center; }
.screens-grid figure { margin: 0; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.screens-grid figcaption { font-size: 16px; font-weight: 700; }
.screens-grid figcaption span { font-weight: 400; color: var(--muted); }

/* FAQ */
.faq { padding-top: 64px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 48px; }
.faq h2 { flex: 1 1 280px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; flex: 2 1 560px; min-width: 0; }
.faq details { background: var(--tile); border-radius: 20px; padding: 22px 26px; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 19px; font-weight: 700; min-height: 44px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; font-weight: 400; transition: transform 0.15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 12px 0 0; font-size: 16px; line-height: 1.55; color: var(--muted); }

/* Download */
.download { padding-top: 48px; padding-bottom: 112px; }
.download-panel { background: var(--red); border-radius: 32px; padding: clamp(32px, 6vw, 72px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.download-panel > div:first-child { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.download-panel img { width: 96px; height: 96px; display: block; }
.download-panel h2 { font-size: clamp(36px, 5vw, 60px); color: #FFFFFF; max-width: 14ch; }

/* Footer */
.site-footer { border-top: 1px solid var(--tile-2); }
.site-footer .wrap { padding-top: 40px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer-top img { height: 26px; width: auto; display: block; }
.footer-top nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.footer-top nav a { text-decoration: none; color: var(--muted); }
.site-footer p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--faint); max-width: 90ch; }

@media (max-width: 900px) {
  .bento > * { grid-column: 1 / -1; }
  .hero-phones .phone + .phone { display: none; }
  .driver .pos { font-size: 72px; }
  .driver .number { width: 96px; height: 96px; font-size: 52px; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
