/* ==========================================================================
   Podutty Motorsports — site styles
   TEAM COLOURS: edit the variables below to match the logo.
   ========================================================================== */

:root {
  /* Colours taken from the Podutty logo (images/Podutty logo.svg) */
  --team-dark: #07090d;        /* page background (near-black, matches badge) */
  --team-panel: #10141c;       /* card / panel background */
  --team-accent: #f9214e;      /* Podutty pink-red */
  --team-accent-2: #02e6f9;    /* Podutty cyan */
  --team-text: #f4fefe;        /* main text (logo white) */
  --team-text-dim: #8b94a3;    /* secondary text */
  --team-line: #232a38;        /* borders / dividers */
  --win: #3fb950;              /* podium/win highlight in results */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--team-dark);
  color: var(--team-text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

a { color: var(--team-accent); text-decoration: none; }
a:hover { color: var(--team-accent-2); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }

/* --- Header / nav ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--team-line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--team-text);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand img { height: 40px; width: auto; }
.brand:hover { color: var(--team-accent); }

.site-nav { display: flex; gap: 1.5rem; }

.site-nav a {
  color: var(--team-text-dim);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-nav a:hover, .site-nav a.active { color: var(--team-accent); }

/* --- Hero ---------------------------------------------------------------- */

.hero {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 15% -20%, rgba(2, 230, 249, 0.14), transparent 55%),
    radial-gradient(ellipse at 85% -20%, rgba(249, 33, 78, 0.16), transparent 55%),
    var(--team-dark);
  border-bottom: 1px solid var(--team-line);
}

.hero img.hero-logo {
  /* The wordmark is very wide (4.6:1) so let it breathe */
  max-width: min(620px, 88vw);
  height: auto;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 8px 30px rgba(2, 230, 249, 0.12));
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.hero h1 .accent { color: var(--team-accent); }

.hero p.tagline {
  margin-top: 0.75rem;
  color: var(--team-text-dim);
  font-size: 1.05rem;
}

/* Racing stripe divider — mirrors the swoosh in the logo */
.stripe {
  height: 6px;
  background: linear-gradient(90deg, #02e6f9, #f4fefe 60%, #f9214e);
  transform: skewX(-20deg) scaleX(1.05);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Sections ------------------------------------------------------------ */

section { padding: 3rem 0; }

.section-title {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::before {
  content: "";
  width: 28px;
  height: 4px;
  background: var(--team-accent);
  transform: skewX(-20deg);
}

/* --- Results feed --------------------------------------------------------- */

.feed-status {
  color: var(--team-text-dim);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.feed-status.warn {
  color: var(--team-accent-2);
  border: 1px dashed var(--team-line);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
}

.results-feed { display: grid; gap: 0.85rem; }

.result-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  background: var(--team-panel);
  border: 1px solid var(--team-line);
  border-left: 4px solid var(--team-accent);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
}

.result-card.podium { border-left-color: var(--win); }

.result-pos {
  text-align: center;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
}

.result-pos .label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--team-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-card.podium .result-pos { color: var(--win); }

.result-main .driver { font-weight: 700; }
.result-main .series { color: var(--team-text-dim); font-size: 0.9rem; }

.result-meta {
  text-align: right;
  color: var(--team-text-dim);
  font-size: 0.82rem;
  white-space: nowrap;
}

.result-meta .stat { display: block; }

/* --- Driver grid ----------------------------------------------------------- */

.driver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.driver-card {
  background: var(--team-panel);
  border: 1px solid var(--team-line);
  border-radius: 12px;
  overflow: hidden;
  color: var(--team-text);
  transition: transform 0.15s ease, border-color 0.15s ease;
  display: block;
}

.driver-card:hover {
  transform: translateY(-3px);
  border-color: var(--team-accent);
  color: var(--team-text);
}

.driver-card .photo {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(160deg, rgba(2, 230, 249, 0.18), transparent 45%),
    linear-gradient(340deg, rgba(249, 33, 78, 0.22), transparent 55%),
    var(--team-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(233, 237, 243, 0.35);
}

.driver-card .photo img { width: 100%; height: 100%; object-fit: cover; }

.driver-card .info { padding: 0.9rem 1.1rem 1.1rem; }
.driver-card .info h3 { text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.05rem; }
.driver-card .info p { color: var(--team-text-dim); font-size: 0.85rem; }

/* --- Driver profile page ----------------------------------------------------- */

.driver-hero {
  padding: 3.5rem 0 2.5rem;
  background:
    radial-gradient(ellipse at 20% -30%, rgba(2, 230, 249, 0.12), transparent 55%),
    radial-gradient(ellipse at 80% -30%, rgba(249, 33, 78, 0.16), transparent 55%),
    var(--team-dark);
  border-bottom: 1px solid var(--team-line);
}

.driver-hero .layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: center;
}

.driver-hero .portrait {
  width: 200px;
  height: 200px;
  border-radius: 14px;
  border: 1px solid var(--team-line);
  background: var(--team-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(233, 237, 243, 0.3);
  overflow: hidden;
}

.driver-hero .portrait img { width: 100%; height: 100%; object-fit: cover; }

.driver-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); text-transform: uppercase; letter-spacing: 0.06em; }
.driver-hero .role { color: var(--team-accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; }
.driver-hero .bio { margin-top: 0.75rem; color: var(--team-text-dim); max-width: 60ch; }

/* --- Footer -------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--team-line);
  padding: 2rem 0;
  color: var(--team-text-dim);
  font-size: 0.85rem;
  text-align: center;
}

/* --- Responsive ------------------------------------------------------------------ */

@media (max-width: 640px) {
  .site-nav { gap: 0.9rem; }
  .site-nav a { font-size: 0.78rem; }
  .result-card { grid-template-columns: 56px 1fr; }
  .result-meta { display: none; }
  .driver-hero .layout { grid-template-columns: 1fr; text-align: center; }
  .driver-hero .portrait { margin: 0 auto; }
}
