/* ===========================================
   maljosim.com - Goblincore Comment Verifier
   =========================================== */

/* --- CSS Custom Properties --- */
:root {
    --forest-dark: #0A1208;
    --neon-moss: #39FF14;
    --neon-fungi: #C840FF;
    --grain-brown: #3A2818;
    --damp-cream: #D8D0C0;
    --bark-dark: #1A1A10;
    --tropical-coral: #FF6B6B;

    --font-mono: 'Fira Code', monospace;
    --font-body: 'Nunito', sans-serif;
    --font-korean: 'Noto Sans KR', sans-serif;

    --heading-size: clamp(20px, 3vw, 36px);
    --body-size: clamp(14px, 1vw, 17px);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--forest-dark);
    color: var(--damp-cream);
    font-family: var(--font-body);
    font-size: var(--body-size);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* --- Typography --- */
.mono {
    font-family: var(--font-mono);
}

.korean {
    font-family: var(--font-korean);
}

.body-text {
    font-family: var(--font-body);
    font-size: var(--body-size);
    line-height: 1.7;
    color: var(--damp-cream);
}

.neon-green {
    color: var(--neon-moss);
}

.neon-purple {
    color: var(--neon-fungi);
}

.coral {
    color: var(--tropical-coral);
}

.section-heading {
    font-family: var(--font-mono);
    font-size: var(--heading-size);
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--damp-cream);
}

/* --- Grain Overlay --- */
#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.12;
    mix-blend-mode: multiply;
}

#grain-overlay rect {
    fill: var(--grain-brown);
}

/* --- Atmospheric Glows --- */
#atmospheric-glows {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.glow-green {
    background: radial-gradient(circle, var(--neon-moss), transparent 70%);
    opacity: 0.08;
}

.glow-purple {
    background: radial-gradient(circle, var(--neon-fungi), transparent 70%);
    opacity: 0.06;
}

.glow-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    left: 10%;
}

.glow-2 {
    width: 400px;
    height: 400px;
    top: 20%;
    right: 5%;
}

.glow-3 {
    width: 350px;
    height: 350px;
    bottom: 10%;
    left: 30%;
}

.glow-4 {
    width: 450px;
    height: 450px;
    bottom: -50px;
    right: 20%;
}

/* --- Vine Decorations --- */
.vine-decor {
    position: fixed;
    top: 0;
    width: 60px;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#vine-decor-left {
    left: 0;
}

#vine-decor-right {
    right: 0;
}

/* --- Fish Container --- */
#fish-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.tropical-fish {
    position: absolute;
    width: 20px;
    height: 12px;
    opacity: 0;
    animation: fish-swim linear forwards;
}

@keyframes fish-swim {
    0% {
        transform: translateX(-30px) translateY(0px);
        opacity: 0;
    }
    5% {
        opacity: 0.7;
    }
    50% {
        transform: translateX(50vw) translateY(-20px);
    }
    95% {
        opacity: 0.7;
    }
    100% {
        transform: translateX(calc(100vw + 30px)) translateY(5px);
        opacity: 0;
    }
}

@keyframes fish-swim-reverse {
    0% {
        transform: translateX(calc(100vw + 30px)) translateY(0px) scaleX(-1);
        opacity: 0;
    }
    5% {
        opacity: 0.7;
    }
    50% {
        transform: translateX(50vw) translateY(15px) scaleX(-1);
    }
    95% {
        opacity: 0.7;
    }
    100% {
        transform: translateX(-30px) translateY(-10px) scaleX(-1);
        opacity: 0;
    }
}

/* --- Pulse Attention Animation --- */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(57, 255, 20, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(57, 255, 20, 0);
    }
}

.pulse-attention {
    animation: pulse 2s infinite;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 5;
    padding: 2rem;
}

#hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    max-width: 1200px;
    width: 100%;
    padding-left: 5%;
}

#logotype-area {
    flex-shrink: 0;
}

#logotype {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(36px, 6vw, 72px);
    color: var(--neon-moss);
    letter-spacing: -0.02em;
    line-height: 1.1;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--neon-moss);
}

#logotype.typed {
    border-right-color: transparent;
}

#logotype-korean {
    display: block;
    font-family: var(--font-korean);
    font-size: clamp(16px, 2vw, 24px);
    color: var(--neon-fungi);
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#logotype-korean.visible {
    opacity: 1;
}

#purpose-area {
    max-width: 400px;
    position: relative;
    padding-left: 2rem;
}

#purpose-pulse {
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--neon-moss);
}

#purpose-text {
    opacity: 0;
    transition: opacity 1s ease;
}

#purpose-text.visible {
    opacity: 1;
}

#scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--damp-cream);
    opacity: 0.4;
    font-size: 1.5rem;
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* --- Content Blocks (Asymmetric Layout) --- */
.content-block {
    position: relative;
    z-index: 5;
    padding: 4rem 2rem;
}

.block-left {
    margin-left: 5%;
    margin-right: auto;
    max-width: 65%;
}

.block-right {
    margin-left: auto;
    margin-right: 5%;
    max-width: 60%;
}

.block-center {
    margin-left: auto;
    margin-right: auto;
    max-width: 55%;
}

.block-left-wide {
    margin-left: 5%;
    margin-right: auto;
    max-width: 75%;
}

.block-right-narrow {
    margin-left: auto;
    margin-right: 5%;
    max-width: 40%;
}

/* --- About Section --- */
#about .body-text {
    margin-top: 1rem;
}

#about .korean {
    color: var(--neon-fungi);
    font-weight: 700;
}

/* --- How It Works --- */
.steps-list {
    margin-top: 2rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(26, 26, 16, 0.6);
    border-radius: 4px;
    border-left: 2px solid rgba(57, 255, 20, 0.2);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.step-item:hover {
    border-left-color: var(--neon-moss);
    background: rgba(26, 26, 16, 0.8);
}

.step-number {
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 400;
    color: var(--damp-cream);
    margin-bottom: 0.5rem;
}

.step-content .body-text {
    opacity: 0.8;
}

/* --- Verifier UI --- */
#verifier-ui {
    margin-top: 2rem;
}

#comment-input {
    width: 100%;
    min-height: 150px;
    background: var(--bark-dark);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: var(--damp-cream);
    font-family: var(--font-mono);
    font-size: var(--body-size);
    padding: 1.25rem;
    border-radius: 4px;
    resize: vertical;
    outline: none;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    line-height: 1.6;
}

#comment-input::placeholder {
    color: rgba(216, 208, 192, 0.35);
}

#comment-input:focus {
    border-color: var(--neon-moss);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.15), 0 0 30px rgba(57, 255, 20, 0.05);
}

#verify-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.85rem 2rem;
    background: transparent;
    border: 1px solid var(--neon-moss);
    color: var(--neon-moss);
    font-family: var(--font-mono);
    font-size: clamp(14px, 1.2vw, 16px);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease, color 0.3s ease;
}

#verify-btn:hover {
    background: rgba(57, 255, 20, 0.1);
}

#verify-btn:active {
    background: rgba(57, 255, 20, 0.2);
}

.btn-icon {
    font-size: 1.1em;
}

/* --- Result Display --- */
#result-display {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(26, 26, 16, 0.8);
    border-radius: 4px;
    border: 1px solid rgba(57, 255, 20, 0.15);
    opacity: 1;
    transition: opacity 0.5s ease;
}

#result-display.hidden {
    display: none;
}

#result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#result-icon {
    font-size: 1.5rem;
}

#result-label {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 700;
}

#result-details {
    margin-bottom: 1rem;
    opacity: 0.85;
}

#result-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(216, 208, 192, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

#result-bar {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 1s ease-out, background-color 0.5s ease;
}

.result-safe #result-label {
    color: var(--neon-moss);
}

.result-safe #result-bar {
    background: var(--neon-moss);
}

.result-warning #result-label {
    color: #FFD700;
}

.result-warning #result-bar {
    background: #FFD700;
}

.result-toxic #result-label {
    color: var(--tropical-coral);
}

.result-toxic #result-bar {
    background: var(--tropical-coral);
}

/* --- Features --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    padding: 1.5rem;
    background: rgba(26, 26, 16, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(216, 208, 192, 0.08);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(57, 255, 20, 0.2);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 400;
    color: var(--damp-cream);
    margin-bottom: 0.5rem;
}

.feature-card .body-text {
    opacity: 0.75;
    font-size: clamp(13px, 0.9vw, 15px);
}

/* --- Ethos / Quote --- */
#ethos {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

#ethos blockquote {
    font-size: clamp(18px, 2.5vw, 30px);
    font-weight: 400;
    line-height: 1.5;
    color: var(--damp-cream);
}

.attribution {
    margin-top: 1rem;
    opacity: 0.5;
    font-style: italic;
}

/* --- Footer --- */
#site-footer {
    position: relative;
    z-index: 5;
    padding: 3rem 2rem;
    border-top: 1px solid rgba(216, 208, 192, 0.08);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.footer-content .neon-green {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 700;
}

.footer-tagline {
    opacity: 0.5;
    font-size: clamp(12px, 1vw, 14px);
}

.footer-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: clamp(12px, 1vw, 14px);
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--damp-cream);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--neon-moss);
}

.footer-sep {
    color: var(--damp-cream);
    opacity: 0.3;
}

/* --- Scroll Reveal Animation --- */
.content-block {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.content-block.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    #hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
        padding-left: 5%;
        padding-right: 5%;
    }

    #purpose-area {
        max-width: 100%;
    }

    .block-left,
    .block-right,
    .block-center,
    .block-left-wide,
    .block-right-narrow {
        margin-left: 5%;
        margin-right: 5%;
        max-width: 90%;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .vine-decor {
        display: none;
    }
}

@media (max-width: 600px) {
    #hero-content {
        padding-left: 3%;
        padding-right: 3%;
    }

    .block-left,
    .block-right,
    .block-center,
    .block-left-wide,
    .block-right-narrow {
        margin-left: 3%;
        margin-right: 3%;
        max-width: 94%;
        padding: 3rem 1rem;
    }

    .step-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    #ethos blockquote {
        font-size: clamp(16px, 4vw, 24px);
    }
}
