:root {
  --bg: #ebe5d8;
  --ink: #232722;
  --muted: #535b54;
  --pink: #353d37;
  --mint: #526559;
  --mist-seam: #ebe7dd;
  --album-paper: #f3eee3;
}

body { background: var(--bg); }
.noise {
  opacity: .19;
  mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='fibers'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.14 .79' numOctaves='3' seed='23' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='%239a886a' filter='url(%23fibers)' opacity='.36'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 13% 18%, #a9854830, transparent 68%),
    radial-gradient(ellipse at 89% 82%, #b294634f, transparent 61%);
}
.nav {
  background: linear-gradient(#eee9defa, #eee9de00);
}
.brand, .brand i, .pill { color: var(--ink); }
.pill { background: #f2f2ede6; border-color: #525b5140; }
.hero {
  isolation: isolate;
  gap: clamp(12px, 4vw, 65px);
  background: linear-gradient(to bottom, transparent 76%, #ebe7dd9c 92%, var(--mist-seam) 100%),
    linear-gradient(100deg, #eee9ddf2 10%, #eee9ddca 44%, #eae5da55),
    url('field-ridge.jpg') center 54% / cover;
}
.hero-matrix, .orbit, .portrait-star, .portrait-light { display: none; }
.hero h1 span { color: var(--ink); text-shadow: none; }
.hero-name small { color: #465a4d; }
.portrait-scene {
  position: relative;
  isolation: isolate;
  width: min(94%, 390px);
}
.hero-portrait {
  width: 100%;
  max-height: 495px;
  animation: none;
  filter: saturate(.72) contrast(.94) drop-shadow(0 18px 25px #19221d38);
}
.portrait-pool {
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: -3%;
  width: min(124%, calc(100vw - 32px));
  aspect-ratio: 3.05;
  transform: translateX(-50%);
  opacity: .62;
  filter: blur(.6px);
  pointer-events: none;
}
.pool-shape { position: absolute; }
.pool-water {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: url(#pool-shoreline);
  transform: rotate(-9deg) skewX(-13deg);
  background: radial-gradient(ellipse at 50% 39%, #e8e7dcc9 4%, #bcc2b6a8 44%, #a4ad9fa3 71%, #a5b6a436);
}
.portrait-pool i {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 111%;
  height: 94%;
  border-radius: 61% 39% 48% 52% / 64% 35% 72% 36%;
  border: 1px solid #68766894;
  box-shadow: inset 0 1px 0 #f8f5eaa1;
  animation: pond-ripple 6.6s cubic-bezier(.19,.48,.42,1) infinite;
}
.portrait-pool i:nth-child(2) { animation-delay: -2.2s; }
.portrait-pool i:nth-child(3) { animation-delay: -4.4s; }
@keyframes pond-ripple {
  0% { transform: translate(-50%, -50%) scale(.12, .07); opacity: 0; }
  18% { opacity: .69; }
  74% { opacity: .36; }
  100% { transform: translate(-50%, -41%) scale(1.15, 1.13); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .portrait-pool i { animation: none; transform: translate(-50%,-50%) scale(.7); opacity: .38; }
  .portrait-pool i:nth-child(n+2) { display: none; }
}
.field-divider {
  position: relative;
  height: clamp(145px, 15vw, 220px);
  background:
    linear-gradient(to bottom, var(--mist-seam), #ebe7dd9c 21%, transparent 50%,
      #f3eee3a6 76%, var(--album-paper)),
    linear-gradient(#ebe7dd55, #f3eee36b),
    url('field-mist.jpg') center 58% / cover;
}
.ink-trail {
  position: absolute;
  inset: 6% 0;
  width: clamp(75px, 11vw, 170px);
  margin-inline: auto;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.ink-trail i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(7px, .75vw, 11px);
  aspect-ratio: .48;
  transform: translate(-50%, -50%) rotate(var(--turn));
  opacity: 0;
  animation: ink-step 5.8s ease-out calc(var(--step) * .34s) infinite;
}
.ink-trail i::before,
.ink-trail i::after {
  content: "";
  position: absolute;
  background: #515448;
  background-image: repeating-linear-gradient(18deg, #fff0 0 2px, #25291f35 2px 3px);
}
.ink-trail i::before { inset: 34% 0 0; border-radius: 37% 41% 55% 54%; }
.ink-trail i::after { inset: 0 17% 71%; border-radius: 35% 35% 23% 28%; }
.ink-trail i:nth-child(even)::before { transform: scaleX(-1); }
@keyframes ink-step {
  0% { opacity: 0; }
  5% { opacity: .55; }
  29% { opacity: .32; }
  66%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ink-trail i { animation: none; opacity: .30; }
}
.button.primary {
  color: #fff;
  background: #344138;
  box-shadow: none;
}
.button.primary:hover { box-shadow: 0 5px 16px #283e2b38; }
.button.ghost { color: var(--ink); background: #f7f7f14d; border-color: #4b564b50; }
.memories { background: var(--album-paper); }
.memories .photo-card { --r: -1.25deg; }
.memories .photo-card:nth-child(2) { --r: 1.5deg; }
.lab {
  --ink: #efefe9;
  --muted: #b4bbb5;
  --mint: #b0c1b5;
  color: var(--ink);
  background: linear-gradient(145deg, #141815f5, #191c1bf2 68%, #111412fa),
    url('field-stone.jpg') center / 690px auto;
}
.lab-stage { background: radial-gradient(ellipse, #242a28, #111412 75%); }
.lab .lab-panel { background: #232824; }
.superconductor-field { opacity: .66; }
.reasons { background: #ebe5d8; }
.reason-cloud button { color: #28332b; background: #f5f5ef; border-color: #3f554140; box-shadow: none; }
.reason-cloud button:is(:hover, .popped) { background: #d8ded3; color: #232c25; }
.finale {
  gap: clamp(24px, 6vw, 100px);
  background: linear-gradient(#f1ebdee8,#ece5d7ef), url('field-stone.jpg') center / 720px;
}
.finale .gift {
  height: auto;
  width: min(100%, 320px);
  padding: 10px;
  border: 1px solid #b9bdb2;
  background: #f9f9f2;
  box-shadow: 0 8px 22px #252b2133;
}
.finale .gift img { display: block; width: 100%; height: auto; }
.finale .gift.open { animation: none; transform: rotate(-2deg); }
dialog { background: #2a332c; }
#musicPanel { color: #f2f2ed; }

@media (max-width:480px) {
  .hero { gap: 8px; }
  .hero-portrait { max-height: 300px; }
  .portrait-scene { width: min(78%, 255px); margin-bottom: 24px; }
  .portrait-pool { bottom: -3%; width: min(124%, calc(100vw - 42px)); }
  .finale .gift { width: min(70vw, 255px); }
}
