/*
 * World's Toughest Row - site-wide design (v271)
 *
 * Home's design on every other page, from Carsten's "Rules for the whole
 * site" and Final polish 0 and 8:
 * - Headlines in Anton, line spacing about 1.0. All other text stays Inter.
 * - Section headlines about 56px on laptops, so the hero is the one big moment.
 * - Small blue labels above headlines, 12px.
 * - One main button everywhere: solid light blue, dark text, no glow.
 * - About 70px above and below each section, alternating black and
 *   near-black, never navy.
 * - Cards: #161616 with a thin #262626 border.
 * Loaded after main.css and chrome.css on every page except Home (which has
 * home.css) and the Connect micro-site (its own design).
 */

/* ---------- Headlines ---------- */
body:not(.wtr-h-page) main :is(h1, h2, h3),
body:not(.wtr-h-page) main :is(h1, h2, h3) :is(span, strong, em, b) {
    font-family: var(--wtr-font-display) !important;
    font-weight: 400 !important;
    font-style: normal !important;
    letter-spacing: .005em !important;
    line-height: 1 !important;
    text-shadow: none !important;
}
body:not(.wtr-h-page) main :is(h1, h2, h3) {
    text-transform: uppercase !important;
}
/* Headlines are white, as on Home (the older design coloured half of each one). */
body:not(.wtr-h-page) main :is(h1, h2, h3),
body:not(.wtr-h-page) main :is(h1, h2, h3) :is(span, strong, em, b) {
    color: var(--wtr-c-text) !important;
    -webkit-text-fill-color: currentColor;
    background-image: none;
}
/* Hero: the one big moment on each page. */
body:not(.wtr-h-page) main h1 {
    font-size: clamp(48px, 4.6vw + 18px, 96px) !important;
    max-width: 16ch;
}
/* Section headlines, about 56px on laptops. */
body:not(.wtr-h-page) main h2 {
    font-size: clamp(34px, 2.6vw + 18px, 56px) !important;
}
/* Card and box titles. */
body:not(.wtr-h-page) main h3 {
    font-size: clamp(20px, .7vw + 15px, 28px) !important;
}
/* Headlines inside small boxes and side panels stay in proportion. */
body:not(.wtr-h-page) main :is(aside, [class$="-card"], [class*="-card "], [class$="-panel"], [class*="-panel "], [class$="-box"], [class*="-box "]) h2 {
    font-size: clamp(24px, 1.2vw + 16px, 34px) !important;
}

/* ---------- Text ---------- */
body:not(.wtr-h-page) main :is(p, li, td, th, dd, label, input, select, textarea, button) {
    font-family: var(--wtr-font-body);
}
body:not(.wtr-h-page) main p {
    line-height: 1.55;
}
/* The text under a headline is soft white, as on Home (not light blue). */
body:not(.wtr-h-page) main :is(h1, h2) ~ p:not([class*="eyebrow"]):not([class*="label"]):not([class*="kicker"]) {
    color: var(--wtr-c-text-soft) !important;
}

/* ---------- Small blue labels ---------- */
body:not(.wtr-h-page) main :is(.wtr-v23-eyebrow, .wtr-lp-eyebrow, .wtr-eyebrow) {
    color: var(--wtr-c-accent) !important;
    font-family: var(--wtr-font-body) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .16em !important;
    line-height: 1.3 !important;
    text-transform: uppercase !important;
    text-shadow: none !important;
}

/* ---------- Buttons: the same as Home ---------- */
body:not(.wtr-h-page) main :is(.wtr-v23-btn, .wtr-lp-btn, .wtr-btn) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    min-height: 50px !important;
    padding: 0 26px !important;
    border: 1px solid transparent !important;
    border-radius: 3px !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
    font-family: var(--wtr-font-body) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .14em !important;
    line-height: 1 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    text-transform: uppercase !important;
    white-space: nowrap;
    transform: none !important;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease !important;
}
/* Main button: solid light blue, dark text. */
body:not(.wtr-h-page) main :is(.wtr-v23-btn.primary, .wtr-lp-btn.primary, .wtr-btn-primary) {
    background: var(--wtr-c-accent) !important;
    border-color: var(--wtr-c-accent) !important;
    color: var(--wtr-c-on-accent) !important;
}
body:not(.wtr-h-page) main :is(.wtr-v23-btn.primary, .wtr-lp-btn.primary, .wtr-btn-primary):is(:hover, :focus-visible) {
    background: var(--wtr-c-accent-hover) !important;
    border-color: var(--wtr-c-accent-hover) !important;
}
/* Second button: outlined. */
body:not(.wtr-h-page) main :is(.wtr-v23-btn.ghost, .wtr-lp-btn.ghost, .wtr-btn-ghost, .wtr-v23-btn.secondary, .wtr-lp-btn.secondary) {
    background: transparent !important;
    border-color: rgba(255, 255, 255, .55) !important;
    color: var(--wtr-c-text) !important;
}
body:not(.wtr-h-page) main :is(.wtr-v23-btn.ghost, .wtr-lp-btn.ghost, .wtr-btn-ghost, .wtr-v23-btn.secondary, .wtr-lp-btn.secondary):is(:hover, :focus-visible) {
    border-color: var(--wtr-c-accent) !important;
    color: var(--wtr-c-accent) !important;
}
body:not(.wtr-h-page) main :is(.wtr-v23-btn, .wtr-lp-btn, .wtr-btn):focus-visible {
    outline: 2px solid var(--wtr-c-accent) !important;
    outline-offset: 3px !important;
}
body:not(.wtr-h-page) main :is(.wtr-v23-buttons, .wtr-lp-buttons) {
    display: flex;
    flex-wrap: wrap;
    gap: 14px !important;
}

/* ---------- Sections: about 70px, alternating black and near-black ---------- */
body:not(.wtr-h-page) main > section:not(:first-of-type) {
    padding-top: 72px !important;
    padding-bottom: 72px !important;
}
body:not(.wtr-h-page) main > section:not(:first-of-type):nth-of-type(odd) {
    background-color: var(--wtr-c-bg) !important;
}
body:not(.wtr-h-page) main > section:not(:first-of-type):nth-of-type(even) {
    background-color: var(--wtr-c-bg-2) !important;
}
body:not(.wtr-h-page) main {
    background-color: var(--wtr-c-bg);
    overflow-x: clip; /* nothing makes the page scroll sideways (History's timeline did) */
}

/* ---------- Cards and boxes ---------- */
body:not(.wtr-h-page) main :is([class$="-card"], [class*="-card "]):not(a):not(img) {
    border-color: var(--wtr-c-card-line) !important;
    border-radius: 14px;
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {
    body:not(.wtr-h-page) main > section:not(:first-of-type) {
        padding-top: 56px !important;
        padding-bottom: 56px !important;
    }
    body:not(.wtr-h-page) main h1 {
        font-size: clamp(40px, 11vw, 56px) !important;
    }
    body:not(.wtr-h-page) main h2 {
        font-size: clamp(30px, 8vw, 40px) !important;
    }
    body:not(.wtr-h-page) main :is(.wtr-v23-btn, .wtr-lp-btn, .wtr-btn) {
        white-space: normal;
        text-align: center;
    }
}

/* v275: photos on pages built from sections keep the face in view ("Where the face is"). */
img[data-wtr-photo] {
    object-position: var(--wtr-px, 50%) var(--wtr-py, 50%);
}
@media (max-width: 767px) {
    img[data-wtr-photo] {
        object-position: var(--wtr-px-m, var(--wtr-px, 50%)) var(--wtr-py-m, var(--wtr-py, 50%));
    }
}

/* ======================================================================
 * 276.78: Carsten's rules for the whole site on the Enter, About and
 * Contact pages (Barry's review, 18 Nov). Headlines in Anton, no navy,
 * nothing under 14px, Start your row lined up with the menu, and the
 * main button for every entry button.
 * ====================================================================== */

/* Headlines: Anton (Carsten: "Headlines: Anton ... All other text stays Inter"). These titles were set in bold Inter. */
body:not(.wtr-h-page) main :is(.wtr-about-hero-card, .wtr-history-hero-card, .wtr-partners-hero-card, .wtr-crew-hero-card, .wtr-boats-hero-card, .wtr-contact-hero-card) strong,
body:not(.wtr-h-page) main .wtr-about-proof-grid article > strong,
body:not(.wtr-h-page) main .wtr-history-era-grid strong,
body:not(.wtr-h-page) main .wtr-history-proof-grid strong,
body:not(.wtr-h-page) main .wtr-history-operation-grid article > span:first-child,
body:not(.wtr-h-page) main .wtr-history-rail-top strong,
body:not(.wtr-h-page) main .wtr-history-modal-item strong,
body:not(.wtr-h-page) main .wtr-partners-story-points strong,
body:not(.wtr-h-page) main .wtr-v23-stats strong,
body:not(.wtr-h-page) main .wtr-v23-compare-text strong,
body:not(.wtr-h-page) main .wtr-v23-percent {
    font-family: var(--wtr-font-display) !important;
    font-weight: 400 !important;
    letter-spacing: .005em !important;
    line-height: 1 !important;
    text-transform: uppercase;
}
body:not(.wtr-h-page) main .wtr-v23-percent { letter-spacing: 0 !important; }

/* Start your row: the questions read like the race pages' big questions */
body:not(.wtr-h-page) main .wtr-startrow-faq summary {
    font: 400 22px/1.1 var(--wtr-font-display) !important;
    letter-spacing: .01em;
    text-transform: uppercase;
}

/* No navy anywhere (Carsten, 30 Oct: black #000000, near-black #0D0D0D). Boats & Classes' hero was navy. */
.wtr-boats-page .wtr-boats-hero { background: #000 !important; }
.wtr-boats-page .wtr-boats-hero::before {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, .66) 44%, rgba(0, 0, 0, .22)),
        linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .85)),
        var(--wtr-boats-hero, none) center / cover no-repeat !important;
}
.wtr-boats-page .wtr-boats-hero::after { background: linear-gradient(180deg, transparent, #0d0d0d) !important; }
/* Boats & Classes' orange notes become the site's boxes (#161616, thin #262626 border) with a light blue line on the left */
body:not(.wtr-h-page) main :is(.wtr-boats-warning, .wtr-boats-legacy-card) {
    background: #161616 !important;
    border: 1px solid #262626 !important;
    border-left: 3px solid var(--wtr-c-accent) !important;
    color: rgba(255, 255, 255, .85) !important;
}
body:not(.wtr-h-page) main .wtr-boats-legacy-card p { color: rgba(255, 255, 255, .85) !important; }

/* Never smaller than 14px (Carsten, Final polish 8): the History timeline cards were 11px */
body:not(.wtr-h-page) main .wtr-history-rail-body p { font-size: 14px !important; line-height: 1.45 !important; }

/* Start your row and Contact (276.80): the hero lines up with the menu (it sat in a narrower column), without the
   empty space under it. Only the alignment and spacing; Contact's design waits for Carsten ("don't style it yet"). */
body.wtr-contact-minimal .wtr-contact-hero-grid { max-width: none !important; }
body.wtr-contact-minimal .wtr-contact-hero { min-height: 0 !important; padding: 96px 0 64px !important; }
@media (max-width: 740px) {
    body.wtr-contact-minimal .wtr-contact-hero { padding: 64px 0 48px !important; }
}

/* One main button per row: next to "Start your row", any other solid button takes the outlined style (as on Home and the race pages) */
body:not(.wtr-h-page) main :is(.wtr-v23-buttons, .wtr-a8-buttons, [class*="-buttons"], [class*="-actions"]):has(> .is-entry) > :is(.wtr-v23-btn, .wtr-lp-btn).primary:not(.is-entry) {
    background: transparent !important;
    border-color: rgba(255, 255, 255, .55) !important;
    color: var(--wtr-c-text) !important;
}
body:not(.wtr-h-page) main :is(.wtr-v23-buttons, .wtr-a8-buttons, [class*="-buttons"], [class*="-actions"]):has(> .is-entry) > :is(.wtr-v23-btn, .wtr-lp-btn).primary:not(.is-entry):is(:hover, :focus-visible) {
    border-color: var(--wtr-c-accent) !important;
    color: var(--wtr-c-accent) !important;
}
body:not(.wtr-h-page) main .wtr-history-rail-note { font-size: 14px !important; }
