/* nonri.org - Coastal Logic Institute */
/* Colors: #0b1a1e (deep), #0f2229 (mid), #132c33 (surface), #1a3a42, #c8dcd6 (text), #9eb8b0 (secondary), #7ebcb2 (teal accent), #d4a574 (driftwood), #e07858 (terracotta) */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0b1a1e;
    color: #c8dcd6;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Logic Symbols Background */
#logic-symbols {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.logic-symbol {
    position: absolute;
    font-family: 'Cutive Mono', monospace;
    color: #7ebcb2;
    opacity: 0;
    will-change: transform;
    pointer-events: none;
    user-select: none;
}

@keyframes symbol-drift {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-120vh);
    }
}

/* Leaf Silhouettes */
#leaf-silhouettes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.leaf {
    position: absolute;
    border-radius: 0 80% 0 80%;
    background: rgba(126, 188, 178, 0.03);
    filter: blur(20px);
    opacity: 0;
    will-change: transform;
    pointer-events: none;
}

@keyframes leaf-drift {
    0% { transform: rotate(var(--leaf-rotate)); }
    50% { transform: rotate(calc(var(--leaf-rotate) + 8deg)); }
    100% { transform: rotate(var(--leaf-rotate)); }
}

/* Marble Veins SVG */
#marble-veins {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
}

.marble-vein {
    fill: none;
    stroke: rgba(126, 188, 178, 0.12);
    stroke-width: 1;
    stroke-linecap: round;
}

/* Navigation Dots */
#scroll-nav {
    position: fixed;
    bottom: 40px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7ebcb2;
    opacity: 0.3;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    padding: 0;
}

.nav-dot:hover,
.nav-dot.active {
    width: 24px;
    height: 24px;
    opacity: 0.7;
}

.nav-label {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Nunito Sans', sans-serif;
    font-size: 11px;
    color: #9eb8b0;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.nav-dot:hover .nav-label {
    opacity: 1;
}

/* Main Content */
#content {
    position: relative;
    z-index: 10;
}

/* Panel Base Styles */
.panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel-content {
    max-width: 38em;
}

/* Hero Panel */
.panel-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0b1a1e;
    padding: 0 5%;
}

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(56px, 8vw, 140px);
    letter-spacing: 0.04em;
    color: #c8dcd6;
    line-height: 1.0;
    cursor: default;
    display: inline-block;
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    transition: color 0.2s ease-in-out;
}

.hero-title:hover {
    animation: shake 300ms ease-out;
}

.hero-title:hover .letter {
    color: #e07858;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}

.hero-subtitle {
    font-family: 'Cutive Mono', monospace;
    font-size: 16px;
    color: #d4a574;
    letter-spacing: 0.06em;
    margin-top: 24px;
    opacity: 0;
}

/* Panel Variations - Drifting Layout */
.panel-1 {
    min-height: 80vh;
    padding: 10vh 0 10vh 8%;
    width: 75%;
    margin-left: 5%;
    background: linear-gradient(17deg, rgba(15, 34, 41, 0.6) 0%, transparent 70%),
                radial-gradient(ellipse at 30% 50%, rgba(26, 58, 66, 0.3), transparent 70%),
                linear-gradient(143deg, rgba(19, 44, 51, 0.4) 0%, transparent 60%);
}

.panel-2 {
    min-height: 100vh;
    padding: 10vh 8% 10vh 0;
    width: 80%;
    margin-left: 20%;
    background: linear-gradient(251deg, rgba(15, 34, 41, 0.5) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 40%, rgba(26, 58, 66, 0.25), transparent 65%),
                linear-gradient(17deg, rgba(19, 44, 51, 0.35) 0%, transparent 55%);
}

.panel-3 {
    min-height: 70vh;
    padding: 10vh 0 10vh 12%;
    width: 65%;
    margin-left: 8%;
    background: linear-gradient(143deg, rgba(15, 34, 41, 0.55) 0%, transparent 65%),
                radial-gradient(ellipse at 40% 60%, rgba(26, 58, 66, 0.2), transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(126, 188, 178, 0.04), transparent 50%);
}

.panel-4 {
    min-height: 120vh;
    padding: 15vh 10% 15vh 0;
    width: 70%;
    margin-left: 25%;
    background: linear-gradient(17deg, rgba(19, 44, 51, 0.5) 0%, transparent 70%),
                radial-gradient(ellipse at 60% 50%, rgba(15, 34, 41, 0.4), transparent 60%),
                linear-gradient(251deg, rgba(26, 58, 66, 0.3) 0%, transparent 50%);
}

/* Vein Spaces */
.vein-space {
    height: 15vh;
    position: relative;
}

/* Section Headings */
.section-heading {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: 0.02em;
    color: #7ebcb2;
    line-height: 1.2;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Body Text */
.body-text {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: #9eb8b0;
    max-width: 38em;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease 0.12s, transform 0.6s ease 0.12s;
}

.body-text + .body-text {
    transition-delay: 0.24s;
}

/* Annotations */
.annotation {
    display: block;
    font-family: 'Cutive Mono', monospace;
    font-size: 14px;
    color: #d4a574;
    letter-spacing: 0.06em;
    margin-top: 28px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease 0.24s, transform 0.6s ease 0.24s;
}

/* Revealed state */
.panel.revealed .section-heading,
.panel.revealed .body-text,
.panel.revealed .annotation {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .panel-1,
    .panel-2,
    .panel-3,
    .panel-4 {
        width: 100%;
        margin-left: 0;
        padding-left: 5%;
        padding-right: 5%;
    }

    .hero-title {
        font-size: clamp(40px, 10vw, 80px);
    }

    #scroll-nav {
        bottom: 20px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .vein-space {
        display: none;
    }
}
