/* ============================================================
   renai.monster — Alpine Editorial / Evolved-Minimal
   Palette: #0A0A0B #141416 #2A2A2E #F0F0F2 #7A7A88 #3E3E46 #4ECDC4
   Fonts: Bebas Neue (Google Fonts), IBM Plex Mono (Google Fonts, medium 500)
   Design: hero-dominant, tutorial orientation -- showing terrain to traverse.
   IBM Plex Mono (medium 500) accent labels -- step labels, tooltips, footer.
   Interaction Specifications:** scroll-snap, IntersectionObserver, kinetic heads.
   Typography: kinetic-animated -- disciplined restriction, opposite of spectacle,
   not kinetic-type as spectacle but as IntersectionObserver trigger.
   IntersectionObserver` threshold: 0.5 -- single trigger per step.
   Scroll prompt: animated chevron (IBM Plex Mono "↓") pulses at bottom-center.
   Body copy describing what the platform does (or the core tutorial topic).
   Step 00: no CTA, no subheading. Orientation only -- shown terrain.
   Background contour lines appear, scroll prompt prompt: "↓" chevron.
   Interactive elements (dots, links) opacity only. Interaction Specifications:**
   No color changes -- opacity transitions only on interactive elements (dots, links).
   ============================================================ */

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

html {
    font-size: 16px;
    background: #0A0A0B;
    color: #F0F0F2;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    background: #0A0A0B;
    color: #F0F0F2;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ── Scroll Container ─────────────────────────────────────── */
#scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

/* ── Step Sections ─────────────────────────────────────────── */
.step {
    position: relative;
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ── Left Rail Navigation ─────────────────────────────────── */
#dot-nav {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.dot-wrap {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3E3E46;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background: #4ECDC4;
    transform: scale(1.4);
}

.dot-label {
    position: absolute;
    left: 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7A7A88;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

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

.dot-wrap:hover .dot {
    opacity: 1;
}

/* ── Hero Section (Step 00) ──────────────────────────────── */
#step-00 {
    position: relative;
    background: #0A0A0B;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-mountain {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-contours {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.contour-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.contour-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

/* Ridge canvas overlay */
#ridge-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Hero identity — lower-left */
.hero-identity {
    position: absolute;
    bottom: 80px;
    left: 60px;
    z-index: 5;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #F0F0F2;
    line-height: 1;
    overflow: hidden;
}

/* Cyan accent rule below hero identity */
.cyan-rule {
    position: absolute;
    bottom: 72px;
    left: 0;
    right: 0;
    height: 1px;
    background: #4ECDC4;
    z-index: 4;
    transform-origin: left center;
    transform: scaleX(0);
    animation: ruleExpand 0.8s cubic-bezier(0.16, 1, 0.3, 1) 2.6s forwards;
}

@keyframes ruleExpand {
    to { transform: scaleX(1); }
}

/* Top cyan rule on step 01 */
.cyan-top-rule {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #4ECDC4;
    z-index: 4;
}

/* Scroll prompt */
.scroll-prompt {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.scroll-arrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 18px;
    color: #7A7A88;
    display: block;
    animation: arrowPulse 1.6s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(4px); }
}

/* ── Step Labels & Mono ──────────────────────────────────── */
.mono-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7A7A88;
}

.step-label {
    margin-bottom: 8px;
    display: block;
}

.step-label-inline {
    display: block;
    margin-bottom: 12px;
}

/* ── Step Grid Layout ─────────────────────────────────────── */
.step-grid {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0 40px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 60px 0 80px;
    height: 100%;
    align-items: center;
}

/* ── Watermark Numerals ─────────────────────────────────── */
.watermark-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 140px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(240, 240, 242, 0.07);
    line-height: 1;
    position: absolute;
    top: 50%;
    left: 60px;
    transform: translateY(-50%);
    user-select: none;
    pointer-events: none;
    z-index: 1;
}

.step-left {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 8px;
}

.step-right {
    position: relative;
    z-index: 3;
    padding-left: 20px;
    border-left: 1px solid #2A2A2E;
    max-width: 560px;
}

/* ── Kinetic Headings ────────────────────────────────────── */
.step-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #F0F0F2;
    line-height: 1.05;
    margin-bottom: 24px;
    overflow: hidden;
}

.complete-heading {
    font-size: 48px;
}

/* Each char span within kinetic heading */
.kinetic-heading .char {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.kinetic-heading .char-inner {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}

.kinetic-heading.animated .char-inner {
    animation: charRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes charRise {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hero title immediately visible after small delay */
#hero-title .char-inner {
    transform: translateY(0);
    opacity: 1;
}

/* ── Body Text ───────────────────────────────────────────── */
.body-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 15px; /* 15px/1.75 body spec */
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: #F0F0F2;
    margin-bottom: 20px;
}

/* ── Pull Quote (Step 03) ────────────────────────────────── */
.pull-quote {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #4ECDC4;
    line-height: 1.2;
    margin-bottom: 28px;
    overflow: visible;
}

.content-rule {
    border: none;
    border-top: 1px solid #2A2A2E;
    margin-bottom: 24px;
}

/* ── Diagram Card (Step 02) ─────────────────────────────── */
.diagram-card {
    background: #141416;
    border: 1px solid #2A2A2E;
    padding: 24px;
    margin-top: 8px;
}

.diagram-header {
    margin-bottom: 16px;
    color: #7A7A88;
}

.diagram-content {
    width: 100%;
}

/* ── Spec Table (Step 04) ───────────────────────────────── */
.spec-table {
    margin-top: 16px;
    width: 100%;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
}

.spec-header {
    padding: 6px 12px;
    border-bottom: 1px solid #2A2A2E;
}

.spec-header .spec-key,
.spec-header .spec-val {
    color: #7A7A88;
    font-size: 11px;
}

.spec-alt {
    background: #141416;
}

.spec-key {
    color: #7A7A88;
    font-weight: 400;
}

.spec-val {
    color: #F0F0F2;
    font-weight: 400;
    text-align: right;
}

/* ── Step Indicator Trail Marker ───────────────────────── */
.step-indicator {
    width: 24px;
    height: 24px;
    margin-top: 4px;
}

.trail-marker {
    transition: stroke-dashoffset 0.4s ease;
}

.trail-marker.filled {
    stroke-dashoffset: 0;
}

/* ── CTA Block (Step 05) ──────────────────────────────── */
.cta-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
}

.cta-link {
    color: #F0F0F2;
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    display: inline-block;
}

.cta-link:hover {
    opacity: 1;
}

/* ── Footer Strip ────────────────────────────────────── */
#footer-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    border-top: 1px solid #2A2A2E;
    z-index: 10;
    background: #0A0A0B;
}

.footer-left,
.footer-center,
.footer-right {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7A7A88;
}

/* ── Horizontal rules between step blocks ──────────────── */
.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 60px;
    right: 60px;
    height: 1px;
    background: #2A2A2E;
    z-index: 4;
}

#step-00::before {
    display: none;
}

/* ── Complete grid slightly adjusted ──────────────────── */
.complete-grid {
    padding-bottom: 48px;
}

/* ── Responsive: tablet/mobile fallback ──────────────── */
@media (max-width: 768px) {
    .step-grid {
        grid-template-columns: 1fr;
        padding: 0 32px;
        gap: 24px;
    }

    .watermark-num {
        font-size: 80px;
        left: 16px;
    }

    .step-right {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #2A2A2E;
        padding-top: 20px;
    }

    .step-heading {
        font-size: 28px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-identity {
        left: 32px;
        bottom: 60px;
    }

    #dot-nav {
        left: 8px;
    }

    #footer-strip {
        padding: 0 24px;
    }
}
