:root {
  --bg: #070912;            /* night navy, darker than the fabric so garments stand out */
  --bg-2: #0B0E1C;
  --floor: #141936;         /* the pool of light under each garment */
  --line: rgba(236, 234, 229, .12);
  --line-2: rgba(236, 234, 229, .22);
  --text: #ECEAE5;          /* ivory */
  --muted: #8D93A7;
  --navy: #24233C;          /* fabric */
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--sans);
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 1px solid var(--text); outline-offset: 3px; }
[hidden] { display: none !important; }

/* film grain overlay, same feel as the video */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0) } 33% { transform: translate(-3%, 2%) } 66% { transform: translate(2%, -3%) } 100% { transform: translate(0, 0) } }

/* logo: vector wordmark via mask so it is always crisp white */
.wordmark {
  display: block; width: 104px; aspect-ratio: 571.75 / 110.75; background: currentColor;
  -webkit-mask: url(assets/fella-wordmark.svg) center / contain no-repeat;
          mask: url(assets/fella-wordmark.svg) center / contain no-repeat;
}
.wordmark--sm { width: 72px; }
.monogram {
  display: block; width: 64px; aspect-ratio: 144 / 124.5; background: currentColor; margin: 0 auto 28px;
  -webkit-mask: url(assets/fella-monogram.svg) center / contain no-repeat;
          mask: url(assets/fella-monogram.svg) center / contain no-repeat;
}
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }
.ico--line { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .2s var(--ease);
  touch-action: manipulation;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--text); color: var(--bg); }
.btn--ghost { border-color: var(--line-2); background: none; }
@media (hover: hover) {
  .btn--primary:hover { background: #fff; }
  .btn--ghost:hover { border-color: var(--text); }
}
.btn--lg { min-height: 58px; padding: 0 32px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.is-done { background: var(--navy); color: var(--text); }
.badge { padding: 3px 8px; border-radius: 999px; background: var(--line); font-size: 10px; letter-spacing: .12em; }
.linklike { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.linklike:hover { text-decoration-color: currentColor; }

/* ---------- header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: calc(var(--header-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding-inline: var(--gutter);
  transition: background .4s var(--ease), border-color .4s; border-bottom: 1px solid transparent;
}
.header.is-solid { background: rgba(7, 9, 18, .78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: var(--line); }
.header__logo { color: var(--text); justify-self: start; }
.header__nav { display: flex; gap: 32px; font-size: 13px; letter-spacing: .04em; }
.header__nav a, .header__nav .linklike { text-decoration: none; color: var(--muted); transition: color .25s; }
.header__nav a:hover, .header__nav .linklike:hover { color: var(--text); }
.header__actions { display: flex; gap: 8px; justify-self: end; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(7, 9, 18, .3);
  display: grid; place-items: center; color: var(--text); transition: border-color .25s; touch-action: manipulation;
}
.icon-btn:hover { border-color: var(--text); }
.cart-btn__count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--text); color: var(--bg); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.cart-btn.is-bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.15); } }

/* ---------- hero ---------- */
/* 16:9 film under the header, never taller than 78vh; cover on desktop, contain on phones */
.hero { position: relative; overflow: hidden; background: var(--bg); margin-top: calc(var(--header-h) + env(safe-area-inset-top)); }
.hero__video { width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; object-fit: cover; background: var(--bg); }
.hero__end { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg); }
.hero__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 80%, var(--bg) 100%); }
/* when the device will not autoplay video (iPhone in Low Power Mode, a browser setting), the film is told with its two stills:
   the hood melts into the logo with a slow settle — so every visit still opens with a movement */
/* the film drawn from still frames when the video may not autoplay — sits exactly over the video box */
.hero__frames { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hero.is-still-film .hero__end { animation: still-film 2.6s cubic-bezier(.45, 0, .2, 1) both; }
@keyframes still-film { from { opacity: 0; transform: scale(1.06); } 35% { opacity: 0; } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .hero__video, .hero__end { object-fit: contain; }
  .hero__scroll { display: none; }
}
/* phones upright: the 9:16 cut fills the screen under the header */
.hero--vertical .hero__video { aspect-ratio: 9 / 16; max-height: calc(100svh - var(--header-h) - env(safe-area-inset-top)); object-fit: cover; }
.hero--vertical .hero__end { object-fit: cover; }
.hero--vertical .hero__scroll { display: block; }

.hero__scroll { position: absolute; left: 50%; bottom: clamp(20px, 4vh, 40px); transform: translateX(-50%); padding: 12px; }
.hero__scroll i { display: block; position: relative; width: 1px; height: 48px; background: var(--line-2); overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--text); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

/* ---------- product ---------- */
.product {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  max-width: 1360px; margin: 0 auto; padding: clamp(72px, 10vw, 140px) var(--gutter);
  scroll-margin-top: 0;
}
.product + .product { border-top: 1px solid var(--line); }
/* mirrored layout keeps the SAME column widths for the viewer — both garments render at the same size */
.product--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.product--flip .product__media { order: 2; }

.viewer {
  position: relative; aspect-ratio: 4 / 5; width: min(100%, calc((100svh - var(--header-h) - 150px) * .8)); margin: 0 auto;
  /* the pool of light fully dissolves into the page before the box edge — no visible frame */
  background: radial-gradient(ellipse 68% 54% at 50% 50%, var(--floor) 0%, rgba(20, 25, 54, .35) 46%, var(--bg) 72%);
  /* no clipping: the halo around the garment fades out into the page instead of stopping at a straight edge */
}
/* backlight: a soft ivory pool behind the upper body, like a studio light behind the garment */
.viewer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 58% 46% at 50% 40%, rgba(236, 234, 229, .17) 0%, rgba(236, 234, 229, .06) 50%, rgba(236, 234, 229, 0) 78%);
}
/* soft shadow the garment stands on */
.viewer::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 5%; height: 3%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .6), transparent 70%);
}
.spin { position: absolute; inset: 0; z-index: 1; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline-offset: -1px; }
.spin.is-drag { cursor: grabbing; }
/* one canvas, one frame at a time: hard cuts, never two angles on screen */
.spin canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  /* faint halo that follows the silhouette */
  filter: drop-shadow(0 0 min(40px, 7vw) rgba(236, 234, 229, .18));
}
.spin__load { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 1px solid var(--line); border-top-color: var(--text); border-radius: 50%; animation: spin-load .9s linear infinite; }
.spin.is-ready .spin__load { display: none; }
@keyframes spin-load { to { transform: rotate(360deg); } }
.viewer__detail { z-index: 2; }
.viewer__detail { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s .45s; }
.viewer__detail img {
  width: 100%; height: 100%; object-fit: cover;
  /* close-ups fade into the stage at the sides and bottom instead of ending in a hard frame */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, #000 78%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, #000 78%, transparent);
          mask-composite: intersect;
}
.viewer[data-mode="zip"] [data-detail="zip"], .viewer[data-mode="hood"] [data-detail="hood"] { opacity: 1; visibility: visible; transition: opacity .45s var(--ease); }
/* the 360° garment steps away while a close-up is open, so nothing shows through its soft edges */
.spin { transition: opacity .45s var(--ease), visibility 0s; }
.viewer:not([data-mode="spin"]) .spin { opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s .45s; }
.viewer:not([data-mode="spin"])::after { opacity: 0; }
.viewer::after { transition: opacity .45s var(--ease); }

.viewer__nav { display: flex; align-items: center; justify-content: center; gap: 14px; width: min(100%, calc((100svh - var(--header-h) - 150px) * .8)); margin: 18px auto 0; transition: opacity .3s; }
.product__media.is-detail .viewer__nav { opacity: .25; pointer-events: none; }
.round { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: none; font-size: 20px; line-height: 1; display: grid; place-items: center; padding: 0 0 3px; transition: border-color .25s; touch-action: manipulation; }
.round:hover { border-color: var(--text); }
/* angle slider: 72 ticks, every 9th long; the needle glides to the current angle */
.ticks { position: relative; flex: 1 1 auto; height: 28px; cursor: ew-resize; touch-action: none; outline-offset: 4px; }
.ticks i { position: absolute; top: 11px; width: 1px; height: 6px; background: var(--line-2); }
.ticks i.major { top: 8px; height: 12px; background: var(--muted); }
.ticks b { position: absolute; top: 5px; left: 0; width: 2px; height: 18px; background: var(--text); transform: translateX(-1px); transition: left .28s var(--ease); }
.ticks b.is-jump { transition: none; }
.deg { min-width: 4ch; font-size: 12px; font-weight: 500; letter-spacing: .06em; font-variant-numeric: tabular-nums; text-align: right; }
.viewer__hint { margin: 12px auto 0; max-width: 46ch; min-height: 1.6em; text-align: center; font-size: 13px; color: var(--muted); }

.tabs { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.tabs--left { justify-content: flex-start; margin: 14px 0 12px; }
.tabs button { background: none; border: 1px solid transparent; border-radius: 999px; padding: 8px 16px; font-size: 12px; letter-spacing: .08em; color: var(--muted); transition: color .25s, border-color .25s; touch-action: manipulation; }
.tabs button[aria-selected="true"] { color: var(--text); border-color: var(--line-2); }

.product__title { margin: 0; font: 400 clamp(44px, 5vw, 68px)/1 var(--serif); }
.product__price { margin: 14px 0 26px; font-size: 18px; letter-spacing: .04em; }
.product__text { margin: 0 0 22px; max-width: 42ch; color: var(--muted); }
.product__color { display: flex; align-items: center; gap: 10px; margin: 0 0 26px; font-size: 13px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--navy); box-shadow: 0 0 0 1px var(--line-2), 0 0 0 3px var(--bg), 0 0 0 4px var(--line-2); }

.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size {
  min-width: 52px; height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: none;
  font-size: 13px; letter-spacing: .06em; transition: background .2s, color .2s, border-color .2s; touch-action: manipulation;
}
@media (hover: hover) { .size:hover { border-color: var(--text); } }
.size[aria-checked="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.sizes.is-shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px) } 75% { transform: translateX(4px) } }
.sizes__chart { margin-top: 14px; font-size: 13px; color: var(--muted); }
.product__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.product__actions .btn { flex: 1 1 200px; }
.more { margin-top: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.more summary { display: flex; justify-content: space-between; align-items: center; min-height: 50px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ""; width: 8px; height: 8px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease); }
.more[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 14px; font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.care { margin: 0 0 18px; font-size: 13px; color: var(--muted); max-width: 46ch; }

/* ---------- contact ---------- */
.contact { text-align: center; padding: clamp(96px, 14vw, 180px) var(--gutter); border-top: 1px solid var(--line); background: radial-gradient(60% 70% at 50% 40%, #171922 0%, var(--bg) 70%); }
.contact__title { margin: 0; font: 400 clamp(44px, 6vw, 80px)/1 var(--serif); }
.contact__text { margin: 18px auto 40px; max-width: 40ch; color: var(--muted); }
.contact__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

.footer { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 32px; padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer__brand { display: flex; align-items: center; gap: 16px; }
.footer__req { margin: 0; font-size: 11px; line-height: 1.7; color: var(--muted); opacity: .75; }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__links .linklike { font-size: 12px; color: var(--muted); }
.footer__links .linklike:hover { color: var(--text); }
.info { font-size: 14px; color: var(--muted); }
.info h4 { margin: 18px 0 6px; color: var(--text); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.info p { margin: 0 0 10px; }

/* ---------- dialogs ---------- */
.sheet {
  width: min(560px, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 18px;
  background: var(--bg-2); color: var(--text); overflow: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(5, 6, 8, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open] { animation: fade-up .35s var(--ease); }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }
.sheet__inner { position: relative; padding: 28px; }
.sheet__close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: none; font-size: 20px; line-height: 1; touch-action: manipulation; }
.sheet h3 { margin: 0 0 8px; padding-right: 48px; font: 400 34px/1.1 var(--serif); }
.sheet__total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 20px; border-top: 1px solid var(--line); }
.sheet__total strong { font-weight: 500; font-size: 20px; }
.sheet__note { margin: 14px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* cart: side drawer on desktop */
.sheet--side {
  margin: 0 0 0 auto; height: 100%; max-height: none; width: min(440px, 100%); border-radius: 0; border-width: 0 0 0 1px;
}
.sheet--side[open] { animation: slide-in .38s var(--ease); }
@keyframes slide-in { from { transform: translateX(100%); } }
.sheet--side .sheet__inner { min-height: 100%; display: flex; flex-direction: column; padding-top: calc(28px + env(safe-area-inset-top)); }
.cart { list-style: none; margin: 18px 0 0; padding: 0; flex: 1; }
.cart__item { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); align-items: center; }
.cart__thumb { width: 76px; aspect-ratio: 4 / 5; object-fit: contain; border-radius: 8px; background: radial-gradient(ellipse at 50% 50%, var(--floor), var(--bg) 80%); }
.cart__name { margin: 0; font-size: 15px; }
.cart__meta { margin: 2px 0 10px; font-size: 12px; color: var(--muted); }
.cart__price { margin: 0; font-size: 14px; align-self: start; white-space: nowrap; }
.cart__remove { background: none; border: 0; padding: 4px 0; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; justify-self: end; align-self: end; }
.qty { display: inline-flex; align-items: center; gap: 2px; }
.qty button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: none; font-size: 16px; line-height: 1; touch-action: manipulation; }
.qty button:disabled { opacity: .35; cursor: default; }
.qty output { min-width: 28px; text-align: center; font-size: 14px; }
.cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--muted); text-align: center; }
.cart-empty p { margin: 0; }
.cart-foot { margin-top: auto; padding-top: 8px; padding-bottom: env(safe-area-inset-bottom); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* size advisor: height + weight → size, inside the size chart */
.fit { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.fit__title { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.fit__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fit__field { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.fit__field input {
  width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 12px; background: none; color: var(--text);
  font: 400 16px var(--sans); -moz-appearance: textfield; appearance: textfield; transition: border-color .25s;
}
.fit__field input::-webkit-outer-spin-button, .fit__field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fit__field input:focus { outline: none; border-color: var(--text); }
.fit__field input::placeholder { color: var(--muted); opacity: .5; }
.fit__answer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; margin-top: 14px; }
.fit__result { margin: 0; font-size: 14px; color: var(--muted); }
.fit__result strong { color: var(--text); font-weight: 600; font-size: 18px; letter-spacing: .04em; }
.fit__result small { display: block; margin-top: 2px; font-size: 12px; }
.fit__pick { min-height: 44px; padding: 0 20px; }
.chart { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.chart th, .chart td { padding: 12px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.chart th { font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chart td:first-child, .chart th:first-child { text-align: left; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 120; transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 20px; min-height: 48px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 13px; opacity: 0; pointer-events: none; white-space: nowrap;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast:not(:has(#toastAction:not([hidden]))) { padding-right: 20px; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; border-radius: 999px; background: var(--bg); color: var(--text); padding: 8px 14px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- film logo → header ---------- */
/* sits in document coordinates (outside the clipped hero) so it can travel up into the header */
.hero__mark {
  position: absolute; left: 0; top: 0; z-index: 51; display: block; height: auto; color: var(--text); fill: currentColor;
  transform-origin: 0 0; pointer-events: none; opacity: 0; visibility: hidden; will-change: transform;
}
.hero__mark.is-on { opacity: 1; visibility: visible; }
.header__logo .wordmark.is-away { opacity: 0; }
/* The flight tied to the page scroll (Chrome, Edge, Safari 26+): the browser moves it together with the scroll,
   never a frame behind. app.js measures the path into --mark-*; other browsers get the same path from app.js. */
html.mark-sda .hero__mark.is-live {
  visibility: visible;
  animation: mark-fly cubic-bezier(.65, 0, .35, 1) both, mark-swap linear both;
  animation-timeline: scroll(root), scroll(root);
  animation-range: 0 var(--mark-span, 500px), 0 var(--mark-span, 500px);
}
@keyframes mark-fly {
  from { transform: translate3d(var(--mark-x0), var(--mark-y0), 0) scale(1); }
  to { transform: translate3d(var(--mark-x1), var(--mark-y1), 0) scale(var(--mark-k)); }
}
/* at the very end the flying logo hands over to the header logo, which stays put from there on */
@keyframes mark-swap { 0%, 99.8% { opacity: 1; } 100% { opacity: 0; } }
html.mark-sda .header__logo .wordmark {
  animation: logo-swap linear both;
  animation-timeline: scroll(root);
  animation-range: 0 var(--mark-span, 500px);
}
@keyframes logo-swap { 0%, 99.8% { opacity: 0; } 100% { opacity: 1; } }
/* the film's own frame (with its logo) fades out in the first quarter of the flight, so the logo is never doubled */
html.mark-sda .hero.is-ended .hero__video, html.mark-sda .hero.is-ended .hero__end {
  animation: film-fade linear both;
  animation-timeline: scroll(root);
  animation-range: 0 calc(var(--mark-span, 500px) * .25);
}
@keyframes film-fade { to { opacity: 0; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .header { grid-template-columns: 1fr auto; }
  .header__nav { display: none; }
  .product, .product--flip { grid-template-columns: 1fr; gap: 24px; padding-top: 56px; padding-bottom: 64px; }
  .product--flip .product__media { order: 0; }
  .viewer, .viewer__nav { width: min(100%, calc(66svh * .8)); }
  .product__title { font-size: 46px; }
  .product__price { margin: 10px 0 18px; }
  .product__actions { margin-top: 26px; }
  .product__actions .btn { flex-basis: 100%; }
  /* dialogs become bottom sheets */
  .sheet { margin: auto auto 0; width: 100%; max-width: none; border-radius: 20px 20px 0 0; border-width: 1px 0 0; max-height: 90svh; }
  .sheet[open] { animation: sheet-up .35s var(--ease); }
  .sheet--side { height: fit-content; max-height: 90svh; }
  .sheet--side[open] { animation: sheet-up .35s var(--ease); }
  .sheet--side .sheet__inner { padding-top: 28px; min-height: 0; }
  .cart { flex: none; }
  .cart-empty { padding: 40px 0 16px; }
  .sheet__inner { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  @keyframes sheet-up { from { transform: translateY(100%); } }
}
@media (max-width: 600px) {
  .contact__actions { flex-direction: column; align-items: stretch; }
  .chart { font-size: 13px; }
  .chart th, .chart td { padding: 11px 6px; }
  .chart thead th { white-space: normal; font-size: 10px; letter-spacing: .08em; vertical-align: bottom; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .hero__scroll i::after { animation: none; }
  .ticks b { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .sheet[open], .sheet--side[open] { animation: none; }
}
