/*
 * Sabari Studio - 3D scroll website. Plain CSS: scroll-driven animations
 * (animation-timeline: view() and named view-timelines, Baseline since
 * Firefox 159 in Oct 2026) and 3D transforms. No JavaScript.
 * Scenes: 1 lens hero, 2 darkroom prints, 3 corridor of frames, 4 film reel,
 * 5 album, 6 contact. Reduced motion and older browsers get the static layout
 * at the end of this file.
 */

/* ============================ SETTINGS ============================
   Change these when you change the photos (see README.txt).
   --hero-x, --hero-y : where the lens opens on the hero photo
                        (0 = left / top edge, 1 = right / bottom edge)
   --hero-ratio       : hero photo width divided by height (1200 x 800 = 1.5)
   --frames           : framed photos in the corridor, 3 to 8 (classes f0 ... f7)
   --reel-frames      : photos on the film reel, 6 to 12 (classes c0 ... c11) */
:root {
  --hero-x: 0.55;
  --hero-y: 0.45;
  --hero-ratio: 1.5;
  --frames: 6;
  --reel-frames: 7;
}
/* ================================================================== */

@font-face { font-family: Prata; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/prata-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }

/* per-element indexes (classes, not inline styles, so every renderer keeps them) */
.b0 { --k: 0; } .b1 { --k: 1; } .b2 { --k: 2; } .b3 { --k: 3; } .b4 { --k: 4; } .b5 { --k: 5; } .b6 { --k: 6; } .b7 { --k: 7; }
.c0 { --k: 0; } .c1 { --k: 1; } .c2 { --k: 2; } .c3 { --k: 3; } .c4 { --k: 4; } .c5 { --k: 5; }
.c6 { --k: 6; } .c7 { --k: 7; } .c8 { --k: 8; } .c9 { --k: 9; } .c10 { --k: 10; } .c11 { --k: 11; }
.f0 { --side: -1; --zf: -500; } .f1 { --side: 1; --zf: -1250; } .f2 { --side: -1; --zf: -2000; } .f3 { --side: 1; --zf: -2750; }
.f4 { --side: -1; --zf: -3500; } .f5 { --side: 1; --zf: -4250; } .f6 { --side: -1; --zf: -5000; } .f7 { --side: 1; --zf: -5750; }
.leaf--0 { --zr: 4px; --zl: 1px; } .leaf--1 { --zr: 3px; --zl: 2px; } .leaf--2 { --zr: 2px; --zl: 3px; }

@property --open { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --zoom { syntax: '<number>'; inherits: true; initial-value: 4.2; }
@property --reveal { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --t { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --spin { syntax: '<number>'; inherits: true; initial-value: -18; }

:root, .site {
  --bg: #0d0b0a; --bg2: #17120f; --ink: #f3ece2; --muted: #bdb0a0; --gold: #d9a441;
  --paper: #f1e9dc; --paper-ink: #2a211a; --wine: #8a2a2f;
  --stage-h: min(100vh, 900px);
  --R0: min(30vmin, 260px);
  --ly: 50%; /* where the lens sits on the screen (38% on phones) */
}
@supports (height: 100svh) { :root, .site { --stage-h: min(100svh, 900px); } }

.site { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
.site *, .site *::before, .site *::after { box-sizing: border-box; }
.site h1, .site h2 { font-family: Prata, Georgia, 'Times New Roman', serif; font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: 0.005em; text-wrap: balance; }
.site p { margin: 0; }
.site a { color: inherit; }
.site img { display: block; max-width: 100%; }
.eyebrow { font: 600 12px/1.2 Inter, system-ui, sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px !important; }
.lead { color: var(--muted); font-size: 18px; max-width: 620px; margin-top: 20px !important; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border-radius: 999px; background: var(--gold); color: #1a1208 !important; font: 600 15px/1 Inter, system-ui, sans-serif; text-decoration: none; border: 1px solid var(--gold); white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible, .site a:focus-visible, .menu summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn--ghost { background: transparent; color: var(--ink) !important; border-color: rgba(243, 236, 226, 0.4); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.actions--center { justify-content: center; }
.ic { flex: none; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--gold); color: #1a1208 !important; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* photos */
.photo, .photo img { display: block; width: 100%; height: 100%; }
.photo img { object-fit: cover; object-position: var(--pos, 50% 50%); }
.photo--empty { background: radial-gradient(120% 95% at 28% 18%, #4a2a24 0%, #1d1210 58%, #0b0908 100%); }

/* header */
.site-head { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px clamp(18px, 4vw, 48px); background: linear-gradient(to bottom, rgba(13, 11, 10, 0.9), rgba(13, 11, 10, 0)); }
.site-head::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(13, 11, 10, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(243, 236, 226, 0.08); opacity: 0; animation: head-solid linear both; animation-timeline: scroll(); animation-range: 1700px 2100px; }
@keyframes head-solid { to { opacity: 1; } }
.brand { display: block; line-height: 0; text-decoration: none; }
.brand img { width: 128px; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2.2vw, 28px); font-size: 15px; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); padding: 10px 0; }
.nav a:not(.btn):hover { color: var(--ink); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(243, 236, 226, 0.4); font-size: 14px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; display: flex; flex-direction: column; padding: 10px; border-radius: 14px; background: rgba(23, 18, 15, 0.97); border: 1px solid rgba(243, 236, 226, 0.12); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.menu-list a { padding: 12px 14px; text-decoration: none; border-radius: 8px; }
.menu-list a:hover { background: rgba(243, 236, 226, 0.06); }

/* 1 - lens hero */
.hero { position: relative; height: 2400px; view-timeline: --hero block; }
.hero-stage { position: sticky; top: 0; height: var(--stage-h); overflow: hidden; animation: hero-open linear both, hero-zoom linear both, hero-reveal linear both; animation-timeline: --hero, --hero, --hero; animation-range: contain 0% contain 52%, contain 34% contain 84%, contain 58% contain 96%; }
@keyframes hero-open { from { --open: 0.035; } to { --open: 1; } }
@keyframes hero-zoom { from { --zoom: 1; } to { --zoom: 4.2; } }
@keyframes hero-reveal { from { --reveal: 0; } to { --reveal: 1; } }
/* The photo is sized to cover the stage with its focus point at the centre, where the lens opens. */
.hero-photo {
  /* the photo is just large enough to cover the screen with its focus point in the lens */
  --fxc: clamp(0.25, var(--hero-x), 0.75); --fyc: clamp(0.25, var(--hero-y), 0.75);
  --fx: calc(var(--hero-x) * 100%); --fy: calc(var(--hero-y) * 100%); --ar: var(--hero-ratio);
  --cw: calc(1 / (2 * min(var(--fxc), 1 - var(--fxc))));
  --ch: calc(1 / (2 * min(var(--fyc), 1 - var(--fyc))));
  --chm: max(calc(0.38 / var(--fyc)), calc(0.62 / (1 - var(--fyc))));
  --chx: var(--ch); position: absolute; left: 50%; top: var(--ly); width: max(calc(100vw * var(--cw)), calc(var(--stage-h) * var(--chx) * var(--ar))); height: auto; aspect-ratio: var(--ar); transform-origin: var(--fx) var(--fy); transform: translate(calc(var(--fx) * -1), calc(var(--fy) * -1)) scale(calc(1 + (1 - var(--reveal)) * 0.22)); }
.hero-shade { position: absolute; inset: 0; background: radial-gradient(38% 34% at 0% 0%, rgba(13, 11, 10, 0.94) 0%, rgba(13, 11, 10, 0.7) 48%, rgba(13, 11, 10, 0) 100%), linear-gradient(to top, rgba(13, 11, 10, 0.97) 0%, rgba(13, 11, 10, 0.9) 9%, rgba(13, 11, 10, 0.45) 38%, rgba(13, 11, 10, 0.08) 70%, rgba(13, 11, 10, 0.25) 100%); opacity: var(--reveal); }
.hero-mask { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% var(--ly), transparent calc(var(--R0) * var(--zoom)), var(--bg) calc(var(--R0) * var(--zoom) + 1.5px)); }
.lens { position: absolute; left: 50%; top: var(--ly); width: calc(var(--R0) * 2); height: calc(var(--R0) * 2); transform: translate(-50%, -50%) scale(var(--zoom)); opacity: clamp(0, calc(1 - (var(--zoom) - 1) / 2.2), 1); pointer-events: none; }
.barrel { position: absolute; inset: -16%; border-radius: 50%; background: radial-gradient(circle, transparent 61.5%, #2c241f 62%, #120e0c 64.5%, #1e1814 72%, #0f0c0b 72.6%, #241d18 80%, #0d0b0a 81%); box-shadow: 0 0 120px rgba(217, 164, 65, 0.08); }
.barrel::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(243, 236, 226, 0.55) 0deg 0.7deg, transparent 0.7deg 7.5deg); -webkit-mask: radial-gradient(circle, transparent 74.5%, #000 75%, #000 78.5%, transparent 79%); mask: radial-gradient(circle, transparent 74.5%, #000 75%, #000 78.5%, transparent 79%); transform: rotate(calc(var(--open) * -40deg)); }
.lens-text { position: absolute; inset: -16%; width: 132%; height: 132%; transform: rotate(calc(var(--open) * 110deg)); }
.lens-text text { font: 600 6.4px Inter, system-ui, sans-serif; letter-spacing: 2.1px; fill: rgba(217, 164, 65, 0.85); }
.iris { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; transform: rotate(calc(var(--open) * 55deg)); }
.blade { position: absolute; left: -100%; top: -150%; width: 300%; height: 200%; transform-origin: 50% 100%; transform: rotate(calc(var(--k) * 45deg)) translateY(calc(var(--open) * var(--R0) * -1.18)); background: linear-gradient(to top, #4a3e36 0%, #221b17 4%, #120e0c 28%); filter: brightness(calc(0.78 + var(--k) * 0.045)); box-shadow: 0 1.5px 0 rgba(255, 214, 160, 0.32); }
.hero-intro { position: absolute; left: 0; right: 0; top: calc(var(--ly) + var(--R0) * 1.28); text-align: center; opacity: clamp(0, calc(1 - var(--open) * 1.8), 1); }
.hint { color: var(--muted); font-size: 14px; letter-spacing: 0.08em; }
.hero-copy { position: absolute; left: clamp(20px, 6vw, 96px); right: clamp(20px, 6vw, 96px); bottom: clamp(48px, 9vh, 88px); max-width: 820px; opacity: var(--reveal); transform: translateY(calc((1 - var(--reveal)) * 48px)); text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45); }
.hero-copy h1 { font-size: clamp(36px, 6.2vw, 88px); }
.hero-copy .lead { color: #e2d6c6; }

/* 2 - darkroom */
.darkroom { position: relative; padding: 170px clamp(20px, 6vw, 96px) 210px; overflow: hidden; background: radial-gradient(70% 55% at 50% 0%, rgba(150, 28, 20, 0.5), transparent 72%), radial-gradient(40% 30% at 85% 100%, rgba(150, 28, 20, 0.18), transparent 70%), var(--bg); }
.darkroom h2 { font-size: clamp(36px, 5.2vw, 70px); max-width: 940px; }
.wire { position: relative; margin-top: 96px; display: flex; align-items: flex-start; gap: clamp(16px, 3vw, 44px); perspective: 900px; }
.wire::before { content: ''; position: absolute; left: -12%; right: -12%; top: -22px; height: 1px; background: rgba(243, 236, 226, 0.35); transform: rotate(-0.8deg); }
.print { position: relative; margin: 0; flex: 1 1 0%; min-width: 0; transform-origin: 50% -22px; animation: develop linear both; animation-timeline: view(); animation-range: entry 0% cover 48%; }
.print--land { flex-grow: 1.5; } .print--port { flex-grow: 0.667; } .print--sq { flex-grow: 1; }
.print:nth-child(2) { animation-range: entry 8% cover 56%; }
.print:nth-child(3) { animation-range: entry 16% cover 64%; }
.print::before { content: ''; position: absolute; left: 50%; top: -30px; width: 14px; height: 26px; margin-left: -7px; background: #6b5a48; border-radius: 3px; z-index: 2; }
.print .photo { height: auto; aspect-ratio: 3 / 2; border: 10px solid #eee5d6; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55); background: #eee5d6; }
.print--port .photo { aspect-ratio: 2 / 3; } .print--sq .photo { aspect-ratio: 1; }
.print figcaption { margin-top: 14px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
@keyframes develop {
  from { transform: rotateX(-38deg) rotateZ(-3deg) translateY(40px); filter: brightness(0.08) sepia(1) saturate(3) hue-rotate(-28deg); }
  60% { filter: brightness(0.55) sepia(0.85) saturate(2.2) hue-rotate(-18deg); }
  to { transform: none; filter: none; }
}

/* 3 - corridor of galleries */
/* length grows with the number of frames: 750 px of scrolling per frame */
.corridor { position: relative; height: calc(1150px + 750px * var(--frames)); view-timeline: --hall block; }
.corridor-stage { position: sticky; top: 0; height: var(--stage-h); overflow: hidden; perspective: 900px; perspective-origin: 50% 46%; background: var(--bg); animation: hall linear both; animation-timeline: --hall; animation-range: contain 0% contain 100%; }
@keyframes hall { from { --t: 0; } to { --t: calc(450 + 750 * var(--frames)); } }
.corridor-title { position: absolute; z-index: 5; left: clamp(20px, 6vw, 96px); top: 104px; opacity: clamp(0, calc(1 - var(--t) / 700), 1); }
.corridor-title h2 { font-size: clamp(34px, 4.6vw, 60px); }
.world { --zd: calc(-600px - 750px * var(--frames)); --len: max(6800px, calc(1800px + 750px * var(--frames)));
  position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; transform: translateZ(calc(var(--t) * 1px)); }
.floor, .ceiling { position: absolute; left: -560px; top: 0; width: 1120px; height: var(--len); transform-origin: 50% 0; }
.floor { transform: translateY(310px) translateZ(600px) rotateX(-90deg); background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 140px), linear-gradient(to bottom, #2b221c 0%, #17120f 38%, #0d0b0a 82%); }
.ceiling { transform: translateY(-330px) translateZ(600px) rotateX(-90deg); background: linear-gradient(to bottom, #1b1512 0%, #0d0b0a 70%); }
.lights { position: absolute; left: -45px; top: 0; width: 90px; height: calc(var(--len) - 600px); transform-origin: 50% 0; transform: translateY(-329px) translateZ(600px) rotateX(-90deg); background: repeating-linear-gradient(to bottom, transparent 0 640px, rgba(255, 220, 170, 0.75) 640px 656px, transparent 656px 750px); -webkit-mask: linear-gradient(to bottom, #000 0%, transparent 85%); mask: linear-gradient(to bottom, #000 0%, transparent 85%); }
.wall { position: absolute; top: -330px; width: var(--len); height: 640px; }
.wall--l { left: -560px; transform-origin: 0 50%; transform: translateZ(600px) rotateY(90deg); background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 320px), linear-gradient(to right, #2a211b 0%, #15110e 40%, #0d0b0a 85%); }
.wall--r { left: calc(560px - var(--len)); transform-origin: 100% 50%; transform: translateZ(600px) rotateY(-90deg); background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 320px), linear-gradient(to left, #2a211b 0%, #15110e 40%, #0d0b0a 85%); }
.frame { margin: 0; position: absolute; left: 0; top: 0; width: 300px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink) !important; transform: translate3d(calc(var(--side) * 380px - 50%), calc(-50% - 6px), calc(var(--zf) * 1px)) rotateY(calc(var(--side) * -36deg)); opacity: clamp(0, calc((650 - (var(--zf) + var(--t))) / 380), 1); }
.frame--land { width: 440px; } .frame--sq { width: 360px; }
.frame .photo { height: auto; aspect-ratio: 2 / 3; border: 12px solid #2b2119; outline: 1px solid rgba(217, 164, 65, 0.55); background: #2b2119; }
.frame--land .photo { aspect-ratio: 3 / 2; } .frame--sq .photo { aspect-ratio: 1; }
.frame-title { font-family: Prata, Georgia, serif; font-size: 26px; line-height: 1.1; margin-top: 4px; }
.frame figcaption { display: flex; flex-direction: column; gap: 8px; }
.frame-cat { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.frame-cta { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.door { position: absolute; left: 0; top: 0; width: 600px; min-height: 620px; transform: translate3d(-50%, -50%, var(--zd)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; background: radial-gradient(60% 55% at 50% 45%, rgba(217, 164, 65, 0.28), rgba(217, 164, 65, 0.04) 70%, transparent 100%); border: 1px solid rgba(217, 164, 65, 0.25); }
.door-title { font-family: Prata, Georgia, serif; font-size: 42px; line-height: 1.15; margin-bottom: 26px !important; }
.door-text { color: var(--muted); margin: -10px 0 24px !important; }

/* 4 - film reel */
.reel { position: relative; height: 3400px; view-timeline: --reel block; }
.reel-stage { position: sticky; top: 0; height: var(--stage-h); overflow: hidden; perspective: 1100px; perspective-origin: 50% 58%; animation: spin linear both; animation-timeline: --reel; animation-range: contain 0% contain 100%; }
@keyframes spin { from { --spin: 40; } to { --spin: -300; } }
.reel-copy { position: absolute; z-index: 3; left: clamp(20px, 6vw, 96px); top: 104px; max-width: 520px; }
.reel-copy h2 { font-size: clamp(34px, 4.6vw, 60px); }
.reel-copy .actions { margin-top: 24px; }
/* cells sit edge to edge on a circle: radius = half a cell / tan(180deg / cells) */
.ring { --n: var(--reel-frames); --r: calc(190px / tan(180deg / var(--reel-frames))); --tz: calc(80px - var(--r));
  position: absolute; left: 50%; top: 63%; width: 372px; height: 284px; margin: -142px 0 0 -186px; transform-style: preserve-3d; transform: translateZ(var(--tz)) rotateX(-7deg) rotateY(calc(var(--spin) * 1deg)); }
.cell { position: absolute; inset: 0; display: block; padding: 18px 0; background: #060505; transform: rotateY(calc(var(--k) * (360deg / var(--n)))) translateZ(var(--r)); backface-visibility: hidden; -webkit-backface-visibility: hidden; text-decoration: none; }
.cell::before, .cell::after { content: ''; position: absolute; left: 0; right: 0; height: 18px; background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(230, 220, 205, 0.85) 9px 21px, transparent 21px 32px); -webkit-mask: linear-gradient(transparent 5px, #000 5px, #000 13px, transparent 13px); mask: linear-gradient(transparent 5px, #000 5px, #000 13px, transparent 13px); }
.cell::before { top: 0; } .cell::after { bottom: 0; }
.cell .photo { height: 100%; }
.play { position: absolute; left: 50%; top: 50%; margin: -22px 0 0 -22px; z-index: 1; color: rgba(255, 244, 228, 0.92); filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6)); }

/* 5 - album */
.album { position: relative; height: 3200px; view-timeline: --album block; }
.album-stage { position: sticky; top: 0; height: var(--stage-h); overflow: hidden; perspective: 1900px; display: flex; align-items: center; justify-content: center; background: radial-gradient(50% 45% at 50% 55%, rgba(217, 164, 65, 0.12), transparent 70%), var(--bg); }
.book { position: relative; width: min(86vw, 960px); height: min(54vw, 580px, calc(var(--stage-h) - 150px)); transform-style: preserve-3d; transform: rotateX(16deg) translateY(30px); }
.page, .leaf { position: absolute; top: 0; width: 50%; height: 100%; }
.page { padding: clamp(24px, 4vw, 56px); background: linear-gradient(to right, #e6dccb, var(--paper) 18%, var(--paper)); color: var(--paper-ink); box-shadow: 0 50px 90px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; justify-content: center; }
.page--left { left: 0; border-radius: 6px 0 0 6px; background: linear-gradient(to left, #e3d8c6, var(--paper) 16%, var(--paper)); }
.page--right { left: 50%; border-radius: 0 6px 6px 0; align-items: center; text-align: center; }
.page h2 { font-size: clamp(28px, 3.4vw, 44px); color: var(--paper-ink); }
.page .eyebrow, .leaf .eyebrow { color: var(--wine); }
.page-note { margin-top: 16px !important; color: #5b4c3f; font-size: 15px; max-width: 340px; }
.leaf { left: 50%; transform-style: preserve-3d; transform-origin: 0 50%; transform: translateZ(var(--zr)) rotateY(0deg); animation: flip linear both; animation-timeline: --album; }
.leaf--0 { animation-range: contain 6% contain 34%; }
.leaf--1 { animation-range: contain 36% contain 64%; }
.leaf--2 { animation-range: contain 66% contain 94%; }
@keyframes flip {
  from { transform: translateZ(var(--zr)) rotateY(0deg); }
  50% { transform: translateZ(40px) rotateY(-90deg); }
  to { transform: translateZ(var(--zl)) rotateY(-180deg); }
}
.leaf-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: clamp(20px, 3.4vw, 48px); color: var(--paper-ink); display: flex; flex-direction: column; }
.leaf-front { background: linear-gradient(to right, #e9dfcf, var(--paper) 14%); border-radius: 0 6px 6px 0; align-items: center; justify-content: center; text-align: center; }
.leaf-back { transform: rotateY(180deg); background: linear-gradient(to left, #e9dfcf, var(--paper) 14%); border-radius: 6px 0 0 6px; justify-content: center; }
.mount { flex: 1 1 0%; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.mount picture { display: contents; }
.mount img { width: auto; height: auto; max-width: 100%; max-height: 100%; border: 7px solid #fffaf2; box-shadow: 0 1px 2px rgba(42, 33, 26, 0.25), 0 10px 26px rgba(42, 33, 26, 0.22); }
.mount--empty { border: 1.5px dashed rgba(42, 33, 26, 0.35); border-radius: 4px; max-width: 72%; color: #6d5a49; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.chapter { margin-top: 16px !important; font-family: Prata, Georgia, serif; font-size: clamp(18px, 1.9vw, 24px); line-height: 1.2; }
.chapter-no { display: block; font: 600 11px/1 Inter, system-ui, sans-serif; letter-spacing: 0.24em; text-transform: uppercase; color: var(--wine); margin-bottom: 8px; }
.chapter-note { display: none; margin-top: 8px !important; font-size: 14px; color: #5b4c3f; }
.opener-no { font-family: Prata, Georgia, serif; font-size: clamp(54px, 6vw, 84px); line-height: 1; color: var(--wine); margin-bottom: 18px !important; }
.opener-title { font-family: Prata, Georgia, serif; font-size: clamp(26px, 3vw, 38px); line-height: 1.15; }
.opener-text { margin-top: 16px !important; font-size: 16px; color: #5b4c3f; max-width: 340px; }
.rule { width: 56px; height: 1px; background: rgba(42, 33, 26, 0.3); margin: 26px 0 22px; }
.end-title { font-family: Prata, Georgia, serif; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.2; margin: 18px 0 20px !important; }
.page-no { position: absolute; bottom: 18px; right: 26px; font-size: 12px; color: #6d5a49; }
.leaf-back .page-no, .page--left .page-no { right: auto; left: 26px; }

/* 6 - booking */
.cta { position: relative; padding: 190px clamp(20px, 6vw, 96px) 150px; text-align: center; background: radial-gradient(60% 70% at 50% 100%, rgba(217, 164, 65, 0.2), transparent 70%), var(--bg); }
.cta-card { max-width: 900px; margin: 0 auto; animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
@keyframes rise { from { transform: perspective(900px) rotateX(24deg) translateY(90px); opacity: 0; } to { transform: none; opacity: 1; } }
.cta h2 { font-size: clamp(44px, 7vw, 104px); }
.cta .lead { margin-left: auto; margin-right: auto; }
.foot-credit a { color: var(--gold) !important; text-decoration: none; font-weight: 600; }
.foot-credit a:hover { text-decoration: underline; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 28px clamp(20px, 6vw, 96px); border-top: 1px solid rgba(243, 236, 226, 0.12); color: var(--muted); font-size: 13px; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* 6 - contact */
.cta { padding-bottom: 110px; }
.contact-grid { max-width: 1100px; margin: 96px auto 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 24px; text-align: left; }
.contact-card { display: flex; flex-direction: column; gap: 30px; padding: clamp(24px, 3vw, 36px); border: 1px solid rgba(243, 236, 226, 0.14); border-radius: 18px; background: rgba(23, 18, 15, 0.72); }
.contact-item h3 { margin: 0 0 12px; font: 600 12px/1.2 Inter, system-ui, sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.contact-item address, .contact-item p { margin: 0; font-style: normal; font-size: 17px; line-height: 1.6; color: var(--ink); }
.contact-phone { font-family: Prata, Georgia, serif; font-size: 26px; text-decoration: none; }
.contact-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px; color: var(--gold) !important; font-weight: 600; font-size: 15px; text-decoration: none; }
.contact-link:hover { text-decoration: underline; }
.map { position: relative; min-height: 380px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(243, 236, 226, 0.14); background: #17120f; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(0.6) invert(0.92) hue-rotate(180deg) contrast(0.9); }
.map--link { display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--gold) !important; font-weight: 600; background: repeating-linear-gradient(0deg, rgba(243, 236, 226, 0.05) 0 1px, transparent 1px 48px), repeating-linear-gradient(90deg, rgba(243, 236, 226, 0.05) 0 1px, transparent 1px 48px), #17120f; }
.map--link span { display: inline-flex; align-items: center; gap: 10px; }

/* 404 page */
.error-page { min-height: calc(100vh - 80px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 48px 20px; text-align: center; background: radial-gradient(60% 50% at 50% 40%, rgba(217, 164, 65, 0.14), transparent 70%), var(--bg); }
.error-page .brand { margin-bottom: 40px; }
.error-page h1 { font-size: clamp(36px, 5vw, 60px); }
.error-page .lead { margin-left: auto; margin-right: auto; }
.frame-empty { display: flex; align-items: center; justify-content: center; width: min(240px, 60vw); aspect-ratio: 4 / 5; margin-bottom: 36px; border: 12px solid #2b2119; outline: 1px solid rgba(217, 164, 65, 0.55); background: #120e0c; color: rgba(217, 164, 65, 0.6); font: 400 44px/1 Prata, Georgia, serif; }

@media (max-width: 860px) {
  .nav { display: none; }
  .menu { display: block; }
}
@media (max-width: 760px) {
  .brand img { width: 104px; }
  .contact-grid { grid-template-columns: 1fr; margin-top: 64px; }
  .map { min-height: 300px; }
  .contact-phone { font-size: 22px; }
  .hero-stage { --ly: 38%; }
  .hero-photo { --chx: var(--chm); }
  .btn { padding: 0 20px; } .actions { gap: 12px; }
  .page-no { display: none; }
  .wire { flex-direction: column; align-items: center; max-width: 420px; margin-left: auto; margin-right: auto; gap: 56px; }
  .print, .print--land, .print--port, .print--sq { flex: none; width: 100%; }
  .print--port { width: 74%; }
  .frame { width: 200px; transform: translate3d(calc(var(--side) * 118px - 50%), calc(-50% - 6px), calc(var(--zf) * 1px)) rotateY(calc(var(--side) * -22deg)); }
  .frame--land { width: 250px; } .frame--sq { width: 220px; }
  .frame .photo { border-width: 8px; }
  .frame-title { font-size: 20px; }
  .floor, .ceiling { left: -260px; width: 520px; }
  .wall--l { left: -260px; } .wall--r { left: calc(260px - var(--len)); }
  .door { width: 330px; min-height: 480px; padding: 28px 20px; }
  .door-title { font-size: 28px; }
  .ring { top: 66%; transform: translateZ(var(--tz)) rotateX(-7deg) rotateY(calc(var(--spin) * 1deg)) scale(0.72); }
  .book { width: 88vw; height: min(118vw, calc(var(--stage-h) - 170px)); }
  .page, .leaf { width: 100%; } .page--left { display: none; } .page--right, .leaf { left: 0; }
  .leaf-front, .page--right { border-radius: 6px; }
  .leaf-back { display: none; }
  .chapter-note { display: block; }
}

/* Static layout: reduced motion and browsers without scroll-driven animations.
   The same rules appear twice below; if you change one copy, change the other. */
@media (prefers-reduced-motion: reduce) {
.site .site-head::before { animation: none; opacity: 1; }
.site .hero, .site .corridor, .site .reel, .site .album { height: auto; }
.site .hero-stage, .site .corridor-stage, .site .reel-stage, .site .album-stage { position: relative; height: auto; animation: none; perspective: none; }
.site .hero-stage { height: min(86vh, 760px); min-height: 520px; --open: 1; --zoom: 4.2; --reveal: 1; }
.site .lens, .site .hero-mask, .site .hero-intro { display: none; }
.site .print, .site .leaf, .site .cta-card { animation: none; }
.site .corridor-stage { padding: 150px clamp(20px, 6vw, 96px) 120px; --t: 0; }
.site .corridor-title { position: static; opacity: 1; margin-bottom: 40px; }
.site .world { position: static; width: auto; height: auto; transform: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 32px; align-items: start; }
.site .floor, .site .ceiling, .site .lights, .site .wall { display: none; }
.site .frame, .site .frame--land, .site .frame--sq { position: relative; width: auto; transform: none; opacity: 1; }
.site .door { position: relative; width: auto; min-height: 0; transform: none; grid-column: 1 / -1; padding: 60px 24px; }
.site .reel-stage { padding: 140px clamp(20px, 6vw, 96px) 100px; }
.site .reel-copy { position: static; margin-bottom: 40px; }
.site .ring { position: static; margin: 0; width: auto; height: auto; transform: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.site .cell { position: relative; inset: auto; transform: none; backface-visibility: visible; -webkit-backface-visibility: visible; }
.site .cell .photo { height: auto; aspect-ratio: 3 / 2; }
.site .album-stage { display: block; padding: 120px clamp(20px, 6vw, 96px); }
.site .book { width: auto; height: auto; max-width: 1100px; margin: 0 auto; transform: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.site .page, .site .leaf { position: relative; left: auto; width: auto; height: auto; min-height: 360px; transform: none; border-radius: 6px; }
.site .page--left { display: flex; }
.site .leaf-face { position: relative; inset: auto; min-height: 360px; border-radius: 6px; backface-visibility: visible; -webkit-backface-visibility: visible; }
.site .leaf-back { display: none; }
.site .chapter-note { display: block; }
.site .mount { flex: none; }
.site .mount img { max-height: 440px; }
.site .page--right { order: 10; }
@media (max-width: 760px) {
  .site .world, .site .book { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .site .ring { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
}
@supports not (animation-timeline: view()) {
.site .site-head::before { animation: none; opacity: 1; }
.site .hero, .site .corridor, .site .reel, .site .album { height: auto; }
.site .hero-stage, .site .corridor-stage, .site .reel-stage, .site .album-stage { position: relative; height: auto; animation: none; perspective: none; }
.site .hero-stage { height: min(86vh, 760px); min-height: 520px; --open: 1; --zoom: 4.2; --reveal: 1; }
.site .lens, .site .hero-mask, .site .hero-intro { display: none; }
.site .print, .site .leaf, .site .cta-card { animation: none; }
.site .corridor-stage { padding: 150px clamp(20px, 6vw, 96px) 120px; --t: 0; }
.site .corridor-title { position: static; opacity: 1; margin-bottom: 40px; }
.site .world { position: static; width: auto; height: auto; transform: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 32px; align-items: start; }
.site .floor, .site .ceiling, .site .lights, .site .wall { display: none; }
.site .frame, .site .frame--land, .site .frame--sq { position: relative; width: auto; transform: none; opacity: 1; }
.site .door { position: relative; width: auto; min-height: 0; transform: none; grid-column: 1 / -1; padding: 60px 24px; }
.site .reel-stage { padding: 140px clamp(20px, 6vw, 96px) 100px; }
.site .reel-copy { position: static; margin-bottom: 40px; }
.site .ring { position: static; margin: 0; width: auto; height: auto; transform: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.site .cell { position: relative; inset: auto; transform: none; backface-visibility: visible; -webkit-backface-visibility: visible; }
.site .cell .photo { height: auto; aspect-ratio: 3 / 2; }
.site .album-stage { display: block; padding: 120px clamp(20px, 6vw, 96px); }
.site .book { width: auto; height: auto; max-width: 1100px; margin: 0 auto; transform: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.site .page, .site .leaf { position: relative; left: auto; width: auto; height: auto; min-height: 360px; transform: none; border-radius: 6px; }
.site .page--left { display: flex; }
.site .leaf-face { position: relative; inset: auto; min-height: 360px; border-radius: 6px; backface-visibility: visible; -webkit-backface-visibility: visible; }
.site .leaf-back { display: none; }
.site .chapter-note { display: block; }
.site .mount { flex: none; }
.site .mount img { max-height: 440px; }
.site .page--right { order: 10; }
@media (max-width: 760px) {
  .site .world, .site .book { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .site .ring { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
}
