/* ==========================================================
   simai.one — Zen-Scholarly Aesthetic
   Palette: Cool Grays with Classical Accent
   Typography: Nunito + Nunito Sans + JetBrains Mono
   ========================================================== */

/* ---- CSS Custom Properties ---- */
:root {
    --parchment-fog: #f4f5f7;
    --cool-vellum: #e8eaee;
    --stone-dust: #c8ccd6;
    --gray-stone: #8b909f;
    --ink-mist: #52566a;
    --scholar-slate: #4a4e5c;
    --deep-dusk: #2c2f3a;
    --marble-vein: #d4c9b8;
    --cool-aegean: #6b8cae;

    --font-display: 'Nunito', sans-serif;
    --font-body: 'Nunito Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --ease-scholar: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-base: all 0.6s var(--ease-scholar);
}

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

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

body {
    background-color: var(--parchment-fog);
    color: var(--ink-mist);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
    cursor: default;
}

/* ---- SVG Defs (hidden) ---- */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ---- Fixed Navigation ---- */
#nav-glyph {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.nav-one-glyph {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 300;
    color: var(--scholar-slate);
    opacity: 0.4;
    display: block;
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.nav-dots {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--stone-dust);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    padding: 0;
}

.nav-dot.active,
.nav-dot:hover {
    background-color: var(--scholar-slate);
    transform: scale(1.4);
}

/* ---- Sections ---- */
.section {
    min-height: 100vh;
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
}

/* ---- Marble Overlay ---- */
.marble-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(212, 201, 184, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 75% 70%, rgba(200, 204, 214, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(244, 245, 247, 0.05) 0%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

/* ---- Hero Watermark Glyph ---- */
.hero-watermark {
    position: absolute;
    font-family: var(--font-display);
    font-size: 40vw;
    font-weight: 300;
    color: var(--deep-dusk);
    opacity: 0.03;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    line-height: 1;
    user-select: none;
}

/* ---- Hero Section ---- */
.section--hero {
    background-color: var(--parchment-fog);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    width: 100%;
    max-width: 1440px;
    padding: 0 40px;
    position: relative;
    z-index: 1;
    align-items: center;
    min-height: 100vh;
}

.hero-content {
    grid-column: 2 / 9;
    padding: 20vh 0;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(72px, 10vw, 140px);
    color: var(--scholar-slate);
    letter-spacing: -0.02em;
    line-height: 0.95;
    text-transform: lowercase;
    margin-bottom: 32px;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-style: italic;
    font-size: 18px;
    color: var(--gray-stone);
    letter-spacing: 0.02em;
    margin-bottom: 48px;
    max-width: 520px;
}

.hero-annotation {
    grid-column: 10 / 13;
    padding: 20vh 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.annotation-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--stone-dust);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transform: rotate(90deg);
    transform-origin: right bottom;
    display: block;
}

/* ---- Marble Rule ---- */
.marble-rule {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 32px 0;
}

.marble-rule--lg {
    margin: 48px 0;
}

.rule-fragment {
    display: block;
    height: 1px;
    background-color: var(--stone-dust);
}

.rule-fragment--1 {
    width: 30%;
}

.rule-fragment--2 {
    width: 20%;
    margin-left: 35%;
}

/* ---- Grid Break Lines ---- */
.grid-break-line {
    position: absolute;
    bottom: 0;
    width: 1px;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--stone-dust), transparent);
    pointer-events: none;
}

.grid-break-line--hero {
    left: 25%;
    transform: rotate(-75deg);
    transform-origin: bottom center;
}

.grid-break-line--lottie {
    right: 33%;
    transform: rotate(-75deg);
    transform-origin: bottom center;
}

.grid-break-line--collage {
    left: 50%;
    transform: rotate(-75deg);
    transform-origin: bottom center;
}

/* ---- Lottie Section ---- */
.section--lottie {
    background-color: var(--parchment-fog);
    display: flex;
    align-items: center;
}

.lottie-grid {
    display: grid;
    grid-template-columns: 65fr 35fr;
    gap: 0;
    width: 100%;
    min-height: 100vh;
}

.lottie-visual-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 60px 80px 80px;
    background-color: var(--parchment-fog);
    position: relative;
}

.lottie-frame {
    width: 100%;
    max-width: 680px;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--marble-vein);
    position: relative;
    background-color: var(--cool-vellum);
    box-shadow: 0 2px 40px rgba(44, 47, 58, 0.06);
}

#lottie-container {
    width: 100%;
    height: 100%;
}

.lottie-frame-label {
    position: absolute;
    bottom: -24px;
    left: 0;
}

.mono-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-stone);
    letter-spacing: 0.15em;
}

.lottie-text-panel {
    padding: 80px 60px 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--cool-vellum);
    border-left: 1px solid var(--stone-dust);
}

.section-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray-stone);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 20px;
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(24px, 3vw, 36px);
    color: var(--deep-dusk);
    line-height: 1.2;
    margin-bottom: 32px;
    letter-spacing: -0.01em;
}

.section-heading--right {
    text-align: right;
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    color: var(--ink-mist);
    line-height: 1.8;
    margin-bottom: 20px;
}

.body-text--large {
    font-size: 18px;
    line-height: 1.9;
}

.annotation-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-style: italic;
    font-size: 14px;
    color: var(--gray-stone);
    line-height: 1.7;
    margin-top: 24px;
}

.annotation-text--block {
    font-size: 15px;
    color: var(--gray-stone);
    margin-bottom: 16px;
}

/* ---- Collage Section ---- */
.section--collage {
    background-color: var(--parchment-fog);
    padding: 100px 0;
    display: flex;
    align-items: flex-start;
}

.collage-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    width: 100%;
    max-width: 1440px;
    padding: 0 40px;
    margin: 0 auto;
    row-gap: 60px;
}

.collage-header {
    grid-column: 2 / 8;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.collage-container {
    grid-column: 1 / 13;
    position: relative;
    min-height: 600px;
    margin-top: 20px;
}

/* Collage Panels */
.collage-panel {
    position: absolute;
    box-shadow: 0 2px 20px rgba(44, 47, 58, 0.08);
}

.collage-image {
    width: 100%;
    height: 100%;
    mix-blend-mode: luminosity;
}

.collage-caption {
    display: block;
    font-family: var(--font-body);
    font-weight: 300;
    font-style: italic;
    font-size: 12px;
    color: var(--gray-stone);
    margin-top: 8px;
    transform: rotate(-1.5deg);
    transform-origin: left bottom;
}

.collage-panel--1 {
    width: 38%;
    height: 280px;
    top: 0;
    left: 5%;
    transform: rotate(-1.2deg);
}

.collage-panel--2 {
    width: 32%;
    height: 240px;
    top: 60px;
    left: 38%;
    transform: rotate(0.8deg);
}

.collage-panel--3 {
    width: 28%;
    height: 220px;
    top: 20px;
    right: 5%;
    transform: rotate(-0.5deg);
}

.collage-panel--4 {
    width: 30%;
    height: 200px;
    top: 280px;
    left: 25%;
    transform: rotate(1.8deg);
}

/* Collage Image Backgrounds (CSS-generated scholarly imagery) */
.collage-image--library {
    background:
        linear-gradient(135deg, #c8ccd6 0%, #8b909f 30%, #52566a 60%, #4a4e5c 100%),
        repeating-linear-gradient(
            90deg,
            rgba(44, 47, 58, 0.1) 0px, rgba(44, 47, 58, 0.1) 2px,
            transparent 2px, transparent 24px
        );
    background-blend-mode: multiply;
}

.collage-image--stone {
    background:
        radial-gradient(ellipse at 30% 40%, #d4c9b8 0%, #c8ccd6 40%, #8b909f 100%),
        linear-gradient(45deg, rgba(212, 201, 184, 0.3) 0%, transparent 70%);
    background-blend-mode: overlay;
    filter: url(#marble-filter);
}

.collage-image--book {
    background:
        linear-gradient(170deg, #e8eaee 0%, #c8ccd6 40%, #8b909f 100%),
        repeating-linear-gradient(
            0deg,
            rgba(44, 47, 58, 0.06) 0px, rgba(44, 47, 58, 0.06) 1px,
            transparent 1px, transparent 22px
        );
    background-blend-mode: multiply;
}

.collage-image--desk {
    background:
        radial-gradient(ellipse at 60% 40%, #8b909f 0%, #52566a 50%, #2c2f3a 100%),
        linear-gradient(90deg, rgba(212, 201, 184, 0.2) 0%, transparent 50%);
    background-blend-mode: multiply;
}

/* ---- Typography Section ---- */
.section--typography {
    background-color: var(--cool-vellum);
    display: flex;
    align-items: center;
    padding: 120px 0;
}

.typography-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    width: 100%;
    max-width: 1440px;
    padding: 0 40px;
    margin: 0 auto;
}

.typography-content {
    grid-column: 2 / 10;
}

.pull-quote-block {
    margin-bottom: 0;
}

.pull-quote {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(36px, 4.5vw, 60px);
    color: var(--scholar-slate);
    line-height: 1.3;
    letter-spacing: -0.01em;
    font-style: normal;
    margin-bottom: 0;
}

.typography-body {
    padding-left: 40px;
}

.typography-annotation {
    grid-column: 5 / 12;
    padding-left: 60px;
}

/* ---- Closing Section ---- */
.section--closing {
    background-color: var(--parchment-fog);
    display: flex;
    align-items: center;
    justify-content: center;
}

.closing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.closing-glyph {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 300;
    color: var(--scholar-slate);
    opacity: 0.4;
    display: block;
    letter-spacing: 0.1em;
}

.closing-copyright {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 12px;
    color: var(--gray-stone);
    letter-spacing: 0.15em;
    text-transform: lowercase;
}

/* ---- Reveal Animation States ---- */
.reveal-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-scholar), transform 0.6s var(--ease-scholar);
}

.reveal-element--delay {
    transition-delay: 0.2s;
}

.reveal-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .reveal-element {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }

    #lottie-container {
        display: none;
    }
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 1200px) {
    .hero-content {
        grid-column: 1 / 10;
    }

    .hero-annotation {
        grid-column: 10 / 13;
    }

    .lottie-grid {
        grid-template-columns: 60fr 40fr;
    }
}

@media (max-width: 900px) {
    .lottie-grid {
        grid-template-columns: 1fr;
    }

    .lottie-visual-panel {
        padding: 60px 40px 40px;
        min-height: 50vh;
    }

    .lottie-text-panel {
        padding: 40px;
        border-left: none;
        border-top: 1px solid var(--stone-dust);
    }

    .hero-content {
        grid-column: 1 / 13;
        padding: 15vh 0;
    }

    .hero-annotation {
        display: none;
    }

    .collage-panel--1 { width: 55%; height: 200px; }
    .collage-panel--2 { width: 45%; height: 180px; top: 40px; left: 50%; }
    .collage-panel--3 { width: 40%; height: 160px; top: 200px; left: 5%; }
    .collage-panel--4 { width: 38%; height: 160px; top: 220px; right: 5%; }

    .typography-content {
        grid-column: 1 / 13;
    }

    .pull-quote {
        font-size: clamp(28px, 5vw, 44px);
    }
}

@media (max-width: 600px) {
    #nav-glyph {
        right: 16px;
    }

    .hero-grid {
        padding: 0 24px;
    }

    .collage-grid,
    .typography-grid {
        padding: 0 24px;
    }

    .hero-title {
        font-size: clamp(52px, 12vw, 80px);
    }
}
