/* The home album: a real perspective cylinder, with a plain photo rail fallback. */
.home-gallery {
  --memory-width: clamp(260px,27vw,360px);
  --memory-height: 440px;
  --memory-radius: clamp(420px,43vw,560px);
  --memory-perspective: 1300px;
  position: relative;
  overflow: hidden;
  padding: 110px 0 85px;
  background: radial-gradient(ellipse at 50% 52%,var(--warm-glow),transparent 66%),var(--bark);
  color: var(--cream);
}
.memory-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:40px; padding:0 6vw; }
.memory-heading .eyebrow { color:var(--honey); margin-bottom:25px; }
.memory-heading h2 { font-size:clamp(3.7rem,6vw,6.8rem); line-height:1; }
.memory-heading > p { max-width:275px; color:var(--muted); line-height:1.8; font-size:.95rem; margin-bottom:8px; }
.memory-carousel { position:relative; }
.memory-categories { display:flex; justify-content:center; gap:12px; padding:0 6vw; margin:46px 0 0; }
.memory-categories button { flex-shrink:0; display:flex; align-items:center; gap:9px; border:1px solid var(--line); background:transparent; color:var(--muted); padding:12px 17px; font-size:.8rem; min-height:44px; white-space:nowrap; border-radius:2px; transition:color .25s,border-color .25s,background .25s; }
.memory-categories button small { font-size:.6rem; color:var(--honey); opacity:.65; }
.memory-categories button[aria-pressed=true] { color:var(--cream); border-color:var(--honey); background:var(--gold-glow); }
.memory-categories button[aria-pressed=true] small { opacity:1; }
.memory-stage { position:relative; margin-top:38px; outline-offset:-5px; }
.memory-ring { display:flex; gap:25px; overflow-x:auto; scroll-snap-type:x mandatory; padding:10px 6vw 25px; }
.memory-card { display:block; position:relative; flex:0 0 var(--memory-width); height:var(--memory-height); border:1px solid var(--wood-border); border-radius:3px; overflow:hidden; scroll-snap-align:center; background:var(--surface); box-shadow:0 18px 35px #08060466; color:var(--cream); -webkit-user-drag:none; }
.memory-card img { width:100%; height:100%; object-fit:cover; object-position:var(--memory-focal,center); display:block; -webkit-user-drag:none; user-select:none; }
.memory-card:after { content:''; position:absolute; inset:40% 0 0; background:linear-gradient(transparent,#140e09dd); pointer-events:none; }
.memory-card-index { position:absolute; top:17px; left:18px; color:#fff8e9; font-size:.65rem; letter-spacing:.15em; background:#20180f70; border:1px solid #ffffff30; padding:7px 9px; z-index:1; }
.memory-card-copy { position:absolute; bottom:26px; left:24px; right:24px; display:flex; flex-direction:column; gap:11px; z-index:1; }
.memory-card-copy small { font-size:.61rem; letter-spacing:.18em; text-transform:uppercase; color:#edd6a6; }
.memory-card-copy strong { font:400 clamp(1.95rem,2.7vw,2.9rem)/1.08 var(--serif); }
.memory-card-copy em { font:400 .69rem/1.5 var(--sans); letter-spacing:.02em; color:#f6e8ce; }
.memory-floor { display:none; }
.home-gallery.is-enhanced .memory-stage { height:560px; margin-top:0; perspective:var(--memory-perspective); cursor:grab; touch-action:pan-y pinch-zoom; user-select:none; }
.home-gallery.is-enhanced .memory-ring { position:absolute; width:var(--memory-width); height:var(--memory-height); top:50%; left:50%; margin-left:calc(var(--memory-width) / -2); margin-top:calc(var(--memory-height) / -2); overflow:visible; display:block; padding:0; transform-style:preserve-3d; transform:translateZ(calc(-1 * var(--memory-radius))) rotateY(var(--memory-turn,0deg)); transition:transform 1000ms cubic-bezier(.22,.7,.2,1); }
.home-gallery.is-enhanced .memory-card { position:absolute; inset:0; width:100%; height:100%; margin:0; backface-visibility:hidden; transform:rotateY(var(--memory-angle)) translateZ(var(--memory-radius)); opacity:var(--memory-opacity,.52); border-color:var(--wood-border); transition:opacity 800ms ease,border-color 800ms ease; }
.home-gallery.is-enhanced .memory-card[aria-current=true] { border-color:var(--honey); cursor:zoom-in; }
.home-gallery.is-enhanced .memory-card-copy em { opacity:0; transition:opacity .45s ease; }
.home-gallery.is-enhanced .memory-card[aria-current=true] .memory-card-copy em { opacity:1; }
.home-gallery.is-enhanced .memory-floor { display:block; position:absolute; left:50%; bottom:28px; width:min(930px,88%); height:105px; border:1px solid var(--line); border-radius:50%; transform:translateX(-50%) rotateX(64deg); background:radial-gradient(ellipse,#08060480,transparent 70%); pointer-events:none; opacity:.8; }
.home-gallery.is-dragging .memory-ring { transition:none; }
.home-gallery.is-dragging .memory-stage { cursor:grabbing; }
.memory-toolbar { padding:0 6vw; display:flex; align-items:center; justify-content:space-between; gap:22px; position:relative; z-index:2; }
.memory-current { display:flex; align-items:center; gap:18px; min-width:210px; }
.memory-current > span { color:var(--honey); font-size:.73rem; letter-spacing:.05em; }
.memory-current > strong { color:var(--muted); font-size:.7rem; font-weight:400; font-variant-numeric:tabular-nums; letter-spacing:.1em; }
.memory-turn-controls { display:flex; align-items:center; gap:9px; }
.memory-prev,.memory-next { display:grid; place-items:center; width:46px; height:46px; min-width:46px; border:1px solid var(--wood-border); border-radius:50%; background:transparent; color:var(--cream); transition:background .25s,border-color .25s; }
.memory-prev:hover,.memory-next:hover { background:var(--gold-glow); border-color:var(--honey); }
.memory-carousel .playback-toggle { position:static; margin:0 0 0 8px; min-height:44px; min-width:122px; padding:10px 12px; border:1px solid var(--line); background:transparent; color:var(--muted); font-size:.73rem; border-radius:2px; transform:none; }
.memory-carousel .playback-toggle[aria-pressed=false] { color:var(--honey); border-color:var(--honey); }
.memory-hint { font-size:.68rem; color:var(--muted); }
.memory-footer { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:34px 6vw 0; border-top:1px solid var(--line); padding-top:28px; }
.memory-footer > span { color:var(--muted); font-size:.83rem; line-height:1.8; }
.memory-footer .button { min-height:48px; gap:30px; border-color:var(--wood-border); }
.memory-footer .button > span { font-size:1.3rem; color:var(--honey); }
.memory-announcement { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.memory-carousel [hidden] { display:none!important; }
.home-gallery :focus-visible { outline:2px solid var(--honey); outline-offset:5px; }
.gallery-dialog .gallery-all-link { display:inline-block; margin-top:24px; color:var(--ink); border-bottom-color:var(--gold); }

@media (max-width:1000px) {
  .memory-hint { display:none; }
  .memory-categories { gap:8px; }
  .memory-categories button { padding:11px 12px; }
}
@media (max-width:750px) {
  .home-gallery { --memory-width:clamp(190px,59vw,252px); --memory-height:344px; --memory-radius:300px; --memory-perspective:900px; padding:80px 0 65px; }
  .memory-heading { display:block; padding:0 24px; }
  .memory-heading .eyebrow { font-size:.65rem; margin-bottom:20px; }
  .memory-heading h2 { font-size:3.45rem; }
  .memory-heading > p { max-width:310px; margin:24px 0 0; font-size:.86rem; }
  .memory-categories { margin-top:30px; padding:0 24px 8px; justify-content:flex-start; overflow-x:auto; scrollbar-width:thin; scrollbar-color:var(--wood-border) transparent; }
  .memory-categories button { padding:10px 12px; font-size:.73rem; gap:7px; }
  .home-gallery.is-enhanced .memory-stage { height:440px; }
  .home-gallery.is-enhanced .memory-ring { transition-duration:800ms; }
  .home-gallery.is-enhanced .memory-floor { bottom:14px; width:95%; height:82px; }
  .memory-card-copy { left:18px; right:18px; bottom:22px; gap:8px; }
  .memory-card-copy strong { font-size:1.9rem; }
  .memory-card-copy small { font-size:.55rem; }
  .memory-card-copy em { font-size:.61rem; }
  .memory-card-index { top:14px; left:14px; font-size:.6rem; }
  .memory-toolbar { padding:0 24px; flex-wrap:wrap; gap:20px; }
  .memory-current { min-width:0; flex:1 1 100%; justify-content:center; }
  .memory-turn-controls { width:100%; justify-content:center; }
  .memory-carousel .playback-toggle { min-width:118px; }
  .memory-footer { margin:28px 24px 0; display:block; text-align:center; padding-top:25px; }
  .memory-footer > span { display:block; font-size:.79rem; }
  .memory-footer > span br { display:none; }
  .memory-footer .button { width:100%; justify-content:space-between; margin-top:20px; padding-inline:20px; }
}
@media (prefers-reduced-motion:reduce) {
  .home-gallery.is-enhanced .memory-ring,.home-gallery.is-enhanced .memory-card,.memory-card-copy em { transition:none!important; }
}
