/* base.css — 017 Crabstore demo, build P6 (27.09.2026). Design rules: ../DESIGN.md
   Palette (5 roles): paper · ink · cobalt · red (client action) · coral (client links). Fonts: Cormorant Garamond + Commissioner.
   Motion rule: only transform and opacity are animated (prompt P6); no transition on colour, size or clip. */

:root {
  --paper: #f4eee2;
  --paper-2: #ebe3d1;
  --ice: #ffffff;
  --ink: #16245e;
  --ink-2: #4a5683;
  --ink-3: rgba(22, 36, 94, .14);
  --cobalt: #2a4fbf;
  --sea: #0d1a45;
  --red: #db1b1b;
  --red-2: #ff4a4a;
  --coral: #ff8562;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Commissioner", "Segoe UI", system-ui, sans-serif;
  --out: cubic-bezier(.22, 1, .36, 1);
  --inout: cubic-bezier(.65, 0, .35, 1);
  --g: clamp(20px, 5.6vw, 80px);
  --w: 1440px;
  --hdr: 84px;
  --mq: 36px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }
* { font-feature-settings: "lnum" 1; }  /* Cormorant draws old-style digits under the `font` shorthand: «1 000р.» read as «1 ooop.» (agent info) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; color: var(--ink); background: var(--paper) url(../img/paper.webp) repeat;
  font: 400 17px/1.55 var(--sans); font-feature-settings: "lnum" 1;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--cobalt); color: #fff; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.serif { font-family: var(--serif); }
.t-hero { font: 500 clamp(56px, 7.1vw, 112px)/.93 var(--serif); letter-spacing: -.012em; margin: 0; }
.t-h2 { font: 500 clamp(42px, 4.6vw, 74px)/.98 var(--serif); letter-spacing: -.01em; margin: 0; }
.t-h3 { font: 500 clamp(28px, 2.4vw, 38px)/1.05 var(--serif); margin: 0; }
.t-cap { font: 600 13px/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
.t-capserif { font: 500 17px/1.2 var(--serif); letter-spacing: .24em; text-transform: uppercase; }
.t-promise { font: italic 400 clamp(21px, 1.7vw, 27px)/1.35 var(--serif); }
.t-lead { font: 400 19px/1.6 var(--sans); color: var(--ink-2); }
.t-small { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.price { font: 600 22px/1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { font: 400 13px var(--sans); color: var(--ink-2); margin-left: 4px; }
.rule { height: 1px; background: var(--ink); opacity: .9; border: 0; margin: 0; }
.rule--2 { height: 4px; background: none; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }

/* ---------- layout ---------- */
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 var(--g); }
.sec { position: relative; padding: clamp(80px, 9vw, 140px) 0; }
.sec--tight { padding: 64px 0; }
.sec--paper2 { background: var(--paper-2) url(../img/paper.webp) repeat; background-blend-mode: multiply; }
.sec--sea { background: var(--sea); color: #fff; }
.sec--cobalt { background: var(--cobalt); color: #fff; }
.pattern { position: absolute; inset: 0; pointer-events: none; background: url(../img/pattern.webp) repeat; background-size: 900px; opacity: .09; }
.sec--sea .pattern, .sec--cobalt .pattern { background-image: url(../img/pattern_w.webp); opacity: .06; }
.head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px 40px; margin-bottom: 48px; }
.head .t-cap { display: block; margin-bottom: 18px; }
.head .t-promise { margin: 14px 0 0; max-width: 34ch; color: var(--ink-2); }
.sec--sea .head .t-promise, .sec--cobalt .head .t-promise { color: rgba(255, 255, 255, .78); }

/* ---------- marquee (theos M3: 75 px/s, paused off screen) ---------- */
.mq { height: var(--mq); background: var(--ink); color: #fff; overflow: hidden; position: relative; z-index: 61; }
.mq__track { display: flex; width: max-content; height: 100%; align-items: center; will-change: transform; animation: mq var(--mqd, 40s) linear infinite; }
.mq.is-off .mq__track { animation-play-state: paused; }
.mq__item { font: italic 400 16px/1 var(--serif); letter-spacing: .02em; padding: 0 26px; white-space: nowrap; }
.mq__item::after { content: "◆"; font-style: normal; font-size: 9px; color: var(--coral); margin-left: 52px; vertical-align: 2px; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 60; height: var(--hdr); background: rgba(244, 238, 226, .94); backdrop-filter: blur(10px); }
.hdr::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink-3); }
.hdr__in { height: 100%; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; flex: none; }
.logo__mark { width: 52px; height: 40px; color: var(--ink); }
.logo__word { font: 600 21px/1 var(--serif); letter-spacing: .16em; }
.logo__word i { font-style: normal; color: var(--red); }
.nav { display: flex; gap: 4px; margin: 0 auto; }
.nav > a, .nav__cat > button { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 9px; font: 500 14px/1 var(--sans); letter-spacing: .03em; white-space: nowrap; }
.nav > a::after, .nav__cat > button::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--out); }
.nav > a:hover::after, .nav__cat > button:hover::after, .nav > a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav__cat svg { width: 10px; height: 10px; transition: transform .4s var(--out); }
.nav__cat.is-open svg { transform: rotate(180deg); }
.hdr__tools { display: flex; align-items: center; gap: 10px; flex: none; }
.srch { position: relative; display: flex; align-items: center; }
.srch input { width: 150px; height: 40px; border: 1px solid var(--ink-3); border-radius: 20px; background: rgba(255, 255, 255, .55); padding: 0 16px 0 38px; font-size: 14px; }
.srch input::placeholder { color: var(--ink-2); }
.srch svg { position: absolute; left: 13px; width: 16px; height: 16px; pointer-events: none; }
.wa { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; font: 600 14px/1 var(--sans); white-space: nowrap; }
.wa svg { width: 18px; height: 18px; color: #1f9e57; }
.cartpill { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 16px; border-radius: 22px; background: var(--ink); color: #fff; font: 600 14px/1 var(--sans); overflow: hidden; isolation: isolate; }
.cartpill::before { content: ""; position: absolute; inset: 0; background: var(--red); transform: translateY(101%); transition: transform .5s var(--out); z-index: -1; }
.cartpill:hover::before { transform: none; }
.cartpill svg { width: 18px; height: 18px; }
.cartpill.has-sum span { display: none; }  /* 4-digit sums kept the header wider than 1440 (agent cart, 27.09) */
.cartpill b { font-variant-numeric: tabular-nums; }
.cartpill.bump { animation: bump .5s var(--out); }
@keyframes bump { 40% { transform: scale(1.08); } }

/* mega menu */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper) url(../img/paper.webp); border-bottom: 1px solid var(--ink-3); box-shadow: 0 30px 60px -30px rgba(13, 26, 69, .35); opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .35s var(--out), transform .45s var(--out); }
.nav__cat.is-open .mega { opacity: 1; transform: none; pointer-events: auto; }
.mega__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; padding: 30px 0 34px; }
.mega a { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 14px 8px 16px; border-radius: 14px; position: relative; }
.mega a::before { content: ""; position: absolute; inset: 0; border-radius: 14px; background: var(--ice); opacity: 0; transform: scale(.94); transition: opacity .35s, transform .45s var(--out); z-index: -1; }
.mega a:hover::before { opacity: .7; transform: none; }
.mega img { height: 86px; width: auto; transition: transform .6s var(--out); }
.mega a:hover img { transform: translateY(-4px) rotate(-3deg); }
.mega b { font: 500 21px/1.1 var(--serif); }
.mega span { font-size: 13px; color: var(--ink-2); }
.mega__foot { display: flex; gap: 28px; justify-content: center; padding: 0 0 26px; font-size: 14px; }
.mega__foot a { display: inline; padding: 0; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 58px; padding: 0 30px; border-radius: 29px; font: 600 16px/1 var(--sans); letter-spacing: .01em; white-space: nowrap; overflow: hidden; isolation: isolate; background: var(--red); color: #fff; }
.btn::before { content: ""; position: absolute; inset: -1px; background: var(--ink); border-radius: inherit; transform: scale(0, 1); transform-origin: left; transition: transform .6s var(--out); z-index: -1; }
.btn:hover::before { transform: none; }
.btn__arr { width: 18px; height: 18px; transition: transform .5s var(--out); }
.btn:hover .btn__arr { transform: translateX(5px); }
.btn--ink { background: var(--ink); }
.btn--ink::before { background: var(--red); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: #fff; }
.btn--white { background: #fff; color: var(--ink); }
.btn--white::before { background: var(--coral); }
.btn--sm { height: 44px; padding: 0 20px; font-size: 14px; border-radius: 22px; }
.btn--wa { background: #1f9e57; }
.link { position: relative; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.link::after { content: ""; position: absolute; left: 0; right: 26px; bottom: -4px; height: 1px; background: currentColor; transform-origin: left; transition: transform .5s var(--out); }
.link:hover::after { transform: scaleX(.3); }
.link svg { width: 18px; height: 18px; transition: transform .5s var(--out); }
.link:hover svg { transform: translateX(5px); }
.coral { color: var(--coral); }

/* ---------- round tag (R01 dot -> capsule -> card) ---------- */
.dot { position: absolute; z-index: 3; width: 0; height: 0; }
.dot__btn { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--red), 0 8px 18px rgba(13, 26, 69, .35); display: grid; place-items: center; }
.dot__btn::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.dot__btn::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; animation: pulse 2.4s var(--out) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(2.3); opacity: 0; } }
.dot__card { position: absolute; left: 22px; top: -28px; min-width: 212px; padding: 12px 18px 13px; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 18px 40px -12px rgba(13, 26, 69, .45); transform-origin: 0 50%; transform: scale(.3); opacity: 0; transition: transform .45s var(--out), opacity .3s; pointer-events: none; }
.dot--left .dot__card { left: auto; right: 22px; transform-origin: 100% 50%; }
.dot__card b { display: block; font: 500 22px/1.05 var(--serif); }
.dot__card span { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 6px; font: 600 15px/1 var(--sans); }
.dot__card svg { width: 18px; height: 18px; color: var(--red); }
.dot.is-open .dot__card, .dot:hover .dot__card, .dot:focus-within .dot__card { transform: none; opacity: 1; pointer-events: auto; }
.dot--static .dot__card { transform: none; opacity: 1; pointer-events: auto; }

/* ---------- waves: sea-like joins instead of square ones (R11, R12) ---------- */
.wave { position: absolute; left: 0; right: 0; height: clamp(48px, 6vw, 96px); overflow: hidden; pointer-events: none; z-index: 2; color: var(--paper); }
.wave--top { top: 1px; transform: translateY(-99%); }  /* 1px overlap: no light seam on dark joins (agent cart) */
.wave--bot { bottom: 1px; transform: translateY(99%) scaleY(-1); }
.wave svg { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; }
.wave__a { animation: drift 22s linear infinite; }
.wave__b { animation: drift 34s linear infinite reverse; opacity: .45; }
@keyframes drift { to { transform: translateX(-50%); } }

/* ---------- product tile ---------- */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.tile { position: relative; display: flex; flex-direction: column; }
.tile__img { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; background: var(--paper-2); isolation: isolate; }
.tile__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--out), opacity .6s; }
.tile__img .alt { opacity: 0; }
.tile:hover .tile__img img { transform: scale(1.05); }
.tile:hover .tile__img .alt { opacity: 1; }
.stamp { position: absolute; z-index: 2; left: 14px; top: 14px; width: 58px; height: 58px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font: 700 12px/1 var(--sans); letter-spacing: .06em; transform: rotate(-12deg); box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 4px rgba(255, 255, 255, .7); }
.gift { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .92); color: var(--ink); font: 500 13px/1.25 var(--sans); transform: translateY(8px); opacity: 0; transition: transform .5s var(--out), opacity .4s; }
.gift img { width: 34px; height: auto; flex: none; }
.tile__img .gift img { position: static; inset: auto; width: 34px; height: auto; object-fit: contain; transform: none !important; opacity: 1 !important; }  /* the photo rule made the icon absolute (agents catalog, cart) */
.tile:hover .gift, .gift--on { transform: none; opacity: 1; }
.tile__body { padding: 16px 2px 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile__name { font: 500 23px/1.08 var(--serif); }
.tile__meta { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.sec--sea .tile__meta, .sec--cobalt .tile__meta { color: rgba(255, 255, 255, .72); }
.tile__buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; }
.add { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 44px; min-width: 44px; padding: 0 16px; border-radius: 22px; background: var(--red); color: #fff; font: 600 14px/1 var(--sans); overflow: hidden; isolation: isolate; }
.add::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateY(101%); transition: transform .5s var(--out); z-index: -1; }
.add:hover::before { transform: none; }
.sec--sea .add::before, .sec--cobalt .add::before { background: #fff; }
.sec--sea .add:hover, .sec--cobalt .add:hover { color: var(--ink); }
.add--wa { background: #1f9e57; }
.step { display: inline-flex; align-items: center; height: 44px; border-radius: 22px; box-shadow: inset 0 0 0 1.5px currentColor; }
.step button { width: 40px; height: 44px; font: 600 18px/1 var(--sans); }
.step b { min-width: 22px; text-align: center; font: 600 15px/1 var(--sans); }

/* ---------- misc ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--ink-3); font: 500 14px/1 var(--sans); background: rgba(255, 255, 255, .4); overflow: hidden; isolation: isolate; }
.chip::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateY(101%); transition: transform .45s var(--out); z-index: -1; }
.chip:hover::before, .chip.is-on::before { transform: none; }
.chip:hover, .chip.is-on { color: #fff; }
.acc { border-top: 1px solid var(--ink-3); }
.acc__q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; text-align: left; padding: 24px 0; font: 500 24px/1.2 var(--serif); }
.acc__q i { flex: none; width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ink-3); position: relative; transition: transform .45s var(--out); }
.acc__q i::before, .acc__q i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.acc__q i::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .45s var(--out); }
.acc.is-open .acc__q i { transform: rotate(180deg); }
.acc.is-open .acc__q i::after { transform: translate(-50%, -50%) rotate(0deg); }
.acc__a { display: none; padding: 0 60px 28px 0; color: var(--ink-2); }
.acc.is-open .acc__a { display: block; animation: accin .5s var(--out); }
@keyframes accin { from { opacity: 0; transform: translateY(-8px); } }
.acc__a p { margin: 0 0 10px; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translate(-50%, 220%); opacity: 0; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 20px; border-radius: 18px; background: var(--ink); color: #fff; font-size: 15px; box-shadow: 0 20px 50px -10px rgba(13, 26, 69, .6); transition: transform .6s var(--out), opacity .3s; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
body:has(.freebar.is-on) .toast { bottom: 128px; }  /* toast and free-delivery bar shared one spot (agent catalog) */
.toast a { color: var(--coral); font-weight: 600; }
.decor { position: absolute; pointer-events: none; z-index: 1; will-change: transform; }
.decor img { width: 100%; height: auto; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--ink-2); }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.crumbs span::before { content: "/"; margin-right: 10px; opacity: .5; }

/* ---------- inner page head (shared by the 8 templates) ---------- */
.phead { position: relative; padding: 56px 0 120px; overflow-x: clip; }
.phead .crumbs { margin-bottom: 28px; }
.phead__t { font: 500 clamp(52px, 5.8vw, 92px)/.94 var(--serif); letter-spacing: -.012em; margin: 0; max-width: 11em; }
.phead .t-promise { margin: 18px 0 0; max-width: 36ch; color: var(--ink-2); }
.phead__decor { position: absolute; right: var(--g); top: 30px; width: min(30vw, 380px); pointer-events: none; }
.phead .wave--bot { color: var(--paper); }

/* ---------- free delivery bar (2.B5, 5.B2) ---------- */
.freebar { position: fixed; z-index: 70; left: 50%; bottom: 22px; width: min(640px, calc(100% - 40px)); padding: 14px 20px 16px; border-radius: 20px; background: var(--ink); color: #fff; box-shadow: 0 24px 60px -18px rgba(13, 26, 69, .6); transform: translate(-50%, 160%); opacity: 0; transition: transform .7s var(--out), opacity .4s; }
.freebar.is-on { transform: translate(-50%, 0); opacity: 1; }
.freebar__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14.5px; }
.freebar__row a { color: var(--coral); font-weight: 600; white-space: nowrap; }
.freebar__track { margin-top: 10px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.freebar__fill { height: 100%; background: var(--coral); transform-origin: left; transform: scaleX(0); transition: transform .8s var(--out); }

/* ---------- footer ---------- */
.ftr { position: relative; background: var(--sea); color: #fff; padding: 110px 0 0; margin-top: 96px; overflow-x: clip; }
.ftr__big, .ftr .pattern { overflow: hidden; }
.ftr .wave { color: var(--sea); }
.ftr__grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 48px; }
.ftr h4 { margin: 0 0 18px; font: 600 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.ftr p, .ftr li { margin: 0 0 10px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .86); }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr a:hover { color: var(--coral); }
.ftr .logo__word { font-size: 26px; }
.flogo { position: relative; display: inline-grid; justify-items: center; width: 250px; }
.flogo__arc { width: 250px; height: auto; overflow: visible; }
.flogo__arc text { font: 500 34px var(--serif); letter-spacing: .22em; fill: #fff; }
.flogo__mark { width: 150px; height: auto; margin-top: -54px; }
.ftr__slogan { font: italic 400 22px/1.35 var(--serif); color: #fff; margin-top: 18px; max-width: 30ch; }
.ftr__big { position: relative; z-index: 1; margin: 70px 0 -1.95vw; font: 500 15.6vw/.8 var(--serif);  /* 17.6vw measured 1559 px of text in a 1440 box: «CRAB:STOR» (r1) */ letter-spacing: .02em; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .35); white-space: nowrap; text-align: center; will-change: transform; user-select: none; }
.ftr__bar { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 20px; padding: 22px var(--g) 26px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 13px; color: rgba(255, 255, 255, .6); }
/* the little crab walking the crest of the footer wave (js/walker.js moves it with transform; Operator 27.09) */
.ftr__walk { position: absolute; left: 0; top: 0; z-index: 3; width: clamp(170px, 12vw, 300px); aspect-ratio: 1.36; pointer-events: none; will-change: transform; transform: translate3d(-400px, -200px, 0); }
.page-cat--dark .ftr .wave__b { color: var(--cobalt); }   /* a dark page runs into the footer: the upper wave shows, the crab has a line to walk */
.ftr__walk canvas { width: 100% !important; height: 100% !important; opacity: 0; transition: opacity .8s var(--out); }
.ftr__walk.is-3d canvas { opacity: 1; }
.ftr__gulls { position: absolute; left: 40%; top: 18px; width: 150px; opacity: .85; filter: brightness(0) invert(1); z-index: 1; }

/* ---------- page curtain (transition between pages) ---------- */
.curtain { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.curtain__sheet { position: absolute; left: 0; right: 0; top: -12vh; height: 124vh; background: var(--sea); transform: translateY(-101%); }
.curtain__sheet svg { position: absolute; left: 0; width: 100%; height: 12vh; color: var(--sea); }
.curtain__sheet svg.t { top: 0; transform: translateY(-99%) scaleY(-1); }
.curtain__sheet svg.b { bottom: 0; transform: translateY(99%); }
.curtain__mark { position: absolute; left: 50%; top: 50%; width: 120px; transform: translate(-50%, -50%); opacity: 0; }

/* reveal defaults (JS sets the start state; without JS everything is visible) */
.js [data-rv], .js [data-rv-img] { opacity: 0; }
.shot [data-rv], .shot [data-rv-img] { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-rv], .js [data-rv-img] { opacity: 1; }
}
