/* ==========================================================
   concengine.com - Styles
   Abyssal Precision Design Language
   ========================================================== */

/* Custom Properties */
:root {
    /* Palette - flat solid colors, zero gradients */
    --abyss: #0a0e1a;
    --deep-current: #111830;
    --midnight-cobalt: #1a2744;
    --polar-ice: #d4dde8;
    --steel-mist: #7a8ba4;
    --signal-amber: #d4943a;
    --warm-beacon: #e8a94e;
    --bioluminescent: #2a5a8a;

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

    /* Spacing */
    --section-gap: 20vh;
    --content-narrow: 680px;
    --content-wide: 900px;
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    background-color: var(--abyss);
    color: var(--polar-ice);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.15vw, 1.125rem);
    font-weight: 400;
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background-color: var(--bioluminescent);
    color: var(--polar-ice);
}

/* ==========================================================
   Navigation - Ghost nav, appears on hover in top 60px
   ========================================================== */

#top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

#top-nav.visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-inner {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--steel-mist);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--signal-amber);
}

/* ==========================================================
   Main Content Layout - CSS Grid single column
   ========================================================== */

#main-content {
    display: grid;
    grid-template-columns: 1fr minmax(0, var(--content-narrow)) 1fr;
    width: 100%;
}

#main-content > * {
    grid-column: 2;
}

/* Full-bleed elements span all columns */
.image-band,
.curve-divider,
.hero-section {
    grid-column: 1 / -1;
}

/* ==========================================================
   Hero Section - 100vh entry
   ========================================================== */

.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    scroll-snap-align: start;
    background-color: var(--abyss);
}

.hero-curve-container {
    position: absolute;
    top: 35%;
    left: 0;
    right: 0;
    width: 100%;
    height: 200px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-curve-container.revealed {
    opacity: 1;
}

.hero-curve {
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    top: 5%;
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.6rem, 6.5vw, 5.2rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--polar-ice);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.hero-title.revealed {
    opacity: 1;
    transform: translateY(0);
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.15vw, 1.125rem);
    color: var(--steel-mist);
    margin-top: 1.2rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.hero-tagline.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================
   Content Sections
   ========================================================== */

.content-section {
    padding: var(--section-gap) 1.5rem;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-wide {
    width: 100%;
    max-width: var(--content-wide);
}

.content-narrow {
    width: 100%;
    max-width: var(--content-narrow);
}

.content-section h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    letter-spacing: -0.03em;
    line-height: 1.25;
    color: var(--polar-ice);
    margin-bottom: 2rem;
}

.content-section p {
    margin-bottom: 1.5em;
    text-align: left;
}

.content-section p:last-child {
    margin-bottom: 0;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--steel-mist);
    margin-top: 2rem;
}

/* ==========================================================
   Fade-Reveal Animation States
   ========================================================== */

.fade-block {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-block.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================
   Image Bands - Full-bleed visual breathing spaces
   ========================================================== */

.image-band {
    width: 100%;
    margin: 2vh 0;
    overflow: hidden;
}

.image-band-inner {
    width: 100%;
    filter: saturate(0.4) brightness(0.7) contrast(1.2) sepia(0.1);
}

/* Image reveal via clip-path */
.fade-image {
    clip-path: inset(0 0 100% 0);
    transform: scale(1.04);
    transition: clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-image.visible {
    clip-path: inset(0 0 0 0);
    transform: scale(1);
}

/* ==========================================================
   SVG Curve Dividers
   ========================================================== */

.curve-divider {
    width: 100%;
    height: 80px;
    margin: 2vh 0;
    overflow: hidden;
}

.curve-divider svg {
    width: 100%;
    height: 100%;
    transition: transform 0.1s linear;
}

/* ==========================================================
   Scroll Progress Indicator
   ========================================================== */

#scroll-indicator {
    position: fixed;
    bottom: 40px;
    right: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#scroll-indicator.visible {
    opacity: 1;
}

.scroll-indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--signal-amber);
    transition: transform 0.1s linear;
    position: relative;
    z-index: 2;
}

.scroll-indicator-line {
    width: 1px;
    height: 80px;
    background-color: var(--midnight-cobalt);
    margin-top: -1px;
}

/* ==========================================================
   Links
   ========================================================== */

a {
    color: var(--signal-amber);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--warm-beacon);
}

/* ==========================================================
   Final Spacer
   ========================================================== */

.final-spacer {
    height: 30vh;
}

/* ==========================================================
   Reduced Motion
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .fade-block {
        opacity: 1;
        transform: none;
    }

    .fade-image {
        clip-path: none;
        transform: none;
    }

    .hero-title,
    .hero-tagline,
    .hero-curve-container {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================
   Responsive Adjustments
   ========================================================== */

@media (max-width: 768px) {
    :root {
        --section-gap: 14vh;
    }

    .content-section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .nav-inner {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.7rem;
    }

    #scroll-indicator {
        right: 16px;
        bottom: 24px;
    }

    .scroll-indicator-line {
        height: 60px;
    }
}

@media (max-width: 480px) {
    :root {
        --section-gap: 10vh;
    }

    .content-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .nav-inner {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 1rem;
    }
}
