/* Layout: the album's own materials, section by section. A deep green clothbound album on the table (hero,
   examples, footer), bright print paper for the working pages, film-box yellow for the gift. Colour comes from
   film stock: Kodachrome yellow and red on bottle-green album cloth, with sky blue as the cool note. */
:root {
  color-scheme: light;
  --cloth: #143f33;        /* album cloth, hero and dark sections */
  --cloth-deep: #0d2e25;
  --cloth-line: #2b5a4c;
  --film: #f5b31c;         /* film-box yellow */
  --film-deep: #d99a06;
  --tomato: #e2482c;       /* Kodachrome red */
  --tomato-deep: #b8331b;
  --sky: #86bfe0;
  --print: #ffffff;        /* photo paper */
  --page: #f6f4ee;         /* light working pages: photo-paper white with a little warmth */
  --ink: #17201c;
  --ink-soft: #4a5751;
  --on-cloth: #f4f1e8;
  --on-cloth-soft: #c3d2c9;
  --line: #d3dbd4;
  --tape: rgba(255, 244, 196, .78);
  --occ: var(--tomato);
  --focus: #1a5d8a;        /* focus ring on paper and film yellow; sky blue on the dark cloth */
  --font-display: "Karantina", "Arial Narrow", "Rubik", sans-serif;
  --font-body: "IBM Plex Sans Hebrew", "Arial Hebrew", "Segoe UI", Arial, sans-serif;
  --font-hand: "Playpen Sans Hebrew", "IBM Plex Sans Hebrew", cursive;
  --step--1: .9rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: clamp(3rem, 2.2rem + 3vw, 4.75rem);
  --step-4: clamp(4.2rem, 2.6rem + 4.6vw, 6.8rem);
  --gutter: clamp(16px, 4vw, 56px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .25 0 0 0 0 .2 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --weave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .06' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .3 0 0 0 0 .25 0 0 0 .085 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  --shadow-print: 0 1px 1px rgba(10, 30, 22, .14), 0 10px 22px -8px rgba(10, 30, 22, .42);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--page) var(--paper);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 700; line-height: .92; letter-spacing: .005em; }
h3 { font-family: var(--font-body); font-weight: 600; line-height: 1.25; }
p { margin: 0; }
a { color: var(--tomato-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.topbar, .hero-wrap, .band-cloth, .darkroom, .modal, .footer, .dock { --focus: var(--sky); }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; }
.sr-only:focus-within { width: auto; height: auto; clip: auto; inset-inline-start: 12px; top: 12px; z-index: 5; list-style: none; background: var(--print); padding: 8px; border-radius: 8px; box-shadow: var(--shadow-print); }
.sr-only button { min-height: 44px; font: inherit; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--film); color: var(--ink); padding: 12px 14px; min-height: 44px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 1.5em;
  font: 600 var(--step-0)/1 var(--font-body);
  color: var(--ink); background: var(--film);
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  box-shadow: 0 3px 0 var(--film-deep), 0 14px 24px -14px rgba(0, 0, 0, .55);
  transition: transform .18s ease, box-shadow .18s ease, background-color .3s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--film-deep), 0 18px 26px -14px rgba(0, 0, 0, .55); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--film-deep); }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px currentColor; }
.btn-ghost[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-small { min-height: 44px; padding: 0 1.15em; font-size: var(--step--1); }
.btn-wide { width: 100%; }
.btn-red { background: #c93a1f; color: #fff; box-shadow: 0 3px 0 #a1260f, 0 14px 24px -14px rgba(0, 0, 0, .5); } /* white text needs the deeper red (5.1:1) */
.btn-red:hover { box-shadow: 0 5px 0 #a1260f, 0 18px 26px -14px rgba(0, 0, 0, .5); }
.play-dot { font-size: .7em; }
.link { display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; padding: 0 6px; font: inherit; font-weight: 500; color: var(--tomato-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; align-items: center; gap: 28px;
  padding: 10px var(--gutter);
  background: var(--cloth-deep); color: var(--on-cloth); box-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}
.brand { font: 700 2.4rem/1 var(--font-display); color: var(--on-cloth); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding-block: 6px; }
.brand.small { font-size: 1.8rem; color: inherit; }
.brand-mark { /* a frame of film: the brand mark */
  width: .55em; height: .42em; border-radius: 2px; background: var(--film);
  box-shadow: inset 0 0 0 2px var(--film), inset 0 0 0 5px var(--cloth-deep);
  transform: rotate(-8deg);
}
.nav { display: flex; gap: 24px; margin-inline-start: auto; }
.nav a { color: var(--on-cloth-soft); text-decoration: none; font-size: var(--step--1); font-weight: 500; padding-block: 12px; }
.nav a:hover { color: var(--on-cloth); }
@media (max-width: 820px) { .nav { display: none; } .topbar .btn { margin-inline-start: auto; } }

/* ---------- hero: the album on its cloth ---------- */
.hero-wrap { background: radial-gradient(120% 90% at 35% 45%, transparent 55%, rgba(0, 0, 0, .28)), var(--weave), var(--cloth); color: var(--on-cloth); position: relative; overflow: hidden; }
.hero-wrap::after { /* the page edge of the next section, torn photo paper */
  content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 22px; background: var(--page);
  -webkit-mask: radial-gradient(12px 10px at 50% 0, transparent 98%, #000) 0 0 / 24px 22px repeat-x;
  mask: radial-gradient(12px 10px at 50% 0, transparent 98%, #000) 0 0 / 24px 22px repeat-x;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "copy stage" "more stage";
  grid-template-rows: auto 1fr;
  column-gap: clamp(8px, 2vw, 32px);
  padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(36px, 4vw, 56px);
  max-width: 1400px; margin: 0 auto;
}
.hero-copy { grid-area: copy; align-self: end; display: grid; gap: 14px; min-width: 0; position: relative; z-index: 2; }
.hero-more { grid-area: more; display: grid; gap: 24px; align-content: start; min-width: 0; padding-top: 22px; position: relative; z-index: 2; }
.eyebrow { font: 600 var(--step-0)/1 var(--font-body); color: var(--film); display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.hero h1 { font-size: var(--step-4); color: var(--on-cloth); }
.hero h1 em { font-style: normal; color: var(--film); display: inline-block; }
.lead { font-size: var(--step-1); line-height: 1.55; color: var(--on-cloth-soft); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-ghost { color: var(--on-cloth); }
.facts { list-style: none; margin: 0; padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--on-cloth-soft); font-size: var(--step--1); border-top: 1px solid var(--cloth-line); }
.facts strong { font: 700 2rem/1 var(--font-display); color: var(--on-cloth); margin-inline-end: 6px; font-variant-numeric: tabular-nums; }
.facts .fact-price { font: 600 1.55rem/1 var(--font-body); color: var(--film); } /* prices in the text face: Karantina has no clear digits */

.stage { grid-area: stage; position: relative; height: clamp(460px, 46vw, 660px); min-width: 0; }
#scene {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .45s ease; touch-action: pan-y;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent), linear-gradient(to bottom, #000 84%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent), linear-gradient(to bottom, #000 84%, transparent);
  mask-composite: intersect;
}
.stage.ready #scene { opacity: 1; }
/* the 3D fades in over the still, which is hidden only once the canvas is fully in */
.stage.settled .poster { visibility: hidden; }
.stage:not(.ready) .stage-note { visibility: hidden; } /* nothing to click until the 3D is up */
.stage-note {
  position: absolute; bottom: 9%; inset-inline-start: 6%;
  font: 500 1.05rem/1.2 var(--font-hand); color: var(--film);
  display: flex; align-items: flex-start; gap: 6px; pointer-events: none; transform: rotate(-3deg); max-width: 22em;
}
.stage-note svg { margin-top: -12px; flex: none; }
.view-tag { position: absolute; z-index: 3; left: 0; top: 0; pointer-events: none; background: var(--film); color: var(--ink); font: 500 .95rem/1 var(--font-hand); padding: 8px 12px; border-radius: 99px; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6); opacity: 0; transition: opacity .2s ease; white-space: nowrap; }
.view-tag.on { opacity: 1; }

/* poster: a still render of the 3D scene at the same framing */
.poster { position: absolute; inset: 0; display: block; }
/* scaled by width and centred, the same way the 3D camera frames the scene */
.poster img { position: absolute; left: 0; top: 50%; width: 100%; height: auto; transform: translateY(-50%); }

/* ---------- sections ---------- */
.section { max-width: 1260px; margin: 0 auto; padding: clamp(44px, 5vw, 72px) var(--gutter); }
.band { padding-block: clamp(8px, 1vw, 16px); }
.band-cloth { background: var(--cloth) var(--weave); color: var(--on-cloth); }
.band-film { background: var(--film); color: var(--ink); overflow-x: clip; } /* the envelope's flap may rise, never widen the page */
.section-head { display: grid; gap: 12px; margin-bottom: clamp(26px, 3vw, 40px); max-width: 62ch; }
.section-head h2 { font-size: var(--step-3); color: inherit; }
.section-head p { color: var(--ink-soft); font-size: var(--step-0); }
.band-cloth .section-head p { color: var(--on-cloth-soft); }
.kicker { font: 600 var(--step-0)/1 var(--font-body); color: var(--tomato-deep); display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.band-cloth .kicker { color: var(--film); }

/* ---------- occasions: album cards, each with a taped print ---------- */
.occ-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 20px; padding-top: 10px; }
.occ {
  position: relative; display: grid; gap: 14px; align-content: start; text-align: start;
  padding: 14px 14px 18px; background: var(--print) var(--grain); color: var(--ink); border: 0; border-radius: 3px; cursor: pointer;
  font: inherit; box-shadow: var(--shadow-print);
  transform: perspective(700px) rotate(var(--tilt, 0deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease, box-shadow .25s ease;
}
.occ:nth-child(4n+1) { --tilt: -.8deg; }
.occ:nth-child(4n+2) { --tilt: .6deg; }
.occ:nth-child(4n+3) { --tilt: -.4deg; }
.occ:nth-child(4n) { --tilt: .9deg; }
.occ:hover { box-shadow: 0 2px 2px rgba(10, 30, 22, .14), 0 26px 34px -16px rgba(10, 30, 22, .5); }
.occ::before { /* washi tape in the card's hue */
  content: ""; position: absolute; z-index: 2; top: -11px; inset-inline-start: 50%; width: 76px; height: 22px; translate: 50% 0;
  background: repeating-linear-gradient(-45deg, var(--c) 0 7px, color-mix(in srgb, var(--c) 72%, #fff) 7px 14px); opacity: .9; rotate: -4deg;
}
.occ-print { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e7ebe6; }
.occ-print img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform .6s ease; }
.occ[data-id="memorial"] .occ-print img { object-position: 50% 85%; } /* the face sits low in the print by the candle */
.occ-print.mono img { filter: sepia(.7) saturate(.75) contrast(.82) brightness(1.04); } /* an old print, faded */
.occ:hover .occ-print img { transform: scale(1.05); }
.occ-body { display: grid; gap: 6px; }
.occ-tag { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.occ-icon { width: 34px; height: 34px; padding: 6px; border-radius: 50%; background: var(--c); color: var(--fg, #fff); flex: none; }
.occ h3 { font: 700 2.15rem/1 var(--font-display); }
.occ p { font-size: var(--step--1); line-height: 1.45; color: var(--ink-soft); }
.occ .picked { display: none; background: var(--ink); color: #fff; font: 600 .78rem/1 var(--font-body); padding: 6px 10px; border-radius: 99px; }
.occ[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink), 0 26px 34px -16px rgba(10, 30, 22, .5); }
.occ[aria-pressed="true"] .picked { display: block; }
@media (max-width: 1000px) { .occ-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .occ-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .occ { gap: 8px; padding: 8px 8px 12px; }
  .occ h3 { font-size: 1.55rem; }
  .occ p { display: none; }
  .occ-icon { width: 28px; height: 28px; padding: 5px; }
  .occ::before { width: 46px; height: 15px; top: -8px; }
}

/* ---------- album spread: green cloth cover, white pages ---------- */
.spread {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  background: var(--weave), linear-gradient(90deg, rgba(0,0,0,.18), transparent 8% 92%, rgba(0,0,0,.18)), var(--cloth); padding: 16px 16px 26px; border-radius: 12px;
  box-shadow: 0 34px 50px -30px rgba(10, 30, 22, .8);
}
.page { background: #fbf8f0 var(--paper); z-index: 1; padding: clamp(18px, 2.4vw, 32px); min-width: 0; position: relative; }
.page-photos { border-radius: 0 4px 4px 0; box-shadow: inset 34px 0 30px -26px rgba(10, 30, 22, .45), 3px 3px 0 -1px #e9ebe4, 6px 6px 0 -2px #dfe2da, 9px 9px 0 -3px #d4d8cf; }
.page-details { border-radius: 4px 0 0 4px; box-shadow: inset -34px 0 30px -26px rgba(10, 30, 22, .45), -3px 3px 0 -1px #e9ebe4, -6px 6px 0 -2px #dfe2da, -9px 9px 0 -3px #d4d8cf; display: grid; gap: 20px; align-content: start; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head h3 { font: 700 2.6rem/1 var(--font-display); }
.counter { color: var(--ink-soft); font: 700 1.5rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.counter strong { font: 600 1.7rem/1 var(--font-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.counter .num { font-size: 1.05rem; }
.sample-note { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: center; font-size: var(--step--1); color: var(--ink); background: color-mix(in srgb, var(--film) 22%, #fff); padding: 4px 12px; border-radius: 8px; margin-bottom: 18px; }
.sample-note.replaced { background: color-mix(in srgb, var(--sky) 28%, #fff); padding-block: 10px; }

.slots { list-style: none; margin: 0; padding: 12px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 16px; }
.slot { position: relative; aspect-ratio: 4 / 5; border-radius: 2px; background: rgba(23, 32, 28, .035);
  /* photo corners, like an old album page */
  --c: rgba(23, 32, 28, .38);
  background-image: linear-gradient(135deg, var(--c) 0 11px, transparent 11px), linear-gradient(225deg, var(--c) 0 11px, transparent 11px), linear-gradient(45deg, var(--c) 0 11px, transparent 11px), linear-gradient(315deg, var(--c) 0 11px, transparent 11px);
  background-position: top left, top right, bottom left, bottom right; background-size: 16px 16px; background-repeat: no-repeat; }
.slot-num { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font: 600 .82rem/1 var(--font-body); color: #5d6b63; font-variant-numeric: tabular-nums; }
.slots-more { grid-column: 1 / -1; text-align: center; font-size: var(--step--1); color: var(--ink-soft); padding: 10px; border-top: 1px solid rgba(23, 32, 28, .15); }
.slot-add { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; text-align: center; border: 0; background: var(--film); cursor: pointer; font: inherit; color: var(--ink); border-radius: 3px; }
.slot-add strong { font: 700 2.8rem/1 var(--font-display); }
.slot-add span { font-size: .82rem; font-weight: 600; padding: 0 6px; line-height: 1.3; }
.slot-add:hover { background: var(--film-deep); }
.slot.filled { border: 0; background: none; }
.photo {
  position: absolute; inset: -6px; padding: 6px 6px 0; background: var(--print) var(--grain);
  box-shadow: var(--shadow-print); transform: rotate(var(--r, 0deg));
  display: grid; grid-template-rows: minmax(0, 1fr) auto; cursor: grab;
  animation: land .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo input { width: 100%; border: 0; background: transparent; text-decoration: none; text-align: center; font: 500 .92rem/2 var(--font-hand); color: var(--ink); padding: 0; }
.photo input::placeholder { color: #6d7a73; }
.photo input:placeholder-shown { text-decoration: underline dotted #9aa79f; text-underline-offset: 5px; }
.photo input:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.photo::before { content: ""; position: absolute; top: -9px; left: 50%; width: 44%; height: 16px; background: var(--tape); transform: translateX(-50%) rotate(var(--tr, -3deg)); }
.photo .remove {
  z-index: 1; position: absolute; bottom: -18px; inset-inline-end: -14px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: radial-gradient(circle, var(--ink) 0 9px, transparent 9.5px); font-size: .85rem; color: #fff; font-size: 1rem; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .15s ease;
}
.photo img { transition: opacity .2s ease; }
.photo .rotate {
  position: absolute; top: -18px; inset-inline-start: -14px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: radial-gradient(circle, var(--ink) 0 11px, transparent 11.5px); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .15s ease; z-index: 1;
}
.photo:hover .remove, .photo:focus-within .remove, .photo:hover .rotate, .photo:focus-within .rotate { opacity: 1; }
@media (hover: none) { .photo .remove, .photo .rotate { opacity: .75; } }
.photo.dragging { opacity: .35; }
.slot.drop-target { outline: 3px dashed var(--tomato); outline-offset: 6px; }
@keyframes land { from { transform: translateY(-24px) rotate(calc(var(--r, 0deg) * 4)) scale(1.08); opacity: 0; } to { transform: rotate(var(--r, 0deg)); opacity: 1; } }
.drop-hint { display: none; position: absolute; inset: 10px; place-content: center; border: 3px dashed var(--tomato); border-radius: 8px; background: rgba(255, 255, 255, .92); font: 700 3rem/1 var(--font-display); color: var(--tomato-deep); z-index: 5; pointer-events: none; }
.dragover .drop-hint { display: grid; }
.error { color: #a1260f; font-size: var(--step--1); font-weight: 500; }
.page-photos .error { margin-top: 12px; }

.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-label { font-weight: 600; font-size: var(--step--1); color: var(--ink-soft); padding: 0; }
.chosen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chosen-chip { background: var(--occ); color: var(--occ-fg, #fff); padding: 6px 16px; border-radius: 999px; font-weight: 600; transition: background-color .3s ease; }
.chosen-chip.empty { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--line); }
.text-input { width: 100%; min-height: 50px; padding: 0 4px; border-radius: 0; border: 0; border-bottom: 2px solid var(--ink); background: transparent; font: 500 1.25rem var(--font-hand); color: var(--ink); }
.text-input:focus-visible { outline: none; border-bottom-color: var(--tomato-deep); box-shadow: 0 2px 0 0 var(--tomato-deep); }
.music { gap: 10px; }
.music-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 2px; border: 0; cursor: pointer; background: #fffdf7 var(--grain); box-shadow: 0 1px 0 rgba(23, 32, 28, .08), 0 6px 12px -8px rgba(23, 32, 28, .35); }
.music-opt::after { content: ""; position: absolute; top: -7px; inset-inline-start: 18px; width: 42px; height: 14px; background: color-mix(in srgb, var(--sky) 55%, transparent); transform: rotate(-4deg); }
.music-opt:nth-of-type(2) { transform: rotate(-.6deg); } .music-opt:nth-of-type(3) { transform: rotate(.5deg); }
.music-opt:has(input:checked)::after { background: color-mix(in srgb, var(--tomato) 55%, transparent); }
.music-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.music-opt::before { content: ""; flex: none; width: 26px; height: 26px; border-radius: 4px; border: 1.5px dashed var(--ink-soft); background: transparent; }
.music-opt:has(input:checked) { background: color-mix(in srgb, var(--film) 30%, #fffdf7) var(--grain); }
.music-opt:has(input:checked)::before { border: 0; background: no-repeat center / 26px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M4 14c3 2 5 5 6 8 3-8 7-14 13-19' fill='none' stroke='%23b8331b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.music-opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.music-opt span { display: grid; line-height: 1.3; }
.music-opt small { color: var(--ink-soft); }
.fine { font-size: var(--step--1); color: var(--ink-soft); }
/* the film so far: photos, length and price, on a ticket stub */
.tally { display: grid; gap: 6px; padding: 14px 16px; background: #fffdf7 var(--grain); border-block: 1.5px dashed rgba(23, 32, 28, .3); }
.tally-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; color: var(--ink-soft); font-size: var(--step--1); }
.tally-row strong { font: 600 1.2rem/1 var(--font-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.tally-price { margin-inline-start: auto; }
.tally-row .tally-price strong { font-size: 2rem; color: var(--tomato-deep); }
.tally-note { font-size: .88rem; line-height: 1.45; color: var(--ink-soft); }
@media (max-width: 900px) {
  .spread { grid-template-columns: 1fr; padding: 10px; }
  .page-photos, .page-details { border-radius: 4px; box-shadow: none; }
  .page-details { margin-top: 10px; }
  .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }
  .slot { aspect-ratio: 3 / 4.6; }
  .photo input { min-height: 44px; font-size: .85rem; text-overflow: ellipsis; }
  .photo .rotate { top: -8px; inset-inline-start: -4px; width: 36px; height: 36px; }
}

/* ---------- steps: labels on a string ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); position: relative; }
.steps::before { content: ""; position: absolute; top: 34px; inset-inline: 4%; border-top: 2px dotted var(--ink-soft); opacity: .45; }
.steps li { position: relative; display: grid; gap: 6px; }
.step-no {
  position: relative; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 4px;
  background: var(--c); color: var(--fg, #fff); box-shadow: var(--shadow-print); transform: rotate(-4deg);
  font: 700 3.4rem/1 var(--font-display); margin-bottom: 12px;
}
.steps li:nth-child(1) .step-no { --c: var(--tomato); }
.steps li:nth-child(2) .step-no { --c: var(--film); --fg: var(--ink); transform: rotate(3deg); }
.steps li:nth-child(3) .step-no { --c: var(--cloth); }
.step-no::before { content: ""; position: absolute; top: -9px; left: 50%; width: 34px; height: 15px; transform: translateX(-50%) rotate(-6deg); background: var(--tape); }
.steps h3 { font: 700 2.4rem/1 var(--font-display); }
/* a small object for each step, lying on the page next to its label */
.step-art { position: absolute; top: -4px; inset-inline-end: 6%; height: 74px; pointer-events: none; }
.art-prints { width: 110px; }
.art-prints img { position: absolute; width: 60px; height: 70px; object-fit: cover; border: 5px solid #fff; border-bottom-width: 12px; box-shadow: var(--shadow-print); }
.art-prints img:first-child { inset-inline-end: 0; top: 2px; transform: rotate(7deg); }
.art-prints img:last-child { inset-inline-end: 40px; top: 6px; transform: rotate(-6deg); }
.art-tape svg { display: block; transform: rotate(-5deg); filter: drop-shadow(0 6px 6px rgba(23, 32, 28, .3)); }
.art-film { width: 104px; padding: 9px 6px; background: #16140f; transform: rotate(4deg); box-shadow: var(--shadow-print);
  --hole: radial-gradient(circle, #f6f4ee 0 2.4px, transparent 2.9px);
  background-image: var(--hole), var(--hole); background-size: 10px 9px; background-position: 0 0, 0 100%; background-repeat: repeat-x; }
.art-film img { display: block; width: 100%; height: 56px; object-fit: cover; }
.steps p { color: var(--ink-soft); max-width: 32ch; }
.how { padding-bottom: clamp(16px, 2vw, 28px); }
.steps-note { display: flex; align-items: center; gap: 10px; margin-top: 30px; font: 500 1.15rem/1.4 var(--font-hand); color: var(--tomato-deep); transform: rotate(-1.5deg); }
.steps-note svg { flex: none; }
@media (max-width: 760px) { .step-art { display: none; } .steps { grid-template-columns: 1fr; } .steps::before { display: none; } .steps li { grid-template-columns: 68px minmax(0, 1fr); column-gap: 18px; } .step-no { grid-row: span 2; } }

/* ---------- examples: prints on the album cloth ---------- */
.posters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.poster-card {
  --r: -1deg;
  position: relative; display: grid; padding: 12px 12px 0; border: 0; text-align: center; cursor: pointer;
  background: var(--print) var(--grain); color: var(--ink); font: inherit; border-radius: 2px;
  box-shadow: 0 2px 2px rgba(0, 0, 0, .2), 0 24px 34px -18px rgba(0, 0, 0, .75); transform: rotate(var(--r)); transition: transform .25s ease;
}
.poster-card:nth-child(2) { --r: .8deg; }
.poster-card:nth-child(3) { --r: -.4deg; }
.poster-card::before { content: ""; position: absolute; z-index: 2; top: -10px; left: 50%; width: 30%; height: 22px; transform: translateX(-50%) rotate(-2deg); background: var(--tape); }
.poster-card:hover { transform: translateY(-5px) rotate(calc(var(--r) * -1)); }
.poster-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.poster-img img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 14s ease-in-out infinite alternate; }
.poster-card:nth-child(2) .poster-img img { animation-delay: -5s; }
.poster-card:nth-child(3) .poster-img img { animation-delay: -9s; }
.poster-meta { display: grid; gap: 2px; padding: 10px 6px 14px; }
.poster-meta strong { font: 500 1.35rem/1.35 var(--font-hand); }
.poster-meta small { color: var(--ink-soft); font-size: .85rem; }
.poster-play { position: absolute; top: 22px; inset-inline-start: 22px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--film); color: var(--ink); font-size: .95rem; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5); }
.swipe-hint { display: none; font-size: var(--step--1); color: var(--on-cloth-soft); margin: -16px 0 14px; }
@keyframes kenburns { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.14) translate(-3%, -2%); } }
@media (max-width: 860px) {
  .posters { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px var(--gutter) 22px; margin-inline: calc(var(--gutter) * -1); }
  .poster-card { scroll-snap-align: center; }
  .swipe-hint { display: block; }
}

/* ---------- gift: an airmail envelope on film yellow ---------- */
.gift { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.gift-copy { display: grid; gap: 16px; }
.gift-copy h2 { font-size: var(--step-3); }
.gift-copy p { color: var(--ink); max-width: 44ch; }
.gift .kicker { color: var(--ink); }
.gift-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; counter-reset: g; }
.gift-steps { gap: 8px 26px; }
.gift-steps li { counter-increment: g; display: flex; align-items: baseline; gap: 8px; font-weight: 500; }
.gift-steps li::before { content: counter(g); font: 700 2rem/1 var(--font-display); color: var(--tomato-deep); }

.envelope { position: relative; width: min(440px, 100%); aspect-ratio: 3 / 2; justify-self: center; margin-top: 110px; border: 0; padding: 0; background: none; cursor: pointer; perspective: 900px; transform: rotate(-2deg); filter: drop-shadow(0 24px 22px rgba(80, 50, 0, .35)); }
.env-back, .env-front, .env-flap { position: absolute; inset: 0; border-radius: 4px; }
.env-back { background: #e9e4d6; z-index: 0; }
.env-card { position: absolute; inset: 9% 15% 6%; background: var(--print); padding: 8px; display: grid; gap: 6px; grid-template-rows: minmax(0, 1fr) auto; box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .3); transition: transform .8s cubic-bezier(.3, 1.3, .5, 1) .25s; z-index: 1; }
.env-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.env-card-text { font: 500 .85rem/1.3 var(--font-hand); padding: 0 4px; text-align: center; color: var(--ink); }
.env-front {
  z-index: 2; background: #fbf9f3 var(--grain);
  /* airmail border */
  border: 9px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--tomato) 0 14px, #fbf9f3 14px 22px, #2f6fb0 22px 36px, #fbf9f3 36px 44px) 9;
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
}
.env-address { position: absolute; bottom: 16%; inset-inline-end: 12%; font: 500 1.05rem/1.5 var(--font-hand); color: #2a3a6a; text-align: start; }
.env-stamp { position: absolute; bottom: 14%; inset-inline-start: 9%; width: 54px; height: 64px; background: url("assets/photos/birthday-cake.webp") center / cover; border: 5px solid #fff; outline: 2px dashed #c9c2b0; outline-offset: -1px; transform: rotate(5deg); }
.env-flap { background: #f1ede2 var(--grain); clip-path: polygon(0 0, 100% 0, 50% 60%); transform-origin: top center; transition: transform .6s ease .45s, z-index 0s linear .45s; z-index: 3; }
.envelope.open .env-flap { transition-delay: 0s, .3s; }
.envelope:not(.open) .env-seal { transition-delay: .95s; } /* the seal comes back only once the flap is down */
.env-seal { position: absolute; top: 58%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px; border-radius: 50%; background: var(--tomato); color: #fff; display: grid; place-items: center; font: 1.35rem/1 var(--font-body); z-index: 4; transition: opacity .3s ease; box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .25), 0 3px 6px rgba(0, 0, 0, .25); }
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.open .env-seal { opacity: 0; transition-duration: .12s; }
.envelope.open .env-card { transform: translateY(-74%); }
.envelope:not(.open) .env-card { transform: translateY(-14%) scale(.86); transition-delay: 0s; }
@media (max-width: 760px) { .gift { grid-template-columns: 1fr; } .envelope { margin-top: 150px; } .gift { padding-bottom: calc(76px + 24px); } .env-address { font-size: .9rem; } .env-stamp { width: 42px; height: 50px; } .env-seal { top: 52%; width: 44px; height: 44px; } }

/* ---------- footer & dock ---------- */
.footer { background: var(--cloth-deep); color: var(--on-cloth-soft); padding: 28px var(--gutter) calc(16px + 76px); display: grid; gap: 6px; text-align: center; font-size: var(--step--1); }
.footer p { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.footer .brand { color: var(--on-cloth); }
.dock { display: none; }
@media (max-width: 760px) {
  .dock {
    display: block; position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, rgba(13, 46, 37, .96) 62%, rgba(13, 46, 37, 0));
    transform: translateY(110%); transition: transform .3s ease;
  }
  .dock.show { transform: none; }
}
@media (min-width: 761px) { .footer { padding-bottom: 28px; } }

/* ---------- a short note at the bottom of the screen ---------- */
.toast {
  position: fixed; z-index: 80; inset-inline: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); margin: 0 auto; max-width: 460px;
  padding: 14px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: var(--step--1); text-align: center;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.toast.on { opacity: 1; transform: none; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(8, 24, 19, .78); backdrop-filter: blur(4px); }
.modal-card { position: relative; width: min(880px, 100%); max-height: calc(100% - 8px); overflow: auto; background: var(--cloth) var(--weave); color: var(--on-cloth); border-radius: 14px; padding: clamp(18px, 3vw, 30px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
.modal-close { position: absolute; top: 10px; inset-inline-end: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--print); font-size: 1.5rem; cursor: pointer; color: var(--ink); z-index: 3; }
.making { display: grid; gap: 20px; text-align: center; padding: 10px 0; }
.making h2 { font-size: 3.2rem; color: var(--on-cloth); }
.making-prints { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; min-height: 150px; }
.making-prints figcaption { position: absolute; inset-inline: 4px; bottom: 2px; text-align: center; font: 500 .72rem/18px var(--font-hand); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.making-prints figure { margin: 0; width: 100px; position: relative; background: var(--print); padding: 6px 6px 20px; box-shadow: var(--shadow-print); transform: rotate(var(--r)); }
.making-prints img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; filter: grayscale(1) contrast(.9) brightness(.85); transition: filter 1s ease; }
.making-prints figure.awake img { filter: none; animation: breathe 3s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.06); } }
.making-status { color: var(--on-cloth-soft); font-size: var(--step-1); }
.bar { height: 8px; background: var(--cloth-line); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--film); transition: width .4s ease; }
.screen { position: relative; isolation: isolate; aspect-ratio: 16 / 9; background: #08140f; border-radius: 8px; overflow: hidden; } /* its layers never cover the close button */
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; overflow: hidden; }
.slide.on { opacity: 1; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; }
.slide .fill { object-fit: cover; filter: blur(22px) brightness(.7) saturate(1.1); transform: scale(1.15); }
.slide .whole { object-fit: contain; }
/* each photo "comes alive": a slow camera move with a little depth, the backdrop drifting the other way */
.slide.on .whole { animation: alive 3.6s ease-in-out forwards; transform-origin: 50% 40%; }
.slide.on .fill { animation: backdrop 3.6s linear forwards; }
.slide .clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.slide.has-clip .whole { animation: none; } /* the clip carries the motion */
@keyframes alive { from { transform: perspective(900px) translate3d(1%, .5%, 0) rotateY(-1deg) scale(1.06); } to { transform: perspective(900px) translate3d(-1%, -.6%, 0) rotateY(1deg) scale(1.12); } }
@keyframes backdrop { from { transform: scale(1.15) translateX(-2.5%); } to { transform: scale(1.22) translateX(3%); } }
.screen-end { position: absolute; inset: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 20, 15, .55); }
.screen-end .btn-ghost { color: #fff; }
.screen-progress { position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); z-index: 3; }
.screen-progress span { display: block; height: 100%; width: 0; background: var(--film); }
.screen-title { position: absolute; inset-inline: 0; bottom: 10%; text-align: center; z-index: 2; font: 700 clamp(2.2rem, 6vw, 4rem)/1 var(--font-display); color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, .6), 0 2px 22px rgba(0, 0, 0, .7); padding: 60px 16px 4px; bottom: 0; padding-bottom: 7%; background: linear-gradient(to top, rgba(8, 20, 15, .78), rgba(8, 20, 15, .45) 55%, transparent); transition: opacity .8s ease; }
.player-bar { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-top: 16px; }
.player-bar strong { font: 700 2rem/1.1 var(--font-display); }
.player-bar small { display: block; color: var(--on-cloth-soft); font-size: var(--step--1); }
.player-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.player .btn-ghost { color: var(--on-cloth); }
.soon { font-size: var(--step--1); color: var(--on-cloth-soft); align-self: center; }
@media (max-width: 600px) { .modal-card { padding-top: 62px; } }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "copy" "stage" "more"; grid-template-rows: auto; padding-top: 22px; }
  .hero-more { padding-top: 0; }
  .stage { height: clamp(290px, 78vw, 330px); margin: 6px calc(var(--gutter) * -1) 0; }
  .album-section { padding-bottom: calc(76px + 16px + 24px); }
  .stage-note { font-size: .92rem; bottom: 3%; }
  .lead { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .stage-note { display: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* numbers inside display titles: Karantina's digits read like Hebrew letters */
.num { font-family: "IBM Plex Sans Hebrew", sans-serif; font-weight: 600; font-size: .78em; letter-spacing: 0; }
