/* RedCat style engine — shared base. Every style layers its own style.css on top.
   Token roles (12, set per colourway by each style):
   --bg --surface --ink --muted --primary --primary-hover --on-primary
   --secondary --price --s1 --s2 --focus                                   */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.rm { scroll-behavior: auto; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body, system-ui, sans-serif); line-height: 1.5; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 40px); }
section, header, footer { position: relative; }
main { overflow-x: clip; }

/* photo slots: owner photos replace the art */
.ph { position: relative; display: grid; place-items: center; background: var(--ph-bg, var(--surface)); overflow: hidden; }
.ph > .art { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0,0,0,.18)); }
.ph-tag { position: absolute; left: 10px; bottom: 10px; font: 600 10px/1 var(--f-body, sans-serif); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 99px; background: rgba(0,0,0,.35); color: #fff; opacity: .7; pointer-events: none; }
.deco { pointer-events: none; }
.art { overflow: visible; }

/* mobile sheet (shared mechanics; styles skin it) */
[data-sheet] { position: fixed; inset: 0; z-index: 90; visibility: hidden; opacity: 0; transition: opacity .35s ease, visibility 0s .35s; overflow-y: auto; }
[data-sheet].open { visibility: visible; opacity: 1; transition: opacity .35s ease; }
html.rm [data-sheet] { transition: none; }
.sheet-lock { overflow: hidden; }

/* accordion */
.acc-item .acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.65,0,.35,1); }
.acc-item.open .acc-panel { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: left; }
.acc-btn .acc-ico { flex: none; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.acc-item.open .acc-ico { transform: rotate(45deg); }

/* scroll-snap carousel */
.track { display: grid; grid-auto-flow: column; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }

/* marquee (CSS loop; engine pauses it off-screen) */
.mq { overflow: hidden; white-space: nowrap; }
.mq-track { display: inline-flex; width: max-content; animation: mq var(--mq-dur, 30s) linear infinite; animation-direction: var(--mq-dir, normal); }
.mq-group { display: inline-flex; align-items: center; flex: none; }
@keyframes mq { to { transform: translateX(-50%); } }

/* off-screen pause + reduced motion: loops stop */
.off, .off * { animation-play-state: paused !important; }
html.rm *, html.rm *::before, html.rm *::after { animation: none !important; transition-duration: .01ms !important; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(0,0,0,.82); padding: 24px; }
.lb[hidden] { display: none; }
.lb-fig { width: min(80vmin, 640px); aspect-ratio: 1; border-radius: 18px; overflow: hidden; }
.lb-fig .ph { width: 100%; height: 100%; }
.lb-cap { color: #fff; margin-top: 14px; text-align: center; font-weight: 600; }
.lb-close { position: absolute; top: 18px; right: 18px; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; }
.lb-close svg { width: 22px; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; }
.lb-nav svg { width: 20px; } .lb-prev { left: 18px; } .lb-next { right: 18px; }

/* forms */
.field { display: grid; gap: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 14px 16px; border: 2px solid var(--line, rgba(0,0,0,.15)); border-radius: var(--r-field, 12px); background: var(--field-bg, transparent); outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.form-note { font-size: 14px; margin-top: 10px; min-height: 1.4em; }

/* sample notice (honesty: Crumb & Co is a demo bakery) */
.sample-note { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .55; }

/* motion start states — only while motion is on and JS has not taken over.
   If the script fails, the safety net reveals everything at 2.6s. */
.motion [data-m]:not(.m-done) { opacity: 0; }
.motion [data-m="words"]:not(.m-done), .motion [data-m="chars"]:not(.m-done), .motion [data-m="draw"]:not(.m-done), .motion [data-m="burst"]:not(.m-done) { opacity: 1; }
.motion [data-m="burst"]:not(.m-done) .bit { opacity: 0; }
.motion:not(.js-ok) [data-m], .motion:not(.js-ok) [data-m] .bit { animation: m-safe 0s 2.6s forwards; }
@keyframes m-safe { to { opacity: 1; } }
.m-mask { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em .03em .02em; margin: -.06em -.03em -.02em; }
.m-unit { display: inline-block; will-change: transform; }
.m-crumb { position: absolute; border-radius: 50%; pointer-events: none; z-index: 5; }
[data-drag] { touch-action: none; cursor: grab; user-select: none; }
[data-drag].dragging { cursor: grabbing; }
[data-tilt] { transform-style: preserve-3d; will-change: transform; }
