/* ============================================
   QUOTESTACK - PREMIUM EDITORIAL DESIGN
   ============================================ */

/* Font Face Declarations */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/Inter-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/Inter-SemiBold.ttf') format('truetype');
}

@font-face {
    font-family: 'Spectral';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/Spectral-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Spectral';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/Spectral-SemiBold.ttf') format('truetype');
}

@font-face {
    font-family: 'Spectral';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/Spectral-Bold.ttf') format('truetype');
}

/* CSS Variables */
:root {
    /* Colors */
    --color-bg: #FDFBF9;
    /* Warm off-white paper tone */
    --color-surface: rgba(255, 255, 255, 0.85);
    /* Glassmorphism base */
    --color-text-primary: #111111;
    --color-text-secondary: #4A4A4A;
    --color-text-tertiary: #8C8C8C;
    --color-border: rgba(0, 0, 0, 0.06);
    --color-accent: #FF5722;
    /* Slightly deeper, more vibrant orange */
    --color-accent-hover: #E64A19;
    --color-accent-light: rgba(255, 87, 34, 0.08);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Spectral', Georgia, serif;

    --font-size-xs: 0.8125rem;
    --font-size-sm: 0.9375rem;
    --font-size-base: 1.0625rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 1.75rem;
    --font-size-3xl: 2.5rem;
    --font-size-4xl: 3.5rem;
    --font-size-5xl: 4.5rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
}

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

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

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 0%, #FFF5F0 0%, transparent 40%);
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

/* Hero Section */
.hero {
    padding: var(--space-2xl) var(--space-lg) var(--space-xl);
    text-align: center;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.logo-container {
    margin-bottom: var(--space-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    height: 96px;
    width: auto;
    display: block;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.05;
    margin-bottom: var(--space-md);
    letter-spacing: -0.03em;
    background: linear-gradient(180deg, var(--color-text-primary) 0%, #333 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 640px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}

/* Main Content */
.main {
    padding: 0 var(--space-lg) var(--space-3xl);
}

.main-container {
    max-width: 720px;
    margin: 0 auto;
}

/* Fact Display Card */
.fact-display {
    background: var(--color-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-xl);
    margin-bottom: var(--space-xl);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.fact-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), #FF9100);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fact-display:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.fact-display:hover::before {
    opacity: 1;
}

.fact-icon {
    font-size: 3.5rem;
    margin-bottom: var(--space-md);
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.fact-text {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    line-height: 1.35;
    color: var(--color-text-primary);
    margin-bottom: var(--space-lg);
    font-weight: 500;
}

.fact-meta {
    display: flex;
    justify-content: center;
}

.fact-category {
    font-family: var(--font-sans);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    background: var(--color-accent-light);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 87, 34, 0.1);
}

/* Primary Button */
.btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 1.25rem;
    background: var(--color-text-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: var(--space-2xl);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn-primary.loading .btn-text,
.btn-primary.loading .btn-icon {
    display: none;
}

.btn-primary.loading .btn-loading-spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sponsored Section */
.sponsored {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-xl);
    position: relative;
}

.sponsored-label {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-tertiary);
    display: block;
    margin-bottom: var(--space-md);
    font-weight: 600;
    text-align: center;
}

.sponsored-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    padding: var(--space-lg);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.sponsored-content:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

.sponsored-name {
    display: block;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: var(--font-size-xl);
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.sponsored-desc {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

.sponsored-image {
    height: 80px;
    width: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-left: auto;
    margin-right: var(--space-sm);
}

.sponsored-arrow {
    color: var(--color-accent);
    font-size: var(--font-size-xl);
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.sponsored-content:hover .sponsored-arrow {
    transform: translateX(4px);
    opacity: 1;
}

/* Footer */
.footer {
    padding: var(--space-2xl) var(--space-lg);
    border-top: 1px solid var(--color-border);
    background: #fff;
}

.footer-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--color-text-primary);
    display: block;
    margin-bottom: 4px;
}

.footer-copyright {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

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

.footer-link {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--color-accent);
}

/* Privacy Page Styles */
.privacy-container {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.privacy-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.privacy-content p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

.privacy-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--color-text-secondary);
}

.privacy-content li {
    margin-bottom: 0.5rem;
}

.last-updated {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    margin-bottom: 2rem;
}

.contact-info {
    padding: 1rem 0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    :root {
        --space-lg: 1.5rem;
        --space-xl: 2.5rem;
        --space-2xl: 4rem;
    }

    .hero {
        padding: var(--space-2xl) var(--space-md);
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .main {
        padding: 0 var(--space-md) var(--space-2xl);
    }

    .fact-display {
        padding: var(--space-xl) var(--space-md);
        min-height: 280px;
    }

    .fact-text {
        font-size: 1.5rem;
    }

    .footer-container {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }
}