/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --terracotta: #D4826A;
    --white: #FFFFFF;
    --black: #000000;
    --dark-slate: #3D4F58;
    --sea-fog: #E8EDF0;
    --deep-ocean: #1A2329;
    --pewter: #B8C9D1;
    --tidepool: #7EC8D9;
    --cliff-bg: #2B3A42;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: var(--sea-fog);
    background: var(--deep-ocean);
    overflow: hidden;
    height: 100vh;
}

/* === FOG OVERLAY === */
#fog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--sea-fog);
    z-index: 1000;
    pointer-events: none;
    opacity: 1;
    transition: opacity 2.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

#fog-overlay.lifted {
    opacity: 0;
}

/* === HEARTBEAT PULSE === */
#heartbeat-pulse {
    position: fixed;
    top: 50%;
    left: 20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 130, 106, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(1);
    z-index: 1;
    pointer-events: none;
    animation: heartbeat 3s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
    15% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.7; }
    30% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
    45% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.6; }
    60% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
}

/* === SPLIT SCREEN === */
.split-screen {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* === LEFT PANEL: CLIFF FACE === */
.cliff-face {
    width: 40%;
    min-width: 40%;
    height: 100vh;
    background: var(--deep-ocean);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(126, 200, 217, 0.1);
}

.cliff-face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            rgba(184, 201, 209, 0.03) 40px,
            rgba(184, 201, 209, 0.03) 41px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            rgba(184, 201, 209, 0.03) 40px,
            rgba(184, 201, 209, 0.03) 41px
        );
    pointer-events: none;
}

.cliff-content {
    position: relative;
    z-index: 2;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
}

.logo-mark {
    margin-bottom: 2rem;
}

.heartbeat-icon {
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.06); }
    30% { transform: scale(1); }
    45% { transform: scale(1.04); }
    60% { transform: scale(1); }
}

.site-title {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--white);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.site-title .dot {
    color: var(--terracotta);
}

.site-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--pewter);
    line-height: 1.6;
    margin-bottom: 3rem;
}

/* === NAVIGATION === */
.cliff-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: auto;
}

.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--pewter);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
    display: inline-block;
    width: fit-content;
}

.nav-link::before {
    content: '—';
    margin-right: 0.75rem;
    color: rgba(126, 200, 217, 0.3);
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--tidepool);
}

.nav-link:hover::before,
.nav-link.active::before {
    color: var(--terracotta);
}

/* === TIDE INDICATOR === */
.cliff-footer {
    margin-top: auto;
    padding-top: 2rem;
}

.tide-indicator {
    position: relative;
}

.tide-line {
    width: 100%;
    height: 2px;
    background: rgba(184, 201, 209, 0.15);
    position: relative;
    overflow: hidden;
}

.tide-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--tidepool), var(--terracotta));
    transition: width 0.3s ease;
}

.tide-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: rgba(184, 201, 209, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.5rem;
    display: block;
}

/* === RIGHT PANEL: OCEAN === */
.ocean-panel {
    width: 60%;
    margin-left: 40%;
    height: 100vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    background: linear-gradient(180deg, var(--deep-ocean) 0%, #1E2D35 50%, var(--deep-ocean) 100%);
    position: relative;
}

.ocean-panel::-webkit-scrollbar {
    width: 4px;
}

.ocean-panel::-webkit-scrollbar-track {
    background: transparent;
}

.ocean-panel::-webkit-scrollbar-thumb {
    background: rgba(126, 200, 217, 0.2);
    border-radius: 2px;
}

/* === SECTIONS === */
.ocean-section {
    padding: 6rem 4rem;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

.section-heading {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--white);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

/* === GLASSMORPHIC CARDS === */
.glass-card {
    background: rgba(43, 58, 66, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(126, 200, 217, 0.12);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(126, 200, 217, 0.2), transparent);
}

.glass-card:hover {
    transform: translateY(-2px);
    border-color: rgba(126, 200, 217, 0.25);
}

.glass-card p {
    color: var(--pewter);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.glass-card p:last-child {
    margin-bottom: 0;
}

.card-title {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--tidepool);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.highlight {
    color: var(--terracotta);
    font-weight: 500;
}

/* === CODE CARD === */
.code-card {
    padding: 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(26, 35, 41, 0.6);
    border-bottom: 1px solid rgba(126, 200, 217, 0.08);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dot.red { background: #E5534B; }
.code-dot.yellow { background: #D4976A; }
.code-dot.green { background: #57AB5A; }

.code-filename {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--pewter);
    margin-left: 0.5rem;
}

.code-block {
    padding: 1.5rem 2rem;
    overflow-x: auto;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.9;
    color: var(--pewter);
}

.code-block .kw { color: var(--tidepool); }
.code-block .str { color: var(--terracotta); }
.code-block .num { color: #D4976A; }
.code-block .fn { color: #A8D8A8; }

/* === TESTIMONIAL === */
.testimonial-card blockquote p {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--sea-fog);
    line-height: 1.8;
}

.testimonial-author {
    display: block;
    margin-top: 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: var(--terracotta);
    font-style: normal;
    letter-spacing: 0.02em;
}

/* === CTA === */
.cta-card {
    text-align: center;
}

.cta-card .section-heading {
    margin-bottom: 1rem;
}

.install-command {
    background: rgba(26, 35, 41, 0.8);
    border: 1px solid rgba(126, 200, 217, 0.15);
    border-radius: 8px;
    padding: 1rem 2rem;
    display: inline-block;
    margin: 1.5rem 0;
}

.install-command code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    color: var(--tidepool);
    letter-spacing: 0.02em;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--terracotta);
    color: var(--white);
    border: 1px solid var(--terracotta);
}

.btn-primary:hover {
    background: transparent;
    color: var(--terracotta);
}

.btn-secondary {
    background: transparent;
    color: var(--tidepool);
    border: 1px solid rgba(126, 200, 217, 0.3);
}

.btn-secondary:hover {
    border-color: var(--tidepool);
    background: rgba(126, 200, 217, 0.08);
}

/* === FOOTER === */
.ocean-footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid rgba(126, 200, 217, 0.08);
    margin-top: 2rem;
}

.footer-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--pewter);
    letter-spacing: 0.05em;
}

.footer-sub {
    font-size: 0.72rem;
    color: rgba(184, 201, 209, 0.4);
    margin-top: 0.5rem;
}

/* === REVEAL ANIMATION === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .split-screen {
        flex-direction: column;
    }

    .cliff-face {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: relative;
        padding: 2rem 0;
        border-right: none;
        border-bottom: 1px solid rgba(126, 200, 217, 0.1);
    }

    .cliff-content {
        padding: 2rem;
        height: auto;
    }

    .cliff-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem 1rem;
        margin-bottom: 1rem;
    }

    .cliff-footer {
        display: none;
    }

    .ocean-panel {
        width: 100%;
        margin-left: 0;
        height: auto;
        overflow-y: visible;
    }

    body {
        overflow: auto;
        height: auto;
    }

    .ocean-section {
        padding: 3rem 1.5rem;
        min-height: auto;
    }

    #heartbeat-pulse {
        display: none;
    }
}
