/* Malmesbury Golf Club - Shared CSS */
/* Design system: forest / gold / paper. Display type = serif, body = Montserrat. */

/* ---------- Font Face Declarations ---------- */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat/Montserrat-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat/Montserrat-Italic-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* ---------- Design Tokens ---------- */
:root {
    --forest: #0b3026;
    --forest-deep: #06231b;
    --forest-mid: #133d31;
    --cream: #f4f0e6;
    --paper: #fbfaf5;
    --gold: #d7a82c;
    --gold-light: #f3ca5c;
    --ink: #18201d;
    --muted: #637069;
    --line: rgba(24, 32, 29, 0.14);

    --font-display: Georgia, 'Times New Roman', serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

img, svg, video, canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
}

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

/* ---------- Layout Shell ---------- */
.section-shell {
    width: min(1440px, 100% - 48px);
    margin-inline: auto;
}

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

/* ---------- Shared Type Utilities ---------- */
.eyebrow {
    color: #4d665c;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 18px;
    font-size: 12px;
    font-weight: 800;
    font-family: var(--font-body);
}

.eyebrow.light {
    color: #f1cc69;
}

.section-heading h2 {
    font-family: var(--font-display);
    letter-spacing: -0.045em;
    margin: 0;
    font-size: clamp(48px, 5.2vw, 82px);
    font-weight: 400;
    line-height: 1.02;
}

.split-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
}

.section-side-copy {
    max-width: 430px;
    color: var(--muted);
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.7;
}

/* ---------- Buttons ---------- */
.button {
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    min-height: 50px;
    padding: 14px 22px;
    font-size: 14px;
    font-weight: 800;
    font-family: var(--font-body);
    transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-gold {
    background: var(--gold);
    color: #13231d;
}

.button-gold:hover {
    background: var(--gold-light);
}

.button-dark {
    background: var(--forest);
    color: #fff;
}

.button-dark:hover {
    background: var(--forest-mid);
}

.text-link {
    border-bottom: 1px solid;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 750;
}

.light-link {
    color: #fff;
}

/* ---------- Page Header (interior pages) ---------- */
.page-header {
    background: var(--forest);
    color: #fff;
    padding: clamp(90px, 11vw, 150px) 0 clamp(60px, 7vw, 90px);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(48px, 6vw, 92px);
    letter-spacing: -0.045em;
    line-height: 1;
    margin: 0;
}

.page-header p {
    color: rgba(255, 255, 255, 0.68);
    max-width: 680px;
    margin: 26px 0 0;
    font-size: 16px;
    line-height: 1.75;
}

/* ---------- Loading Overlay ---------- */
#loading-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: var(--forest-deep);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

/* Full-bleed cream band — the logo's dark wordmark is lost on the forest
   background without it. */
#loading-logo-band {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: clamp(26px, 5vw, 42px) 24px;
    background: var(--cream);
}

#loading-icon {
    width: 15rem;
    max-width: min(70vw, 320px);
    height: auto;
    object-fit: contain;
    animation: pulse-fade 1.8s ease-in-out infinite;
}

@keyframes pulse-fade {
    0%, 100% { opacity: 0.72; transform: scale(0.99); }
    50% { opacity: 1; transform: scale(1); }
}

#loading-bar-container {
    margin-top: 3.75rem;
    width: 12.5rem;
    height: 0.25rem;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 6.25rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}

#loading-bar {
    height: 100%;
    background: var(--gold);
    border-radius: 6.25rem;
    transition: width 0.3s ease;
    width: 0%;
}

#loading-status {
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
    min-height: 1rem;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 0.5rem;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--forest);
    border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--forest-mid);
}

/* ---------- Motion Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .split-heading {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 680px) {
    .section-shell {
        /* Mobile gutter: 24px each side. The header, the full-bleed bands and
           the edge-to-edge scrollers below all key off this same value. */
        width: min(100% - 48px, 1440px);
    }

    .container {
        padding: 0 0.9375rem;
    }

    .section-heading h2 {
        font-size: 47px;
    }

    body {
        font-size: 16px;
    }
}
