/* mores.dev — Navy-Metallic Editorial Design */

/* ====== CSS Custom Properties ====== */
:root {
    --bg-primary: #0b1930;
    --bg-secondary: #132440;
    --surface: #1c3354;
    --text-primary: #c0ccd8;
    --text-secondary: #7b8fa3;
    --accent-amber: #e8a838;
    --accent-copper: #d47b3e;
    --highlight: #eaf0f6;
    --decorative: #3a4f65;
    --muted-steel: #4a5d73;
    --accent-teal: #38d9c4;
    --gutter: 24px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    position: relative;
}

/* ====== Scroll Progress Indicator ====== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--accent-amber);
    z-index: 1000;
    transition: width 0.1s linear;
}

/* ====== Grid Overlay ====== */
#grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.1;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent calc((100% - 11 * var(--gutter)) / 12),
        var(--decorative) calc((100% - 11 * var(--gutter)) / 12),
        var(--decorative) calc((100% - 11 * var(--gutter)) / 12 + 1px),
        transparent calc((100% - 11 * var(--gutter)) / 12 + 1px),
        transparent calc((100% - 11 * var(--gutter)) / 12 + var(--gutter))
    );
}

/* ====== Typography ====== */
.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3.6rem, 10vw, 7.2rem);
    letter-spacing: -0.03em;
    line-height: 0.92;
    text-transform: uppercase;
    font-feature-settings: "kern" 1, "liga" 1;
    background-image: linear-gradient(135deg, #c0ccd8 0%, #eaf0f6 50%, #c0ccd8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 0 8vw;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.03em;
    line-height: 0.92;
    text-transform: uppercase;
    color: var(--highlight);
    margin-bottom: 1.5rem;
}

.section-number {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-amber);
    display: block;
    margin-bottom: 1rem;
}

.body-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

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

.highlight-text {
    color: var(--accent-amber);
    font-weight: 600;
}

.pull-quote {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.25;
    color: var(--highlight);
}

/* ====== Hero Section ====== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    background-color: var(--bg-primary);
    overflow: hidden;
}

.hero-word {
    display: inline-block;
    opacity: 0;
    animation: fadeInWord 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-word:nth-child(1) { animation-delay: 0.18s; }
.hero-word:nth-child(2) { animation-delay: 0.36s; }
.hero-word:nth-child(3) { animation-delay: 0.54s; }
.hero-word:nth-child(4) { animation-delay: 0.72s; }
.hero-word:nth-child(5) { animation-delay: 0.90s; }
.hero-word:nth-child(6) { animation-delay: 1.08s; }
.hero-word:nth-child(7) { animation-delay: 1.26s; }

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

.skyline-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 320px;
    opacity: 0;
    animation: fadeInSkyline 1.2s ease-out 1.2s forwards;
}

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

/* ====== Editorial Grid ====== */
.editorial-section {
    position: relative;
    z-index: 2;
    padding: 8vh 0;
}

.editorial-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0 var(--gutter);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8vw;
}

.col-left,
.col-right {
    padding: 2rem 0;
}

.col-divider {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.vertical-rule {
    width: 1px;
    height: 100%;
    background: #4a5d73;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.vertical-rule.visible {
    transform: scaleY(1);
}

/* ====== Breakout Sections ====== */
.breakout-section {
    position: relative;
    z-index: 2;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12vh 8vw;
    overflow: hidden;
}

.breakout-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 9rem);
    letter-spacing: -0.03em;
    line-height: 0.92;
    text-transform: uppercase;
    color: var(--accent-amber);
    position: relative;
    z-index: 2;
}

.breakout-attribution {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

/* ====== Organic Blobs ====== */
.organic-blob {
    position: absolute;
    border-radius: 30% 70% 60% 40% / 50% 40% 70% 60%;
    animation: blobMorph 8s ease-in-out infinite;
    pointer-events: none;
}

.blob-amber {
    width: 300px;
    height: 300px;
    background: rgba(232, 168, 56, 0.08);
    top: -50px;
    right: -80px;
    position: relative;
}

.blob-teal {
    width: 40vw;
    height: 40vw;
    max-width: 600px;
    max-height: 600px;
    background: rgba(56, 217, 196, 0.06);
    position: absolute;
    z-index: 1;
    animation: blobMorph 8s ease-in-out infinite, blobPulse 4s ease-in-out infinite;
}

.blob-teal-small {
    width: 200px;
    height: 200px;
    background: rgba(56, 217, 196, 0.05);
    position: relative;
    margin-bottom: -100px;
}

.blob-amber-small {
    width: 250px;
    height: 250px;
    background: rgba(232, 168, 56, 0.08);
    position: relative;
    margin-bottom: -120px;
}

.blob-amber-large {
    width: 40vw;
    height: 40vw;
    max-width: 600px;
    max-height: 600px;
    background: rgba(232, 168, 56, 0.06);
    position: absolute;
    z-index: 1;
    animation: blobMorph 8s ease-in-out infinite, blobPulse 4s ease-in-out infinite;
}

@keyframes blobMorph {
    0%, 100% { border-radius: 30% 70% 60% 40% / 50% 40% 70% 60%; }
    25% { border-radius: 58% 42% 44% 56% / 64% 30% 70% 36%; }
    50% { border-radius: 40% 60% 70% 30% / 36% 66% 34% 64%; }
    75% { border-radius: 66% 34% 38% 62% / 42% 56% 44% 58%; }
}

@keyframes blobPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ====== Pullquote Section ====== */
.pullquote-section {
    position: relative;
    z-index: 2;
    padding: 12vh 8vw;
    display: flex;
    justify-content: center;
}

.pullquote-container {
    max-width: 900px;
    text-align: center;
}

/* ====== Crosswalk Divider ====== */
.crosswalk-divider {
    width: 120px;
    height: 29px;
    margin: 2rem auto;
    background: repeating-linear-gradient(
        180deg,
        var(--decorative) 0px,
        var(--decorative) 5px,
        transparent 5px,
        transparent 10px
    );
}

.crosswalk-divider.wide {
    width: 240px;
}

/* ====== Closing Section ====== */
.closing-section {
    position: relative;
    z-index: 2;
    padding: 16vh 8vw;
    text-align: center;
    background-color: var(--bg-secondary);
}

.closing-content {
    max-width: 800px;
    margin: 0 auto;
}

.closing-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: -0.03em;
    line-height: 0.92;
    text-transform: uppercase;
    color: var(--highlight);
    margin-bottom: 1.5rem;
}

.closing-subtitle {
    font-family: 'DM Serif Display', serif;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.closing-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--text-primary);
    margin-bottom: 2rem;
}

/* ====== Compass Navigation ====== */
.compass-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
}

.compass-rose {
    width: 48px;
    height: 48px;
    cursor: pointer;
    animation: compassRotate 30s linear infinite;
    transition: transform 0.3s ease;
}

.compass-container:hover .compass-rose {
    animation-play-state: paused;
}

@keyframes compassRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.compass-index {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--decorative);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-width: 200px;
}

.compass-container:hover .compass-index {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.index-link {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

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

/* ====== Stagger Animations ====== */
.stagger-child {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-child.visible {
    opacity: 1;
    transform: translateY(0);
}

.pull-quote.stagger-animate {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pull-quote.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .editorial-grid {
        grid-template-columns: 1fr;
        gap: 2rem 0;
        padding: 0 6vw;
    }

    .col-divider {
        display: none;
    }

    .col-right,
    .col-left {
        margin-top: 0 !important;
    }

    .breakout-text {
        font-size: clamp(2.5rem, 10vw, 5rem);
    }

    .hero-title {
        padding: 0 6vw;
    }

    .compass-container {
        bottom: 1rem;
        right: 1rem;
    }
}

/* ====== Prefers Reduced Motion ====== */
@media (prefers-reduced-motion: reduce) {
    .hero-word {
        animation: none;
        opacity: 1;
    }

    .skyline-svg {
        animation: none;
        opacity: 1;
    }

    .organic-blob {
        animation: none;
    }

    .compass-rose {
        animation: none;
    }

    .stagger-child {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .vertical-rule {
        transform: scaleY(1);
        transition: none;
    }
}
