/* =====================================================
   OUR CALGARY — FLAGSHIP PRODUCTION CSS (FIXED)
   Elite Publication Tier • Mobile Perfect • Ultra Fast
   ===================================================== */


/* ---------------- ROOT ---------------- */

:root {

    --bg: #f7f9fc;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #475569;

    --accent: #c53030;
    --accent-soft: #fee2e2;

    --border: #e2e8f0;
    --link: #1d4ed8;

    --radius: 14px;

    --shadow-soft: 0 8px 30px rgba(0, 0, 0, .06);
    --shadow-hero: 0 25px 80px rgba(0, 0, 0, .25);

    --max-width: 1200px;

    scroll-padding-top: 90px;
}


/* DARK MODE */

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1220;
        --surface: #0f172a;
        --text: #e5e7eb;
        --muted: #94a3b8;
        --border: #1e293b;
        --accent-soft: #3b0a0a;
        --shadow-soft: 0 10px 40px rgba(0, 0, 0, .45);
    }
}



/* ================= RESET ================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        sans-serif;

    background: var(--bg);
    color: var(--text);

    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}



/* ================= STRUCTURE ================= */

main {
    max-width: var(--max-width);
    margin: auto;
    padding:
        clamp(1.2rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) 4rem;
}

section {
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

article {
    max-width: 72ch;
}



/* =====================================================
   HEADER
   ===================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;

    backdrop-filter: blur(14px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);

    border-bottom: 1px solid var(--border);
}

.site-header nav {
    max-width: var(--max-width);
    margin: auto;
    padding: .7rem clamp(1rem, 4vw, 2rem);

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
}

.site-header ul {
    list-style: none;
    display: flex;
    gap: 1.4rem;
}

.site-header a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}



/* =====================================================
   APEX HERO SYSTEM
   Ultra Stable • Mobile Perfect • Art Direction Ready
   ===================================================== */

.hero {

    position: relative;
    width: 100%;

    /* prevents layout shift */
    aspect-ratio: 16 / 9;

    /* keeps giant screens cinematic */
    max-height: 92vh;
    min-height: 520px;

    overflow: hidden;
    background: #000;
}


/* picture + img behave IDENTICALLY */

.hero picture,
.hero img {

    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    z-index: 0;
}


/* gradient for legibility */

.hero::after {

    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(to top,
            rgba(0, 0, 0, .72) 10%,
            rgba(0, 0, 0, .35) 45%,
            rgba(0, 0, 0, .08) 70%);

    z-index: 1;
}



/* =============================
   HERO CONTENT
   ============================= */

.hero-content {

    position: absolute;
    z-index: 2;

    left: clamp(1.2rem, 6vw, 4rem);
    bottom: clamp(2rem, 7vw, 5rem);

    max-width: 760px;
    color: white;
}


/* elite typography */

.hero h1 {

    font-size: clamp(2.6rem, 5vw, 4.4rem);
    line-height: 1.05;
    letter-spacing: -.02em;

    text-shadow: 0 10px 40px rgba(0, 0, 0, .55);
}

.hero p {

    margin-top: .7rem;
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    opacity: .96;
}



/* =====================================================
   MOBILE — SHOW THE FULL IMAGE
   (This fixes your current bug)
   ===================================================== */

@media (max-width: 768px) {

    .hero {

        /* let the image define height */
        aspect-ratio: auto;
        min-height: unset;
        max-height: unset;
    }

    .hero picture,
    .hero img {

        position: relative;
        height: auto;

        /* CRITICAL */
        object-fit: contain;
        background: #000;
    }

    .hero-content {

        position: absolute;
        left: 1rem;
        right: 1rem;
        bottom: 1.4rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 7vw, 2.6rem);
    }
}


/* =====================================================
   TYPOGRAPHY
   ===================================================== */

h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.2;
    margin-bottom: .6em;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

h3 {
    font-size: 1.4rem;
}

p {
    margin-bottom: 1.2em;
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
}



/* ================= LINKS ================= */

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}



/* ================= CALLOUT ================= */

aside {

    padding: 1.6rem 1.8rem;
    border-left: 6px solid var(--accent);

    background:
        linear-gradient(120deg,
            var(--accent-soft),
            transparent);

    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}



/* ================= IMAGES ================= */

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

figure {
    margin: 2.5rem 0;
}

figcaption {
    margin-top: .5rem;
    color: var(--muted);
    font-size: .9rem;
}



/* ================= TABLES ================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;

    background: var(--surface);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius);
    overflow: hidden;
}

th,
td {
    padding: .8rem;
    border-bottom: 1px solid var(--border);
}

th {
    text-align: left;
}



/* ================= FOOTER ================= */

footer {

    margin-top: 5rem;
    padding: 3rem 2rem;

    background: color-mix(in srgb, var(--bg) 85%, black);
    color: var(--muted);
    font-size: .9rem;
}



/* ================= DESKTOP GRID ================= */

@media(min-width:1100px) {

    main {
        display: grid;
        grid-template-columns:
            1fr minmax(0, 760px) 1fr;
    }

    main>* {
        grid-column: 2;
    }
}



/* ================= PRINT ================= */

@media print {

    .hero,
    .site-header,
    footer {
        display: none;
    }

    main {
        padding: 0;
    }
}




/* ================= ACCESSIBILITY ================= */

@media(prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}