/* ============================================================
   gunsul.studio — japanese-minimal × bauhaus
   palette: #f7f5f0 #1a1715 #c4704b #d4cfc7 #8a8279 #e8e3d8 #2a2520
   fonts: Cormorant Garamond, Noto Sans KR, Karla
   ============================================================ */

:root {
    --gallery-white: #f7f5f0;
    --sumi-ink: #1a1715;
    --terracotta: #c4704b;
    --concrete-fog: #d4cfc7;
    --steel-warm: #8a8279;
    --blueprint-wash: #e8e3d8;
    --beam-shadow: #2a2520;

    --serif: "Cormorant Garamond", "Noto Serif KR", Georgia, serif;
    --sans: "Noto Sans KR", "Inter", system-ui, -apple-system, sans-serif;
    --label: "Karla", "Space Grotesk", "Inter", system-ui, sans-serif;

    --module-max: 640px;
    --section-gap: 200px;
    --module-pad: 48px;
    --golden: 1.618;
}

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

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

body {
    background: var(--gallery-white);
    color: var(--sumi-ink);
    font-family: var(--sans);
    font-weight: 300;
    line-height: 2.0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ===== Loader (fade-in for the whole page) ===== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--gallery-white);
    z-index: 9999;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1200ms ease 200ms;
}
.loader.is-done {
    opacity: 0;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 1000ms ease, transform 1000ms ease;
}
.nav.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--label);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 400;
}

.nav-logo {
    color: var(--sumi-ink);
    text-decoration: none;
    letter-spacing: 0.12em;
    transition: color 400ms ease;
}
.nav-logo:hover {
    color: var(--terracotta);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 48px;
}

.nav-list a {
    color: var(--sumi-ink);
    text-decoration: none;
    letter-spacing: 0.14em;
    position: relative;
    transition: color 400ms ease;
}
.nav-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1px;
    background: var(--terracotta);
    transition: width 500ms ease;
}
.nav-list a:hover {
    color: var(--terracotta);
}
.nav-list a:hover::after {
    width: 100%;
}

/* ===== Section base ===== */
main {
    padding-top: 120px;
}

.section {
    padding: var(--section-gap) 64px;
    position: relative;
}

.section-head {
    max-width: var(--module-max);
    margin: 0 auto calc(var(--section-gap) / 2.5);
    text-align: center;
}

.section-title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.06em;
    line-height: 1.2;
    margin-top: 24px;
    color: var(--sumi-ink);
}

/* ===== Caption / labels ===== */
.caption {
    font-family: var(--label);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--steel-warm);
    line-height: 1.4;
}

/* ===== Module (the gallery plinth block) ===== */
.module {
    position: relative;
    background: var(--gallery-white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    padding: var(--module-pad);
    max-width: var(--module-max);
    margin: 0 auto;
    list-style: none;
}

.module-wide {
    max-width: calc(var(--module-max) * 1.15);
}

.module-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--terracotta);
    transition: width 600ms ease 200ms;
}
.module.is-revealed .module-border {
    width: 100%;
}

.module-heading {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: 0.04em;
    line-height: 1.3;
    margin-top: 16px;
    margin-bottom: 32px;
    color: var(--sumi-ink);
}

.module-heading-sm {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    line-height: 1.35;
    margin-top: 12px;
    margin-bottom: 24px;
    color: var(--sumi-ink);
}

.module-body {
    font-size: 16px;
    line-height: 2.0;
    font-weight: 300;
    color: var(--sumi-ink);
    max-width: 65ch;
    margin-bottom: 24px;
}
.module-body:last-child {
    margin-bottom: 0;
}

/* ===== Reveal animation ===== */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 800ms ease, transform 800ms ease;
}
.reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Ma divider (breathing point) ===== */
.ma-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 80px 64px;
    color: var(--concrete-fog);
}
.ma-line {
    display: block;
    width: 40vw;
    max-width: 480px;
    height: 1px;
    background: var(--concrete-fog);
}
.ma-plus {
    font-family: var(--label);
    font-size: 14px;
    color: var(--concrete-fog);
    user-select: none;
}

/* ===== Korean margin terms ===== */
.kr-margin {
    position: absolute;
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(3rem, 7vw, 6rem);
    color: var(--concrete-fog);
    opacity: 0.35;
    letter-spacing: 0.06em;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}
.kr-left {
    left: 4vw;
    top: 80px;
}
.kr-right {
    right: 4vw;
    top: 80px;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    padding: 120px 64px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: -120px;
}

.hero-spiral {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.08;
}
.hero-spiral svg {
    width: min(80vmin, 800px);
    height: auto;
}

.hero-stage {
    position: relative;
    width: min(720px, 92vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-drawing {
    width: 100%;
    height: auto;
    max-width: 520px;
    margin-bottom: 80px;
}

.hero-drawing .dline {
    stroke: var(--sumi-ink);
    stroke-width: 0.75;
    stroke-linecap: square;
    fill: none;
    opacity: 0;
}
.hero-drawing .dline.is-drawing {
    opacity: 1;
    animation: drawLine 400ms ease forwards;
}

@keyframes drawLine {
    from {
        stroke-dashoffset: var(--len, 800);
    }
    to {
        stroke-dashoffset: 0;
    }
}

.hero-text {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 800ms ease, transform 800ms ease;
}
.hero-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-eyebrow {
    font-family: var(--label);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--steel-warm);
    margin-bottom: 28px;
}

.hero-title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    letter-spacing: 0.08em;
    line-height: 1.1;
    color: var(--sumi-ink);
    margin-bottom: 40px;
}
.hero-title-en {
    display: inline-block;
    margin-left: 0.4em;
    font-weight: 300;
    color: var(--terracotta);
    font-size: 0.55em;
    vertical-align: middle;
    letter-spacing: 0.34em;
}

.hero-sub {
    font-size: 15px;
    line-height: 2;
    font-weight: 300;
    color: var(--steel-warm);
    max-width: 44ch;
    margin: 0 auto;
}

.hero-mark {
    position: absolute;
    font-family: var(--label);
    font-size: 10px;
    color: var(--concrete-fog);
    user-select: none;
    opacity: 0;
    transition: opacity 1200ms ease 1200ms;
}
.hero-mark.is-visible { opacity: 0.5; }
.hero-mark.tl { top: -40px; left: -40px; }
.hero-mark.tr { top: -40px; right: -40px; }
.hero-mark.bl { bottom: -40px; left: -40px; }
.hero-mark.br { bottom: -40px; right: -40px; }

/* ===== Scroll cue ===== */
.scroll-cue {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 1000ms ease 2000ms;
}
.scroll-cue.is-visible { opacity: 0.8; }
.scroll-cue-label {
    font-family: var(--label);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--steel-warm);
}
.scroll-cue-line {
    display: block;
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--steel-warm) 0%, transparent 100%);
    animation: scrollPulse 2400ms ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); transform-origin: top; opacity: 0.6; }
    50% { transform: scaleY(0.4); transform-origin: top; opacity: 0.2; }
}

/* ===== STATEMENT SECTION ===== */
.section-statement {
    background: var(--gallery-white);
}

/* ===== WORK GRID ===== */
.section-work {
    background: var(--blueprint-wash);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.work-item {
    max-width: none;
}

.work-svg {
    border-bottom: 1px solid var(--concrete-fog);
    padding-bottom: 24px;
    margin-bottom: 24px;
}
.work-svg svg {
    width: 100%;
    height: auto;
    display: block;
}
.work-svg .wline {
    stroke: var(--sumi-ink);
    stroke-width: 0.75;
    fill: none;
    opacity: 0;
    transition: opacity 1200ms ease;
}
.module.is-revealed .work-svg .wline {
    opacity: 0.8;
}

.work-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    line-height: 1.3;
    margin-top: 16px;
    margin-bottom: 20px;
    color: var(--sumi-ink);
}

.work-body {
    font-size: 15px;
    line-height: 1.9;
    font-weight: 300;
    color: var(--sumi-ink);
    margin-bottom: 24px;
}

.work-meta {
    font-family: var(--label);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--steel-warm);
}

/* ===== PRACTICE LIST ===== */
.section-practice {
    background: var(--gallery-white);
}

.practice-list {
    display: flex;
    flex-direction: column;
    gap: 64px;
    max-width: var(--module-max);
    margin: 0 auto;
    list-style: none;
    counter-reset: practice;
}

.practice-list .module {
    width: 100%;
}

/* ===== MATERIALS ===== */
.section-materials {
    background: var(--blueprint-wash);
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 64px 48px;
    max-width: 1100px;
    margin: 0 auto;
}

.material {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.swatch {
    width: 100%;
    aspect-ratio: 1.618 / 1;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.swatch-concrete {
    background:
        radial-gradient(circle at 20% 30%, rgba(26,23,21,0.05) 0%, transparent 1%),
        radial-gradient(circle at 70% 60%, rgba(26,23,21,0.04) 0%, transparent 1%),
        radial-gradient(circle at 40% 80%, rgba(26,23,21,0.05) 0%, transparent 1%),
        radial-gradient(circle at 85% 20%, rgba(26,23,21,0.04) 0%, transparent 1%),
        linear-gradient(135deg, #cfc9bf 0%, #b8b1a6 100%);
}

.swatch-wood {
    background:
        repeating-linear-gradient(
            90deg,
            #b08a5e 0px,
            #b08a5e 3px,
            #a07c52 3px,
            #a07c52 5px,
            #b8916a 5px,
            #b8916a 9px,
            #a37e54 9px,
            #a37e54 11px
        );
}

.swatch-stone {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(26,23,21,0.18) 0%, transparent 35%),
        radial-gradient(ellipse at 70% 70%, rgba(26,23,21,0.15) 0%, transparent 35%),
        linear-gradient(135deg, #4a4540 0%, #2e2a26 100%);
}

.swatch-terracotta {
    background:
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.06) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(0,0,0,0.06) 0%, transparent 25%),
        linear-gradient(135deg, #c4704b 0%, #a85d3a 100%);
}

.material-body {
    font-size: 14px;
    line-height: 1.8;
    color: var(--sumi-ink);
    margin-top: 8px;
}

/* ===== DIALOGUE ===== */
.section-dialogue {
    background: var(--gallery-white);
}

.quote {
    margin-top: 24px;
}
.quote-text {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    line-height: 1.6;
    letter-spacing: 0.03em;
    color: var(--sumi-ink);
    margin-bottom: 32px;
    font-style: italic;
}
.quote-cite {
    font-family: var(--label);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--steel-warm);
}

/* ===== CONTACT ===== */
.section-contact {
    background: var(--gallery-white);
    padding-bottom: calc(var(--section-gap) * 0.6);
}

.contact-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-top: 1px solid var(--concrete-fog);
    padding-top: 32px;
}
.contact-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    align-items: baseline;
}
.contact-row dd {
    font-size: 15px;
    line-height: 1.8;
    color: var(--sumi-ink);
}
.link {
    color: var(--terracotta);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 400ms ease;
}
.link:hover {
    border-bottom-color: var(--terracotta);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--beam-shadow);
    color: var(--gallery-white);
    padding: 120px 64px 80px;
    position: relative;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}
.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}
.footer-row .caption {
    color: var(--concrete-fog);
}
.footer-mark {
    position: absolute;
    right: 0;
    bottom: -20px;
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(8rem, 18vw, 14rem);
    color: rgba(247, 245, 240, 0.05);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    :root {
        --section-gap: 140px;
        --module-pad: 32px;
    }
    .nav-inner {
        padding: 0 32px;
    }
    .nav-list {
        gap: 24px;
    }
    .section {
        padding: var(--section-gap) 28px;
    }
    .work-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .ma-divider {
        padding: 48px 28px;
    }
    .ma-line {
        width: 30vw;
    }
    .footer {
        padding: 80px 28px 60px;
    }
    .kr-margin {
        font-size: clamp(2.6rem, 12vw, 4rem);
    }
    .contact-row {
        grid-template-columns: 100px 1fr;
        gap: 16px;
    }
    .hero-mark.tl, .hero-mark.bl { left: -8px; }
    .hero-mark.tr, .hero-mark.br { right: -8px; }
}

@media (max-width: 600px) {
    .nav-list {
        display: none;
    }
    .hero-drawing {
        margin-bottom: 56px;
    }
    .footer-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
