/* ============================================
   SSETTL.com - Holographic Settlement
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --sunset-coral: #E07A5F;
    --golden-hour: #F2CC8F;
    --dusk-rose: #D4A5A5;
    --holo-white: #FAF3E0;
    --prism-dark: #2D2D3A;
    --spectral-violet: #8B5CF6;
    --refraction-teal: #5EEAD4;
    --ember-glow: #D4622B;

    --holo-angle: 0deg;

    --font-display: 'Exo 2', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-state: cubic-bezier(0.4, 0, 0.2, 1);

    --holo-gradient: linear-gradient(135deg, #E07A5F 0%, #F2CC8F 25%, #5EEAD4 50%, #8B5CF6 75%, #E07A5F 100%);
    --iridescent-line: linear-gradient(135deg, #FF6B6B, #FFD93D, #6BCB77, #4D96FF, #9B59B6);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--prism-dark);
    background: linear-gradient(180deg, #FAF3E0 0%, #F2CC8F 40%, #E07A5F 70%, #2D2D3A 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* --- Scroll Snap Container --- */
.scroll-container {
    scroll-snap-type: y mandatory;
    overflow-y: auto;
    height: 100vh;
}

/* --- Zone Base --- */
.zone {
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zone-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px;
    position: relative;
    z-index: 2;
}

/* --- Progress Bar (Left Edge) --- */
.progress-bar {
    position: fixed;
    left: 0;
    top: 0;
    width: 4px;
    height: 100vh;
    z-index: 1000;
    background: rgba(45, 45, 58, 0.1);
}

.progress-fill {
    width: 100%;
    height: 0%;
    background: var(--holo-gradient);
    background-size: 200% 200%;
    animation: shimmer-vertical 8s linear infinite;
    transition: height 0.3s var(--ease-state);
    border-radius: 0 0 2px 2px;
}

.progress-fill.flash {
    animation: flash-bar 0.6s ease-out;
}

@keyframes flash-bar {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 20px 4px var(--refraction-teal); }
}

@keyframes shimmer-vertical {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}

.progress-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--holo-gradient);
    background-size: 200% 200%;
    animation: shimmer-vertical 8s linear infinite;
    opacity: 0.4;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.progress-dot.active {
    opacity: 1;
    transform: translateX(-50%) scale(1.4);
    box-shadow: 0 0 12px rgba(94, 234, 212, 0.6);
}

/* --- Light Leaks --- */
.light-leaks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.light-leak {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: screen;
    opacity: 0.35;
}

.light-leak-1 {
    width: 400px; height: 400px;
    background: #E07A5F;
    top: -10%; left: -5%;
    animation: float-leak 25s ease-in-out infinite;
}
.light-leak-2 {
    width: 350px; height: 350px;
    background: #F2CC8F;
    top: 20%; right: -10%;
    animation: float-leak 30s ease-in-out infinite reverse;
}
.light-leak-3 {
    width: 300px; height: 300px;
    background: #5EEAD4;
    bottom: -5%; left: 30%;
    animation: float-leak 22s ease-in-out infinite 5s;
}
.light-leak-4 {
    width: 350px; height: 350px;
    background: #8B5CF6;
    top: 10%; left: 60%;
    animation: float-leak 28s ease-in-out infinite 2s;
}
.light-leak-5 {
    width: 300px; height: 300px;
    background: #E07A5F;
    bottom: 15%; right: 10%;
    animation: float-leak 20s ease-in-out infinite reverse 3s;
}
.light-leak-6 {
    width: 250px; height: 250px;
    background: #F2CC8F;
    top: 50%; left: -5%;
    animation: float-leak 24s ease-in-out infinite 7s;
}
.light-leak-7 {
    width: 380px; height: 380px;
    background: #5EEAD4;
    top: -5%; right: 20%;
    animation: float-leak 26s ease-in-out infinite 1s;
}
.light-leak-8 {
    width: 320px; height: 320px;
    background: #E07A5F;
    bottom: 10%; left: 10%;
    animation: float-leak 23s ease-in-out infinite reverse 4s;
}
.light-leak-9 {
    width: 280px; height: 280px;
    background: #F2CC8F;
    top: 40%; right: -8%;
    animation: float-leak 27s ease-in-out infinite 6s;
}
.light-leak-10 {
    width: 500px; height: 500px;
    background: #E07A5F;
    top: 20%; left: 20%;
    animation: float-leak 20s ease-in-out infinite;
}
.light-leak-11 {
    width: 400px; height: 400px;
    background: #D4622B;
    bottom: 10%; right: 15%;
    animation: float-leak 25s ease-in-out infinite reverse 2s;
}

@keyframes float-leak {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 50px) scale(0.95); }
    75% { transform: translate(30px, 20px) scale(1.05); }
}

/* ============================================
   ZONE 1 - THE SCATTER (HERO)
   ============================================ */
.zone-scatter {
    flex-direction: column;
    background: transparent;
}

.circuit-traces-hero {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

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

.circuit-path {
    fill: none;
    stroke: #E07A5F;
    stroke-width: 1.5;
    opacity: 0.08;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.circuit-node {
    fill: #E07A5F;
    opacity: 0.12;
}

.zone-scatter.is-visible .circuit-path {
    opacity: 0.08;
    animation: trace-draw 2s var(--ease-entrance) forwards;
}

.zone-scatter.is-visible .circuit-node {
    animation: node-pulse 3s ease-in-out infinite 1.5s;
}

@keyframes trace-draw {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

@keyframes node-pulse {
    0%, 100% { opacity: 0.12; }
    50% { opacity: 0.4; }
}

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

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: -0.02em;
    line-height: 1;
    display: flex;
    justify-content: center;
    gap: 0.02em;
    perspective: 1200px;
}

.hero-letter {
    display: inline-block;
    background: conic-gradient(from var(--holo-angle), #E07A5F, #F2CC8F, #5EEAD4, #8B5CF6, #E07A5F);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 1.2s var(--ease-entrance), opacity 1s var(--ease-entrance);
}

/* Initial scattered positions */
.hero-letter[data-index="0"] { transform: translate(-60px, -40px) rotate(-8deg); opacity: 0; }
.hero-letter[data-index="1"] { transform: translate(50px, -60px) rotate(6deg); opacity: 0; }
.hero-letter[data-index="2"] { transform: translate(-40px, 50px) rotate(-5deg); opacity: 0; }
.hero-letter[data-index="3"] { transform: translate(70px, 30px) rotate(10deg); opacity: 0; }
.hero-letter[data-index="4"] { transform: translate(-30px, 70px) rotate(-12deg); opacity: 0; }
.hero-letter[data-index="5"] { transform: translate(60px, -50px) rotate(7deg); opacity: 0; }

/* Settled positions */
.hero-letter.settled {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.25rem;
    color: var(--prism-dark);
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease-entrance), transform 0.8s var(--ease-entrance);
}

.hero-tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   ZONE 2 - THE GRID
   ============================================ */
.zone-grid {
    background: transparent;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: -0.02em;
    color: var(--prism-dark);
    text-align: center;
    margin-bottom: 48px;
}

.convergence-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    perspective: 1200px;
}

/* Iridescent grid gap lines */
.convergence-grid::before {
    content: '';
    position: absolute;
    inset: -16px;
    background-image:
        linear-gradient(to right, transparent calc(33.333% - 16px), transparent calc(33.333% - 1px),
            rgba(255, 107, 107, 0.15) calc(33.333%), rgba(255, 217, 61, 0.15) calc(33.333% + 1px),
            transparent calc(33.333% + 2px)),
        linear-gradient(to right, transparent calc(66.666% - 16px), transparent calc(66.666% - 1px),
            rgba(107, 203, 119, 0.15) calc(66.666%), rgba(77, 150, 255, 0.15) calc(66.666% + 1px),
            transparent calc(66.666% + 2px));
    z-index: 0;
    pointer-events: none;
}

/* --- Glassmorphic Card --- */
.glass-card {
    position: relative;
    background: rgba(250, 243, 224, 0.12);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(224, 122, 95, 0.25);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(45, 45, 58, 0.15), inset 0 0 0 1px rgba(255,255,255,0.1);
    overflow: hidden;
    cursor: default;
    transform: translateY(60px) rotate(calc(var(--tilt, 0) * 1deg));
    opacity: 0;
    transition:
        transform 0.8s var(--ease-entrance),
        opacity 0.6s var(--ease-entrance),
        box-shadow 0.3s var(--ease-state),
        backdrop-filter 0.3s var(--ease-state);
    transition-delay: calc(var(--card-index) * 100ms);
    z-index: 1;
}

.zone-grid.is-visible .glass-card {
    transform: translateY(0) rotate(calc(var(--tilt, 0) * 1deg));
    opacity: 1;
}

.glass-card:hover {
    transform: translateY(-8px) rotate(0deg) !important;
    box-shadow: 0 16px 48px rgba(45, 45, 58, 0.25), inset 0 0 0 1px rgba(255,255,255,0.2);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
}

.glass-card:hover .card-holo-overlay {
    opacity: 0.15;
}

/* Holographic foil overlay on cards */
.card-holo-overlay {
    position: absolute;
    inset: 0;
    background: conic-gradient(from var(--holo-angle), #E07A5F, #F2CC8F, #5EEAD4, #8B5CF6, #E07A5F);
    opacity: 0.06;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 20px;
}

/* Holographic border animation */
.glass-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    background: var(--holo-gradient);
    background-size: 200% 200%;
    animation: border-shimmer 8s linear infinite;
    z-index: -1;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.glass-card:hover::after {
    animation-duration: 2s;
    opacity: 0.6;
}

@keyframes border-shimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

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

.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    color: var(--prism-dark);
    margin-bottom: 8px;
}

.card-body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(45, 45, 58, 0.85);
    margin-bottom: 16px;
}

.card-label {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--sunset-coral);
    letter-spacing: 0.05em;
}

/* ============================================
   ZONE 3 - THE FOCUS
   ============================================ */
.zone-focus {
    background: transparent;
}

.focus-card {
    background: rgba(250, 243, 224, 0.18);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(224, 122, 95, 0.25);
    border-radius: 20px;
    padding: 64px;
    box-shadow: 0 8px 32px rgba(45, 45, 58, 0.15), inset 0 0 0 1px rgba(255,255,255,0.1);
    width: calc(100vw - 96px);
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-entrance), transform 0.8s var(--ease-entrance);
}

.zone-focus.is-visible .focus-card {
    opacity: 1;
    transform: translateY(0);
}

/* Holographic border */
.focus-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    background: var(--holo-gradient);
    background-size: 200% 200%;
    animation: border-shimmer 8s linear infinite;
    z-index: -1;
    opacity: 0.25;
}

.focus-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.circuit-illustration {
    width: 100%;
    max-width: 500px;
}

.circuit-draw {
    fill: none;
    stroke: #E07A5F;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.5;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 2s var(--ease-entrance);
}

.zone-focus.is-visible .circuit-draw {
    stroke-dashoffset: 0;
}

.circuit-node-draw {
    fill: #E07A5F;
    opacity: 0;
    transition: opacity 0.5s var(--ease-entrance);
}

.zone-focus.is-visible .circuit-node-draw {
    opacity: 0.6;
    animation: node-glow 3s ease-in-out infinite;
}

@keyframes node-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Holographic shimmer sweep on circuit illustration */
.zone-focus.is-visible .circuit-illustration {
    position: relative;
}

.focus-right .section-title {
    text-align: left;
    margin-bottom: 32px;
}

.pull-quote {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.02em;
    color: var(--prism-dark);
    border-left: 3px solid var(--sunset-coral);
    padding-left: 24px;
    margin-bottom: 32px;
    line-height: 1.3;
}

.focus-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(45, 45, 58, 0.85);
    margin-bottom: 20px;
}

/* ============================================
   ZONE 4 - THE CONVERGENCE
   ============================================ */
.zone-convergence {
    background: linear-gradient(180deg, transparent 0%, rgba(224, 122, 95, 0.3) 40%, rgba(212, 98, 43, 0.4) 70%, rgba(45, 45, 58, 0.9) 100%);
    flex-direction: column;
}

.convergence-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.conv-particle {
    position: absolute;
    left: var(--cx);
    top: var(--cy);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--holo-gradient);
    background-size: 200% 200%;
    animation: border-shimmer 4s linear infinite;
    opacity: 0.6;
    transition: left 2s var(--ease-entrance), top 2s var(--ease-entrance), opacity 2s var(--ease-entrance);
}

.zone-convergence.is-visible .conv-particle {
    left: 50%;
    top: 50%;
    opacity: 0;
}

.convergence-center {
    position: relative;
    z-index: 3;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1.2s var(--ease-entrance) 1s, transform 1.2s var(--ease-entrance) 1s;
}

.zone-convergence.is-visible .convergence-center {
    opacity: 1;
    transform: scale(1);
}

.holo-ring {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: conic-gradient(from var(--holo-angle), #E07A5F, #F2CC8F, #5EEAD4, #8B5CF6, #E07A5F) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ring-pulse 3s ease-in-out infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes ring-pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.convergence-message {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: -0.02em;
    background: conic-gradient(from var(--holo-angle), #E07A5F, #F2CC8F, #5EEAD4, #8B5CF6, #E07A5F);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.convergence-sub {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.25rem;
    color: var(--holo-white);
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .convergence-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .focus-columns {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .focus-card {
        padding: 40px;
        width: calc(100vw - 48px);
    }
    .zone-inner {
        padding: 32px;
    }
}

@media (max-width: 640px) {
    .convergence-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: clamp(3rem, 15vw, 6rem);
    }
    .zone-inner {
        padding: 20px;
    }
    .focus-card {
        padding: 24px;
        width: calc(100vw - 32px);
    }
    .section-title {
        font-size: 2rem;
    }
    .pull-quote {
        font-size: 1.5rem;
    }
    .holo-ring {
        width: 200px;
        height: 200px;
    }
}

/* ============================================
   HOLOGRAPHIC SHIMMER (CONTINUOUS)
   ============================================ */
@keyframes holo-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.hero-title .hero-letter,
.convergence-message {
    background-size: 200% 200%;
}
