/* ============================================
   CSS Variables & Reset
   ============================================ */

:root {
    /* Colors - Clean, modern palette */
    --color-bg: rgb(253, 251, 247);
    --color-text: #1d1d1f;
    --color-text-muted: #86868b;
    --color-button-bg: #1d1d1f;
    --color-button-text: #ffffff;

    /* Typography */
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --space-unit: 1rem;
    --space-sm: calc(var(--space-unit) * 1);
    --space-md: calc(var(--space-unit) * 2);
    --space-lg: calc(var(--space-unit) * 4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   Base Styles
   ============================================ */

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-system);
    font-weight: 400;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition-property: background-color, color;
    transition-duration: 1000ms;
}

/* ============================================
   Main Content
   ============================================ */

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) var(--space-md);
    max-width: 50rem;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* ============================================
   Fact Card
   ============================================ */

.fact-card {
    text-align: center;
    margin-bottom: var(--space-md);
}

.fact-title {
    font-family: var(--font-system);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    line-height: 1.1;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;

    /* Entrance animation - 0ms delay */
    opacity: 0;
    filter: blur(1px);
    transform: translateY(10px);
    animation: delicate-fade-in 1.5s cubic-bezier(0.2, 0.9, 0.1, 1) forwards;
    animation-delay: 0ms;
}

.fact-explanation {
    font-family: var(--font-system);
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    max-width: 46ch;
    margin-left: auto;
    margin-right: auto;

    /* Entrance animation - 100ms delay */
    opacity: 0;
    filter: blur(1px);
    transform: translateY(10px);
    animation: delicate-fade-in 1.5s cubic-bezier(0.2, 0.9, 0.1, 1) forwards;
    animation-delay: 100ms;
}

.fact-source {
    font-family: var(--font-system);
    font-size: 0.85rem;
    font-style: italic;
    font-weight: 400;
    color: var(--color-text-muted);
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease;

    /* Entrance animation - 200ms delay */
    opacity: 0;
    filter: blur(1px);
    transform: translateY(10px);
    animation: delicate-fade-in 1.5s cubic-bezier(0.2, 0.9, 0.1, 1) forwards;
    animation-delay: 200ms;
}

.fact-source:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.fact-source::before {
    content: 'Source: ';
}

/* ============================================
   Delicate Fade-In Animation Keyframes
   ============================================ */

@keyframes delicate-fade-in {
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

/* ============================================
   Continue Section
   ============================================ */

.continue-wrapper {
    text-align: center;
    margin-top: var(--space-md);
}

.continue-hint {
    font-size: 0.75rem;
    color: #c7c7cc;
    margin-top: var(--space-sm);
    text-align: center;
}

.hint-link {
    color: #c7c7cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hint-link:hover {
    color: var(--color-text-muted);
    text-decoration: underline;
}

.continue-btn {
    font-family: var(--font-system);
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    letter-spacing: 0.025em; /* tracking-wide */
    color: var(--color-button-text);
    background-color: var(--color-button-bg);
    border: none;
    border-radius: 9999px; /* rounded-full */
    padding: 0.875rem 2rem; /* py-3.5 px-8 */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem; /* gap-3 (12px) */
    position: relative;
    overflow: hidden;

    /* Entrance animation - 300ms delay */
    opacity: 0;
    filter: blur(1px);
    transform: translateY(10px);
    animation: delicate-fade-in 1.5s cubic-bezier(0.2, 0.9, 0.1, 1) forwards;
    animation-delay: 300ms;

    /* Transitions */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.continue-btn.active {
    pointer-events: auto;
    /* Subtle indication that button is now clickable */
    filter: brightness(1);
}

/* Shimmer effect */
.continue-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: none;
}

/* Shimmer only plays on hover when active */
.continue-btn.active:hover::before {
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Hover state */
.continue-btn.active:hover {
    background-color: rgba(29, 29, 31, 0.9); /* bg-primary/90 */
    box-shadow:
        0 10px 25px -5px rgba(29, 29, 31, 0.2),
        0 10px 10px -5px rgba(29, 29, 31, 0.04),
        0 0 40px 5px rgba(29, 29, 31, 0.05); /* shadow-lg + colored glow */
}

/* Active/pressed state */
.continue-btn.active:active {
    transform: scale(0.98);
}

.continue-arrow {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.125rem;
}

/* Arrow micro-interaction on hover */
.continue-btn.active:hover .continue-arrow {
    transform: translateX(4px); /* translate-x-1 (4px) */
}

/* ============================================
   CTA2 - Start with 10 seconds
   ============================================ */

.cta2-wrapper {
    text-align: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid #e5e5e7;

    /* Entrance animation - 400ms delay */
    opacity: 0;
    filter: blur(1px);
    transform: translateY(10px);
    animation: delicate-fade-in 1.5s cubic-bezier(0.2, 0.9, 0.1, 1) forwards;
    animation-delay: 400ms;
}

.cta2-text {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.cta2-link {
    font-family: var(--font-system);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
}

.cta2-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: width 0.4s ease;
}

.cta2-link:hover::after {
    width: 100%;
}

.cta2-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.cta2-link:hover .cta2-arrow {
    transform: translateX(4px);
}

/* ============================================
   Footer
   ============================================ */

.page-footer {
    padding: var(--space-md);
    text-align: center;
    position: relative;

    /* Entrance animation - 500ms delay */
    opacity: 0;
    filter: blur(1px);
    transform: translateY(10px);
    animation: delicate-fade-in 1.5s cubic-bezier(0.2, 0.9, 0.1, 1) forwards;
    animation-delay: 500ms;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.footer-links a {
    font-family: var(--font-system);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .content {
        padding: var(--space-md) var(--space-md);
    }

    .fact-title {
        font-size: 3rem;
    }

    .fact-explanation {
        font-size: 1.25rem;
    }

    .continue-btn {
        padding: 0.875rem 1.75rem;
        font-size: 0.9375rem;
    }

    .footer-links {
        gap: var(--space-sm);
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
