/* ============================================
   gabs.quest - Neomorphic Terrain Design
   ============================================ */

/* Color Palette:
   Dried Clay (Base):     #3A2F25
   Buried Earth (Deep):   #2A1F15
   Warm Silt (Light):     #4A3D30
   Ember Glow (Accent):   #C4713B
   Oxidized Copper:       #5A8A6E
   Calcium White (Text):  #E8E0D4
   Sediment Gray:         #7A6E62
   Ochre Burn:            #B8602A
*/

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #3A2F25;
    color: #E8E0D4;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    letter-spacing: 0.02em;
    overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 4 4' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='1' cy='1' r='0.5' fill='%232A1F15'/%3E%3Ccircle cx='3' cy='3' r='0.5' fill='%232A1F15'/%3E%3C/svg%3E");
    background-size: 4px 4px;
}

/* ============================================
   Typography
   ============================================ */

.site-title {
    font-family: 'Fjalla One', sans-serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 6vw, 5rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 2px 2px 4px #2A1F15, -1px -1px 2px #4A3D30;
    color: #E8E0D4;
    text-align: left;
}

.section-title {
    font-family: 'Fjalla One', sans-serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 6vw, 5rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 2px 2px 4px #2A1F15, -1px -1px 2px #4A3D30;
    color: #E8E0D4;
    text-align: left;
    margin-bottom: 1.5rem;
}

.panel-title {
    font-family: 'Fjalla One', sans-serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 2px 2px 4px #2A1F15, -1px -1px 2px #4A3D30;
    color: #E8E0D4;
    margin: 1rem 0 0.75rem;
}

.body-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    letter-spacing: 0.02em;
    color: #E8E0D4;
    margin-bottom: 1.2rem;
}

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

.panel-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.8;
    letter-spacing: 0.02em;
    color: #E8E0D4;
}

.instrument-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7A6E62;
    margin-bottom: 0.4rem;
}

.icon-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7A6E62;
    display: block;
    margin-top: 0.5rem;
}

/* ============================================
   Stratum Sections
   ============================================ */

.stratum {
    position: relative;
    min-height: 100vh;
    background-color: #3A2F25;
    clip-path: polygon(0 0, 100% 0, 100% 93%, 0 100%);
    margin-bottom: -7vh;
    padding: 8vh 8vw;
    display: flex;
    align-items: center;
    z-index: 2;
}

.stratum:nth-child(even) {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 93%);
}

.stratum:last-of-type {
    clip-path: none;
    margin-bottom: 0;
}

.stratum-dark {
    background-color: #3A2F25;
    background-image: linear-gradient(to bottom, rgba(42, 31, 21, 0.15), rgba(42, 31, 21, 0.15));
}

.stratum-warm {
    background-color: #3A2F25;
    background-image: linear-gradient(to bottom, rgba(74, 61, 48, 0.2), rgba(74, 61, 48, 0.2));
}

.stratum-deep {
    background-color: #2A1F15;
}

.stratum-core {
    background-color: #3A2F25;
    background-image: radial-gradient(ellipse at center, rgba(196, 113, 59, 0.05) 0%, transparent 70%);
}

/* ============================================
   Content Layout
   ============================================ */

.stratum-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 4vw;
    position: relative;
    z-index: 2;
}

.column-wide {
    flex: 0 0 58%;
}

.column-narrow {
    flex: 0 0 38%;
}

.column-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.column-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ============================================
   Neomorphic Elements
   ============================================ */

.neo-raised {
    background-color: #3A2F25;
    border-radius: 24px;
    box-shadow: 8px 8px 16px #2A1F15, -8px -8px 16px #4A3D30;
    padding: 2.5rem;
    transition: box-shadow 0.6s ease-out;
}

.neo-raised.neo-flat {
    box-shadow: 0px 0px 0px #2A1F15, 0px 0px 0px #4A3D30;
}

.neo-recessed {
    background-color: #3A2F25;
    border-radius: 24px;
    box-shadow: inset 8px 8px 16px #2A1F15, inset -8px -8px 16px #4A3D30;
    padding: 2rem;
    transition: box-shadow 0.6s ease-out;
}

.neo-recessed.neo-flat {
    box-shadow: inset 0px 0px 0px #2A1F15, inset 0px 0px 0px #4A3D30;
}

.neo-inset {
    text-shadow: inset 2px 2px 4px #2A1F15, inset -1px -1px 2px #4A3D30;
}

/* Neomorphic on deep background */
.stratum-deep .neo-raised {
    background-color: #3A2F25;
    box-shadow: 8px 8px 16px rgba(20, 14, 8, 0.8), -8px -8px 16px rgba(58, 47, 37, 0.4);
}

.stratum-deep .neo-raised.neo-flat {
    box-shadow: 0px 0px 0px rgba(20, 14, 8, 0.8), 0px 0px 0px rgba(58, 47, 37, 0.4);
}

/* ============================================
   Section 1: THE SURFACE
   ============================================ */

#section-surface {
    z-index: 6;
}

#section-surface .column-right {
    position: relative;
    min-height: 300px;
}

.floating-cube {
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.floating-cube::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #3A2F25;
    border: 1px solid #C4713B;
    transform: rotate(45deg);
}

.cube-1 {
    top: 20%;
    right: 30%;
    animation: drift-1 18s ease-in-out infinite;
}

.cube-2 {
    top: 50%;
    right: 15%;
    animation: drift-2 22s ease-in-out infinite;
}

.cube-3 {
    top: 70%;
    right: 45%;
    animation: drift-3 20s ease-in-out infinite;
}

@keyframes drift-1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(5px, -8px); }
    50% { transform: translate(-3px, 4px); }
    75% { transform: translate(7px, 6px); }
}

@keyframes drift-2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-6px, 5px); }
    50% { transform: translate(4px, -7px); }
    75% { transform: translate(-5px, -3px); }
}

@keyframes drift-3 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(4px, 6px); }
    50% { transform: translate(-7px, -4px); }
    75% { transform: translate(3px, -8px); }
}

/* ============================================
   Section 2: THE FIRST STRATUM
   ============================================ */

#section-first-stratum {
    z-index: 5;
}

.icon-channel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    padding: 2rem 1.5rem;
}

.channel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.content-block {
    max-width: 600px;
}

/* ============================================
   Section 3: THE VEIN
   ============================================ */

#section-vein {
    z-index: 4;
}

.vein-layout {
    flex-direction: column;
    align-items: stretch;
    position: relative;
}

.vein-bg-path {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.vein-bg-path svg {
    width: 100%;
    height: 100%;
}

.readout-panel {
    position: relative;
    z-index: 1;
    max-width: 420px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.panel-1 {
    align-self: flex-start;
    margin-left: 5%;
    transform: rotate(-2deg);
}

.panel-2 {
    align-self: center;
    transform: rotate(1deg);
}

.panel-3 {
    align-self: flex-end;
    margin-right: 5%;
    transform: rotate(-1.5deg);
}

.readout-panel .iso-icon {
    display: block;
}

/* ============================================
   Section 4: THE CHAMBER
   ============================================ */

#section-chamber {
    z-index: 3;
}

.chamber-layout {
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.chamber-container {
    width: 70%;
    max-width: 900px;
    text-align: center;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.crystal-diagram {
    margin-bottom: 2rem;
}

.crystal-diagram svg {
    max-width: 100%;
    height: auto;
}

.chamber-readings {
    text-align: center;
}

.chamber-readings .instrument-text {
    margin-bottom: 0.3rem;
}

/* ============================================
   Section 5: THE CORE
   ============================================ */

#section-core {
    z-index: 2;
}

.core-statement {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 2rem;
}

.core-crystal {
    margin-top: 1rem;
}

.contact-panel {
    padding: 2rem;
}

.contact-panel .instrument-text {
    margin-bottom: 0.6rem;
}

.signal-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #C4713B;
    margin-top: 1.5rem;
    animation: signal-pulse 3s ease-in-out infinite;
}

@keyframes signal-pulse {
    0%, 100% { box-shadow: 0 0 4px #C4713B, 0 0 8px rgba(196, 113, 59, 0.3); }
    50% { box-shadow: 0 0 8px #C4713B, 0 0 16px rgba(196, 113, 59, 0.5); }
}

/* ============================================
   Diagonal Veins
   ============================================ */

.diagonal-vein {
    position: absolute;
    bottom: 6%;
    left: 0;
    width: 100%;
    height: 30px;
    z-index: 3;
    pointer-events: none;
    transform: rotate(-3.5deg);
}

.stratum:nth-child(even) .diagonal-vein {
    transform: rotate(3.5deg);
    bottom: auto;
    top: 6%;
}

.diagonal-vein svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.vein-main {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1.5s ease-out;
}

.vein-main.revealed {
    stroke-dashoffset: 0;
}

.vein-capillary {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    transition: stroke-dashoffset 0.6s ease-out 1.5s;
}

.vein-capillary.revealed {
    stroke-dashoffset: 0;
}

/* ============================================
   Anchor Icons
   ============================================ */

.anchor-icon {
    position: absolute;
    bottom: 4%;
    left: 50%;
    transform: translate(-50%, 50%);
    z-index: 10;
    filter: drop-shadow(4px 4px 8px #2A1F15) drop-shadow(-2px -2px 4px #4A3D30);
}

.stratum:nth-child(even) .anchor-icon {
    bottom: auto;
    top: 4%;
    transform: translate(-50%, -50%);
}

/* ============================================
   Navigation Dots
   ============================================ */

#nav-dots {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    z-index: 200;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #3A2F25;
    border: none;
    cursor: pointer;
    box-shadow: 3px 3px 6px #2A1F15, -3px -3px 6px #4A3D30;
    transition: box-shadow 0.4s ease;
}

.nav-dot.active {
    box-shadow: 0 0 6px #C4713B, 0 0 12px rgba(196, 113, 59, 0.3), 3px 3px 6px #2A1F15, -3px -3px 6px #4A3D30;
    animation: dot-pulse 3s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 6px #C4713B, 0 0 10px rgba(196, 113, 59, 0.3), 3px 3px 6px #2A1F15, -3px -3px 6px #4A3D30; }
    50% { box-shadow: 0 0 8px #C4713B, 0 0 14px rgba(196, 113, 59, 0.4), 3px 3px 6px #2A1F15, -3px -3px 6px #4A3D30; }
}

/* ============================================
   Floating Layer
   ============================================ */

#floating-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.float-particle {
    position: absolute;
    border-radius: 50%;
    background-color: #7A6E62;
    opacity: 0.25;
}

.float-particle.warm {
    background-color: #C4713B;
    opacity: 0.15;
}

.float-cube {
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0.3;
}

.float-cube::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid #7A6E62;
    transform: rotate(45deg);
}

.float-line {
    position: absolute;
    width: 1px;
    height: 40px;
    background-color: #7A6E62;
    opacity: 0.15;
    transform-origin: center;
}

/* ============================================
   Ripple Effect
   ============================================ */

#ripple-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(196, 113, 59, 0.2);
    transform: scale(0);
    animation: ripple-expand 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    pointer-events: none;
}

@keyframes ripple-expand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

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

@media (max-width: 900px) {
    .stratum-content {
        flex-direction: column;
        gap: 2rem;
    }

    .column-wide,
    .column-narrow {
        flex: 1 1 100%;
    }

    .chamber-container {
        width: 95%;
    }

    .readout-panel {
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: none !important;
    }

    .panel-1, .panel-2, .panel-3 {
        align-self: stretch;
    }

    #nav-dots {
        right: 1rem;
    }

    .stratum {
        padding: 6vh 5vw;
    }

    .anchor-icon {
        display: none;
    }
}

@media (max-width: 600px) {
    .site-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .section-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .neo-raised, .neo-recessed {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .crystal-diagram svg {
        width: 240px;
        height: 240px;
    }
}
