/* ═══════════════════════════════════════════════════════════════════════════
   COMPOUND INTEREST LANDING PAGE
   Editorial finance aesthetic - authoritative, refined, trustworthy
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500&display=swap');

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --unit: 8px;

    /* Colors - warm, trustworthy palette */
    --bg-primary: #faf9f7;
    --bg-secondary: #f0eeea;
    --bg-dark: #1a1918;

    --accent: #c17f24;
    --accent-hover: #d4922f;
    --accent-muted: rgba(193, 127, 36, 0.12);

    --text-primary: #1a1918;
    --text-secondary: #5c5a56;
    --text-muted: #8a8884;
    --text-on-accent: #ffffff;
    --text-on-dark: #f0eeea;

    --border: #e0ddd8;

    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --duration: 200ms;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Grain overlay for texture */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(var(--unit) * 3) calc(var(--unit) * 6);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 249, 247, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: calc(var(--unit) * 1.5);
}

.logo-mark {
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 4px;
    position: relative;
}

.logo-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border: 2px solid var(--text-on-accent);
    border-radius: 50%;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-cta {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    padding: calc(var(--unit) * 1) calc(var(--unit) * 2);
    border: 1px solid var(--accent);
    border-radius: 4px;
    transition: all var(--duration) var(--ease);
}

.nav-cta:hover {
    background: var(--accent);
    color: var(--text-on-accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--unit) * 8);
    align-items: center;
    padding: calc(var(--unit) * 16) calc(var(--unit) * 8) calc(var(--unit) * 8);
    max-width: 1400px;
    margin: 0 auto;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: calc(var(--unit) * 2);
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: calc(var(--unit) * 4);
}

.title-line {
    display: block;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) forwards;
}

.title-line:nth-child(1) { animation-delay: 0.3s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }

.title-accent {
    color: var(--accent);
    font-style: italic;
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: calc(var(--unit) * 5);
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.5s forwards;
}

.hero-actions {
    display: flex;
    gap: calc(var(--unit) * 2);
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.6s forwards;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--unit) * 1);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-on-accent);
    background: var(--accent);
    padding: calc(var(--unit) * 1.75) calc(var(--unit) * 3);
    border-radius: 6px;
    text-decoration: none;
    transition: all var(--duration) var(--ease);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(193, 127, 36, 0.3);
}

.btn-primary svg {
    transition: transform var(--duration) var(--ease);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    padding: calc(var(--unit) * 1.75) calc(var(--unit) * 2);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}

.btn-secondary:hover {
    color: var(--accent);
}

.btn-large {
    font-size: 14px;
    padding: calc(var(--unit) * 2.5) calc(var(--unit) * 4);
}

/* Hero Visual - Animated Bar Chart */
.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: fadeIn 1s var(--ease-out) 0.7s forwards;
}

.growth-chart {
    display: flex;
    align-items: flex-end;
    gap: calc(var(--unit) * 2);
    height: 320px;
    padding: calc(var(--unit) * 4);
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.chart-bar {
    width: 48px;
    height: var(--height);
    background: linear-gradient(to top, var(--border), #d0cdc8);
    border-radius: 4px 4px 0 0;
    position: relative;
    transform: scaleY(0);
    transform-origin: bottom;
    animation: growUp 0.8s var(--ease-out) var(--delay) forwards;
}

.chart-bar.accent {
    background: linear-gradient(to top, var(--accent), #d4922f);
}

.chart-bar span {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.chart-caption {
    margin-top: calc(var(--unit) * 5);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATS SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(var(--unit) * 6) calc(var(--unit) * 4);
    background: var(--bg-primary);
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: calc(var(--unit) * 1);
}

.stat-label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: calc(var(--unit) * 0.5);
}

.stat-source {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEATURES SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.features {
    padding: calc(var(--unit) * 12) calc(var(--unit) * 8);
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: calc(var(--unit) * 8);
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: calc(var(--unit) * 2);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--unit) * 4);
}

.feature-card {
    padding: calc(var(--unit) * 4);
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all var(--duration) var(--ease);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.feature-number {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: calc(var(--unit) * 2);
}

.feature-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: calc(var(--unit) * 1.5);
}

.feature-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EDUCATION SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.education {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--unit) * 8);
    padding: calc(var(--unit) * 12) calc(var(--unit) * 8);
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.edu-content .section-title {
    text-align: left;
    margin-bottom: calc(var(--unit) * 4);
}

.edu-text p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: calc(var(--unit) * 2);
}

.edu-text p:last-child {
    margin-bottom: 0;
}

.formula-card {
    background: var(--bg-dark);
    padding: calc(var(--unit) * 5);
    border-radius: 12px;
    text-align: center;
}

.formula-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: calc(var(--unit) * 3);
}

.formula-math {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 600;
    color: var(--text-on-dark);
    margin-bottom: calc(var(--unit) * 4);
}

.formula-math sup {
    font-size: 20px;
    vertical-align: super;
}

.formula-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--unit) * 1.5);
    text-align: left;
}

.legend-item {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: calc(var(--unit) * 1);
}

.legend-var {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(193, 127, 36, 0.2);
    color: var(--accent);
    font-weight: 600;
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CTA SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.cta-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: calc(var(--unit) * 12) calc(var(--unit) * 8);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: calc(var(--unit) * 2);
}

.cta-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: calc(var(--unit) * 4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.footer {
    padding: calc(var(--unit) * 4) calc(var(--unit) * 8);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes growUp {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: calc(var(--unit) * 14);
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
        margin-bottom: calc(var(--unit) * 4);
    }

    .growth-chart {
        height: 200px;
    }

    .chart-bar {
        width: 36px;
    }

    .education {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: calc(var(--unit) * 2) calc(var(--unit) * 3);
    }

    .hero {
        padding: calc(var(--unit) * 12) calc(var(--unit) * 3) calc(var(--unit) * 6);
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .stat {
        padding: calc(var(--unit) * 4);
    }

    .stat-number {
        font-size: 36px;
    }

    .features,
    .education,
    .cta-section {
        padding: calc(var(--unit) * 8) calc(var(--unit) * 3);
    }

    .growth-chart {
        gap: calc(var(--unit) * 1);
        padding: calc(var(--unit) * 3);
    }

    .chart-bar {
        width: 28px;
    }

    .chart-bar span {
        font-size: 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SELECTION & SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════════ */

::selection {
    background: var(--accent);
    color: var(--text-on-accent);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
