/* ======================================
   계엄령.com - Martial Law Design
   Colors: #1a1a2e, #4a90d9, #f5f0e8, #e8b84b, #6c757d
   Font: Inter
   ====================================== */

:root {
    --deep-base: #1a1a2e;
    --primary-blue: #4a90d9;
    --warm-white: #f5f0e8;
    --accent-gold: #e8b84b;
    --muted-gray: #6c757d;
    --chrome-light: #d4d4d8;
    --chrome-dark: #27272a;
    --glitch-red: #ff3333;
    --glitch-cyan: #00ffff;
    --spring-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #1a1a2e;
    color: #f5f0e8;
    overflow-x: hidden;
    position: relative;
}

/* Bokeh Canvas */
#bokeh-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Organic Blob Shapes */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #4a90d9;
    top: -150px;
    right: -100px;
    animation: blobFloat1 20s ease-in-out infinite;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #e8b84b;
    bottom: 20%;
    left: -100px;
    animation: blobFloat2 25s ease-in-out infinite;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: #4a90d9;
    top: 50%;
    right: 10%;
    animation: blobFloat3 18s ease-in-out infinite;
}

@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    25% { transform: translate(50px, 30px) scale(1.1); border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { transform: translate(-30px, 60px) scale(0.95); border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    75% { transform: translate(20px, -20px) scale(1.05); border-radius: 50% 40% 60% 50% / 30% 70% 40% 60%; }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    33% { transform: translate(40px, -40px) scale(1.08); border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    66% { transform: translate(-20px, 30px) scale(0.92); border-radius: 50% 30% 50% 70% / 60% 40% 60% 40%; }
}

@keyframes blobFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); border-radius: 30% 70% 50% 50% / 50% 50% 70% 30%; }
    50% { transform: translate(-40px, 40px) scale(1.1); border-radius: 70% 30% 50% 50% / 30% 70% 50% 50%; }
}

/* Chrome Surface Treatment */
.chrome-surface {
    background: linear-gradient(135deg, 
        rgba(212, 212, 216, 0.08) 0%, 
        rgba(212, 212, 216, 0.03) 30%, 
        rgba(212, 212, 216, 0.1) 50%, 
        rgba(212, 212, 216, 0.03) 70%, 
        rgba(212, 212, 216, 0.08) 100%);
    border: 1px solid rgba(212, 212, 216, 0.15);
    backdrop-filter: blur(10px);
}

.chrome-text {
    background: linear-gradient(135deg, #d4d4d8 0%, #f5f0e8 25%, #a1a1aa 50%, #f5f0e8 75%, #d4d4d8 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: chromeShine 6s linear infinite;
}

@keyframes chromeShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.chrome-border {
    border: 1px solid rgba(212, 212, 216, 0.2);
    position: relative;
}

.chrome-border::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, rgba(232, 184, 75, 0.3), transparent 40%, transparent 60%, rgba(74, 144, 217, 0.3));
    z-index: -1;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.chrome-border:hover::after {
    opacity: 1;
}

.chrome-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #e8b84b, #d4d4d8, #4a90d9);
    margin: 20px 0;
}

/* Glitch Effect */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch::before {
    color: #ff3333;
    z-index: -1;
}

.glitch::after {
    color: #00ffff;
    z-index: -1;
}

.glitch-active::before,
.glitch:hover::before {
    opacity: 0.8;
    animation: glitchR 0.3s ease-in-out;
}

.glitch-active::after,
.glitch:hover::after {
    opacity: 0.8;
    animation: glitchC 0.3s ease-in-out;
}

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

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

.glitch-text {
    position: relative;
    display: inline-block;
    letter-spacing: 0.3em;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    color: #ff3333;
    animation: glitchTextR 3s infinite;
    clip-path: inset(0 0 65% 0);
}

.glitch-text::after {
    color: #00ffff;
    animation: glitchTextC 3s infinite;
    clip-path: inset(65% 0 0 0);
}

@keyframes glitchTextR {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 1px); }
    94% { transform: translate(2px, -1px); }
    96% { transform: translate(-1px, -1px); }
    98% { transform: translate(1px, 1px); }
}

@keyframes glitchTextC {
    0%, 88%, 100% { transform: translate(0); }
    90% { transform: translate(2px, -1px); }
    93% { transform: translate(-2px, 1px); }
    95% { transform: translate(1px, 1px); }
    97% { transform: translate(-1px, -1px); }
}

/* Art Deco Heading Style */
.art-deco-heading {
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    position: relative;
}

/* Spring Reveal Animation */
.spring-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.6s ease, transform 0.8s var(--spring-ease);
}

.spring-reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ===== HERO SECTION ===== */
#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    text-align: center;
}

.hero-content {
    max-width: 900px;
}

.hero-label {
    display: inline-block;
    padding: 8px 30px;
    margin-bottom: 30px;
    border-radius: 2px;
}

.hero-title {
    margin-bottom: 30px;
    line-height: 1;
}

.title-line {
    display: block;
}

.title-line-1 {
    font-size: clamp(4rem, 12vw, 10rem);
    color: #f5f0e8;
    margin-bottom: 10px;
}

.title-line-2 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.3em;
}

.hero-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.subtitle-bar {
    display: block;
    width: 60px;
    height: 1px;
    background: #e8b84b;
}

.subtitle-text {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: #6c757d;
    text-transform: uppercase;
}

.hero-decree {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    border-radius: 2px;
    background: rgba(26, 26, 46, 0.8);
}

.decree-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e8b84b;
    letter-spacing: 0.1em;
}

.decree-text {
    font-size: 0.9rem;
    font-weight: 300;
    color: #6c757d;
    letter-spacing: 0.05em;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, #e8b84b, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.6); }
}

.scroll-label {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: #6c757d;
    font-weight: 600;
}

/* ===== SECTIONS ===== */
.section {
    position: relative;
    z-index: 1;
    padding: 120px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-dark {
    max-width: 100%;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.5), rgba(26, 26, 46, 0.95), rgba(26, 26, 46, 0.5));
}

.section-dark > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #f5f0e8;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 15px;
}

/* Grid Layout */
.section-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.reverse-grid {
    grid-template-columns: 1.5fr 1fr;
}

/* Deco Ornaments */
.deco-ornament {
    margin-bottom: 20px;
}

.deco-svg {
    width: 80px;
    height: 80px;
}

.deco-svg-wide {
    width: 200px;
    height: 60px;
}

.ornament-center {
    margin-bottom: 20px;
}

/* Content Blocks */
.content-block {
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.offset-block {
    margin-left: 30px;
    border-left: 2px solid #e8b84b;
    background: rgba(232, 184, 75, 0.03);
}

.content-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #d4d4d8;
    font-weight: 300;
}

/* Stats */
.stat-row {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
}

/* ===== TIMELINE ===== */
.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, #e8b84b 10%, #e8b84b 90%, transparent);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 60px;
    width: 50%;
}

.timeline-left {
    padding-right: 60px;
    text-align: right;
    margin-left: 0;
}

.timeline-right {
    padding-left: 60px;
    margin-left: 50%;
}

.timeline-node {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #1a1a2e;
    border: 2px solid #e8b84b;
    border-radius: 50%;
    z-index: 2;
}

.timeline-left .timeline-node {
    right: -8px;
    top: 20px;
}

.timeline-right .timeline-node {
    left: -8px;
    top: 20px;
}

.timeline-card {
    padding: 25px;
    border-radius: 4px;
    width: 100%;
    transition: transform 0.4s var(--spring-ease), box-shadow 0.4s ease;
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(232, 184, 75, 0.1);
}

.timeline-year {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f5f0e8;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.timeline-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #6c757d;
    font-weight: 300;
}

/* ===== MECHANISMS GRID ===== */
.mechanisms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 0 40px;
}

.mechanism-card {
    padding: 35px;
    border-radius: 4px;
    background: rgba(26, 26, 46, 0.8);
    transition: transform 0.4s var(--spring-ease), border-color 0.4s ease;
}

.mechanism-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: #e8b84b;
}

.mechanism-icon {
    margin-bottom: 20px;
}

.mechanism-svg {
    width: 60px;
    height: 60px;
}

.mechanism-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f5f0e8;
    margin-bottom: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.mechanism-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #6c757d;
    font-weight: 300;
}

/* ===== RESISTANCE SECTION ===== */
.resistance-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.candle-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.candle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, #e8b84b, #e8b84b 30%, rgba(232, 184, 75, 0.3) 60%, transparent 70%);
    box-shadow: 0 0 20px rgba(232, 184, 75, 0.5), 0 0 40px rgba(232, 184, 75, 0.2);
    animation: candleFlicker 2s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.candle.lit {
    opacity: 1;
}

@keyframes candleFlicker {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(232, 184, 75, 0.5), 0 0 40px rgba(232, 184, 75, 0.2); }
    25% { transform: scale(1.1); box-shadow: 0 0 25px rgba(232, 184, 75, 0.6), 0 0 50px rgba(232, 184, 75, 0.3); }
    50% { transform: scale(0.95); box-shadow: 0 0 15px rgba(232, 184, 75, 0.4), 0 0 30px rgba(232, 184, 75, 0.15); }
    75% { transform: scale(1.05); box-shadow: 0 0 22px rgba(232, 184, 75, 0.55), 0 0 45px rgba(232, 184, 75, 0.25); }
}

.visual-caption {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-align: center;
}

/* ===== CLOSING / FOOTER ===== */
.section-closing {
    text-align: center;
    padding: 100px 40px;
    border-top: 1px solid rgba(232, 184, 75, 0.2);
}

.closing-content {
    max-width: 700px;
    margin: 0 auto;
}

.deco-svg-footer {
    width: 300px;
    height: 80px;
    margin-bottom: 40px;
}

.closing-quote {
    margin-bottom: 40px;
}

.quote-text {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #f5f0e8;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    font-style: italic;
}

.quote-translation {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.closing-meta {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    border-radius: 2px;
    font-size: 0.85rem;
}

.meta-item {
    color: #6c757d;
    letter-spacing: 0.1em;
    font-weight: 400;
}

.meta-divider {
    color: rgba(212, 212, 216, 0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .section-grid,
    .reverse-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .mechanisms-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        margin-left: 0;
        text-align: left;
    }

    .timeline-right {
        margin-left: 0;
    }

    .timeline-left .timeline-node,
    .timeline-right .timeline-node {
        left: 12px;
        right: auto;
    }

    .section {
        padding: 80px 20px;
    }

    .stat-row {
        flex-direction: column;
        gap: 20px;
    }

    .offset-block {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .hero-decree {
        flex-direction: column;
        gap: 8px;
    }

    .candle-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .candle {
        width: 22px;
        height: 22px;
    }
}
