/* Remembering Billy — private family preview
   Philadelphia memorial walkway. Self-hosted type (EB Garamond, SIL OFL 1.1). No external requests. */
@font-face {
  font-family: "Memorial Serif";
  src: url("assets/fonts/EBGaramond-var.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
}

:root {
  /* Semantic tokens */
  --color-page: #16130f;
  --color-surface: #1e1a15;
  --color-surface-raised: #29231c;
  --color-ink: #f3ead9;
  --color-ink-muted: #c7b9a3;
  --color-border: #4a3f33;
  --color-accent: #e7a54b;          /* candle amber */
  --color-accent-strong: #f2bc6a;
  --color-on-accent: #20160b;
  --color-focus: #8fd3ff;
  --color-overlay: rgba(14, 11, 8, 0.96);
  --color-midnight: #0d4a50;        /* restrained Eagles-inspired midnight green */
  --color-silver: #b9c0c3;

  --brick: url("assets/textures/brick.webp");
  --ground: url("assets/textures/wet-ground.webp");

  --font-serif: "Memorial Serif", "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-control: 3px;

  --dur-press: 90ms;
  --dur-overlay: 220ms;
  --ease-out: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--color-page); }
body {
  margin: 0; background: var(--color-page); color: var(--color-ink);
  font-family: var(--font-serif); font-size: 1.125rem; line-height: 1.6; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2 { font-weight: 400; line-height: 1.05; margin: 0; }
a { color: var(--color-accent-strong); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--color-ink); color: var(--color-page); padding: .75rem 1rem; font-family: var(--font-ui); border-radius: var(--radius-control); }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .7rem 1.4rem;
  font-family: var(--font-ui); font-size: 1rem; font-weight: 600; letter-spacing: .02em; text-decoration: none;
  border-radius: var(--radius-control); border: 1px solid transparent; cursor: pointer;
  transition: background-color var(--dur-press) linear, border-color var(--dur-press) linear;
}
.btn--amber { background: var(--color-accent); color: var(--color-on-accent); }
.btn--amber:hover { background: var(--color-accent-strong); }
.btn--line { background: rgba(20,16,12,.55); color: var(--color-ink); border-color: #9c8b74; }
.btn--line:hover { border-color: var(--color-ink); }
.btn[disabled] { cursor: not-allowed; color: var(--color-ink-muted); border-style: dashed; background: transparent; }
.text-btn { background: none; border: 0; padding: .75rem .25rem; min-height: 44px; font-family: var(--font-ui); font-size: .95rem; color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; display: inline-flex; align-items: center; }
.status-note { margin: 0; font-family: var(--font-ui); font-size: .85rem; letter-spacing: .04em; color: var(--color-ink-muted); }

/* =========================== ENTRANCE — the mural wall =========================== */
.entrance {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.5rem, 5vh, 4rem) clamp(1.25rem, 6vw, 6rem) 3rem;
}
.entrance__wall {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 60% at 30% 45%, rgba(255, 196, 120, .16), rgba(0,0,0,0) 70%),
    linear-gradient(180deg, rgba(18, 22, 34, .62) 0%, rgba(14, 12, 10, .52) 55%, rgba(10, 8, 6, .86) 100%),
    var(--brick) 0 0 / 384px 384px;
}
.entrance__wall::after { /* a wet sidewalk edge at the foot of the wall */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18%;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(8,7,6,.9)), var(--ground) 0 0 / 360px 360px;
  -webkit-mask: linear-gradient(180deg, transparent, #000 40%); mask: linear-gradient(180deg, transparent, #000 40%);
}
.entrance__mural { margin: 0; justify-self: center; width: min(100%, 34rem); }
.entrance__mural img { width: 100%; height: auto; filter: saturate(.92) contrast(1.02); }
.entrance__words { position: relative; }
.entrance h1 {
  font-size: clamp(3.2rem, 7.6vw, 7rem); font-style: italic; font-weight: 500; letter-spacing: -.01em;
  color: #ffd99a;
  text-shadow: 0 0 1px rgba(255, 210, 140, .6), 0 0 18px rgba(240, 160, 70, .35), 0 2px 0 rgba(60, 30, 10, .6);
}
.entrance__name { margin: 1.2rem 0 0; font-family: var(--font-ui); font-weight: 700; font-size: clamp(1.15rem, 2vw, 1.6rem); letter-spacing: .16em; text-transform: uppercase; color: #eef0ee; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.entrance__dates { margin: .2rem 0 0; font-family: var(--font-ui); font-weight: 600; font-size: clamp(1.05rem, 1.7vw, 1.35rem); letter-spacing: .2em; color: var(--color-silver); font-variant-numeric: lining-nums; }
.entrance__dates::after { content: ""; display: block; width: 4rem; height: 2px; margin-top: 1rem; background: linear-gradient(90deg, var(--color-midnight), var(--color-silver)); }
.entrance__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(1.6rem, 4vh, 2.6rem); }
.entrance__note { position: absolute; left: clamp(1.25rem, 6vw, 6rem); bottom: 1rem; }
.entrance__note a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }

/* =========================== WALKWAY (CSS 3D) =========================== */
.hall { position: relative; background: #0f0d0b; }
.viewport {
  position: relative; height: max(520px, calc(100svh - 96px)); overflow: clip;
  background: #1b2030; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.viewport:focus-visible { outline: 3px solid var(--color-focus); outline-offset: -4px; }
.stage { position: absolute; inset: 0; perspective: 900px; perspective-origin: 50% 50%; overflow: clip; }
.world { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.world > * { position: absolute; left: 0; top: 0; transform-origin: 50% 50%; }
.plane { backface-visibility: hidden; pointer-events: none; }
.ds { pointer-events: none; } /* double-sided decorative */

/* progressive light: --dim (0 = full warm light, 1 = subdued city night) is set per element */
.shade { background-blend-mode: normal; }
.brickwall {
  background:
    linear-gradient(rgba(10, 12, 22, calc(.30 + .42 * var(--dim, .5))), rgba(10, 12, 22, calc(.30 + .42 * var(--dim, .5)))),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 78%, rgba(0,0,0,.45) 100%),
    var(--brick) 0 0 / 256px 256px;
}
.ground {
  background:
    linear-gradient(rgba(6, 8, 14, calc(.15 + .35 * var(--dim, .5))), rgba(6, 8, 14, calc(.15 + .35 * var(--dim, .5)))),
    linear-gradient(90deg, rgba(0,0,0,.55) 0, rgba(0,0,0,0) 14%, rgba(0,0,0,0) 86%, rgba(0,0,0,.55) 100%),
    var(--ground) 0 0 / 300px 300px;
}
.curb-top { background: linear-gradient(90deg, #5d5750, #77706a 50%, #5a544d); filter: brightness(calc(1 - .45 * var(--dim, .5))); }
.curb-face { background: linear-gradient(180deg, #4f4a44, #2c2925); filter: brightness(calc(1 - .45 * var(--dim, .5))); }
.fence {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cpath d='M0 13 L13 0 L26 13 L13 26 Z' fill='none' stroke='%23a7aaa6' stroke-width='1.4' stroke-opacity='.55'/%3E%3C/svg%3E");
  background-size: 26px 26px;
  opacity: calc(.85 - .25 * var(--dim, .5));
}
.rail-tube { background: linear-gradient(180deg, #8d918f, #4a4d4c 60%, #2b2d2c); border-radius: 4px; }
.post { background: linear-gradient(90deg, #2a2d2c, #5c605e 45%, #2a2d2c); }
.ribbon { background: linear-gradient(180deg, var(--color-midnight), #0a3a3f); box-shadow: inset 0 0 0 1px rgba(185,192,195,.35); }
.trestle {
  background:
    linear-gradient(rgba(6,8,12,calc(.25 + .45 * var(--dim, .5))), rgba(6,8,12,calc(.25 + .45 * var(--dim, .5)))),
    repeating-linear-gradient(90deg, rgba(0,0,0,0) 0 150px, #1e2222 150px 176px, #3a3f3e 176px 180px, rgba(0,0,0,0) 180px 340px),
    repeating-linear-gradient(0deg, #2d3332 0 56px, #3b4241 56px 60px, #262b2a 60px 116px),
    #2d3332;
}
.girder {
  background:
    radial-gradient(circle at 50% 50%, #7b8180 0 2px, rgba(0,0,0,0) 2.5px) 0 6px / 22px 22px repeat-x,
    radial-gradient(circle at 50% 50%, #7b8180 0 2px, rgba(0,0,0,0) 2.5px) 0 calc(100% - 6px) / 22px 22px repeat-x,
    linear-gradient(180deg, #4b5251 0, #2a2f2f 18%, #1e2222 50%, #2a2f2f 82%, #4b5251 100%);
  filter: brightness(calc(1 - .4 * var(--dim, .5)));
}
.column { background: linear-gradient(90deg, #1a1d1d, #48504f 30%, #2e3433 60%, #161919); filter: brightness(calc(1 - .4 * var(--dim, .5))); }
.backdrop { position: absolute; top: 0; bottom: 0; left: -100%; width: 300%; pointer-events: none; }
.backdrop__sky { position: absolute; inset: 0;
  background:
    radial-gradient(30% 22% at 50% 50%, rgba(255, 150, 90, .45), rgba(255,150,90,0) 70%),
    linear-gradient(180deg, #0f1631 0%, #232650 25%, #4f3d6c 40%, #a8626a 48%, #e0925e 52%, #2a2220 56%, #15110e 100%);
}
.backdrop__skyline { position: absolute; left: 50%; width: max(33.34%, 1100px); transform: translateX(-50%); bottom: 49%; height: 38%; } /* keep skyline proportions on narrow screens */

/* Mural on the entrance wall in the scene */
.mural3d { background: var(--brick) 0 0 / 256px 256px; }
.mural3d::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(10,12,22,.42), rgba(10,12,22,.42)); }
.mural3d img { position: absolute; left: 3%; top: 7%; height: 86%; width: auto; }
.mural3d__words { position: absolute; left: 53%; right: 2%; top: 26%; text-align: left; white-space: nowrap; }
.mural3d__title { font-family: var(--font-serif); font-style: italic; font-size: 92px; line-height: .95; color: #ffd99a; text-shadow: 0 0 16px rgba(240,160,70,.35); margin: 0; }
.mural3d__name { font-family: var(--font-ui); font-weight: 700; font-size: 30px; letter-spacing: .12em; text-transform: uppercase; color: #eef0ee; margin: 26px 0 0; }
.mural3d__dates { font-family: var(--font-ui); font-weight: 600; font-size: 30px; letter-spacing: .2em; color: #c9cfd1; margin: 6px 0 0; }

/* Frames: proportions come from each photograph; never cropped */
.frame {
  display: block; padding: 0; margin: 0; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #5d3c24 0%, #3a2414 45%, #563620 70%, #2e1c10 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 18px 24px -12px rgba(0,0,0,.8);
  backface-visibility: hidden;
}
.frame__mat { position: absolute; inset: var(--moulding, 8px); background: #efe7d8; box-shadow: inset 0 2px 5px rgba(0,0,0,.35); }
.frame__photo { position: absolute; inset: var(--mat, 10px); width: calc(100% - 2 * var(--mat, 10px)); height: calc(100% - 2 * var(--mat, 10px)); object-fit: contain; background: #1c1814; }
.frame::after { /* warm picture-light falloff across the frame */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 214, 150, .16) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0, calc(.10 + .25 * var(--dim, .5))) 100%);
}
.frame:hover { filter: brightness(1.12); }
.frame:focus-visible { outline: 5px solid var(--color-focus); outline-offset: 6px; }

.lamp-head { /* small industrial shade */
  border-radius: 50% 50% 8% 8% / 90% 90% 10% 10%;
  background: linear-gradient(180deg, #3b3f3e, #1d201f 70%, #e8b062 72%, #ffe1a8 100%);
}
.lamp-arm { background: #232625; }
.glow { border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 205, 130, var(--a, .55)), rgba(255, 170, 80, calc(var(--a, .55) * .35)) 45%, rgba(255,160,70,0) 100%); }
.wash { background: radial-gradient(50% 50% at 50% 30%, rgba(255, 196, 120, var(--a, .4)), rgba(255, 170, 90, calc(var(--a, .4) * .4)) 50%, rgba(0,0,0,0) 80%); }
.pool { border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 188, 110, var(--a, .35)), rgba(255, 160, 80, calc(var(--a, .35) * .3)) 55%, rgba(0,0,0,0) 100%); }
.streak { background: linear-gradient(0deg, rgba(255,190,110,0), rgba(255, 190, 110, var(--a, .2)) 60%, rgba(255,190,110,0)); -webkit-mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); }

.candle { background: linear-gradient(90deg, #cdbfa6, #f6efe1 45%, #c6b79d); border-radius: 2px 2px 1px 1px; }
.candle::before { /* flame */
  content: ""; position: absolute; left: 50%; top: -11px; width: 6px; height: 11px; margin-left: -3px;
  border-radius: 50% 50% 45% 45% / 70% 70% 30% 30%;
  background: radial-gradient(circle at 50% 70%, #fff6d6 0 25%, #ffcf6e 55%, rgba(255,150,40,.0) 100%);
}
.candle-jar { background: linear-gradient(90deg, rgba(255,220,170,.25), rgba(255,240,210,.45) 45%, rgba(255,220,170,.2)); border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255,235,200,.35); }

/* Memorial alcove */
.endwall { background:
    linear-gradient(rgba(10,12,22,.18), rgba(10,12,22,.18)),
    radial-gradient(45% 50% at 50% 55%, rgba(255, 190, 110, .45), rgba(0,0,0,0) 75%),
    var(--brick) 0 0 / 256px 256px; }
.arch {
  border-radius: 999px 999px 0 0;
  background:
    radial-gradient(70% 55% at 50% 50%, rgba(255, 214, 150, .55), rgba(255, 180, 100, .12) 70%, rgba(0,0,0,0)),
    linear-gradient(rgba(40, 22, 10, .45), rgba(40, 22, 10, .45)),
    var(--brick) 0 0 / 200px 200px;
  box-shadow: inset 0 30px 50px rgba(20, 10, 4, .65), inset 0 -10px 30px rgba(255, 190, 110, .25);
}
.arch-lights { border-radius: 999px 999px 0 0; border: 7px dotted #ffd58f; border-bottom: 0; filter: drop-shadow(0 0 4px rgba(255, 190, 100, .8)); }
.arch-trim { border-radius: 999px 999px 0 0; border: 26px solid #6f3b26; border-bottom: 0; box-shadow: inset 0 0 0 2px rgba(0,0,0,.3); background: none; filter: brightness(.9); }
.endwall { overflow: visible; } /* hidden broke hit-testing of the plaque button in Chrome */
.plaque-frame { pointer-events: auto; --moulding: 12px; --mat: 18px; background: linear-gradient(135deg, #8a6a3e 0%, #5d4423 40%, #9c7a48 65%, #4d381d 100%); }
.plaque-frame .frame__mat { background: #2b241c; }
.plaque-frame::after { background: linear-gradient(180deg, rgba(255, 220, 160, .18), rgba(0,0,0,0) 50%); }
.step-top { background: linear-gradient(180deg, #6c635a, #8a8178); }
.step-face { background: linear-gradient(180deg, #5b524a, #36302a); }
.urn { background: linear-gradient(90deg, #2a2a2a, #6a6a66 45%, #2a2a2a); border-radius: 10% 10% 40% 40% / 10% 10% 60% 60%; }
.lilies { filter: drop-shadow(0 8px 10px rgba(0,0,0,.55)) brightness(.9) saturate(.9); }
.lilies svg, .backdrop__skyline svg { width: 100%; height: 100%; display: block; overflow: visible; }

.atmo { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(130% 95% at 50% 46%, rgba(0,0,0,0) 52%, rgba(6, 5, 4, .55) 100%),
    linear-gradient(180deg, rgba(40, 60, 110, var(--cool, .18)), rgba(40, 60, 110, 0) 70%),
    radial-gradient(60% 50% at 50% 55%, rgba(255, 170, 80, var(--warm, 0)), rgba(255,170,80,0) 80%);
}

/* HUD */
.hud { position: absolute; left: 0; right: 0; pointer-events: none; z-index: 3; }
.hud--top { top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: .9rem 1rem; }
.hud__where { margin: 0; pointer-events: auto; background: rgba(20, 16, 12, .78); color: var(--color-ink); font-size: 1.1rem; line-height: 1.2; padding: .55rem .9rem; border-radius: var(--radius-control); border: 1px solid rgba(231,165,75,.25); }
.hud__top-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; pointer-events: auto; }
.hud-btn { min-height: 44px; display: inline-flex; align-items: center; padding: .5rem .9rem; background: rgba(20, 16, 12, .78); color: var(--color-ink); border: 1px solid rgba(243,234,217,.3); border-radius: var(--radius-control); font-family: var(--font-ui); font-size: .92rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.hud-btn:hover { background: rgba(40, 32, 24, .9); }
.walk-help { position: absolute; z-index: 3; left: 1rem; top: 4.6rem; max-width: 32rem; background: rgba(20, 16, 12, .92); color: var(--color-ink); border-radius: var(--radius-control); padding: .8rem 1rem .4rem; border: 1px solid rgba(231,165,75,.3); font-family: var(--font-ui); font-size: .92rem; line-height: 1.5; }
.walk-help[hidden] { display: none; }
.walk-help__line { margin: 0 0 .45rem; }
kbd { display: inline-block; min-width: 1.6em; padding: 0 .35em; margin: 0 .08em; border: 1px solid #8a7b66; border-bottom-width: 2px; border-radius: 3px; background: #2b241c; color: var(--color-ink); font-family: var(--font-ui); font-size: .85em; text-align: center; line-height: 1.5; }
.hud--rail { bottom: 0; padding: 0 1rem .7rem; }
.rail { height: 3px; background: rgba(255,255,255,.18); border-radius: 2px; overflow: hidden; }
.rail__fill { display: block; height: 100%; width: 0; background: var(--color-accent); }

/* Controls — big, simple, no joystick */
.controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem; padding: .7rem clamp(.75rem, 3vw, 2rem); background: #0f0d0b; min-height: 96px; }
.ctl {
  min-height: 52px; min-width: 52px; padding: .6rem 1.1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: #2a241d; color: var(--color-ink); border: 1px solid #5b4e3f; border-radius: var(--radius-control);
  font-family: var(--font-ui); font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: background-color var(--dur-press) linear; -webkit-tap-highlight-color: transparent;
}
.ctl:hover { background: #382f25; }
.ctl:active, .ctl.is-held { background: #4a3d2f; }
.ctl--arrow { min-height: 64px; min-width: 120px; font-size: 1.1rem; }
.ctl--arrow span[aria-hidden] { font-size: 1.6rem; line-height: 1; }
.ctl--amber { background: var(--color-accent); color: var(--color-on-accent); border-color: #b97a2a; }
.ctl--amber:hover { background: var(--color-accent-strong); }
.ctl--amber:active, .ctl--amber.is-held { background: #d08f39; }

/* =========================== GALLERY =========================== */
.gallery { padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 5vw, 5rem); background: var(--color-surface); }
.gallery__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--color-border); padding-bottom: 1rem; }
.gallery h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.gallery__count { margin: 0; font-family: var(--font-ui); font-size: .95rem; color: var(--color-ink-muted); }
.gallery__rows { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.gallery__rows::after { content: ""; flex-grow: 999; }
.gallery__item { flex-grow: var(--ar); flex-basis: calc(var(--ar) * 230px); }
.tile { display: block; width: 100%; padding: 8px; margin: 0; border: 1px solid var(--color-border); background: var(--color-surface-raised); cursor: pointer; border-radius: 2px; }
.tile img { width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: contain; background: #120f0c; }
.tile:hover { border-color: var(--color-accent); }
.gallery__plaque { margin-top: 2.5rem; }
.plaque-link { display: inline-grid; grid-template-columns: 160px auto; align-items: center; gap: 1.25rem; padding: 10px 1.5rem 10px 10px; background: var(--color-surface-raised); border: 1px solid var(--color-border); border-radius: 2px; cursor: pointer; font-family: var(--font-serif); font-size: 1.35rem; color: var(--color-ink); text-align: left; }
.plaque-link:hover { border-color: var(--color-accent); }

/* =========================== MEMORIES =========================== */
.memories { padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 5vw, 5rem); background: var(--color-page); }
.memories__inner { max-width: 40rem; border-left: 2px solid var(--color-accent); padding-left: clamp(1rem, 3vw, 2rem); }
.memories h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 1rem; }
.memories p { margin: 0 0 1rem; }
.memories__status { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-ui); font-size: .85rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--color-ink-muted); }
.dot { width: .55rem; height: .55rem; border-radius: 50%; border: 2px solid var(--color-ink-muted); }
.footer { padding: 2.5rem clamp(1rem, 5vw, 5rem) 3rem; background: #0c0a08; color: var(--color-ink); }
.footer p { margin: 0 0 .25rem; }
.footer__name { font-size: 1.4rem; font-style: italic; }
.footer .status-note { margin-top: .75rem; }

/* =========================== OVERLAYS =========================== */
.overlay { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--color-overlay); color: var(--color-ink); display: grid; grid-template-rows: auto 1fr auto; }
.overlay:not([open]) { display: none; }
.overlay::backdrop { background: rgba(0,0,0,.6); }
.overlay[open] { animation: overlay-in var(--dur-overlay) var(--ease-out); }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.overlay__bar { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; gap: 1rem; }
.overlay__count { margin: 0; font-size: 1.15rem; }
.overlay__figure { margin: 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 1rem; }
.overlay__figure img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.overlay__nav { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .75rem 1rem 1rem; }
.overlay__nav--single { justify-content: center; }

/* =========================== RESPONSIVE =========================== */
@media (max-width: 820px) {
  .entrance { grid-template-columns: 1fr; padding: 1.25rem 1.25rem 3.5rem; row-gap: 1.25rem; min-height: auto; }
  .entrance__mural { width: min(86vw, 22rem); }
  .entrance__actions .btn { flex: 1 1 100%; }
  .viewport { height: max(440px, calc(100svh - 150px)); }
  .controls { display: grid; grid-template-columns: 1fr 1fr; min-height: 150px; }
  .ctl--arrow { min-width: 0; }
  .hud__where { font-size: 1rem; }
  .hud--top { flex-direction: column; }
  .hud__top-actions { justify-content: flex-start; }
  #helpToggle { display: none; }
  .walk-help { right: 1rem; }
  .plaque-link { grid-template-columns: 110px auto; font-size: 1.15rem; }
  .gallery__item { flex-basis: calc(var(--ar) * 150px); }
}
@media (hover: none) and (pointer: coarse) { #helpToggle { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .overlay[open] { animation: none; }
  .btn, .ctl { transition: none; }
}

/* brick plinth under the memorial arch, with a plain stone cap */
.plinth { border-top: 10px solid #6f655a; box-shadow: inset 0 8px 14px rgba(0,0,0,.45); filter: brightness(.82); }

/* ---------------------------------------------------------------- v2: WebGL walkway */
.stage--gl { position: absolute; inset: 0; overflow: hidden; perspective: none; background: #0c0b12; }
.stage--gl canvas.gl { display: block; width: 100%; height: 100%; touch-action: pan-y; opacity: 0; transition: opacity .6s ease; }
.viewport.is-ready .stage--gl canvas.gl { opacity: 1; }
.loading { position: absolute; inset: 0; display: grid; place-content: center; gap: 14px; text-align: center; padding: 24px; color: #eadfcd; background: radial-gradient(ellipse at 60% 40%, #2a2030, #0c0b12 70%); z-index: 3; }
.loading[hidden] { display: none; }
.loading__msg { margin: 0; font-size: 1.05rem; max-width: 34em; }
.loading__bar { width: min(260px, 70vw); height: 4px; margin: 0 auto; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.loading__bar span { display: block; height: 100%; width: 0; background: #e8a85a; transition: width .2s; }
.loading.is-error .loading__bar { display: none; }
.frame-buttons { position: absolute; left: 0; right: 0; bottom: 64px; display: flex; justify-content: center; pointer-events: none; z-index: 4; }
.frame-btn { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.frame-btn:focus-visible { position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; white-space: normal; max-width: min(92%, 640px); min-height: 44px; padding: 10px 16px; border-radius: 10px; border: 2px solid #f1c27d; background: rgba(16,13,10,.88); color: #f6ecdc; font: inherit; pointer-events: auto; text-align: left; }
@media (prefers-reduced-motion: reduce) { .stage--gl canvas.gl { transition: none; } }

/* ---- 3D <-> Photos & Memories switcher + short page transition (added with the landing page) ---- */
.hud-btn--switch { border-color: rgba(242,188,106,.75); }
.walk-switch { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 30; min-height: 44px; display: inline-flex; align-items: center;
  padding: .5rem 1rem; border-radius: 999px; background: rgba(20,16,12,.9); color: var(--color-ink); border: 1px solid rgba(242,188,106,.75); font: 600 .95rem var(--font-ui); text-decoration: none; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.walk-switch[hidden] { display: none; }
.footer a { display: inline-flex; min-height: 44px; align-items: center; }
.veil { position: fixed; inset: 0; z-index: 100; pointer-events: none; visibility: hidden; }
.veil img { display: none; }
.veil::after { content: ""; position: absolute; inset: 0; opacity: 0; background: var(--color-page); }
.veil.is-on { visibility: visible; }
.veil.is-on::after { animation: veil-dim .4s ease-in forwards; }
@keyframes veil-dim { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .veil { display: none; } }

/* ---- v7: light polish for the walk top bar (additive; keeps 44px targets + focus ring) ---- */
.hud__where, .hud-btn {
  background: rgba(18, 14, 22, .74);
  -webkit-backdrop-filter: blur(6px) saturate(1.1); backdrop-filter: blur(6px) saturate(1.1);
  border-color: rgba(242, 188, 106, .38);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 236, 205, .06);
}
.hud__where { font-family: var(--font-serif); letter-spacing: .01em; }
.hud-btn { gap: .4rem; letter-spacing: .01em; transition: background-color .15s linear, border-color .15s linear; }
.hud-btn:hover { background: rgba(48, 36, 30, .9); border-color: rgba(242, 188, 106, .7); }
.hud-btn:active { background: rgba(62, 46, 34, .95); }
.hud-btn--switch { border-color: rgba(242, 188, 106, .8); background: rgba(52, 34, 18, .8); }
.hud__top-actions { gap: .45rem; }
@media (prefers-reduced-motion: reduce) { .hud-btn { transition: none; } }
@media (forced-colors: active) { .hud__where, .hud-btn { box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ---- v12 living memorial wall: Leave a Memory control, leave-mode banner, memory panel, (disabled) form ---- */
.ctl--quiet { background: transparent; border-color: rgba(242,188,106,.45); color: var(--color-ink); font-weight: 600; }
.ctl--quiet[aria-pressed="true"] { background: rgba(242,188,106,.18); border-color: rgba(242,188,106,.9); }
.leave-banner { position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); bottom: 18px; width: min(92%, 560px); display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; justify-content: center;
  padding: .6rem .8rem; border-radius: var(--radius-control); background: rgba(18,14,22,.86); border: 1px solid rgba(242,188,106,.55); color: var(--color-ink); font: .95rem/1.35 var(--font-ui); }
.leave-banner[hidden] { display: none; }
.leave-banner__msg { margin: 0; text-align: center; }
.leave-banner__actions { display: flex; gap: .5rem; }
.overlay--memory, .overlay--leave { grid-template-rows: auto 1fr; }
.memory-panel { min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; padding: .5rem clamp(1rem, 4vw, 3rem) 2rem; max-width: 1100px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.memory-panel__photo { margin: 0; background: #ece5d6; padding: 4% 4% 14%; box-shadow: 0 14px 40px rgba(0,0,0,.6); transform: rotate(-1deg); }
.memory-panel__photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.memory-panel__empty { width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, #26231f, #1a1816 55%, #221e1b); }
.memory-panel__tag { margin: 0 0 .8rem; font: 700 1.5rem/1.15 "Trebuchet MS", system-ui, sans-serif; color: #e9cf96; text-shadow: 0 0 6px rgba(233,207,150,.35); overflow-wrap: anywhere; }
.memory-panel__body { white-space: pre-wrap; overflow-wrap: anywhere; font: 1.08rem/1.6 var(--font-serif); max-height: 52dvh; overflow: auto; padding-right: .4rem; }
.memory-panel__name { margin: 1rem 0 0; font-style: italic; opacity: .85; }
.memory-panel__name:empty, .memory-panel__tag:empty { display: none; }
.memory-panel__open { font: 1.05rem/1.5 var(--font-ui); }
.memory-panel__open .ctl { margin-top: .6rem; }
@media (max-width: 720px) { .memory-panel { grid-template-columns: 1fr; gap: 1rem; } .memory-panel__photo { width: min(78vw, 360px); justify-self: center; } .memory-panel__body { max-height: none; } }
.leave-form { min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; display: grid; gap: .9rem; padding: .25rem clamp(1rem, 4vw, 2rem) 2rem; max-width: 640px; width: 100%; margin: 0 auto; box-sizing: border-box; font-family: var(--font-ui); }
.leave-form__notice { margin: 0; padding: .75rem .9rem; border-radius: 10px; border: 1px solid rgba(242,188,106,.7); background: rgba(242,188,106,.12); line-height: 1.45; }
.leave-form__field { display: grid; gap: .35rem; font-weight: 600; }
.leave-form__field input[type=text], .leave-form__field textarea, .leave-form__field select { font: 1rem/1.4 var(--font-ui); padding: .6rem .7rem; border-radius: 8px; border: 1px solid rgba(243,234,217,.35); background: #191511; color: var(--color-ink); min-height: 44px; box-sizing: border-box; width: 100%; }
.leave-form__field input[type=file] { color: var(--color-ink); min-height: 44px; }
.leave-form__count { font-weight: 400; opacity: .7; font-size: .85rem; margin-left: .4rem; }
.leave-form__hint { margin: 0; font-weight: 400; font-size: .9rem; opacity: .85; }
.leave-form__preview { max-width: 180px; max-height: 180px; border: 6px solid #ece5d6; border-bottom-width: 22px; }
.leave-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.leave-form__actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.leave-form__actions .ctl[disabled] { opacity: .55; cursor: not-allowed; }
.leave-form__status { margin: 0; font-size: .95rem; color: #f1c27d; }
/* v12.1: [hidden] must win over the display rules above; Leave a Memory spans the mobile control grid */
.memory-panel [hidden], .leave-form [hidden] { display: none !important; }
@media (max-width: 820px) { .controls #leaveMemory { grid-column: 1 / -1; min-height: 44px; } }
/* Cycle B P0 honesty: open-spot panel links to the website's "Not open yet" explanation */
.memory-panel__link { color: #f0b45c; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.memory-panel__link:hover, .memory-panel__link:focus-visible { color: #ffd08a; }
/* Cycle B: the empty print in the panel matches the cream blank Polaroids on the wall (not a black void) */
.memory-panel__empty { background: radial-gradient(circle at 50% 50%, rgba(255,248,230,.35), rgba(150,110,60,.2) 75%), linear-gradient(135deg, #e2cfa8, #d6c097 55%, #ccb388); }

/* ---------------- website design cycle (Nov 2 2026): the walk entrance uses the same lockup as the homepage and Photos page ----------------
   One heading style (EB Garamond roman, cream), name in small spaced caps, dates in gold. Entrance styling only: no change to the walk. */
.entrance h1 { font-size: clamp(2.9rem, 6.2vw, 5.4rem); font-style: normal; font-weight: 400; letter-spacing: .005em; line-height: 1.02; color: var(--color-ink); text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.entrance__name { margin: .8rem 0 0; font-family: var(--font-serif); font-weight: 400; font-size: clamp(1rem, 1.6vw, 1.2rem); letter-spacing: .22em; color: var(--color-ink); }
.entrance__dates { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1rem, 1.6vw, 1.2rem); letter-spacing: .3em; color: var(--color-accent-strong); }
.entrance__dates::after { display: none; }
.entrance__actions .btn { min-height: 52px; }
