/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

:root {
    --orange-primary: #D97440;
    --orange-gradient-start: #DF6F3C;
    --orange-gradient-end: #E8923F;
    --orange-btn: #C65328;
    --white: #ffffff;
    --white-90: rgba(255, 255, 255, 0.9);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-20: rgba(255, 255, 255, 0.2);
    --text-dark: #2d2d2d;
    --container-max: 1440px;
    --nav-height: 80px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--white);
    /* Fallback for browsers without gradient support */
    background-color: #D97440;
    background-image: -webkit-linear-gradient(top, rgba(219, 107, 60, 1) 0%, rgba(223, 143, 69, 1) 50%, rgba(223, 143, 69, 1) 100%);
    background-image: linear-gradient(180deg, rgba(219, 107, 60, 1) 0%, rgba(223, 143, 69, 1) 50%, rgba(223, 143, 69, 1) 100%);
    background-attachment: fixed;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--white);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Remove outline for mouse/touch users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* ===== SKIP LINK (accessibility) ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 999;
    padding: 12px 24px;
    background: var(--white);
    color: var(--text-dark);
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    -webkit-transition: top 0.2s ease;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* ===== LAYOUT ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ===== HEADER ===== */
.header {
    position: relative;
    z-index: 100;
    padding-top: 40px;
}

.nav {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    height: var(--nav-height);
}

.nav__logo {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Fallback for browsers without clamp */
    font-size: 2.75rem;
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav__actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
}

/* gap fallback for older flexbox */
@supports not (gap: 12px) {
    .nav__actions > * + * {
        margin-left: 12px;
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 50px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* clamp fallback */
    font-size: 1.125rem;
    font-size: clamp(0.875rem, 1.25vw, 1.125rem);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    -webkit-transition: all 0.25s ease;
    transition: all 0.25s ease;
    border: none;
}

.btn--outline {
    border: 1.5px solid var(--white);
    color: var(--white);
    background: transparent;
}

.btn--outline:hover,
.btn--outline:focus-visible {
    background: var(--white);
    color: var(--orange-primary);
}

.btn--white {
    background: var(--white);
    color: var(--text-dark);
}

.btn--white:hover,
.btn--white:focus-visible {
    background: var(--white-90);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
    -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.nav__actions .btn--white {
    color: var(--orange-btn);
}

.hero .btn {
    padding: 14px 36px;
    /* clamp fallback */
    font-size: 1.25rem;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
}

/* ===== HERO SECTION ===== */
.hero {
    padding-bottom: 60px;
    min-height: calc(100vh - var(--nav-height) - 40px);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

/* Grid fallback for browsers without CSS Grid */
@supports not (display: grid) {
    .hero__grid {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }
    .hero__content {
        -webkit-box-flex: 1;
        -ms-flex: 1 1 0%;
        flex: 1 1 0%;
        min-width: 300px;
    }
    .hero__image-wrapper {
        -webkit-box-flex: 1;
        -ms-flex: 1.1 1 0%;
        flex: 1.1 1 0%;
        min-width: 280px;
    }
}

.hero__content {
    padding: 40px 0;
}

.hero__welcome {
    /* clamp fallback */
    font-size: 1.875rem;
    font-size: clamp(1.125rem, 2vw, 1.875rem);
    font-weight: 500;
    color: var(--white-90);
    margin-bottom: 16px;
    letter-spacing: 0.01em;
}

.hero__title {
    font-family: 'Radio Canada', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* clamp fallback */
    font-size: 5rem;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    font-weight: 400;
    line-height: 1.125;
    margin-bottom: 28px;
    letter-spacing: -0.01em;
}

.hero__title .bold {
    font-family: 'Radio Canada', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 700;
    display: block;
}

.hero__title .light {
    display: block;
    font-family: 'Radio Canada', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 400;
    color: var(--white-90);
}

.hero__description {
    /* clamp fallback */
    font-size: 1.5rem;
    font-size: clamp(1rem, 1.65vw, 1.5rem);
    font-weight: 500;
    line-height: 1.5;
    color: var(--white-90);
    margin-bottom: 32px;
}

/* ===== HERO IMAGE ===== */
.hero__image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 645 / 744;
    -webkit-box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* aspect-ratio fallback */
@supports not (aspect-ratio: 1) {
    .hero__image-wrapper {
        padding-top: 115.35%;
        height: 0;
        position: relative;
    }
    .hero__image-wrapper > * {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

.hero__image {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    display: block;
}

.hero__image-placeholder {
    width: 100%;
    height: 100%;
    background: -webkit-linear-gradient(305deg, #b5724a 0%, #8a5a3a 50%, #6e4830 100%);
    background: linear-gradient(145deg, #b5724a 0%, #8a5a3a 50%, #6e4830 100%);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: var(--white-70);
    font-size: 0.9rem;
    gap: 12px;
}

.hero__image-placeholder svg {
    opacity: 0.5;
}

/* Play button overlay */
.hero__play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--white-20);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid var(--white-70);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* backdrop-filter fallback */
@supports not ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
    .hero__play-btn {
        background: rgba(255, 255, 255, 0.3);
    }
}

.hero__play-btn:hover,
.hero__play-btn:focus-visible {
    background: var(--white);
    border-color: var(--white);
    -webkit-transform: translate(-50%, -50%) scale(1.08);
    transform: translate(-50%, -50%) scale(1.08);
}

.hero__play-btn:hover svg,
.hero__play-btn:focus-visible svg {
    fill: var(--orange-primary);
}

.hero__play-btn svg {
    width: 22px;
    height: 22px;
    fill: var(--white);
    margin-left: 3px;
    -webkit-transition: fill 0.3s ease;
    transition: fill 0.3s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero__grid {
        gap: 32px;
    }
}

@media (max-width: 900px) {
    .header {
        padding-top: 24px;
    }

    .hero__grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero__content {
        padding: 20px 0 0;
    }

    .hero__image-wrapper {
        max-height: 420px;
        aspect-ratio: 16 / 10;
        margin: 0 auto;
        width: 100%;
    }

    .hero {
        padding-bottom: 48px;
    }
}

@media (max-width: 600px) {
    :root {
        --nav-height: 64px;
    }

    .header {
        padding-top: 16px;
    }

    .container {
        padding: 0 20px;
    }

    .hero__image-wrapper {
        max-height: 340px;
    }

    .hero__play-btn {
        width: 56px;
        height: 56px;
    }

    .hero__play-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* ===== ANIMATIONS (respects user preference) ===== */
@media (prefers-reduced-motion: no-preference) {
    .hero__content {
        -webkit-animation: fadeUp 0.8s ease-out both;
        animation: fadeUp 0.8s ease-out both;
    }

    .hero__image-wrapper {
        -webkit-animation: fadeUp 0.8s ease-out 0.15s both;
        animation: fadeUp 0.8s ease-out 0.15s both;
    }

    @-webkit-keyframes fadeUp {
        from {
            opacity: 0;
            -webkit-transform: translateY(20px);
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            -webkit-transform: translateY(0);
            transform: translateY(0);
        }
    }

    @keyframes fadeUp {
        from {
            opacity: 0;
            -webkit-transform: translateY(20px);
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            -webkit-transform: translateY(0);
            transform: translateY(0);
        }
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (forced-colors: active) {
    .btn--outline {
        border: 2px solid ButtonText;
    }
    .hero__play-btn {
        border: 2px solid ButtonText;
    }
}

/* ===== PRINT ===== */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    .btn, .hero__play-btn {
        border: 1px solid black !important;
        color: black !important;
    }
}
