/* ============================================================
   aiice.dev — Sentient Frost Design System
   Colors:
     Obsidian Night    #0e0b14
     Frozen Dusk       #1a1525
     Terracotta Glow   #c68667
     Dusty Rose Frost  #d4a59a
     Warm Copper       #b87333
     Frost Linen       #e8d5c4
     Boreal Green      #2e8b7a
   Fonts:
     Playfair Display (display / italic pull-quote)
     Cormorant Garamond (body)
     IBM Plex Mono (HUD labels / data)
   ============================================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: #0e0b14;
}

body {
    background: #0e0b14;
    color: #e8d5c4;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.8;
    letter-spacing: 0.01em;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Hexagonal crystalline grid as body underlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='104' viewBox='0 0 60 104'><g fill='none' stroke='%23e8d5c4' stroke-opacity='0.025' stroke-width='0.6'><path d='M30,0 L60,17.32 L60,51.96 L30,69.28 L0,51.96 L0,17.32 Z'/><path d='M30,34.64 L60,51.96 L60,86.6 L30,103.92 L0,86.6 L0,51.96 Z'/></g></svg>");
    background-size: 60px 104px;
    mix-blend-mode: screen;
    opacity: 0.7;
}

/* --- Aurora Background (Fixed, animated gradients) --- */
#aurora-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 30% 20%, rgba(198, 134, 103, 0.28) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 70% 60%, rgba(46, 139, 122, 0.22) 0%, transparent 70%),
        radial-gradient(ellipse 90% 60% at 50% 80%, rgba(212, 165, 154, 0.18) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 85% 15%, rgba(184, 115, 51, 0.15) 0%, transparent 70%);
    animation: aurora-drift 25s ease-in-out infinite alternate;
    pointer-events: none;
    transition: filter 1.5s ease;
    will-change: background, filter;
}

@keyframes aurora-drift {
    0% {
        background:
            radial-gradient(ellipse 80% 50% at 30% 20%, rgba(198, 134, 103, 0.28) 0%, transparent 70%),
            radial-gradient(ellipse 60% 40% at 70% 60%, rgba(46, 139, 122, 0.22) 0%, transparent 70%),
            radial-gradient(ellipse 90% 60% at 50% 80%, rgba(212, 165, 154, 0.18) 0%, transparent 70%),
            radial-gradient(ellipse 40% 30% at 85% 15%, rgba(184, 115, 51, 0.15) 0%, transparent 70%);
    }
    33% {
        background:
            radial-gradient(ellipse 70% 60% at 50% 30%, rgba(198, 134, 103, 0.22) 0%, transparent 70%),
            radial-gradient(ellipse 80% 50% at 40% 70%, rgba(46, 139, 122, 0.28) 0%, transparent 70%),
            radial-gradient(ellipse 60% 50% at 70% 50%, rgba(212, 165, 154, 0.2) 0%, transparent 70%),
            radial-gradient(ellipse 35% 30% at 10% 10%, rgba(184, 115, 51, 0.12) 0%, transparent 70%);
    }
    66% {
        background:
            radial-gradient(ellipse 90% 45% at 60% 25%, rgba(184, 115, 51, 0.22) 0%, transparent 70%),
            radial-gradient(ellipse 55% 55% at 30% 65%, rgba(46, 139, 122, 0.25) 0%, transparent 70%),
            radial-gradient(ellipse 75% 55% at 55% 75%, rgba(198, 134, 103, 0.22) 0%, transparent 70%),
            radial-gradient(ellipse 45% 35% at 90% 80%, rgba(212, 165, 154, 0.15) 0%, transparent 70%);
    }
    100% {
        background:
            radial-gradient(ellipse 85% 55% at 40% 35%, rgba(46, 139, 122, 0.24) 0%, transparent 70%),
            radial-gradient(ellipse 65% 45% at 60% 50%, rgba(198, 134, 103, 0.28) 0%, transparent 70%),
            radial-gradient(ellipse 80% 50% at 45% 70%, rgba(212, 165, 154, 0.2) 0%, transparent 70%),
            radial-gradient(ellipse 40% 30% at 20% 85%, rgba(184, 115, 51, 0.14) 0%, transparent 70%);
    }
}

/* --- Aurora Curtain SVG bands (blurred waves) --- */
#aurora-curtains {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
    mix-blend-mode: screen;
}

.aurora-curtain-svg {
    width: 100%;
    height: 100%;
}

.curtain-band {
    animation: curtain-wave 22s ease-in-out infinite alternate;
    transform-origin: center;
}

.curtain-band.band-1 { animation-duration: 18s; }
.curtain-band.band-2 { animation-duration: 24s; animation-delay: -4s; }
.curtain-band.band-3 { animation-duration: 30s; animation-delay: -8s; }

@keyframes curtain-wave {
    0%   { transform: translateY(0)    scaleY(1); opacity: 0.35; }
    50%  { transform: translateY(-14px) scaleY(1.05); opacity: 0.5; }
    100% { transform: translateY(10px) scaleY(0.96); opacity: 0.3; }
}

/* --- Frost Particles --- */
#frost-particles {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.frost-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #e8d5c4;
    border-radius: 50%;
    opacity: 0.2;
    box-shadow: 0 0 4px rgba(232, 213, 196, 0.5);
    animation: particle-float linear infinite;
    will-change: transform, opacity;
}

@keyframes particle-float {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    12%  { opacity: 0.25; }
    88%  { opacity: 0.2; }
    100% { transform: translateY(-105vh) translateX(24px); opacity: 0; }
}

/* --- Frame Header (persistent HUD chrome) --- */
#frame-header {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 90;
    display: flex;
    justify-content: space-between;
    padding: 0 32px;
    pointer-events: none;
}

.frame-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(232, 213, 196, 0.45);
}

.frame-label.left::before {
    content: '◆ ';
    color: #c68667;
    margin-right: 4px;
}

.frame-label.right::after {
    content: ' ◇';
    color: #2e8b7a;
    margin-left: 4px;
}

/* --- Pip Navigation --- */
#pip-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 12px 0;
}

.pip-line {
    position: absolute;
    width: 1px;
    top: 18px;
    bottom: 18px;
    background: linear-gradient(180deg,
        rgba(232, 213, 196, 0) 0%,
        rgba(232, 213, 196, 0.18) 20%,
        rgba(232, 213, 196, 0.18) 80%,
        rgba(232, 213, 196, 0) 100%);
    left: 50%;
    transform: translateX(-50%);
}

.pip {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
}

.pip-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(14, 11, 20, 0.9);
    border: 1px solid rgba(232, 213, 196, 0.35);
    transition: all 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.pip:hover .pip-dot {
    border-color: #d4a59a;
    box-shadow: 0 0 10px rgba(212, 165, 154, 0.4);
}

.pip.active .pip-dot {
    background: linear-gradient(135deg, #c68667 0%, #d4a59a 40%, #2e8b7a 100%);
    border-color: #b87333;
    box-shadow:
        0 0 14px rgba(198, 134, 103, 0.6),
        0 0 34px rgba(198, 134, 103, 0.22);
    transform: scale(1.25);
}

.pip-tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    margin-right: 16px;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: #e8d5c4;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    text-shadow: 0 0 20px rgba(198, 134, 103, 0.4);
}

.pip:hover .pip-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* --- Scroll Container --- */
#scroll-container {
    position: relative;
    z-index: 3;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

#scroll-container::-webkit-scrollbar {
    display: none;
}

/* --- Snap Sections --- */
.snap-section {
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

/* --- HUD Space (3D container) --- */
.hud-space {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 1200px;
    transform-style: preserve-3d;
}

/* --- HUD Panels --- */
.hud-panel {
    position: absolute;
    background: linear-gradient(180deg, rgba(26, 21, 37, 0.9) 0%, rgba(14, 11, 20, 0.95) 100%);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-radius: 12px;
    padding: 28px 32px;
    border: 1px solid rgba(255, 200, 170, 0.15);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(232, 213, 196, 0.06);
    transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1),
                opacity 0.9s cubic-bezier(0.65, 0, 0.35, 1),
                filter 0.9s cubic-bezier(0.65, 0, 0.35, 1);
    opacity: 0;
    filter: blur(6px);
}

.hud-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(198, 134, 103, 0.35),
        rgba(212, 165, 154, 0.15) 40%,
        rgba(46, 139, 122, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.hud-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'><g fill-rule='evenodd'><g fill='%23e8d5c4' fill-opacity='0.035'><path d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9z'/></g></g></svg>");
    pointer-events: none;
    opacity: 0.6;
    mix-blend-mode: screen;
}

.panel-border {
    display: none; /* superseded by ::before gradient border */
}

.hud-panel.visible {
    opacity: 1;
    filter: blur(0);
}

/* Depth layers */
.panel-near { z-index: 30; }
.panel-mid  { z-index: 20; }
.panel-far  { z-index: 10; }

.panel-near { transform: translateY(30px) translateZ(-20px); }
.panel-mid  { transform: translateY(30px) translateZ(-40px); }
.panel-far  { transform: translateY(30px) translateZ(-80px); }

.panel-near.visible { transform: translateY(0) translateZ(40px); }
.panel-mid.visible  { transform: translateY(0) translateZ(0); }
.panel-far.visible  { transform: translateY(0) translateZ(-60px); opacity: 0.72; }

/* --- Panel inner content --- */
.panel-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(232, 213, 196, 0.55);
    margin-bottom: 14px;
    position: relative;
}

.panel-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #c68667;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    box-shadow: 0 0 8px rgba(198, 134, 103, 0.6);
    animation: label-pulse 2.4s ease-in-out infinite;
}

@keyframes label-pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.2); }
}

.panel-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: #e8d5c4;
    margin-bottom: 14px;
    line-height: 1.25;
    text-shadow: 0 0 30px rgba(198, 134, 103, 0.22);
}

.panel-body {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.08rem;
    line-height: 1.8;
    color: #e8d5c4;
    margin-bottom: 14px;
}

.panel-body em {
    font-style: italic;
    color: #d4a59a;
}

.panel-meta {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(232, 213, 196, 0.4);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(232, 213, 196, 0.08);
}

/* Readout rows (hero-side-panel) */
.readout-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(232, 213, 196, 0.08);
}

.readout-row:last-child { border-bottom: none; }

.readout-key {
    color: rgba(232, 213, 196, 0.5);
    text-transform: uppercase;
}

.readout-val {
    color: #d4a59a;
    text-shadow: 0 0 10px rgba(212, 165, 154, 0.3);
}

/* --- Pull Quotes --- */
.pull-quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1.6;
    color: #d4a59a;
    display: block;
    position: relative;
    padding: 0 12px;
}

/* --- Section Titles --- */
.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 8vw;
    letter-spacing: -0.03em;
    color: #c68667;
    text-shadow: 0 0 40px rgba(198, 134, 103, 0.35);
    position: absolute;
    top: 6vh;
    left: 5vw;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.1s ease, transform 1.1s ease;
    z-index: 5;
    pointer-events: none;
    line-height: 1;
}

.snap-section.active .section-title {
    opacity: 0.92;
    transform: translateY(0);
}

.section-subtitle {
    position: absolute;
    top: calc(6vh + 9vw);
    left: 5vw;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(232, 213, 196, 0.55);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.2s ease 0.3s, transform 1.2s ease 0.3s;
    z-index: 5;
}

.snap-section.active .section-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.section-subtitle::before {
    content: '— ';
    color: #c68667;
}

/* --- SVG Pathlines (connectors) --- */
.section-pathlines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.path-draw {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.path-draw.visible { stroke-dashoffset: 0; }

/* --- Path Nodes & Pulses --- */
.path-node {
    opacity: 0;
    transition: opacity 0.9s ease 1.4s;
    filter: drop-shadow(0 0 6px rgba(198, 134, 103, 0.55));
}

.snap-section.active .path-node { opacity: 1; }

.pulse-node {
    animation: pulse-glow 3s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(212, 165, 154, 0.5));
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.35; transform: scale(1); transform-box: fill-box; transform-origin: center; }
    50%      { opacity: 0.9;  transform: scale(1.6); transform-box: fill-box; transform-origin: center; }
}

.flow-dot {
    animation: dot-travel 4s linear infinite;
    filter: drop-shadow(0 0 4px rgba(198, 134, 103, 0.8));
}

@keyframes dot-travel {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; }
}

/* --- Ice Crystals --- */
.ice-crystal {
    position: absolute;
    width: 130px;
    height: 130px;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 0 12px rgba(212, 165, 154, 0.2));
}

.crystal-1 { top: 12%; right: 7%; width: 140px; height: 140px; animation: crystal-rotate 120s linear infinite; }
.crystal-2 { bottom: 10%; left: 4%; width: 110px; height: 110px; animation: crystal-rotate 100s linear infinite reverse; }
.crystal-3 { top: 8%;  left: 3%;  width: 150px; height: 150px; animation: crystal-rotate 150s linear infinite; }
.crystal-4 { bottom: 10%; right: 4%; width: 100px; height: 100px; animation: crystal-rotate 110s linear infinite reverse; }

@keyframes crystal-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ============================================================
   SECTION 1: ALICE (Hero)
   ============================================================ */

.hero-wordmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 30vw;
    letter-spacing: -0.035em;
    line-height: 0.85;
    z-index: 3;
    display: flex;
    white-space: nowrap;
    pointer-events: none;
}

.hero-letter {
    display: inline-block;
    color: transparent;
    background: linear-gradient(135deg, #c68667 0%, #d4a59a 40%, #2e8b7a 100%);
    -webkit-background-clip: text;
            background-clip: text;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.65, 0, 0.35, 1), transform 1s cubic-bezier(0.65, 0, 0.35, 1);
    filter: drop-shadow(0 0 30px rgba(198, 134, 103, 0.25));
}

.snap-section.active .hero-letter {
    opacity: 0.18;
    transform: translateY(0);
}

.snap-section.active .hero-letter:nth-child(1) { transition-delay: 0s; }
.snap-section.active .hero-letter:nth-child(2) { transition-delay: 0.15s; }
.snap-section.active .hero-letter:nth-child(3) { transition-delay: 0.30s; }
.snap-section.active .hero-letter:nth-child(4) { transition-delay: 0.45s; }
.snap-section.active .hero-letter:nth-child(5) { transition-delay: 0.60s; }

.hero-panel {
    top: 52%;
    left: 6vw;
    max-width: 420px;
    z-index: 40;
}

.hero-panel.visible {
    transform: translateY(0) translateZ(40px);
}

.hero-panel { transform: translateY(calc(-50% + 30px)) translateZ(-20px); }
.hero-panel.visible { transform: translateY(-50%) translateZ(40px); }

.hero-heading {
    font-size: 1.7rem;
    line-height: 1.2;
}

.hero-side-panel {
    top: 22%;
    right: 7vw;
    max-width: 240px;
    padding: 22px 24px;
    z-index: 20;
}

.hero-side-panel { transform: translateY(30px) translateZ(-80px); }
.hero-side-panel.visible { transform: translateY(0) translateZ(-60px); opacity: 0.78; }

.scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10;
    opacity: 0;
    transition: opacity 1.5s ease 1.4s;
    pointer-events: none;
}

.snap-section.active .scroll-hint { opacity: 1; }

.scroll-hint-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(232, 213, 196, 0.45);
}

.scroll-hint-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent, #c68667, transparent);
    animation: hint-slide 2.2s ease-in-out infinite;
}

@keyframes hint-slide {
    0%, 100% { transform: translateY(-8px); opacity: 0.4; }
    50%      { transform: translateY(8px);  opacity: 1; }
}

/* ============================================================
   SECTION 2: PERCEIVE
   ============================================================ */

.perceive-panel-1 {
    top: 30%;
    left: 8vw;
    max-width: 340px;
    transition-delay: 0s;
}
.perceive-panel-2 {
    top: 22%;
    left: 36vw;
    max-width: 340px;
    transition-delay: 0.2s;
}
.perceive-panel-3 {
    top: 48%;
    right: 8vw;
    max-width: 340px;
    transition-delay: 0.4s;
}

/* ============================================================
   SECTION 3: CRYSTALLIZE
   ============================================================ */

.crystallize-flow {
    position: absolute;
    top: 22%;
    left: 50%;
    transform: translateX(-50%);
    width: 82vw;
    max-width: 960px;
    z-index: 10;
}

.flow-diagram {
    width: 100%;
    height: auto;
    overflow: visible;
}

.node-ring {
    filter: drop-shadow(0 0 10px rgba(212, 165, 154, 0.4));
    animation: node-breathe 4.5s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.flow-node-2 rect { animation: node-breathe 5s ease-in-out infinite 0.5s; transform-box: fill-box; transform-origin: center; }

@keyframes node-breathe {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1; }
}

.crystallize-panel {
    bottom: 10vh;
    left: 50%;
    max-width: 540px;
    text-align: center;
}

.crystallize-panel { transform: translate(-50%, 30px) translateZ(-40px); }
.crystallize-panel.visible { transform: translate(-50%, 0) translateZ(0); }

.crystallize-panel .pull-quote::before,
.crystallize-panel .pull-quote::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c68667, transparent);
    margin: 12px auto;
}

/* ============================================================
   SECTION 4: RESONATE
   ============================================================ */

.alice-silhouette {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38vw;
    max-width: 420px;
    height: auto;
    opacity: 0.08;
    z-index: 1;
    pointer-events: none;
}

.silhouette-path { transition: stroke-dashoffset 8s cubic-bezier(0.65, 0, 0.35, 1); }

.resonate-panel {
    top: 50%;
    left: 50%;
    max-width: 600px;
    z-index: 40;
}

.resonate-panel { transform: translate(-50%, -50%) translateZ(-20px); opacity: 0; filter: blur(6px); }
.resonate-panel.visible { transform: translate(-50%, -50%) translateZ(40px); opacity: 1; filter: blur(0); }

.resonate-text {
    margin-bottom: 18px;
}

.resonate-text:last-of-type { margin-bottom: 6px; }

/* ============================================================
   SECTION 5: AWAKEN
   ============================================================ */

.awaken-sub {
    top: 14vh;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.snap-section.active .awaken-sub { transform: translateX(-50%) translateY(0); }
.awaken-sub { transform: translateX(-50%) translateY(10px); }

.awaken-wordmark {
    position: absolute;
    top: 36%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 15vw;
    letter-spacing: -0.03em;
    display: flex;
    z-index: 10;
    line-height: 1;
}

.awaken-letter {
    display: inline-block;
    color: #c68667;
    text-shadow: 0 0 40px rgba(198, 134, 103, 0.35);
    transition: opacity 1.6s cubic-bezier(0.65, 0, 0.35, 1),
                transform 1.6s cubic-bezier(0.65, 0, 0.35, 1),
                filter 1.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.awaken-letter.dissolving {
    opacity: 0;
    transform: translateY(-40px) scale(1.15) rotate(-4deg);
    filter: blur(14px);
    color: #d4a59a;
}

.awaken-contact {
    position: absolute;
    top: 62%;
    left: 50%;
    transform: translateX(-50%);
    width: 620px;
    max-width: 85vw;
    z-index: 10;
    opacity: 0;
    transition: opacity 1.5s ease 2s;
    text-align: center;
}

.snap-section.active .awaken-contact { opacity: 1; }

.email-draw {
    width: 100%;
    height: auto;
    overflow: visible;
}

.email-text-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 3s cubic-bezier(0.65, 0, 0.35, 1) 2.4s,
                fill 1.2s ease 5.2s;
    filter: drop-shadow(0 0 12px rgba(198, 134, 103, 0.35));
}

.snap-section.active .email-text-path {
    stroke-dashoffset: 0;
    fill: #c68667;
}

.awaken-caption {
    display: block;
    margin-top: 20px;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1rem;
    color: rgba(232, 213, 196, 0.55);
    letter-spacing: 0.02em;
}

.frost-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65vw;
    max-width: 540px;
    height: auto;
    z-index: 1;
    pointer-events: none;
    animation: burst-spin 160s linear infinite;
}

@keyframes burst-spin {
    from { transform: translate(-50%, -50%) rotate(0); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.awaken-footnote {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 10;
    opacity: 0;
    transition: opacity 1.5s ease 3s;
}

.snap-section.active .awaken-footnote { opacity: 0.6; }

.foot-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 154, 0.5), transparent);
}

.foot-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(232, 213, 196, 0.45);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-wordmark { font-size: 24vw; }
    .section-title { font-size: 14vw; }
    .section-subtitle { top: calc(6vh + 15vw); font-size: 0.7rem; }
    .awaken-wordmark { font-size: 20vw; }

    .hero-panel {
        left: 5vw;
        right: 5vw;
        max-width: none;
        top: auto;
        bottom: 20vh;
        transform: translateY(30px) translateZ(-20px);
    }
    .hero-panel.visible { transform: translateY(0) translateZ(40px); }

    .hero-side-panel {
        top: 18%;
        right: 5vw;
        left: auto;
        max-width: 60vw;
    }

    .perceive-panel-1,
    .perceive-panel-2,
    .perceive-panel-3 {
        position: absolute;
        left: 5vw;
        right: 5vw;
        max-width: none;
    }
    .perceive-panel-1 { top: 22%; }
    .perceive-panel-2 { top: 42%; }
    .perceive-panel-3 { top: 62%; }

    .resonate-panel {
        left: 5vw;
        right: 5vw;
        max-width: none;
        width: calc(100vw - 10vw);
    }
    .resonate-panel { transform: translate(0, calc(-50% + 30px)) translateZ(-20px); }
    .resonate-panel.visible { transform: translate(0, -50%) translateZ(40px); }

    .crystallize-flow { top: 26%; }
    .crystallize-panel {
        left: 5vw;
        right: 5vw;
        max-width: none;
        bottom: 6vh;
    }
    .crystallize-panel { transform: translate(0, 30px) translateZ(-40px); }
    .crystallize-panel.visible { transform: translate(0, 0) translateZ(0); }

    #pip-nav { right: 12px; }
    .pip-tooltip { display: none; }

    #frame-header { padding: 0 16px; }
    .frame-label { font-size: 0.6rem; letter-spacing: 0.1em; }
    .frame-label.right { display: none; }

    .crystal-1 { width: 90px; height: 90px; }
    .crystal-2 { width: 80px; height: 80px; }
    .crystal-3 { width: 100px; height: 100px; }
    .crystal-4 { width: 70px; height: 70px; }
}
