/* ============================================================
   martiallaw.wiki - Zen Archive Styles
   ============================================================ */

/* --- Design Palette --- */
:root {
    --near-black: #2A2A2A;
    --dark-grey: #4A4A4A;
    --zen-grey: #7A7A72;
    --aurora-deep: #7AAAC0;
    --muted-blue: #8A9AAA;
    --aurora-light: #AAC8D8;
    --sand: #C8C0B0;
    --warm-sand: #D8D0C0;
    --zen-white: #F8F6F2;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400;
    color: var(--dark-grey);
    background-color: var(--zen-white);
    line-height: 1.85;
    overflow-x: hidden;
    position: relative;
}

/* --- Raked Sand Background --- */
#raked-sand {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.5s ease;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 11px,
            #C8C0B0 11px,
            #C8C0B0 12px
        );
    background-size: 100% 13px;
}

#raked-sand.visible {
    opacity: 0.18;
}

/* --- Aurora Light Band --- */
#aurora-band {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(
        180deg,
        rgba(122, 170, 192, 0.08) 0%,
        rgba(170, 200, 216, 0.04) 60%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}

.hero-inner {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease 0.5s, transform 1.2s ease 0.5s;
}

.hero-inner.visible {
    opacity: 1;
    transform: translateY(0);
}

#hero-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    color: var(--near-black);
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

#brushstroke-divider {
    width: clamp(180px, 30vw, 400px);
    margin: 0 auto 1.5rem;
}

#brushstroke-divider svg {
    width: 100%;
    height: auto;
}

#hero-subtitle {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: var(--zen-grey);
    letter-spacing: 0.08em;
}

/* --- Knowledge Garden Section --- */
#knowledge-garden {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Section Headers (Stone Containers) --- */
.section-header {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.stone-container {
    background: linear-gradient(135deg, #D8D0C0 0%, #C8C0B0 100%);
    padding: 0.8rem 2.5rem;
    border-radius: 40% 55% 45% 50% / 55% 45% 50% 40%;
    position: relative;
}

.stone-container h2 {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--near-black);
    white-space: nowrap;
}

/* --- Watercolor Wash Backgrounds --- */
.watercolor-wash {
    position: absolute;
    top: 0;
    left: -5%;
    width: 110%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    border-radius: 50% 50% 50% 50% / 30% 30% 30% 30%;
}

.wash-blue {
    background: radial-gradient(
        ellipse at 30% 40%,
        rgba(122, 170, 192, 0.04) 0%,
        rgba(170, 200, 216, 0.03) 40%,
        transparent 70%
    );
}

.wash-grey {
    background: radial-gradient(
        ellipse at 60% 50%,
        rgba(122, 122, 114, 0.04) 0%,
        rgba(200, 192, 176, 0.03) 40%,
        transparent 70%
    );
}

/* --- Card Grid --- */
#card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* --- Knowledge Cards --- */
.knowledge-card {
    background: var(--zen-white);
    border: 1px solid var(--sand);
    border-radius: 0;
    padding: 0;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    perspective: 800px;
    opacity: 0;
    transform: translateY(30px);
}

.knowledge-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.knowledge-card:hover {
    box-shadow: 0 8px 30px rgba(42, 42, 42, 0.06);
}

.card-inner {
    padding: 2rem;
}

.card-category {
    display: inline-block;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--muted-blue);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.knowledge-card h3 {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--near-black);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.knowledge-card p {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: var(--dark-grey);
    line-height: 1.85;
    margin-bottom: 1rem;
}

.card-date {
    display: block;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--zen-grey);
    padding-top: 0.75rem;
    border-top: 1px solid var(--sand);
}

/* --- Brushstroke Section Divider --- */
.brushstroke-section-divider {
    position: relative;
    z-index: 2;
    width: clamp(300px, 50vw, 800px);
    margin: 0 auto;
    padding: 2rem 0;
}

.brushstroke-section-divider svg {
    width: 100%;
    height: auto;
}

/* --- Contemplation Section --- */
#timeline-section {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem 6rem;
    max-width: 800px;
    margin: 0 auto;
}

#contemplation-content {
    text-align: center;
}

#zen-quote {
    margin: 0 auto 3rem;
    max-width: 600px;
    padding: 2rem;
    border-left: none;
    position: relative;
}

#zen-quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--sand);
}

#zen-quote p {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: var(--near-black);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-style: italic;
}

#zen-quote cite {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--zen-grey);
    font-style: normal;
    letter-spacing: 0.05em;
}

#reflection-text {
    max-width: 600px;
    margin: 0 auto;
}

#reflection-text p {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: var(--dark-grey);
    line-height: 1.85;
    margin-bottom: 1.5rem;
    text-align: left;
}

/* --- Footer --- */
#site-footer {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem 3rem;
    text-align: center;
}

.footer-inner {
    max-width: 400px;
    margin: 0 auto;
}

.footer-brushstroke {
    width: 200px;
    margin: 0 auto 1.5rem;
}

.footer-brushstroke svg {
    width: 100%;
    height: auto;
}

.footer-domain {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: var(--near-black);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.footer-note {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--zen-grey);
    letter-spacing: 0.05em;
}

/* --- Responsive --- */
@media (max-width: 960px) {
    #card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 600px) {
    #card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #hero-title {
        letter-spacing: 0.08em;
    }

    .stone-container {
        padding: 0.6rem 1.8rem;
    }

    #knowledge-garden {
        padding: 3rem 1.2rem 4rem;
    }

    #timeline-section {
        padding: 3rem 1.2rem 4rem;
    }
}
