:root {
  /* Guidelines* */
  --terra: #c8714d;
  --clay: #5c3d2e;
  --coral: #e8553d;
  --cream: #faf3eb;
  --peach: #f2d4c2;
  --white: #fef9f4;
  --charcoal: #3a3330;
  --ochre: #d4952b;
  --radius: clamp(16px, 2.5vw, 28px);
  --hard-shadow: 4px 4px 0px var(--clay);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: "Nunito", sans-serif;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.65;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

.page-shell { min-height: 100vh; background: var(--cream); }

h1, h2, h3, .quote {
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--clay);
}

.hand-note, .annotation, [lang="ja"] {
  font-family: "Caveat", cursive;
  font-feature-settings: 'palt';
}

.hero-wave {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(254, 249, 244, 0.18) 0 10%, transparent 10.5%),
    radial-gradient(circle at 82% 18%, rgba(232, 85, 61, 0.12) 0 8%, transparent 8.5%),
    linear-gradient(155deg, var(--terra), #d7835e 55%, var(--c8714d, #c8714d));
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(92, 61, 46, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(254, 249, 244, 0.08) 25%, transparent 25%);
  background-size: 7px 7px, 26px 26px;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: min(1120px, calc(100vw - 32px));
  text-align: center;
  padding: clamp(26px, 5vw, 60px);
  border: 3px solid var(--clay);
  border-radius: clamp(24px, 4vw, 48px);
  background: rgba(254, 249, 244, 0.34);
  box-shadow: 8px 8px 0 var(--clay);
  backdrop-filter: blur(1px);
}

.hero-copy .hand-note {
  margin: 0 0 0.5rem;
  color: var(--white);
  font-size: clamp(1.15rem, 2.2vw, 2rem);
  text-shadow: 2px 2px 0 var(--clay);
}

h1 {
  margin: 0;
  font-size: clamp(3.8rem, 13vw, 11rem);
  color: var(--white);
  text-shadow: 5px 5px 0 var(--clay);
}

.subtitle {
  margin: clamp(16px, 2vw, 24px) 0 0;
  font-size: clamp(1.15rem, 2vw, 2rem);
  font-weight: 800;
  color: var(--clay);
}

.subtitle [lang="ja"] { color: var(--white); font-size: 1.25em; text-shadow: 2px 2px 0 var(--clay); }

.pin-strip {
  width: min(620px, 60vw);
  margin: clamp(18px, 3vw, 32px) auto 0;
  display: flex;
  justify-content: space-between;
}

.pin-strip span, .card-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
  border: 2px solid var(--clay);
  box-shadow: 2px 2px 0 rgba(92, 61, 46, 0.35);
}

.hero-wave-svg {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 37vh;
  z-index: 2;
}

.wave-fill { fill: rgba(242, 212, 194, 0.58); }
.wave-line { fill: none; stroke: var(--clay); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 34 18; }
.wave-line.ghost { stroke-width: 4; opacity: 0.42; stroke-dasharray: 18 20; }

.wave-divider {
  height: clamp(70px, 10vw, 130px);
  margin: -1px 0;
  background: var(--cream);
  overflow: hidden;
}

.wave-divider svg { width: 100%; height: 100%; display: block; }
.wave-divider path { fill: none; stroke: var(--clay); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 28 16; }
.divider-fast { background: linear-gradient(var(--cream), var(--terra)); }
.divider-compound { background: linear-gradient(var(--terra), var(--cream)); }

.workshop {
  padding: clamp(64px, 9vw, 130px) clamp(18px, 4vw, 72px) clamp(86px, 12vw, 160px);
  background:
    radial-gradient(circle at 12% 18%, rgba(212, 149, 43, 0.16), transparent 22%),
    radial-gradient(circle at 88% 44%, rgba(232, 85, 61, 0.13), transparent 21%),
    var(--cream);
}

.section-heading {
  width: min(940px, 100%);
  margin: 0 auto clamp(38px, 7vw, 82px);
  text-align: center;
}

.section-heading .hand-note {
  margin: 0 0 0.3rem;
  color: var(--coral);
  font-size: clamp(1.2rem, 2vw, 2rem);
}

h2 { margin: 0; font-size: clamp(2.4rem, 6vw, 5.5rem); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
}

.paradox-card {
  position: relative;
  min-height: 250px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius);
  border: 3px solid var(--clay);
  background-color: var(--peach);
  background-image:
    radial-gradient(circle at 50% 50%, rgba(200, 113, 77, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, rgba(92, 61, 46, 0.02) 25%, transparent 25%);
  background-size: 4px 4px, 18px 18px;
  box-shadow: var(--hard-shadow);
  opacity: 0;
  transform: translateY(24px);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out, opacity 520ms ease-out;
  overflow: visible;
}

.paradox-card:nth-child(2n) { transform: translateY(clamp(24px, 4vw, 48px)); }
.paradox-card.is-visible { opacity: 1; transform: translateY(0); }
.paradox-card:nth-child(2n).is-visible { transform: translateY(clamp(24px, 4vw, 48px)); }
.paradox-card:hover { transform: translateY(-4px); box-shadow: 6px 6px 0px var(--clay); }
.paradox-card:nth-child(2n):hover { transform: translateY(calc(clamp(24px, 4vw, 48px) - 4px)); }

.paradox-card::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
  border: 2px solid var(--clay);
  transform-origin: center;
}

.paradox-card.pin-bounce::before { animation: pinBounce 400ms ease-out; }
.card-dot { margin-bottom: 20px; }

@keyframes pinBounce {
  0% { transform: scale(1); }
  45% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.tall { grid-row: span 3; min-height: 430px; }
.medium { grid-row: span 2; min-height: 340px; }
.short { grid-row: span 1; }

.label {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.15rem 0.75rem;
  border: 2px solid var(--clay);
  border-radius: 999px;
  background: var(--white);
  color: var(--clay);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h3 { margin: 0 0 1rem; font-size: clamp(1.5rem, 3vw, 2.8rem); }
.paradox-card p { margin: 0.8rem 0 0; }
.quote { margin: 0; font-size: clamp(2rem, 4vw, 4.1rem); color: var(--clay); }
.annotation { color: var(--coral); font-size: clamp(0.9rem, 1.3vw, 1.2rem); filter: blur(2px); opacity: 0; transition: filter 500ms ease, opacity 500ms ease; }
.is-visible .annotation, .reveal-note.is-visible .annotation { filter: blur(0); opacity: 1; }

.card-icon, .line-hero {
  width: 100%;
  max-height: 165px;
  margin: 18px 0 0;
  fill: none;
  stroke: var(--clay);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-hero { min-height: 145px; }
.mini-wave { width: 100%; margin-top: 26px; fill: none; stroke: var(--clay); stroke-width: 5; stroke-linecap: round; }
.card-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  border-radius: 0 0 calc(var(--radius) - 3px) calc(var(--radius) - 3px);
  overflow: hidden;
  background: repeating-radial-gradient(circle at 15px 20px, rgba(212, 149, 43, 0.34) 0 4px, transparent 4px 20px);
}

.card-wave::before {
  content: "";
  position: absolute;
  inset: 14px -20px auto;
  height: 36px;
  border-top: 5px solid var(--clay);
  border-radius: 50%;
  transform: skewX(-18deg);
}

.quote-card { display: flex; flex-direction: column; justify-content: space-between; background-color: var(--white); }
.coral-card { background-color: var(--coral); }
.coral-card .quote, .coral-card p { color: var(--white); text-shadow: 2px 2px 0 var(--clay); }
.ochre-card { background-color: #edd5a0; }

.wave-wall {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--terra);
  display: grid;
  place-items: center;
}

.wave-wall::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(254, 249, 244, 0.14) 1px, transparent 1px);
  background-size: 14px 14px;
}

.wall-wave {
  position: absolute;
  left: 0;
  width: 100%;
  height: 70vh;
  will-change: transform;
}

.wall-wave path:first-child { fill: rgba(242, 212, 194, 0.48); }
.wall-wave path:last-child { fill: none; stroke: var(--clay); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 32 18; }
.wall-wave.back { bottom: 18vh; opacity: 0.52; }
.wall-wave.back path:first-child { fill: rgba(254, 249, 244, 0.28); }
.wall-wave.mid { bottom: 4vh; opacity: 0.78; }
.wall-wave.mid path:first-child { fill: rgba(212, 149, 43, 0.38); }
.wall-wave.front { bottom: -10vh; opacity: 0.96; }
.wall-wave.front path:first-child { fill: rgba(242, 212, 194, 0.64); }

.wall-fragments {
  position: relative;
  z-index: 4;
  width: min(1000px, calc(100vw - 34px));
  min-height: 68vh;
  will-change: transform;
}

.fragment {
  position: absolute;
  margin: 0;
  padding: clamp(18px, 3vw, 30px);
  border: 3px solid var(--clay);
  border-radius: var(--radius);
  background: rgba(254, 249, 244, 0.86);
  box-shadow: 5px 5px 0 var(--clay);
  color: var(--clay);
  font-weight: 800;
  max-width: 560px;
}

.fragment.ja { top: 4%; left: 2%; font-size: clamp(2.2rem, 5vw, 5rem); }
.fragment.en { top: 32%; right: 0; font-size: clamp(1.35rem, 2.4vw, 2.5rem); line-height: 1.2; }
.fragment.small { font-size: clamp(1.3rem, 2.2vw, 2.2rem); }
.fragment.ja.small { left: 16%; bottom: 8%; background: rgba(242, 212, 194, 0.88); }
.fragment.en.small { right: 14%; bottom: -2%; background: rgba(212, 149, 43, 0.88); }

.workshop-floor {
  min-height: 42vh;
  display: grid;
  place-items: center;
  position: relative;
  padding: clamp(50px, 8vw, 100px) 24px;
  background: var(--cream);
  text-align: center;
  overflow: hidden;
}

.floor-wave {
  position: absolute;
  top: 26px;
  left: 5vw;
  right: 5vw;
  height: 26px;
  border-top: 5px solid var(--clay);
  border-radius: 50%;
  box-shadow: 0 18px 0 -13px var(--coral), 0 36px 0 -13px var(--ochre);
}

.workshop-floor p {
  margin: 0;
  font-family: "Quicksand", sans-serif;
  font-size: clamp(2rem, 5vw, 5rem);
  line-height: 1.1;
  font-weight: 700;
  color: var(--clay);
}

.workshop-floor span {
  position: absolute;
  bottom: 24px;
  right: clamp(24px, 7vw, 96px);
  font-size: clamp(2rem, 5vw, 5rem);
  color: rgba(200, 113, 77, 0.32);
}

.reveal-note { opacity: 0; transform: translateY(22px); transition: opacity 560ms ease, transform 560ms ease; }
.reveal-note.is-visible { opacity: 1; transform: translateY(0); }

@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
}

@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, minmax(280px, 1fr)); }
}

@media (min-width: 1440px) {
  .card-grid { grid-template-columns: repeat(4, minmax(280px, 1fr)); }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .paradox-card:nth-child(2n), .paradox-card:nth-child(2n).is-visible { transform: translateY(0); }
  .paradox-card:nth-child(2n):hover { transform: translateY(-4px); }
  .fragment { position: relative; inset: auto; margin: 18px 0; }
  .wall-fragments { min-height: auto; padding: 70px 0; }
}
