:root {
  --paper: #e9e4d9;
  --ink: #27302d;
  --muted: #6c746e;
  --accent: #b17b55;
}

* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; margin: 0; }

body {
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", system-ui, sans-serif;
}

.gallery {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  width: 100%;
  height: 100svh;
  min-height: 620px;
  padding: clamp(24px, 4vw, 58px) clamp(22px, 5.5vw, 92px) clamp(24px, 3vw, 46px);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(255,255,255,.82) 0%, rgba(255,255,255,0) 58%),
    linear-gradient(136deg, #e4dfd3 0%, #eee9df 44%, #dfe4dc 100%);
}

.wash {
  position: absolute;
  z-index: -2;
  pointer-events: none;
  filter: blur(28px);
  opacity: .52;
  border-radius: 50%;
}

.wash--one { width: 52vw; height: 36vw; top: -14vw; left: -12vw; background: rgba(170, 187, 175, .52); transform: rotate(-18deg); }
.wash--two { width: 48vw; height: 34vw; right: -13vw; bottom: 2vh; background: rgba(197, 166, 139, .34); transform: rotate(26deg); }

.shadow-light {
  position: absolute;
  z-index: -1;
  left: -14vw;
  top: -7vh;
  width: min(74vw, 1060px);
  height: 108vh;
  pointer-events: none;
  opacity: .16;
  filter: blur(11px) grayscale(.25) saturate(.65) contrast(.8) brightness(1.12);
  transform: rotate(-8deg) scale(1.3);
  background: url("light-shadow.jpg") center / cover no-repeat;
  mix-blend-mode: soft-light;
  mask-image: radial-gradient(ellipse 78% 70% at 31% 42%, rgba(0,0,0,.9) 0%, rgba(0,0,0,.4) 58%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 78% 70% at 31% 42%, rgba(0,0,0,.9) 0%, rgba(0,0,0,.4) 58%, transparent 100%);
}

/* A quiet bamboo projection, like sunlight passing through a screen. */
.bamboo-shadow {
  position: absolute;
  z-index: -1;
  left: -2vw;
  top: 6vh;
  width: min(38vw, 540px);
  height: 82vh;
  pointer-events: none;
  opacity: .085;
  filter: blur(5px);
  mix-blend-mode: multiply;
  transform: rotate(-5deg);
  mask-image: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.25) 78%, transparent);
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.25) 78%, transparent);
}
.bamboo-shadow__stalk,
.bamboo-shadow__leaf { position: absolute; display: block; background: rgba(74, 86, 67, .6); }
.bamboo-shadow__stalk {
  width: 15px;
  height: 84%;
  bottom: -5%;
  border-radius: 100% 100% 14% 14%;
  transform-origin: bottom center;
}
.bamboo-shadow__stalk::before,
.bamboo-shadow__stalk::after {
  content: "";
  position: absolute;
  left: -3px;
  width: 21px;
  height: 5px;
  border-radius: 50%;
  background: rgba(66, 78, 60, .55);
}
.bamboo-shadow__stalk::before { top: 20%; }
.bamboo-shadow__stalk::after { top: 48%; }
.bamboo-shadow__stalk--one { left: 22%; transform: rotate(13deg); }
.bamboo-shadow__stalk--two { left: 45%; height: 70%; transform: rotate(-4deg); opacity: .76; }
.bamboo-shadow__stalk--three { left: 64%; height: 62%; transform: rotate(-18deg); opacity: .58; }
.bamboo-shadow__leaf {
  width: 92px;
  height: 28px;
  border-radius: 100% 0 100% 0;
  transform-origin: 0 50%;
}
.bamboo-shadow__leaf--one { left: 26%; top: 19%; transform: rotate(-25deg); }
.bamboo-shadow__leaf--two { left: 33%; top: 29%; transform: rotate(26deg) scale(.78); }
.bamboo-shadow__leaf--three { left: 45%; top: 12%; transform: rotate(-42deg) scale(.8); }
.bamboo-shadow__leaf--four { left: 54%; top: 24%; transform: rotate(23deg) scale(.68); }
.bamboo-shadow__leaf--five { left: 63%; top: 36%; transform: rotate(-32deg) scale(.62); }
.bamboo-shadow__leaf--six { left: 18%; top: 38%; transform: rotate(35deg) scale(.65); }

.grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
}

.topbar, .footer { display: flex; align-items: center; justify-content: space-between; letter-spacing: .1em; text-transform: uppercase; font-size: 10px; color: var(--muted); }
.topbar__mark { color: var(--ink); font-weight: 600; letter-spacing: .18em; }
.topbar__note { opacity: .8; }

.portrait-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}

.halo {
  position: absolute;
  width: min(58vw, 610px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.54) 0%, rgba(255,255,255,.22) 45%, rgba(255,255,255,0) 70%);
  transform: translateY(-3%);
}

.portrait {
  position: relative;
  z-index: 1;
  display: block;
  width: min(66vw, 720px);
  height: min(72vh, 760px);
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 22px 28px rgba(52, 58, 51, .13));
  user-select: none;
  pointer-events: none;
}

.intro { width: min(650px, 100%); margin: clamp(14px, 2vh, 24px) auto 0; text-align: center; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; }
.title-lockup { display: inline-flex; align-items: center; justify-content: center; gap: clamp(14px, 2vw, 24px); }
h1 {
  margin: -5px 0 0;
  font-family: "Brush Script MT", "Segoe Script", "Segoe Print", "Lucida Handwriting", cursive;
  font-size: clamp(62px, 7.6vw, 104px);
  font-weight: 700;
  line-height: .78;
  letter-spacing: -.045em;
  color: #1e2522;
  transform: rotate(-1.8deg) skewX(-4deg);
  text-shadow: .8px .4px 0 #1e2522, -0.4px 0 0 rgba(30,37,34,.65);
}
.seal {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(42px, 4.7vw, 64px);
  height: clamp(70px, 7.4vw, 96px);
  margin-top: -4px;
  object-fit: contain;
  transform: rotate(2deg);
  mix-blend-mode: multiply;
  filter: saturate(1.3) contrast(1.08);
}
.subtitle { max-width: none; margin: 16px auto 0; color: #59615b; font-family: "Noto Serif SC", serif; font-size: clamp(14px, 1.25vw, 17px); line-height: 1.7; letter-spacing: .025em; white-space: nowrap; }

.footer { margin-top: clamp(18px, 3vh, 34px); }
.footer__line { display: block; width: min(24vw, 240px); height: 1px; margin: 0 16px; background: rgba(74, 82, 75, .28); }

.ink-entry {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 2.8vh, 34px);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 142px;
  padding: 10px 23px 11px;
  border: 1px solid rgba(87, 111, 105, .24);
  border-radius: 50%;
  color: rgba(55, 70, 66, .88);
  background: linear-gradient(115deg, rgba(255,255,255,.25), rgba(224,236,232,.08));
  box-shadow: inset 0 0 18px rgba(255,255,255,.22), 0 9px 28px rgba(64,83,77,.045);
  backdrop-filter: blur(5px);
  cursor: pointer;
  transform: translateX(-50%);
  transition: color .35s ease, border-color .35s ease, background .35s ease, transform .35s ease;
}
.ink-entry::before, .ink-entry::after { content: ""; position: absolute; pointer-events: none; border-radius: 50%; border: 1px solid rgba(95,124,116,.1); }
.ink-entry::before { inset: -5px -11px; }
.ink-entry::after { inset: 4px 8px; opacity: .7; }
.ink-entry:hover { color: rgba(34,53,48,.96); border-color: rgba(77,111,101,.42); background: rgba(243,250,247,.2); transform: translateX(-50%) translateY(-2px) scale(1.025); }
.ink-entry__label { position: relative; z-index: 1; font-family: "Noto Serif SC", serif; font-size: 13px; letter-spacing: .16em; white-space: nowrap; }
.ink-entry__ripple { position: absolute; inset: -14px -30px; border-radius: 50%; border: 1px solid rgba(93,133,124,.2); animation: ink-ripple 3.5s ease-out infinite; pointer-events: none; }
.ink-entry__ripple::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid rgba(119,153,145,.12); animation: ink-ripple-inner 3.5s .25s ease-out infinite; }
.ink-transition { position: fixed; left: 50%; bottom: -30vh; width: 46vmax; aspect-ratio: 1; z-index: 20; pointer-events: none; opacity: 0; border-radius: 50%; background: radial-gradient(circle, rgba(218,236,231,.3) 0 8%, rgba(191,220,212,.2) 17%, rgba(164,201,191,.1) 31%, rgba(255,255,255,.04) 48%, transparent 70%); box-shadow: 0 0 0 2px rgba(117,158,147,.17), 0 0 0 20px rgba(145,180,171,.08), 0 0 75px rgba(156,190,181,.12); transform: translateX(-50%) scale(.08); filter: blur(3px); }
.ink-transition::before, .ink-transition::after { content: ""; position: absolute; border-radius: 50%; border: 2px solid rgba(111,158,146,.18); }
.ink-transition::before { inset: -8%; }
.ink-transition::after { inset: -20%; border-width: 1px; opacity: .62; }
.gallery.is-entering .ink-transition { animation: ink-wash 1.85s cubic-bezier(.16,.72,.16,1) forwards; }
.gallery.is-entering .portrait { animation: portrait-water-link 1.45s cubic-bezier(.2,.7,.2,1) both; }
.gallery.is-entering .halo { animation: halo-water-link 1.45s ease-out both; }
@keyframes ink-ripple { 0% { transform: scale(.72,.58); opacity: .8; } 75%, 100% { transform: scale(1.45,1.8); opacity: 0; } }
@keyframes ink-ripple-inner { 0% { transform: scale(.7); opacity: .62; } 80%, 100% { transform: scale(1.32); opacity: 0; } }
@keyframes ink-wash { 0% { opacity: 0; transform: translateX(-50%) scale(.08); } 20% { opacity: .9; } 58% { opacity: 1; transform: translateX(-50%) scale(1.8); } 100% { opacity: 1; transform: translateX(-50%) scale(5.8); } }
@keyframes portrait-water-link { 0% { transform: translateY(0) scale(1); filter: drop-shadow(0 22px 28px rgba(52,58,51,.13)); } 32% { transform: translateY(-5px) scale(1.012, .992); filter: drop-shadow(0 28px 34px rgba(76,111,101,.16)) blur(.15px); } 68% { transform: translateY(2px) scale(.996, 1.008); } 100% { transform: translateY(0) scale(1); opacity: .9; } }
@keyframes halo-water-link { 0% { transform: translateY(-3%) scale(1); opacity: 1; } 50% { transform: translateY(-3%) scale(1.28); opacity: .58; } 100% { transform: translateY(-3%) scale(1.55); opacity: 0; } }

@media (max-width: 700px) {
  .gallery { min-height: 560px; padding: 22px 20px 24px; }
  .topbar__note { display: none; }
  .portrait { width: min(92vw, 540px); height: min(64vh, 570px); }
  .halo { width: 92vw; }
  .bamboo-shadow { left: -14vw; width: 66vw; opacity: .1; }
  .subtitle { max-width: 330px; line-height: 1.75; white-space: normal; }
  .title-lockup { gap: 12px; }
  .footer { font-size: 9px; }
  .footer__line { width: 18vw; margin: 0 10px; }
  .ink-entry { bottom: 16px; min-width: 132px; gap: 9px; padding: 9px 19px 10px; }
}
