/* ========================================
   luminant.dev — Ocean Deep + Candlelight
   Compliance terms: Interaction: Interactive elements (navigation dots IntersectionObserver` (threshold: zero [0] IntersectionObserver` fine-grained thresholds calculate (400 well-balanced contemporary roots calligraphy Lora" (Google
   ======================================== */

:root {
    --deep-ocean: #0b1628;
    --mid-water: #152a4a;
    --cream: #e8dcc8;
    --amber: #d4a04a;
    --ember: #8b4a2b;
    --phosphor: #4a8fa8;
    --ink: #1e3a5f;
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
    overflow-x: hidden;
}

body {
    background-color: var(--deep-ocean);
    color: var(--cream);
    font-family: 'Lora', serif;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* Grain overlay */
#grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='3' type='fractalNoise' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)'/%3E%3C/svg%3E");
    background-size: 300px 300px;
}

/* Navigation dots */
#nav-dots {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: var(--cream);
    opacity: 0.3;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

.nav-dot.active {
    opacity: 1;
    background: var(--amber);
}

.dot-halo {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,160,74,0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-dot.active .dot-halo {
    opacity: 1;
}

/* Panels */
.panel {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    overflow: hidden;
}

.panel-tall {
    min-height: auto;
}

/* ===== THE APPROACH ===== */
#the-approach {
    background: linear-gradient(180deg, #070e1a 0%, var(--deep-ocean) 40%, var(--mid-water) 100%);
}

.approach-content {
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(3.5rem, 9vw, 7rem);
    letter-spacing: 0.03em;
    color: var(--cream);
    display: inline-flex;
    align-items: center;
}

.letter-group {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: letterReveal 0.6s ease forwards;
    animation-delay: calc(var(--delay) * 80ms + 300ms);
}

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

/* Candle flame */
.candle-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 0.4em;
    height: 1em;
    margin: 0 -0.02em;
    opacity: 0;
    animation: letterReveal 0.6s ease forwards;
    animation-delay: calc(8 * 80ms + 300ms);
}

.candle-core {
    position: absolute;
    width: 10px;
    height: 18px;
    background: var(--amber);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flickerCore 1.3s ease-in-out infinite alternate;
    z-index: 3;
}

.candle-mid {
    position: absolute;
    width: 16px;
    height: 24px;
    background: var(--ember);
    opacity: 0.6;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flickerMid 1.7s ease-in-out infinite alternate;
    z-index: 2;
}

.candle-outer {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(212,160,74,0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: flickerOuter 2.3s ease-in-out infinite alternate;
    z-index: 1;
    box-shadow: 0 0 40px rgba(212,160,74,0.15), 0 0 80px rgba(212,160,74,0.05);
}

@keyframes flickerCore {
    0% { transform: scaleX(0.97) scaleY(0.94) rotate(-2deg); opacity: 1; }
    33% { transform: scaleX(1.03) scaleY(1.06) rotate(1deg); opacity: 0.9; }
    66% { transform: scaleX(0.98) scaleY(1.02) rotate(-1deg); opacity: 0.95; }
    100% { transform: scaleX(1.01) scaleY(1.08) rotate(3deg); opacity: 0.85; }
}

@keyframes flickerMid {
    0% { transform: scaleX(1.02) scaleY(0.96) rotate(2deg); }
    50% { transform: scaleX(0.97) scaleY(1.05) rotate(-2deg); }
    100% { transform: scaleX(1.01) scaleY(0.98) rotate(1deg); }
}

@keyframes flickerOuter {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.98); opacity: 0.9; }
}

/* Compass rose */
.compass-rose {
    position: absolute;
    bottom: 10%;
    right: 10%;
    width: 200px;
    height: 200px;
    opacity: 0.06;
    animation: compassSpin 120s linear infinite;
    z-index: 1;
}

@keyframes compassSpin {
    to { transform: rotate(360deg); }
}

/* Constellation dots */
.constellation-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.constellation-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--phosphor);
    opacity: 0;
    animation: constellationPulse 4s ease-in-out infinite alternate;
}

@keyframes constellationPulse {
    0% { opacity: 0.05; }
    50% { opacity: 0.25; }
    100% { opacity: 0.08; }
}

/* Wave dividers */
.wave-divider {
    width: 100%;
    padding: 0 5%;
    position: relative;
    z-index: 5;
}

.wave-divider svg, .section-wave {
    width: 100%;
    height: 30px;
}

.section-wave {
    position: absolute;
    bottom: 0;
    left: 0;
}

.hand-drawn-line {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2s ease;
}

.hand-drawn-line.drawn {
    stroke-dashoffset: 0;
}

/* ===== THE HARBOR ===== */
#the-harbor {
    background: linear-gradient(180deg, var(--mid-water) 0%, #1a3355 50%, var(--mid-water) 100%);
    min-height: 120vh;
    flex-direction: column;
}

.harbor-content {
    max-width: 580px;
    padding: 2rem;
    z-index: 2;
    text-align: center;
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    color: var(--cream);
    margin-bottom: 2rem;
}

.manifesto p {
    margin-bottom: 1.5rem;
    max-width: 38em;
    color: var(--cream);
    opacity: 0.85;
}

.annotation {
    font-family: 'Caveat', cursive;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    color: var(--amber);
    opacity: 0.7 !important;
    font-style: normal;
}

/* ===== THE WORKSHOP ===== */
#the-workshop {
    background: var(--deep-ocean);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.workshop-project {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 2rem;
    scroll-snap-align: start;
}

.project-bg-illustration {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.project-bg-illustration svg {
    width: 60%;
    max-width: 400px;
    height: auto;
}

.project-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    letter-spacing: -0.02em;
    color: var(--cream);
    margin-bottom: 1rem;
    z-index: 2;
    position: relative;
}

.project-desc {
    max-width: 500px;
    text-align: center;
    color: var(--cream);
    opacity: 0.8;
    z-index: 2;
    position: relative;
    margin-bottom: 1rem;
}

.project-label {
    font-family: 'Caveat', cursive;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    color: var(--phosphor);
    opacity: 0.7;
    z-index: 2;
    position: relative;
}

/* ===== THE BEACON ===== */
#the-beacon {
    background: linear-gradient(180deg, var(--deep-ocean) 0%, #070e1a 100%);
    flex-direction: column;
}

.beacon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 2;
    padding: 2rem;
}

.beacon-flame {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
}

.beacon-size.candle-core {
    width: 24px;
    height: 44px;
}

.beacon-size.candle-mid {
    width: 38px;
    height: 58px;
}

.beacon-size.candle-outer {
    width: 120px;
    height: 120px;
    box-shadow: 0 0 60px rgba(212,160,74,0.25), 0 0 120px rgba(212,160,74,0.1);
}

.beacon-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    color: var(--cream);
    margin-bottom: 1.5rem;
}

.beacon-text {
    max-width: 38em;
    color: var(--cream);
    opacity: 0.8;
    margin-bottom: 2.5rem;
}

.beacon-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.envelope-icon {
    width: 60px;
    height: 45px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.envelope-icon:hover {
    opacity: 1;
}

.contact-link {
    font-family: 'Caveat', cursive;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--phosphor);
    text-decoration: none;
    border-bottom: 1px solid rgba(74,143,168,0.3);
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
}

.contact-link:hover {
    color: var(--amber);
    border-color: var(--amber);
}

/* Section entry animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Magnetic element transition */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Responsive */
@media (max-width: 600px) {
    #nav-dots {
        right: 12px;
        gap: 18px;
    }
    .nav-dot {
        width: 10px;
        height: 10px;
    }
    .compass-rose {
        width: 120px;
        height: 120px;
    }
}
