/* ============================================================
   Rainey Racing — "LOGO LOOK" skin
   ------------------------------------------------------------
   Makes the site match the team banner: the dark background stays,
   the team colours get LOUDER, checkered flags run through the
   whole page, and the banner's angled paint slashes show up behind
   the hero and the headings.

   The clay/brown experiment is gone. Surfaces keep the dark
   purple-black from styles.css, because that is what the banner
   sits on.

   Loads AFTER styles.css. Nothing moves — this is paint only.
   ============================================================ */

/* webfonts are loaded with <link> tags in each page's <head>:
   an @import blocks rendering until it resolves. */

:root {
    /* the four colours straight off the banner */
    --flag-red: #D81F1C;
    --flag-blue: #2563EB;
    --flag-yellow: #FFD400;
    --flag-purple: #7C3AED;
    --checker: repeating-conic-gradient(#000 0 25%, #fff 0 50%);
}

/* ---------- 1. headings: bold condensed, like the banner lettering ---------- */
.section-title,
.hero-title,
.event-title,
.nav-brand,
.footer-brand,
.stat-number,
.score-num,
.package-tier,
.package-price,
.driver-num,
.perf-amt,
.sp-num,
.gw-unit b {
    font-family: 'Oswald', Bahnschrift, 'Arial Narrow', 'Segoe UI', sans-serif;
    letter-spacing: .5px;
}
.section-title { text-transform: uppercase; }

/* ---------- 2. hard edges, like cut vinyl ---------- */
.about-card, .benefit-item, .driver-card, .package-card, .result-card,
.merch-card, .video-card, .sponsor-logo, .spotlight, .perf-card,
.stat, .sched-row, .sched-away, .sched-2027, .season-archive,
.gallery-item, .event-media img, .event-note, .about-logo img,
.contact-form, .payment-box, .origin, .scoreboard, .performance-tier {
    border-radius: 4px;
}
.btn { border-radius: 3px; }

/* ---------- 3. CHECKERED FLAGS ----------
   A flag band across the top of every section, the way the banner
   has them running top and bottom. */
.section { position: relative; }
.section::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 15px;
    background: var(--checker) 0 0 / 15px 15px;
    opacity: .9;
    pointer-events: none;
}

/* a flag down the side of the sponsor package cards */
.package-featured::after,
.package-champion::after {
    content: '';
    position: absolute; top: 0; bottom: 0; left: 0; width: 7px;
    background: var(--checker) 0 0 / 7px 7px;
    opacity: .85;
}
.package-featured, .package-champion { position: relative; }
/* NOTE: no overflow:hidden here - it clips the MOST POPULAR /
   CHAMPIONSHIP KART badges, which sit above the card edge. */

/* flag band across the stats bar and the countdown */
.stats, .countdown { position: relative; }
.stats::after, .countdown::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 12px;
    background: var(--checker) 0 0 / 12px 12px;
    opacity: .85;
}

/* ---------- 4. the banner's paint slashes ----------
   Percentage stops turned into huge bands on a wide hero, so these are
   fixed-width strokes: a thick one with a thin one beside it, the way
   the strokes pair up on the banner. */
.hero::before {
    content: '';
    position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background:
        repeating-linear-gradient(118deg,
            transparent 0 240px,
            rgba(216,31,28,.42) 240px 247px,
            transparent 247px 256px,
            rgba(216,31,28,.22) 256px 259px,
            transparent 259px 760px),
        repeating-linear-gradient(118deg,
            transparent 0 520px,
            rgba(37,99,235,.38) 520px 527px,
            transparent 527px 535px,
            rgba(37,99,235,.20) 535px 538px,
            transparent 538px 980px),
        repeating-linear-gradient(-118deg,
            transparent 0 330px,
            rgba(255,212,0,.30) 330px 335px,
            transparent 335px 344px,
            rgba(124,58,237,.34) 344px 350px,
            transparent 350px 900px);
}

/* a lighter pair of strokes behind each section heading */
.section-head { position: relative; }
.section-head::before {
    content: '';
    position: absolute; left: 50%; top: -10px; width: 520px; height: 96px;
    transform: translateX(-50%);
    pointer-events: none; z-index: 0;
    background:
        repeating-linear-gradient(118deg,
            transparent 0 120px,
            rgba(216,31,28,.20) 120px 125px,
            transparent 125px 132px,
            rgba(37,99,235,.18) 132px 136px,
            transparent 136px 420px),
        repeating-linear-gradient(-118deg,
            transparent 0 220px,
            rgba(255,212,0,.16) 220px 224px,
            transparent 224px 520px);
}
.section-head > * { position: relative; z-index: 1; }

/* ---------- 5. the four-colour rule under each heading ---------- */
.section-head::after {
    background:
        linear-gradient(90deg,
            var(--flag-red) 0 25%,
            var(--flag-yellow) 25% 50%,
            var(--flag-purple) 50% 75%,
            var(--flag-blue) 75% 100%);
    height: 4px;
    width: 200px;
}

/* ---------- 6. louder team colours on the accents ---------- */
.section-kicker { color: var(--flag-yellow); letter-spacing: 3px; }
.about-card { border-top: 3px solid var(--flag-red); }
.benefit-item { border-top: 3px solid var(--flag-blue); }
.perf-card { border-top: 3px solid var(--flag-yellow); }

/* ---------- 7. phones: thinner flags so they do not eat the screen ---------- */
@media (max-width: 760px) {
    .section::before { height: 10px; background-size: 10px 10px; }
    .stats::after, .countdown::after { height: 9px; background-size: 9px 9px; }
    .section-head::before { width: 300px; height: 76px; }
}

/* ============================================================
   MATCH THE BANNER — exact wording and numbers
   Colours sampled straight out of images/brand/rainey-racing-banner.jpg:
     RAINEY  #7800F0      RACING  #FCE400
     #14     #F00000      #10X    #6000E4      #3  #0060F0
   The banner outlines every letter, which is what keeps bright
   purple readable over a photo - so the outlines come too.
   ============================================================ */

:root {
    --banner-purple: #7800F0;
    --banner-yellow: #FCE400;
    --banner-red: #F00000;
    --banner-10x: #6000E4;
    --banner-blue: #0060F0;
}

/* ---------- the wordmark, the way the banner sets it ---------- */
.hero-title {
    font-family: 'Orbitron', 'Racing Sans One', Bahnschrift, sans-serif;
    font-weight: 900;
    color: var(--banner-purple);
    -webkit-text-stroke: .028em #fff;
    paint-order: stroke fill;
    letter-spacing: .055em;      /* room for the stroke */
    text-shadow:
        .022em .03em 0 rgba(0,0,0,.95),
        0 .08em .22em rgba(0,0,0,.7);
}
.hero-title .hero-title-accent {
    font-family: 'Racing Sans One', 'Orbitron', Bahnschrift, sans-serif;
    font-weight: 400;
    color: var(--banner-yellow);
    -webkit-text-stroke: .03em #2a0a4a;
    paint-order: stroke fill;
    letter-spacing: .06em;
    text-shadow:
        .022em .03em 0 rgba(0,0,0,.9),
        0 .07em .2em rgba(0,0,0,.65);
}
.nav-brand { color: var(--banner-purple); }
.nav-brand span { color: var(--banner-yellow); }
.footer-brand { color: var(--banner-yellow); }

/* the banner's bottom line, under the wordmark */
.hero-dirtline {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    margin: 6px auto 20px; max-width: 560px;
    font-family: 'Oswald', Bahnschrift, sans-serif; font-weight: 700;
    font-size: clamp(1rem, 2.6vw, 1.5rem); letter-spacing: 4px;
    text-transform: uppercase; color: #fff;
    text-shadow: 0 3px 12px rgba(0,0,0,.8);
}
.hero-dirtline::before, .hero-dirtline::after {
    content: ''; flex: 1; height: 16px; max-width: 110px;
    background: repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0 / 8px 8px;
    border: 1px solid rgba(255,255,255,.35);
}

/* ---------- every number, in its banner colour ---------- */
.kart-badge-14 { color: var(--banner-red); }
.kart-badge-10x { color: var(--banner-yellow); }
.kart-badge-3 { color: var(--banner-blue); }
.kart-14 { border-top-color: var(--banner-red); }
.kart-10x { border-top-color: var(--banner-yellow); }
.kart-3 { border-top-color: var(--banner-blue); }

.podium-num.num-10x { background: var(--banner-10x); }
.podium-num.num-3 { background: var(--banner-blue); }

.score-travis .score-num { color: var(--banner-yellow); }
.score-ronnie .score-num { color: var(--banner-blue); }

.driver-10x .driver-num { background: var(--banner-10x); color: #fff; }
.driver-3 .driver-num { background: var(--banner-blue); color: #fff; }

/* number plates get the banner's outline treatment */
.driver-num, .podium-num, .kart-badge {
    -webkit-text-stroke: .6px rgba(0,0,0,.55);
    paint-order: stroke fill;
}

/* the colour strips down the driver cards, matched to the plates */
.driver-10x::before { background: linear-gradient(180deg, var(--banner-yellow), var(--banner-10x)); }
.driver-3::before { background: linear-gradient(180deg, var(--banner-blue), var(--banner-yellow)); }

/* ---------- the four-colour rule, now in banner colours ---------- */
.section-head::after {
    background: linear-gradient(90deg,
        var(--banner-red) 0 25%,
        var(--banner-yellow) 25% 50%,
        var(--banner-purple) 50% 75%,
        var(--banner-blue) 75% 100%);
}


/* ============================================================
   THE BANNER'S LETTERING
   ------------------------------------------------------------
   The banner uses two display faces - a blocky italic graffiti
   face for RAINEY and a heavy brush script for RACING. Neither
   is a web font, and a JPEG does not carry the font inside it.

   So two things happen here:
     1. the wordmark itself is the REAL artwork, cropped out of
        the banner, so it is a perfect match rather than a
        lookalike;
     2. headings use Racing Sans One, a free racing display face
        with the same bold italic character.

   Body text deliberately stays readable. Setting paragraphs in a
   brush face would make the sponsorship packages hard to read,
   and selling those is what this site is for.
   ============================================================ */

.section-title,
.event-title,
.nav-brand,
.footer-brand,
.hero-dirtline,
.perf-flag,
.package-tier {
    font-family: 'Racing Sans One', 'Oswald', Bahnschrift, 'Arial Narrow', sans-serif;
    letter-spacing: 1px;
}
/* Racing Sans One is already slanted and loose - do not shout it further */
.section-title { text-transform: none; letter-spacing: .5px; }

/* numbers and money stay in Oswald: easier to read at a glance */
.stat-number, .score-num, .package-price, .driver-num,
.perf-amt, .sp-num, .gw-unit b, .podium-num, .kart-badge {
    font-family: 'Oswald', Bahnschrift, 'Arial Narrow', sans-serif;
}



/* ============================================================
   THE LAYERED LETTERING TREATMENT
   ------------------------------------------------------------
   From Travis's own breakdown of the banner: "black shadows,
   white highlights, and yellow outlines".

   That treatment is what makes the lettering read as the logo -
   more than the typeface does - and unlike the fonts it costs
   nothing, because CSS can build it.

   On the fonts themselves: of the five named, only Racing Sans
   One can be used on a website. Ethnocentric and Good Times are
   commercial licences; Streetwear and Blazed are personal-use
   only. Orbitron is the free stand-in for the squared
   Ethnocentric look, and the hero wordmark is the real artwork
   anyway, so the brush script needs no substitute there.
   ============================================================ */

/* ---------- number plates: heavy squared italic, thickly outlined ---------- */
.kart-badge, .podium-num, .driver-num, .score-num {
    font-family: 'Orbitron', 'Racing Sans One', Oswald, sans-serif;
    font-weight: 900;
    font-style: normal;
    transform: skewX(-8deg);
    display: inline-block;
}
.kart-badge, .score-num {
    -webkit-text-stroke: .055em #000;
    letter-spacing: .06em;
    paint-order: stroke fill;
    text-shadow: 2px 3px 0 rgba(0,0,0,.9);
}
.podium-num, .driver-num {
    -webkit-text-stroke: .045em rgba(0,0,0,.75);
    letter-spacing: .05em;
    paint-order: stroke fill;
    box-shadow: 3px 4px 0 rgba(0,0,0,.55);
}

/* ---------- section headings: black shadow, yellow edge ---------- */
.section-title {
    color: var(--banner-red);
    -webkit-text-stroke: .042em var(--banner-yellow);
    paint-order: stroke fill;
    letter-spacing: .085em;      /* room for the stroke, or the letters merge */
    text-shadow:
        .04em .055em 0 rgba(0,0,0,.92),
        .08em .115em 0 rgba(0,0,0,.5);
}

/* ---------- the banner's bottom line, same treatment ---------- */
.hero-dirtline {
    color: var(--banner-red);
    -webkit-text-stroke: .05em var(--banner-yellow);
    paint-order: stroke fill;
    letter-spacing: .2em;
    text-shadow:
        .04em .06em 0 rgba(0,0,0,.92),
        .07em .1em .18em rgba(0,0,0,.6);
}

/* ---------- tier names pick it up too, lighter ---------- */
.package-tier {
    -webkit-text-stroke: .04em #000;
    paint-order: stroke fill;
    letter-spacing: .06em;
    text-shadow: .03em .05em 0 rgba(0,0,0,.8);
}

/* browsers without -webkit-text-stroke still get a readable outline */
@supports not (-webkit-text-stroke: 1px #000) {
    .section-title {
        color: var(--banner-red);
        text-shadow: -2px -2px 0 var(--banner-yellow), 2px -2px 0 var(--banner-yellow),
                     -2px 2px 0 var(--banner-yellow), 2px 2px 0 var(--banner-yellow),
                     4px 5px 0 rgba(0,0,0,.9);
    }
    .hero-dirtline {
        color: var(--banner-red);
        text-shadow: -2px -2px 0 var(--banner-yellow), 2px -2px 0 var(--banner-yellow),
                     -2px 2px 0 var(--banner-yellow), 2px 2px 0 var(--banner-yellow),
                     3px 4px 0 rgba(0,0,0,.9);
    }
}

/* em-based strokes already scale with the text, so phones need no override.
   Tracking eases off slightly where the headings wrap. */
@media (max-width: 760px) {
    .section-title { letter-spacing: .065em; }
    .hero-dirtline { letter-spacing: .12em; }
}

/* On a narrow screen the hero slashes are the same pixel width but take up
   far more of the view, so they start competing with the wordmark. Ease
   them back on phones rather than removing them. */
@media (max-width: 760px) {
    .hero::before { opacity: .55; }
    .section-head::before { opacity: .7; }
}
