/* Darwin Leopards FC - styles. Change colours in :root below. */
:root {
    --bg: #fffaf0;
    --surface: #ffffff;
    --text: #1b1b1b;
    --muted: #5f5a50;
    --accent: #e08a00;
    --dark: #111111;
    --border: #eadfc8;
    --header: #0a0a0a; /* matches the black of the logo image */
    --gold: #f5a623;
    --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #121212;
        --surface: #1c1c1c;
        --text: #f3efe6;
        --muted: #b5ad9c;
        --accent: #f5a623;
        --dark: #000000;
        --border: #2f2a20;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #121212;
    --surface: #1c1c1c;
    --text: #f3efe6;
    --muted: #b5ad9c;
    --accent: #f5a623;
    --dark: #000000;
    --border: #2f2a20;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%
}

img {
    max-width: 100%
}

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

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px
}

/* ---------- Header / navbar ---------- */
header {
    background: var(--header);
    color: #fff;
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 50;
    border-bottom: 1px solid #26200f
}

.bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0
}

.logo {
    width: 34px;
    height: auto;
    display: block;
    flex: none
}

.brand-text {
    font-family: var(--display);
    font-weight: 800;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase
}

.brand-text .l1 {
    display: block;
    color: var(--gold);
    font-size: 1.3rem
}

.brand-text .l2 {
    display: block;
    color: #fff;
    opacity: .85;
    font-size: .9rem;
    letter-spacing: .3em;
    margin-top: 3px
}

/* nav: inline on desktop */
nav {
    display: flex;
    align-items: center;
    gap: 30px
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: .98rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent
}

nav a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold)
}

/* hamburger */
.menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex: none;
    -webkit-tap-highlight-color: transparent
}

.menu-btn span {
    position: absolute;
    left: 11px;
    right: 11px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease, top .25s ease
}

.menu-btn span:nth-child(1) {
    top: 15px
}

.menu-btn span:nth-child(2) {
    top: 21px
}

.menu-btn span:nth-child(3) {
    top: 27px
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
    top: 21px;
    transform: rotate(45deg)
}

.menu-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0
}

.menu-btn[aria-expanded="true"] span:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg)
}

/* mobile + tablet: hamburger on the right */
@media (max-width: 1023px) {
    .menu-btn {
        display: block
    }

    nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--header);
        border-bottom: 1px solid #26200f;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity .22s ease, transform .22s ease, visibility .22s
    }

    nav.open {
        visibility: visible;
        opacity: 1;
        transform: none
    }

    nav a {
        padding: 16px 24px;
        font-size: 1.05rem;
        border-bottom: 1px solid #1d1a12
    }

    nav a:last-child {
        border-bottom: 0
    }

    nav a:hover {
        border-bottom-color: #1d1a12
    }
}

/* mobile: club name on 3 rows (Darwin / Leopards / FC Inc.) */
@media (max-width: 599px) {
    .bar-row {
        padding-top: 8px;
        padding-bottom: 8px
    }

    .brand {
        gap: 10px
    }

    .logo {
        width: 32px
    }

    .brand-text {
        display: flex;
        flex-direction: column;
        gap: 2px
    }

    .brand-text .l1 {
        display: flex;
        flex-direction: column;
        gap: 2px;
        font-size: .98rem;
        letter-spacing: .1em
    }

    .brand-text .l2 {
        font-size: .78rem;
        margin-top: 0;
        letter-spacing: .24em
    }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    text-align: center;
    color: #fff;
    min-height: min(82svh, 700px);
    padding: 72px 20px 84px;
    background: #06130b url("../images/hero-field.jpg") center bottom/cover no-repeat
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .38) 45%, rgba(0, 0, 0, .78) 100%)
}

.hero-inner {
    max-width: 760px
}

.hero h1 {
    margin: 0 0 14px;
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2.6rem, 8vw, 5rem);
    line-height: 1.02;
    letter-spacing: .01em;
    text-wrap: balance;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .55)
}

.hero p {
    margin: 0 auto;
    max-width: 560px;
    color: #ece6d6;
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    text-shadow: 0 1px 12px rgba(0, 0, 0, .6)
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px
}

.hero-actions .btn {
    margin-top: 0
}

.btn {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 26px;
    background: var(--accent);
    color: #111;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    border: 2px solid var(--accent);
    transition: background .2s, color .2s, border-color .2s
}

.btn:hover {
    background: #ffb83d;
    border-color: #ffb83d
}

.btn.ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .75)
}

.btn.ghost:hover {
    background: #fff;
    color: #111;
    border-color: #fff
}

/* ---------- Sections ---------- */
section {
    padding: 60px 0
}

section.alt {
    background: var(--surface)
}

h2 {
    margin: 0 0 16px;
    font-family: var(--display);
    font-weight: 800;
    font-size: 2.1rem;
    line-height: 1.1;
    border-left: 5px solid var(--accent);
    padding-left: 12px
}

.lead {
    max-width: 70ch;
    margin: 0 0 22px
}

.grid {
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px
}

.card h3 {
    margin: 0 0 6px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.35rem
}

.card p {
    margin: 0;
    color: var(--muted)
}

dl {
    margin: 0;
    display: grid;
    grid-template-columns:max-content 1fr;
    gap: 10px 22px
}

dt {
    font-weight: 700
}

dd {
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere
}

dd a {
    color: var(--accent)
}

/* contact: details left, map right */
.contact-grid {
    display: grid;
    grid-template-columns:1fr;
    gap: 28px;
    align-items: start
}

.contact-info .btn {
    margin-top: 26px
}

.map {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    height: 320px
}

.map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0
}

@media (min-width: 800px) {
    .contact-grid {
        grid-template-columns:minmax(0, 5fr) minmax(0, 7fr);
        gap: 40px
    }

    .map {
        height: 380px
    }
}

footer {
    background: var(--dark);
    color: #bdb6a5;
    text-align: center;
    padding: 28px 20px;
    font-size: .9rem
}

footer p {
    margin: 4px 0
}

footer strong {
    color: #fff
}

/* ---------- Intro: glow, then morph into navbar logo ---------- */
#intro {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none
}

#intro .veil {
    position: absolute;
    inset: 0;
    background: #000;
    transition: opacity .8s ease
}

#intro.go .veil {
    opacity: 0
}

#intro .mark {
    position: relative;
    z-index: 1;
    width: min(38vw, 150px);
    transform-origin: 0 0;
    will-change: transform
}

#intro .mark img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    opacity: 0;
    transform: scale(.88);
    filter: drop-shadow(0 0 8px rgba(245, 166, 35, .35));
    animation: logoIn .9s ease-out .1s forwards, glow 1s ease-in-out .75s 1
}

#intro .bar {
    position: relative;
    z-index: 1;
    width: min(40vw, 150px);
    height: 3px;
    background: #2a2113;
    border-radius: 3px;
    margin-top: 22px;
    overflow: hidden;
    opacity: 0;
    animation: fade .4s ease .5s forwards
}

#intro .bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--gold);
    animation: load 1.2s ease-in-out .5s forwards
}

#intro.go .bar {
    animation: fadeOut .25s ease forwards
}

@keyframes logoIn {
    to {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(245, 166, 35, .35))
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(245, 166, 35, .95))
    }
}

@keyframes fade {
    to {
        opacity: 1
    }
}

@keyframes fadeOut {
    from {
        opacity: 1
    }
    to {
        opacity: 0
    }
}

@keyframes load {
    to {
        width: 100%
    }
}

@keyframes land {
    0% {
        filter: drop-shadow(0 0 0 rgba(245, 166, 35, 0))
    }
    40% {
        filter: drop-shadow(0 0 12px rgba(245, 166, 35, .9))
    }
    100% {
        filter: drop-shadow(0 0 0 rgba(245, 166, 35, 0))
    }
}

body.loading {
    overflow: hidden
}

body.loading .logo {
    opacity: 0
}

/* navbar logo appears when the intro logo lands */
.logo.land {
    animation: land .9s ease-out
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto
    }

    #intro .mark img {
        animation: logoIn .1s forwards
    }

    #intro .bar i {
        animation-duration: .1s
    }

    nav, .menu-btn span {
        transition: none
    }
}
