/* incolor.world: the parlor at night. One story from the door to the phone booth.
   Stand-ins: every scene first tries the Gemini image named in design/gemini-asset-requests.md;
   if it is missing, the element after it (.fallback) is shown instead. */

:root {
  --coffee: #170E0A;          /* full-page dark coffee */
  --coffee-rich: #22140D;     /* content blocks */
  --burgundy-deep: #3A0B12;   /* envelope pop-up */
  --side: clamp(10px, 6vw, 120px);
}

.asset + .fallback { display: none; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; border-bottom: 1px solid transparent; transition: border-color 0.8s var(--ease); }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; background: rgba(23, 14, 10, 0.9); transition: opacity 0.8s var(--ease); }
.site-header.is-scrolled { border-bottom-color: rgba(176, 138, 79, 0.25); }
.site-header.is-scrolled::before, .site-header:has(.nav.is-open)::before { opacity: 1; }
@supports (backdrop-filter: blur(8px)) { .site-header::before { background: rgba(23, 14, 10, 0.75); backdrop-filter: blur(10px); } }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: none; }
.logo { display: block; width: 44px; height: 44px; }
.logo svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.nav-toggle { min-height: 44px; padding: 0 0.25em; background: none; border: 0; color: var(--cream); cursor: pointer; font: 400 0.75rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.24em; text-transform: uppercase; color: var(--vanilla); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }
.nav a:hover { color: var(--brass); }
@media (max-width: 899px) {
  .nav { position: fixed; inset: 64px 0 0 0; background: var(--coffee); padding: 3rem var(--gutter); opacity: 0; visibility: hidden; transition: opacity 0.8s var(--ease), visibility 0s linear 0.8s; }
  .nav.is-open { opacity: 1; visibility: visible; transition: opacity 0.8s var(--ease); }
  .nav li { border-top: 1px solid rgba(176, 138, 79, 0.3); }
  .nav a { display: block; padding: 1.1rem 0; font: 400 2.4rem/1 var(--serif); letter-spacing: 0.02em; color: var(--cream); }
}
@media (min-width: 900px) { .nav-toggle { display: none; } .nav ul { display: flex; gap: 2.8rem; } }

.fine-rule { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 1.4rem auto 0; width: 200px; }
.fine-rule i { flex: 1; height: 1px; background: var(--brass); opacity: 0.6; }
.fine-rule b { width: 8px; height: 8px; border: 1px solid var(--brass); border-radius: 50%; }
.btn { font-size: 0.6875rem; letter-spacing: 0.24em; }

/* ---------- 1. The keyhole (logo page) ---------- */
.door-scene { height: 320vh; background: #050302; }
.door-scene__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.door-scene__sticky::after { content: ""; position: absolute; inset: 0; background: var(--coffee); opacity: var(--fade, 0); pointer-events: none; z-index: 4; }
.smoke-room {
  position: absolute; inset: 0; transform: scale(var(--smoke-zoom, 1)); transform-origin: 50% 52%; will-change: transform;
  background: url(../assets/img/chocolate-river-poster.jpg) center / cover no-repeat, radial-gradient(ellipse 45% 55% at 50% 52%, #2b2522 0%, #0d0908 55%, #030202 100%);
}
.river-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* smoke on top of the river: screen and the filter remove its dark room; the mask takes out the room lamp and door frame */
.smoke-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: screen; filter: contrast(1.4) brightness(1.15); -webkit-mask-image: radial-gradient(circle at 50% 46%, transparent 2.5%, #000 6%), linear-gradient(90deg, transparent 8%, #000 14%, #000 86%, transparent 92%); mask-image: radial-gradient(circle at 50% 46%, transparent 2.5%, #000 6%), linear-gradient(90deg, transparent 8%, #000 14%, #000 86%, transparent 92%); -webkit-mask-composite: source-in; mask-composite: intersect; }
.smoke-video ~ i { display: none; }
.smoke-room i { position: absolute; left: 50%; top: 50%; width: 60%; height: 50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(175, 165, 155, 0.36), rgba(175, 165, 155, 0)); filter: blur(26px); animation: smoke 20s ease-in-out infinite alternate; }
.smoke-room i:nth-child(2) { width: 80%; height: 35%; top: 64%; animation-duration: 26s; animation-delay: -9s; }
.smoke-room i:nth-child(3) { width: 40%; height: 70%; left: 42%; animation-duration: 17s; animation-delay: -4s; }
.smoke-room i:nth-child(4) { width: 55%; height: 30%; top: 30%; left: 58%; animation-duration: 23s; animation-delay: -14s; }
.smoke-room i:nth-child(5) { width: 30%; height: 30%; top: 46%; animation-duration: 14s; animation-delay: -7s; background: radial-gradient(closest-side, rgba(255, 196, 140, 0.2), transparent); }
@keyframes smoke { 0% { transform: translate(-58%, -48%) scale(1); } 50% { transform: translate(-44%, -55%) scale(1.2); } 100% { transform: translate(-52%, -44%) scale(0.92); } }
.kh-door, .kh-photo { position: absolute; left: 50%; top: 50%; max-width: none; will-change: transform; pointer-events: none; }
.kh-photo { width: 2000px; height: 1116px; margin: -557px 0 0 -1000px; transform-origin: 1000px 557px; }
.kh-door { width: 6000px; height: 5580px; margin: -2789px 0 0 -3000px; transform-origin: 3000px 2789px; }
/* wide, short windows: the door continues past its edges as a mirror of itself, so nothing shows beside it. Stops short of the mirrored keyhole. */
.kh-side { position: absolute; left: 50%; top: 50%; width: 2480px; height: 5580px; margin-top: -2789px; will-change: transform; pointer-events: none; }
.kh-side::before { content: ""; position: absolute; inset: 0; transform: scaleX(-1); background: url(../assets/img/keyhole-door.webp) right center / 6000px 5580px no-repeat; }
.kh-side--left { margin-left: -5476px; transform-origin: 5476px 2789px; }
.kh-side--left::before { background-position: left center; }
.kh-side--right { margin-left: 2996px; transform-origin: -2996px 2789px; }
@media (max-aspect-ratio: 9 / 5) { .kh-side { display: none; } }
.door-mono { position: absolute; z-index: 3; left: 50%; top: 42%; height: 40vh; height: 40svh; width: auto; transform: translate(-50%, var(--mono-y, 0)); opacity: var(--mono, 1); overflow: visible; pointer-events: none; }
.scroll-cue { position: absolute; z-index: 3; right: clamp(16px, 4vw, 56px); bottom: clamp(1.4rem, 5vh, 3rem); display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: var(--ui, 1); }
.scroll-cue span { font: 400 0.5625rem/1 var(--sans); letter-spacing: 0.3em; text-transform: uppercase; color: var(--taupe); writing-mode: vertical-rl; }
.scroll-cue i { width: 1px; height: 48px; background: var(--brass); opacity: 0.7; }

/* ---------- 2. Three keys on a velvet-draped table, in a dark room ---------- */
.keys-page { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column;
  background: radial-gradient(ellipse 22% 18% at 74% 16%, rgba(255, 176, 96, 0.08), transparent 70%), radial-gradient(ellipse 70% 55% at 50% 30%, #140c08 0%, #070403 60%, #030201 100%); }
.keys-page__head { position: relative; z-index: 2; text-align: center; padding: clamp(86px, 12vh, 120px) var(--gutter) 0; }
.keys-page__title { margin: 0 auto; font-family: var(--serif); text-transform: uppercase; color: var(--cream); font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: 1; letter-spacing: 0.03em; }
.keys-page__sub { list-style: none; margin: 1.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem; }
.keys-page__sub li { font: 400 0.6875rem/1.4 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--vanilla); }
.keys-page__sub li:not(:last-child)::after { content: "·"; color: var(--brass); margin-left: 1.4rem; }
@media (max-width: 560px) { .keys-page__sub li:first-child { flex-basis: 100%; text-align: center; } .keys-page__sub li:first-child::after { content: none; } }

/* the table: a photo when it exists, otherwise built from the velvet photo in perspective */
.parlor-table { position: absolute; inset: 0; }
.parlor-table__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% 100%; }
.parlor-table::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(4, 2, 1, 0.55), transparent 42%, transparent 74%, rgba(4, 2, 1, 0.6)); pointer-events: none; }
.parlor-table__built { position: absolute; inset: 0; perspective: 1000px; perspective-origin: 50% -60%; }
.parlor-table__top, .parlor-table__front { position: absolute; background-image: linear-gradient(rgba(14, 3, 6, 0.42), rgba(14, 3, 6, 0.42)), url(../assets/img/velvet-oxblood.webp); background-size: cover; filter: saturate(0.78) brightness(0.6) contrast(1.08); }
.parlor-table__top { left: -20%; right: -20%; top: 0; height: 74%; background-position: 50% 30%; transform-origin: 50% 100%; transform: rotateX(62deg); }
.parlor-table__top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#030201 0%, rgba(3, 2, 1, 0.6) 22%, transparent 60%); }
.parlor-table__front { left: 0; right: 0; bottom: 0; height: 30%; background-position: 50% 80%; box-shadow: inset 0 2px 0 rgba(255, 150, 150, 0.08), inset 0 30px 40px rgba(0, 0, 0, 0.35); }
.parlor-table__front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(3, 1, 1, 0.75)); }

.keys { position: absolute; z-index: 2; left: 0; right: 0; bottom: 4%; list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: 1320px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 3vw, 48px); align-items: end; }
.key-card { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: inherit; padding-bottom: 0.4rem; }
.key-card__key { position: relative; display: block; width: clamp(150px, 20vw, 300px); margin-bottom: clamp(1.4rem, 5vh, 3rem); perspective: 700px; }
.key-card__lift { position: relative; z-index: 1; display: block; transform: rotateZ(var(--r, 0deg)); transform-origin: 50% 60%; transform-style: preserve-3d; transition: transform 2s cubic-bezier(0.22, 0.8, 0.26, 1); }
.key-card__img { display: block; width: 100%; height: auto; filter: drop-shadow(0 7px 6px rgba(0, 0, 0, 0.85)) brightness(0.98); }
.key-card__shadow { position: absolute; left: 10%; right: 10%; top: 52%; height: 20%; border-radius: 50%; background: rgba(0, 0, 0, 0.8); filter: blur(9px); transition: transform 2s var(--ease), opacity 2s var(--ease), filter 2s var(--ease); }
.key-card:hover .key-card__lift, .key-card:focus-visible .key-card__lift { transform: translateY(-30vh) rotateX(4deg) rotateZ(calc(var(--r, 0deg) * 0.25)) scale(1.2); }
.key-card:hover .key-card__img, .key-card:focus-visible .key-card__img { animation: key-bob 4.8s ease-in-out infinite, key-sway 7.6s ease-in-out infinite, key-turn 11s ease-in-out infinite; filter: drop-shadow(0 30px 24px rgba(0, 0, 0, 0.6)) brightness(1.05); }
.key-card:hover .key-card__shadow, .key-card:focus-visible .key-card__shadow { transform: scale(1.5, 1.3); opacity: 0.25; filter: blur(18px); animation: key-breathe 4.8s ease-in-out infinite; }
/* levitating: three slow motions out of step, so it never repeats visibly */
@keyframes key-bob { 0%, 100% { translate: 0 6px; } 50% { translate: 0 -26px; } }
@keyframes key-sway { 0%, 100% { rotate: -2.5deg; } 50% { rotate: 3deg; } }
@keyframes key-turn { 0%, 100% { transform: rotateY(-12deg) rotateX(4deg); } 50% { transform: rotateY(12deg) rotateX(-5deg); } }
@keyframes key-breathe { 0%, 100% { opacity: 0.32; } 50% { opacity: 0.18; } }
.keys li:nth-child(1) .key-card { --r: -10deg; }
.keys li:nth-child(2) .key-card { --r: 5deg; }
.keys li:nth-child(3) .key-card { --r: -4deg; }
.key-card__title { font-family: var(--serif); text-transform: uppercase; color: var(--cream); font-weight: 700; font-size: clamp(1.25rem, calc(1.6vw + 4px), 1.75rem); letter-spacing: 0.06em; line-height: 1.15; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9); }
.key-card__desc { margin-top: 0.5rem; max-width: 30ch; font-size: clamp(0.875rem, calc(0.95vw + 2px), 1rem); line-height: 1.5; color: var(--vanilla); opacity: 0.85; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
.key-card:focus-visible { outline: none; }
.key-card:focus-visible .key-card__title { text-decoration: underline 1px var(--brass); text-underline-offset: 0.3em; }
@media (max-width: 799px) {
  .keys-page { min-height: auto; padding-bottom: 2.5rem; }
  
  .keys { position: relative; bottom: auto; grid-template-columns: 1fr; gap: 2.2rem; margin-top: 3.5rem; }
  .key-card__key { width: 56vw; margin-bottom: 1rem; }
  .key-card__lift { transform: rotateZ(var(--r, 0deg)); }
}

/* ---------- 3. Skill pages ---------- */
.page { position: relative; padding: 0 var(--side); background-color: var(--coffee); background-size: cover; background-position: center; }
@media (min-width: 900px) and (hover: hover) { .page { background-attachment: fixed; } }
.tex-wood { background-image: linear-gradient(rgba(6, 4, 2, 0.3), rgba(6, 4, 2, 0.3)), url(../assets/img/room-lamp.webp); background-size: 230% auto !important; background-position: 0% 18% !important; }
.skills-head { grid-column: 1 / -1; text-align: center; padding-bottom: clamp(2.5rem, 7vh, 4.5rem); }
.skills-head__title { margin: 0; }
.skills-head .keys-page__sub li:first-child { flex-basis: auto; }
.skills-head .keys-page__sub li:first-child::after { content: "·"; }
@media (max-width: 400px) { .skills-head .keys-page__sub { gap: 0.4rem 0.7rem; } .skills-head .keys-page__sub { flex-wrap: nowrap; } .skills-head .keys-page__sub li { font-size: 0.625rem; letter-spacing: 0.12em; white-space: nowrap; } .skills-head .keys-page__sub li:not(:last-child)::after { margin-left: 0.7rem; } }
@media (min-width: 900px) { .skill-page .block--split.has-head::before { top: calc(clamp(80px, 11vh, 120px) + clamp(2.4rem, 6vw, 5.4rem) + clamp(2.5rem, 7vh, 4.5rem) + 8.4rem); } }
.block { position: relative; max-width: 1320px; margin: 0 auto; background: radial-gradient(ellipse 80% 60% at 30% 15%, #2d1a10 0%, var(--coffee-rich) 55%, #1a0f0a 100%); border-left: 1px solid rgba(176, 138, 79, 0.22); border-right: 1px solid rgba(176, 138, 79, 0.22); }
.skill-page .block--split { display: grid; gap: 4rem; padding: clamp(80px, 11vh, 120px) clamp(16px, 3vw, 44px) clamp(48px, 8vh, 90px); }
@media (min-width: 900px) {
  .skill-page .block--split { grid-template-columns: 1fr 1fr; gap: 0; min-height: 100vh; }
  .skill-page .block--split::before { content: ""; position: absolute; top: calc(clamp(80px, 11vh, 120px) + 3.4rem); bottom: 0; left: 50%; width: 1px; background: rgba(176, 138, 79, 0.45); }
  .skill-slot { padding: 0 clamp(16px, 2.6vw, 44px); }
  /* both columns match on every row: same picture size and height, titles mirrored, intros starting level */
  .skill { width: min(100%, calc(76vh * 0.82)); margin-inline: auto; }
  .skill .gallery { width: 100%; }
  .skill__title { min-height: 2.1em; }
  .skill-slot:is([data-slot="1"], [data-slot="3"], [data-slot="5"]) .skill__title { text-align: right; margin-left: auto; margin-right: -0.04em; }
}
.skill-slot { min-width: 0; }
/* the key this pair of skills sits under */
.skill-page__area { grid-column: 1 / -1; margin: 0; max-width: none; text-align: center; color: var(--brass); font-size: clamp(0.8rem, 1vw, 0.95rem); }
@media (min-width: 900px) { .skill-page__area { padding-bottom: clamp(1.4rem, 3vh, 2.2rem); } }
.skill { position: relative; z-index: 1; min-width: 0; }
.skill__title { position: relative; z-index: 3; margin: 0.5em 0 0 -0.04em; max-width: 10em; font-size: clamp(2.2rem, min(3.9vw, 6.8vh), 3.9rem); line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; color: var(--cream); text-shadow: 0 2px 22px rgba(23, 14, 10, 0.85); pointer-events: none; }
.skill__intro { margin-top: 1.2rem; color: var(--vanilla); font-size: 1rem; max-width: 52ch; }

/* Gallery: photo, then one section per frame */
.gallery { position: relative; width: min(100%, calc(76vh * 0.82)); }
/* gap: frame widths are fractional, so without it the next frame shows as a hairline on the right */
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; gap: 6px; }
.gallery__track::-webkit-scrollbar { display: none; }
.frame { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 5; margin: 0; position: relative; cursor: zoom-in; }
@media (max-width: 560px) { .frame { aspect-ratio: 5 / 8.1; } }
.frame--photo { background: #120a07; }
.frame--photo { overflow: hidden; }
.frame--photo img, .frame--photo video { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
.frame--top img { object-position: 50% 0; }
/* cut-out objects on their own: whole, on a dim pool of light */
.frame--object { background: radial-gradient(ellipse 75% 60% at 50% 48%, #38201a, #150b08 72%, #0d0705); }
.frame--object img { object-fit: contain; padding: 9%; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.65)); }
/* wide pictures with words in them sit inside the box instead of losing their sides */
.frame--fit img { object-fit: contain; }
.frame--white { background: #fff; }
.frame--blur::before { content: ""; position: absolute; inset: -40px; background: url(../assets/img/art-euphoria-website.jpg) center / cover; filter: blur(26px) brightness(0.6); }
.frame--text { display: flex; flex-direction: column; justify-content: safe center; background: linear-gradient(160deg, #1e120c, #120a07); border: 1px solid rgba(176, 138, 79, 0.35); padding: clamp(1.6rem, min(3vw, 5svh), 2.8rem) clamp(1.4rem, min(3vw, 4.5svh), 2.6rem) clamp(2.2rem, min(4vw, 6svh), 3.4rem); overflow-y: auto; scrollbar-width: none; }
.frame--text::-webkit-scrollbar { display: none; }
.frame__project { color: var(--brass); margin: 0 0 0.6rem; }
.frame__title { margin: 0 0 1.4rem; font-family: var(--type); font-size: clamp(1.7rem, 2.7vw, 2.55rem); line-height: 1.14; letter-spacing: 0; color: var(--cream); }
.frame__title .caret { display: inline-block; width: 0; overflow: visible; }
.frame__title .caret-rest { visibility: hidden; }
.frame__title.is-typed .caret { animation: caret 1s steps(2, jump-none) 4; }
/* the first frame of a project: the colors turn over so a new project is hard to miss */
.frame--lead { background: var(--brass); border-color: var(--brass); }
.frame--lead .frame__project, .frame--lead .frame__title { color: #1a0f0a; }
.frame--lead .frame__field { color: #2e1c10; }
.frame--lead .frame__body { color: #170e0a; }
.frame__field { margin: 0 0 0.5rem; color: var(--taupe); }
@media (max-width: 799px) { .frame--text { padding-top: 1.1rem; padding-bottom: 1.1rem; } .frame__title { font-size: 1.45rem; margin-bottom: 0.9rem; } }
.frame__body { margin: 0; color: var(--cream); font-size: clamp(0.95rem, min(1.25vw, 2.5svh), 1.15rem); line-height: 1.6; max-width: 44ch; }
.gallery__nav { position: absolute; top: 50%; z-index: 2; width: 42px; height: 42px; margin-top: -21px; border: 1px solid rgba(176, 138, 79, 0.6); border-radius: 50%; background: rgba(23, 14, 10, 0.65); color: var(--cream); cursor: pointer; font: 300 1.25rem/1 var(--sans); display: grid; place-items: center; }
/* half outside the frame, so the arrows never sit on the text */
.gallery__nav--prev { left: -21px; } .gallery__nav--next { right: -21px; }
@media (max-width: 560px) { .gallery__nav { width: 36px; height: 36px; margin-top: -18px; } .gallery__nav--prev { left: -18px; } .gallery__nav--next { right: -18px; } .skill-page .block--split { gap: 2.5rem; } .skills-head { padding-bottom: 0; } }
.lightbox .gallery__nav--prev { left: 10px; } .lightbox .gallery__nav--next { right: 10px; }
.gallery__nav[disabled] { opacity: 0.25; cursor: default; }
.gallery__count { position: absolute; right: 12px; top: 12px; z-index: 2; font: 400 0.625rem/1 var(--sans); letter-spacing: 0.2em; color: var(--cream); background: rgba(23, 14, 10, 0.65); padding: 0.45em 0.7em; }

.lightbox { width: min(980px, 94vw); max-height: 92vh; padding: 0; border: 1px solid rgba(176, 138, 79, 0.5); background: #120a07; color: var(--vanilla); overflow: hidden; }
.lightbox::backdrop { background: rgba(8, 4, 3, 0.85); backdrop-filter: blur(4px); }
.lightbox__close { position: absolute; right: 10px; top: 8px; z-index: 5; width: 44px; height: 44px; border: 0; background: none; color: var(--cream); font: 300 2rem/1 var(--sans); cursor: pointer; }
.lightbox .gallery { width: 100%; }
.lightbox .gallery__count { right: 64px; top: 20px; }
.lightbox .frame { aspect-ratio: auto; height: min(84vh, 760px); cursor: default; }
.lightbox .frame--photo img, .lightbox .frame--photo video { object-fit: contain; }
.lightbox .frame--text { padding: clamp(2rem, 6vw, 5rem); border: 0; }
.lightbox .frame__title { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.lightbox .frame__body { font-size: clamp(1.05rem, 1.6vw, 1.35rem); max-width: 52ch; }

/* ---------- 4. Work with me: the platter ---------- */
.platter-scene { height: 320vh; background: #07140d; }
.platter-scene__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.curtain {
  position: absolute; inset: 0;
  background:
    url(../assets/img/curtain-green.webp) center 88% / cover no-repeat,
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255, 214, 150, 0.14), transparent 70%),
    repeating-linear-gradient(90deg, #06170e 0, #0f3020 3.2%, #1d4a33 5.2%, #12392a 7%, #071a10 9.5%, #0b2618 11%, #184130 13.5%, #08190f 16%),
    #0a2316;
}
.curtain::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 50% 55%, transparent 40%, rgba(0, 0, 0, 0.45)); }
.platter { position: absolute; left: 50%; bottom: 9%; width: min(56vw, 640px); aspect-ratio: 1 / 0.82; transform: translateX(-50%); }
.platter__tray { position: absolute; left: 0; right: 0; bottom: 0; }
.platter__tray img, .platter__tray svg, .platter__lid img, .platter__lid svg, .platter__glove img, .platter__glove svg { display: block; width: 100%; height: auto; }
.platter__card { position: absolute; left: 27%; width: 46%; bottom: 13.5%; aspect-ratio: 1.55 / 1; display: grid; place-items: center; border-radius: 1px; background: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27260%27 height=%27260%27%3E%3Cfilter id=%27f%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%270.9%27 numOctaves=%274%27 stitchTiles=%27stitch%27/%3E%3CfeColorMatrix values=%270 0 0 0 0.42 0 0 0 0 0.34 0 0 0 0 0.24 0 0 0 0.11 0%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url(%23f)%27/%3E%3C/svg%3E"), linear-gradient(176deg, #f5eee1 0%, #ebe2d0 52%, #dacdb5 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 3px rgba(80, 60, 30, 0.12), 0 1px 1px rgba(0, 0, 0, 0.35), 0 16px 28px -8px rgba(0, 0, 0, 0.65); transform: perspective(700px) rotateX(3deg); transform-origin: 50% 100%; }
.platter__card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 30% 18%, rgba(255, 244, 222, 0.38), transparent 60%), linear-gradient(transparent 70%, rgba(60, 40, 20, 0.12)); pointer-events: none; }
.platter__card-text { position: relative; margin: 0; font-family: var(--type); color: #3a2e25; font-size: clamp(0.8rem, 1.45vw, 1.2rem); letter-spacing: 0.08em; text-align: center; max-width: none; opacity: 0.9; mix-blend-mode: multiply; text-shadow: 0 0.6px 0 rgba(255, 255, 255, 0.55); filter: blur(0.15px); }
.platter__lid { position: absolute; left: 8%; width: 84%; bottom: 12%; z-index: 2; transform: translate3d(0, var(--lift, 0px), 0) rotate(var(--tilt, 0deg)); transform-origin: 50% 0; will-change: transform; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55)); }
.platter__glove { position: absolute; left: 46.6%; width: max(28%, 12.5vw); bottom: 61%; z-index: 3; transform: translate3d(var(--hand, -120vw), var(--lift, 0px), 0) rotate(-84deg); transform-origin: 14% 90%; will-change: transform; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.45)); }
@media (max-width: 799px) { .platter { width: 88vw; bottom: 12%; } }

/* ---------- 5. How I work, page I ---------- */
.how-page { background: var(--coffee); padding: clamp(5rem, 14vh, 9rem) var(--side); }
.process { list-style: none; margin: 0 auto; padding: 2.4rem 0 0; max-width: 1240px; display: grid; gap: 2.5rem; border-top: 1px solid rgba(176, 138, 79, 0.45); }
@media (min-width: 900px) { .process { grid-template-columns: repeat(4, 1fr); gap: 2.6rem; } }
.process__n { display: block; font: 400 0.75rem/1 var(--sans); letter-spacing: 0.2em; color: var(--brass); margin-bottom: 1rem; }
.process h3 { font-size: clamp(2.2rem, 3.9vw, 3.9rem); text-transform: uppercase; letter-spacing: 0.02em; line-height: 1; margin-bottom: 1.1rem; }
.process p { font-size: 0.9375rem; }

/* ---------- 6. How I work, page II: four gloved hands on a curtain, one box at a time ---------- */
.hands-page { --stage-w: max(100vw, calc(100svh * 1.791)); position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: url(../assets/img/curtain-top.webp) center top / var(--stage-w) 50% no-repeat, url(../assets/img/curtain-bottom.webp) center bottom / var(--stage-w) 50% no-repeat, #0c0203; }
.hands-stage { position: absolute; left: 50%; top: 50%; width: var(--stage-w); aspect-ratio: 1678 / 937; transform: translate(-50%, calc(-50% + 3vh)); }
.hands-page__photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.hands-page__gl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
.has-gl .hands-page__gl { opacity: 1; }
.hand-spot { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; }
.hands-stage:not(.has-gl) .hand-spot::after { content: ""; position: absolute; inset: 0; background: radial-gradient(closest-side, rgba(255, 190, 90, 0.42), transparent); mix-blend-mode: screen; opacity: 0; transition: opacity 0.3s; }
.hands-stage:not(.has-gl) .hand-spot:hover::after, .hands-stage:not(.has-gl) .hand-spot:focus-visible::after { opacity: 1; }
.hand-spot:focus-visible { outline: 1px solid var(--brass); outline-offset: 4px; }
.hand-spot--pen { left: 27%; top: 4%; width: 24%; height: 26%; }
.hand-spot--martini { left: 49%; top: 26%; width: 32%; height: 26%; }
.hand-spot--laptop { left: 22%; top: 49%; width: 29.5%; height: 25%; }
.hand-spot--glasses { left: 49%; top: 73%; width: 29%; height: 20%; }
@media (max-aspect-ratio: 1/1) {
  .hands-page { --stage-w: 165vw; }
  .hands-stage { transform: translate(-50%, -50%); -webkit-mask-image: linear-gradient(transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(transparent, #000 6%, #000 94%, transparent); }
}
.way-box { position: absolute; z-index: 5; left: 50%; top: 50%; width: 60%; height: 60%; transform: translate(-50%, -50%); padding: clamp(2rem, 4vw, 3.6rem); overflow-y: auto; background: radial-gradient(ellipse at 40% 25%, #27140f, #150a07 75%); border: 1px solid rgba(176, 138, 79, 0.6); box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7); animation: way-in 0.7s var(--ease); }
.way-box[hidden] { display: none; }
@keyframes way-in { from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); } }
.way-box__close { position: absolute; right: 12px; top: 8px; width: 44px; height: 44px; border: 0; background: none; color: var(--cream); font: 300 2rem/1 var(--sans); cursor: pointer; }
.way-box h3 { margin: 0 2.5rem 1.1rem 0; font-size: clamp(1.8rem, 3.2vw, 3rem); text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.02; }
.way-box p { font-size: 1.0625rem; }
.way-box dl { margin: 1.4rem 0 0; }
.way-box dt { margin-top: 1.1rem; }
.way-box dd { margin: 0.3rem 0 0; max-width: 62ch; }
.hands-page__cta { position: absolute; z-index: 3; left: 50%; bottom: clamp(0.6rem, 1.4vh, 1rem); transform: translateX(-50%); background: rgba(20, 8, 8, 0.75); }
@media (max-width: 799px) {
  .way-box { width: 92%; height: 72%; }
}

/* ---------- 7. About: the envelope and the letter ---------- */
.letter-scene { position: relative; height: 300vh; background: radial-gradient(ellipse 55% 45% at 50% 45%, #1d120b, #0a0604 60%, #040302 100%); }
.letter-scene__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; perspective: 1800px; }
.letter-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.letter-tray { position: absolute; left: 50%; top: 50%; width: min(70vw, 1040px); height: auto; transform: translate(-50%, -50%); filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.7)); }
@media (max-width: 799px) { .letter-tray { width: 112vw; } .letter-photo { inset: auto; left: 50%; top: 50%; width: 250vw; max-width: none; height: auto; object-fit: fill; transform: translate(-50%, -50%); -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent); mask-image: radial-gradient(closest-side, #000 72%, transparent); } }
.env { position: relative; width: min(44vw, 68svh); aspect-ratio: 1.3752; transform: translate3d(0, var(--env-y, 0px), 0); will-change: transform; filter: drop-shadow(0 34px 44px rgba(0, 0, 0, 0.7)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45)); }
.env__back { position: absolute; inset: 0; background: url(../assets/img/envelope.webp) center / 100% 100% no-repeat; filter: brightness(0.6); }
.env__pocket-clip { position: absolute; left: 0; right: 0; bottom: 0; top: -400%; overflow: hidden; z-index: 2; }
.paper {
  position: absolute; left: 5%; width: 90%; bottom: 0; z-index: 2;
  padding: 7% 8% 8%; border-radius: 2px;
  font-family: var(--type); color: #2b231d; font-size: clamp(1rem, min(1.42vw, 2.5svh), 1.4rem); line-height: 1.55;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.27 0 0 0 0 0.17 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 30% 20%, #fbf5e8, #f1e6d0 70%, #e7d9bd);
  box-shadow: 0 2px 8px rgba(60, 40, 20, 0.25), inset 0 0 40px rgba(150, 120, 80, 0.12);
  transform: translate3d(0, var(--paper-y, 0px), 0); will-change: transform;
}
.paper p { margin: 0 0 1em; max-width: none; }
.paper p:last-child { margin-bottom: 0; }
/* pocket and flap are cut from one photo of the closed envelope */
.env__front { position: absolute; inset: 0; z-index: 3; clip-path: polygon(0 0, 3% 10%, 50.1% 67.6%, 97.9% 10%, 100% 0, 100% 100%, 0 100%); background: url(../assets/img/envelope.webp) center / 100% 100% no-repeat; }
.env__flap { position: absolute; left: 0; right: 0; top: 0; height: 68%; z-index: 4; transform-origin: 50% 0; transform: rotateX(var(--flap, 0deg)); transform-style: preserve-3d; filter: drop-shadow(0 5px 5px rgba(50, 30, 10, 0.22)); }
.env__flap::before { content: ""; position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 97.9% 14.7%, 50.1% 99.4%, 3% 14.7%); background: url(../assets/img/envelope.webp) top center / 100% calc(100% / 0.68) no-repeat; }
.env__seal { position: absolute; left: 50%; top: 100%; width: 26%; height: auto; transform: translate(-50%, -64%); backface-visibility: hidden; filter: drop-shadow(0 6px 8px rgba(40, 10, 10, 0.5)); }
.letter-scene.flap-back .env__flap { z-index: 1; }
.letter-scene.flap-back .env__flap::before { filter: brightness(0.8); }
.letter-scene.flap-back .env__seal { opacity: 0; }
.letter-scene.paper-out .env__pocket-clip { overflow: visible; z-index: 5; }
/* two overlapping photobooth strips: come up out of the open envelope and land beside the letter (scenes.js places them) */
.strip { position: absolute; left: 0; top: 0; z-index: 2; width: min(12vw, 20svh); display: flex; flex-direction: column; gap: 0.35em; padding: 0.55em 0.55em 1.1em; font-size: min(1.1vw, 1.55svh); background: #f3f0e8; box-shadow: 0 14px 26px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.4); transform-origin: 50% 50%; will-change: transform; }
.strip img { display: block; width: 100%; height: auto; filter: contrast(1.12) brightness(0.97); }
.strip.is-out { z-index: 4; }
@media (max-width: 799px) {
  .env { width: 88vw; }
  /* phones have no room on either side of a centered letter, so the letter keeps left and the strips run one above the other on the right */
  .paper { left: 0; width: 80%; font-size: 1rem; line-height: 1.5; padding: 7% 5.5%; }
  .strip { width: min(17.5vw, 12svh); font-size: min(1.4vw, 1svh); }
}
.about-logos { background: var(--coffee); }
.about-logos { --logo-k: 1; overflow: hidden; padding: clamp(2.5rem, 7vh, 4.5rem) 0 clamp(4rem, 10vh, 6rem); }
.logo-run { display: flex; width: max-content; animation: logo-run 80s linear infinite; }
.logos { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex: none; }
.logos li { flex: none; margin-right: clamp(3.5rem, 7vw, 7rem); }
.logos img { display: block; width: auto; height: calc(var(--h) * var(--logo-k) * 1px); opacity: 0.86; }
@keyframes logo-run { to { transform: translate3d(-33.3333%, 0, 0); } }
@media (max-width: 799px) { .about-logos { --logo-k: 0.72; } }
@media (prefers-reduced-motion: reduce) {
  .logo-run { animation: none; width: auto; }
  .logos { flex-wrap: wrap; justify-content: center; row-gap: 2rem; padding: 0 var(--side); }
  .logos li { margin: 0 1.6rem; }
  .logos[aria-hidden] { display: none; }
}

/* with the photo: the stage is the photo itself, centred at full height; plaque and phone sit on the photo */

/* ---------- Footer ---------- */
.site-footer { background: var(--coffee); border-top: 1px solid rgba(176, 138, 79, 0.3); overflow: hidden; }
.marquee { padding: clamp(2rem, 6vh, 4rem) 0 clamp(1.5rem, 4vh, 3rem); border-bottom: 1px solid rgba(176, 138, 79, 0.3); }
.marquee__track { display: flex; width: max-content; font-family: var(--serif); text-transform: uppercase; color: var(--cream); font-size: clamp(2.6rem, 7.5vw, 7rem); line-height: 1; letter-spacing: 0.02em; white-space: nowrap; animation: marquee 48s linear infinite; }
.marquee__track--rev { animation-direction: reverse; color: var(--vanilla); opacity: 0.85; }
@keyframes marquee { to { transform: translateX(-50%); } }
.footer__base { display: grid; gap: 1.6rem; grid-template-columns: 1fr 1fr; padding: 2rem var(--side) 2.4rem; align-items: start; }
@media (min-width: 900px) { .footer__base { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.logo--footer { width: 56px; height: 56px; }
.footer__col { list-style: none; margin: 0; padding: 0; }
.footer__col a { text-decoration: none; font: 400 0.625rem/2.2 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--vanilla); }
.footer__col a:hover { color: var(--brass); }
.footer__base small { font: 400 0.625rem/2.2 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--taupe); }
@media (min-width: 900px) { .footer__base small { text-align: right; } }

/* Italiana's "&" reads like a "c", so headings borrow Cormorant's */
.amp { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 300; font-size: 1.05em; }
@media (max-width: 599px) {
  .door-strip { padding: 0 var(--gutter); gap: 0.4rem 0.8rem; }
  .door-strip li:not(:last-child)::after { margin-left: 0.8rem; }
  .scroll-cue { display: none; }
}
.platter__glove img { -webkit-mask-image: linear-gradient(transparent 0, #000 5%); mask-image: linear-gradient(transparent 0, #000 5%); }
@media (max-width: 799px) { .platter__glove { width: 34%; left: 45.2%; bottom: 55%; } }
@media (prefers-reduced-motion: reduce) { .plate-smoke { display: none; } }
.parlor-table__top { -webkit-mask: linear-gradient(transparent 0, #000 55%) no-repeat 0 0 / 100% 100%; mask: linear-gradient(transparent 0, #000 55%) no-repeat 0 0 / 100% 100%; }
.parlor-table__top::after { display: none; }
/* real smoke (Gemini video on black): screen blend removes the black */
.plate-smoke { position: absolute; left: 50%; bottom: 12%; width: min(150vw, 1500px); max-width: none; aspect-ratio: 16 / 9; transform: translateX(-50%); mix-blend-mode: screen; pointer-events: none; opacity: 0; object-fit: cover; transition: opacity 0.9s linear; }
.plate-smoke { -webkit-mask-image: linear-gradient(transparent, #000 24%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 24%, #000 86%, transparent); }
@media (max-width: 799px) { .plate-smoke { width: 280vw; bottom: 15%; } }
.pearls { position: absolute; z-index: 2; left: 6vw; bottom: -2vh; width: auto; height: 74vh; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45)); pointer-events: none; -webkit-mask-image: linear-gradient(#000 72%, transparent 88%); mask-image: linear-gradient(#000 72%, transparent 88%); }
@media (max-width: 799px) { .pearls { left: -3vw; height: 40vh; bottom: 6vh; } }

/* ---------- 8. Contact: the phone off the hook ---------- */
.phone-page { position: relative; overflow: hidden; background: #0c0705; }
.phone-page__anchor { position: absolute; left: 0; top: 0; }
.phone-stage { position: relative; left: 50%; width: max(100%, calc(100svh * 0.558)); aspect-ratio: 1116 / 2000; transform: translateX(-50%); }
.phone-stage__photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.phone-stage__head { position: absolute; z-index: 3; left: calc(50% - 44vw); top: 12%; }
.phone-stage__btns { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; margin-top: 1rem; }
.phone-stage__btns .btn { width: 7.4rem; padding-left: 0; padding-right: 0; background: rgba(20, 8, 8, 0.75); }
.phone-stage__title { margin: 0; font-family: var(--serif); text-transform: uppercase; color: var(--cream); font-size: clamp(2.2rem, 6vw, 5.6rem); line-height: 1; letter-spacing: 0.03em; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7); }
.phone-stage__phone { position: absolute; z-index: 2; left: 37.63%; top: 21.25%; width: 24.19%; height: auto; }
/* wide screens: the portrait photo runs at full width, trimmed top and bottom */
@media (min-aspect-ratio: 1/1) {
  .phone-page { aspect-ratio: 1116 / 1560; }
  .phone-stage { margin-top: -21.5%; }
  .phone-page__anchor { top: calc(33.3% - 50svh); }
  .phone-stage__head { left: 7%; top: 25%; }
  .phone-stage__btns { flex-direction: row; gap: 1rem; margin-top: 1.6rem; }
}
