@import url("/shared/verdeca-fonts.css");

:root {
    --paper: #f3f0e7;
    --paper-deep: #e9e4d6;
    --ink: #1e2924;
    --ink-soft: #566159;
    --moss: #315a43;
    --moss-dark: #1c3c2b;
    --leaf: #7f9f72;
    --sun: #d6b85c;
    --line: rgba(31, 52, 40, .18);
    --white: #fbfaf5;
    --sans: "Noto Sans KR Variable", "Noto Sans KR", sans-serif;
    --serif: "Noto Serif KR Variable", "Noto Serif KR", serif;
    --page: min(1440px, calc(100vw - 80px));
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, transparent 49.94%, rgba(42, 66, 51, .035) 50%, transparent 50.06%) 0 0 / 30px 30px,
        var(--paper);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { display: block; }
::selection { color: var(--white); background: var(--moss); }

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 14px;
    color: var(--white);
    background: var(--moss-dark);
    transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
    width: var(--page);
    min-height: 84px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 30px;
    border-bottom: 1px solid var(--line);
}
.brand {
    width: max-content;
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}
.brand-mark { width: 42px; height: 34px; overflow: visible; }
.brand-mark path { fill: none; stroke: var(--moss); stroke-width: 1.6; stroke-linejoin: round; }
.brand-mark path:nth-child(2) { fill: rgba(127, 159, 114, .2); }
.brand strong { display: block; font-family: var(--serif); font-size: 19px; letter-spacing: .02em; }
.brand small { display: block; margin-top: -4px; color: var(--ink-soft); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.site-header nav { display: flex; gap: 34px; }
.site-header nav a { padding: 28px 0 25px; color: var(--ink-soft); font-size: 14px; text-decoration: none; border-bottom: 2px solid transparent; }
.site-header nav a:hover { color: var(--ink); border-color: var(--moss); }
.readonly-stamp { justify-self: end; display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-soft); font-size: 12px; }
.readonly-stamp span { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 4px rgba(127,159,114,.16); }

main { overflow: clip; }
.observatory {
    width: var(--page);
    min-height: calc(100svh - 84px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(340px, .84fr) minmax(560px, 1.16fr);
    align-items: center;
    gap: 64px;
    padding: 72px 0 86px;
}
.observatory-copy { position: relative; z-index: 2; max-width: 580px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.045em; text-wrap: balance; }
h1 { font-size: clamp(48px, 5.6vw, 84px); }
h2 { font-size: clamp(32px, 3.2vw, 52px); }
.lead { max-width: 500px; margin: 30px 0 26px; color: var(--ink-soft); font-size: 17px; line-height: 1.85; word-break: keep-all; }
.collection-line { margin: 0 0 31px; font-family: var(--serif); font-size: 14px; color: var(--moss); }
.collection-line strong { font-size: 21px; font-weight: 650; }
.primary-link {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0 10px;
    color: var(--moss-dark);
    font-weight: 650;
    text-decoration: none;
    border-bottom: 1px solid var(--moss);
}
.primary-link svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.canopy-stage { position: relative; min-height: 610px; display: grid; place-items: center; isolation: isolate; }
.canopy-rings {
    position: absolute;
    inset: 5%;
    z-index: -2;
    border: 1px solid rgba(49, 90, 67, .16);
    border-radius: 49% 51% 47% 53% / 56% 45% 55% 44%;
    transform: rotate(-8deg);
}
.canopy-rings::before, .canopy-rings::after { content: ""; position: absolute; border: 1px solid rgba(49, 90, 67, .12); border-radius: 50%; }
.canopy-rings::before { inset: 12%; transform: rotate(22deg); }
.canopy-rings::after { inset: 26%; transform: rotate(-18deg); background: rgba(214, 184, 92, .07); }
.deck-orbit { position: relative; width: min(680px, 100%); height: 520px; }
.orbit-card {
    --angle: 0deg;
    position: absolute;
    width: 225px;
    min-height: 128px;
    padding: 18px 18px 16px;
    color: var(--ink);
    text-align: left;
    background: color-mix(in srgb, var(--white) 94%, var(--tint, var(--leaf)) 6%);
    border: 1px solid rgba(43, 68, 52, .2);
    border-radius: 2px;
    box-shadow: 0 13px 34px rgba(34, 47, 39, .08);
    transform: rotate(var(--angle));
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.orbit-card:hover, .orbit-card:focus-visible { z-index: 5; border-color: var(--moss); box-shadow: 0 18px 44px rgba(34,47,39,.16); transform: rotate(0) translateY(-5px); outline: none; }
.orbit-card:nth-child(1) { left: 32%; top: 1%; --angle: -3deg; }
.orbit-card:nth-child(2) { right: 1%; top: 25%; --angle: 4deg; }
.orbit-card:nth-child(3) { right: 14%; bottom: 3%; --angle: -2deg; }
.orbit-card:nth-child(4) { left: 17%; bottom: 1%; --angle: 3deg; }
.orbit-card:nth-child(5) { left: 0; top: 29%; --angle: -5deg; }
.orbit-card:nth-child(6) { left: 35%; top: 36%; z-index: 2; --angle: 1deg; background: var(--moss-dark); color: var(--white); }
.orbit-card .orbit-label { display: block; margin-bottom: 24px; color: currentColor; opacity: .66; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.orbit-card strong { display: -webkit-box; overflow: hidden; font-family: var(--serif); font-size: 18px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.orbit-card small { display: block; margin-top: 9px; color: currentColor; opacity: .7; font-size: 11px; }
.stage-note { position: absolute; right: 4%; bottom: -8px; margin: 0; color: var(--ink-soft); font-size: 11px; }
.loading-leaf { height: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.loading-leaf span { width: 8px; height: 28px; background: var(--leaf); border-radius: 100% 0 100% 0; animation: breathe 1.2s ease-in-out infinite alternate; }
.loading-leaf span:nth-child(2) { animation-delay: .15s; transform: translateY(-8px); }
.loading-leaf span:nth-child(3) { animation-delay: .3s; }

.archive, .taxonomy { padding: 104px max(40px, calc((100vw - min(1440px, calc(100vw - 80px))) / 2)); }
.section-heading { display: grid; grid-template-columns: 1.3fr .7fr; gap: 60px; align-items: end; margin-bottom: 54px; }
.section-heading > p { max-width: 420px; justify-self: end; margin: 0; color: var(--ink-soft); font-size: 14px; }

.archive { background: var(--paper); }
.archive-heading { margin-bottom: 34px; }
.archive-controls { display: grid; grid-template-columns: minmax(250px, 1fr) auto; gap: 18px 32px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.search-field { display: flex; align-items: center; gap: 10px; }
.search-field svg { width: 20px; fill: none; stroke: var(--ink-soft); stroke-width: 1.6; }
.search-field input { width: 100%; padding: 9px 0; color: var(--ink); background: transparent; border: 0; outline: none; }
.search-field input::placeholder { color: #858b84; }
.kind-filter { display: flex; padding: 3px; background: var(--paper-deep); }
.kind-filter button {
    padding: 7px 13px;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    cursor: pointer;
}
.kind-filter button[aria-pressed="true"] { color: var(--white); background: var(--moss); }
.card-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 42px 24px; min-height: 320px; padding-top: 44px; }
.specimen {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-self: start;
    padding: 0;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.specimen-image { position: relative; width: 100%; aspect-ratio: 4 / 3; display: block; flex: 0 0 auto; overflow: hidden; margin-bottom: 16px; background: var(--paper-deep); border: 1px solid rgba(31,52,40,.1); }
.specimen-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.76) contrast(.96); transition: transform .4s ease, filter .4s ease; }
.specimen:hover .specimen-image img, .specimen:focus-visible .specimen-image img { filter: saturate(.95); transform: scale(1.025); }
.specimen-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(145deg, rgba(126,158,113,.22), rgba(214,184,92,.08)); }
.specimen-placeholder svg { width: 72px; fill: none; stroke: rgba(49,90,67,.35); stroke-width: 1; }
.specimen-meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; color: var(--ink-soft); font-size: 10px; letter-spacing: .04em; }
.specimen h3 { display: -webkit-box; overflow: hidden; font-size: 18px; line-height: 1.48; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.specimen p { display: -webkit-box; overflow: hidden; margin: 8px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.specimen:focus-visible { outline: 2px solid var(--moss); outline-offset: 6px; }
.load-more { display: block; min-width: 190px; margin: 50px auto 0; padding: 11px 20px; color: var(--moss); background: transparent; border: 1px solid var(--moss); cursor: pointer; }
.load-more:hover { color: var(--white); background: var(--moss); }
.empty-state { grid-column: 1 / -1; padding: 90px 20px; color: var(--ink-soft); text-align: center; border-bottom: 1px solid var(--line); }
.gallery-skeleton { aspect-ratio: 4/3; background: linear-gradient(100deg, var(--paper-deep) 30%, #f8f5ed 50%, var(--paper-deep) 70%); background-size: 200% 100%; animation: sheen 1.25s linear infinite; }

.taxonomy { background: #e5e7dc; }
.tag-field { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 24px; max-width: 1180px; }
.tag-token { padding: 4px 0; color: var(--ink); background: transparent; border: 0; border-bottom: 2px solid var(--tag-color); font-family: var(--serif); font-size: clamp(15px, calc(14px + var(--weight) * 1px), 28px); cursor: pointer; }
.tag-token small { margin-left: 5px; color: var(--ink-soft); font-family: var(--sans); font-size: 9px; vertical-align: super; }

footer { width: var(--page); min-height: 150px; margin: 0 auto; display: flex; justify-content: space-between; gap: 40px; align-items: center; color: var(--ink-soft); font-size: 11px; }
footer strong { color: var(--ink); font-family: var(--serif); font-size: 14px; }

.card-dialog { width: min(920px, calc(100vw - 32px)); max-height: min(88vh, 900px); padding: 0; color: var(--ink); background: var(--paper); border: 0; box-shadow: 0 30px 90px rgba(12,25,17,.34); }
.card-dialog::backdrop { background: rgba(18,31,24,.67); backdrop-filter: blur(5px); }
.dialog-shell { position: relative; min-height: 320px; }
.dialog-close { position: sticky; top: 18px; z-index: 4; float: right; width: 40px; height: 40px; display: grid; place-items: center; margin: 18px 18px -58px 0; color: var(--white); background: rgba(24,45,32,.82); border: 0; border-radius: 50%; cursor: pointer; }
.dialog-close svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.dialog-cover { width: 100%; max-height: 380px; object-fit: cover; }
.dialog-body { padding: 48px clamp(24px, 7vw, 72px) 70px; }
.dialog-body.no-cover { padding-top: 76px; }
.dialog-overline { margin: 0 0 14px; color: var(--moss); font-size: 11px; letter-spacing: .08em; }
.dialog-body h2 { max-width: 720px; font-size: clamp(30px, 5vw, 52px); }
.dialog-summary { max-width: 700px; margin: 20px 0 0; color: var(--ink-soft); font-size: 15px; }
.dialog-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 24px 0 0; }
.dialog-tags span { padding: 3px 8px; font-size: 10px; border: 1px solid var(--line); }
.dialog-text { max-width: 720px; margin-top: 40px; padding-top: 32px; white-space: pre-wrap; word-break: break-word; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.9; }
.relations { margin-top: 48px; }
.relations h3 { margin-bottom: 16px; font-size: 20px; }
.relation-list { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.relation-item { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.relation-item:nth-child(odd) { margin-right: 18px; }
.relation-item span:last-child { flex: 0 0 auto; color: var(--ink-soft); font-size: 10px; }

.noscript { position: fixed; inset: auto 0 0; z-index: 50; margin: 0; padding: 12px; color: var(--white); background: #872f2f; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes breathe { to { opacity: .35; transform: translateY(-7px); } }
@keyframes sheen { to { background-position: -200% 0; } }

@media (max-width: 1100px) {
    :root { --page: calc(100vw - 48px); }
    .observatory { grid-template-columns: .85fr 1.15fr; gap: 24px; }
    .canopy-stage { transform: scale(.9); }
    .card-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    :root { --page: calc(100vw - 36px); }
    .site-header { grid-template-columns: 1fr auto; min-height: 72px; }
    .site-header nav { display: none; }
    .observatory { min-height: auto; grid-template-columns: 1fr; padding: 72px 0 44px; }
    .observatory-copy { max-width: 650px; }
    .canopy-stage { min-height: 520px; transform: none; }
    .deck-orbit { max-width: 660px; transform: scale(.9); }
    .archive, .taxonomy { padding: 78px 24px; }
    .section-heading { grid-template-columns: 1fr; gap: 16px; }
    .section-heading > p { justify-self: start; }
    .card-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    footer { min-height: 180px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; }
}

@media (max-width: 560px) {
    :root { --page: calc(100vw - 28px); }
    .site-header { min-height: 66px; }
    .brand-mark { width: 36px; }
    .brand small { display: none; }
    .readonly-stamp { font-size: 10px; }
    .observatory { padding-top: 58px; }
    h1 { font-size: clamp(42px, 13.5vw, 62px); }
    .lead { margin-top: 24px; font-size: 15px; }
    .canopy-stage { min-height: 480px; margin: 0 -18px; overflow: hidden; }
    .deck-orbit { width: 560px; transform: scale(.72); }
    .stage-note { right: 12px; bottom: 12px; }
    .archive, .taxonomy { padding: 64px 18px; }
    .archive-controls { grid-template-columns: 1fr; }
    .kind-filter { width: 100%; }
    .kind-filter button { flex: 1; }
    .card-gallery { grid-template-columns: 1fr; gap: 36px; }
    .specimen-image { aspect-ratio: 16 / 10; }
    .relation-list { grid-template-columns: 1fr; }
    .relation-item:nth-child(odd) { margin-right: 0; }
    .dialog-body { padding-bottom: 48px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
    .orbit-card, .specimen-image, .kind-filter button[aria-pressed="true"] { border: 1px solid ButtonText; }
    .readonly-stamp span { forced-color-adjust: none; }
}

