/* mujun.work — Muji-inspired Emptiness */

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

:root {
    --paper: #f7f3ed;
    --warm-white: #ebe5db;
    --sand: #d4c9b8;
    --earth-light: #b5836a;
    --earth: #8b7355;
    --bark: #5c4a3a;
    --charcoal: #2c2824;
}

body {
    background: var(--paper);
    color: var(--charcoal);
    font-family: 'Source Serif 4', serif;
    font-size: 18px;
    line-height: 1.9;
    overflow-x: hidden;
}

/* Paper grain overlay */
.noise-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Section base */
.section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    max-width: 55%;
    margin: 0 auto;
}

/* Section labels */
.section-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--earth);
    margin-bottom: 48px;
    align-self: flex-start;
}

/* Threshold Section */
#threshold {
    justify-content: center;
    align-items: center;
    position: relative;
}

.threshold-line {
    width: 0;
    height: 1px;
    background: var(--bark);
    transition: width 1.2s ease-in-out;
    margin-bottom: 32px;
}

.threshold-line.visible {
    width: 60%;
}

.threshold-content {
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease-out 0.3s;
}

.threshold-content.visible {
    opacity: 1;
}

.site-name {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--charcoal);
    margin-bottom: 32px;
}

/* Ensou Circle */
.ensou {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.ensou-svg {
    width: 100%;
    height: 100%;
}

.ensou-circle {
    transition: stroke-dashoffset 2s ease-in-out;
}

.ensou-circle.drawn {
    stroke-dashoffset: 25;
}

/* Statement Section */
#statement {
    min-height: 80vh;
}

.statement-content {
    text-align: center;
}

.statement-text {
    font-family: 'Source Serif 4', serif;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.statement-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Work Grid: Empty Squares */
#work-grid {
    min-height: auto;
    padding: 120px 24px;
}

.empty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

.empty-square {
    aspect-ratio: 1;
    border: 1px solid var(--sand);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 12px;
    transition: border-color 0.6s ease;
    position: relative;
}

.empty-square.large {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.empty-square:hover {
    border-color: var(--bark);
}

.square-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--earth);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.empty-square:hover .square-label {
    opacity: 1;
}

/* Principles */
#principles {
    min-height: auto;
    padding: 120px 24px;
}

.principles-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.principle {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.principle-number {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--earth);
    display: block;
    margin-bottom: 8px;
}

.principle-rule {
    border: none;
    height: 1px;
    background: var(--sand);
    margin-bottom: 12px;
}

.principle-text {
    font-family: 'Source Serif 4', serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--charcoal);
    line-height: 1.9;
    max-width: 480px;
}

/* Contact */
#contact {
    min-height: 60vh;
}

.contact-content {
    text-align: center;
}

.contact-text {
    font-family: 'Source Serif 4', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--bark);
    margin-bottom: 16px;
}

.contact-link {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--charcoal);
    text-decoration: none;
    border-bottom: 1px solid var(--sand);
    padding-bottom: 2px;
    transition: border-color 0.3s;
}

.contact-link:hover {
    border-bottom-color: var(--charcoal);
}

/* Footer */
#site-footer {
    padding: 40px 24px;
    max-width: 55%;
    margin: 0 auto;
}

.footer-rule {
    border: none;
    height: 1px;
    background: var(--sand);
    margin-bottom: 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--earth);
}

.footer-copy {
    font-family: 'Source Serif 4', serif;
    font-size: 0.78rem;
    font-style: italic;
    color: var(--earth);
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        max-width: 85%;
    }

    #site-footer {
        max-width: 85%;
    }

    .empty-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .empty-square.large {
        grid-column: span 2;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
