/* munju.im — anti-design / zen-contemplative
   Palette: #1A1A28 #B8A898 #48A8A0 #C88870 #E8E4E0 #3A3A48 #6A9878
   Font: Nunito (Google Fonts) — 200 / 300 / 400 / 800
*/

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

html, body {
  background: #1A1A28;
  color: #B8A898;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.grain-svg {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ============= GRAIN LAYER ============= */
.grain-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  filter: url(#grainFilter);
  opacity: 0.20;
  background: transparent;
  mix-blend-mode: screen;
}

.sec[data-grain="0.05"] .grain-layer { opacity: 0.05; }
.sec[data-grain="0.08"] .grain-layer { opacity: 0.08; }
.sec[data-grain="0.10"] .grain-layer { opacity: 0.10; }
.sec[data-grain="0.12"] .grain-layer { opacity: 0.12; }
.sec[data-grain="0.14"] .grain-layer { opacity: 0.14; }
.sec[data-grain="0.15"] .grain-layer { opacity: 0.15; }
.sec[data-grain="0.16"] .grain-layer { opacity: 0.16; }
.sec[data-grain="0.18"] .grain-layer { opacity: 0.18; }
.sec[data-grain="0.20"] .grain-layer { opacity: 0.20; }

/* SVG-as-fallback grain via CSS for grain-layer */
.grain-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.722  0 0 0 0 0.659  0 0 0 0 0.596  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  opacity: 1;
  mix-blend-mode: normal;
}

/* ============= SECTION BASE ============= */
.sec {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}
.sec > *:not(.grain-layer):not(.scatter-layer) {
  position: relative;
  z-index: 2;
}

/* ============= SECTION 1 — DECLARATION ============= */
.sec-declaration {
  height: 100vh;
  background: #1A1A28;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4vh 4vw;
}

.scatter-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.frag {
  position: absolute;
  width: 36px;
  height: 36px;
  opacity: 0.12;
  will-change: transform;
}
.frag-a { top: 8%;  left: 12%; animation: drift-a 31s linear infinite; }
.frag-b { top: 22%; left: 78%; animation: drift-b 37s linear infinite; }
.frag-c { top: 64%; left: 8%;  animation: drift-c 29s linear infinite; }
.frag-d { top: 80%; left: 70%; animation: drift-d 33s linear infinite; }
.frag-e { top: 40%; left: 58%; animation: drift-e 35s linear infinite; }
.frag-f { top: 18%; left: 44%; animation: drift-f 41s linear infinite; }

@keyframes drift-a { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(30px,-22px) rotate(8deg); } }
@keyframes drift-b { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(-26px,18px) rotate(-10deg); } }
@keyframes drift-c { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(20px,28px) rotate(6deg); } }
@keyframes drift-d { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(-32px,-18px) rotate(-7deg); } }
@keyframes drift-e { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(24px,-30px) rotate(11deg); } }
@keyframes drift-f { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(-28px,22px) rotate(-9deg); } }

.hero-domain {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: clamp(60px, 22vw, 280px);
  line-height: 0.85;
  color: #E8E4E0;
  letter-spacing: -0.04em;
  margin-left: -2vw;
  margin-bottom: 2vh;
  white-space: nowrap;
  transform: translateX(-3vw);
}

.hero-korean {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 10vw, 140px);
  color: #C88870;
  transform: rotate(-5deg);
  margin-left: 8vw;
  line-height: 1;
}

.metadata-strip {
  position: absolute;
  bottom: 4vh;
  left: 4vw;
  right: 4vw;
  display: flex;
  justify-content: space-between;
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #B8A898;
  z-index: 3;
}

/* ============= SECTION 2 — FRAGMENT A (TILT) ============= */
.sec-fragment-a {
  min-height: 70vh;
  background: #1A1A28;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw;
  perspective: 800px;
}

.tilt-panel {
  background: rgba(58, 58, 72, 0.55);
  border: 1px solid rgba(184, 168, 152, 0.18);
  padding: 6vh 6vw;
  max-width: 720px;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  will-change: transform;
}

.panel-1 {
  transform: perspective(800px) rotateX(3deg) rotateY(-2deg);
  margin-left: -4vw;
}

.panel-eyebrow {
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #48A8A0;
  margin-bottom: 2vh;
}

.panel-statement {
  font-weight: 800;
  font-size: clamp(28px, 4.4vw, 60px);
  line-height: 1.15;
  color: #E8E4E0;
  letter-spacing: -0.02em;
  margin-bottom: 3vh;
}

.panel-statement.big {
  font-size: clamp(32px, 5vw, 78px);
}

.panel-trans {
  font-weight: 300;
  font-size: clamp(15px, 1.1vw, 17px);
  font-style: italic;
  color: #B8A898;
  line-height: 1.7;
}

.panel-trans.small {
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* ============= SECTION 3 — DENSE ============= */
.sec-dense {
  min-height: 150vh;
  background: #3A3A48;
  padding: 14vh 5vw 8vh 8vw;
}

.dense-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10vh;
  max-width: 1200px;
}

.dense-block {
  position: relative;
}

.dense-tilt-a {
  margin-left: 0;
  max-width: 720px;
  transform: rotate(-1deg);
}

.dense-tilt-b {
  margin-left: auto;
  max-width: 580px;
  transform: rotate(1.5deg);
  text-align: left;
  padding-right: 2vw;
}

.dense-h {
  font-weight: 800;
  font-size: clamp(40px, 6vw, 92px);
  line-height: 0.95;
  color: #C88870;
  letter-spacing: -0.03em;
  margin-bottom: 4vh;
}

.dense-h.alt-h {
  color: #6A9878;
  text-align: right;
  font-size: clamp(56px, 10vw, 160px);
}

.dense-p {
  font-weight: 400;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.8;
  color: #B8A898;
  margin-bottom: 2.4vh;
  max-width: 60ch;
}

.dense-p.alt {
  color: #E8E4E0;
  font-style: italic;
  font-weight: 300;
}

.dense-p.mono-p {
  font-weight: 300;
  font-size: clamp(13px, 1vw, 15px);
  letter-spacing: 0.08em;
  color: #48A8A0;
  margin-top: 4vh;
}

.dense-fragment {
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6A9878;
  margin-top: 5vh;
}

/* ============= SECTION 4 — THIN ============= */
.sec-thin {
  height: 20vh;
  background: #1A1A28;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4vw;
}

.thin-line {
  font-weight: 300;
  font-style: italic;
  font-size: clamp(14px, 1.3vw, 18px);
  color: #B8A898;
  text-align: center;
  transform: rotate(-1.5deg);
  letter-spacing: 0.02em;
}

/* ============= SECTION 5 — COLLAGE ============= */
.sec-collage {
  min-height: 120vh;
  background: #1A1A28;
  padding: 10vh 4vw;
  position: relative;
}

.collage-stack {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  height: 90vh;
}

.collage-piece {
  position: absolute;
  background: rgba(58, 58, 72, 0.7);
  border: 1px solid rgba(184, 168, 152, 0.15);
  padding: 3vh 3vw;
  max-width: 460px;
}

.collage-piece p {
  font-weight: 400;
  font-size: clamp(15px, 1.4vw, 20px);
  line-height: 1.5;
  color: #E8E4E0;
}

.piece-label {
  display: block;
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: #48A8A0;
  margin-bottom: 1.2vh;
}

.piece-1 { top: 4%;  left: 2%;   transform: rotate(-2deg); }
.piece-2 { top: 18%; left: 48%;  transform: rotate(1.5deg);  background: rgba(72, 168, 160, 0.10); border-color: rgba(72, 168, 160, 0.3); }
.piece-3 { top: 38%; left: 14%;  transform: rotate(-1deg);   background: rgba(200, 136, 112, 0.10); border-color: rgba(200, 136, 112, 0.3); }
.piece-4 { top: 56%; left: 52%;  transform: rotate(2.4deg); }
.piece-5 { top: 74%; left: 8%;   transform: rotate(-2.6deg); background: rgba(106, 152, 120, 0.10); border-color: rgba(106, 152, 120, 0.3); }

.piece-3 .piece-label { color: #C88870; }
.piece-5 .piece-label { color: #6A9878; }

/* ============= SECTION 6 — TILT (multi-panel) ============= */
.sec-tilt {
  min-height: 110vh;
  background: #3A3A48;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8vh;
  padding: 12vh 6vw;
  perspective: 800px;
}

.panel-2 {
  transform: perspective(800px) rotateX(3deg) rotateY(-2deg);
  margin-left: 6vw;
  background: rgba(26, 26, 40, 0.5);
}

.panel-3 {
  transform: perspective(800px) rotateX(-2deg) rotateY(3deg);
  margin-left: auto;
  margin-right: 4vw;
  padding: 3vh 4vw;
  max-width: 380px;
  background: transparent;
  border: none;
}

.panel-trans.italic { font-style: italic; }

/* ============= SECTION 7 — WHISPER ============= */
.sec-whisper {
  min-height: 60vh;
  background: #1A1A28;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6vh 4vw;
  gap: 4vh;
}

.whisper-text {
  font-weight: 300;
  font-size: 13px;
  font-style: italic;
  color: #B8A898;
  letter-spacing: 0.02em;
  text-align: center;
  transform: rotate(2deg);
}

.whisper-meta {
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #48A8A0;
}

/* ============= SECTION 8 — SILENCE ============= */
.sec-silence {
  height: 100vh;
  background: #1A1A28;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: opacity 1.2s ease;
}

.sec-silence .grain-layer {
  transition: opacity 1.6s ease;
}

.silence-line {
  font-weight: 300;
  font-style: italic;
  font-size: 13px;
  color: #B8A898;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 320px;
}

/* ============= SECTION 9 — CODA ============= */
.sec-coda {
  min-height: 70vh;
  background: #3A3A48;
  padding: 12vh 5vw;
  display: flex;
  align-items: center;
}

.coda-block {
  max-width: 720px;
  margin-left: 6vw;
}

.coda-domain {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: clamp(48px, 9vw, 132px);
  letter-spacing: -0.04em;
  color: #E8E4E0;
  line-height: 0.95;
  margin-bottom: 2vh;
}

.coda-tag {
  font-weight: 300;
  font-style: italic;
  font-size: clamp(14px, 1.2vw, 18px);
  color: #C88870;
  margin-bottom: 5vh;
  letter-spacing: 0.02em;
}

.coda-list {
  list-style: none;
  margin-bottom: 5vh;
}

.coda-list li {
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #B8A898;
  padding: 0.7vh 0;
  border-bottom: 1px dotted rgba(184, 168, 152, 0.25);
}

.coda-list li:nth-child(2n) { color: #48A8A0; transform: translateX(2vw); }
.coda-list li:nth-child(3n) { color: #6A9878; transform: translateX(-1vw); }

.coda-stamp {
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #6A9878;
  font-family: "Nunito", monospace;
}

/* ============= RESPONSIVE TWEAKS ============= */
@media (max-width: 720px) {
  .hero-domain { font-size: clamp(48px, 24vw, 140px); }
  .hero-korean { margin-left: 4vw; }
  .metadata-strip { flex-direction: column; gap: 0.6vh; align-items: flex-start; }
  .panel-1, .panel-2 { margin-left: 0; }
  .panel-3 { margin-right: 0; margin-left: 0; }
  .dense-tilt-b { margin-left: 0; }
  .collage-stack { height: auto; }
  .collage-piece { position: relative; top: auto !important; left: auto !important; max-width: 100%; margin-bottom: 4vh; }
  .coda-block { margin-left: 0; }
}
