/* ============================================
   glolos.com — styles.css
   ============================================ */

/* --- CSS Variables --- */
:root {
    --warm-obsidian: #1e1710;
    --charcoal-umber: #2d2319;
    --toasted-linen: #f0e4d0;
    --cream-light: #f5ede0;
    --warm-dust: #a89880;
    --molten-amber: #e8a84c;
    --solar-coral: #e07850;
    --phosphor-teal: #5cbfa0;
    --cyan-ghost: #5cc8d8;
    --ink-walnut: #0e0b07;
    --sidebar-width: clamp(180px, 15vw, 260px);
    --content-margin: clamp(2rem, 5vw, 6rem);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--warm-obsidian);
    color: var(--cream-light);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* --- Sidebar --- */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--charcoal-umber);
    z-index: 100;
    overflow: hidden;
}

#sidebar-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#sidebar-waves svg {
    width: 100%;
    height: 100%;
}

.sidebar-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem 1.5rem;
}

.sidebar-wordmark {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-dust);
    margin-bottom: 3rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-dust);
    text-decoration: none;
    position: relative;
    padding-left: 1rem;
    border-left: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-link.active {
    color: var(--molten-amber);
    border-left-color: var(--molten-amber);
}

.sidebar-traces {
    flex: 1;
    position: relative;
    margin-top: 3rem;
}

.trace-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(232, 168, 76, 0.3);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.trace-line.active {
    transform: scaleY(3);
    opacity: 1;
    background: var(--molten-amber);
}

/* --- Main Content --- */
#main-content {
    margin-left: var(--sidebar-width);
}

/* --- Zones --- */
.zone {
    min-height: 85vh;
    position: relative;
}

.zone::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to bottom, transparent 0%, var(--warm-obsidian) 100%);
    pointer-events: none;
    z-index: 2;
}

/* --- Zone Spacers --- */
.zone-spacer {
    height: 20vh;
    position: relative;
    overflow: hidden;
}

.caustic-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.caustic-light::before,
.caustic-light::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    border-radius: 50%;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.caustic-light::before {
    background: radial-gradient(ellipse at 30% 50%, rgba(232, 168, 76, 0.08) 0%, transparent 60%);
    animation: caustic1 25s ease-in-out infinite;
}

.caustic-light::after {
    background: radial-gradient(ellipse at 70% 40%, rgba(92, 191, 160, 0.05) 0%, transparent 50%);
    animation: caustic2 30s ease-in-out infinite;
}

@keyframes caustic1 {
    0%, 100% { transform: translateX(0) scale(1); }
    50% { transform: translateX(10%) scale(1.1); }
}

@keyframes caustic2 {
    0%, 100% { transform: translateX(0) scale(1.1); }
    50% { transform: translateX(-8%) scale(1); }
}

/* --- Zone 1: Hero --- */
#zone-hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#zone-hero::after {
    display: none;
}

.hero-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-waves svg {
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(5rem, 12vw, 10rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--cream-light);
    opacity: 0;
}

.hero-title.glitch-active {
    animation: heroGlitch 800ms steps(1) forwards;
}

.hero-title.glitch-done {
    opacity: 1;
    animation: none;
}

.hero-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    color: var(--warm-dust);
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
}

.hero-tagline.visible {
    animation: fadeUp 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroGlitch {
    0% { clip-path: inset(0 0 85% 0); transform: translateX(-8px); opacity: 0.7; text-shadow: 3px 0 var(--solar-coral), -3px 0 var(--cyan-ghost); }
    15% { clip-path: inset(20% 0 60% 0); transform: translateX(5px); opacity: 0.8; }
    30% { clip-path: inset(50% 0 30% 0); transform: translateX(-3px); opacity: 0.85; }
    50% { clip-path: inset(10% 0 10% 0); transform: translateX(2px); opacity: 0.9; text-shadow: 2px 0 var(--solar-coral), -2px 0 var(--cyan-ghost); }
    75% { clip-path: inset(0 0 0 0); transform: translateX(-1px); opacity: 0.95; text-shadow: 1px 0 var(--solar-coral), -1px 0 var(--cyan-ghost); }
    100% { clip-path: inset(0 0 0 0); transform: translateX(0); opacity: 1; text-shadow: none; }
}

/* --- Glitch-in for general elements --- */
@keyframes glitchIn {
    0% { clip-path: inset(0 0 85% 0); transform: translateX(-8px); opacity: 0; }
    15% { clip-path: inset(20% 0 60% 0); transform: translateX(5px); opacity: 0.5; }
    30% { clip-path: inset(50% 0 30% 0); transform: translateX(-3px); opacity: 0.6; }
    50% { clip-path: inset(10% 0 10% 0); transform: translateX(2px); opacity: 0.8; }
    75% { clip-path: inset(0 0 0 0); transform: translateX(-1px); opacity: 0.9; }
    100% { clip-path: inset(0 0 0 0); transform: translateX(0); opacity: 1; }
}

.glitch-target {
    opacity: 0;
}

.glitch-target.glitch-visible {
    animation: glitchIn 600ms ease-out forwards;
    text-shadow: 2px 0 var(--solar-coral), -2px 0 var(--cyan-ghost);
}

.glitch-target.glitch-settled {
    opacity: 1;
    text-shadow: none;
    animation: none;
}

/* --- Zone 2: Statement --- */
#zone-statement {
    padding: clamp(4rem, 8vh, 8rem) var(--content-margin);
}

.statement-grid {
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: clamp(2rem, 4vw, 5rem);
    align-items: center;
    max-width: 1200px;
}

.statement-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--cream-light);
    margin-bottom: 2rem;
}

.statement-body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    max-width: 52ch;
    color: var(--cream-light);
    margin-bottom: 1.5rem;
}

.statement-collage {
    position: relative;
}

.collage-block {
    position: relative;
    width: 100%;
    padding-bottom: 120%;
    border-radius: 2px;
    border: 1px solid rgba(232, 168, 76, 0.2);
    overflow: hidden;
}

.collage-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#noiseFilter);
    opacity: 0.15;
}

.collage-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(168, 152, 128, 0.1) 20px,
            rgba(168, 152, 128, 0.1) 21px
        ),
        repeating-linear-gradient(
            -30deg,
            transparent,
            transparent 35px,
            rgba(168, 152, 128, 0.08) 35px,
            rgba(168, 152, 128, 0.08) 36px
        );
}

.collage-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(232, 168, 76, 0.3) 0%, rgba(30, 23, 16, 0.8) 100%);
}

/* --- Zone 3: Features --- */
#zone-features {
    padding: clamp(4rem, 8vh, 8rem) 0;
}

.feature-band {
    height: 25vh;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 var(--content-margin);
    position: relative;
    border-bottom: 1px solid rgba(232, 168, 76, 0.08);
}

.feature-band.left {
    justify-content: flex-start;
}

.feature-band.right {
    justify-content: flex-end;
    flex-direction: row-reverse;
    text-align: right;
}

.feature-icon {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--molten-amber);
}

.feature-phrase {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--cream-light);
    max-width: 40ch;
}

/* --- Zone 4: Closing --- */
#zone-closing {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#zone-closing::after {
    display: none;
}

.closing-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.closing-waves {
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    z-index: 0;
}

.closing-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--cream-light);
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.closing-contact {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: var(--warm-dust);
    position: relative;
    z-index: 1;
}

/* --- Wave-form phase animation --- */
@keyframes wavePhase {
    to { stroke-dashoffset: -200; }
}
