/* ============================================================
   maljosim.com - Sci-Fi Transmission Verification Chamber
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #FFF8ED;
    color: #2D2014;
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    overflow-x: hidden;
}

/* --- Hero / Intake Port --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FFF8ED;
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    width: 90%;
    padding: 2rem 1rem;
}

.hero-title {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    font-size: clamp(4rem, 10vw, 8rem);
    color: #2D2014;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInTitle 600ms ease-out 200ms forwards;
}

.hero-subtitle {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: #8B6914;
    font-feature-settings: 'smcp' 1;
    margin-top: 0.5rem;
    opacity: 0;
    animation: fadeIn 500ms ease-out 500ms forwards;
}

/* Hero sine wave */
.hero-wave {
    display: block;
    width: 80%;
    height: 80px;
    margin: 2rem auto 0;
}

.hero-wave-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawWave 2s ease-out 800ms forwards;
}

/* Botanical specimen wave */
.botanical-specimen {
    display: block;
    width: 80%;
    max-width: 700px;
    height: auto;
    margin: 2rem auto 0;
}

.specimen-wave {
    stroke-dasharray: 1100;
    stroke-dashoffset: 1100;
    animation: drawWave 2s ease-out 1200ms forwards;
}

/* Botanical annotations */
.botanical-specimen .annotation-dot,
.botanical-specimen .annotation-line,
.botanical-specimen .annotation-label {
    opacity: 0;
}

.botanical-specimen text {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 11px;
}

.annotation-1 {
    animation: fadeIn 300ms ease-out 2200ms forwards;
}
.annotation-2 {
    animation: fadeIn 300ms ease-out 2400ms forwards;
}
.annotation-3 {
    animation: fadeIn 300ms ease-out 2600ms forwards;
}
.annotation-4 {
    animation: fadeIn 300ms ease-out 2800ms forwards;
}

/* --- Pipeline Section --- */
.pipeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem 4rem 4rem;
}

/* Vertical pipeline connector */
.pipeline-line {
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #C4B8A4;
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.5s ease-out;
}

.pipeline-line.visible {
    transform: scaleY(1);
}

/* Stage blocks */
.stage {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: flex-start;
    padding: 4rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

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

/* Pipeline node circles */
.stage-node {
    position: absolute;
    left: -2.4rem;
    top: 4.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #8B6914;
    border: 2px solid #FFF8ED;
    z-index: 2;
}

.stage-content {
    width: 100%;
}

.stage-number {
    display: block;
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: #C4B8A4;
    letter-spacing: 0.15em;
    margin-bottom: 0.25rem;
    opacity: 0;
    transition: opacity 200ms ease-out;
}

.stage.visible .stage-number {
    opacity: 1;
}

.stage-header {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    font-feature-settings: 'smcp' 1;
    color: #2D2014;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    opacity: 0;
    transition: opacity 200ms ease-out 200ms;
}

.stage.visible .stage-header {
    opacity: 1;
}

/* Stage wave SVGs */
.stage-wave {
    display: block;
    width: 100%;
    max-width: 700px;
    height: 100px;
    margin-bottom: 1.5rem;
}

.stage-wave-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 1.5s ease-out 400ms;
}

.stage.visible .stage-wave-path {
    stroke-dashoffset: 0;
}

/* Wave annotation elements */
.wave-dot,
.wave-anno-line,
.wave-anno-text {
    transition: opacity 300ms ease-out 1800ms;
}

.stage.visible .wave-dot,
.stage.visible .wave-anno-line,
.stage.visible .wave-anno-text {
    opacity: 1 !important;
}

.wave-anno-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
}

.stage-body {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    color: #2D2014;
    opacity: 0;
    transition: opacity 600ms ease-out 600ms;
}

.stage.visible .stage-body {
    opacity: 1;
}

/* --- Verification Seal Section --- */
.seal-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background-color: #FFF8ED;
    position: relative;
}

.seal-container {
    position: relative;
    width: 260px;
    height: 260px;
}

.verification-seal {
    width: 260px;
    height: 260px;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 600ms ease-out, transform 600ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.seal-section.visible .verification-seal {
    opacity: 1;
    transform: scale(1);
    animation: slowRotate 120s linear 600ms infinite;
}

.seal-outer-ring {
    stroke-dasharray: 755;
    stroke-dashoffset: 755;
    transition: stroke-dashoffset 1s ease-out;
}

.seal-section.visible .seal-outer-ring {
    stroke-dashoffset: 0;
}

.seal-inner-ring {
    stroke-dasharray: 630;
    stroke-dashoffset: 630;
    transition: stroke-dashoffset 1s ease-out 200ms;
}

.seal-section.visible .seal-inner-ring {
    stroke-dashoffset: 0;
}

.seal-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 500;
    font-feature-settings: 'smcp' 1;
    letter-spacing: 0.15em;
    opacity: 0;
    transition: opacity 500ms ease-out 1500ms;
}

.seal-section.visible .seal-text {
    opacity: 1;
}

/* Orbiting labels around the seal */
.seal-orbit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.orbit-label {
    position: absolute;
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 0.75rem;
    color: #8B6914;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 400ms ease-out;
}

.seal-section.visible .orbit-label {
    opacity: 0.7;
}

.orbit-1 {
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    transition-delay: 2000ms;
}

.orbit-2 {
    top: 50%;
    right: -110px;
    transform: translateY(-50%);
    transition-delay: 2200ms;
}

.orbit-3 {
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    transition-delay: 2400ms;
}

.orbit-4 {
    top: 50%;
    left: -100px;
    transform: translateY(-50%);
    transition-delay: 2600ms;
}

/* --- Hover States (Light Amber #D4A84C) --- */
.stage-header:hover {
    color: #D4A84C;
    transition: color 200ms ease-out;
}

.hero-subtitle:hover {
    color: #D4A84C;
    transition: color 200ms ease-out;
}

/* --- Footer / Transmission End --- */
.footer {
    background-color: #2D2014;
    padding: 4rem 2rem;
    text-align: center;
}

.footer-text {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #8B6914;
    margin-bottom: 0.5rem;
}

.footer-sub {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 0.85rem;
    color: #C4B8A4;
}

/* --- Keyframe Animations --- */
@keyframes fadeInTitle {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes drawWave {
    from {
        stroke-dashoffset: 1200;
    }
    to {
        stroke-dashoffset: 0;
    }
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .pipeline {
        padding: 3rem 1.5rem 3rem 3rem;
    }

    .pipeline-line {
        left: 1.5rem;
    }

    .stage-node {
        left: -1.9rem;
    }

    .seal-container {
        width: 200px;
        height: 200px;
    }

    .verification-seal {
        width: 200px;
        height: 200px;
    }

    .orbit-2 {
        right: -90px;
    }

    .orbit-4 {
        left: -80px;
    }
}

@media (max-width: 480px) {
    .pipeline {
        padding: 2rem 1rem 2rem 2.5rem;
    }

    .pipeline-line {
        left: 1rem;
    }

    .stage-node {
        left: -1.8rem;
        width: 10px;
        height: 10px;
    }

    .orbit-label {
        display: none;
    }

    .seal-container {
        width: 180px;
        height: 180px;
    }

    .verification-seal {
        width: 180px;
        height: 180px;
    }
}
