/* =============================================================================
   PBPR: Global Styles (v3 interim site)
   New PBPR brand: soft black #1D1D1D, red #C8102E (buttons + highlights only),
   grey #666666, white. Montserrat for headings + body, Space Mono for labels + buttons.
   ========================================================================== */
/* ───────────────────────────────────────────────────────────────────────────
   1. Design Tokens
   ─────────────────────────────────────────────────────────────────────────── */
:root {
    /* Color — refined editorial palette */
    --color-ink:        #1D1D1D;   /* soft black: text on light + dark surfaces */
    --color-ink-soft:   #1D1D1D;
    --color-graphite:   #1D1D1D;
    --color-slate:      #666666;   /* grey: secondary text */
    --color-mist:       rgba(255, 255, 255, 0.66);   /* muted text on soft black */
    --color-bone:       #E4E4E4;   /* hairline divider on white */
    --color-line-dark:  rgba(255, 255, 255, 0.12);   /* hairline divider on soft black */
    --color-paper:      #FFFFFF;
    --color-canvas:     #FFFFFF;
    --color-snow:       #FFFFFF;
    /* The accent: PBPR red, buttons and highlights only */
    --color-accent:        #C8102E;
    --color-accent-deep:   #A30C25;
    --color-accent-soft:   rgba(200, 16, 46, 0.07);
    --color-accent-line:   rgba(200, 16, 46, 0.3);
    /* Typography */
    --font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body:    'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    'Space Mono', 'Courier New', monospace;
    /* Scale (fluid, mobile-first base) */
    --fs-eyebrow:   0.75rem;   /* 12px */
    --fs-micro:     0.8125rem; /* 13px */
    --fs-small:     0.875rem;  /* 14px */
    --fs-body:      1rem;      /* 16px */
    --fs-lead:      1.125rem;  /* 18px */
    --fs-h6:        1.125rem;
    --fs-h5:        1.375rem;
    --fs-h4:        1.75rem;
    --fs-h3:        2.25rem;
    --fs-h2:        clamp(2rem, 1.2rem + 2.6vw, 3.4rem);
    --fs-h1:        clamp(2.75rem, 9vw, 6.25rem);
    --fs-display:   clamp(3.5rem, 12vw, 9rem);
    /* Spacing */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.5rem;
    --space-6:  2rem;
    --space-7:  3rem;
    --space-8:  4rem;
    --space-9:  6rem;
    --space-10: 8rem;
    --space-11: 12rem;
    /* Layout */
    --container-max: 1320px;
    --container-pad: 1.5rem;
    --header-h:      72px;
    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in:  cubic-bezier(0.64, 0, 0.78, 0);
    --ease:     cubic-bezier(0.65, 0.05, 0.36, 1);
    /* Effects */
    --shadow-card: 0 30px 60px -30px rgba(29, 29, 29, 0.18);
    --shadow-soft: 0 12px 32px -12px rgba(29, 29, 29, 0.12);
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   16px;
}
/* ───────────────────────────────────────────────────────────────────────────
   2. Reset / Base
   ─────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--fs-body);
    line-height: 1.7;
    color: var(--color-ink);
    background: var(--color-paper);
    overflow-x: hidden;
}
img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s var(--ease-out);
}
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}
ul {
    list-style: none;
}
::selection {
    background: var(--color-accent);
    color: var(--color-snow);
}
/* Accessibility skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-ink);
    color: var(--color-snow);
    padding: 1rem 1.5rem;
    z-index: 9999;
    font-size: var(--fs-small);
}
.skip-link:focus {
    left: 0;
}
/* ───────────────────────────────────────────────────────────────────────────
   3. Typography
   ─────────────────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.h-display {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--color-ink);
    text-wrap: balance;
}
p { text-wrap: pretty; }
.nowrap { white-space: nowrap; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: 700; }
h5 { font-size: var(--fs-h5); font-weight: 600; }
h6 { font-size: var(--fs-h6); font-weight: 600; }
.eyebrow {
    font-family: var(--font-mono);
    font-size: var(--fs-eyebrow);
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-slate);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}
.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--color-accent);
}
.eyebrow--center::before {
    display: none;
}
.eyebrow--center {
    justify-content: center;
}
.eyebrow--center::after {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--color-accent);
    margin-left: 0.75rem;
}
.eyebrow--center::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 1px;
    background: var(--color-accent);
    margin-right: 0.75rem;
}
p { max-width: 65ch; }
.lead {
    font-size: var(--fs-lead);
    color: var(--color-graphite);
    line-height: 1.6;
}
em, .accent-text {
    font-family: inherit;
    font-style: normal;
    color: var(--color-accent);
    font-weight: inherit;
}
.section--dark .eyebrow { color: var(--color-mist); }
.section--dark p { color: var(--color-mist); }
/* ───────────────────────────────────────────────────────────────────────────
   4. Layout primitives
   ─────────────────────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}
.section {
    padding: var(--space-9) 0;
    position: relative;
    scroll-margin-top: var(--header-h);
}
.section--tight   { padding: var(--space-8) 0; }
.section--spacious{ padding: var(--space-10) 0; }
.section--dark    { background: var(--color-ink); color: var(--color-snow); }
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--color-snow); }
.section--canvas  { background: var(--color-canvas); }
/* Section heading block */
.section-head {
    margin-bottom: var(--space-8);
    max-width: 720px;
}
.section-head--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.section-head__title {
    margin-top: var(--space-4);
}
.section-head__lead {
    margin-top: var(--space-4);
    color: var(--color-slate);
}
/* ───────────────────────────────────────────────────────────────────────────
   5. Logo
   ─────────────────────────────────────────────────────────────────────────── */
.site-header__logo,
.site-footer__logo {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.3s var(--ease-out);
}
.site-header__logo:hover,
.site-footer__logo:hover {
    opacity: 0.75;
}
.site-header__logo-img {
    height: 30px;
    width: auto;
    display: block;
    transition: opacity 0.4s var(--ease-out);
}
.site-footer__logo-img {
    height: 38px;
    width: auto;
    display: block;
    /* Logo already has its own colour (white lettering + red B) — no invert. */
}
/* Logo already has its own colour (white lettering + red B), so no invert is
   applied when the header sits over the dark hero. */
/* Legacy wordmark — kept available as a CSS class in case it's needed elsewhere */
.logo-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: inherit;
}
.logo-mark__dot {
    width: 10px;
    height: 10px;
    background: var(--color-accent);
    border-radius: 50%;
}
.logo-mark__text {
    font-style: italic;
}
/* ───────────────────────────────────────────────────────────────────────────
   6. Site header
   ─────────────────────────────────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid transparent;
    transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    border-bottom-color: var(--color-bone);
}
/* Dark hero — invert header initially */
.site-header.is-over-dark {
    background: transparent;
    color: var(--color-snow);
}
.site-header.is-over-dark .logo-mark {
    color: var(--color-snow);
}
.site-header.is-over-dark .site-nav__link {
    color: var(--color-snow);
}
.site-header.is-over-dark .site-nav__cta {
    border-color: rgba(255,255,255,0.3);
    color: var(--color-snow);
}
.site-header.is-over-dark .site-nav__toggle-bar {
    background: var(--color-snow);
}
.site-header__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1.25rem var(--container-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
/* ───────────────────────────────────────────────────────────────────────────
   7. Primary nav
   ─────────────────────────────────────────────────────────────────────────── */
.site-nav__list {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}
.site-nav__link {
    position: relative;
    font-size: var(--fs-small);
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--color-ink);
    padding: 0.25rem 0;
}
.site-nav__link-text {
    position: relative;
    display: inline-block;
}
.site-nav__link-text::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 1px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease-out);
}
.site-nav__link:hover .site-nav__link-text::after,
.site-nav__link.is-active .site-nav__link-text::after {
    transform: scaleX(1);
}
.site-nav__link.is-active {
    color: var(--color-accent);
}
.site-nav__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--color-ink);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-ink);
    transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.site-nav__cta:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-snow);
}
.site-nav__cta svg {
    transition: transform 0.3s var(--ease-out);
}
.site-nav__cta:hover svg {
    transform: translateX(3px);
}
/* Hamburger (mobile) */
.site-nav__toggle {
    display: none;
    width: 36px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
    z-index: 101;
}
.site-nav__toggle-bar {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-ink);
    transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(2) {
    opacity: 0;
}
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}
/* ───────────────────────────────────────────────────────────────────────────
   8. Buttons
   ─────────────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    font-family: var(--font-mono);
    font-size: var(--fs-small);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.4s var(--ease-out);
    cursor: pointer;
    white-space: nowrap;
}
.btn svg {
    transition: transform 0.4s var(--ease-out);
}
.btn:hover svg {
    transform: translateX(4px);
}
.btn--primary {
    background: var(--color-ink);
    color: var(--color-snow);
    border-color: var(--color-ink);
}
.btn--primary:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}
.btn--accent {
    background: var(--color-accent);
    color: var(--color-snow);
    border-color: var(--color-accent);
}
.btn--accent:hover {
    background: var(--color-accent-deep);
    border-color: var(--color-accent-deep);
}
.btn--ghost {
    background: transparent;
    color: var(--color-ink);
    border-color: var(--color-ink);
}
.btn--ghost:hover {
    background: var(--color-ink);
    color: var(--color-snow);
}
.btn--ghost-light {
    background: transparent;
    color: var(--color-snow);
    border-color: rgba(255,255,255,0.4);
}
.btn--ghost-light:hover {
    background: var(--color-snow);
    color: var(--color-ink);
    border-color: var(--color-snow);
}
/* ───────────────────────────────────────────────────────────────────────────
   9. Site footer
   ─────────────────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--color-ink);
    color: var(--color-mist);
    padding: var(--space-9) 0 var(--space-5);
}
.site-footer__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-7);
    padding-bottom: var(--space-8);
    border-top: 1px solid var(--color-line-dark);
    padding-top: var(--space-8);
    border-bottom: 1px solid var(--color-line-dark);
}
.site-footer__col--brand .logo-mark {
    color: var(--color-snow);
    font-size: 1.75rem;
}
.site-footer__tagline {
    margin-top: var(--space-4);
    color: var(--color-mist);
    font-size: var(--fs-small);
    line-height: 1.7;
    max-width: 32ch;
}
.site-footer__tagline em {
    color: var(--color-snow);
    font-weight: 600;
}
.site-footer__heading {
    color: var(--color-snow);
    font-family: var(--font-mono);
    font-size: var(--fs-eyebrow);
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: var(--space-4);
}
.site-footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.site-footer__list li,
.site-footer__list a {
    font-size: var(--fs-small);
    color: var(--color-mist);
    transition: color 0.3s var(--ease-out);
}
.site-footer__list a:hover {
    color: var(--color-snow);
}
.site-footer__bar {
    margin-top: var(--space-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--fs-micro);
    color: var(--color-mist);
}
.site-footer__credit a {
    color: var(--color-mist);
}
.site-footer__credit a:hover {
    color: var(--color-accent);
}
/* ───────────────────────────────────────────────────────────────────────────
   10. Utility — reveal on scroll
   ─────────────────────────────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }
.reveal[data-delay="6"] { transition-delay: 0.48s; }
/* ───────────────────────────────────────────────────────────────────────────
   11. Back to top
   ─────────────────────────────────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 90;
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-snow);
    cursor: pointer;
    /* Hidden until the user scrolls down */
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    transition: opacity 0.4s var(--ease-out),
                transform 0.4s var(--ease-out),
                background 0.3s var(--ease-out);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--color-accent-deep);
}
.back-to-top:focus-visible {
    outline: 2px solid var(--color-snow);
    outline-offset: 3px;
}
@media (max-width: 600px) {
    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 2.75rem;
        height: 2.75rem;
    }
}
