/* ==========================================================================
   KOTO (居処 • KOTO) — The Japandi Architectural Design System
   ========================================================================== */

:root {
  /* The Core Japandi Palette Harmony */
  --raw-washi: #F7F4EE;        /* Base Rice Paper Canvas */
  --pale-hinoki: #E8DFD1;      /* Secondary Base Timber Shade */
  --warm-clay: #B37A5C;        /* The Hearth / Terracotta Accent */
  --muted-moss: #586653;       /* The Moss Garden / Botanical Green */
  --kuro-iron: #211E1B;        /* Charred Cypress / Kuro Charcoal Text */
  
  /* Derived & Auxiliary Tones */
  --washi-tint: rgba(247, 244, 238, 0.85);
  --hinoki-dark: #D4C8B5;
  --clay-glow: rgba(179, 122, 92, 0.18);
  --moss-glow: rgba(88, 102, 83, 0.15);
  --border-subtle: rgba(33, 30, 27, 0.12);
  --border-active: rgba(179, 122, 92, 0.4);

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shoji Slide & Natural Physics */
  --ease-shoji: cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 0.8s var(--ease-shoji);
  --transition-med: 0.4s var(--ease-shoji);
  --transition-fast: 0.2s ease-out;

  /* Viewport spacing */
  --section-pad-y: clamp(5rem, 10vw, 9rem);
  --container-max: 1200px;
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--raw-washi);
  color: var(--kuro-iron);
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.75;
  background-color: var(--raw-washi);
  color: var(--kuro-iron);
  overflow-x: hidden;
  transition: background-color 0.8s ease, color 0.8s ease;
  position: relative;
}

/* Paper Grain Texture Overlay */
.svg-grain-filter {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  filter: url(#washi-texture);
  opacity: 0.55;
}

/* Ambient Canvas Background Wash */
.ambient-light-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  transition: background 1.2s ease;
  background: radial-gradient(circle at 50% 20%, rgba(232, 223, 209, 0.45) 0%, rgba(247, 244, 238, 0) 70%);
}

/* Typography Defaults */
h1, h2, h3, h4, .serif-text {
  font-family: var(--font-serif);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: var(--kuro-iron);
}

p {
  font-size: 1.05rem;
  color: rgba(33, 30, 27, 0.85);
}

em {
  font-style: italic;
  font-family: var(--font-serif);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, textarea {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

.section-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Section Header Shared Pattern */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 4rem auto;
}

.section-sub {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm-clay);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.section-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: 1.25rem;
}

.section-lead {
  font-size: 1.1rem;
  color: rgba(33, 30, 27, 0.75);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.koto-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(247, 244, 238, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-med);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  font-weight: 400;
}

.brand-mark .kanji {
  font-family: var(--font-serif);
  font-size: 1.4rem;
}

.brand-mark .sep {
  color: var(--warm-clay);
}

.brand-mark .latin {
  font-family: var(--font-serif);
  letter-spacing: 0.2em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(33, 30, 27, 0.75);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--warm-clay);
  transition: width var(--transition-fast);
}

.nav-links a:hover {
  color: var(--warm-clay);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Soundscape Pill Button */
.sound-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  background: var(--pale-hinoki);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  cursor: pointer;
  transition: all var(--transition-med);
}

.sound-toggle:hover {
  border-color: var(--warm-clay);
  background: #dfd5c4;
}

.sound-icon {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.sound-icon .bar {
  width: 2px;
  background: var(--kuro-iron);
  border-radius: 1px;
  transition: height 0.3s ease;
}

.bar-1 { height: 4px; }
.bar-2 { height: 10px; }
.bar-3 { height: 6px; }

.sound-toggle.playing .bar-1 { animation: soundBar 1.2s infinite ease-in-out; }
.sound-toggle.playing .bar-2 { animation: soundBar 0.9s infinite ease-in-out 0.2s; }
.sound-toggle.playing .bar-3 { animation: soundBar 1.4s infinite ease-in-out 0.4s; }

@keyframes soundBar {
  0%, 100% { height: 3px; }
  50% { height: 12px; }
}

.sound-label {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-cta {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.2rem;
  background: var(--kuro-iron);
  color: var(--raw-washi);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.nav-cta:hover {
  background: var(--warm-clay);
}

/* ==========================================================================
   ACT I: THE GENKAN (Arrival & Breathing Space)
   ========================================================================== */

.act-genkan {
  min-height: 100vh;
  padding-top: 7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
}

.genkan-inner {
  max-width: 900px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.genkan-vignette-frame {
  width: 100%;
  max-width: 640px;
  margin-bottom: 2.5rem;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(33, 30, 27, 0.04);
  border: 1px solid var(--border-subtle);
  background: var(--pale-hinoki);
}

.vignette-art svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Vignette subtle animations */
.sunbeam-anim {
  animation: sunFloat 8s infinite alternate ease-in-out;
}

@keyframes sunFloat {
  0% { opacity: 0.7; transform: translateX(-5px); }
  100% { opacity: 0.95; transform: translateX(5px); }
}

.ripple-anim {
  animation: rippleGrow 6s infinite ease-out;
  transform-origin: 295px 264px;
}

.ripple-anim.delay-1 {
  animation-delay: 3s;
}

@keyframes rippleGrow {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.camellia-leaf {
  animation: leafDrift 7s infinite ease-in-out alternate;
  transform-origin: 285px 255px;
}

@keyframes leafDrift {
  0% { transform: translate(285px, 255px) rotate(-15deg); }
  100% { transform: translate(287px, 257px) rotate(-10deg); }
}

.genkan-content .sub-lead {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--warm-clay);
  margin-bottom: 1rem;
  display: block;
}

.hero-title {
  font-size: clamp(2.8rem, 5.5vw, 4.4rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-desc {
  max-width: 620px;
  margin: 0 auto 3rem auto;
  font-size: 1.15rem;
  color: rgba(33, 30, 27, 0.8);
}

/* 4-Second Breathing Indicator */
.breath-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity var(--transition-fast);
}

.breath-indicator:hover {
  opacity: 1;
}

.breath-cycle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.breath-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--warm-clay);
  animation: breathPulse 4s infinite ease-in-out;
}

.breath-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--warm-clay), transparent);
  margin-top: 4px;
}

@keyframes breathPulse {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.4;
    box-shadow: 0 0 0 0 rgba(179, 122, 92, 0.4);
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
    box-shadow: 0 0 12px 4px rgba(179, 122, 92, 0.3);
  }
}

.breath-text {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--kuro-iron);
}

/* ==========================================================================
   ACT II: THE DIALOGUE (Ma & Hygge)
   ========================================================================== */

.act-dialogue {
  padding: var(--section-pad-y) 0;
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.dialogue-quote-wrapper {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 5rem auto;
  position: relative;
}

.quote-kanji {
  font-family: var(--font-serif);
  font-size: 6rem;
  color: var(--pale-hinoki);
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  opacity: 0.6;
}

.central-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-style: italic;
  line-height: 1.4;
  color: var(--kuro-iron);
  margin-bottom: 2rem;
}

.quote-divider {
  width: 40px;
  height: 1px;
  background: var(--warm-clay);
  margin: 0 auto;
}

.dialogue-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3.5rem;
}

.dialogue-card {
  background: var(--pale-hinoki);
  padding: 3rem;
  border-radius: 2px;
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.dialogue-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(33, 30, 27, 0.05);
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.badge-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.moss-badge {
  background: rgba(88, 102, 83, 0.12);
  color: var(--muted-moss);
}

.moss-badge .dot {
  background: var(--muted-moss);
}

.clay-badge {
  background: rgba(179, 122, 92, 0.12);
  color: var(--warm-clay);
}

.clay-badge .dot {
  background: var(--warm-clay);
}

.card-visual {
  background: var(--raw-washi);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.card-visual svg {
  max-width: 100%;
  height: 160px;
  margin-bottom: 0.8rem;
}

.visual-caption {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: rgba(33, 30, 27, 0.6);
  font-style: italic;
}

.dialogue-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.dialogue-body {
  font-size: 1rem;
  color: rgba(33, 30, 27, 0.8);
}

.glow-pulse {
  animation: candleFlicker 3s infinite alternate ease-in-out;
}

@keyframes candleFlicker {
  0% { transform: scale(0.9); opacity: 0.2; }
  100% { transform: scale(1.1); opacity: 0.45; }
}

/* ==========================================================================
   ACT III: THE SANCTUARIES (Horizontal Showcase)
   ========================================================================== */

.act-sanctuaries {
  padding: var(--section-pad-y) 0;
  background: #f1ecdf;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.sanctuary-slider-wrapper {
  position: relative;
}

.sanctuary-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.sanctuary-card {
  background: var(--raw-washi);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-med);
  position: relative;
}

.sanctuary-card:hover {
  border-color: var(--border-active);
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(33, 30, 27, 0.06);
}

.card-num {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--warm-clay);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.card-image-box {
  position: relative;
  height: 200px;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1.8rem;
  border: 1px solid var(--border-subtle);
}

.abstract-pavilion {
  width: 100%;
  height: 100%;
  position: relative;
}

.alcove-bg {
  background: linear-gradient(135deg, #e8dfd1 0%, #c4b69d 100%);
}

.alcove-bg .tatami-base {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 35%;
  background: #b5aa94;
  border-top: 2px solid #586653;
}

.alcove-bg .hearth-ember {
  position: absolute;
  bottom: 15px;
  right: 35px;
  width: 14px;
  height: 14px;
  background: #B37A5C;
  border-radius: 50%;
  box-shadow: 0 0 10px #B37A5C;
}

.fjord-bg {
  background: linear-gradient(135deg, #44413c 0%, #2b2825 100%);
}

.fjord-bg .oak-bench {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 30%;
  background: #8c7355;
}

.fjord-bg .felt-acoustic-panel {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 70px;
  height: 90px;
  background: #5c5852;
  border-radius: 2px;
}

.komorebi-bg {
  background: linear-gradient(135deg, #ded2be 0%, #bcab92 100%);
}

.komorebi-bg .cedar-daybed {
  position: absolute;
  bottom: 0;
  left: 15%;
  width: 70%;
  height: 40%;
  background: #a89477;
  border-top: 3px solid #F7F4EE;
}

.acoustic-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  background: rgba(33, 30, 27, 0.85);
  color: #F7F4EE;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.chamber-name {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.chamber-desc {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  color: rgba(33, 30, 27, 0.78);
}

.spec-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.spec-pills .pill {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  background: var(--pale-hinoki);
  border-radius: 12px;
  color: var(--kuro-iron);
}

.inspect-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--kuro-iron);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.inspect-btn:hover {
  color: var(--warm-clay);
}

.inspect-btn .arrow {
  transition: transform var(--transition-fast);
}

.inspect-btn:hover .arrow {
  transform: translateX(4px);
}

.slider-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.slider-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--raw-washi);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.slider-btn:hover {
  background: var(--kuro-iron);
  color: var(--raw-washi);
}

.slider-dots {
  display: flex;
  gap: 0.5rem;
}

.slider-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(33, 30, 27, 0.2);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-dots .dot.active {
  background: var(--warm-clay);
  width: 20px;
  border-radius: 4px;
}

/* ==========================================================================
   ACT IV: THE TACTILE PROVENANCE (Raw Materials)
   ========================================================================== */

.act-provenance {
  padding: var(--section-pad-y) 0;
}

.provenance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-bottom: 4.5rem;
}

.material-quadrant {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 2rem;
  background: var(--pale-hinoki);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  transition: border-color var(--transition-fast);
}

.material-quadrant:hover {
  border-color: var(--border-active);
}

.material-swatch {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-end;
  padding: 0.4rem;
}

.origin-tag {
  font-size: 0.62rem;
  background: rgba(247, 244, 238, 0.9);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  letter-spacing: 0.04em;
}

.swatch-hinoki {
  background: #ecd9bd;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(179, 122, 92, 0.1) 10px, rgba(179, 122, 92, 0.1) 20px);
}

.swatch-wool {
  background: #ded7ce;
  background-image: radial-gradient(rgba(88, 102, 83, 0.2) 15%, transparent 16%), radial-gradient(rgba(33, 30, 27, 0.15) 15%, transparent 16%);
  background-size: 12px 12px;
}

.swatch-washi {
  background: #faf6eb;
  background-image: linear-gradient(90deg, transparent 95%, rgba(179, 122, 92, 0.2) 95%), linear-gradient(0deg, transparent 95%, rgba(179, 122, 92, 0.2) 95%);
  background-size: 15px 15px;
}

.swatch-clay {
  background: #cfbeab;
  background-image: radial-gradient(#bfa993 20%, transparent 20%);
  background-size: 8px 8px;
}

.material-name {
  font-size: 1.45rem;
  margin-bottom: 0.6rem;
}

.material-desc {
  font-size: 0.95rem;
  color: rgba(33, 30, 27, 0.8);
}

.wabi-sabi-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
  padding: 1.5rem 2rem;
  border-left: 2px solid var(--warm-clay);
  background: var(--pale-hinoki);
}

.botanical-seal-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.seal-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--kuro-iron);
}

/* ==========================================================================
   ACT V: THE DAILY RITUAL (Interactive Light & Sound Canvas)
   ========================================================================== */

.act-ritual {
  padding: var(--section-pad-y) 0;
  background: #EDE6D8;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.ritual-stage {
  max-width: 900px;
  margin: 0 auto;
}

/* Dial Control */
.dial-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
  background: var(--raw-washi);
  padding: 1.5rem 2rem;
  border-radius: 30px;
  border: 1px solid var(--border-subtle);
}

.time-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: rgba(33, 30, 27, 0.6);
  transition: color var(--transition-fast);
}

.time-label.active {
  color: var(--kuro-iron);
  font-weight: 500;
}

.time-kanji {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--warm-clay);
}

.slider-track-wrap {
  flex-grow: 1;
  position: relative;
  display: flex;
  align-items: center;
}

input[type="range"]#atmosphereSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #D4C8B5;
  border-radius: 2px;
  cursor: pointer;
}

input[type="range"]#atmosphereSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #B37A5C;
  border: 3px solid #F7F4EE;
  box-shadow: 0 2px 6px rgba(33, 30, 27, 0.25);
  cursor: grab;
  transition: transform var(--transition-fast);
}

input[type="range"]#atmosphereSlider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.15);
}

/* Ritual Canvas Box */
.ritual-canvas-box {
  position: relative;
  background: #f7f3ea;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 40px rgba(33, 30, 27, 0.08);
  transition: background-color 0.8s ease;
}

.light-gradient-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 40%, rgba(255, 235, 204, 0.6) 0%, rgba(179, 122, 92, 0.1) 60%, rgba(33, 30, 27, 0) 100%);
  transition: opacity 0.8s ease, background 0.8s ease;
}

.chamber-live-svg {
  width: 100%;
  height: auto;
  display: block;
}

.steam-line {
  animation: steamRise 4s infinite linear;
}

.steam-line.delay-1 {
  animation-delay: 2s;
}

@keyframes steamRise {
  0% { transform: translateY(0) scaleX(1); opacity: 0; }
  50% { opacity: 0.6; }
  100% { transform: translateY(-30px) scaleX(1.4); opacity: 0; }
}

.ritual-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.8rem;
  background: rgba(247, 244, 238, 0.95);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

.sound-state-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warm-clay);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ==========================================================================
   ACT VI: THE GATHERING (The Guest Register)
   ========================================================================== */

.act-gathering {
  padding: var(--section-pad-y) 0;
}

.hocho-register-wrapper {
  max-width: 780px;
  margin: 0 auto;
  background: var(--pale-hinoki);
  border: 1px solid #D4C8B5;
  border-radius: 2px;
  box-shadow: 0 20px 48px rgba(33, 30, 27, 0.05);
  display: flex;
  position: relative;
}

.hocho-spine {
  width: 60px;
  background: #ded2be;
  border-right: 1px dashed #bba990;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem 0;
}

.vertical-kanji {
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  color: var(--kuro-iron);
}

.thread-stitch {
  width: 18px;
  height: 3px;
  background: var(--warm-clay);
}

.hocho-content {
  flex-grow: 1;
  padding: 4rem;
}

.hocho-header {
  margin-bottom: 2.5rem;
}

.register-title {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.register-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(33, 30, 27, 0.75);
}

.koto-inquiry-form {
  position: relative;
}

.field-group {
  margin-bottom: 1.8rem;
}

.field-group label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--kuro-iron);
}

.field-group input[type="text"],
.field-group input[type="email"],
.field-group textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: var(--raw-washi);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  font-size: 1rem;
  color: var(--kuro-iron);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.field-group input:focus,
.field-group textarea:focus {
  border-color: var(--warm-clay);
  background: #fff;
}

.intentions-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.intention-pill {
  position: relative;
  cursor: pointer;
}

.intention-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.intention-pill .pill-label {
  display: block;
  padding: 0.7rem 0.5rem;
  background: var(--raw-washi);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  text-align: center;
  font-size: 0.82rem;
  transition: all var(--transition-fast);
}

.intention-pill input:checked + .pill-label {
  background: var(--kuro-iron);
  color: var(--raw-washi);
  border-color: var(--kuro-iron);
}

.form-footer {
  margin-top: 2.5rem;
}

.submit-inquiry-btn {
  width: 100%;
  padding: 1.1rem 2rem;
  background: var(--warm-clay);
  color: var(--raw-washi);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  font-weight: 500;
}

.submit-inquiry-btn:hover {
  background: #9c674b;
  transform: translateY(-2px);
}

.limited-edition-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  text-align: center;
  color: rgba(33, 30, 27, 0.6);
  font-style: italic;
}

/* Post-Submission Ensō Transition */
.enso-dissolve-state {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  animation: fadeIn 0.8s ease forwards;
}

.enso-animation-box {
  width: 130px;
  height: 130px;
  margin: 0 auto 2rem auto;
}

.enso-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.enso-circle-path {
  fill: none;
  stroke: var(--kuro-iron);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 410;
  stroke-dashoffset: 410;
  animation: drawEnso 1.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes drawEnso {
  to {
    stroke-dashoffset: 40; /* deliberate break symbolizing wabi-sabi imperfection */
  }
}

.enso-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.enso-message {
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto 2rem auto;
  color: rgba(33, 30, 27, 0.8);
}

.reset-register-btn {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-clay);
  cursor: pointer;
  text-decoration: underline;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   SPECIMEN DRAWER MODAL (Shoji Slide Physics)
   ========================================================================== */

.specimen-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(33, 30, 27, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.specimen-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.specimen-drawer {
  width: 100%;
  max-width: 520px;
  height: 100%;
  background: var(--raw-washi);
  box-shadow: -10px 0 40px rgba(33, 30, 27, 0.15);
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-shoji);
  display: flex;
  flex-direction: column;
  padding: 3.5rem 3rem;
  position: relative;
  overflow-y: auto;
}

.specimen-modal-backdrop.open .specimen-drawer {
  transform: translateX(0);
}

.close-drawer-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--kuro-iron);
}

.drawer-sub {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--warm-clay);
  display: block;
  margin-bottom: 0.5rem;
}

.drawer-title {
  font-size: 2.2rem;
  margin-bottom: 2rem;
}

.drawer-spec-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.spec-item {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.spec-item-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(33, 30, 27, 0.6);
  margin-bottom: 0.3rem;
}

.spec-item-value {
  font-size: 1.05rem;
  color: var(--kuro-iron);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.koto-footer {
  background: var(--pale-hinoki);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 3rem 0;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.footer-brand .footer-kanji {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.95rem;
  color: rgba(33, 30, 27, 0.7);
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  font-size: 0.8rem;
  color: rgba(33, 30, 27, 0.6);
}

.atelier-locations {
  display: flex;
  gap: 2rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile Devices)
   ========================================================================== */

@media (max-width: 992px) {
  .dialogue-columns,
  .sanctuary-track,
  .provenance-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nav-links {
    display: none;
  }

  .hocho-register-wrapper {
    flex-direction: column;
  }

  .hocho-spine {
    width: 100%;
    height: 40px;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px dashed #bba990;
    padding: 0 2rem;
  }

  .vertical-kanji {
    writing-mode: horizontal-tb;
  }

  .hocho-content {
    padding: 2.5rem 1.8rem;
  }

  .intentions-selector {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}
