/* ================= tokens ================= */
:root {
  --serif: "Nanum Myeongjo", "Times New Roman", serif;
  --sans: Helvetica, "Helvetica Neue", Arial, sans-serif;

  --moss-500: #6e8358;
  --moss-700: #4a5c3a;

  --sea-500: #547382;
  --sea-700: #3a5765;

  --stone-100: #dedcd5;
  --stone-300: #a9a69d;
  --stone-500: #787468;
  --stone-700: #4f4c44;

  --paper-soft: #e4dfd1;
  --card: #f3efe5;
  --ink: #1d1f1a;
  --ink-soft: #545149;
  --rule: rgba(29,31,26,0.14);
  --rule-soft: rgba(29,31,26,0.08);

  --accent: var(--moss-700);
  --accent-2: var(--sea-700);
}

/* palette variants */
html[data-palette="moss"]  { --accent: var(--moss-700);  --accent-2: var(--moss-500); }
html[data-palette="sea"]   { --accent: var(--sea-700);   --accent-2: var(--sea-500); }
html[data-palette="stone"] { --accent: var(--stone-700); --accent-2: var(--stone-500); }

html[data-mode="dark"] {
  --paper-soft: #0e0f0d;
  --card: #1a1c18;
  --ink: #ebe7dc;
  --ink-soft: #9d9a91;
  --rule: rgba(235,231,220,0.14);
  --rule-soft: rgba(235,231,220,0.07);
  --accent: #b6c6a3;
  --accent-2: #9fb8c4;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper-soft);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  transition: background-color .6s ease, color .6s ease;
}

.page {
  max-width: 1280px;
  margin: 40px auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 30px 80px -40px rgba(29,31,26,0.25),
    0 2px 10px -4px rgba(29,31,26,0.08);
}

.col { max-width: 1040px; margin: 0 auto; padding: 0 56px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 7.5vw, 108px); line-height: 1; letter-spacing: -0.03em; }
h2 { font-size: clamp(34px, 4.5vw, 60px); line-height: 1.04; }
h3 { font-size: clamp(24px, 2.4vw, 36px); line-height: 1.15; }
em { font-style: italic; color: var(--ink); }

p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

/* ============ masthead =========== */
header.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 56px;
  border-bottom: 1px solid var(--rule);
}
.crest {
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
}
.crest .name {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.topnav {
  display: flex; gap: 28px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.topnav a { text-decoration: none; color: inherit; transition: color .2s; }
.topnav a:hover { color: var(--ink); }

/* ================ opening ================ */
section.opening {
  padding: 90px 0 100px;
}
.opening h1 { max-width: 12ch; }
.opening h1 .accent-word {
  font-style: italic;
  color: var(--accent);
}
.opening .lede {
  max-width: 48ch;
  margin: 32px 0 0;
  font-family: var(--sans);
  font-size: clamp(16px, 1.2vw, 17px);
  line-height: 1.65;
  color: var(--ink-soft);
}


.opening .foot {
  margin-top: 60px;
  display: flex; gap: 56px;
  flex-wrap: wrap;
  font-family: var(--sans);
  color: var(--ink-soft);
  font-size: 14px;
}
.opening .foot .smallcaps {
  font-family: var(--sans); font-style: normal;
  font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-soft);
  display: block; margin-bottom: 6px;
}
.opening .foot .val { color: var(--ink); font-style: normal; font-size: 17px; }

/* ================= studio letter ================= */
section.letter {
  padding: 80px 0 100px;
  border-top: 1px solid var(--rule);
  background: color-mix(in oklab, var(--card) 92%, var(--accent) 2%);
}
.letter .col {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 60px;
  align-items: start;
}
.letter .label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.6;
}
.letter .label .dagger {
  display: block;
  width: 28px; height: 1px;
  background: var(--ink);
  margin-bottom: 14px;
  opacity: .6;
}
.letter .body p {
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.5;
  max-width: 58ch;
}
.letter .body p + p { margin-top: 22px; }

/* ================= catalogue ================= */
section.catalogue {
  padding: 100px 0;
  border-top: 1px solid var(--rule);
}
.cat-head {
  text-align: center;
  margin-bottom: 100px;
}
.cat-head h2 { max-width: 18ch; margin: 0 auto; }
.cat-head .kicker {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.cat-head .caption {
  max-width: 54ch;
  margin: 26px auto 0;
  font-family: var(--sans);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

.entry {
  padding: 60px 0;
  border-top: 1px solid var(--rule-soft);
  max-width: 600px;
}
.entry-meta {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 24px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.entry-meta .no {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.15em;
}
.entry-meta .divider {
  width: 28px; height: 1px; background: var(--ink); opacity: .4;
}
.entry h3 em { font-style: italic; color: var(--ink); opacity: .55; font-weight: 400; }
.entry .poem {
  margin-top: 20px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.45;
  max-width: 36ch;
  opacity: .85;
}
.entry .desc {
  margin-top: 20px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 42ch;
}
.entry .links {
  margin-top: 32px;
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.entry .links a {
  text-decoration: none;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
  width: fit-content;
  transition: gap .3s ease, border-color .3s ease;
}
.entry .links a:hover {
  border-bottom-color: var(--ink);
  gap: 18px;
}
.entry .links a .arr { color: var(--ink); opacity: .5; font-style: normal; }
.entry .links .soon {
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--rule);
}

/* =============== contact =============== */
section.write {
  padding: 100px 0;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.write h2 { max-width: 18ch; margin: 0 auto; }
.write .caption {
  max-width: 54ch; margin: 28px auto 60px;
  font-family: var(--sans);
  color: var(--ink-soft); font-size: 16px;
  line-height: 1.65;
}
.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 60px;
  text-align: left;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 40px;
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: background .25s;
}
.contact-card:hover {
  background: color-mix(in oklab, var(--card) 80%, var(--accent) 4%);
}
.contact-card-label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-card-value {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.2;
}
.contact-card-sub {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ================ footer =============== */
footer.colophon {
  padding: 70px 0 50px;
  border-top: 1px solid var(--rule);
  background: var(--card);
  text-align: center;
}
footer .mark-sm {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
footer .motto {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 46ch; margin: 0 auto;
  line-height: 1.55;
}
footer .legal {
  margin-top: 44px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex; justify-content: center; gap: 24px;
  flex-wrap: wrap;
}
footer .legal span { opacity: .8; }

/* ============= Tweaks panel ============= */
.tweaks {
  position: fixed; right: 24px; bottom: 24px;
  width: 260px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 20px;
  z-index: 100;
  display: none;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.3);
}
.tweaks.open { display: block; }
.tweaks h5 {
  font-family: var(--serif); font-weight: 400;
  font-size: 18px; margin: 0 0 4px;
}
.tweaks .t-sub {
  font-family: var(--serif); font-style: italic;
  font-size: 12px; color: var(--ink-soft);
  margin-bottom: 18px;
}
.tweak-group { margin-bottom: 16px; }
.tweak-group .t-label {
  font-family: var(--serif); font-style: italic;
  font-size: 12px; color: var(--ink-soft);
  margin-bottom: 8px; display: block;
}
.tweak-group .opts {
  display: flex; gap: 4px;
  background: color-mix(in oklab, var(--card) 70%, var(--ink) 4%);
  border-radius: 3px;
  padding: 3px;
}
.tweak-group .opts button {
  flex: 1;
  padding: 7px 8px;
  font-size: 12px;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 2px;
  font-family: var(--serif);
  font-style: italic;
  transition: background .2s, color .2s;
}
.tweak-group .opts button.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* ============== responsive ============== */
@media (max-width: 960px) {
  .page { margin: 0; border: none; box-shadow: none; }
  .col { padding: 0 28px; }
  header.masthead { padding: 20px 28px; }
  .topnav { gap: 16px; font-size: 13px; }
  .contact-cards { grid-template-columns: 1fr; }
  .letter .col {
    grid-template-columns: 1fr; gap: 40px;
  }
  section.opening { padding: 60px 0 70px; }
}
