/* ============================================================
   Data at Speed — site styles
   Palette drawn from the book cover: near-black, race red, white
   ============================================================ */
:root {
  --black: #0d0d0f;
  --dark: #131316;
  --dark-2: #1a1a1e;
  --red: #b01822;
  --red-bright: #d21f2b;
  --white: #ffffff;
  --grey: #a7a7ad;
  --grey-light: #d6d6db;
  --heading: "Oswald", sans-serif;
  --body: "Inter", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--black);
  color: var(--grey-light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-bright); text-decoration: none; }
a:hover { color: #ff3d49; }

h1, h2, h3, h4 {
  font-family: var(--heading);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
}
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.4rem; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.section { padding: 96px 0; }
.section-dark { background: var(--dark); }
.lede { max-width: 640px; margin: 0 auto 3rem; color: var(--grey); }
.note { color: var(--grey); font-size: 0.9rem; margin-top: 2.5rem; }

.eyebrow {
  font-family: var(--heading);
  color: var(--red-bright);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 32px;
  border: 2px solid transparent;
  transition: all 0.25s ease;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-bright); color: var(--white); transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.08); color: var(--white); }
.btn-white { background: var(--white); color: var(--black); }
.btn-white:hover { background: var(--grey-light); color: var(--black); transform: translateY(-2px); }
.btn-nav { padding: 9px 20px; font-size: 0.8rem; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled {
  background: rgba(13, 13, 15, 0.95);
  backdrop-filter: blur(8px);
  padding: 10px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  color: var(--white);
}
.nav-logo span { color: var(--red-bright); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) {
  font-family: var(--heading);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--grey-light);
}
.nav-links a:not(.btn):hover { color: var(--white); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--white); margin: 6px 0;
  transition: 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13,13,15,0.55) 0%, rgba(13,13,15,0.25) 45%, rgba(13,13,15,0.92) 100%);
}
.hero-content { position: relative; text-align: center; padding: 0 24px; }
.hero-kicker {
  font-family: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: clamp(0.7rem, 1.6vw, 0.95rem);
  color: var(--grey-light);
  margin-bottom: 1.4rem;
}
.hero-title {
  font-size: clamp(3.2rem, 11vw, 8.5rem);
  font-weight: 700;
  line-height: 0.95;
}
.hero-title span { color: var(--white); letter-spacing: 0.06em; }
.hero-author {
  font-family: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: clamp(0.85rem, 2vw, 1.15rem);
  color: var(--red-bright);
  margin: 1.6rem 0 2.4rem;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 14px;
}
.hero-scroll span {
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--white);
  border-radius: 2px;
  animation: scrollcue 1.8s infinite;
}
@keyframes scrollcue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Red stripe (echoes the cover) ---------- */
.stripe {
  height: 14px;
  background: repeating-linear-gradient(90deg, var(--red) 0, var(--red) 120px, var(--black) 120px, var(--black) 140px);
  border-top: 3px solid var(--black);
  border-bottom: 3px solid var(--black);
}

/* ---------- Split layout ---------- */
.split {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 64px;
  align-items: center;
}
.split-rev { grid-template-columns: 6fr 5fr; }
.split-rev .split-media { order: 2; }
.split-rev .split-copy { order: 1; }
.split-media img { box-shadow: 0 24px 60px rgba(0,0,0,0.6); }
.split-copy p { margin-bottom: 1.2rem; }
.split-copy strong { color: var(--white); }

.book-points { list-style: none; margin: 1.6rem 0 2rem; }
.book-points li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 0.8rem;
}
.book-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 14px; height: 3px;
  background: var(--red-bright);
}

.formats { display: flex; gap: 10px; flex-wrap: nowrap; margin-bottom: 2rem; }
.format {
  background: var(--dark-2);
  border-left: 3px solid var(--red);
  padding: 8px 12px;
  font-size: 0.7rem;
  color: var(--grey);
  white-space: nowrap;
}
.format span {
  display: block;
  font-family: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  font-size: 0.82rem;
}
@media (max-width: 540px) {
  .formats { flex-wrap: wrap; }
}

/* ---------- Quote band ---------- */
.quote-band {
  background: var(--red);
  padding: 72px 0;
}
.quote-band blockquote { max-width: 860px; margin: 0 auto; text-align: center; }
.quote-band p {
  font-family: var(--heading);
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  font-weight: 500;
  color: var(--white);
  line-height: 1.45;
  margin-bottom: 1.4rem;
}
.quote-band cite {
  font-style: normal;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

/* ---------- Parts / TOC ---------- */
.parts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 3rem;
}
.part {
  background: var(--dark-2);
  padding: 36px 30px;
  border-top: 4px solid var(--red);
  transition: transform 0.25s ease;
}
.part:hover { transform: translateY(-6px); }
.part-num {
  font-family: var(--heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--red-bright);
  line-height: 1;
  margin-bottom: 1rem;
}
.part h3 { margin-bottom: 0.4rem; }
.part-sub { color: var(--grey); font-size: 0.88rem; margin-bottom: 1.4rem; }
.part ol { padding-left: 1.4rem; color: var(--grey-light); font-size: 0.92rem; }
.part ol li { margin-bottom: 0.5rem; }

/* ---------- Videos ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.video-card h4 { margin: 1rem 0 0.4rem; font-size: 1.05rem; }
.video-card p { color: var(--grey); font-size: 0.9rem; }
.video-frame {
  aspect-ratio: 16 / 9;
  background: var(--dark-2);
  border: 1px solid #26262c;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.video-frame video,
.video-frame iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-soon {
  font-family: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  color: var(--grey);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.flag {
  width: 36px; height: 24px;
  background:
    conic-gradient(#fff 90deg, #0d0d0f 90deg 180deg, #fff 180deg 270deg, #0d0d0f 270deg) 0 0 / 12px 12px;
  border: 1px solid #33333a;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 3rem;
}
.gallery-item { overflow: hidden; display: block; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    linear-gradient(180deg, rgba(13,13,15,0.88), rgba(13,13,15,0.88)),
    url("../assets/images/hero-poster.jpg") center / cover no-repeat;
  padding: 110px 0;
  border-top: 4px solid var(--red);
}
.cta-band p { color: var(--grey-light); margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--black);
  border-top: 1px solid #222228;
  padding: 56px 0;
}
.footer-inner { text-align: center; }
.footer nav { margin: 1.4rem 0; display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.footer nav a {
  font-family: var(--heading);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--grey);
}
.footer nav a:hover { color: var(--white); }
.footer p { color: #6b6b72; font-size: 0.8rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10,10,12,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; box-shadow: 0 20px 80px rgba(0,0,0,0.8); }
.lightbox-close {
  position: absolute;
  top: 18px; right: 28px;
  background: none; border: none;
  color: var(--white);
  font-size: 2.6rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .split, .split-rev { grid-template-columns: 1fr; gap: 40px; }
  .split-rev .split-media { order: 1; }
  .split-rev .split-copy { order: 2; }
  .split-media { max-width: 480px; margin: 0 auto; }
  .parts, .video-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 0; right: -280px;
    width: 260px;
    height: 100vh;
    background: var(--dark);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    transition: right 0.3s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,0.6);
  }
  .nav-links.open { right: 0; }
}
@media (max-width: 540px) {
  .section { padding: 64px 0; }
  .gallery { grid-template-columns: 1fr; }
}
