/* Ed Spencer — Motorsport Journalist | concept demo styles */

:root {
  --racing: #E10600;
  --racing-deep: #B30500;
  --paddock: #00D26A;
  --ink: #0B0F14;
  --ink-soft: #11161D;
  --ink-card: #141A22;
  --line: #1E2630;
  --chrome: #C8CDD3;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: var(--ink);
  color: #E7ECF2;
}

.font-display {
  font-family: 'Racing Sans One', Impact, "Arial Narrow", sans-serif;
  letter-spacing: 0.02em;
}

/* Hero speed-line accent under headline */
.speed-underline { position: relative; display: inline-block; }
.speed-underline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 5px;
  background: linear-gradient(90deg, var(--racing) 0%, var(--racing) 70%, transparent 100%);
  border-radius: 2px;
}

/* Grid background */
.grid-bg {
  background-image:
    linear-gradient(rgba(225,6,0,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225,6,0,0.08) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* Subtle radial glow on hero */
.glow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 0%, rgba(225,6,0,0.22) 0%, transparent 60%);
  pointer-events: none;
}

/* Checkered finish-line strip */
.checker {
  background-image:
    linear-gradient(45deg, #fff 25%, transparent 25%),
    linear-gradient(-45deg, #fff 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #fff 75%),
    linear-gradient(-45deg, transparent 75%, #fff 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}

/* Card */
.card {
  background: var(--ink-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(225,6,0,0.5);
  box-shadow: 0 20px 40px -22px rgba(225,6,0,0.4);
}

/* Buttons */
.btn-primary {
  background: var(--racing);
  color: #fff;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.875rem 1.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  box-shadow: 0 12px 30px -14px rgba(225,6,0,0.7);
}
.btn-primary:hover { background: var(--racing-deep); transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-weight: 500;
  border-radius: 9999px;
  padding: 0.875rem 1.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color .2s ease, background .2s ease;
}
.btn-ghost:hover { border-color: var(--racing); background: rgba(225,6,0,0.08); }

/* Tag pill */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(225,6,0,0.12);
  color: #FF6B66;
  border: 1px solid rgba(225,6,0,0.3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tag.green { background: rgba(0,210,106,0.10); color: #6FE5A8; border-color: rgba(0,210,106,0.3); }
.tag.neutral { background: rgba(255,255,255,0.06); color: #C8CDD3; border-color: rgba(255,255,255,0.12); }

/* Nav link underline */
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--racing);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

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

/* Focus */
:focus-visible {
  outline: 2px solid var(--racing);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Sticky nav background on scroll */
#site-nav.is-scrolled {
  background-color: rgba(11, 15, 20, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Mobile menu panel */
.mobile-panel {
  transform: translateX(100%);
  transition: transform .3s ease;
}
.mobile-panel.open { transform: translateX(0); }

/* Marquee */
.marquee {
  display: flex;
  overflow: hidden;
  gap: 3rem;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.marquee-track {
  display: flex;
  gap: 3rem;
  animation: marquee 32s linear infinite;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Telemetry-style stat ring */
.stat-ring {
  --val: 75;
  background: conic-gradient(var(--racing) calc(var(--val) * 1%), rgba(255,255,255,0.08) 0);
  border-radius: 9999px;
  padding: 3px;
}
.stat-ring > div {
  background: var(--ink-card);
  border-radius: 9999px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Quote */
.quote-mark {
  font-family: 'Racing Sans One', serif;
  font-size: 6rem;
  line-height: 0.8;
  color: var(--racing);
  opacity: 0.45;
}

/* Filter buttons */
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  color: #C8CDD3;
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
  cursor: pointer;
}
.filter-btn:hover { border-color: rgba(225, 6, 0, 0.5); }
.filter-btn.is-active {
  background: var(--racing);
  color: #fff;
  border-color: var(--racing);
}

/* Image fallback */
.img-fallback {
  background: linear-gradient(120deg, var(--ink-soft) 0%, var(--ink-card) 100%);
  position: relative;
  overflow: hidden;
}
.img-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 80% at 10% 50%, rgba(225,6,0,0.25) 0%, transparent 70%);
}

/* Demo banner — concept disclaimer at top of every page */
.demo-banner {
  background: rgba(255, 200, 0, 0.08);
  border-bottom: 1px solid rgba(255, 200, 0, 0.25);
  color: #FFE08A;
  font-size: 12px;
  text-align: center;
  padding: 8px 16px;
  letter-spacing: 0.02em;
}
