/* =====================================================
   yongzoon.net — Private Lookbook SS/28
   Posthumous couture atelier / bound-volume editorial
   Palette: #0c0b0a #1a1918 #2a2724 #ebe6dc #d6cfc1
            #8a827a #3e2a54 #b56cff
   ===================================================== */

:root {
  --carbon-black: #0c0b0a;
  --atelier-night: #1a1918;
  --ink-brown: #2a2724;
  --pattern-paper: #ebe6dc;
  --linen-raw: #d6cfc1;
  --ash-grey: #8a827a;
  --oxidized-plum: #3e2a54;
  --uv-strike: #b56cff;

  --margin: clamp(24px, 3.5vw, 56px);
  --beat: 2.8s;
}

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

html, body {
  background: var(--atelier-night);
  color: var(--ink-brown);
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.68;
  overflow-x: hidden;
  cursor: default;
}

body {
  position: relative;
  min-height: 100vh;
}

/* --------------------------------------------------
   Global paper grain — 3% opacity SVG noise overlay
   -------------------------------------------------- */
.paper-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.15  0 0 0 0 0.14  0 0 0 0 0.12  0 0 0 0.5 0'/></filter><rect width='64' height='64' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

/* --------------------------------------------------
   Cursor ultraviolet stitch trail
   -------------------------------------------------- */
#uv-trail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
}
.uv-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--uv-strike);
  box-shadow: 0 0 8px var(--uv-strike);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.6s linear;
  will-change: transform, opacity;
}

/* --------------------------------------------------
   Running silk thread (left edge, fixed)
   -------------------------------------------------- */
.running-thread {
  position: fixed;
  top: 0;
  left: clamp(8px, 1.2vw, 16px);
  width: 4px;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}

/* --------------------------------------------------
   Running head, folio, foot
   -------------------------------------------------- */
.running-head {
  position: fixed;
  top: var(--margin);
  left: calc(var(--margin) + 16px);
  right: var(--margin);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  z-index: 50;
  pointer-events: none;
  mix-blend-mode: difference;
}

.head-title {
  font-family: "DM Mono", monospace;
  font-weight: 300;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash-grey);
}

.head-folio {
  font-family: "Cormorant Unicase", serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--ash-grey);
}

.running-foot {
  position: fixed;
  bottom: var(--margin);
  left: calc(var(--margin) + 16px);
  right: var(--margin);
  z-index: 50;
  pointer-events: none;
  mix-blend-mode: difference;
}

.foot-cat {
  font-family: "DM Mono", monospace;
  font-weight: 300;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ash-grey);
  text-align: center;
}
.korean {
  font-family: "Nanum Myeongjo", serif;
  font-weight: 400;
  font-size: 10px;
}

/* --------------------------------------------------
   Volume / Spread frame
   -------------------------------------------------- */
.volume {
  width: 100%;
}

.spread {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: calc(var(--margin) + 36px) var(--margin) calc(var(--margin) + 36px);
  background: var(--atelier-night);
  color: var(--ink-brown);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 80px);
  overflow: hidden;
}

.spread.look,
.spread#spread-3,
.spread#spread-4,
.spread#spread-5,
.spread#spread-6 {
  background: var(--pattern-paper);
}

.spread#spread-7 {
  background: var(--linen-raw);
}

/* gutter bloom — vertical crease */
.gutter-bloom {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--carbon-black);
  opacity: 0.07;
  box-shadow: 0 0 14px 6px rgba(12, 11, 10, 0.05);
  pointer-events: none;
}

.page {
  position: relative;
  min-height: calc(100vh - 2 * (var(--margin) + 36px));
}

.page-left { padding-right: clamp(16px, 2vw, 32px); }
.page-right { padding-left: clamp(16px, 2vw, 32px); }

.paper-cream { color: var(--ink-brown); }

/* --------------------------------------------------
   Spread I — Frontispiece
   -------------------------------------------------- */
.frontispiece-left {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
}

.dragon-glyph {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: clamp(14rem, 32vw, 30rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--carbon-black);
  position: relative;
  z-index: 2;
}
.dragon-glyph span {
  display: block;
  color: var(--pattern-paper);
  mix-blend-mode: normal;
  transform: translateX(-0.04em);
}

.dragon-assemble {
  position: absolute;
  top: 4%;
  left: -4%;
  width: 110%;
  height: 110%;
  opacity: 0.3;
  z-index: 1;
  pointer-events: none;
}
.dragon-assemble .piece {
  transform-origin: center;
  transform-box: fill-box;
  animation: dragon-breathe 20s ease-in-out infinite;
}
.dragon-assemble .piece:nth-child(1) { animation-delay: 0s; }
.dragon-assemble .piece:nth-child(2) { animation-delay: -3s; }
.dragon-assemble .piece:nth-child(3) { animation-delay: -6s; }
.dragon-assemble .piece:nth-child(4) { animation-delay: -9s; }
.dragon-assemble .piece:nth-child(5) { animation-delay: -12s; }

@keyframes dragon-breathe {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0.35; }
  25%  { transform: translate(8px, -6px) rotate(0.6deg); opacity: 0.22; }
  50%  { transform: translate(-6px, 4px) rotate(-0.4deg); opacity: 0.30; }
  75%  { transform: translate(4px, 8px) rotate(0.3deg); opacity: 0.26; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 0.35; }
}

.frontispiece-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  color: var(--pattern-paper);
}

.front-meta {
  max-width: 340px;
  padding-bottom: 12vh;
}

.dm-mono {
  font-family: "DM Mono", monospace;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash-grey);
}

.front-line {
  opacity: 0;
  animation: fade-slow 1.4s ease 0.9s forwards;
}

.front-sub {
  opacity: 0;
  margin-top: 1.2em;
  animation: fade-slow 1.4s ease 2.2s forwards;
}

.cardo-latin {
  font-family: "Cardo", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--oxidized-plum);
  font-size: 14px;
  margin: 0.8em 0;
}

@keyframes fade-slow {
  to { opacity: 1; }
}

/* --------------------------------------------------
   Marginalia anatomy (shared)
   -------------------------------------------------- */
.marginalia {
  position: absolute;
  width: 120px;
  height: 180px;
  right: -8px;
  bottom: 6%;
  opacity: 0.72;
}

.frontispiece-right .marginalia {
  right: calc(var(--margin) - 8px);
  bottom: calc(var(--margin) + 6px);
}

.manifest-left .marginalia {
  left: -8px;
  bottom: 12%;
  right: auto;
}

/* --------------------------------------------------
   Spread II — Manifest
   -------------------------------------------------- */
.manifest-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--pattern-paper);
}

.chapter-eyebrow {
  font-family: "DM Mono", monospace;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ash-grey);
  text-transform: uppercase;
  margin-bottom: 1.6em;
}

.manifest-h {
  font-family: "Cormorant Unicase", serif;
  font-weight: 500;
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--pattern-paper);
}

.manifest-latin {
  margin-top: 1em;
  max-width: 300px;
}

.corner-fox {
  position: absolute;
  top: 0;
  left: 0;
  width: 180px;
  height: 180px;
  pointer-events: none;
  z-index: 3;
}

.manifest-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  color: var(--pattern-paper);
}

.manifest-toc {
  list-style: none;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(14px, 1.3vw, 18px);
  color: var(--pattern-paper);
  line-height: 2;
}

.manifest-toc li {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  white-space: nowrap;
}

.manifest-toc li.toc-flourish {
  font-style: italic;
  color: var(--ash-grey);
  font-size: 13px;
  margin-left: 2em;
  opacity: 0.82;
  display: block;
}

.toc-num {
  font-family: "Cormorant Unicase", serif;
  font-weight: 500;
  min-width: 3em;
  letter-spacing: 0.08em;
}

.toc-name {
  font-family: "Cormorant Unicase", serif;
  letter-spacing: 0.1em;
  font-size: 15px;
}

.toc-dots {
  flex: 1;
  overflow: hidden;
  color: var(--ash-grey);
  letter-spacing: 0.3em;
  font-size: 12px;
}

.toc-folio {
  font-family: "Cormorant Unicase", serif;
  color: var(--linen-raw);
  min-width: 2em;
  text-align: right;
}

/* --------------------------------------------------
   Look spreads — Croquis pages
   -------------------------------------------------- */
.look-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.croquis-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 300 / 560;
  overflow: hidden;
  cursor: grab;
}
.croquis-stage:active { cursor: grabbing; }

.variant-rail {
  display: flex;
  height: 100%;
  width: 300%;
  transform: translateX(0);
  will-change: transform;
}

.croquis.variant {
  flex: 0 0 33.3333%;
  width: 33.3333%;
  height: 100%;
  padding: 12px 4px;
  overflow: visible;
}

.croquis {
  width: 100%;
  height: 100%;
}

/* Draw-in paths */
.croquis .draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 3.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.spread.in-view .croquis .draw {
  stroke-dashoffset: 0;
}

/* UV stitch — lands last */
.uv-stitch {
  transform: scale(0);
  transform-origin: center;
  transform-box: fill-box;
  filter: drop-shadow(0 0 0 transparent);
  transition: transform 0.5s cubic-bezier(0.2, 1.4, 0.5, 1), filter 0.4s ease;
  opacity: 0.95;
}

.spread.in-view .uv-stitch {
  transform: scale(1);
  animation: uv-bloom 2.8s ease-in-out infinite 3.4s;
}

@keyframes uv-bloom {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(181, 108, 255, 0.6)); }
  50%      { filter: drop-shadow(0 0 10px rgba(181, 108, 255, 1)); }
}

.variant-indicator {
  margin-top: 1.2em;
  color: var(--ash-grey);
  letter-spacing: 0.2em;
}

/* --------------------------------------------------
   Look spreads — Editorial body page
   -------------------------------------------------- */
.look-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-right: clamp(16px, 4vw, 80px);
  position: relative;
}

.look-title {
  font-family: "Cormorant Unicase", serif;
  font-weight: 500;
  font-size: 34px;
  letter-spacing: 0.14em;
  line-height: 1.1;
  color: var(--carbon-black);
  margin-bottom: 1.2em;
  max-width: 560px;
}

.look-body {
  max-width: 520px;
  color: var(--ink-brown);
}

.look-body .para {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.68;
  margin-bottom: 1.2em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.spread.in-view .look-body .para {
  opacity: 1;
  transform: translateY(0);
}

.spread.in-view .look-body .para:nth-of-type(1) { transition-delay: 0.18s; }
.spread.in-view .look-body .para:nth-of-type(2) { transition-delay: 0.36s; }
.spread.in-view .look-body .para:nth-of-type(3) { transition-delay: 0.54s; }

.look-body .cardo-latin {
  margin-top: 1.4em;
  opacity: 0;
  transition: opacity 1.2s ease 0.9s;
}

.spread.in-view .look-body .cardo-latin { opacity: 1; }

/* --------------------------------------------------
   Spread IV — gutter stitches
   -------------------------------------------------- */
.gutter-stitches {
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 50%;
  width: 10px;
  transform: translateX(-50%);
  background-image:
    linear-gradient(to bottom,
      transparent 0, transparent 8px,
      var(--ash-grey) 8px, var(--ash-grey) 9px,
      transparent 9px, transparent 16px);
  background-size: 1px 16px;
  background-repeat: repeat-y;
  background-position: 50% 0;
  opacity: 0.5;
  pointer-events: none;
}

.gutter-stitches::before,
.gutter-stitches::after { content: ""; }

/* --------------------------------------------------
   Spread VI — perforated tear edge
   -------------------------------------------------- */
.perforation {
  position: absolute;
  top: 8%;
  bottom: 8%;
  right: -4px;
  width: 6px;
  background-image: radial-gradient(circle, var(--ash-grey) 1px, transparent 1.5px);
  background-size: 4px 8px;
  background-repeat: repeat-y;
  opacity: 0.55;
  pointer-events: none;
}

/* --------------------------------------------------
   Spread VII — Colophon
   -------------------------------------------------- */
.colophon-spread { background: var(--linen-raw); }

.colophon-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--ink-brown);
}

.colophon-h {
  font-family: "Cormorant Unicase", serif;
  font-weight: 700;
  font-size: clamp(5rem, 9vw, 8rem);
  letter-spacing: 0.12em;
  line-height: 0.9;
  color: var(--carbon-black);
  margin-bottom: 1em;
}

.colophon-block {
  max-width: 460px;
  color: var(--ink-brown);
}

.spec-line {
  margin-top: 1.4em;
  margin-bottom: 0.4em;
  color: var(--ash-grey);
}

.colophon-block .para {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-brown);
}

.colophon-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.bookplate {
  width: clamp(220px, 28vw, 360px);
  aspect-ratio: 1;
  position: relative;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.08)) drop-shadow(0 4px 16px rgba(62, 42, 84, 0.14));
  animation: plate-pulse var(--beat) ease-in-out infinite;
}

.bookplate svg { width: 100%; height: 100%; }

@keyframes plate-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 2px 0 rgba(0,0,0,0.08)) drop-shadow(0 4px 16px rgba(62,42,84,0.14)); }
  50%      { transform: scale(1.012); filter: drop-shadow(0 3px 0 rgba(0,0,0,0.10)) drop-shadow(0 6px 22px rgba(62,42,84,0.20)); }
}

.colophon-address {
  margin-top: 2.4em;
  text-align: right;
  align-self: flex-end;
  padding-right: clamp(8px, 2vw, 32px);
}

.korean-addr {
  font-family: "Nanum Myeongjo", serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-brown);
}

.finis-line {
  margin-top: 1em;
  font-size: 18px;
  color: var(--oxidized-plum);
}

.uv-period {
  color: var(--uv-strike);
  font-weight: 700;
  text-shadow: 0 0 6px rgba(181, 108, 255, 0.6);
  animation: uv-bloom var(--beat) ease-in-out infinite;
}

/* --------------------------------------------------
   Reduced motion
   -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .croquis .draw { stroke-dashoffset: 0 !important; transition: none !important; }
  .uv-stitch { transform: scale(1) !important; animation: none !important; }
  #uv-trail { display: none; }
  .dragon-assemble .piece { animation-duration: 40s; }
  .bookplate { animation: none; }
}

/* --------------------------------------------------
   Narrow viewports — still a bound volume, softened
   -------------------------------------------------- */
@media (max-width: 880px) {
  .spread {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
    padding: calc(var(--margin) + 48px) var(--margin);
  }
  .gutter-bloom { display: none; }
  .running-head { flex-direction: column; gap: 4px; }
  .running-foot .foot-cat { font-size: 8px; letter-spacing: 0.1em; }
  .marginalia { position: static; margin-top: 2em; opacity: 0.55; }
  .dragon-glyph { font-size: clamp(10rem, 50vw, 18rem); }
  .croquis-stage { max-width: 320px; margin: 0 auto; }
  .look-right { padding-right: 0; }
  .bookplate { width: clamp(180px, 50vw, 280px); }
  .colophon-address { align-self: center; text-align: center; }
}
