/* ============================================================
   TENNIS JOURNEY — STYLESHEET
   "From Coincidence to Purpose" — Nibin Mathew

   Accessibility is the design brief here, not an afterthought:
   - Every colour pair below is checked against WCAG 2.1 AA
     (4.5:1 for body text, 3:1 for large text/UI).
   - Links are never colour-only — underline + weight carries
     the signal too.
   - Focus states are visible everywhere, motion is optional.
   ============================================================ */

/* ---- Fonts -------------------------------------------------- */
/* Display face: Fraunces — a warm, editorial serif for the
   storytelling voice. Body/UI face: Inter — the same workhorse
   sans already used across the header/footer/nav, kept for
   consistency and because it renders very cleanly for low-vision
   readers at small sizes. */

:root {
    /* ---- Palette (derived from the existing site system) ---- */
    --ink: #1a1a1a;
    /* primary text — 15.8:1 on white */
    --ink-soft: #3d3d3d;
    /* secondary text — 9.7:1 on white */
    --ink-muted: #595959;
    /* tertiary / captions — 7:1 on white */
    --paper: #ffffff;
    --paper-warm: #faf8f5;
    /* section background, off-white */
    --line: #d8d3cb;
    --accent: #005a9c;
    /* existing brand/focus blue — 5.6:1 on white */
    --accent-dark: #003f6e;
    /* accent on dark surfaces */
    --court: #0f3d2e;
    /* deep "tennis court" green, used sparingly */
    --court-tint: #eef4f0;
    --sound: #b5461f;
    /* warm terracotta-red, the "sound of the ball" accent */
    --sound-tint: #fbece5;
    --overlay-dark: rgba(10, 12, 10, 0.62);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--paper);
    color: var(--ink);
    margin: 0;
    line-height: 1.6;
}

h1,
h2,
h3,
.display-font {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.15;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--accent-dark);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
    font-weight: 600;
}

a:hover,
a:focus {
    color: var(--sound);
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   SKIP LINK
   ============================================================ */
#skip-link {
    position: absolute;
    top: -40px;
    left: 218px;
    z-index: 1000;
    padding: .3em .6em;
    font-size: 13px;
    font-weight: bold;
    margin: 3px;
    background-color: #fff;
    color: #000;
    border: 2px solid #000;
    text-decoration: none;
}

#skip-link:focus {
    top: 10px;
    outline: 3px solid #005a9c;
    outline-offset: 2px;
}

/* ============================================================
   NAVBAR / HEADER  (from site system — unchanged)
   ============================================================ */
.navbar {
    font-weight: bold;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 99;
    border-bottom: 1px solid #e0e0e0;
}

nav {
    padding: 10px 5px;
}

nav a {
    color: #1a1a1a;
    font-weight: bold;
    margin: 0 15px;
    padding-right: 5px;
    text-decoration: none;
}

nav a:hover,
nav a:focus,
nav a[aria-current="page"] {
    text-decoration: none;
    color: var(--accent-dark);
}

.navbar-nav {
    margin-left: auto;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ============================================================
   BANNER — 100vh hero
   ============================================================ */
.banner-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 560px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-color: var(--court);
}

.banner-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    z-index: 0;
}

/* Scrim: a bottom-weighted gradient guarantees the headline sits
   on a consistently dark field, whatever photo is dropped in —
   this is what keeps the white text at AA/AAA contrast rather
   than trusting the photo's tone. */
.banner-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(6, 10, 8, 0.88) 0%,
            rgba(6, 10, 8, 0.62) 38%,
            rgba(6, 10, 8, 0.22) 68%,
            rgba(6, 10, 8, 0.35) 100%);
    z-index: 1;
}

.text-overlay {
    position: relative;
    z-index: 2;
    color: #ffffff;
    width: 100%;
    padding: 4rem 5vw 4.5rem;
}

.banner-content {
    max-width: 880px;
}

.banner-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: .4rem .9rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.quote,
.banner .quote {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 600;
    font-style: normal;
    line-height: 1.12;
    margin: 0 0 1.25rem;
    color: #ffffff;
    max-width: 20ch;
}

.h6,
.banner-subhead {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    font-weight: 400;
    color: #f2f0ec;
    max-width: 62ch;
    margin: 0 0 1.75rem;
}

.banner-byline {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
}

.banner-byline .byline-line {
    width: 36px;
    height: 2px;
    background: var(--sound);
    display: inline-block;
}

/* ============================================================
   SIGNATURE ELEMENT — soundwave divider
   Blind tennis turns on one sensory detail: the sound of the
   ball. Every chapter break uses a small soundwave mark instead
   of a generic rule or numbered dot, tying the page's structure
   back to the subject. Purely decorative, so it's hidden from
   assistive tech.
   ============================================================ */
.soundwave {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 22px;
    margin: 0 0 1.25rem;
}

.soundwave span {
    display: inline-block;
    width: 4px;
    background: var(--sound);
    border-radius: 2px;
}

.soundwave span:nth-child(1) {
    height: 40%;
}

.soundwave span:nth-child(2) {
    height: 100%;
}

.soundwave span:nth-child(3) {
    height: 65%;
}

.soundwave span:nth-child(4) {
    height: 85%;
}

.soundwave span:nth-child(5) {
    height: 30%;
}

.soundwave span:nth-child(6) {
    height: 55%;
}

/* ============================================================
   MAIN / ARTICLE LAYOUT
   ============================================================ */
main {
    display: block;
}

.article-intro {
    max-width: 1080px;
    margin: 0 auto;
    padding: 4rem 1.5rem 1rem;
}

.article-intro p {
    font-size: 1.2rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.article-intro p:first-of-type::first-letter {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 3.4rem;
    font-weight: 600;
    float: left;
    line-height: .85;
    padding: .06em .08em 0 0;
    color: var(--sound);
}

.chapter {
    max-width: 1080px;
    margin: 0 auto;
    padding: 3.25rem 1.5rem;
    border-top: 1px solid var(--line);
}

.chapter:first-of-type {
    border-top: none;
}

.chapter-year {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--sound);
    margin: 0 0 .5rem;
}

.chapter h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin: 0 0 1.25rem;
}

.chapter p {
    font-size: 1.08rem;
    color: var(--ink-soft);
    margin: 0 0 1.15rem;
}

.chapter p a,
.article-intro p a {
    color: var(--accent-dark);
}

.pull-quote {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.3rem, 2.4vw, 1.65rem);
    font-weight: 600;
    font-style: italic;
    color: var(--ink);
    border-left: 4px solid var(--sound);
    background: var(--sound-tint);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    line-height: 1.5;
}

.milestone-list {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
    display: grid;
    gap: .75rem;
}

.milestone-list li {
    display: flex;
    gap: .9rem;
    align-items: baseline;
    background: var(--court-tint);
    border-radius: 10px;
    padding: .9rem 1.1rem;
    font-size: 1rem;
    color: var(--ink);
}

.milestone-list .milestone-tag {
    font-weight: 700;
    color: var(--court);
    font-family: 'Inter', sans-serif;
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    padding-top: .15rem;
}

.chapter strong {
    color: var(--ink);
}

/* Support-the-journey callout inside the final chapter */
.callout {
    background: var(--paper-warm);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.75rem;
    margin-top: 1.75rem;
}

.callout p:last-child {
    margin-bottom: 0;
}

.callout-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--court);
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none;
    padding: .8rem 1.4rem;
    border-radius: 999px;
    margin-top: .75rem;
}

.callout-link:hover,
.callout-link:focus {
    background: var(--accent-dark);
    color: #ffffff !important;
}

/* Closing statement */
.article-closing {
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem 1.5rem 5rem;
    text-align: center;
}

.article-closing p {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.3rem, 2.6vw, 1.8rem);
    font-style: italic;
    color: var(--ink);
    line-height: 1.5;
}

/* ============================================================
   FOOTER  (from site system — unchanged)
   ============================================================ */
footer {
    background-color: #000;
    color: #fff;
    border-radius: 25px 25px 0 0;
    padding: 20px 0;
    text-align: center;
}

.navbar-custom {
    background-color: #000;
    padding: 20px;
}

.navbar-custom .nav-link {
    color: #fff;
    margin: 10px 0;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus {
    text-decoration: none;
    color: #fff;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

footer .social-icons a {
    color: #fff;
    margin: 0 10px;
    font-size: 20px;
    text-decoration: none;
}

footer .social-icons a:hover,
footer .social-icons a:focus {
    color: #ccc;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

footer p {
    margin: 10px 0 0;
    color: #fff;
}

.logo-footer {
    width: 150px;
}

.logo-image {
    width: 100%;
    object-fit: cover;
}

.nav-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-outline-light {
    border-width: 2px;
    padding: 18px 30px;
    font-weight: bold;
    border-radius: 30px;
    color: #fff;
    text-decoration: none;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background: #fff;
    color: #000;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
    .banner-section {
        align-items: flex-end;
    }

    .text-overlay {
        padding: 2.5rem 1.25rem 3rem;
    }

    .article-intro,
    .chapter,
    .article-closing {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (max-width: 480px) {
    .banner-eyebrow {
        font-size: .7rem;
    }
}