/* ==========================================================================
   TrainQ — Shared site styles (header, footer, base tokens, utilities)
   Used by all sub-pages. The landing page (index.html) has its own inline
   versions for full control over the hero stage.
   ========================================================================== */

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Satoshi', -apple-system, sans-serif;
    background: #0a0a0a;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ── Tokens ─────────────────────────────────────── */
:root {
    --bg:       #0a0a0a;
    --bg-2:     #111111;
    --bg-3:     #161616;
    --text:     #ffffff;
    --muted:    rgba(255,255,255,0.45);
    --muted-2:  rgba(255,255,255,0.22);
    --accent:   #0066FF;
    --border:   rgba(255,255,255,0.07);
    --radius:   12px;
    --radius-lg:20px;
    --container:1160px;
    --nav-h:    72px;
    --content-pad: 40px;
}

/* ── Layout ─────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
}

/* ── Typography ─────────────────────────────────── */
.display {
    font-family: 'Clash Display', sans-serif;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.0;
}

/* ── Buttons ────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 100px;
    font-family: 'Satoshi', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.btn-white { background: #fff; color: #0a0a0a; }
.btn-white:hover { background: #e8e8e8; transform: translateY(-1px); }
.btn-ghost {
    background: transparent;
    color: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #0050CC; transform: translateY(-1px); }
.btn-sm { padding: 9px 20px; font-size: 0.875rem; }

/* ── Topbar (DEUKOM-style) ──────────────────────── */
.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem clamp(2rem, 8vw, 6rem);
    background: transparent;
    transition: padding 220ms ease, opacity 400ms ease;
}
.brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}
.brand-mark {
    height: 28px;
    width: auto;
    flex-shrink: 0;
    display: block;
    transition: height 220ms ease;
}
.brand-text {
    font-family: 'Clash Display', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    overflow: hidden;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.brand-letter,
.brand-collapse {
    display: inline-block;
    transition: max-width 400ms cubic-bezier(0.4, 0, 0.2, 1), opacity 300ms ease;
}
.brand-collapse {
    max-width: 1.2em;
    opacity: 1;
    overflow: hidden;
    white-space: nowrap;
}
.topbar.is-condensed .brand-collapse {
    max-width: 0;
    opacity: 0;
}
.topbar.is-condensed .brand-mark {
    height: 26px;
}

.menu-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: transform 180ms ease;
}
.menu-button:hover { transform: translateY(-1px); }
.menu-button span {
    display: block;
    width: 1.5rem;
    height: 2px;
    border-radius: 999px;
    background: #fff;
    transition: transform 300ms ease, opacity 300ms ease, width 220ms ease, height 220ms ease;
}
.menu-button.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-button.is-open span:nth-child(2) { opacity: 0; }
.menu-button.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.topbar.is-condensed {
    padding: 1rem clamp(2rem, 8vw, 6rem);
}
.topbar.is-condensed .menu-button span {
    width: 0.95rem;
    height: 1.5px;
}

/* ── Mobile Nav Overlay ─────────────────────────── */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(10, 10, 10, 0);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background 1s cubic-bezier(0.25, 0.1, 0.25, 1),
                backdrop-filter 1s cubic-bezier(0.25, 0.1, 0.25, 1),
                -webkit-backdrop-filter 1s cubic-bezier(0.25, 0.1, 0.25, 1),
                visibility 0s 1s;
}
.mobile-nav.is-open {
    visibility: visible;
    background: rgba(10, 10, 10, 0.78);
    backdrop-filter: blur(30px) brightness(0.6);
    -webkit-backdrop-filter: blur(30px) brightness(0.6);
    pointer-events: auto;
    transition: background 1s cubic-bezier(0.25, 0.1, 0.25, 1),
                backdrop-filter 1s cubic-bezier(0.25, 0.1, 0.25, 1),
                -webkit-backdrop-filter 1s cubic-bezier(0.25, 0.1, 0.25, 1),
                visibility 0s 0s;
}
.mobile-nav-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.mobile-nav-link {
    font-family: 'Clash Display', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: #fff;
    text-decoration: none;
    opacity: 0;
    transform: translateY(1.5rem);
    transition: color 80ms ease, transform 80ms ease;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.mobile-nav.is-open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
    animation: nav-link-in 600ms cubic-bezier(0.25, 0.1, 0.25, 1) both;
}
@keyframes nav-link-in {
    from { opacity: 0; transform: translateY(1.5rem); }
    to   { opacity: 1; transform: translateY(0); }
}
.mobile-nav.is-open .mobile-nav-link:nth-child(1) { animation-delay: 200ms; }
.mobile-nav.is-open .mobile-nav-link:nth-child(2) { animation-delay: 280ms; }
.mobile-nav.is-open .mobile-nav-link:nth-child(3) { animation-delay: 360ms; }
.mobile-nav.is-open .mobile-nav-link:nth-child(4) { animation-delay: 440ms; }
.mobile-nav.is-open .mobile-nav-link:nth-child(5) { animation-delay: 520ms; }
.mobile-nav.is-open .mobile-nav-link:nth-child(6) { animation-delay: 600ms; }
.mobile-nav.is-open .mobile-nav-link:nth-child(7) { animation-delay: 680ms; }
.mobile-nav-link:hover {
    color: rgba(255, 255, 255, 0.55);
    transform: translateY(-4px) scale(1.08);
    transition: opacity 80ms ease, transform 80ms ease, color 80ms ease;
}
.mobile-nav-link.is-active {
    color: rgba(255, 255, 255, 0.45);
}

/* ── Footer (DEUKOM-style + fog) ────────────────── */
.site-footer {
    position: relative;
    padding: 0;
    background: var(--bg);
    margin-top: 280px;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 0;
    right: 0;
    height: 240px;
    background:
        radial-gradient(
            ellipse 70% 60% at 50% 50%,
            rgba(255,255,255,0.045) 0%,
            rgba(255,255,255,0.018) 35%,
            transparent 70%
        );
    filter: blur(14px);
    pointer-events: none;
    z-index: 0;
}
.site-footer::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: radial-gradient(
        ellipse 40% 100% at 50% 50%,
        rgba(255,255,255,0.08) 0%,
        rgba(255,255,255,0.02) 50%,
        transparent 100%
    );
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;
}
.site-footer .footer-bar { position: relative; z-index: 1; }
.footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem var(--content-pad);
    gap: 1rem;
}
.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-logo-img {
    height: 1.8rem;
    width: auto;
    display: block;
}
.footer-brand-name {
    font-family: 'Clash Display', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
}
.footer-nav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.footer-nav a,
.footer-nav button {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    color: var(--muted);
    font-size: 0.8rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}
.footer-nav a:hover,
.footer-nav button:hover { color: #fff; }
.footer-dot {
    color: var(--muted-2);
    font-size: 0.8rem;
}
.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.footer-copy {
    font-size: 0.75rem;
    color: var(--muted);
}
@media (max-width: 768px) {
    .footer-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
}

/* ── Common fade-up animation utility ────────────── */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1),
                transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Cookie banner (glassmorphism + slide-in) ─────── */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: min(360px, calc(100vw - 40px));
    background:
        linear-gradient(180deg, rgba(22,22,22,0.92), rgba(12,12,12,0.92));
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 20px;
    padding: 22px;
    z-index: 200;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.05);
    transform: translateY(24px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.5s ease,
        visibility 0s 0.6s;
}
.cookie-banner.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.5s ease;
}
.cookie-banner-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 14px;
    color: rgba(255,255,255,0.75);
}
.cookie-banner-icon svg { display: block; }
.cookie-banner-title {
    font-family: 'Clash Display', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    color: #fff;
}
.cookie-banner p {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.55;
    margin-bottom: 18px;
}
.cookie-banner p a {
    color: rgba(255,255,255,0.78);
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.18);
    text-underline-offset: 3px;
    transition: color 0.15s, text-decoration-color 0.15s;
}
.cookie-banner p a:hover {
    color: #fff;
    text-decoration-color: #fff;
}
.cookie-actions {
    display: flex;
    gap: 8px;
}
.cookie-btn {
    flex: 1;
    padding: 11px 14px;
    border-radius: 12px;
    border: none;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Satoshi', sans-serif;
    letter-spacing: 0.01em;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.cookie-accept {
    background: #fff;
    color: #0a0a0a;
}
.cookie-accept:hover {
    background: #ececec;
    transform: translateY(-1px);
}
.cookie-decline {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.12);
}
.cookie-decline:hover {
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}
@media (max-width: 480px) {
    .cookie-banner {
        bottom: 12px;
        left: 12px;
        width: calc(100vw - 24px);
        padding: 18px;
    }
}
