/*
  Vimarsh Model UN 2026
  Diplomatic Navy & Gold Editorial Theme
*/

/* ─── Variables ──────────────────────────────────────────── */
:root {
    --bg-outer: #040712;
    --bg-inner: #0a0f20;
    --bg-card: #10172e;

    --border-primary: #f8fafc;
    --border-secondary: #1a233d;
    --border-card: #2f3d63;

    --text-primary: #f8fafc;
    --text-muted: #94a3b8;

    --accent-primary: #cda250;
    --accent-gold: #f3cf7a;

    --font-serif: "Playfair Display", Georgia, serif;
    --font-body: "Lora", Georgia, serif;
    --font-sans: "Inter", sans-serif;

    --ease-snappy: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Reset ──────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* Skip link — hidden off-screen, visible on focus for keyboard users */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--accent-primary);
    color: var(--bg-outer);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 999;
    transition: top 0.1s ease;
}

.skip-link:focus {
    top: 1rem;
}

/* ─── Body & margin-area dot-grid background ─────────────── */
body {
    background-color: var(--bg-outer);
    /* Subtle gold dot-grid tiling in the margin gutters */
    background-image: radial-gradient(
        rgba(205, 162, 80, 0.2) 1.5px,
        transparent 1.5px
    );
    background-size: 20px 20px;
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* ─── Structural shell (covers dot-grid inside content area) */
.site-header,
.main-wrapper,
.site-footer {
    width: 100%;
    max-width: 1024px;
    background: var(--bg-inner);
    border-inline: 2px solid var(--border-secondary);
}

section {
    padding: clamp(3.5rem, 8vw, 6rem) clamp(1.5rem, 4vw, 2.5rem);
    border-bottom: 2px solid var(--border-secondary);
    scroll-margin-top: 5rem;
}

/* ─── Responsive grid ────────────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
}

/* ─── Typography ─────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.15;
}

.serif-italic {
    font-style: italic;
    font-weight: 400;
    color: var(--accent-primary);
}

/* ─── Global section header labels ───────────────────────── */
/* Scoped to direct children only — avoids bleeding into .card.committee header */
section > header {
    margin-bottom: 3rem;
}

section > header > span {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

section > header > h2 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin-bottom: 0.75rem;
}

section > header > p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 680px;
    line-height: 1.6;
}

/* ─── Accessibility: visible focus ring ──────────────────── */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border: 2px solid var(--border-primary);
    background: var(--accent-primary);
    color: var(--bg-outer);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 4px 0 var(--border-primary);
    transition:
        transform 0.15s var(--ease-snappy),
        box-shadow 0.15s var(--ease-snappy);
    padding-left: 5px;
    padding-right: 5px;
}

.btn-less {
    margin-left: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn:hover {
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0 var(--border-primary);
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--border-primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-small {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
}

/* ─── Sticky header ──────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--border-secondary);
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.site-header.scrolled {
    background: rgba(10, 15, 32, 0.98);
    border-bottom: 4px double var(--accent-primary);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.logo-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin-top: 0.15rem;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-family: var(--font-sans);
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-block: 0.2rem;
    transition: color 0.15s ease;
}

.nav-link-outer {
    color: var(--text-primary);
}

/* Animated underline */
.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
    display: none;
    border: 2px solid var(--border-secondary);
    background: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.5rem;
}

.nav-toggle .bar {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero-banner {
    width: 100%;
    height: 350px;
    background:
        linear-gradient(
            to bottom,
            rgba(10, 15, 32, 0) 40%,
            var(--bg-inner) 100%
        ),
        url("school.jpeg");
    background-size: cover;
    background-position: center;
    margin-bottom: -5rem;
}

.hero-section {
    padding-top: 5rem;
    /* Dossier paper dot watermark (over the solid bg-inner) */
    background-image: radial-gradient(
        rgba(205, 162, 80, 0.07) 1.5px,
        transparent 1.5px
    );
    background-size: 24px 24px;
}

.pill-badge {
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 9999px;
    background: rgba(205, 162, 80, 0.1);
    margin-bottom: 2rem;
}

.pill-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.hero-title {
    font-size: clamp(2.2rem, 6.5vw, 4rem);
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.info-card {
    background: var(--bg-card);
    border: 2px solid var(--border-card);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 4px 0 #000;
}

.info-card > span {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.info-card > strong {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 700;
}

.info-card.highlight {
    border-color: var(--accent-primary);
    box-shadow: 4px 4px 0 var(--accent-primary);
}

.info-card.highlight > strong {
    color: var(--accent-gold);
}

/* ─── Stats bar ──────────────────────────────────────────── */
.stats-section {
    padding: 2.5rem 2rem;
    background: var(--bg-card);
}

.stat-card {
    text-align: center;
    border: 2px solid var(--border-card);
    padding: 1.5rem 1rem;
    background: var(--bg-inner);
    box-shadow: 4px 4px 0 #000;
}

.stat-card > strong {
    font-family: var(--font-sans);
    display: block;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    color: var(--accent-gold);
    margin-bottom: 0.25rem;
}

.stat-card > span {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* ─── Cards (shared base) ────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 2px solid var(--border-card);
    padding: 2rem 1.5rem;
    box-shadow: 4px 4px 0 #000;
    transition:
        transform 0.2s var(--ease-snappy),
        box-shadow 0.2s var(--ease-snappy),
        border-color 0.2s var(--ease-snappy);
}

.card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 var(--accent-primary);
    border-color: var(--accent-primary);
}

.card .num {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 2rem;
    color: var(--accent-primary);
    display: block;
    line-height: 1;
    margin-bottom: 1rem;
}

.card > h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card > p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── Committee cards ────────────────────────────────────── */
.card.committee {
    display: flex;
    flex-direction: column;
}

/* Scoped to committee cards only — does not bleed into section > header */
.card.committee > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card.committee .acronym {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.card.committee h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card.committee p {
    font-size: 0.9rem;
}

.card.committee p strong {
    color: var(--text-primary);
}

.hero-button-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-button-row .btn {
    margin-left: 0;
    margin-right: 10px;
}
.card.faq {
    cursor: pointer;
    transition:
        transform 0.2s var(--ease-snappy),
        box-shadow 0.2s var(--ease-snappy),
        border-color 0.2s var(--ease-snappy);
    display: grid;
    grid-template-rows: auto 0fr;
    transition:
        grid-template-rows 0.3s ease-out,
        border-color 0.3s ease;
}

.card.faq[open] {
    grid-template-rows: auto 1fr;
    border-color: var(--accent-primary);
}

.card.faq summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    grid-row: 1;
    padding: 2rem 1.5rem;
    margin: -2rem -1.5rem; /* Negative margin to pull summary to card edges */
    cursor: pointer;
}

.card.faq summary::-webkit-details-marker {
    display: none;
}

.card.faq summary::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--accent-primary);
    transition: transform 0.3s var(--ease-snappy);
    margin-left: 1rem;
}

.card.faq[open] summary::after {
    transform: rotate(45deg);
}

.card.faq summary h3 {
    margin: 0;
    font-size: 1.1rem;
    pointer-events: none; /* Let the summary handle the click */
}

.card.faq p {
    grid-row: 2;
    overflow: hidden;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-secondary);
}

/* ─── Schedule ───────────────────────────────────────────── */
.card.schedule .day-title {
    font-size: 1.3rem;
    color: var(--accent-primary);
    border-bottom: 4px double var(--accent-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
}

.timeline {
    list-style: none;
}

.timeline li {
    border-left: 2px solid var(--border-card);
    padding-left: 1.25rem;
    padding-bottom: 1.25rem;
    position: relative;
}

.timeline li:last-child {
    border-left: none;
    padding-bottom: 0;
}

/* Gold dot node — consistent offset for all items */
.timeline li::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 6px;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.timeline li:last-child::before {
    left: -5px;
}

.timeline .time {
    font-family: var(--font-sans);
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.25rem;
}

.timeline .event {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ─── Venue ──────────────────────────────────────────────── */
.venue-sub {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--accent-primary);
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.venue-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.venue-info ul {
    list-style: none;
}

.venue-info li {
    font-size: 0.9rem;
    border-left: 2px solid var(--accent-primary);
    padding-left: 0.75rem;
    margin-bottom: 0.75rem;
}

.venue-info li strong {
    font-family: var(--font-sans);
    color: var(--accent-gold);
    display: block;
}

/* Venue seal — stands alone, independent of .btn or .card */
.venue-graphic {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 2rem;
    min-height: 200px;

    background: url("school.jpeg") no-repeat center center;
    background-size: cover;
    border: 2px solid var(--border-primary);
    box-shadow: 4px 4px 0 var(--border-primary);
    color: var(--bg-outer);
}

.venue-graphic .line {
    width: 30px;
    height: 3px;
    background: var(--bg-outer);
    margin-bottom: 1rem;
}

.venue-graphic .big-num {
    font-family: var(--font-serif);
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    color: white;
}

.venue-graphic .label {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    max-width: 140px;
    margin-top: 0.75rem;
    color: white;
}

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
    padding: 3rem 2rem 1.5rem;
    border-top: 4px double var(--border-secondary);
}

/* Three-column footer layout */
.footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.footer-brand .tagline {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--accent-primary);
    font-size: 0.95rem;
}

.footer-contact h4,
.footer-links h4 {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.footer-contact p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: var(--accent-gold);
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.footer-links a {
    font-family: var(--font-sans);
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.4rem;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-secondary);
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── Reduced-motion: disable all animations ─────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ─── Mobile (≤ 768px) ───────────────────────────────────── */
@media (max-width: 768px) {
    .site-header,
    .main-wrapper,
    .site-footer {
        border-inline: none;
    }

    .header-container {
        padding: 1rem 1.5rem;
    }

    .nav-toggle {
        display: flex;
        z-index: 101;
    }

    .nav-menu {
        position: fixed;
        inset: 0 0 0 auto; /* top/right/bottom anchored, left auto */
        width: min(280px, 80vw);
        background: var(--bg-inner);
        border-left: 2px solid var(--border-primary);
        flex-direction: column;
        justify-content: center;
        padding: 4rem 2rem;
        gap: 2rem;
        z-index: 100;
        transform: translateX(100%);
        transition: transform 0.2s var(--ease-snappy);
        box-shadow: -4px 0 0 var(--accent-primary);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .btn-header-cta {
        display: none;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

    .hero-section .btn-large {
        display: flex;
        width: 100%;
        max-width: 320px;
        margin-bottom: 0.75rem;
    }

    .hero-section .btn-less {
        margin-left: 0;
    }
}
