/* mujun.art -- expressive abstract canvas */
/* Palette: jewel tone */
:root {
  --canvas-deep: #1A0A20;
  --ruby: #C02040;
  --emerald: #20A050;
  --sapphire: #2040B0;
  --gold: #D0A030;
  --cream: #F0E8D0;
  --violet: #3A1A40;

  --font-logo: "Fraunces", Georgia, serif;
  --font-body: "Lora", Georgia, serif;
  --font-hand: "Caveat", cursive;
}

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

html, body {
  background: var(--canvas-deep);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.75;
  overflow-x: hidden;
}

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

/* Canvas texture overlay -- linen weave */
.canvas-texture {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}

/* Splatter layer (JS injects splatters) */
#splatter-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: visible;
}

main {
  position: relative;
  z-index: 2;
}

/* Sections */
.section {
  position: relative;
  width: 100%;
  padding: clamp(48px, 8vw, 120px) clamp(24px, 6vw, 96px);
  overflow: hidden;
}

.section-head {
  margin-bottom: clamp(32px, 5vw, 64px);
}

/* HERO */
.section-hero {
  min-height: 100vh;
  display: block;
  background: var(--canvas-deep);
}

.hero-painting {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-painting .brush {
  stroke-dasharray: 4000;
  stroke-dashoffset: 4000;
  opacity: 0.92;
  animation: drawBrush 2.2s cubic-bezier(.55,.12,.32,.98) forwards;
}
.hero-painting .brush-2 { animation-delay: 0.18s; }
.hero-painting .brush-3 { animation-delay: 0.34s; }
.hero-painting .brush-4 { animation-delay: 0.5s; }

.hero-painting .drip {
  opacity: 0;
  transform-origin: center;
  animation: dripIn 0.6s ease-out forwards;
}
.hero-painting .drip:nth-of-type(5) { animation-delay: 1.4s; }
.hero-painting .drip:nth-of-type(6) { animation-delay: 1.6s; }
.hero-painting .drip:nth-of-type(7) { animation-delay: 1.8s; }

@keyframes drawBrush {
  to { stroke-dashoffset: 0; }
}
@keyframes dripIn {
  from { opacity: 0; transform: scale(0.6) translateY(-12px); }
  to   { opacity: 0.78; transform: scale(1) translateY(0); }
}

.logotype {
  position: relative;
  z-index: 3;
  font-family: var(--font-logo);
  font-size: clamp(48px, 9vw, 132px);
  font-weight: 600;
  font-variation-settings: "wght" 600, "opsz" 144;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-top: clamp(36px, 14vh, 200px);
  margin-left: clamp(20px, 6vw, 96px);
  max-width: 90%;
  line-height: 0.96;
}

.logotype .vchar {
  display: inline-block;
  font-variation-settings: "wght" var(--w, 600), "opsz" 144;
  transition: font-variation-settings 0.6s cubic-bezier(.5,.1,.3,1);
}

.hero-tagline {
  position: relative;
  z-index: 3;
  font-family: var(--font-body);
  font-size: clamp(17px, 1.6vw, 24px);
  color: var(--cream);
  max-width: 38ch;
  margin: clamp(20px, 3vh, 36px) 0 0 clamp(28px, 7vw, 110px);
  font-style: italic;
}

.hero-tagline em {
  color: var(--gold);
  font-style: italic;
}

.hero-label {
  position: relative;
  z-index: 3;
  font-family: var(--font-hand);
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--gold);
  margin: clamp(16px, 2vh, 24px) 0 0 clamp(36px, 8vw, 130px);
  letter-spacing: 0.02em;
}

.hero-jump {
  position: absolute;
  z-index: 3;
  right: clamp(28px, 7vw, 96px);
  bottom: clamp(36px, 7vh, 80px);
  font-family: var(--font-hand);
  font-size: clamp(20px, 2vw, 28px);
  color: var(--cream);
  text-decoration: none;
  padding: 14px 24px;
  background: rgba(192, 32, 64, 0.18);
  border: 1px solid rgba(208, 160, 48, 0.5);
  clip-path: polygon(8% 0, 96% 6%, 100% 88%, 4% 100%);
  transition: background 0.4s ease, color 0.4s ease, transform 0.4s ease;
}
.hero-jump:hover {
  background: var(--ruby);
  color: var(--cream);
  transform: rotate(-1.2deg);
}

/* MANIFESTO */
.section-manifesto {
  background: var(--canvas-deep);
  padding-top: clamp(80px, 12vw, 180px);
  padding-bottom: clamp(80px, 12vw, 180px);
}

.bg-paint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.organic-block {
  position: relative;
  z-index: 2;
  background: rgba(58, 26, 64, 0.86);
  color: var(--cream);
  padding: clamp(28px, 4vw, 56px) clamp(32px, 5vw, 72px);
  max-width: 56ch;
  margin-bottom: clamp(40px, 6vw, 80px);
}

.organic-a {
  margin-left: clamp(0px, 6vw, 120px);
  clip-path: polygon(2% 4%, 96% 0, 100% 88%, 6% 100%);
  transform: rotate(-0.6deg);
}

.organic-b {
  margin-left: auto;
  margin-right: clamp(0px, 4vw, 80px);
  clip-path: polygon(0 6%, 98% 2%, 96% 94%, 4% 100%);
  background: rgba(32, 64, 176, 0.42);
  transform: rotate(0.8deg);
}

.organic-block h2,
.organic-block h3 {
  font-family: var(--font-logo);
  font-weight: 700;
  font-variation-settings: "wght" 700, "opsz" 144;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: clamp(16px, 2vw, 28px);
  color: var(--gold);
}

.organic-block h3 {
  font-size: clamp(24px, 3vw, 40px);
  color: var(--cream);
}

.organic-block p {
  font-size: clamp(16px, 1.2vw, 19px);
  color: var(--cream);
  font-family: var(--font-body);
}

.annotation {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: clamp(18px, 1.4vw, 22px);
  color: var(--gold);
  margin-bottom: 12px;
  padding: 4px 10px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease, color 0.4s ease;
}
.annotation:hover {
  transform: rotate(1.5deg) scale(1.05);
  color: var(--ruby);
}

/* COMPOSITIONS gallery */
.section-compositions {
  background: linear-gradient(180deg, var(--canvas-deep) 0%, #160820 100%);
  padding-top: clamp(80px, 11vw, 160px);
  padding-bottom: clamp(80px, 11vw, 160px);
}

.section-head h2 {
  font-family: var(--font-logo);
  font-weight: 700;
  font-variation-settings: "wght" 700, "opsz" 144;
  font-size: clamp(32px, 5vw, 64px);
  color: var(--cream);
  letter-spacing: -0.01em;
  margin-top: 8px;
}

.canvas-flow {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4vw, 64px);
  align-items: stretch;
}

.canvas-piece {
  position: relative;
  flex: 1 1 320px;
  background: rgba(58, 26, 64, 0.55);
  padding: clamp(20px, 2vw, 28px);
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(.5,.1,.3,1), background 0.45s ease;
  overflow: hidden;
}

.canvas-piece svg {
  display: block;
  width: 100%;
  height: clamp(180px, 22vw, 260px);
  background: #110510;
}

.canvas-piece h3 {
  font-family: var(--font-logo);
  font-variation-settings: "wght" 600, "opsz" 144;
  font-weight: 600;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--gold);
  margin: clamp(14px, 1.6vw, 20px) 0 4px 0;
}

.canvas-piece .meta {
  font-family: var(--font-hand);
  color: var(--cream);
  opacity: 0.7;
  font-size: clamp(15px, 1.2vw, 18px);
  margin-bottom: 10px;
}

.canvas-piece p {
  font-size: clamp(14px, 1vw, 17px);
  color: var(--cream);
  opacity: 0.92;
}

.piece-a { clip-path: polygon(4% 0, 100% 4%, 96% 100%, 0 96%); transform: rotate(-0.6deg); }
.piece-b { clip-path: polygon(0 6%, 96% 0, 100% 96%, 4% 100%); transform: rotate(0.8deg) translateY(20px); }
.piece-c { clip-path: polygon(6% 4%, 100% 0, 94% 96%, 0 100%); transform: rotate(-0.4deg); }
.piece-d { clip-path: polygon(0 0, 96% 6%, 100% 100%, 4% 94%); transform: rotate(0.5deg) translateY(14px); }

.canvas-piece:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.02);
  background: rgba(192, 32, 64, 0.22);
}

/* PROCESS */
.section-process {
  background: var(--canvas-deep);
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(80px, 12vw, 160px);
}

.process-flow {
  list-style: none;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 48px);
  max-width: 920px;
  margin: 0 auto;
}

.step {
  position: relative;
  background: rgba(58, 26, 64, 0.78);
  padding: clamp(20px, 2.5vw, 32px) clamp(24px, 3vw, 44px);
  font-family: var(--font-body);
  color: var(--cream);
  font-size: clamp(15px, 1.1vw, 18px);
}

.step-1 { clip-path: polygon(0 6%, 92% 0, 96% 88%, 4% 100%); margin-left: 0; max-width: 86%; }
.step-2 { clip-path: polygon(8% 0, 100% 4%, 92% 100%, 0 92%); margin-left: auto; max-width: 86%; }
.step-3 { clip-path: polygon(0 4%, 96% 8%, 100% 96%, 6% 100%); margin-left: 6%; max-width: 84%; }
.step-4 { clip-path: polygon(6% 0, 100% 6%, 94% 92%, 0 100%); margin-left: auto; max-width: 86%; }

.step-tag {
  display: block;
  font-family: var(--font-hand);
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

/* COLOPHON */
.section-colophon {
  background: linear-gradient(180deg, #160820 0%, var(--canvas-deep) 100%);
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(80px, 12vw, 160px);
}

.colophon-block {
  max-width: 56ch;
  margin: 0 auto;
  background: rgba(32, 64, 176, 0.18);
  padding: clamp(36px, 5vw, 72px) clamp(36px, 5vw, 72px);
  clip-path: polygon(4% 0, 96% 4%, 100% 96%, 0 100%);
  text-align: center;
}

.colophon-block h2 {
  font-family: var(--font-logo);
  font-variation-settings: "wght" 700, "opsz" 144;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 48px);
  color: var(--gold);
  margin: 8px 0 18px 0;
}

.colophon-block p {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--cream);
  margin-bottom: 18px;
}

.contact-link {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: clamp(20px, 2vw, 28px);
  color: var(--cream);
  text-decoration: none;
  padding: 10px 22px;
  background: var(--ruby);
  clip-path: polygon(6% 0, 100% 8%, 94% 100%, 0 92%);
  margin: 12px auto 18px auto;
  transition: background 0.4s ease, transform 0.4s ease;
}
.contact-link:hover {
  background: var(--gold);
  color: var(--canvas-deep);
  transform: rotate(-1deg);
}

.signature {
  font-family: var(--font-hand);
  color: var(--gold);
  opacity: 0.8;
  margin-top: 18px;
}

/* Splatter SVG dynamic styles */
.splat {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  opacity: 1;
  animation: splatterBurst 0.6s cubic-bezier(.4,.1,.3,1) forwards;
}

@keyframes splatterBurst {
  0%   { transform: translate(-50%, -50%) scale(0) rotate(0deg);   opacity: 1; }
  60%  { transform: translate(-50%, -50%) scale(1.05) rotate(8deg); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(1.3) rotate(14deg); opacity: 0; }
}

/* Reveal-on-scroll */
.section-manifesto,
.section-compositions,
.section-process,
.section-colophon {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.5,.1,.3,1);
}
.section-manifesto.is-revealed,
.section-compositions.is-revealed,
.section-process.is-revealed,
.section-colophon.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 720px) {
  .canvas-flow { flex-direction: column; }
  .step-1, .step-2, .step-3, .step-4 { max-width: 100%; margin-left: 0; }
  .organic-a, .organic-b { margin-left: 0; margin-right: 0; transform: none; }
  .hero-jump { right: 24px; bottom: 24px; }
}
