/* ============================================================
   CANOPY — THEME A · L'AFFICHE
   ------------------------------------------------------------
   A Bauhaus poster you can use. One milk-white canvas, flat
   geometric shapes in the café palette, hard 2px espresso lines,
   zero shadows, zero gradients. Motion = shapes drifting slowly,
   like a mobile hanging in a quiet room.
   ============================================================ */

:root {
  --milk: #fefaf0;
  --espresso: #542916;
  --terre: #a13a1e;
  --bleu: #88b8ce;
  --miel: #f1c166;
  --eau: #b79858;
  --espresso-60: rgba(84, 41, 22, .6);
  --espresso-30: rgba(84, 41, 22, .3);

  --line: 2px solid var(--espresso);

  --fs-hero: clamp(2.4rem, 5.4vw + 1rem, 4.4rem);
  --fs-h2: clamp(1.4rem, 2vw + .8rem, 2rem);
  --fs-h3: 1.1rem;
  --fs-small: .875rem;
  --fs-tiny: .72rem;

  --focus: var(--terre);
}

body {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  background: var(--milk);
  color: var(--espresso);
}
h1, h2, h3, .display, .brand-name {
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -.01em;
}
::selection { background: var(--miel); color: var(--espresso); }
.skip-link { background: var(--espresso); color: var(--milk); }

/* ---------- header: the poster top ---------- */
.canopy-top {
  padding: max(env(safe-area-inset-top), 1.25rem) 1.25rem 3.5rem;
  position: relative;
  overflow: hidden;
  border-bottom: var(--line);
}
/* the mobile: three flat shapes drifting very slowly */
.canopy-top::before {
  content: "";
  position: absolute; top: -110px; right: -90px;
  width: 300px; height: 300px; border-radius: 50%;
  background: var(--bleu);
  animation: drift 16s ease-in-out infinite alternate;
}
.canopy-top::after {
  content: "";
  position: absolute; bottom: -6px; left: -40px;
  width: 190px; height: 95px;
  border-radius: 190px 190px 0 0;
  background: var(--miel);
  animation: drift 19s ease-in-out infinite alternate-reverse;
}
.hero::after {
  content: "";
  position: absolute; top: -22px; right: 8%;
  width: 0; height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 52px solid var(--terre);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(-14px, 10px) rotate(4deg); }
}
@media (max-width: 560px) { .hero::after { display: none; } }

.top-bar { margin-bottom: 3.2rem; }
.brand-name { font-size: 1.4rem; text-transform: lowercase; letter-spacing: .02em; }
.pill-btn {
  border: var(--line);
  border-radius: 0;
  padding: .42rem .95rem;
  font-size: var(--fs-small); font-weight: 700;
  background: var(--milk);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.pill-btn:hover { background: var(--espresso); color: var(--milk); }
.menu-toggle {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.menu-toggle-fixed {
  position: fixed;
  top: max(env(safe-area-inset-top, 0px), 0.75rem);
  right: max(env(safe-area-inset-right, 0px), 0.75rem);
  /* Above the always-mounted menu veil (z 150) so taps hit the hamburger, not the inert ✕ */
  z-index: 160;
  pointer-events: auto;
  box-shadow: none;
}
.menu-toggle .menu-x-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: rotate(-40deg) scale(.85);
}
.menu-toggle .menu-icon {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
  transition: none;
}
.menu-toggle.is-x .menu-icon {
  opacity: 0;
  transform: rotate(40deg) scale(.85);
}
.menu-toggle.is-x .menu-x-glyph {
  opacity: 1;
  transform: none;
}
.menu-toggle-spacer {
  display: inline-block;
  width: 44px;
  height: 44px;
  flex: none;
}
.top-actions {
  position: relative;
  z-index: 5;
}
/* Decorative poster shapes must never steal taps */
.canopy-top::before,
.canopy-top::after,
.hero::after,
.shapes,
.shapes *,
.sh,
.sh::before {
  pointer-events: none !important;
}
/* Parked only after open handoff finishes — avoids brutal pop */
body.menu-open .menu-toggle-fixed.is-parked {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}
body.menu-open .menu-toggle-fixed:not(.is-parked) {
  /* traveling above the wipe during open/close morph */
  z-index: 170;
  pointer-events: none;
}
.menu-box-close.is-handoff-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}
.menu-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
}
.menu-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
}
.menu-toggle:hover .menu-bars span { background: currentColor; }

/* ---------- sticky magnetic cursor (desktop) ---------- */
.sticky-cursor {
  --cursor-size: 22px;
  width: var(--cursor-size);
  height: var(--cursor-size);
  border-radius: 50%;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 400;
  transform: translate(-50%, -50%);
  background: var(--espresso);
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}
body.has-sticky-cursor .sticky-cursor { opacity: 1; }
body.has-sticky-cursor .sticky-cursor.is-stuck {
  background: var(--miel);
}
@media (pointer: fine) {
  body.has-sticky-cursor,
  body.has-sticky-cursor * {
    cursor: none;
  }
  body.has-sticky-cursor input,
  body.has-sticky-cursor textarea,
  body.has-sticky-cursor select,
  body.has-sticky-cursor [contenteditable="true"] {
    cursor: text;
  }
}
[data-hover] {
  position: relative;
  overflow: visible;
}
[data-hover-bounds] {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}
[data-hover]:hover [data-hover-bounds] {
  transform: scale(2.4);
}
.menu-x,
.sheet-close,
.search-clear {
  position: relative;
  overflow: visible;
}
.menu-x > span:first-child,
.sheet-close > span:first-child,
.search-clear > span:first-child {
  pointer-events: none;
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .sticky-cursor { display: none !important; }
  body.has-sticky-cursor,
  body.has-sticky-cursor * {
    cursor: auto;
  }
  body.has-sticky-cursor input,
  body.has-sticky-cursor textarea {
    cursor: text;
  }
}

.hero h1 {
  font-size: var(--fs-hero);
  line-height: 1.05;
  max-width: 16ch;
  text-transform: lowercase;
}
.hero-lead { color: var(--espresso); }
.hero-morph {
  display: inline;
  margin-left: 0.28em;
}
.hero-morph-slot {
  display: inline-grid;
  vertical-align: baseline;
  justify-items: start;
  align-items: baseline;
  min-width: var(--hero-beat-w, 0px);
}
.hero-morph-layer {
  grid-area: 1 / 1;
  font-style: normal;
  color: var(--terre);
  white-space: nowrap;
  will-change: opacity, filter, transform;
  backface-visibility: hidden;
}
.hero-morph-layer.is-next {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(5px);
  pointer-events: none;
}
.hero .sub {
  margin: 1rem 0 0;
  font-size: var(--fs-tiny); font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--espresso-60);
}
@media (prefers-reduced-motion: reduce) {
  .hero-morph-layer {
    will-change: auto;
    filter: none !important;
  }
  .hero-morph-layer.is-next { display: none; }
}

/* ---------- entry: one thick line, one red dot ---------- */
.entry { margin-top: 2.4rem; }
.search-wrap {
  background: transparent;
  border: none;
  border-bottom: 3px solid var(--espresso);
  padding: 0 0 .35rem;
  gap: .75rem;
}
.search-leaf { display: none; }
#search {
  font: 500 clamp(1.15rem, 2vw + .6rem, 1.5rem)/1.3 'Familjen Grotesk', sans-serif;
  padding: .55rem 0;
}
#search::placeholder { color: var(--espresso-30); font-weight: 400; }
.search-clear {
  width: 38px; height: 38px; border-radius: 50%;
  border: var(--line);
  font-size: 1rem; color: var(--espresso);
  background: var(--milk);
}
.search-clear:hover { background: var(--miel); }
.search-go {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--terre); color: var(--milk);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--t-fast) var(--ease);
}
.search-go svg { width: 20px; height: 20px; }
.search-go:hover { transform: translateX(3px); }
.entry-hint {
  margin: .8rem 0 0;
  font-size: var(--fs-tiny); font-weight: 500;
  color: var(--espresso-60); letter-spacing: .02em;
}

/* ---------- ground ---------- */
.ground { padding: 2.6rem 1.25rem 9rem; }

.section-label {
  font-size: var(--fs-tiny); font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--espresso);
  margin: 0 0 1.1rem;
}
.section-label::after { content: ""; flex: 1; height: 2px; background: var(--espresso); }

.guided-btn {
  background: var(--espresso); color: var(--milk);
  padding: 1.15rem 1.4rem;
  margin-bottom: 2.6rem;
  border-radius: 0;
  transition: transform var(--t-fast) var(--ease);
}
.guided-btn:hover { transform: translateX(4px); }
.guided-btn .g-title { font-family: 'Josefin Sans', sans-serif; font-size: var(--fs-h3); font-weight: 600; }
.guided-btn .g-sub { font-size: var(--fs-tiny); opacity: .65; margin-top: 3px; letter-spacing: .14em; text-transform: uppercase; }
.guided-btn .g-arrow {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--miel); color: var(--espresso);
}

/* category tiles: pure shapes, no icons */
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.cat-sticker {
  background: var(--milk);
  border: var(--line);
  border-radius: 0;
  padding: 1.05rem;
  min-height: 122px;
  display: flex; flex-direction: column; justify-content: space-between; gap: .8rem;
  transition: background var(--t-fast) var(--ease), transform var(--t-med) var(--ease);
}
.cat-sticker:hover { background: #fbf2dd; transform: translateY(-3px); }
.cat-icon { width: 38px; height: 38px; border: none; border-radius: 50%; }
.cat-icon svg { display: none; }
/* the shape alphabet: circle · square · triangle · arch, repeating */
.cat-sticker:nth-child(4n+2) .cat-icon { border-radius: 0; }
.cat-sticker:nth-child(4n+3) .cat-icon {
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.cat-sticker:nth-child(4n+4) .cat-icon { border-radius: 50% 50% 0 0; }
.cat-name { font-family: 'Josefin Sans', sans-serif; font-weight: 600; font-size: 1rem; line-height: 1.15; }
.cat-count { position: absolute; top: 10px; right: 12px; font-size: var(--fs-tiny); font-weight: 700; color: var(--espresso-30); }

/* ---------- results ---------- */
.res-card {
  background: var(--milk);
  border: var(--line);
  border-radius: 0;
  padding: 1.1rem 1.1rem 1rem 1.4rem;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  animation: slide var(--t-slow) var(--ease) backwards;
}
.result-list .res-card:nth-child(2) { animation-delay: 70ms; }
.result-list .res-card:nth-child(3) { animation-delay: 140ms; }
@keyframes slide { from { opacity: 0; transform: translateX(-12px); } }
.res-card:hover { transform: translateX(4px); background: #fbf2dd; }
.res-card .cat-strip { position: absolute; left: -2px; top: -2px; bottom: -2px; width: 8px; }
.res-name { font-family: 'Josefin Sans', sans-serif; font-size: var(--fs-h3); font-weight: 600; line-height: 1.2; }
.res-sub { font-size: var(--fs-tiny); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--espresso-60); }
.res-desc { margin: .5rem 0 .7rem; color: var(--espresso-60); font-size: var(--fs-small); line-height: 1.5; }

.badge {
  font-size: var(--fs-tiny); font-weight: 700;
  padding: .24rem .55rem;
  border: 1.5px solid var(--espresso);
  border-radius: 0;
  background: var(--milk); color: var(--espresso);
  letter-spacing: .04em; text-transform: uppercase;
}
.badge.b-free { background: var(--miel); }
.badge.b-paid { background: transparent; border-style: dashed; }
.badge.b-open { background: var(--bleu); }
.badge.b-open .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--espresso); animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.badge.b-closed { color: var(--espresso-30); border-color: var(--espresso-30); }
.badge.b-urgent { background: var(--terre); border-color: var(--terre); color: var(--milk); }

.no-results { padding: 3rem 1rem; color: var(--espresso-60); }
.no-results .display { font-size: var(--fs-h2); color: var(--espresso); margin-bottom: .5rem; }

/* ---------- sheet ---------- */
.sheet-veil { background: rgba(84, 41, 22, .4); }
.sheet {
  background: var(--milk);
  border-top: 3px solid var(--espresso);
  border-radius: 0;
}
@media (min-width: 760px) { .sheet { border-left: var(--line); border-right: var(--line); } }
.sheet-handle::before { content: ""; width: 46px; height: 4px; background: var(--espresso); }
.sheet-scroll { padding: 0 1.5rem 2.4rem; }
.sheet-head { margin-bottom: .5rem; }
.sheet-cat {
  font-size: var(--fs-tiny); font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--milk); padding: .28rem .7rem; border-radius: 0;
  margin-bottom: .6rem;
}
.sheet h2 { font-size: var(--fs-h2); line-height: 1.1; }
.sheet-close { width: 40px; height: 40px; border: var(--line); border-radius: 50%; font-size: 1rem; }
.sheet-close:hover { background: var(--miel); }
.sheet-desc { color: var(--espresso-60); line-height: 1.55; margin: .5rem 0 1.2rem; }
.sheet .badges { margin-bottom: 1.4rem; }

.action-row { margin-bottom: 1.8rem; }
.act {
  padding: .9rem 1.1rem;
  border: var(--line); border-radius: 0;
  font-weight: 700; font-size: var(--fs-small);
  transition: transform var(--t-fast) var(--ease);
}
.act:hover { transform: translateY(-2px); }
.act-call { background: var(--espresso); color: var(--milk); }
.act-web { background: var(--milk); color: var(--espresso); }
.act-share { background: var(--terre); border-color: var(--terre); color: var(--milk); }

.expect {
  background: var(--miel);
  border: none; border-left: 6px solid var(--espresso);
  border-radius: 0;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.8rem;
}
.expect h3 {
  font-family: 'Familjen Grotesk', sans-serif;
  font-size: var(--fs-tiny); font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  margin-bottom: .45rem;
}
.expect p { margin: 0; line-height: 1.55; font-size: 1rem; }

.facts { margin-bottom: 1.8rem; }
.fact h4 {
  font-size: var(--fs-tiny); font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--espresso-30);
}
.fact p { font-size: var(--fs-small); line-height: 1.45; }

.also-row { margin-bottom: 1.2rem; }
.also-chip {
  border: 1.5px solid var(--espresso);
  background: var(--milk);
  padding: .45rem .85rem; border-radius: 0;
  font-size: var(--fs-small); font-weight: 600;
}
.also-chip:hover { background: var(--miel); }

.verified { font-size: var(--fs-tiny); color: var(--espresso-60); border-top: var(--line); padding-top: .8rem; }
.verified.warn { color: var(--eau); }

/* ---------- guided tree ---------- */
.tree-overlay {
  background: var(--espresso); color: var(--milk);
  padding: max(env(safe-area-inset-top), 1.25rem) 1.25rem 2.5rem;
}
.tree-overlay .pill-btn { border-color: var(--milk); color: var(--milk); background: transparent; }
.tree-overlay .pill-btn:hover { background: var(--milk); color: var(--espresso); }
.tree-bar { margin-bottom: 2.6rem; }
.tree-crumb { font-size: var(--fs-tiny); letter-spacing: .22em; text-transform: uppercase; opacity: .5; }
.tree-q { font-size: var(--fs-h2); line-height: 1.12; margin-bottom: 1.8rem; max-width: 22ch; text-transform: lowercase; }
.tree-choice {
  background: var(--milk); color: var(--espresso);
  border-radius: 0;
  padding: 1.05rem 1.3rem;
  transition: transform var(--t-fast) var(--ease);
  animation: slide var(--t-med) var(--ease) backwards;
}
.tree-choice:nth-child(2) { animation-delay: 50ms; }
.tree-choice:nth-child(3) { animation-delay: 100ms; }
.tree-choice:nth-child(4) { animation-delay: 150ms; }
.tree-choice:nth-child(5) { animation-delay: 200ms; }
.tree-choice:nth-child(6) { animation-delay: 250ms; }
.tree-choice:hover { transform: translateX(5px); }
.tree-choice .t-label { font-weight: 600; font-size: 1rem; }
.tree-choice .t-sub { font-size: var(--fs-tiny); text-transform: uppercase; letter-spacing: .1em; color: var(--espresso-60); margin-top: 2px; }
.tree-choice .t-go { color: var(--terre); font-size: 1.15rem; }

/* ---------- SOS ---------- */
.sos {
  background: var(--terre); color: var(--milk);
  border: 2px solid var(--espresso);
  border-radius: 999px;
  padding: .8rem 1.5rem;
  font-weight: 700; font-size: var(--fs-small);
  transition: transform var(--t-fast) var(--ease);
}
.sos:hover { transform: translateX(-50%) translateY(-2px); }

/* ---------- crisis: the soft room stays soft ---------- */
.crisis { background: var(--milk); }
.crisis-inner { padding: 3.2rem 1.25rem; }
.breath {
  width: 70px; height: 70px; margin: 0 auto 1.4rem; border-radius: 50%;
  background: var(--terre);
  animation: inhale 7s ease-in-out infinite;
}
@keyframes inhale { 0%, 100% { transform: scale(.86); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }
.crisis h2 { text-align: center; font-size: var(--fs-hero); text-transform: lowercase; }
.crisis-sub { text-align: center; color: var(--espresso-60); line-height: 1.6; max-width: 34ch; margin: .9rem auto 2.4rem; }
.crisis-gentle {
  background: var(--miel);
  border: none; border-left: 6px solid var(--terre);
  border-radius: 0;
  padding: 1rem 1.1rem; margin-bottom: 1.6rem;
  font-size: var(--fs-small); line-height: 1.55;
}
.line-card {
  background: var(--milk);
  border: var(--line); border-radius: 0;
  padding: 1rem 1.1rem; margin-bottom: .8rem;
}
.line-card.accent { background: #fbe9d8; }
.line-name { font-family: 'Josefin Sans', sans-serif; font-weight: 600; font-size: var(--fs-h3); }
.line-note { font-size: var(--fs-tiny); color: var(--espresso-60); margin-top: 2px; }
.line-act {
  background: var(--espresso); color: var(--milk);
  border: 2px solid var(--espresso); border-radius: 999px;
  padding: .55rem 1rem; font-weight: 700; font-size: var(--fs-small);
}
.line-act.alt { background: var(--milk); color: var(--espresso); }
.crisis-leave { font-size: var(--fs-small); font-weight: 600; color: var(--espresso-60); text-decoration: underline; text-underline-offset: 3px; }

.confirm-veil, .about-veil, .helper-info-veil { background: rgba(84, 41, 22, .5); }
.confirm-box, .about-box {
  background: var(--milk);
  border: var(--line); border-radius: 0;
  padding: 2rem 1.5rem;
}
.confirm-box h3, .about-box h3 { font-size: var(--fs-h2); margin-bottom: .6rem; }
.confirm-box p, .about-box p { color: var(--espresso-60); font-size: var(--fs-small); line-height: 1.6; margin: 0 0 1.2rem; }
.menu-box.about-box {
  padding: 0;
  border: none;
}
.menu-box .menu-kicker { color: var(--espresso); font-size: .95rem; margin: .35rem 0 0; }
.menu-box .menu-detail-title {
  font-size: 1rem;
  margin: 0;
  color: var(--menu-fg, var(--espresso));
}

/* ---------- Full-page menu · liquid wipe + index/detail ---------- */
.menu-veil {
  display: flex !important;
  justify-content: stretch;
  align-items: stretch;
  padding: 0;
  background: rgba(84, 41, 22, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: background .35s var(--ease, cubic-bezier(.22,1,.36,1)),
              opacity .28s var(--ease, cubic-bezier(.22,1,.36,1));
}
/* Closed veil stays mounted for wipe anim — but children with pointer-events:auto
   (esp. ✕ at top-right) were stealing taps from the page hamburger on mobile */
.menu-veil:not(.on),
.menu-veil:not(.on) * {
  pointer-events: none !important;
}
.menu-veil:not(.on) {
  /* Beat any leftover GSAP inline opacity so menu copy never ghosts on the site */
  opacity: 0 !important;
  visibility: hidden !important;
}
.menu-veil.on {
  background: rgba(84, 41, 22, .22);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.menu-wipe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.menu-wipe-path {
  vector-effect: non-scaling-stroke;
}
.menu-clip-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
/* Inline clip-path is set by JS (from the tapped button). Don't force an SVG clip. */
.menu-detail.is-liquid-clip,
.menu-index.is-liquid-clip {
  will-change: clip-path;
}
.menu-item {
  transform-origin: center center;
}
.menu-box {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  border: none;
  background: var(--milk);
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
.menu-veil.on .menu-box { transform: translateX(0); }

/* With GSAP wipe: panel sits still; wipe paints the surface */
body.has-gsap .menu-box {
  background: transparent;
  transform: none !important;
}
body.has-gsap .menu-index {
  background: transparent;
}

/* Full-bleed color; detail copy column centered on desktop */
@media (min-width: 721px) {
  .menu-box {
    width: 100%;
    max-width: none;
    border: none;
  }
  .menu-detail-scroll {
    width: 100%;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }
}

.menu-stage {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
.menu-stage[data-view="index"] { transform: translateX(0); }
.menu-stage[data-view="detail"] { transform: translateX(-50%); }
.menu-stage.no-anim { transition: none !important; }

.menu-view {
  width: 50%;
  height: 100%;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--milk);
  box-sizing: border-box;
}

.menu-index-top {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  gap: 1rem;
  padding: max(1.15rem, env(safe-area-inset-top, 0px)) 3.5rem 1.5rem;
  flex: none;
}
.menu-kicker {
  margin: .35rem 0 0;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: lowercase;
  color: var(--espresso);
}
.menu-x {
  border: none;
  background: transparent;
  width: 44px; height: 44px; flex: none;
  font-size: 1.15rem; font-weight: 700;
  color: var(--espresso);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  position: absolute;
  top: max(.65rem, env(safe-area-inset-top, 0px));
  right: .85rem;
}
/* Always above stage / clipped detail so ✕ stays clickable — only while menu is open */
.menu-box-close {
  z-index: 40;
  pointer-events: none;
  color: var(--espresso);
}
.menu-veil.on .menu-box-close {
  pointer-events: auto;
}
.menu-box[data-on-detail="1"] .menu-box-close {
  color: var(--menu-fg, var(--espresso));
  /* mix with detail palette via currentColor on detail head spacer alignment */
  filter: none;
}
.menu-detail-head-spacer {
  width: 44px;
  height: 44px;
  flex: none;
}
.menu-x:focus-visible,
.menu-item:focus-visible,
.menu-back:focus-visible {
  outline: 2px solid var(--terre);
  outline-offset: 2px;
}

.menu-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  border: none;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  margin: 0;
  padding: 1.35rem 1.35rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--espresso);
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: clamp(1.55rem, 6vw, 2.25rem);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: filter .18s ease;
  box-sizing: border-box;
  z-index: 1;
}
.menu-item-wipe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.menu-detail.is-reveal-layer {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  z-index: 8;
  flex: none !important;
  margin: 0;
  /* cover the live index while the blob expands from the tapped row */
  pointer-events: auto;
  box-shadow: none;
}
.menu-detail.is-reveal-layer.is-liquid-clip {
  /* clip-path is the only reveal — never let unclipped content flash over rows */
  overflow: hidden;
}
.menu-item > span {
  position: relative;
  z-index: 1;
  pointer-events: none;
  font-weight: inherit;
}
.menu-item[data-panel="about"] { color: var(--espresso); }
.menu-item[data-panel="contact"] { color: var(--espresso); }
.menu-item[data-panel="flag"] { color: var(--milk); }
.menu-item[data-panel="settings"] { color: var(--espresso); }
/* Fallback fills when GSAP wipe isn’t running */
body:not(.has-gsap) .menu-item[data-panel="about"] { background: var(--milk); }
body:not(.has-gsap) .menu-item[data-panel="contact"] { background: var(--bleu); }
body:not(.has-gsap) .menu-item[data-panel="flag"] { background: var(--terre); }
body:not(.has-gsap) .menu-item[data-panel="settings"] { background: var(--miel); }
body:not(.has-gsap) .menu-item-wipe { display: none; }
.menu-item:hover { filter: brightness(.97); }
.menu-item:active { filter: brightness(.93); }
body.has-gsap .menu-item { transition: none; }
body.has-gsap.menu-animating .menu-veil {
  /* keep menu interactive (Back / ✕); only the page under stays locked via overflow */
}

/* Detail pages: same palette, different contrast per section */
.menu-detail {
  --menu-bg: var(--milk);
  --menu-fg: var(--espresso);
  --menu-muted: var(--espresso-60);
  --menu-line: var(--espresso);
  --menu-accent: var(--terre);
  --menu-field-bg: var(--milk);
  --menu-field-border: var(--espresso);
  --menu-cta-bg: var(--espresso);
  --menu-cta-fg: var(--milk);
  background: var(--menu-bg);
  color: var(--menu-fg);
  transition: background .28s ease, color .28s ease;
}
.menu-detail[data-panel="about"] {
  --menu-bg: var(--milk);
  --menu-fg: var(--espresso);
  --menu-accent: var(--terre);
}
.menu-detail[data-panel="contact"] {
  --menu-bg: var(--bleu);
  --menu-fg: var(--espresso);
  --menu-muted: rgba(84, 41, 22, .72);
  --menu-accent: var(--espresso);
  --menu-cta-bg: var(--espresso);
  --menu-cta-fg: var(--milk);
}
.menu-detail[data-panel="flag"] {
  --menu-bg: var(--terre);
  --menu-fg: var(--milk);
  --menu-muted: rgba(254, 250, 240, .78);
  --menu-line: var(--milk);
  --menu-accent: var(--miel);
  --menu-field-bg: rgba(254, 250, 240, .12);
  --menu-field-border: var(--milk);
  --menu-cta-bg: var(--miel);
  --menu-cta-fg: var(--espresso);
}
.menu-detail[data-panel="settings"] {
  --menu-bg: var(--miel);
  --menu-fg: var(--espresso);
  --menu-muted: rgba(84, 41, 22, .7);
  --menu-accent: var(--terre);
  --menu-field-bg: rgba(254, 250, 240, .55);
}

.menu-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: max(.85rem, env(safe-area-inset-top, 0px)) .85rem .85rem;
  border-bottom: 2px solid var(--menu-line);
  flex: none;
  background: transparent;
  position: relative;
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
  pointer-events: auto;
}
.menu-detail .menu-back,
.menu-detail .menu-detail-title {
  color: var(--menu-fg);
}
.menu-back {
  border: none;
  background: transparent;
  padding: .55rem .4rem;
  min-height: 44px;
  font: inherit;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  position: relative;
  z-index: 21;
  pointer-events: auto;
}
.menu-detail-title {
  margin: 0;
  flex: 1;
  text-align: center;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.menu-detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.35rem 1.35rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}
.menu-panel { display: none; }
.menu-panel.on { display: block; }
.menu-panel[hidden] { display: none !important; }
.menu-detail .menu-panel > p:first-child {
  color: var(--menu-muted);
  font-size: var(--fs-small);
  line-height: 1.6;
  margin: 0 0 1.1rem;
}
.menu-about-body {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--menu-fg);
  margin: 0 0 1rem;
  font-weight: 500;
}
.menu-box .menu-about-body p {
  margin: 0 0 .9rem;
  color: var(--menu-fg);
  font-size: 1.05rem;
  line-height: 1.65;
}
.menu-about-kicker {
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: .72rem !important;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--menu-muted) !important;
  margin: 0 0 1rem !important;
}
.menu-about-body a {
  color: var(--menu-accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.menu-note {
  font-size: .8rem; color: var(--menu-muted); line-height: 1.5;
  margin: .85rem 0 0;
}
.menu-mail {
  display: inline-block; font-weight: 800; color: var(--menu-accent);
  word-break: break-all; margin: .35rem 0 .5rem;
}
.menu-mail-card {
  display: block;
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 2px solid var(--menu-line);
  background: var(--menu-field-bg, var(--milk));
  text-decoration: none;
  color: inherit;
  transition: filter .15s ease;
}
.menu-mail-card:hover { filter: brightness(.97); }
.menu-mail-card .menu-label {
  margin: 0 0 .35rem;
  color: var(--menu-muted);
}
.menu-mail-card .menu-mail {
  display: block;
  margin: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  color: var(--menu-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.menu-form-block {
  border-top: 2px solid var(--menu-line);
  padding-top: 1.15rem;
}
.menu-form-title {
  margin: 0 0 1rem !important;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
  font-size: .78rem !important;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--menu-fg) !important;
}
.menu-field-hint {
  margin: .4rem 0 0;
  font-size: .78rem;
  line-height: 1.45;
  color: var(--menu-muted);
  font-weight: 600;
}
.menu-field-hint.is-warn { color: var(--terre); }
.menu-label {
  display: block; font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--menu-muted); margin: .75rem 0 .3rem;
}
.menu-panel textarea,
.menu-panel input[type="text"],
.menu-panel input[type="email"] {
  width: 100%; font: inherit; font-size: 16px;
  color: var(--menu-fg); background: var(--menu-field-bg);
  border: 2px solid var(--menu-field-border); border-radius: 0;
  padding: .65rem .7rem; min-height: 48px;
  box-sizing: border-box;
}
.menu-panel textarea { min-height: 110px; resize: vertical; }
.menu-panel textarea::placeholder,
.menu-panel input::placeholder { color: var(--menu-muted); opacity: .85; }

.menu-detail .act-call {
  background: var(--menu-cta-bg);
  color: var(--menu-cta-fg);
  border-color: var(--menu-cta-bg);
}

.menu-detail .pref-row {
  border-bottom-color: color-mix(in srgb, var(--menu-line) 35%, transparent);
  align-items: flex-start;
}
.menu-detail .pref-copy strong { color: var(--menu-fg); }
.menu-detail .pref-copy span { color: var(--menu-muted); }
.menu-detail .pref-switch {
  border-color: var(--menu-line);
  background: var(--menu-field-bg);
}
.menu-detail[data-panel="settings"] .pref-switch:checked {
  background: var(--espresso);
}
.menu-detail[data-panel="settings"] .pref-switch:checked::after {
  background: var(--miel);
}

.pref-lang { cursor: default; }
.lang-seg {
  display: flex;
  flex: none;
  border: var(--line);
  background: var(--milk);
}
.lang-opt {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--espresso);
  font: inherit;
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .06em;
  min-width: 44px;
  min-height: 36px;
  padding: .35rem .7rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lang-opt + .lang-opt { border-left: var(--line); }
.lang-opt.on {
  background: var(--espresso);
  color: var(--milk);
}
.menu-detail[data-panel="settings"] .lang-seg {
  border-color: var(--menu-line);
  background: var(--menu-field-bg);
}
.menu-detail[data-panel="settings"] .lang-opt {
  color: var(--menu-fg);
}
.menu-detail[data-panel="settings"] .lang-opt.on {
  background: var(--espresso);
  color: var(--miel);
}

.pref-row {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--espresso-30);
  cursor: pointer;
}
.pref-row:last-of-type { border-bottom: none; }
.pref-copy { flex: 1; min-width: 0; }
.pref-copy strong {
  display: block; font-size: .95rem; margin-bottom: .3rem;
  font-family: 'Josefin Sans', 'Familjen Grotesk', sans-serif;
}
.pref-copy span {
  display: block; font-size: .8rem; line-height: 1.45;
  color: var(--espresso-60);
}

.pref-switch {
  appearance: none; -webkit-appearance: none;
  width: 48px; height: 28px; flex: none; margin-top: .15rem;
  border: var(--line); background: #fbf2dd; border-radius: 999px;
  position: relative; cursor: pointer;
  transition: background .2s ease;
}
.pref-switch::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: var(--espresso); border-radius: 50%;
  transition: transform .2s ease;
}
.pref-switch:checked { background: var(--bleu); }
.pref-switch:checked::after { transform: translateX(20px); background: var(--milk); }
.pref-switch:focus-visible { outline: 2px solid var(--terre); outline-offset: 2px; }

.footer a.made-by {
  color: var(--espresso-60);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .menu-veil, .menu-box, .menu-stage { transition: none !important; }
}

/* GSAP owns panel motion — disable CSS transitions that would fight it */
body.has-gsap .menu-veil,
body.has-gsap .menu-box,
body.has-gsap .menu-stage,
body.has-gsap .sheet-veil,
body.has-gsap .sheet,
body.has-gsap .tree-overlay {
  transition: none !important;
}
body.has-gsap .menu-detail {
  /* GSAP owns the soft palette wash on background */
  transition: color .35s ease;
}
body.has-gsap .menu-box,
body.has-gsap .menu-veil.on .menu-box,
body.has-gsap .menu-stage[data-view="index"],
body.has-gsap .menu-stage[data-view="detail"],
body.has-gsap .sheet,
body.has-gsap .sheet.on,
body.has-gsap .tree-overlay,
body.has-gsap .tree-overlay.on {
  /* resting positions come from GSAP inline styles */
  transform: none;
}
body.has-gsap .sheet-veil.on {
  opacity: 1;
}
body.has-gsap .tree-overlay.on {
  opacity: 1;
}

/* Touch feedback: press feels immediate, not jumpy */
@media (pointer: coarse) {
  .menu-item:active { filter: brightness(.95); }
  .tree-choice:active,
  .guided-btn:active,
  .act:active {
    opacity: .92;
  }
}

/* ---------- toast / footer / switcher ---------- */
.toast {
  background: var(--espresso); color: var(--milk);
  padding: .6rem 1.2rem; border-radius: 0;
  font-size: var(--fs-small); font-weight: 700;
}
.footer { color: var(--espresso-30); font-size: var(--fs-tiny); padding: 0 1.25rem 1.25rem; line-height: 1.7; }
.footer button { text-decoration: underline; color: var(--espresso-60); font-size: inherit; }

.v-switch a { border: 2px solid var(--espresso); background: var(--milk); color: var(--espresso); }
.v-switch a[aria-current] { background: var(--espresso); color: var(--milk); }
