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

html,
body {
    padding-bottom: 30px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ══════════════════════════════════════════════════════
   FULL-SCREEN BACKGROUND
   ══════════════════════════════════════════════════════ */
.full-screen-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    transition: background 0.6s ease;
}

/* ══════════════════════════════════════════════════════
   SITE HEADER
   ══════════════════════════════════════════════════════ */
.site-header {
    text-align: center;
    padding-top: 1rem;
    margin-bottom: 0;
}

/* ── Logo / site name ─────────────────────────────── */
.site-brand {
    display: inline-block;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 400;
    font-size: 2.2rem;
    letter-spacing: 0.02em;
    transition: opacity 0.2s;
    white-space: nowrap;
    text-align: center;
}

.site-brand:hover {
    opacity: 0.85;
}

.site-brand-logo {
    display: block;
    margin: 0 auto 0.3rem;
}

.site-brand-tagline {
    display: block;
    margin-top: -0.35rem;
    line-height: 1.1;
    font-size: 0.60rem;
    font-weight: 300;
    font-family: 'Inter', system-ui, sans-serif;
    opacity: 0.5;
}

/* ══════════════════════════════════════════════════════
   SLIDE WRAPPER (main container)
   ══════════════════════════════════════════════════════ */
.slide-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

/* ══════════════════════════════════════════════════════
   FACT CARD
   ══════════════════════════════════════════════════════ */
.fact-card {
    max-width: 760px;
    width: 100%;
    text-align: center;
    padding: 2.5rem 0rem;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.fact-card.is-entering {
    animation: fadeSlideIn 0.5s ease-out;
}

.fact-number {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.45;
    margin-bottom: 0.8rem;
}

.fact-text {
    font-family: 'Noto Serif', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 1rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.fact-text strong {
    color: #1a1a1a;
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.2);
    text-underline-offset: 4px;
}

/* ══════════════════════════════════════════════════════
   FACT IMAGE
   ══════════════════════════════════════════════════════ */
.fact-image {
    max-width: 100%;
    border-radius: 4px;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.fact-image[hidden] {
    display: none;
}

/* ══════════════════════════════════════════════════════
   SHARE BUTTON
   ══════════════════════════════════════════════════════ */
.fact-share {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    opacity: 0.4;
    color: #1a1a1a;
    text-decoration: none;
    transition: opacity 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    margin-bottom: 0.8rem;
    font-family: inherit;
}

.fact-share:hover {
    opacity: 0.7;
}

.fact-share svg {
    width: 14px;
    height: 14px;
}

/* ══════════════════════════════════════════════════════
   EXPLAIN MORE BUTTON
   ══════════════════════════════════════════════════════ */
.btn-explain {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
    padding: 0.55rem 1.4rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.5);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.btn-explain:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.22);
    color: rgba(0, 0, 0, 0.75);
}

.btn-explain svg {
    width: 15px;
    height: 15px;
}

.btn-explain[hidden] {
    display: none;
}

/* ══════════════════════════════════════════════════════
   NEXT FACT BUTTON
   ══════════════════════════════════════════════════════ */
.btn-next {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-next:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.25);
    transform: scale(1.04);
}

.btn-next:active {
    transform: scale(0.97);
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-next svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-next:hover svg {
    transform: rotate(180deg);
}

/* ── Sticky bottom on mobile ─────────────────────── */
@media (max-width: 767px) {
    .btn-next {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        border-radius: 0;
        justify-content: center;
        padding: 1rem 2rem;
        border: none;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        background: rgba(255, 255, 255, 0.40);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .btn-next:hover {
        transform: none;
    }

    /* Prevent content from hiding behind the sticky button */
    .seo-footer {
        padding-bottom: 4rem;
    }
}

/* ══════════════════════════════════════════════════════
   LANGUAGE SWITCHER
   ══════════════════════════════════════════════════════ */
.lang-switcher {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.lang-switcher a {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.45);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.lang-switcher a:hover {
    color: #1a1a1a;
    border-color: rgba(0, 0, 0, 0.15);
}

.lang-switcher a.active {
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.07);
    border-color: rgba(0, 0, 0, 0.15);
}

/* ══════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════ */
.empty-state {
    max-width: 500px;
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    opacity: 0.6;
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   FACT COUNTER
   ══════════════════════════════════════════════════════ */
.fact-counter {
    text-align: center;
    margin: 1rem 0;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.6;
}

/* ══════════════════════════════════════════════════════
   SEO FOOTER
   ══════════════════════════════════════════════════════ */
.seo-footer {
    margin-top: 30px;
    padding: 2rem;
    text-align: center;
    font-size: 0.7rem;
    opacity: 0.3;
}

.seo-footer a {
    color: inherit;
    text-decoration: none;
}

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

.seo-footer-link {
    display: block;
}

/* ══════════════════════════════════════════════════════
   KEYBOARD HINT
   ══════════════════════════════════════════════════════ */
.keyboard-hint {
    font-size: 0.7rem;
    opacity: 0.3;
    text-align: center;
    margin-top: 1rem;
    display: none;
}

@media (min-width: 768px) {
    .keyboard-hint {
        display: block;
    }
}

/* ══════════════════════════════════════════════════════
   EXPLANATION MODAL
   ══════════════════════════════════════════════════════ */
.explain-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.explain-overlay.active {
    opacity: 1;
    visibility: visible;
}

.explain-modal {
    position: relative;
    max-width: 620px;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 2.5rem 2rem 2rem;
    color: #1a1a1a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.explain-overlay.active .explain-modal {
    transform: translateY(0) scale(1);
}

.explain-modal-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.4;
    margin-bottom: 0.6rem;
}

.explain-modal-question {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.explain-modal-question[hidden] {
    display: none;
}

.explain-modal-text {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.75;
}

.explain-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.45);
    transition: all 0.2s;
}

.explain-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

/* ══════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════ */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ══════════════════════════════════════════════════════
   SCREEN READER ONLY (utility)
   ══════════════════════════════════════════════════════ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
