/* ==========================================================================
   F1Time — Pit Wall landing. Tokens ported 1:1 from the Android app's
   PitWallDarkColors (ui/theme/Color.kt) for exact brand parity.
   ========================================================================== */

:root {
  --bg: #0a0c10;
  --surface: #14171d;
  --surface-raised: #1a1e26;
  --hairline: #272c36;
  --ink: #eceef2;
  --ink-muted: #7d8492;
  --accent-purple: #a24bff;
  --accent-green: #2fe6a6;
  --accent-amber: #ffc857;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas,
    "Liberation Mono", monospace;

  --container: 72rem;
  --bevel: 14px;

  --z-header: 100;
  --z-overlay: 200;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: var(--z-overlay);
  background: var(--accent-green);
  color: #04160f;
  padding: 0.6rem 1rem;
  font-weight: 600;
  transition: top 0.2s var(--ease-out-expo);
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---- Cut-corner bevel panel (the app's signature shape) ---- */
.panel {
  --bevel: 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  clip-path: polygon(
    var(--bevel) 0,
    100% 0,
    100% calc(100% - var(--bevel)),
    calc(100% - var(--bevel)) 100%,
    0 100%,
    0 var(--bevel)
  );
}

.panel--raised {
  background: var(--surface-raised);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%,
    0 10px
  );
  transition: transform 0.25s var(--ease-out-expo), background-color 0.25s
    var(--ease-out-expo);
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: background-color 0.15s linear;
  }
}

.btn:hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover {
    transform: none;
  }
}

.btn--primary {
  background: var(--accent-green);
  color: #04160f;
}

.btn--primary:hover {
  background: #4ff0b8;
}

.btn--ghost {
  background: transparent;
  border-color: var(--hairline);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.1rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.wordmark__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(47, 230, 166, 0.15);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav__links {
  display: flex;
  gap: 1.75rem;
}

.site-nav__links a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s var(--ease-out-expo);
}

.site-nav__links a:hover {
  color: var(--ink);
}

.site-nav__cta {
  display: inline-flex;
}

@media (max-width: 46rem) {
  .site-nav__links {
    display: none;
  }
}

/* ---- Hero ---- */
.hero {
  padding-block: clamp(3rem, 6vw, 6rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

@media (max-width: 60rem) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__phone {
    order: -1;
    max-width: 16rem;
    margin-inline: auto;
  }
}

.hero__eyebrow-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero__eyebrow-row .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw + 1.5rem, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  max-width: 16ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-green);
}

.hero__lede {
  margin-top: 1.5rem;
  max-width: 46ch;
  font-size: 1.15rem;
  color: var(--ink-muted);
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.play-badge img {
  height: 54px;
  width: auto;
}

.hero__meta {
  display: flex;
  gap: 1.75rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
  max-width: 30rem;
}

.hero__meta-item .value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}

.hero__meta-item .label {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* ---- Phone mockup ---- */
.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  margin-inline: auto;
  padding: 12px;
  background: linear-gradient(155deg, #22262f, #101319);
  border: 1px solid var(--hairline);
  border-radius: 2.4rem;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
}

.phone__notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 22px;
  background: #101319;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 1.7rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--hairline);
}

.phone__screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  padding: 1.5rem;
  border: 1px dashed var(--hairline);
  margin: 8px;
  border-radius: 1.4rem;
}

.phone__placeholder-icon {
  color: var(--ink-muted);
}

.phone__placeholder p {
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.phone__placeholder code {
  display: inline-block;
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-green);
  background: var(--surface-raised);
  padding: 0.15rem 0.45rem;
}

/* ---- Section shell ---- */
.section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.section--bordered {
  border-bottom: 1px solid var(--hairline);
}

.section__head {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section__head h2 {
  font-size: clamp(1.75rem, 2vw + 1.25rem, 2.5rem);
  letter-spacing: -0.015em;
  font-weight: 700;
}

.section__head p {
  margin-top: 0.85rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

/* ---- Session sheet (features list, timing-tower style) ---- */
.session-sheet {
  border-top: 1px solid var(--hairline);
}

.session-row {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 15rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: baseline;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--hairline);
}

.session-row__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  align-self: center;
}

.session-row:nth-child(odd) .session-row__dot {
  background: var(--accent-green);
}

.session-row:nth-child(even) .session-row__dot {
  background: var(--accent-purple);
}

.session-row__title {
  font-size: 1.1rem;
  font-weight: 700;
}

.session-row__desc {
  color: var(--ink-muted);
}

@media (max-width: 40rem) {
  .session-row {
    grid-template-columns: 1rem 1fr;
  }

  .session-row__desc {
    grid-column: 2;
  }
}

/* ---- Download CTA band ---- */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding: clamp(2rem, 4vw, 3rem);
}

.cta-band h2 {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.1rem);
  letter-spacing: -0.015em;
  max-width: 22ch;
}

.cta-band__note {
  margin-top: 0.6rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* ---- Footer ---- */
.site-footer {
  padding-block: 3rem;
}

.site-footer__grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--hairline);
}

.site-footer__col h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.9rem;
}

.site-footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.site-footer__col a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
}

.site-footer__col a:hover {
  color: var(--accent-green);
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ---- Legal / document pages ---- */
.doc-header {
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
  border-bottom: 1px solid var(--hairline);
}

.doc-header .breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
  text-decoration: none;
  margin-bottom: 1.25rem;
}

.doc-header .breadcrumb:hover {
  color: var(--accent-green);
}

.doc-header h1 {
  font-size: clamp(2rem, 2.5vw + 1.25rem, 2.75rem);
  letter-spacing: -0.015em;
}

.doc-header .doc-updated {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.doc-body {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 55rem) {
  .doc-body {
    grid-template-columns: 1fr;
  }

  .doc-toc {
    display: none;
  }
}

.doc-toc {
  position: sticky;
  top: 6rem;
  border-left: 1px solid var(--hairline);
  padding-left: 1.25rem;
}

.doc-toc h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.9rem;
}

.doc-toc ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.doc-toc a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.doc-toc a:hover {
  color: var(--ink);
}

.doc-content {
  max-width: 68ch;
}

.doc-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  scroll-margin-top: 6rem;
}

.doc-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.doc-content p,
.doc-content li {
  color: var(--ink-muted);
  font-size: 1rem;
}

.doc-content p + p {
  margin-top: 1rem;
}

.doc-content ul {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.doc-content strong {
  color: var(--ink);
}

.doc-content a {
  color: var(--accent-green);
}

.doc-content .callout {
  margin-top: 1.5rem;
  padding: 1.1rem 1.3rem;
  font-size: 0.92rem;
}

.doc-content .callout p {
  color: var(--ink);
}

/* ---- Reveal-on-scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s
    var(--ease-out-expo);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
