/* ============================================================
   Home – Familie van Beers 2026
   Same design tokens as quiz.css, different components.
   BEM convention: .home__element--modifier
   rem units: 1rem = 10px (html font-size: 62.5%)
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
    --h-primary:              #874e00;
    --h-primary-container:    #ff9800;
    --h-on-primary-container: #4a2800;
    --h-secondary:            #005caa;
    --h-secondary-container:  #b9d3ff;
    --h-background:           #f6f6f6;
    --h-surface-low:          #f0f1f1;
    --h-surface-container:    #e7e8e8;
    --h-surface-highest:      #dbdddd;
    --h-on-surface:           #2d2f2f;
    --h-on-surface-variant:   #5a5c5c;
    --h-white:                #ffffff;
    --h-error-accent:         #f97316;

    --h-font-headline: 'Plus Jakarta Sans', sans-serif;
    --h-font-body:     'Be Vietnam Pro', sans-serif;

    --h-radius:    1.6rem;
    --h-radius-lg: 3.2rem;
    --h-radius-xl: 4.8rem;

    --h-shadow-card: 0 0.2rem 2.4rem rgba(0, 0, 0, 0.04);
    --h-shadow-btn:  0 0.4rem 2.0rem rgba(135, 78, 0, 0.18);
    --h-shadow-nav:  0 -0.8rem 3.2rem rgba(0, 0, 0, 0.05);
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 62.5%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--h-font-body);
    font-size: 1.6rem;
    color: var(--h-on-surface);
    background-color: var(--h-background);
    min-height: 100dvh;
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 {
    font-family: var(--h-font-headline);
    line-height: 1.15;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 2.4rem;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'liga';
    user-select: none;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── Root block ─────────────────────────────────────────────── */
.home {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ── Header ─────────────────────────────────────────────────── */
.home__header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 6.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.4rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(1.6rem);
    -webkit-backdrop-filter: blur(1.6rem);
    box-shadow: 0 0.1rem 0 rgba(0, 0, 0, 0.06),
                0 0.4rem 3.2rem rgba(135, 78, 0, 0.05);
}

.home__headericon {
    color: var(--h-primary);
    display: flex;
    align-items: center;
    width: 3.2rem;
}

.home__headertitle {
    font-family: var(--h-font-headline);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--h-on-surface);
    letter-spacing: -0.03em;
    text-align: center;
}

.home__headerhelp {
    display: flex;
    align-items: center;
    color: var(--h-primary);
    width: 3.2rem;
    justify-content: flex-end;
}

/* ── Main content ───────────────────────────────────────────── */
.home__main {
    flex: 1;
    padding-top: 6.4rem;
    padding-bottom: 10rem;
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
}

/* ── Hero section ───────────────────────────────────────────── */
.home__hero {
    position: relative;
    height: 40rem;
    display: flex;
    align-items: flex-end;
    background-color: var(--h-surface-container);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* Orange/amber gradient fallback when no image is set */
.home__hero:not([style*="background-image"]) {
    background: linear-gradient(
        145deg,
        #f97316 0%,
        #ea580c 30%,
        #c2410c 60%,
        #7c2d12 100%
    );
}

.home__herooverlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}

.home__herocontent {
    position: relative;
    z-index: 1;
    padding: 3.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.home__herosubtitle {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.85);
}

.home__herodate {
    font-size: 3.4rem;
    font-weight: 800;
    color: var(--h-white);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.home__herolocation {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 200, 120, 0.95);
    font-size: 1.4rem;
    font-weight: 500;
}

.home__herolocationicon {
    font-size: 1.8rem;
}

/* ── Countdown grid ─────────────────────────────────────────── */
.home__countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    padding: 0 2.4rem;
}

.home__countdowntile {
    background: var(--h-surface-low);
    border-radius: var(--h-radius);
    padding: 2.0rem 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: var(--h-shadow-card);
}

.home__countdownnum {
    font-family: var(--h-font-headline);
    font-size: 3.4rem;
    font-weight: 800;
    color: var(--h-primary);
    line-height: 1;
    letter-spacing: -0.03em;
    min-width: 2ch;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.home__countdownlabel {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--h-on-surface-variant);
}

/* Celebration state – event has started */
.home__countdown--live .home__countdowntile {
    background: rgba(255, 152, 0, 0.08);
}

.home__countdown--live .home__countdownnum {
    color: var(--h-primary-container);
}

/* ── Welcome section ────────────────────────────────────────── */
.home__welcome {
    padding: 0 2.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.home__welcomeheading {
    font-size: 3.6rem;
    font-weight: 800;
    color: var(--h-on-surface);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.home__welcometext {
    font-size: 1.7rem;
    color: var(--h-on-surface-variant);
    line-height: 1.6;
}

/* ── CTA cards ──────────────────────────────────────────────── */
.home__ctarow {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.6rem;
    padding: 0 2.4rem;
}

.home__ctacard {
    border-radius: var(--h-radius-lg);
    padding: 2.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 16rem;
    transition: transform 0.15s ease;
    cursor: pointer;
}

.home__ctacard:active {
    transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
    .home__ctacard:hover {
        transform: scale(1.02);
    }
}

.home__ctacard--primary {
    background: var(--h-primary-container);
    text-decoration: none;
    color: var(--h-on-primary-container);
}

.home__ctacard--secondary {
    background: var(--h-surface-highest);
    color: var(--h-on-surface);
}

.home__ctacardtop {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.home__ctacardicon {
    font-size: 3.0rem;
}

.home__ctacard--secondary .home__ctacardicon {
    color: var(--h-primary);
}

.home__ctacardarrow {
    font-size: 2.0rem;
    opacity: 0.5;
}

.home__ctacardtitle {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.home__ctacardtext {
    font-size: 1.3rem;
    opacity: 0.75;
    line-height: 1.4;
}

/* ── Announcement card ──────────────────────────────────────── */
.home__announcement {
    margin: 0 2.4rem;
    background: var(--h-white);
    border-radius: var(--h-radius);
    padding: 2.4rem;
    display: flex;
    gap: 1.6rem;
    align-items: flex-start;
    border-left: 0.4rem solid var(--h-primary-container);
    box-shadow: var(--h-shadow-card);
}

.home__announcementicon {
    width: 4.0rem;
    height: 4.0rem;
    border-radius: 50%;
    background: rgba(255, 152, 0, 0.12);
    color: var(--h-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home__announcementicon .material-symbols-outlined {
    font-size: 2.0rem;
}

.home__announcementtitle {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--h-on-surface);
    margin-bottom: 0.4rem;
}

.home__announcementtext {
    font-size: 1.4rem;
    color: var(--h-on-surface-variant);
    line-height: 1.5;
}

/* ── Bottom navigation ──────────────────────────────────────── */
.home__nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.8rem 1.6rem calc(0.8rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(1.6rem);
    -webkit-backdrop-filter: blur(1.6rem);
    border-radius: var(--h-radius-xl) var(--h-radius-xl) 0 0;
    box-shadow: var(--h-shadow-nav);
}

.home__navitem {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.8rem 1.2rem;
    color: #9ca3af;
    border-radius: var(--h-radius);
    transition: color 0.15s ease;
    text-decoration: none;
    min-width: 6.0rem;
}

.home__navitem--active {
    background: rgba(255, 152, 0, 0.12);
    color: var(--h-on-primary-container);
}

.home__navitem .material-symbols-outlined {
    font-size: 2.4rem;
}

.home__navlabel {
    font-family: var(--h-font-body);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

@media (hover: hover) and (pointer: fine) {
    .home__navitem:hover:not(.home__navitem--active) {
        color: var(--h-primary-container);
    }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (min-width: 540px) {
    .home__main {
        max-width: 60rem;
        margin: 0 auto;
        width: 100%;
    }

    .home__welcomeheading {
        font-size: 4.4rem;
    }

    .home__herodate {
        font-size: 4.0rem;
    }

    .home__countdownnum {
        font-size: 4.0rem;
    }
}

/* ── Countdown "live" message ───────────────────────────────── */
.home__countdownmsg {
    grid-column: 1 / -1;
    text-align: center;
    font-family: var(--h-font-headline);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--h-primary);
    padding: 1.6rem 0;
    letter-spacing: -0.02em;
}
