/* =========================================================================
   Base Reset & Variables
   ========================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Day Mode by default */
    --bg-gradient: linear-gradient(135deg, #001608, #012611);
    --text-primary: #EAEAB2;
    --accent: #EAEAB2;

    /* Typography */
    --font-primary: 'Inter',
        sans-serif;
    --font-secondary: 'Instrument Serif',
        serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Night Mode (current gradient) */
        --bg-gradient: linear-gradient(135deg, #001608, #012611);
    }
}

html {
    background: linear-gradient(135deg, #001608, #012611);
    background-attachment: fixed;
    min-height: 100%;
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100dvh;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    /* Prévient tout scroll */
}

/* =========================================================================
   Layout
   ========================================================================= */
.page-container {
    width: 100%;
}

.hero {
    /* Page layout spec: align_v center, align_h center */
    display: flex;
    justify-content: center;
    align-items: center;

    /* Desktop-first padded area */
    padding: 120px 80px;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.hero-block {
    /* Hero block spec: simple vertical centering */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* Max width */
    max-width: 1440px;
    width: 100%;
}

.hero-heading {
    /* Style Spec */
    font-size: 64px;
    line-height: 1.1;
    letter-spacing: 0;
    text-align: center;
    color: var(--text-primary);
}

/* Typing cursor */
#typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--text-primary);
    vertical-align: text-bottom;
    margin-left: 4px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Inline span classes mapped from design system */
.font-instrument-serif {
    font-family: var(--font-secondary);
}

.font-inter {
    font-family: var(--font-primary);
}

.weight-400 {
    font-weight: 400;
}

.weight-500 {
    font-weight: 500;
}

.style-normal {
    font-style: normal;
}

.style-italic {
    font-style: italic;
}

.text-smaller {
    font-size: 0.85em;
}

.tracking-tight {
    letter-spacing: -0.075em;
}

/* =========================================================================
   Scroll Indicator Component
   ========================================================================= */
.scroll-indicator {
    cursor: pointer;

    /* Absolute positioning at the bottom center */
    position: absolute;
    bottom: 20px;
    /* Distance from bottom */
    left: 50%;
    transform: translateX(-50%);

    /* Staggered animation entrance */
    opacity: 0;
    animation: fadeUpIndicator 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;

    /* Expanded hit area */
    padding: 20px;

    /* Container for SVG hover effect */
    transition: transform 200ms ease-out, opacity 200ms ease-out;
}

.scroll-indicator svg {
    display: block;
    /* Scale dimensions by 1.2 (20% increase) */
    width: 81.6px;
    height: 18px;
}

.scroll-indicator:hover {
    transform: translateX(-50%) scale(1.05) translateY(-2px);
    opacity: 0.9;
}

/* =========================================================================
   Animations
   ========================================================================= */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUpIndicator {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* =========================================================================
   Cookie Banner
   ========================================================================= */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    max-width: 340px;
    background: rgba(1, 38, 17, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(234, 234, 178, 0.12);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.cookie-banner.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cookie-text {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
}

.cookie-link {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-actions {
    display: flex;
    gap: 8px;
}

.cookie-btn {
    flex: 1;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid rgba(234, 234, 178, 0.25);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.cookie-btn:hover {
    background: rgba(234, 234, 178, 0.1);
}

/* Bouton pour rouvrir le bandeau */
.cookie-settings-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(1, 38, 17, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(234, 234, 178, 0.1);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.cookie-settings-btn.visible {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-btn:hover {
    background: rgba(1, 38, 17, 0.95);
}

/* =========================================================================
   Responsive Breakpoints
   ========================================================================= */

/* Tablet: max-width 1024px */
@media screen and (max-width: 1024px) {
    .hero {
        padding: 100px 40px;
    }

    .hero-heading {
        font-size: 48px;
    }
}

/* Mobile: max-width 640px */
@media screen and (max-width: 640px) {
    html {
        /* Fix iOS Safari : background-attachment fixed cause un fond blanc */
        background-attachment: scroll;
        /* Couleur mobile #001908 — canvas background couvre TOUT l'écran incl. Dynamic Island + home bar */
        background: #001908;
        /* viewport-fit=cover étend la couleur bord-à-bord */
        min-height: 100dvh;
        /* Empêche le rubber-band bounce d'exposer un fond blanc */
        overscroll-behavior: none;
    }

    body {
        /* Transparent pour laisser html peindre les safe areas */
        background: transparent;
        overscroll-behavior: none;
    }

    .hero {
        /* Pousse le contenu hors des zones Dynamic Island / home bar */
        padding: calc(80px + env(safe-area-inset-top)) 24px calc(80px + env(safe-area-inset-bottom));
        min-height: 100dvh;
    }

    .hero-heading {
        font-size: 32px;
        line-height: 1.2;
    }

    /* Scroll Indicator Responsive Overrides */
    .scroll-indicator {
        bottom: calc(4px + env(safe-area-inset-bottom));
    }

    .scroll-indicator svg {
        /* Keep sizes proportional */
        width: 71px;
        height: 15.6px;
    }

    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        max-width: none;
    }

    .cookie-settings-btn {
        left: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
    }
}