/* ═══════════════════════════════════════════════════
   VALUE INVESTING LAB — PREMIUM THEME
   Tesla/SpaceX-inspired design system
═══════════════════════════════════════════════════ */

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

:root {
    --gold: #c8a84b;
    --gold-light: #e8d48b;
    --dark: #080b10;
    --dark-card: #0d1117;
    --dark-elevated: #141a24;
    --text: #e8ecf0;
    --text-muted: #7a8a9a;
    --border: rgba(200, 168, 75, 0.12);
    --border-hover: rgba(200, 168, 75, 0.35);
    --green: #22c55e;
    --red: #ef4444;
    --blue: #3b82f6;
}

html { scroll-behavior: initial; }
html.lenis, html.lenis body { height: auto; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.7;
    font-size: 16px;
}

/* === TYPOGRAPHY === */
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 500; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 1.3rem; line-height: 1.4; }
p { font-size: 1rem; color: var(--text-muted); line-height: 1.9; }
strong { color: var(--text); }
a { color: var(--gold); text-decoration: none; transition: opacity 0.3s; }
a:hover { opacity: 0.8; }

/* === NAVIGATION === */
.premium-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(8, 11, 16, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.4s ease;
}
.premium-nav.scrolled { padding: 1rem 4rem; background: rgba(8, 11, 16, 0.95); }
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 600; color: var(--gold); text-decoration: none; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.8rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.3s ease; }
.nav-links a:hover { color: var(--gold); opacity: 1; }

/* === PAGE HERO (for inner pages) === */
.page-hero {
    padding: 12rem 2rem 6rem;
    text-align: center;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}
.page-hero .label { font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.5rem; }
.page-hero h1 { margin-bottom: 1.5rem; }
.page-hero .subtitle { font-size: 1.15rem; color: var(--text-muted); font-weight: 300; line-height: 1.9; max-width: 650px; margin: 0 auto; }

/* === CONTENT SECTIONS === */
.content-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.content-section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.content-section h3 {
    color: var(--gold);
    margin: 3rem 0 1rem;
    font-size: 1.2rem;
}

.content-section p {
    margin-bottom: 1.5rem;
}

/* === CARDS === */
.premium-card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 2rem 0;
    transition: all 0.4s ease;
}
.premium-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.4);
}

/* === QUOTE BOX === */
.quote-box {
    border-left: 3px solid var(--gold);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: rgba(200, 168, 75, 0.05);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.9;
}

/* === PRINCIPLE/TEACHING BOX === */
.teaching-card {
    background: var(--dark-elevated);
    border-left: 3px solid var(--gold);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
}
.teaching-card h4 { color: var(--gold); margin-bottom: 0.8rem; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1rem; }
.teaching-card p { color: var(--text-muted); font-size: 0.95rem; }

/* === FORMULA BOX === */
.formula-box {
    background: rgba(10, 20, 40, 0.8);
    border: 1px solid var(--border);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.formula-box .result { color: var(--green); font-weight: 700; }

/* === WHY BOX === */
.why-box {
    background: rgba(234, 179, 8, 0.06);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
}
.why-box strong { color: var(--gold); }

/* === DISCLAIMER === */
.disclaimer-box {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 3rem 0;
}
.disclaimer-box h3 { color: var(--red); margin-bottom: 1rem; font-family: 'Inter', sans-serif; }
.disclaimer-box p { color: var(--text-muted); }

/* === SIDEBAR NAV (for learning pages) === */
.page-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    padding-top: 2rem;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 0.4rem; }
.sidebar-nav a {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.sidebar-nav a:hover {
    background: var(--dark-elevated);
    color: var(--gold);
    border-color: var(--border);
    opacity: 1;
}

/* === GRID LAYOUTS === */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin: 3rem 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; margin: 3rem 0; }

/* === FLOW STEPS === */
.flow-step {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
    align-items: start;
}
.flow-number {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--gold);
    margin-top: 0.15rem;
}

/* === BOOK CARDS === */
.book-card {
    display: flex;
    gap: 1.5rem;
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    align-items: flex-start;
    transition: all 0.4s ease;
}
.book-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.book-card .book-icon { font-size: 2.5rem; flex-shrink: 0; }
.book-card h4 { color: var(--text); font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1rem; margin-bottom: 0.3rem; }
.book-card .book-author { color: var(--gold); font-size: 0.85rem; font-weight: 500; }
.book-card .book-year { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.3rem; }
.book-card .book-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.8; margin-top: 0.8rem; }
.book-card .book-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.2rem;
    background: var(--gold);
    color: var(--dark);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: opacity 0.3s;
}
.book-card .book-link:hover { opacity: 0.85; }

/* === STOCK CARDS (analysis listing) === */
.stock-card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}
.stock-card:hover { transform: translateY(-4px); border-color: var(--border-hover); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.4); opacity: 1; }
.stock-card .ticker { font-size: 1.5rem; font-weight: 700; color: var(--gold); font-family: 'Inter', sans-serif; }
.stock-card .name { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.3rem; }
.stock-card .description { font-size: 0.85rem; color: var(--text-muted); margin-top: 1rem; line-height: 1.6; }

/* === FOOTER === */
.premium-footer {
    border-top: 1px solid var(--border);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    max-width: 1200px;
    margin: 6rem auto 0;
}

/* === REVEAL ANIMATION === */
.reveal { opacity: 0; transform: translateY(50px); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .premium-nav { padding: 1rem 1.5rem; }
    .nav-links { display: none; }
    .page-hero { padding: 8rem 1.5rem 4rem; }
    .content-section { padding: 3rem 1.5rem; }
    .page-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .book-card { flex-direction: column; }
    .scroll-line-left, .scroll-line-right { display: none; }
    .flow-step { grid-template-columns: 44px 1fr; gap: 1rem; }
    .flow-number { width: 36px; height: 36px; font-size: 1rem; }
    .step-number { font-size: 2rem; }
    .method-step { grid-template-columns: 44px 1fr; gap: 1rem; }
}

/* === MOBILE HAMBURGER MENU === */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--gold);
    transition: all 0.3s ease;
    border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 11, 16, 0.97);
    backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--gold); }

@media (max-width: 768px) {
    .hamburger { display: flex !important; }
}
