/* ─────────────────────────────────────────────────────────────
   TCS × MAKITA — Shared brand integration
   Universal treatment applied site-wide. Page-specific accents
   (e.g. lt-* live-timing classes) stay inline on those pages.
   ───────────────────────────────────────────────────────────── */

:root {
  --makita-teal: #00909e;
  --makita-teal-soft: rgba(0, 144, 158, 0.14);
  --makita-teal-edge: rgba(0, 144, 158, 0.45);
}

/* Nav: teal→black gradient + teal-edge bottom border */
.nav,
.nav.scrolled {
  background: linear-gradient(
    90deg,
    var(--makita-teal) 0%,
    rgba(0, 144, 158, 0.55) 22%,
    rgba(5, 5, 5, 0.92) 65%,
    var(--black) 100%
  ) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--makita-teal-edge);
}

/* Compact nav, locked size (no scroll-shrink) */
.nav,
.nav.scrolled { height: 70px; }
.nav__link,
.nav.scrolled .nav__link { line-height: 70px; height: 70px; }
.nav__logo img {
  height: 84px;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
}
@media (max-width: 640px) {
  .nav__logo img { height: 56px; }
}

/* ─── Hero clears the fixed nav with breathing room, site-wide ─────
   Nav is 70px tall + fixed. Heroes need padding-top = nav height
   (so the hero CONTENT clears the nav) PLUS breathing room so the
   eyebrow / title don't feel jammed against the nav's bottom edge.
   The hero BOX still starts at y=0 (background image bleeds behind
   the nav for visual continuity), but the visible content starts
   at y=110 — 40px of clear space below the nav. */
/* The fixed nav no longer overlaps content: offset the page by the nav height
   so heroes begin right below the navbar (cleaner, more photo, more spacing),
   and centre the hero content site-wide. */
body { padding-top: 70px; }
html { scroll-padding-top: 84px; }
.page-hero,
.event-hero {
  padding-top: 52px !important;
  text-align: center;
}
/* Standard page-hero size site-wide (home .hero keeps its own) */
.page-hero {
  min-height: 56vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* Crown divider under every hero's content — red crown flanked by lines
   (a hero-fit take on the /info "People Behind the Series" divider). */
.page-hero .container::after,
.event-hero__inner::after {
  content: '';
  display: block;
  width: clamp(210px, 32vw, 320px);
  height: 30px;
  margin: clamp(24px, 3.2vw, 38px) auto 0;
  background:
    url('/img/tcs-crown-red.svg') center / auto 28px no-repeat,
    linear-gradient(90deg,
      transparent 0%,
      rgba(235,33,39,.55) 34%,
      transparent 42%,
      transparent 58%,
      rgba(235,33,39,.55) 66%,
      transparent 100%) center / 100% 2px no-repeat;
}
.page-hero__sub { margin-left: auto; margin-right: auto; }
.event-hero__inner { text-align: center; }
.event-hero__meta,
.event-hero__countdown-wrap { justify-content: center; }
.hero { padding-top: 0 !important; margin-top: 0 !important; }   /* home slider: body offset handles the nav */
@media (max-width: 640px) {
  body { padding-top: 64px; }
  .page-hero,
  .event-hero { padding-top: 36px !important; }
}

/* Hero: teal glow on title + teal watermark */
.page-hero .page-hero__title {
  text-shadow: 0 0 42px rgba(0, 144, 158, 0.18);
}
/* Remove the giant faint page-title watermark from hero backgrounds */
.page-hero__watermark { display: none !important; }

/* Events mega-menu round status is now marked automatically by js/app.js
   (markNextRound) — completed rounds get a subtle teal + ✓, the next round gets
   the NEXT pill. It advances by gate date, so no per-round CSS edits here. */
.page-hero .page-hero__title .lt-ampersand,
.page-hero .page-hero__title .makita-amp {
  color: var(--makita-teal);
  font-weight: 400;
  padding: 0 0.12em;
}

/* "Presented by Makita" eyebrow rule */
.makita-presents,
.lt-hero-presents {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--makita-teal);
}
.makita-presents::before,
.lt-hero-presents::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--makita-teal);
}
.makita-wordmark,
.lt-hero-makita {
  display: block;
  height: clamp(44px, 6vw, 72px);
  width: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 24px rgba(0, 144, 158, 0.18));
}

/* Boxed "presented by" chip */
.makita-presents-chip,
.lt-presents {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 10px;
  background: var(--makita-teal-soft);
  border: 1px solid var(--makita-teal-edge);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--makita-teal);
  white-space: nowrap;
}
.makita-presents-chip__mark,
.lt-presents__mark { height: 12px; width: auto; }
.makita-presents-chip__sep,
.lt-presents__sep { width: 1px; height: 12px; background: var(--makita-teal-edge); }

/* Side rails: left teal / right red = partnership signal */
body > div[style*="left:0"][style*="width:3px"] { background: var(--makita-teal) !important; }

/* Footer: teal-edge top border */
.footer { border-top: 1px solid var(--makita-teal-edge); }

/* ─────────────────────────────────────────────────────────────
   HERO PARTNERSHIP REVEAL — home page hero
   Premium "Presented By Makita" announcement above the 2026 mark
   ───────────────────────────────────────────────────────────── */

.hero-makita-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(20px, 3vh, 36px);
  opacity: 0;
  animation: heroMakitaIn 1.1s 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  z-index: 4;
}

.hero-makita-reveal__rule {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body, 'Rajdhani', sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--makita-teal);
  white-space: nowrap;
}
.hero-makita-reveal__rule::before,
.hero-makita-reveal__rule::after {
  content: '';
  width: clamp(40px, 9vw, 110px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--makita-teal), transparent);
  opacity: 0;
  animation: heroMakitaRule 0.9s 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-makita-reveal__mark-wrap {
  position: relative;
  display: inline-block;
  isolation: isolate;
}
.hero-makita-reveal__mark {
  display: block;
  height: clamp(34px, 4.5vw, 52px);
  width: auto;
  filter:
    drop-shadow(0 0 18px rgba(0, 144, 158, 0.55))
    drop-shadow(0 0 36px rgba(0, 144, 158, 0.32));
  animation: heroMakitaPulse 4.5s 1.5s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
/* Teal "scanline shine" sweep across the Makita block on entrance */
.hero-makita-reveal__mark-wrap::after {
  content: '';
  position: absolute;
  inset: -4px -8px;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(0, 144, 158, 0.55) 48%,
    rgba(212, 255, 0, 0.35) 50%,
    rgba(0, 144, 158, 0.55) 52%,
    transparent 65%
  );
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  animation: heroMakitaShine 2.2s 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1 forwards;
}

.hero-makita-reveal__tag {
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-makita-reveal__tag strong {
  color: var(--makita-teal);
  font-weight: 700;
  letter-spacing: 0.28em;
}
.hero-makita-reveal__tag-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--makita-teal);
  box-shadow: 0 0 10px var(--makita-teal), 0 0 20px rgba(0, 144, 158, 0.5);
  animation: heroMakitaDot 1.6s ease-in-out infinite;
}

@keyframes heroMakitaIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroMakitaRule {
  from { opacity: 0; transform: scaleX(0.3); }
  to   { opacity: 1; transform: scaleX(1); }
}
@keyframes heroMakitaPulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 18px rgba(0, 144, 158, 0.55))
      drop-shadow(0 0 36px rgba(0, 144, 158, 0.32));
  }
  50% {
    filter:
      drop-shadow(0 0 26px rgba(0, 144, 158, 0.85))
      drop-shadow(0 0 56px rgba(0, 144, 158, 0.5));
  }
}
@keyframes heroMakitaShine {
  0%   { transform: translateX(-120%); opacity: 0; }
  10%  { opacity: 0.85; }
  60%  { opacity: 0.85; }
  100% { transform: translateX(120%); opacity: 0; }
}
@keyframes heroMakitaDot {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-makita-reveal,
  .hero-makita-reveal__mark,
  .hero-makita-reveal__rule::before,
  .hero-makita-reveal__rule::after,
  .hero-makita-reveal__mark-wrap::after,
  .hero-makita-reveal__tag-dot {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   TITLE PARTNER — featured callout (above sponsor marquees / partner grids)
   .tp-featured            → dark surface
   .tp-featured--light     → light cream surface (home Series Sponsors)
   ───────────────────────────────────────────────────────────── */

.tp-featured {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: clamp(32px, 5vw, 56px) 28px clamp(28px, 4vw, 44px);
  background: linear-gradient(180deg, rgba(0, 144, 158, 0.08) 0%, rgba(0, 144, 158, 0.015) 100%);
  border: 1px solid rgba(0, 144, 158, 0.25);
  border-top: 2px solid var(--makita-teal);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.3s, transform 0.4s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}
.tp-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 75% at 50% 50%, rgba(0, 144, 158, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
/* Corner brackets (mirrors live event card treatment) */
.tp-featured::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(0, 144, 158, 0.18);
  border-image: linear-gradient(135deg,
    var(--makita-teal) 0 24px,
    transparent 24px calc(100% - 24px),
    var(--makita-teal) calc(100% - 24px) 100%) 1;
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}
.tp-featured:hover {
  border-color: var(--makita-teal);
  transform: translateY(-2px);
}

.tp-featured__eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body, 'Rajdhani', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--makita-teal);
}
.tp-featured__eyebrow::before,
.tp-featured__eyebrow::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--makita-teal);
}

.tp-featured__mark-wrap {
  position: relative;
  z-index: 1;
  display: inline-block;
}
.tp-featured__mark {
  display: block;
  height: clamp(54px, 7.5vw, 96px);
  width: auto;
  /* No filter / drop-shadow on the Makita mark — respects their brand
     guidelines, which forbid effects on the wordmark. */
  transition: transform 0.4s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}
.tp-featured:hover .tp-featured__mark {
  transform: none;
}

.tp-featured__tag {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-2, rgba(255, 255, 255, 0.6));
  text-align: center;
  max-width: 56ch;
}
.tp-featured__tag em {
  color: #fff;
  font-style: normal;
  font-weight: 700;
}

/* Light-surface variant — editorial / minimalist title-partner panel.
   Brand-respecting: no glow, no radial gradient, no corner brackets.
   Just a clean white surface with one thin Makita-teal hairline up top. */
.tp-featured--light {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-top: 2px solid var(--makita-teal);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 6px 20px rgba(0, 0, 0, 0.035);
  padding: clamp(52px, 7.5vw, 88px) 28px clamp(44px, 6vw, 68px);
  gap: clamp(22px, 3vw, 34px);
  transition: transform 0.4s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
              box-shadow 0.4s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}
/* Suppress the dark variant's decorative ::before (radial) and ::after (corner brackets) */
.tp-featured--light::before,
.tp-featured--light::after {
  display: none;
}
.tp-featured--light:hover {
  border-color: rgba(0, 0, 0, 0.05);
  border-top-color: var(--makita-teal);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 14px 34px rgba(0, 0, 0, 0.06);
}

/* Refined eyebrow — smaller, more letter-spacing, thinner rule */
.tp-featured--light .tp-featured__eyebrow {
  color: var(--makita-teal);
  font-size: 10px;
  letter-spacing: 0.5em;
  gap: 14px;
}
.tp-featured--light .tp-featured__eyebrow::before,
.tp-featured--light .tp-featured__eyebrow::after {
  width: 22px;
  background: rgba(0, 144, 158, 0.45);
}

/* Tag — quiet, small, dark gray */
.tp-featured--light .tp-featured__tag {
  color: rgba(26, 21, 22, 0.55);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.tp-featured--light .tp-featured__tag em {
  color: var(--text-dark, #1a1516);
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────
   Dark sections — replace stark black with a Makita-tinted field.
   Two soft teal radial glows in opposite corners + faint 60px grid.
   Subtle by design; reinforces partnership across every dark band.
   ───────────────────────────────────────────────────────────── */
.section--dark {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 8% 0%,   rgba(0, 144, 158, 0.10), transparent 62%),
    radial-gradient(ellipse 65% 50% at 92% 100%, rgba(0, 144, 158, 0.06), transparent 68%),
    linear-gradient(180deg, #07090a 0%, #050505 70%, #050505 100%);
}
.section--dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.011) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.011) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}
.section--dark > * { position: relative; z-index: 1; }

/* Home page News card date → Makita teal */
.home-news-date {
  color: var(--makita-teal) !important;
  border-top-color: rgba(0, 144, 158, 0.28) !important;
}


/* ── WATCH LIVE nav dropdown (hover on desktop → Live Timing / Ryde TV) ── */
.nav__watch { position: relative; display: inline-block; }
.nav__watch-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 196px;
  background: #0c0c0c; border: 1px solid rgba(235, 33, 39, 0.35);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 1200;
}
.nav__watch:hover .nav__watch-menu,
.nav__watch:focus-within .nav__watch-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}
/* invisible bridge across the 10px gap so the menu doesn't close mid-hover */
.nav__watch-menu::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav__watch-item {
  display: flex; align-items: center; gap: 9px; padding: 12px 14px;
  font-family: var(--font-body, 'Rajdhani', sans-serif); font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: #fff; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav__watch-item:hover { background: rgba(235, 33, 39, 0.16); }
.nav__watch-item + .nav__watch-item { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.nav__watch-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red, #eb2127); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(235, 33, 39, 0.6); animation: navWatchPulse 1.5s ease-out infinite;
}
@keyframes navWatchPulse {
  0% { box-shadow: 0 0 0 0 rgba(235, 33, 39, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(235, 33, 39, 0); }
  100% { box-shadow: 0 0 0 0 rgba(235, 33, 39, 0); }
}
.nav__watch-ext { margin-left: auto; opacity: 0.5; font-size: 12px; }
/* On mobile the dropdown is suppressed — the hamburger menu carries the links */
@media (max-width: 980px) { .nav__watch-menu { display: none; } }

/* Mini in-page tab nav (Recap/About/Venue/Schedule/Race Format/FAQs etc.) —
   center the row on every event page. Plain `center` (the prior `safe center`
   in styles.css was never applied live). Fall back to start-aligned on narrow
   widths so a long tab row stays fully scrollable instead of clipping tab 1. */
.page-tabs__inner { justify-content: center; }
@media (max-width: 560px) { .page-tabs__inner { justify-content: flex-start; } }

/* Compact race-day schedule (event pages) — the 40+ row timeline was one tall
   column = lots of scrolling. Reflow rows as a flex line (time | session) and
   balance them into two columns on desktop, halving the section height. The
   notes column stays hidden (set in styles.css). Self-evident rows, so the
   Time/Session/Notes header row is dropped. */
.race-schedule-table { display: block; padding: 8px 22px 12px; }
.race-schedule-table thead { display: none; }
.race-schedule-table tbody { display: block; }
.race-schedule-table tr {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 0;
  border-bottom: 1px solid rgba(36, 36, 36, 0.55);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}
.race-schedule-table tr:hover { background: rgba(255, 255, 255, 0.02); }
.race-schedule-table td { display: block; padding: 7px 0; border: none; }
.race-schedule-table .rst-time { flex: 0 0 74px; width: 74px; }
.race-schedule-table .rst-event { flex: 1 1 auto; font-size: 13px; letter-spacing: 0.04em; }
@media (min-width: 760px) {
  .race-schedule-table tbody {
    column-count: 2;
    column-gap: 44px;
    column-rule: 1px solid rgba(36, 36, 36, 0.6);
  }
  /* avoid a hairline at the very bottom of each balanced column */
  .race-schedule-table tr:last-child { border-bottom: none; }
}

/* Flip-card race-day countdown (event-page heroes) — replaces the single mono
   "12D 03H 04M 09S" string with four modular flip cards (built by
   js/flip-countdown.js). Each card flips on its horizontal axis as the value
   ticks over, evoking a split-flap clock. */
.event-hero__countdown-wrap .flip-countdown { margin-top: 2px; }
.flip-countdown { display: flex; gap: 10px; perspective: 700px; }
.flip-unit { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.flip-card {
  position: relative;
  min-width: 66px;
  padding: 11px 12px 9px;
  background: rgba(8, 10, 10, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform-origin: 50% 50%;
}
.flip-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
}
.flip-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.55);
}
.flip-card__digit {
  display: block;
  font-family: var(--font-heading);
  font-weight: bold;
  font-size: 46px;
  line-height: 1;
  text-align: center;
  color: #fff;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.flip-unit__label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-2);
}
.flip-card.is-flip { animation: flipReveal 0.45s var(--ease-out); }
@keyframes flipReveal {
  0% { transform: rotateX(90deg); opacity: 0; }
  100% { transform: rotateX(0); opacity: 1; }
}
.flip-countdown__done {
  font-family: var(--font-heading);
  font-weight: bold;
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--red);
}
@media (prefers-reduced-motion: reduce) {
  .flip-card.is-flip { animation: none; }
}
@media (max-width: 560px) {
  .flip-countdown { gap: 7px; }
  .flip-card { min-width: 52px; padding: 9px 8px 7px; }
  .flip-card__digit { font-size: 34px; }
  .flip-unit__label { font-size: 9px; letter-spacing: 0.18em; }
}
