/* storiographer.net - Story Cartography */
/* Colors: #4a90d9 (primary blue), #f5f0e8 (warm off-white), #1a1a2e (deep base), #e8b84b (accent gold), #6c757d (muted gray) */
/* Fonts: Space Grotesk, Inter */

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

:root {
    --primary: #4a90d9;
    --bg: #f5f0e8;
    --deep: #1a1a2e;
    --gold: #e8b84b;
    --gray: #6c757d;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--deep);
    color: var(--bg);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== NAVIGATION ===== */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 3rem;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(232, 184, 75, 0.15);
    transition: all 0.4s ease;
}

#main-nav.scrolled {
    padding: 0.8rem 3rem;
    background: rgba(26, 26, 46, 0.97);
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gray);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--bg);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--bg);
    transition: all 0.3s ease;
}

/* ===== SECTIONS ===== */
.section {
    min-height: 100vh;
    padding: 8rem 4rem;
    position: relative;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--bg);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.section-heading em {
    color: var(--gold);
    font-style: italic;
}

.section-subheading {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 500px;
}

/* ===== HERO ===== */
.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 6rem;
    background: linear-gradient(135deg, var(--deep) 0%, #12122a 50%, #1a1a3e 100%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    grid-template-rows: auto auto;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.hero-title-block {
    grid-column: 1;
    grid-row: 1;
    padding-top: 4rem;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.title-line {
    display: block;
}

.title-line-1 {
    color: var(--bg);
    opacity: 0;
    transform: translateX(-40px);
    animation: slideInLeft 0.8s ease forwards;
}

.title-line-2 {
    color: var(--gold);
    opacity: 0;
    transform: translateX(-40px);
    animation: slideInLeft 0.8s ease 0.2s forwards;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--gray);
    margin-top: 2rem;
    max-width: 400px;
    opacity: 0;
    animation: fadeIn 1s ease 0.6s forwards;
}

.hero-svg-block {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-arc-svg {
    width: 100%;
    max-width: 550px;
    opacity: 0;
    animation: fadeIn 1.2s ease 0.4s forwards;
}

.arc-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 2s ease 0.8s forwards;
}

.arc-point {
    opacity: 0;
    animation: fadeIn 0.5s ease 2.5s forwards;
}

.arc-label {
    font-family: var(--font-body);
    opacity: 0;
    animation: fadeIn 0.5s ease 2.8s forwards;
}

.hero-overlap-block {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    z-index: 3;
    margin-top: -2rem;
    margin-left: 3rem;
}

.overlap-card {
    background: rgba(74, 144, 217, 0.12);
    border: 1px solid rgba(74, 144, 217, 0.3);
    border-radius: 8px;
    padding: 2rem 2.5rem;
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(8px);
    opacity: 0;
    animation: slideUp 0.8s ease 1s forwards;
}

.overlap-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.overlap-label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--gray);
    max-width: 150px;
    line-height: 1.4;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    opacity: 0;
    animation: fadeIn 1s ease 2s forwards;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--gold));
    animation: scrollPulse 2s ease infinite;
}

.scroll-text {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ===== ABOUT ===== */
.about-section {
    background: var(--deep);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    opacity: 0.3;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: auto auto;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.about-text-block {
    grid-column: 1;
    grid-row: 1;
    padding-right: 2rem;
}

.about-description {
    font-size: 1.05rem;
    color: var(--gray);
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

.about-visual-block {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-left: -3rem;
}

.about-svg {
    width: 100%;
    max-width: 380px;
    opacity: 0.9;
}

.pulse-dot {
    animation: pulse 3s ease infinite;
}

.about-stat-block {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ===== STORY MAPS ===== */
.story-maps-section {
    background: linear-gradient(180deg, var(--deep) 0%, #161630 100%);
    padding-bottom: 6rem;
}

.story-maps-header {
    text-align: center;
    margin-bottom: 4rem;
}

.story-maps-header .section-subheading {
    margin: 0 auto;
}

.story-maps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.story-map-card {
    background: rgba(245, 240, 232, 0.04);
    border: 1px solid rgba(232, 184, 75, 0.15);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.story-map-card:hover {
    border-color: rgba(232, 184, 75, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card-layer {
    transition: all 0.5s ease;
}

.card-layer-1 {
    opacity: 1;
}

.card-layer-2,
.card-layer-3 {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.6s ease, opacity 0.4s ease, margin 0.4s ease;
    margin-top: 0;
}

.story-map-card.revealed .card-layer-2 {
    max-height: 300px;
    opacity: 1;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(232, 184, 75, 0.15);
}

.story-map-card.revealed .card-layer-3 {
    max-height: 200px;
    opacity: 1;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(74, 144, 217, 0.15);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--bg);
    margin-bottom: 0.5rem;
}

.card-excerpt {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.card-svg {
    width: 100%;
    max-width: 300px;
    margin: 0.5rem 0;
}

.card-layer-2 h4,
.card-layer-3 h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.8rem;
}

.disclosure-list {
    list-style: none;
    padding: 0;
}

.disclosure-list li {
    font-size: 0.88rem;
    color: var(--gray);
    padding: 0.4rem 0;
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
}

.disclosure-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    transform: translateY(-50%);
}

.disclosure-list li strong {
    color: var(--bg);
}

.card-layer-3 p {
    font-size: 0.88rem;
    color: var(--gray);
    line-height: 1.6;
}

.card-reveal-btn {
    display: inline-block;
    margin-top: 1.2rem;
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.card-reveal-btn:hover {
    background: var(--gold);
    color: var(--deep);
}

.story-map-card.revealed .card-reveal-btn {
    background: rgba(232, 184, 75, 0.1);
}

/* ===== ANALYSIS ===== */
.analysis-section {
    background: var(--deep);
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    grid-template-rows: auto auto;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.analysis-header-block {
    grid-column: 1 / 4;
    grid-row: 1;
    margin-bottom: 2rem;
}

.analysis-featured-block {
    grid-column: 1 / 3;
    grid-row: 2;
}

.analysis-sidebar-block {
    grid-column: 3;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.analysis-card {
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-3px);
}

.analysis-card-featured {
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.15) 0%, rgba(232, 184, 75, 0.08) 100%);
    border: 1px solid rgba(74, 144, 217, 0.25);
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.analysis-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 46, 0.95) 0%, rgba(26, 26, 46, 0.3) 60%, transparent 100%);
    z-index: 1;
}

.analysis-card-content {
    position: relative;
    z-index: 2;
}

.analysis-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold);
    background: rgba(232, 184, 75, 0.12);
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    margin-bottom: 1rem;
}

.analysis-card-featured h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--bg);
    margin-bottom: 0.8rem;
}

.analysis-card-featured p {
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.analysis-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.meta-item {
    font-size: 0.8rem;
    color: var(--primary);
}

.meta-divider {
    color: var(--gray);
}

.analysis-card-small {
    background: rgba(245, 240, 232, 0.04);
    border: 1px solid rgba(108, 117, 125, 0.2);
}

.analysis-card-small h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bg);
    margin-bottom: 0.5rem;
}

.analysis-card-small p {
    font-size: 0.88rem;
    color: var(--gray);
    line-height: 1.5;
}

/* ===== TRADITIONS ===== */
.traditions-section {
    background: linear-gradient(180deg, #161630 0%, var(--deep) 100%);
}

.traditions-header {
    text-align: center;
    margin-bottom: 4rem;
}

.traditions-header .section-subheading {
    margin: 0 auto;
}

.traditions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tradition-card {
    background: rgba(245, 240, 232, 0.03);
    border: 1px solid rgba(232, 184, 75, 0.1);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.tradition-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.tradition-card:hover {
    border-color: rgba(232, 184, 75, 0.3);
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.tradition-card:hover::before {
    opacity: 1;
    width: 60px;
}

.tradition-motif {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.tradition-motif svg {
    width: 100%;
    height: 100%;
}

.tradition-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--bg);
    margin-bottom: 0.6rem;
}

.tradition-desc {
    font-size: 0.88rem;
    color: var(--gray);
    line-height: 1.6;
}

/* ===== CONTACT ===== */
.contact-section {
    background: var(--deep);
    min-height: auto;
    padding: 8rem 4rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: center;
}

.contact-description {
    font-size: 1.05rem;
    color: var(--gray);
    line-height: 1.8;
    margin-top: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray);
}

.form-group input,
.form-group textarea {
    padding: 0.9rem 1.2rem;
    background: rgba(245, 240, 232, 0.05);
    border: 1px solid rgba(108, 117, 125, 0.3);
    border-radius: 6px;
    color: var(--bg);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    outline: none;
}

.form-group input:hover,
.form-group textarea:hover,
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--gold);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    padding: 1rem 2.5rem;
    background: var(--gold);
    color: var(--deep);
    border: none;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.submit-btn:hover {
    background: #d4a43d;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 184, 75, 0.3);
}

/* ===== FOOTER ===== */
.site-footer {
    background: #111128;
    padding: 3rem 4rem;
    border-top: 1px solid rgba(232, 184, 75, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
}

.footer-tagline {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.3rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-copy p {
    font-size: 0.75rem;
    color: var(--gray);
    opacity: 0.6;
}

/* ===== ANIMATIONS ===== */
@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        r: 4;
    }
    50% {
        opacity: 0.5;
        r: 6;
    }
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.2);
    }
}

/* ===== SCROLL REVEAL ===== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== MOBILE NAV ===== */
.mobile-nav-open .nav-links {
    display: flex;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .section {
        padding: 6rem 2.5rem;
    }

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

    .section-heading {
        font-size: 2.8rem;
    }

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

    .analysis-featured-block,
    .analysis-sidebar-block {
        grid-column: 1;
    }

    .analysis-sidebar-block {
        flex-direction: row;
    }

    .traditions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 5rem 1.5rem;
    }

    #main-nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(26, 26, 46, 0.98);
        padding: 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid rgba(232, 184, 75, 0.15);
    }

    .mobile-nav-open .nav-links {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .hero-svg-block {
        grid-column: 1;
        grid-row: 2;
    }

    .hero-overlap-block {
        grid-column: 1;
        grid-row: 3;
        margin-left: 0;
    }

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

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

    .about-visual-block {
        grid-column: 1;
        grid-row: 2;
        margin-left: 0;
    }

    .about-stat-block {
        grid-column: 1;
        grid-row: 3;
    }

    .story-maps-grid {
        grid-template-columns: 1fr;
    }

    .analysis-sidebar-block {
        flex-direction: column;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-section {
        padding: 5rem 1.5rem;
    }

    .section-heading {
        font-size: 2.2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
