/* ==========================================================================
   Rose tattoo (demo) - main.css
   Built from templates/premium. Design plan: ../design.md

   Palette (from the tattoo bench, not from a template):
     paper    #F3F1F4  thermal transfer paper, page background (cool, not cream)
     ink      #1A1523  tattoo ink with a violet undertone: text, lines, dark sections
     stencil  #5B3EC8  stencil-transfer violet: links, focus, the stencil layer
     rose     #A8163A  the studio's name: the needle tip and hover states only
     skin     #EBDFD8  alternate section background (gallery)
     lilac    #BBAEF2  accent on ink backgrounds only
   Type: Bellefair (hairline Hebrew/Latin display, reads like a fine-line needle),
         Assistant (Hebrew text).
   One bold moment: the hero rose is "tattooed" over its stencil as you scroll.

   CONTRAST (WCAG AA, checked): ink/paper 15.9:1, ink-soft/paper 8.4:1,
   stencil/paper 6.3:1, rose/paper 6.6:1, ink/skin 13.7:1, ink-soft/skin 7.2:1,
   stencil/skin 5.4:1, paper/ink 15.9:1, lilac/ink 8.9:1, mist/ink 8.7:1,
   white/rose 7.4:1, field border/paper 5.1:1.
   ========================================================================== */

:root {
  --paper: #F3F1F4;
  --paper-2: #E9E5EC;
  --ink: #1A1523;
  --ink-soft: #4A4452;
  --stencil: #5B3EC8;
  --stencil-deep: #46309E;
  --stencil-tint: #E4DDF7;
  --rose: #A8163A;
  --skin: #EBDFD8;
  --lilac: #BBAEF2;
  --mist: #B9B2C4;
  --line: #CFC9D6;
  --line-dark: #3A3346;
  --field-border: #6A6373;
  --white: #FFFFFF;
  --error: #A8163A;
  --focus: var(--stencil);

  --font-display: "Bellefair", "David", "Times New Roman", serif;
  --font-text: "Assistant", "Arial", sans-serif;

  --step--1: clamp(0.9rem, 0.87rem + 0.1vw, 0.95rem);
  --step-0: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.35rem + 1vw, 2.25rem);
  --step-3: clamp(2.8rem, 1.8rem + 4.2vw, 5.5rem);
  --step-4: clamp(3.4rem, 1.5rem + 7vw, 8.5rem);

  --gutter: clamp(1rem, 0.5rem + 3vw, 3rem);
  --header-h: 4rem;
  --radius-pill: 999px;
  --radius-field: 4px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.7;
}

img,
svg { display: block; max-width: 100%; }

p { margin: 0 0 1em; }

a {
  color: var(--stencil);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }

[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

.container {
  width: min(100% - 2 * var(--gutter), 80rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -10rem;
  inset-inline-start: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-field);
  text-decoration: none;
  font-weight: 700;
  --focus: var(--lilac);
}
.skip-link:focus { top: 1rem; }

/* Inline placeholder for data the business has not published yet. */
.ph {
  padding: 0.05em 0.35em;
  border-radius: 3px;
  background: var(--stencil-tint);
  color: var(--ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Demo banner (top + footer) ---------- */
.demo-banner {
  --focus: var(--lilac);
  margin: 0;
  padding: 0.55rem var(--gutter);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--step--1);
  line-height: 1.5;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.7rem 1.6rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font: 600 var(--step-0) / 1.2 var(--font-text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn svg { width: 1.2rem; height: 1.2rem; flex: none; }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--rose); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); border-color: currentColor; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--small { min-height: 2.5rem; padding: 0.45rem 1.1rem; font-size: var(--step--1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  min-height: var(--header-h);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav { margin-inline-start: auto; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__list a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.5rem;
}
.site-nav__list a:not(.btn):hover { text-decoration: underline; }

.nav-toggle,
.motion-toggle {
  display: none; /* needs JS: shown only under .js */
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font: 600 var(--step--1) / 1.2 var(--font-text);
  cursor: pointer;
}
.nav-toggle__icon {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.motion-toggle__icon { width: 1rem; height: 1rem; fill: currentColor; }

.js .motion-toggle { display: inline-flex; }
.motion-toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.motion-toggle[aria-disabled="true"] { cursor: not-allowed; }

@media (max-width: 959.98px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav__list {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav__list.is-open { display: flex; }
  .js .site-nav__list a:not(.btn) {
    display: block;
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--line);
    font-size: var(--step-1);
  }
  .js .site-nav__cta { padding-top: 1rem; }
  .js .site-nav__cta .btn { width: 100%; min-height: 3rem; font-size: var(--step-0); }
}

@media (max-width: 479.98px) {
  .wordmark { font-size: 1.7rem; }
  .nav-toggle span,
  .motion-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ---------- Hero / stage (static by default) ---------- */
.stage {
  position: relative;
  overflow: hidden;
  overflow: clip;
  padding-block: clamp(2rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4rem);
}

.stage__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.stage__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-4);
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.stage__line { display: block; }

.stage__lead {
  max-width: 40ch;
  margin-bottom: 1.75rem;
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
}

.stage__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.stage__art {
  position: relative;
  justify-self: center;
  width: min(100%, 26rem);
}

.rose {
  width: 100%;
  height: auto;
  overflow: visible;
}
.rose path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rose-ink path { stroke: var(--ink); stroke-width: 1.5; }
.rose-ink .r-vein,
.rose-ink .r-lip { stroke-width: 1.1; }
.rose-stencil { opacity: 0.5; transform: translate(6px, 5px); }
.rose-stencil path { stroke: var(--stencil); stroke-width: 1.5; }
.needle { display: none; }

/* Hidden only while motion.js is about to take over (class set by boot.js,
   removed by motion.js or by a 2.5s failsafe). Without JS the rose is complete. */
.intro-pending .rose-ink { visibility: hidden; }

.stage__hint { display: none; }

/* Process steps: a real sequence, so the numbers carry meaning. */
.steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  counter-reset: step;
}
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: 0.75rem;
}
.step::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--stencil);
}
.step__name { margin: 0; font-size: var(--step-0); font-weight: 700; line-height: 1.4; }
.step__desc { margin: 0; font-size: var(--step--1); color: var(--ink-soft); line-height: 1.55; }

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

@media (min-width: 960px) {
  .stage__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas:
      "text  art"
      "steps art";
    align-items: start;
    column-gap: clamp(2rem, 4vw, 4.5rem);
  }
  .stage__text { grid-area: text; }
  .steps { grid-area: steps; }
  .stage__art { grid-area: art; align-self: center; width: min(100%, 30rem); }
}

/* ---------- Stage: motion on (classes added by js/motion.js) ---------- */
.stage.is-staged .needle { display: block; }
.stage.is-staged .needle__tip { fill: var(--rose); }
.stage.is-staged .needle__ring { fill: none; stroke: var(--rose); stroke-width: 1; opacity: 0.6; }
.stage.is-staged .rose-stencil { opacity: 0.8; transform: none; }
.stage.is-staged .rose-stencil path { stroke-width: 2.6; }

.stage.is-staged .stage__hint {
  display: block;
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
  text-align: center;
  transition: opacity 0.3s ease;
}
.stage.is-staged .stage__hint.is-gone { opacity: 0; }

.stage.is-staged .step { transition: opacity 0.3s ease; }
.stage.is-staged .step::before { color: var(--ink-soft); transition: color 0.3s ease; }
.stage.is-staged .step.is-active::before { color: var(--stencil); }
.stage.is-staged .step.is-active .step__name {
  text-decoration: underline;
  text-decoration-color: var(--stencil);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

/* Desktop: the whole hero pins while the rose is inked. */
.stage.is-pinned {
  display: flex;
  align-items: center;
  height: calc(100vh - var(--hh, 4rem));
  height: calc(100svh - var(--hh, 4rem));
  padding-block: clamp(1rem, 3vh, 2.5rem);
}
.stage.is-pinned .stage__grid { width: min(100% - 2 * var(--gutter), 80rem); }
.stage.is-pinned .stage__title { font-size: min(var(--step-4), 12.5vh); }
.stage.is-pinned .stage__art {
  width: auto;
  height: calc(100svh - var(--hh, 4rem) - 4rem);
  max-height: 46rem;
  aspect-ratio: 440 / 640;
  padding-bottom: 2rem;
}
.stage.is-pinned .rose { width: auto; height: 100%; margin-inline: auto; }

/* ---------- Generic sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 8rem); }

.section__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1;
}

.section__intro { max-width: 46ch; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.6; }

/* Note addressed to the business owner (demo only). */
.demo-note {
  max-width: 60ch;
  margin: 0;
  padding: 0.9rem 1.1rem;
  border: 1.5px dashed var(--stencil);
  border-radius: var(--radius-field);
  color: var(--ink);
  font-size: var(--step--1);
}
.demo-note strong { color: var(--stencil-deep); }

/* ---------- Services: a flash sheet ---------- */
.flash__head { display: grid; gap: 0.5rem 3rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }

.sheet {
  position: relative;
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
  border-inline-start: 1px solid var(--ink);
}
/* Crop marks at the sheet's outer corners, like a printed flash sheet. */
.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 0 solid var(--stencil);
  pointer-events: none;
}
.sheet::before { top: -0.75rem; inset-inline-start: -0.75rem; border-top-width: 1.5px; border-inline-start-width: 1.5px; }
.sheet::after { bottom: -0.75rem; inset-inline-end: -0.75rem; border-bottom-width: 1.5px; border-inline-end-width: 1.5px; }

.sheet__cell {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--ink);
  border-inline-end: 1px solid var(--ink);
}
.sheet__art { width: 100%; height: auto; }
.sheet__art .m-ink { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sheet__art .m-stencil { fill: none; stroke: var(--stencil); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sheet__art .m-old { fill: none; stroke: var(--mist); stroke-width: 2.4; stroke-dasharray: 3 6; stroke-linecap: round; }
.sheet__art .m-dot { fill: var(--ink); }
.sheet__name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.1;
}
.sheet__cell p { margin: 0; color: var(--ink-soft); }

@media (min-width: 560px) {
  .sheet__cell { grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.25rem; }
}
@media (min-width: 800px) {
  .sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .flash__head { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: end; }
  .flash__head .section__intro { margin: 0; }
}

/* ---------- Gallery (placeholders until the studio's own photos) ---------- */
.gallery { background: var(--skin); }
.gallery__head { display: grid; gap: 1.25rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

.frames {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: clamp(8.5rem, 30vw, 12rem);
  gap: clamp(0.6rem, 1.5vw, 1.1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.frame {
  position: relative;
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1.5px dashed var(--stencil);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(135deg, transparent 0 11px, rgba(91, 62, 200, 0.07) 11px 12px);
  color: var(--ink-soft);
  font-size: var(--step--1);
  text-align: center;
}
.frame--tall { grid-row: span 2; }
.frame--wide,
.frame--mix { grid-column: span 2; }

@media (min-width: 800px) {
  .frames { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(10rem, 14vw, 13rem); }
  .frame--mix { grid-column: auto; grid-row: span 2; }
  .gallery__head { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: end; gap: 3rem; }
  .gallery__head .section__intro { margin: 0 0 1rem; }
}

/* ---------- About the artist ---------- */
.artist__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.artist__photo { aspect-ratio: 3 / 4; width: 100%; max-width: 22rem; }
.artist__text p { max-width: 46ch; }
.pull {
  margin: 2rem 0 0;
  padding-inline-start: 1.25rem;
  border-inline-start: 2px solid var(--stencil);
}
.pull blockquote,
.pull blockquote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
}
.pull figcaption { margin-top: 0.6rem; font-size: var(--step--1); color: var(--ink-soft); }

@media (min-width: 900px) {
  .artist__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); align-items: center; }
}

/* ---------- Reviews (ink section) ---------- */
.reviews {
  --focus: var(--lilac);
  background: var(--ink);
  color: var(--paper);
}
.reviews a { color: var(--lilac); }
.reviews__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.review { margin: 0; }
.review blockquote { margin: 0; }
.review--main blockquote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.35;
}
.review--second blockquote p { margin: 0; font-size: var(--step-1); line-height: 1.5; }
.review figcaption { margin-top: 1rem; font-size: var(--step--1); color: var(--mist); }
.rating { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--line-dark); }
.rating__stars { display: flex; gap: 0.2rem; }
.rating__stars svg { width: 1.1rem; height: 1.1rem; fill: var(--lilac); }

@media (min-width: 900px) {
  .reviews__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: end; }
  .rating { grid-column: 1 / -1; }
}

/* ---------- Visit ---------- */
.visit__grid { display: grid; gap: 2.5rem; }
.visit__blocks { display: grid; gap: 2rem 3rem; align-content: start; }
.visit__block h3 { margin: 0 0 0.5rem; font-size: var(--step-1); line-height: 1.3; }
.visit__block p { margin: 0; color: var(--ink-soft); }
.visit__block p + p { margin-top: 0.5rem; }
.visit__contact { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.75rem; }

.hours { border-collapse: collapse; width: 100%; max-width: 22rem; }
.hours th,
.hours td {
  padding-block: 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: start;
  font-weight: 400;
  color: var(--ink-soft);
}
.hours td { text-align: end; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.hours th[scope="row"] { color: var(--ink); }

.map {
  width: 100%;
  min-height: 20rem;
  height: 100%;
  border: 1px solid var(--ink);
  filter: grayscale(0.85) contrast(1.05);
}

@media (min-width: 640px) { .visit__blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .visit__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }

/* ---------- Booking form ---------- */
.book { background: var(--paper-2); }
.book__grid { display: grid; gap: 2.5rem; }
.book__intro p { max-width: 40ch; }
.book__privacy-note { font-size: var(--step--1); color: var(--ink-soft); }

.book-form { display: grid; gap: 1.25rem 1.5rem; align-content: start; }
.field { margin: 0; }
.field label,
.field legend { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.req,
.opt { font-size: var(--step--1); font-weight: 400; color: var(--ink-soft); }

.book-form input[type="text"],
.book-form input[type="tel"],
.book-form select,
.book-form textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-field);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: var(--step-0);
  line-height: 1.4;
}
.book-form input[dir="ltr"] { text-align: right; }
.book-form textarea { min-height: 7.5rem; resize: vertical; }
.book-form [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }

fieldset.field { padding: 0; border: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.choice { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 400; }
.choice input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--stencil); }
.field .choice { margin: 0; font-weight: 400; }

.field__hint { margin: 0.35rem 0 0; font-size: var(--step--1); color: var(--ink-soft); }
.field__error { margin: 0.4rem 0 0; font-size: var(--step--1); font-weight: 600; color: var(--error); }

.field--check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
}
.field--check input {
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.25rem 0 0;
  accent-color: var(--stencil);
}
.field--check label { margin: 0; font-weight: 400; }
.field--check .field__error { grid-column: 1 / -1; }

.form-status {
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--stencil);
  border-radius: var(--radius-field);
  background: var(--stencil-tint);
  color: var(--ink);
}
.form-status[data-state="error"] { border-color: var(--error); background: #F6E4E8; }
.form-status p { margin: 0; }
.form-status p + p { margin-top: 0.35rem; }

@media (min-width: 640px) {
  .book-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--wide { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .book__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(3rem, 6vw, 6rem); }
}

/* ---------- Footer ---------- */
.site-footer {
  --focus: var(--lilac);
  background: var(--ink);
  color: var(--paper);
  padding-top: 3.5rem;
}
.site-footer a { color: var(--paper); }
.site-footer__grid { display: grid; gap: 2rem; padding-bottom: 2.5rem; }
.wordmark--footer { margin: 0 0 0.5rem; font-size: 3rem; color: var(--paper); }
.site-footer p { color: var(--mist); }
.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer .demo-banner { border-top: 1px solid var(--line-dark); color: var(--paper); }

@media (min-width: 800px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1fr) auto; }
}

/* ---------- Legal pages ---------- */
.page-header .site-header__bar { justify-content: space-between; }
.legal { padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 6rem); }
.legal__body { max-width: 68ch; }
.legal h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1;
}
.legal h2 { margin: 2.5rem 0 0.75rem; font-size: var(--step-2); line-height: 1.25; }
.legal ul { padding-inline-start: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }
.legal .updated { color: var(--ink-soft); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.motion-off *,
.motion-off *::before,
.motion-off *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

/* ---------- Windows high contrast / forced colors ---------- */
@media (forced-colors: active) {
  .btn,
  .motion-toggle,
  .nav-toggle { border: 1.5px solid ButtonText; }
  .motion-toggle[aria-pressed="true"] { outline: 2px solid Highlight; }
  .rose path,
  .sheet__art * { stroke: CanvasText; }
  .frame { border-color: CanvasText; }
}
