/* ============================================================
   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); }

.hero h1 {
  font-size: var(--fs-hero);
  line-height: 1.02;
  max-width: 14ch;
  text-transform: lowercase;
}
.hero h1 em { font-style: normal; color: var(--terre); }
.hero .sub {
  margin: 1rem 0 0;
  font-size: var(--fs-tiny); font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--espresso-60);
}

/* ---------- 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; }

/* ---------- 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); }
