/* =========================================================
   계엄령.com — Editorial · Forest-Green · Rounded-Sans
   Palette:
     Deep Forest  #0F2417
     Forest       #1A4028
     Verdigris    #4A8B6B
     Sage Mist    #A8C4A8
     Warm Paper   #F0EDE7
     Ash Text     #3A3A38
     Copper Trace #8B5E3C
   ========================================================= */

:root {
    --deep-forest:  #0F2417;
    --forest:       #1A4028;
    --verdigris:    #4A8B6B;
    --sage-mist:    #A8C4A8;
    --warm-paper:   #F0EDE7;
    --ash-text:     #3A3A38;
    --copper-trace: #8B5E3C;

    --font-display: "Quicksand", "Inter", system-ui, sans-serif;
    --font-korean: "Noto Sans KR", "Quicksand", system-ui, sans-serif;
    --font-body: "Nunito Sans", "Inter", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--warm-paper);
    color: var(--ash-text);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

p {
    margin: 0 0 1.4em;
}

p em {
    font-style: italic;
    color: var(--forest);
}

/* =====================================================
   HERO
   ===================================================== */

.hero {
    position: relative;
    min-height: 100vh;
    background: var(--deep-forest);
    color: var(--warm-paper);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6vh 6vw;
    overflow: hidden;
}

.hero::before {
    /* subtle paper-grain via radial gradient overlay */
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 20% 15%, rgba(74,139,107,0.10), transparent 55%),
      radial-gradient(circle at 80% 85%, rgba(168,196,168,0.06), transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.6rem;
    transform: perspective(1000px) rotateY(-90deg);
    opacity: 0;
    transform-origin: center center;
    transition:
      transform 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
      opacity   600ms ease;
    will-change: transform, opacity;
}

.hero-content.revealed {
    transform: perspective(1000px) rotateY(0deg);
    opacity: 1;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sage-mist);
    margin: 0;
    opacity: 0.85;
}

.hero-title {
    font-family: var(--font-korean);
    font-weight: 900;
    font-size: clamp(6rem, 18vw, 14rem);
    line-height: 0.92;
    letter-spacing: -0.02em;
    color: var(--warm-paper);
    margin: 0;
    text-shadow: 0 0 60px rgba(74,139,107,0.18);
}

.hero-subtitle {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    line-height: 1.55;
    color: var(--sage-mist);
    max-width: 56ch;
    margin: 0 auto;
}

.hero-vector {
    width: 100%;
    max-width: 1100px;
    margin-top: 1.2rem;
}

.hero-vector svg {
    width: 100%;
    height: auto;
    max-height: 38vh;
    display: block;
}

.hero-meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sage-mist);
    opacity: 0.75;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.hero-meta .meta-divider {
    color: var(--verdigris);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2.4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
    transition: opacity 800ms ease 1100ms;
}

.hero-content.revealed ~ .hero-scroll-indicator {
    opacity: 0.85;
}

.scroll-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sage-mist);
}

.scroll-line {
    display: block;
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, var(--sage-mist), transparent);
    animation: scroll-pulse 2.4s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { transform: scaleY(1); opacity: 0.85; }
    50%      { transform: scaleY(1.4); opacity: 0.4; }
}

/* =====================================================
   SECTION DIVIDERS
   ===================================================== */

.section-divider {
    background: var(--warm-paper);
    padding: 3rem 0;
    display: flex;
    justify-content: center;
}

.section-divider-dark {
    background: var(--warm-paper);
}

.section-divider svg {
    width: 60%;
    max-width: 720px;
    height: auto;
}

/* =====================================================
   SECTION HEADER (shared)
   ===================================================== */

.section-header {
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--verdigris);
    margin-bottom: 1rem;
}

.section-tag-light {
    color: var(--sage-mist);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--forest);
    margin: 0;
}

/* =====================================================
   SECTION 2 — CONTEXT
   ===================================================== */

.context {
    background: var(--warm-paper);
    padding: 6rem 6vw 6rem;
}

.context-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.context-grid {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: 5rem;
    align-items: start;
}

.context-col p {
    color: var(--ash-text);
}

.context-col-primary .lead {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.25rem, 1.9vw, 1.55rem);
    line-height: 1.55;
    color: var(--forest);
    margin-bottom: 2rem;
}

.context-col-primary .lead em {
    font-style: italic;
    color: var(--copper-trace);
    font-weight: 600;
}

.inline-divider {
    margin: 2.4rem 0;
    display: flex;
    justify-content: flex-start;
}

.inline-divider svg {
    width: 60%;
    max-width: 360px;
    height: auto;
}

.context-col-aside {
    position: relative;
    padding-left: 2.5rem;
    border-left: 1px solid rgba(74,139,107,0.35);
}

.context-vector {
    margin-bottom: 2rem;
}

.context-vector svg {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
}

.aside-record {
    margin: 0 0 2rem;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem 0;
}

.aside-record dt {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--verdigris);
    margin-top: 0.6rem;
}

.aside-record dt:first-of-type {
    margin-top: 0;
}

.aside-record dd {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--forest);
    font-size: 1.05rem;
    line-height: 1.4;
}

.aside-note {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.7;
    letter-spacing: 0.04em;
    color: var(--ash-text);
    opacity: 0.8;
    border-top: 1px solid rgba(74,139,107,0.3);
    padding-top: 1.2rem;
    margin: 0;
}

/* =====================================================
   SECTION 3 — ANALYSIS (narrow column)
   ===================================================== */

.analysis {
    position: relative;
    background: var(--warm-paper);
    padding: 6rem 0 7rem;
    overflow: hidden;
}

.analysis-inner {
    max-width: 50ch;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.analysis-inner .section-header {
    margin-bottom: 3.2rem;
}

.analysis-inner p {
    color: var(--ash-text);
    margin-bottom: 1.6em;
}

.pullquote {
    position: relative;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.25;
    color: var(--verdigris);
    margin: 3rem -4rem 3rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(74,139,107,0.4);
    border-bottom: 1px solid rgba(74,139,107,0.4);
    quotes: none;
}

.pullquote-secondary {
    color: var(--forest);
    font-size: clamp(1.5rem, 2.8vw, 2.4rem);
}

.quote-mark {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--copper-trace);
    font-size: 1.4em;
    line-height: 0;
    vertical-align: -0.18em;
    padding-right: 0.05em;
}

.quote-mark-close {
    padding-right: 0;
    padding-left: 0.05em;
}

.analysis-coda {
    margin-top: 3rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--forest);
    border-top: 1px solid rgba(74,139,107,0.3);
    padding-top: 1.6rem;
}

.coda-marker {
    color: var(--copper-trace);
    font-weight: 700;
    margin-right: 0.4em;
}

/* margin decorative motifs */
.analysis-margin {
    position: absolute;
    top: 8rem;
    width: 8rem;
    height: 14rem;
    z-index: 1;
    opacity: 0.85;
    pointer-events: none;
}

.analysis-margin-left {
    left: 6vw;
}

.analysis-margin-right {
    right: 6vw;
    top: 22rem;
}

.margin-art {
    width: 100%;
    height: 100%;
}

/* =====================================================
   SECTION 4 — RECORD (closing)
   ===================================================== */

.record {
    background: var(--deep-forest);
    color: var(--warm-paper);
    padding: 7rem 6vw 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.record::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, rgba(74,139,107,0.10), transparent 60%);
    pointer-events: none;
}

.record-inner {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
}

.record-coda {
    font-family: var(--font-korean);
    font-weight: 900;
    font-size: clamp(4rem, 9vw, 8rem);
    line-height: 1;
    color: var(--warm-paper);
    margin: 0.6rem 0 0.4rem;
    letter-spacing: -0.01em;
}

.record-text {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    color: var(--sage-mist);
    max-width: 48ch;
    margin: 0 0 1.4rem;
}

.record-vector {
    width: 100%;
    max-width: 800px;
    margin: 1rem 0 2rem;
}

.record-vector svg {
    width: 100%;
    height: auto;
    display: block;
}

.record-footer {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sage-mist);
    opacity: 0.75;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    justify-content: center;
    border-top: 1px solid rgba(74,139,107,0.35);
    padding-top: 1.6rem;
    width: 100%;
    max-width: 720px;
}

.record-footer .meta-divider {
    color: var(--verdigris);
}

/* =====================================================
   VECTOR-ART STROKE-DRAW ENTRANCE
   ===================================================== */

.vector-paths line,
.vector-paths path,
.vector-paths rect,
.vector-paths circle {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.vector-art.in-view .vector-paths line,
.vector-art.in-view .vector-paths path,
.vector-art.in-view .vector-paths rect,
.vector-art.in-view .vector-paths circle,
.hero-content.revealed .vector-paths line,
.hero-content.revealed .vector-paths path,
.hero-content.revealed .vector-paths rect,
.hero-content.revealed .vector-paths circle {
    stroke-dashoffset: 0;
}

.vector-nodes circle {
    opacity: 0;
    transition: opacity 600ms ease 800ms;
}

.vector-art.in-view .vector-nodes circle {
    opacity: 1;
}

/* hero-internal vector animates with hero reveal */
.hero-content .vector-paths line,
.hero-content .vector-paths path,
.hero-content .vector-paths rect,
.hero-content .vector-paths circle {
    transition-delay: 400ms;
}

/* =====================================================
   SECTION REVEAL (fade up on scroll)
   ===================================================== */

.section-header,
.context-col,
.analysis-inner > p,
.analysis-inner .pullquote,
.record-inner > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 800ms ease, transform 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.is-visible .section-header,
.is-visible .context-col,
.is-visible.analysis-inner > p,
.is-visible.analysis-inner .pullquote,
.is-visible.record-inner > * {
    opacity: 1;
    transform: translateY(0);
}

/* When the SECTION itself receives is-visible, reveal its inner blocks */
.context.is-visible .section-header,
.context.is-visible .context-col,
.analysis.is-visible .section-header,
.analysis.is-visible .analysis-inner > p,
.analysis.is-visible .analysis-inner .pullquote,
.record.is-visible .record-inner > * {
    opacity: 1;
    transform: translateY(0);
}

/* stagger inside record */
.record.is-visible .record-inner > *:nth-child(1) { transition-delay: 0ms; }
.record.is-visible .record-inner > *:nth-child(2) { transition-delay: 80ms; }
.record.is-visible .record-inner > *:nth-child(3) { transition-delay: 160ms; }
.record.is-visible .record-inner > *:nth-child(4) { transition-delay: 240ms; }
.record.is-visible .record-inner > *:nth-child(5) { transition-delay: 320ms; }

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 960px) {
    .context-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .context-col-aside {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(74,139,107,0.35);
        padding-top: 2.5rem;
    }
    .analysis-margin {
        display: none;
    }
    .pullquote {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 4vh 5vw;
    }
    .hero-meta,
    .record-footer {
        font-size: 0.7rem;
        letter-spacing: 0.12em;
    }
    .context,
    .analysis,
    .record {
        padding-left: 5vw;
        padding-right: 5vw;
    }
    .analysis-inner {
        padding: 0 1rem;
    }
}
