/* mysterious.day - Urban Sumi-e Aesthetic */
/* Fonts: Commissioner, Cormorant Garamond, Space Grotesk */
/* Palette: Cloud Veil, Stone Wash, Deep Plum Ink, Mountain Shadow, Haze, Faded Coral, Alpine Sage, Twilight Indigo */

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

:root {
  --cloud-veil: #F4F0F8;
  --stone-wash: #E8E0EE;
  --deep-plum: #2D2438;
  --mountain-shadow: #4A3D5C;
  --haze: #8B7FA3;
  --faded-coral: #E8A5B0;
  --alpine-sage: #A5C4B8;
  --twilight-indigo: #5B4E8C;
  --ink-light: #C4B5D8;
  --lavender-mist: #E8DDF0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--cloud-veil);
  color: var(--mountain-shadow);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.85;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  position: relative;
}

/* SVG Filters */
.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Noise Overlay - concrete wall texture */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.04;
  filter: url(#noise-filter);
  background: var(--cloud-veil);
}

/* ========== HERO VOID ========== */
.hero-void {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background-color: var(--cloud-veil);
  overflow: hidden;
}

.mountains {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  z-index: 2;
}

.mountain-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.mountain-distant {
  opacity: 0.3;
  z-index: 1;
  transform: translateY(10px);
}

.mountain-middle {
  opacity: 0.5;
  z-index: 2;
  transform: translateY(5px);
}

.mountain-foreground {
  opacity: 0.9;
  z-index: 3;
}

/* Mountain fade-in animation */
.mountain-distant,
.mountain-middle,
.mountain-foreground {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.mountain-distant {
  animation: mountain-reveal 1.5s 0.8s forwards;
}

.mountain-middle {
  animation: mountain-reveal 1.5s 1.2s forwards;
}

.mountain-foreground {
  animation: mountain-reveal 1.5s 1.6s forwards;
}

@keyframes mountain-reveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: var(--target-opacity, 0.9);
    transform: translateY(0);
  }
}

.mountain-distant {
  --target-opacity: 0.3;
}

.mountain-middle {
  --target-opacity: 0.5;
}

.mountain-foreground {
  --target-opacity: 0.9;
}

/* Domain Title */
.domain-title {
  position: absolute;
  top: 65vh;
  left: 15vw;
  font-family: 'Commissioner', sans-serif;
  font-weight: 700;
  font-variation-settings: 'wght' 700;
  font-size: clamp(56px, 10vw, 140px);
  letter-spacing: 0.04em;
  color: var(--deep-plum);
  z-index: 10;
  opacity: 0;
  filter: blur(8px);
  animation: title-emerge 2.5s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  font-style: normal;
  line-height: 1;
}

@keyframes title-emerge {
  from {
    opacity: 0;
    filter: blur(8px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

/* Calligraphic Marks */
.calligraphic-mark {
  position: absolute;
  pointer-events: none;
}

.hero-mark {
  width: 180px;
  height: 90px;
  bottom: 42%;
  right: 12%;
  z-index: 5;
  opacity: 0.15;
  transform: rotate(18deg);
}

.stroke-draw {
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
}

.stroke-draw.animate {
  animation: draw-stroke 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes draw-stroke {
  to {
    stroke-dashoffset: 0;
  }
}

/* Stroke width variation */
@keyframes stroke-pressure {
  0% { stroke-width: 1px; }
  40% { stroke-width: 4px; }
  70% { stroke-width: 2px; }
  100% { stroke-width: 1px; }
}

/* ========== STONE GARDEN ========== */
.stone-garden {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20vh 5vw 15vh;
  display: grid;
  grid-template-columns: [void] 1fr [mark] 2fr [stone] 1.5fr [void-end] 1fr;
  grid-auto-rows: auto;
  gap: 8vh 4vw;
}

.stone {
  position: relative;
  transform: rotate(var(--rotate, 0deg));
  padding: 2.5rem 2rem;
  background: transparent;
  max-width: 480px;
}

.stone-1 {
  grid-column: mark / stone;
  grid-row: 1;
}

.stone-2 {
  grid-column: stone / void-end;
  grid-row: 2;
  justify-self: end;
}

.stone-3 {
  grid-column: void / mark;
  grid-row: 3;
  padding-left: 3vw;
}

.stone-4 {
  grid-column: mark / stone;
  grid-row: 5;
}

/* Stone text */
.body-text {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--mountain-shadow);
}

.accent-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(10px, 1vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--haze);
  display: block;
  margin-bottom: 1rem;
  font-style: normal;
}

/* Spray Drift Halos */
.spray-halo {
  position: absolute;
  top: -20px;
  left: -30px;
  right: -30px;
  bottom: -20px;
  background: radial-gradient(ellipse at 40% 30%, var(--spray-color, #E8A5B0) 0%, transparent 70%);
  opacity: 0.25;
  z-index: -1;
  pointer-events: none;
  animation: spray-breathe 6s ease-in-out infinite;
}

@keyframes spray-breathe {
  0%, 100% { background-size: 100% 100%; }
  50% { background-size: 115% 115%; }
}

/* Drip Lines */
.drip-line {
  position: absolute;
  bottom: -5px;
  left: 25%;
  width: 1px;
  height: 0;
  background: var(--twilight-indigo);
  opacity: 0.3;
  transition: none;
}

.drip-line.dripping {
  animation: drip-reveal 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes drip-reveal {
  from { height: 0; }
  to { height: 80px; }
}

/* Zoom Focus Animation */
.zoom-focus {
  transform: scale(1.15) rotate(var(--rotate, 0deg));
  filter: blur(3px);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.zoom-focus.in-view {
  transform: scale(1) rotate(var(--rotate, 0deg));
  filter: blur(0);
  opacity: 1;
}

/* Ink Wash Bands */
.ink-wash-band {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
}

.band-1 {
  bottom: 30%;
  background: linear-gradient(to right, var(--deep-plum), var(--haze), var(--ink-light), transparent);
  opacity: 0.15;
  height: 2px;
}

.band-2 {
  bottom: 55%;
  background: linear-gradient(to right, transparent, var(--haze), var(--ink-light), transparent);
  opacity: 0.1;
  height: 4px;
}

.band-3 {
  bottom: 10%;
  background: linear-gradient(to right, var(--deep-plum), var(--haze), transparent);
  opacity: 0.08;
  height: 8px;
}

/* Garden calligraphic mark */
.garden-mark {
  width: 100px;
  height: 140px;
  right: 8%;
  top: 40%;
  opacity: 0.15;
  transform: rotate(25deg);
  z-index: 1;
}

/* ========== INK WASH CORRIDOR ========== */
.ink-corridor {
  position: relative;
  width: 100%;
  height: 20vh;
  min-height: 150px;
  margin: 5vh 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.corridor-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    var(--deep-plum) 10%,
    var(--twilight-indigo) 30%,
    var(--haze) 50%,
    var(--ink-light) 70%,
    var(--lavender-mist) 85%,
    var(--cloud-veil) 100%
  );
  animation: ink-dissolve 8s ease-in-out infinite alternate;
}

@keyframes ink-dissolve {
  0% {
    background: linear-gradient(
      to right,
      var(--deep-plum) 10%,
      var(--twilight-indigo) 25%,
      var(--haze) 45%,
      var(--ink-light) 65%,
      var(--lavender-mist) 80%,
      var(--cloud-veil) 100%
    );
  }
  100% {
    background: linear-gradient(
      to right,
      var(--deep-plum) 40%,
      var(--twilight-indigo) 55%,
      var(--haze) 68%,
      var(--ink-light) 80%,
      var(--lavender-mist) 92%,
      var(--cloud-veil) 100%
    );
  }
}

.corridor-mark {
  position: relative;
  width: 250px;
  height: 60px;
  z-index: 2;
  opacity: 0.4;
}

/* ========== DRIFT ZONE ========== */
.drift-zone {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15vh 5vw 20vh;
  overflow: hidden;
}

.drift-block {
  position: relative;
  transform: rotate(var(--rotate, 0deg));
  padding: 2.5rem 2rem;
  margin-bottom: 10vh;
  max-width: 520px;
  transition: transform 0.1s linear;
}

.drift-1 {
  margin-left: 10%;
}

.drift-2 {
  margin-left: 25%;
}

.drift-3 {
  margin-left: 5%;
}

.drift-text {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--mountain-shadow);
}

.drift-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(10px, 1vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--haze);
  display: block;
  margin-bottom: 1rem;
  font-style: normal;
}

/* Drift mountains */
.drift-mountains {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  pointer-events: none;
  z-index: -1;
}

.mountain-echo {
  opacity: 0.15;
  width: 100%;
  height: 100%;
}

.drift-mark {
  width: 70px;
  height: 180px;
  right: 5%;
  top: 20%;
  opacity: 0.12;
  transform: rotate(-15deg);
}

/* ========== VOID FOOTER ========== */
.void-footer {
  padding: 15vh 5vw 8vh;
  text-align: left;
  position: relative;
}

.footer-mark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(10px, 1vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--haze);
  opacity: 0.5;
  font-style: normal;
}

/* ========== PARALLAX SCROLL ADJUSTMENTS ========== */
.mountains .mountain-layer {
  will-change: transform;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stone-garden {
    grid-template-columns: 1fr;
    padding: 15vh 6vw 10vh;
    gap: 6vh;
  }

  .stone-1,
  .stone-2,
  .stone-3,
  .stone-4 {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    max-width: 100%;
  }

  .stone-2 {
    justify-self: start;
    margin-left: 10%;
  }

  .domain-title {
    left: 8vw;
    top: 55vh;
  }

  .drift-1,
  .drift-2,
  .drift-3 {
    margin-left: 5%;
    max-width: 90%;
  }

  .hero-mark {
    display: none;
  }
}

@media (max-width: 480px) {
  .domain-title {
    font-size: clamp(40px, 12vw, 80px);
    left: 6vw;
    top: 50vh;
  }

  .stone {
    padding: 1.5rem 1rem;
  }

  .drift-block {
    padding: 1.5rem 1rem;
  }
}
