/* === CSS Variables === */
:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #1a1a1d;
    --bg-card: #151517;
    
    --text-primary: #f5f5f0;
    --text-secondary: #a8a8a0;
    --text-muted: #6b6b65;
    
    --accent-gold: #d4a853;
    --accent-gold-light: #e8c478;
    --accent-gold-dark: #b8923a;
    --accent-coral: #e07a5f;
    --accent-mint: #81b29a;
    
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.12);
    
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Instrument Sans', -apple-system, sans-serif;
    --font-mono: 'Source Code Pro', monospace;
    
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

/* === Grain Overlay === */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    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 === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1.25rem 2rem;
    background: rgba(10, 10, 11, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
}

.navbar > *:last-child {
    justify-self: end;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    color: var(--accent-gold);
    font-size: 1.25rem;
}

.brand-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

.nav-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.back-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    letter-spacing: 0.05em;
}

.back-link:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
    background: rgba(212, 168, 83, 0.1);
}

/* === Hero Section === */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 8rem 6rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse at 70% 30%, rgba(212, 168, 83, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    padding: 0.5rem 1rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
    opacity: 0;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.1s forwards;
    opacity: 0;
}

.title-accent {
    font-style: italic;
    color: var(--accent-gold);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 400px;
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.2s forwards;
    opacity: 0;
}

.hero-scroll-hint {
    position: fixed;
    bottom: 3rem;
    left: 6rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.4s forwards;
    opacity: 0;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.scroll-arrow {
    animation: bounce 2s infinite;
}

.hero-visual {
    position: relative;
    height: 500px;
}

.floating-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    padding: 2rem;
    border-radius: 4px;
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.card-2 {
    top: 40%;
    right: 10%;
    animation-delay: -2s;
}

.card-3 {
    bottom: 15%;
    left: 30%;
    animation-delay: -4s;
}

.card-year {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.card-icon {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.card-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* === Sections === */
.section {
    padding: 8rem 6rem;
    position: relative;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    margin-bottom: 3rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-gold);
    letter-spacing: 0.1em;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* === Intro Section === */
.intro-section {
    background: var(--bg-secondary);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.lead-text {
    font-family: var(--font-display);
    font-size: 1.75rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.intro-main p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.intro-main em {
    color: var(--text-primary);
    font-style: italic;
}

.highlight-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.1) 0%, transparent 100%);
    border-left: 3px solid var(--accent-gold);
    padding: 1.5rem;
    margin-top: 2rem;
}

.highlight-icon {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
}

.highlight-box p {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0;
}

.goal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    padding: 2rem;
    border-radius: 4px;
}

.goal-header {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.goal-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.date-highlight {
    display: inline-block;
    background: rgba(212, 168, 83, 0.2);
    color: var(--accent-gold);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    font-weight: 600;
}

/* === Structure Section === */
.structure-grid {
    display: grid;
    gap: 2rem;
}

.structure-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    border-radius: 4px;
    transition: all 0.3s var(--ease-out-quart);
}

.structure-item:hover {
    border-color: var(--border-medium);
    transform: translateX(8px);
}

.structure-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.structure-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--accent-gold);
    color: var(--bg-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50%;
}

.structure-header h3 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.structure-subtitle {
    color: var(--text-muted);
    font-weight: 400;
}

.structure-item p {
    color: var(--text-secondary);
}

.example-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

.example-box.bad {
    background: rgba(224, 122, 95, 0.1);
    border: 1px solid rgba(224, 122, 95, 0.3);
}

.example-box.good {
    background: rgba(129, 178, 154, 0.1);
    border: 1px solid rgba(129, 178, 154, 0.3);
}

.example-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.example-box.bad .example-label {
    color: var(--accent-coral);
}

.example-box.good .example-label {
    color: var(--accent-mint);
}

.example-box p {
    color: var(--text-primary);
    font-style: italic;
    margin: 0;
}

.dateline-example {
    font-style: italic;
    color: var(--accent-gold) !important;
    font-size: 1.1rem;
}

.quote-example {
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: var(--text-primary);
    font-style: italic;
    position: relative;
}

.quote-mark {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--accent-gold);
    position: absolute;
    top: -0.5rem;
    left: 0.5rem;
    opacity: 0.5;
}

.cta-example {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    color: var(--accent-gold) !important;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* === Demo Section === */
.demo-section {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.demo-container {
    max-width: 800px;
    margin: 0 auto;
}

.demo-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.demo-label-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
}

.demo-click-hint {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    animation: pulse 2s infinite;
}

.demo-preview {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
}

.demo-preview:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: var(--accent-gold);
    box-shadow: 0 20px 60px rgba(212, 168, 83, 0.15);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-subtle);
}

.preview-dots {
    display: flex;
    gap: 6px;
}

.preview-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.5;
}

.preview-dots span:first-child {
    background: var(--accent-coral);
}

.preview-dots span:nth-child(2) {
    background: var(--accent-gold);
}

.preview-dots span:last-child {
    background: var(--accent-mint);
}

.preview-url {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.preview-content {
    padding: 2rem;
    position: relative;
}

.preview-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--accent-coral);
    background: rgba(224, 122, 95, 0.15);
    padding: 0.3rem 0.75rem;
    border-radius: 2px;
    margin-bottom: 1rem;
}

.preview-headline {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.preview-dateline {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-gold);
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.preview-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.preview-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 11, 0.9) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.demo-preview:hover .preview-overlay {
    opacity: 1;
}

.preview-cta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    padding: 0.75rem 2rem;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(10px);
}

/* === Rules Section === */
.rules-section {
    background: var(--bg-secondary);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.rule-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 2.5rem 2rem;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s var(--ease-out-quart);
}

.rule-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-4px);
}

.rule-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.rule-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.rule-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.rule-card strong {
    color: var(--text-primary);
}

.rule-card em {
    color: var(--accent-gold);
    font-style: italic;
}

/* === Exercises Section === */
.exercises-section {
    background: var(--bg-primary);
}

.exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.exercise-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    padding: 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.exercise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-coral));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out-expo);
}

.exercise-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(212, 168, 83, 0.15);
}

.exercise-card:hover::before {
    transform: scaleX(1);
}

.exercise-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.exercise-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.exercise-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.exercise-cta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    transition: color 0.3s ease;
}

.exercise-card:hover .exercise-cta {
    color: var(--accent-gold-light);
}

.exercise-card.crisis::before {
    background: linear-gradient(90deg, var(--accent-coral), #c94a4a);
}

.exercise-card.crisis:hover {
    border-color: var(--accent-coral);
    box-shadow: 0 20px 60px rgba(224, 122, 95, 0.15);
}

.exercise-card.crisis .exercise-cta {
    color: var(--accent-coral);
}

.exercise-card.crisis:hover .exercise-cta {
    color: #f09a85;
}

.exercise-card.mvp::before {
    background: linear-gradient(90deg, #5bc0be, #6b9ac4);
}

.exercise-card.mvp:hover {
    border-color: #5bc0be;
    box-shadow: 0 20px 60px rgba(91, 192, 190, 0.15);
}

.exercise-card.mvp .exercise-cta {
    color: #5bc0be;
}

.exercise-card.mvp:hover .exercise-cta {
    color: #7dd3d1;
}

.exercise-card.race::before {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.exercise-card.race:hover {
    border-color: #6366f1;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}

.exercise-card.race .exercise-cta {
    color: #6366f1;
}

.exercise-card.race:hover .exercise-cta {
    color: #818cf8;
}

/* === Footer === */
.footer {
    padding: 4rem 6rem;
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

.footer-tagline {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--text-muted);
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(5px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* === Visibility Animations === */
.section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.structure-item,
.rule-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--ease-out-quart), transform 0.5s var(--ease-out-quart);
}

.structure-item.visible,
.rule-card.visible,
.section.visible .structure-item,
.section.visible .rule-card {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 6rem 3rem;
    }
    
    .hero-visual {
        display: none;
    }
    
    .section {
        padding: 4rem 3rem;
    }
    
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
        text-align: center;
    }
    
    .navbar > *:last-child {
        justify-self: center;
    }
    
    .back-link {
        justify-self: center;
        order: -1;
    }
    
    .nav-brand {
        justify-content: center;
    }
    
    .hero {
        padding: 5rem 1.5rem;
    }
    
    .hero-scroll-hint {
        left: 1.5rem;
    }
    
    .section {
        padding: 3rem 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .footer {
        padding: 2rem 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

