/* ============================
   ppss.ee — Styles
   ============================ */

/* ---------- CSS Variables ---------- */
:root {
    --obsidian: #0d0d0f;
    --bone-ivory: #faf5f0;
    --carmine: #c41e3a;
    --sapphire: #1a3a5c;
    --teal: #1b5e6b;
    --amethyst: #6a2c70;
    --concrete: #3a3a3c;
    --graphite: #8a8a8a;
    --text-light: #e8e0d4;
    --text-dark: #1a1a1e;
    --text-muted: #6b6b6b;

    --heading-weight: 200;
    --heading-width: 60;
}

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

html {
    scroll-behavior: auto;
}

body {
    background: var(--obsidian);
    color: var(--text-light);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
}

/* ---------- SVG Filters (hidden) ---------- */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ---------- Concrete Texture Overlay ---------- */
.concrete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    filter: url(#noiseFilter);
}

/* ---------- Signal Curve ---------- */
.signal-curve {
    position: absolute;
    top: 0;
    right: 2rem;
    width: 80px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* ---------- Scroll Indicator ---------- */
.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 100;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: var(--amethyst);
    letter-spacing: 0.05em;
}

/* ---------- Shake Flash ---------- */
.shake-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bone-ivory);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
}

.shake-flash.active {
    animation: flashPulse 150ms ease-out;
}

@keyframes flashPulse {
    0% { opacity: 0; }
    15% { opacity: 0.9; }
    30% { opacity: 0; }
    100% { opacity: 0; }
}

/* ---------- Shake Animation ---------- */
body.shaking {
    animation: shake 150ms cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    0% { transform: translate3d(0, 0, 0); }
    20% { transform: translate3d(-3px, 0, 0); }
    40% { transform: translate3d(3px, 0, 0); }
    60% { transform: translate3d(-2px, 0, 0); }
    80% { transform: translate3d(2px, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

/* ---------- Monolith Entry ---------- */
.monolith {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--obsidian);
    position: relative;
    overflow: hidden;
}

.monolith-inner {
    width: 90vw;
    text-align: left;
}

.monolith-title {
    font-family: 'Anybody', sans-serif;
    font-size: clamp(4rem, 15vw, 14rem);
    font-variation-settings: 'wght' 100, 'wdth' 100;
    color: var(--bone-ivory);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
    opacity: 0;
    transition: font-variation-settings 1200ms cubic-bezier(0.16, 1, 0.3, 1),
                opacity 400ms ease;
}

.monolith-title.visible {
    opacity: 1;
}

.monolith-title.animate-weight {
    font-variation-settings: 'wght' 800, 'wdth' 100;
}

.monolith-rule {
    position: absolute;
    bottom: 0;
    left: 2rem;
    width: 0;
    height: 1px;
    background: var(--carmine);
    transition: width 1200ms cubic-bezier(0.16, 1, 0.3, 1) 600ms;
}

.monolith-rule.animate {
    width: 70%;
}

/* ---------- Stencil Marks ---------- */
.stencil-mark {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2rem, 4vw, 5rem);
    color: var(--bone-ivory);
    opacity: 0.06;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    letter-spacing: 0.1em;
    pointer-events: none;
    z-index: 2;
    white-space: nowrap;
}

/* ---------- Section Dividers ---------- */
.section-divider {
    width: 100%;
    margin: 0;
}

/* ---------- Content Sections ---------- */
.content-section {
    position: relative;
    padding: 6rem 2rem 6rem 4rem;
    min-height: 100vh;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1400px;
}

/* ---------- Primary Content ---------- */
.primary-content {
    padding-right: 2rem;
}

.section-heading {
    font-family: 'Anybody', sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-variation-settings: 'wght' var(--heading-weight), 'wdth' var(--heading-width);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
    color: var(--bone-ivory);
    margin-bottom: 3rem;
    transition: font-variation-settings 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.section-heading.in-view {
    --heading-weight: 700;
    --heading-width: 100;
}

.body-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: left;
    max-width: 65ch;
}

.text-bold {
    font-weight: 500;
}

/* ---------- Annotation Column ---------- */
.annotation-column {
    padding-top: 1rem;
    border-left: 1px solid var(--concrete);
    padding-left: 1.5rem;
}

.annotation {
    margin-bottom: 2rem;
}

.annotation-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--graphite);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.annotation-text {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--graphite);
}

/* ---------- Photo Fragments ---------- */
.photo-fragment {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
}

.photo-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--concrete);
    filter: grayscale(100%) contrast(1.1);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: color;
}

.carmine-tint .photo-base {
    background: linear-gradient(135deg, #555 0%, #333 50%, #666 100%);
}
.carmine-tint .photo-overlay {
    background: var(--carmine);
    opacity: 0.4;
}

.sapphire-tint .photo-base {
    background: linear-gradient(225deg, #444 0%, #222 50%, #555 100%);
}
.sapphire-tint .photo-overlay {
    background: var(--sapphire);
    opacity: 0.4;
}

.teal-tint .photo-base {
    background: linear-gradient(45deg, #333 0%, #555 50%, #444 100%);
}
.teal-tint .photo-overlay {
    background: var(--teal);
    opacity: 0.4;
}

.amethyst-tint .photo-base {
    background: linear-gradient(315deg, #555 0%, #444 50%, #333 100%);
}
.amethyst-tint .photo-overlay {
    background: var(--amethyst);
    opacity: 0.4;
}

/* ---------- Jewel Section Colors ---------- */
.section-carmine .section-heading { color: var(--bone-ivory); }
.section-sapphire .section-heading { color: var(--bone-ivory); }
.section-teal .section-heading { color: var(--bone-ivory); }
.section-amethyst .section-heading { color: var(--bone-ivory); }

.section-carmine .annotation-label { color: var(--carmine); }
.section-sapphire .annotation-label { color: var(--sapphire); }
.section-teal .annotation-label { color: var(--teal); }
.section-amethyst .annotation-label { color: var(--amethyst); }

/* ---------- Terminal Footer ---------- */
.terminal-footer {
    padding: 4rem;
    text-align: left;
}

.terminal-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
}

.terminal-text {
    font-family: 'Anybody', sans-serif;
    font-size: 2rem;
    font-variation-settings: 'wght' 300, 'wdth' 80;
    color: var(--concrete);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.terminal-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--graphite);
    letter-spacing: 0.1em;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .annotation-column {
        border-left: none;
        border-top: 1px solid var(--concrete);
        padding-left: 0;
        padding-top: 2rem;
    }

    .content-section {
        padding: 4rem 1.5rem;
    }

    .signal-curve {
        right: 0.5rem;
        width: 40px;
    }

    .stencil-mark {
        display: none;
    }
}
