/* ============================================
   SSETTL.com - Translucent Frost Design System
   ============================================ */

/* ---------------------------
   CSS Custom Properties
   --------------------------- */
:root {
    /* Depth variable: 0 (surface) to 1 (abyss), updated via JS */
    --depth: 0;
    --frost-opacity: calc(0.12 - var(--depth) * 0.08);
    --text-glow: calc(20px + var(--depth) * 20px);
    --bubble-speed: calc(1.5 - var(--depth) * 1.0);
    --gold-opacity: calc(0.6 - var(--depth) * 0.4);
    --panel-blur: calc(24px - var(--depth) * 12px);

    /* Color Palette */
    --abyssal-navy: #061224;
    --midnight-teal: #0A3D5C;
    --glacial-blue: #1B6B8A;
    --frozen-mist: #E8F4FD;
    --ice-breath: #C8E6F5;
    --pearl-haze: #D8E8F0;
    --submerged-gold: #C9A84C;
    --refracted-violet: #8B7EC8;
    --surface-glass: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.15);
    --bubble-core: rgba(200, 230, 245, 0.6);
}

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

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

body {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: var(--pearl-haze);
    background: var(--abyssal-navy);
    background-image: linear-gradient(
        180deg,
        #E8F4FD 0%,
        #C8E6F5 8%,
        #0A3D5C 20%,
        #0A3D5C 40%,
        #061224 60%,
        #061224 100%
    );
    background-attachment: fixed;
    background-size: 100% 500vh;
    overflow-x: hidden;
    line-height: 1.8;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
}

/* ---------------------------
   Bubble Canvas
   --------------------------- */
#bubble-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ---------------------------
   Waveform Container (hero background)
   --------------------------- */
#waveform-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;
}

#waveform-svg {
    width: 100%;
    height: 100%;
}

.wave-path {
    fill: none;
    stroke-width: 2;
}

.wave-glacial {
    stroke: rgba(27, 107, 138, 0.4);
}

.wave-ice {
    stroke: rgba(200, 230, 245, 0.25);
}

.wave-gold {
    stroke: rgba(201, 168, 76, 0.15);
}

/* ---------------------------
   Typography
   --------------------------- */

/* Hero Headlines - Playfair Display */
.hero-headline {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(4rem, 12vw, 8rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--frozen-mist);
    text-shadow: 0 0 40px rgba(200, 230, 245, 0.4);
    display: inline-block;
}

/* Section Headlines - DM Serif Display */
.section-headline {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.5em;
}

.glow-text {
    color: var(--ice-breath);
    text-shadow: 0 0 calc(var(--text-glow)) rgba(200, 230, 245, 0.4);
}

/* Abyss Headline - Playfair Display */
.abyss-headline {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--ice-breath);
    text-shadow: 0 0 60px rgba(200, 230, 245, 0.5);
}

/* Body Text - Inter */
.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.0625rem;
    line-height: 1.8;
    letter-spacing: 0.01em;
    color: rgba(216, 232, 240, 0.75);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5em;
}

.body-text-large {
    font-size: 1.25rem;
    max-width: 720px;
}

/* Monospace Accents - JetBrains Mono */
.mono-accent {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(126, 184, 212, 0.6);
}

/* Hero Tagline */
.hero-tagline {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.25rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(216, 232, 240, 0.5);
    margin-top: 1.5rem;
}

/* ---------------------------
   Kinetic Typography Animation
   --------------------------- */
.kinetic-text .char {
    display: inline-block;
    opacity: 0;
    filter: blur(8px);
    transform: translateY(12px) scale(1.05);
    animation: none;
}

.kinetic-text.animate .char {
    animation: condense 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both,
               float-text 6s ease-in-out infinite;
    animation-delay: calc(var(--char-index) * 40ms),
                     calc(var(--char-index) * 40ms + 0.6s);
}

@keyframes condense {
    0% {
        opacity: 0;
        filter: blur(8px);
        transform: translateY(12px) scale(1.05);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1.0);
    }
}

@keyframes float-text {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

/* Hero letters get a pulsing drop-shadow */
.hero-headline .char {
    animation-delay: calc(var(--char-index) * 50ms),
                     calc(var(--char-index) * 50ms + 0.8s);
}

.kinetic-text.animate .hero-headline .char,
.hero-headline.kinetic-text.animate .char {
    animation: condense 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both,
               float-text 6s ease-in-out infinite,
               pulse-glow 6s ease-in-out infinite;
    animation-delay: calc(var(--char-index) * 50ms),
                     calc(var(--char-index) * 50ms + 0.8s),
                     calc(var(--char-index) * 50ms + 0.8s);
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(200, 230, 245, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(200, 230, 245, 0.6));
    }
}

/* ---------------------------
   Gold Line Accents
   --------------------------- */
.gold-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--submerged-gold), transparent);
    opacity: var(--gold-opacity, 0.6);
    margin: 1rem 0 1.5rem;
    animation: draw-gold 1.2s ease-out both;
}

.gold-line-wide {
    width: 120px;
}

.gold-line-center {
    margin-left: auto;
    margin-right: auto;
}

@keyframes draw-gold {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        opacity: var(--gold-opacity, 0.6);
    }
}

/* ---------------------------
   Depth Zones
   --------------------------- */
.depth-zone {
    position: relative;
    width: 100%;
}

#zone-surface {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
}

#zone-shallow {
    min-height: 150vh;
    padding: 4rem 2rem;
}

#zone-mid {
    min-height: 150vh;
    padding: 4rem 2rem;
}

#zone-abyss {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    position: relative;
}

.zone-content {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

#zone-surface .zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ---------------------------
   Ghost Panels (Surface Zone)
   --------------------------- */
.ghost-panels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.ghost-panel {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.ghost-panel-1 {
    top: 10%;
    left: 5%;
    width: 35%;
    height: 40%;
}

.ghost-panel-2 {
    top: 15%;
    right: 8%;
    width: 25%;
    height: 55%;
}

.ghost-panel-3 {
    bottom: 20%;
    left: 15%;
    width: 50%;
    height: 25%;
}

/* ---------------------------
   Data Ribbon
   --------------------------- */
.data-ribbon {
    width: 100%;
    height: 15vh;
    min-height: 80px;
    max-height: 120px;
    overflow: hidden;
    position: relative;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
}

.ribbon-track {
    display: flex;
    gap: 3rem;
    white-space: nowrap;
    animation: ribbon-scroll 30s linear infinite;
    padding: 0 1rem;
}

.ribbon-item {
    flex-shrink: 0;
}

@keyframes ribbon-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ---------------------------
   Dashboard Grid
   --------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2px;
    width: 100%;
}

/* Grid gap glow lines */
.dashboard-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* ---------------------------
   Feature Panels (Frosted Glass)
   --------------------------- */
.feature-panel {
    grid-column: span 6;
    min-height: 60vh;
    position: relative;
    background: rgba(255, 255, 255, var(--frost-opacity, 0.08));
    backdrop-filter: blur(var(--panel-blur, 24px)) saturate(1.8);
    -webkit-backdrop-filter: blur(var(--panel-blur, 24px)) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    overflow: hidden;
    transition: backdrop-filter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.feature-panel:hover {
    backdrop-filter: blur(24px) saturate(2.0);
    -webkit-backdrop-filter: blur(24px) saturate(2.0);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15),
                0 8px 32px rgba(0, 0, 0, 0.2);
}

.panel-wide {
    grid-column: span 12;
    min-height: 40vh;
}

.panel-inner {
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.panel-scroll-content {
    overflow-y: auto;
    flex: 1;
    padding-right: 0.5rem;
}

/* Custom scrollbar for panel content */
.panel-scroll-content::-webkit-scrollbar {
    width: 4px;
}

.panel-scroll-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 2px;
}

.panel-scroll-content::-webkit-scrollbar-thumb {
    background: rgba(200, 230, 245, 0.2);
    border-radius: 2px;
}

.panel-scroll-content::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 230, 245, 0.4);
}

/* ---------------------------
   Panel Waterline
   --------------------------- */
.panel-waterline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    pointer-events: none;
}

.waterline-svg {
    width: 100%;
    height: 100%;
}

.waterline-path {
    fill: none;
    stroke: rgba(200, 230, 245, 0.15);
    stroke-width: 1.5;
}

/* ---------------------------
   Condensation Droplets
   --------------------------- */
.condensation-drops {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.droplet {
    position: absolute;
    left: var(--drop-x);
    top: var(--drop-y);
    width: 6px;
    height: 8px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: linear-gradient(180deg, transparent 0%, rgba(200, 230, 245, 0.4) 100%);
    opacity: 0.6;
}

.droplet::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
}

/* ---------------------------
   Deep Panels
   --------------------------- */
.deep-panel {
    width: 100%;
    min-height: 50vh;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 4rem;
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background 0.4s ease, border-color 0.4s ease;
}

.deep-panel:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.deep-panel .panel-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
}

.deep-panel-full {
    min-height: 70vh;
}

/* ---------------------------
   Waveform Layers
   --------------------------- */
.waveform-layer {
    width: 100%;
    height: 120px;
    margin: 2rem 0;
    position: relative;
}

.triple-wave {
    width: 100%;
    height: 100%;
}

.tw-path {
    fill: none;
    stroke-width: 2;
}

.tw-1 {
    stroke: rgba(27, 107, 138, 0.4);
}

.tw-2 {
    stroke: rgba(200, 230, 245, 0.25);
}

.tw-3 {
    stroke: rgba(201, 168, 76, 0.15);
}

/* Section Waveform Dividers */
.section-waveform {
    width: 100%;
    height: 100px;
    position: relative;
    margin: 2rem 0;
}

.wave-divider {
    width: 100%;
    height: 100%;
}

.divider-wave {
    fill: none;
    stroke-width: 1.5;
}

.divider-wave-1 {
    stroke: rgba(27, 107, 138, 0.35);
}

.divider-wave-2 {
    stroke: rgba(200, 230, 245, 0.2);
}

.divider-wave-3 {
    stroke: rgba(201, 168, 76, 0.12);
}

/* ---------------------------
   Abyss Zone
   --------------------------- */
.abyss-ghost-panels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.abyss-ghost {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
}

.abyss-ghost-1 {
    top: 10%;
    left: 10%;
    width: 40%;
    height: 35%;
}

.abyss-ghost-2 {
    bottom: 15%;
    right: 10%;
    width: 35%;
    height: 30%;
}

.abyss-statement {
    text-align: center;
    z-index: 10;
    position: relative;
}

/* Inverted Final Waveform */
.final-waveform {
    width: 100%;
    height: 120px;
    position: absolute;
    bottom: 0;
    left: 0;
}

.wave-inverted {
    width: 100%;
    height: 100%;
    transform: scaleY(-1);
}

.inverted-wave {
    fill: none;
    stroke-width: 1.5;
}

.inverted-wave-1 {
    stroke: rgba(200, 230, 245, 0.15);
}

.inverted-wave-2 {
    stroke: rgba(27, 107, 138, 0.2);
}

/* ---------------------------
   Parallax Layers
   --------------------------- */
[data-parallax="background"] {
    transition: transform 0.1s linear;
}

[data-parallax="midground"] {
    transition: transform 0.1s linear;
}

[data-parallax="foreground"] {
    transition: transform 0.1s linear;
}

/* ---------------------------
   Responsive Design
   --------------------------- */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-panel {
        grid-column: span 1;
        min-height: 50vh;
    }

    .panel-wide {
        grid-column: span 1;
    }

    .deep-panel {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-headline {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .section-headline {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }

    .abyss-headline {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .body-text-large {
        font-size: 1.0625rem;
    }

    .feature-panel {
        min-height: 40vh;
    }

    .deep-panel {
        padding: 2rem;
        min-height: 40vh;
    }

    .panel-inner {
        padding: 1.5rem;
    }

    .ghost-panels,
    .abyss-ghost-panels {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .ribbon-track {
        gap: 2rem;
    }

    .mono-accent {
        font-size: 0.6875rem;
    }
}
