/* ───────────────────────────────────────────
   Pneuma — Dark Void Theme
   Photorealistic masks in darkness
   ─────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-subtle: #050507;
  --ink: #e0e0e0;
  --ink-bright: #f0f0f0;
  --muted: rgba(200, 200, 200, 0.5);
  --panel: rgba(12, 12, 12, 0.92);
  --panel-border: rgba(255, 255, 255, 0.07);
  --button-bg: rgba(255, 255, 255, 0.9);
  --button-ink: #0a0a0a;
  --quiet-button: rgba(255, 255, 255, 0.06);
  --accent: #ffffff;
  --glow: rgba(255, 255, 255, 0.06);
  --fog: rgba(255, 255, 255, 0.012);
  --release-depth: 0;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  overflow: hidden;
  transition: background-color 2500ms ease, color 2500ms ease;
}

/* ── Atmospheric fog ─────────────────────── */

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(ellipse 80% 50% at 20% 60%, rgba(255,255,255,0.018) 0%, transparent 70%),
    radial-gradient(ellipse 60% 70% at 75% 30%, rgba(255,255,255,0.014) 0%, transparent 60%),
    radial-gradient(ellipse 90% 40% at 50% 80%, rgba(255,255,255,0.01) 0%, transparent 50%);
  opacity: 1;
  animation: fog-drift 30s ease-in-out infinite alternate;
  transition: opacity 1200ms ease;
}

body::after {
  position: fixed;
  inset: -8vh -8vw;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'%3E%3Cg fill='none' stroke='%23b8d8e8' stroke-opacity='.32' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M53 112 138 156 214 250 305 288'/%3E%3Cpath d='M138 156 109 234 72 302'/%3E%3Cpath d='M214 250 237 198 276 150'/%3E%3Cpath d='M1015 65 958 142 906 224 825 287'/%3E%3Cpath d='M958 142 1023 191 1092 244'/%3E%3Cpath d='M906 224 879 171 836 119'/%3E%3Cpath d='M102 696 199 628 280 612 366 548'/%3E%3Cpath d='M199 628 168 578 128 533'/%3E%3Cpath d='M991 710 924 642 830 610 760 548'/%3E%3Cpath d='M924 642 958 588 1006 529'/%3E%3Cpath d='M526 92 554 175 536 250' stroke-opacity='.18'/%3E%3Cpath d='M610 544 668 484 724 450' stroke-opacity='.16'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.24'%3E%3Ccircle cx='86' cy='121' r='1'/%3E%3Ccircle cx='307' cy='286' r='1.2'/%3E%3Ccircle cx='1014' cy='65' r='1'/%3E%3Ccircle cx='760' cy='548' r='1.1'/%3E%3Ccircle cx='199' cy='628' r='1'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat,
    linear-gradient(113deg, transparent 0 18%, rgba(172, 202, 218, 0.055) 18.04%, transparent 18.16% 100%),
    linear-gradient(31deg, transparent 0 64%, rgba(255, 255, 255, 0.038) 64.05%, transparent 64.18% 100%),
    linear-gradient(149deg, transparent 0 47%, rgba(145, 184, 205, 0.045) 47.03%, transparent 47.16% 100%),
    linear-gradient(77deg, transparent 0 79%, rgba(255, 255, 255, 0.03) 79.04%, transparent 79.16% 100%),
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.04), transparent 18%),
    radial-gradient(circle at 84% 74%, rgba(160, 202, 224, 0.035), transparent 22%),
    repeating-linear-gradient(97deg, transparent 0 21px, rgba(255, 255, 255, 0.009) 22px, transparent 23px);
  filter: blur(0.25px);
  mix-blend-mode: screen;
  opacity: calc(0.18 + (var(--release-depth) * 0.08));
  transform: translate3d(0, 0, 0);
  animation: mirror-surface 42s ease-in-out infinite alternate;
  mask-image: radial-gradient(ellipse 82% 68% at 50% 47%, transparent 0 16%, rgba(0, 0, 0, 0.26) 38%, rgba(0, 0, 0, 0.84) 78%, #000 100%);
  transition: opacity 900ms ease;
}

.revealed::before {
  opacity: 0;
}

.revealed::after {
  opacity: 0;
}

/* ── Revealed state — invert to white ────── */

.revealed {
  background: #ffffff;
  color: #1a1a1a;
}

.revealed .fog-container {
  opacity: 0;
  transition: opacity 2000ms ease;
}

@keyframes fog-drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(1%, -1%) scale(1.02);
  }
  100% {
    transform: translate(-1%, 0.5%) scale(1.01);
  }
}

@keyframes mirror-surface {
  0% {
    transform: translate3d(-0.4%, 0.2%, 0) scale(1);
  }
  100% {
    transform: translate3d(0.35%, -0.35%, 0) scale(1.01);
  }
}

/* ── Dust particles ──────────────────────── */

.fog-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.dust-mote {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  animation: mote-float var(--mote-duration, 20s) var(--mote-delay, 0s) ease-in-out infinite;
}

@keyframes mote-float {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  15% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.2;
    transform: translate(var(--mote-dx, 30px), var(--mote-dy, -60px));
  }
  85% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--mote-dx, 30px) * 1.5), calc(var(--mote-dy, -60px) * 2));
  }
}

/* ── Layout ──────────────────────────────── */

.experience {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Top bar ─────────────────────────────── */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 2vw, 1.6rem);
  pointer-events: none;
}

.brand {
  pointer-events: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: color 400ms ease;
}

.brand:hover {
  color: rgba(255, 255, 255, 0.6);
}

.revealed .brand {
  color: rgba(0, 0, 0, 0.25);
}

.revealed .brand:hover {
  color: rgba(0, 0, 0, 0.6);
}

/* ── Mask field ──────────────────────────── */

.mask-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.mask-layer {
  position: absolute;
  inset: 0;
}

/* ── Mask nodes (photorealistic images) ──── */

.mask-node {
  --mask-w: clamp(6.2rem, 9.5vw, 9.6rem);
  --mask-x-scale: 1;
  --mask-hover-scale: 1;
  --porcelain-surface-opacity: 0.46;
  --porcelain-crack-opacity: 0.18;
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: var(--mask-w);
  display: grid;
  place-items: center;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  animation: drift var(--duration, 14s) ease-in-out infinite;
  transition:
    opacity 600ms ease,
    filter 600ms ease,
    transform 400ms ease;
  opacity: 0;
  animation-fill-mode: both;
}

/* Staggered entrance */
.mask-node.is-visible {
  animation:
    mask-entrance 1800ms ease forwards,
    drift var(--duration, 14s) ease-in-out 1800ms infinite;
}

.mask-node:nth-child(1) { --entrance-delay: 300ms; }
.mask-node:nth-child(2) { --entrance-delay: 600ms; }
.mask-node:nth-child(3) { --entrance-delay: 900ms; }
.mask-node:nth-child(4) { --entrance-delay: 1200ms; }
.mask-node:nth-child(5) { --entrance-delay: 1500ms; }
.mask-node:nth-child(6) { --entrance-delay: 1800ms; }
.mask-node:nth-child(7) { --entrance-delay: 2100ms; }

.mask-node.is-visible {
  animation-delay: var(--entrance-delay, 0ms);
}

/* The mask image */
.mask-node img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  filter:
    brightness(1.16)
    contrast(1.22)
    saturate(0.78)
    drop-shadow(-0.24rem 0.38rem 0.48rem rgba(0, 0, 0, 0.78))
    drop-shadow(0 0 0.62rem rgba(206, 231, 242, 0.22));
  transform: scaleX(var(--mask-x-scale)) scale(var(--mask-hover-scale));
  transform-origin: center;
  transition: filter 500ms ease, transform 500ms ease;
  pointer-events: none;
}

.porcelain-surface,
.porcelain-surface::before,
.porcelain-surface::after,
.porcelain-surface span {
  position: absolute;
  display: block;
  pointer-events: none;
  content: "";
}

.porcelain-surface {
  inset: -9%;
  z-index: 2;
  opacity: var(--porcelain-surface-opacity);
  mix-blend-mode: screen;
  transform: scaleX(var(--mask-x-scale));
  transform-origin: center;
  -webkit-mask-image: radial-gradient(ellipse 43% 49% at 50% 47%, #000 0 56%, rgba(0, 0, 0, 0.72) 66%, transparent 79%);
  mask-image: radial-gradient(ellipse 43% 49% at 50% 47%, #000 0 56%, rgba(0, 0, 0, 0.72) 66%, transparent 79%);
  transition: opacity 500ms ease, transform 500ms ease;
}

.porcelain-surface::before {
  inset: 0;
  background:
    radial-gradient(ellipse 28% 22% at 34% 19%, rgba(255, 255, 255, 0.9), transparent 64%),
    radial-gradient(ellipse 18% 42% at 66% 29%, rgba(205, 229, 240, 0.3), transparent 70%),
    radial-gradient(ellipse 42% 58% at 56% 64%, rgba(255, 255, 255, 0.2), transparent 72%),
    linear-gradient(126deg, transparent 0 34%, rgba(255, 255, 255, 0.28) 43%, transparent 56% 100%);
  filter: blur(0.35px);
}

.porcelain-surface::after {
  inset: 6% 11% 8%;
  background:
    linear-gradient(109deg, transparent 0 44%, rgba(255, 255, 255, 0.58) 44.2%, transparent 44.9% 100%),
    linear-gradient(26deg, transparent 0 60%, rgba(176, 209, 222, 0.46) 60.15%, transparent 60.75% 100%),
    linear-gradient(151deg, transparent 0 51%, rgba(255, 255, 255, 0.38) 51.2%, transparent 51.72% 100%);
  opacity: var(--porcelain-crack-opacity);
  filter: blur(0.12px);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 49%, transparent 0 18%, #000 32% 83%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 49%, transparent 0 18%, #000 32% 83%, transparent 100%);
}

.porcelain-surface span {
  inset: 8% 16% 10%;
  border-radius: 47% 47% 43% 43%;
  border-left: 1px solid rgba(255, 255, 255, 0.34);
  border-right: 1px solid rgba(166, 206, 224, 0.18);
  filter: blur(0.35px);
  opacity: 0.5;
}

/* Ethereal glow behind the mask */
.mask-node::after {
  content: "";
  position: absolute;
  inset: 5%;
  z-index: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(227, 242, 248, 0.16) 0%, rgba(255, 255, 255, 0.07) 26%, transparent 70%);
  filter: blur(26px);
  opacity: 0.95;
  transition: opacity 500ms ease;
}

/* Identity marks: quiet visual cues, not literal icons */
.mask-mark,
.mask-mark::before,
.mask-mark::after,
.mask-mark span {
  position: absolute;
  display: block;
  pointer-events: none;
  content: "";
}

.mask-mark {
  inset: -2%;
  z-index: 3;
  opacity: 0.48;
  mix-blend-mode: screen;
  transition: opacity 500ms ease, transform 500ms ease;
}

.mask-node:hover .mask-mark,
.mask-node:focus-visible .mask-mark {
  opacity: 0.82;
}

.mask-mark--family::before {
  left: 10%;
  top: 27%;
  width: 76%;
  height: 34%;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.mask-mark--family::after,
.mask-mark--family span {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

.mask-mark--family::after {
  left: 18%;
  top: 31%;
}

.mask-mark--family span {
  right: 16%;
  top: 52%;
}

.mask-mark--belief::before {
  left: 50%;
  top: 1%;
  width: 1px;
  height: 92%;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: translateX(-50%);
}

.mask-mark--belief::after {
  left: 19%;
  top: 3%;
  width: 62%;
  height: 62%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}

.mask-mark--belief span {
  left: 30%;
  top: 18%;
  width: 40%;
  height: 40%;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.mask-mark--nation::before {
  left: 10%;
  top: 18%;
  width: 80%;
  height: 60%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.mask-mark--nation::after {
  left: 24%;
  top: 15%;
  width: 52%;
  height: 67%;
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(255, 255, 255, 0.18) 28% 30%, transparent 30% 68%, rgba(255, 255, 255, 0.18) 68% 70%, transparent 70%),
    linear-gradient(180deg, transparent 0 30%, rgba(255, 255, 255, 0.16) 30% 32%, transparent 32% 66%, rgba(255, 255, 255, 0.16) 66% 68%, transparent 68%);
}

.mask-mark--title::before {
  left: 23%;
  top: 13%;
  width: 54%;
  height: 1px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow:
    0 3.8rem rgba(255, 255, 255, 0.18),
    0 5.9rem rgba(255, 255, 255, 0.16);
}

.mask-mark--title::after {
  left: 33%;
  bottom: 12%;
  width: 34%;
  height: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.mask-mark--screen::before {
  left: 18%;
  top: 34%;
  width: 64%;
  height: 20%;
  border: 1px solid rgba(184, 236, 255, 0.26);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(184, 236, 255, 0.18) 0,
      rgba(184, 236, 255, 0.18) 1px,
      transparent 1px,
      transparent 5px
    );
}

.mask-mark--screen::after {
  left: 15%;
  top: 31%;
  width: 70%;
  height: 1px;
  background: rgba(184, 236, 255, 0.42);
  box-shadow: 0 1.4rem rgba(184, 236, 255, 0.28);
}

.mask-mark--story::before,
.mask-mark--story::after,
.mask-mark--story span {
  left: 20%;
  top: 15%;
  width: 60%;
  height: 67%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 48% 48% 42% 42%;
}

.mask-mark--story::after {
  transform: translate(-0.7rem, 0.35rem);
  opacity: 0.56;
}

.mask-mark--story span {
  transform: translate(0.72rem, -0.24rem);
  opacity: 0.42;
}

.mask-mark--emotions::before {
  left: 35%;
  top: 38%;
  width: 1px;
  height: 30%;
  background: linear-gradient(rgba(255, 255, 255, 0.5), transparent);
  box-shadow: 2.15rem 0 rgba(255, 255, 255, 0.34);
}

.mask-mark--emotions::after {
  left: 26%;
  top: 22%;
  width: 48%;
  height: 50%;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

/* Hover — mask brightens, glow intensifies */
.mask-node:hover img,
.mask-node:focus-visible img {
  --mask-hover-scale: 1.03;
  filter:
    brightness(1.28)
    contrast(1.26)
    saturate(0.8)
    drop-shadow(-0.28rem 0.42rem 0.5rem rgba(0, 0, 0, 0.82))
    drop-shadow(0 0 0.78rem rgba(226, 244, 250, 0.32));
}

.mask-node:hover::after,
.mask-node:focus-visible::after {
  opacity: 1;
}

.mask-node:hover .porcelain-surface,
.mask-node:focus-visible .porcelain-surface {
  --porcelain-surface-opacity: 0.62;
  --porcelain-crack-opacity: 0.28;
}

.mask-node:hover,
.mask-node:focus-visible {
  outline: none;
}

/* Mask label on hover */
.mask-node .mask-label-text {
  position: absolute;
  bottom: -1.8rem;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
}

.mask-node:hover .mask-label-text {
  opacity: 1;
}

.mask-node[data-mask="emotions"] img {
  filter:
    brightness(1.22)
    contrast(1.34)
    saturate(0.72)
    drop-shadow(-0.24rem 0.38rem 0.48rem rgba(0, 0, 0, 0.82))
    drop-shadow(0 0 0.72rem rgba(226, 244, 250, 0.26));
}

.mask-node[data-mask="emotions"]:hover img {
  filter:
    brightness(1.32)
    contrast(1.38)
    saturate(0.74)
    drop-shadow(-0.28rem 0.42rem 0.5rem rgba(0, 0, 0, 0.84))
    drop-shadow(0 0 0.88rem rgba(226, 244, 250, 0.36));
}

.mask-node[data-mask="emotions"]::after {
  opacity: 1;
  background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 68%);
}

.mask-node[data-mask="belief"] {
  --mask-x-scale: 1.16;
  --porcelain-surface-opacity: 0.52;
  --porcelain-crack-opacity: 0.08;
}

.mask-node[data-mask="family"] {
  --porcelain-crack-opacity: 0.1;
}

.mask-node[data-mask="screen"] {
  --porcelain-surface-opacity: 0.55;
}

.mask-node[data-mask="screen"] .porcelain-surface::before {
  background:
    radial-gradient(ellipse 32% 20% at 38% 20%, rgba(255, 255, 255, 0.88), transparent 62%),
    radial-gradient(ellipse 44% 50% at 58% 50%, rgba(164, 222, 246, 0.32), transparent 72%),
    linear-gradient(126deg, transparent 0 34%, rgba(199, 239, 255, 0.34) 43%, transparent 56% 100%);
}

.mask-node[data-mask="story"] {
  --porcelain-crack-opacity: 0.22;
}

.mask-node[data-mask="emotions"] {
  --porcelain-crack-opacity: 0.38;
}

/* ── Release animation ───────────────────── */

.mask-node.is-releasing {
  pointer-events: none;
  animation: release 1200ms ease forwards !important;
}

/* ── Mask entrance animation ─────────────── */

@keyframes mask-entrance {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
  }
}

/* ── Drift — slow, meditative ────────────── */

@keyframes drift {
  0%,
  100% {
    translate: 0 0;
  }
  25% {
    translate: calc(var(--dx) * -0.3) calc(var(--dy) * 0.35);
  }
  50% {
    translate: calc(var(--dx) * 0.8) calc(var(--dy) * 0.8);
  }
  75% {
    translate: calc(var(--dx) * 0.3) calc(var(--dy) * -0.4);
  }
}

/* ── Release — dissolve into the void ────── */

@keyframes release {
  0% {
    opacity: 1;
    filter: blur(0) brightness(0.85);
    scale: 1;
  }
  30% {
    opacity: 0.7;
    filter: blur(2px) brightness(1.2);
    scale: 1.02;
  }
  60% {
    opacity: 0.35;
    filter: blur(8px) brightness(0.5);
    scale: 0.92;
  }
  100% {
    opacity: 0;
    filter: blur(20px) brightness(0);
    scale: 0.6;
  }
}

/* ── Progress dots ───────────────────────── */

.progress {
  position: fixed;
  left: 50%;
  bottom: clamp(1rem, 2.5vw, 2rem);
  z-index: 6;
  display: flex;
  gap: 0.6rem;
  transform: translateX(-50%);
  transition: opacity 600ms ease;
}

.progress-dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: all 400ms ease;
}

.progress-dot.is-done {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.35);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.revealed .progress {
  opacity: 0;
}

/* ── Footer ──────────────────────────────── */

.site-footer {
  position: fixed;
  left: clamp(1rem, 2vw, 1.6rem);
  bottom: clamp(1rem, 2.5vw, 1.7rem);
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  max-width: calc(100vw - 2rem);
  font-family: var(--font-serif);
  font-size: clamp(0.78rem, 1vw, 0.9rem);
  line-height: 1.3;
}

.site-footer a,
.statement-link {
  color: rgba(255, 255, 255, 0.18);
  text-decoration: none;
  transition: color 360ms ease;
}

.statement-link {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.reveal-only {
  display: none;
}

.revealed .reveal-only {
  display: inline-block;
  opacity: 0;
  animation: line-in 1000ms ease forwards;
  animation-delay: 5400ms;
}

.site-footer a:hover,
.statement-link:hover {
  color: rgba(255, 255, 255, 0.5);
}

.revealed .site-footer a,
.revealed .statement-link {
  color: rgba(0, 0, 0, 0.25);
  transition: color 360ms ease;
}

.revealed .site-footer a:hover,
.revealed .statement-link:hover {
  color: rgba(0, 0, 0, 0.55);
}

/* ── Reflection dialog ───────────────────── */

.reflection,
.statement {
  width: min(44rem, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.reflection::backdrop,
.statement::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
}

.reflection__inner,
.statement__inner {
  position: relative;
  padding: clamp(2.8rem, 6vw, 5rem) clamp(2.8rem, 6vw, 5rem) clamp(2.4rem, 5vw, 4rem);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow:
    0 0 60px rgba(0, 0, 0, 0.6),
    0 0 120px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(40px);
}

.reflection__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: color 300ms ease;
}

.reflection__close:hover {
  color: rgba(255, 255, 255, 0.6);
}

.reflection__close::before,
.reflection__close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.reflection__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.reflection__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.reflection__kicker {
  margin: 0 0 clamp(1.8rem, 4vw, 2.8rem);
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.reflection__copy {
  display: grid;
  gap: clamp(1.1rem, 2.8vw, 1.6rem);
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.8vw, 1.22rem);
  line-height: 1.62;
  color: var(--ink-bright);
}

.statement__copy {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.4rem);
  font-family: var(--font-serif);
  font-size: clamp(1.04rem, 2vw, 1.36rem);
  line-height: 1.55;
  color: var(--ink);
}

.reflection__copy p,
.reflection__question,
.statement__copy p {
  margin: 0;
}

.reflection__question {
  margin-top: clamp(2.4rem, 5vw, 3.5rem);
  color: rgba(255, 255, 255, 0.3);
  font-size: clamp(0.82rem, 1.3vw, 0.92rem);
  font-weight: 300;
  letter-spacing: 0.03em;
}

.reflection__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.15rem, 2.5vw, 1.65rem);
}

/* ── Buttons ─────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 260ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--quiet {
  background: var(--quiet-button);
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.06);
}

.button--quiet:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

.button--release {
  background: var(--button-bg);
  color: var(--button-ink);
  border-color: transparent;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

.button--release:hover {
  background: #ffffff;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

.button--artifact {
  background: var(--button-bg);
  color: var(--button-ink);
  border-color: transparent;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.button--artifact:hover {
  background: #ffffff;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.18);
}

/* ── Reveal (breathing meditation) ───────── */

.reveal {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4.25rem, 8vh, 5.5rem) clamp(1.4rem, 5vw, 4rem) clamp(5.2rem, 8vh, 6rem);
  overflow-y: auto;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1400ms ease, visibility 1400ms ease;
}

.revealed .mask-layer {
  pointer-events: none;
}

.revealed .reveal {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.reveal__text {
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(0.98rem, 1.45vw, 1.22rem);
  line-height: 1.52;
  color: var(--ink-bright);
  transform: translateY(1rem);
  animation: reveal-float 5000ms ease-in-out infinite alternate;
}

.revealed .reveal__text {
  color: #1a1a1a;
}

.reveal__text p {
  margin: 0 0 clamp(0.82rem, 2vh, 1.22rem);
  opacity: 0;
  transform: translateY(0.8rem);
}

.revealed .reveal__text p {
  animation: line-in 1000ms ease forwards;
}

.revealed .reveal__text p:nth-child(1) { animation-delay: 400ms; }
.revealed .reveal__text p:nth-child(2) { animation-delay: 1200ms; }
.revealed .reveal__text p:nth-child(3) { animation-delay: 2100ms; }
.revealed .reveal__text p:nth-child(4) { animation-delay: 3000ms; }
.revealed .reveal__text p:nth-child(5) { animation-delay: 3900ms; }
.revealed .reveal__text p:nth-child(6) { animation-delay: 4800ms; }

@keyframes line-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal-float {
  to {
    transform: translateY(-0.6rem);
  }
}

/* ── Mobile responsive ───────────────────── */

@media (max-width: 720px) {
  body {
    overflow: hidden;
  }

  .mask-node {
    --mask-w: clamp(4.6rem, 18vw, 6.2rem);
  }

  /* Simplified entrance animation — no blur filter on mobile */
  @keyframes mask-entrance {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.95);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
  }

  /* Lighten filters for mobile performance */
  .mask-node img {
    filter:
      brightness(1.16)
      contrast(1.22)
      saturate(0.78)
      drop-shadow(0 0.3rem 0.4rem rgba(0, 0, 0, 0.7));
  }

  .mask-node[data-mask="family"] {
    --x: 24% !important;
    --y: 19% !important;
  }

  .mask-node[data-mask="belief"] {
    --x: 72% !important;
    --y: 19% !important;
  }

  .mask-node[data-mask="nation"] {
    --x: 49% !important;
    --y: 34% !important;
  }

  .mask-node[data-mask="title"] {
    --x: 22% !important;
    --y: 52% !important;
  }

  .mask-node[data-mask="screen"] {
    --x: 76% !important;
    --y: 52% !important;
  }

  .mask-node[data-mask="story"] {
    --x: 34% !important;
    --y: 72% !important;
  }

  .mask-node[data-mask="emotions"] {
    --x: 66% !important;
    --y: 72% !important;
  }

  .reflection__inner,
  .statement__inner {
    max-height: calc(100svh - 2rem);
    overflow: auto;
  }

  .reveal {
    padding-top: 4.4rem;
    padding-bottom: 6rem;
  }

  .reveal__text {
    max-width: 30rem;
    font-size: clamp(0.9rem, 4vw, 1.04rem);
    line-height: 1.42;
  }

  .reveal__text p {
    margin-bottom: 0.76rem;
  }

  .reflection__actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .progress {
    bottom: 3.2rem;
  }

  .site-footer {
    right: 1rem;
    text-align: center;
    justify-content: center;
    font-size: 0.86rem;
  }

  .site-footer a,
  .statement-link {
    color: rgba(255, 255, 255, 0.38);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
  }

  .site-footer a:hover,
  .statement-link:hover {
    color: rgba(255, 255, 255, 0.68);
  }

  .revealed .site-footer a,
  .revealed .statement-link {
    color: rgba(0, 0, 0, 0.46);
    text-shadow: none;
  }

  .revealed .site-footer a:hover,
  .revealed .statement-link:hover {
    color: rgba(0, 0, 0, 0.72);
  }
}

/* ── Reduced motion ──────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .mask-node {
    opacity: 1 !important;
  }
}
