/* ==========================================================================
   Shared stylesheet for dialogwaeber.ch and reflexwaeber.ch.
   This file must stay IDENTICAL in both sites: edit it once, copy it to the
   other site, then run `python3 tools/check_sites.py`.
   Colours come from css/theme.css (the only per-site stylesheet).
   ========================================================================== */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face { font-family: "Fraunces"; src: url(../fonts/fraunces-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(../fonts/fraunces-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(../fonts/source-sans-3-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(../fonts/source-sans-3-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- Layout constants ---------- */
:root {
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  --on-photo: #fffdf6;
  --gutter: clamp(18px, 5vw, 48px);
  --page-max: 1200px;
  --pad-x: max(var(--gutter), calc((100% - var(--page-max)) / 2));
  /* Header photo layers: dark at the left where the text is, clear at the right.
     The 60 % stop sits at the right edge of the 600px text column (+20px), so white
     text never stands on less than the wash checked by tools/contrast.py. */
  --wash-grad: linear-gradient(90deg,
      color-mix(in srgb, var(--wash) 88%, transparent) 0%,
      color-mix(in srgb, var(--wash) 60%, transparent) calc(var(--pad-x) + 620px),
      color-mix(in srgb, var(--wash) 15%, transparent) 100%);
  /* Optional hue lock: a theme sets it to recolour the sand photo fully
     (blend mode "color" keeps the photo's light and shade, swaps its hue).
     Transparent = no effect. */
  --hue-lock: transparent;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--sans);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; border-radius: 2px; }
.masthead :focus-visible { outline-color: var(--on-photo); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
strong { font-weight: 600; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 4px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Masthead (photo header, every page) ---------- */
.masthead {
  position: relative;
  color: var(--on-photo);
  background-color: var(--wash);
  background-image:
    linear-gradient(to bottom, color-mix(in srgb, var(--wash) 70%, transparent), transparent 140px),
    var(--wash-grad),
    linear-gradient(var(--hue-lock), var(--hue-lock)),
    linear-gradient(color-mix(in srgb, var(--brand) 55%, transparent), color-mix(in srgb, var(--brand) 55%, transparent)),
    image-set(url(../img/hero-1280.jpg) 1x, url(../img/hero-2400.jpg) 2x);
  background-blend-mode: normal, normal, color, multiply, normal;
  background-size: auto, auto, auto, auto, cover;
  background-position: 0 0, 0 0, 0 0, 0 0, 72% 40%;
  background-repeat: no-repeat;
}
.masthead--inner {
  background-image:
    linear-gradient(to bottom, color-mix(in srgb, var(--wash) 70%, transparent), transparent 140px),
    var(--wash-grad),
    linear-gradient(var(--hue-lock), var(--hue-lock)),
    linear-gradient(color-mix(in srgb, var(--brand) 55%, transparent), color-mix(in srgb, var(--brand) 55%, transparent)),
    image-set(url(../img/strip-1280.jpg) 1x, url(../img/strip-2400.jpg) 2x);
  background-position: 0 0, 0 0, 0 0, 0 0, 72% 30%;
}

/* Header bar */
.bar {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px var(--pad-x);
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: inherit;
  text-decoration: none;
}
/* One line beside the full menu; free to wrap on phones with enlarged text */
@media (min-width: 1200px) { .wordmark { white-space: nowrap; } }
.menu ul { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  color: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(40, 20, 0, .5);
  white-space: nowrap;
}
.menu a[aria-current="page"] { box-shadow: inset 0 -2px 0 currentColor; }
.menu a:hover { box-shadow: inset 0 -2px 0 color-mix(in srgb, currentColor 55%, transparent); }
.menu a[aria-current="page"]:hover { box-shadow: inset 0 -2px 0 currentColor; }

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 253, 246, .16);
  color: var(--on-photo);
  cursor: pointer;
  place-items: center;
}
.menu-toggle svg { display: block; width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Below 1200px (and only when JavaScript runs) the menu collapses behind the button */
@media (max-width: 1199.98px) {
  /* Open menu is a cream panel: dark focus ring, labels may wrap (long labels at 200 % text) */
  html.js .bar.is-open .menu :focus-visible { outline-color: var(--accent-ink); }
  html.js .bar.is-open .menu a { white-space: normal; overflow-wrap: anywhere; }
  html.js .menu-toggle { display: grid; }
  html.js .menu { display: none; }
  html.js .bar.is-open .menu {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    color: var(--ink);
    box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .35);
  }
  html.js .bar.is-open .menu ul { flex-direction: column; gap: 0; }
  html.js .bar.is-open .menu a {
    display: flex;
    padding: 12px 4px;
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 400;
    text-shadow: none;
    border-bottom: 1px solid var(--line);
  }
  html.js .bar.is-open .menu a[aria-current="page"] { color: var(--accent-ink); box-shadow: none; }
  html.js .bar.is-open .menu a.menu-lang {
    display: inline-flex;
    margin-top: 16px;
    padding: 8px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--sans);
    font-size: 1rem;
  }
}

/* Home hero */
.hero { padding: 48px var(--pad-x) 88px; }
.hero > * { max-width: 600px; }
.eyebrow {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--brand) 35%, #ffffff);
}
.hero h1 { margin: 0 0 20px; font-size: clamp(2.125rem, 4.6vw, 3.125rem); line-height: 1.08; color: var(--on-photo); }
.hero h1 em { font-style: italic; color: color-mix(in srgb, var(--brand) 40%, #ffffff); }
.hero .lead { margin: 0 0 28px; font-size: 1.1875rem; line-height: 1.55; }
.hero .lead .source { font-size: 0.875rem; }

/* Inner-page title */
.page-title { padding: 18px var(--pad-x) 44px; }
.page-title h1 { max-width: 620px; margin: 0; font-size: clamp(2rem, 4vw, 2.75rem); color: var(--on-photo); text-shadow: 0 1px 12px rgba(60, 30, 0, .35); }

/* Phones: the text spans the full width, so the photo gets an even wash */
@media (max-width: 599.98px) {
  :root { --wash-grad: linear-gradient(color-mix(in srgb, var(--wash) 72%, transparent), color-mix(in srgb, var(--wash) 72%, transparent)); }
  body { font-size: 1.0625rem; }
  .wordmark { font-size: 1.0625rem; }
  .hero { padding: 24px var(--gutter) 56px; }
  .hero .lead { font-size: 1.0625rem; }
}

/* ---------- Main content ---------- */
.content { max-width: 880px; margin: 0 auto; padding: 44px var(--gutter) 8px; }
.content > :first-child { margin-top: 0; }
/* Long words, e-mail addresses and URLs break instead of widening the page (also at 200 % text) */
.content, .site-footer { overflow-wrap: anywhere; }
.content p, .content li { -webkit-hyphens: auto; hyphens: auto; }
.content p { margin: 0 0 16px; }
.content h2 { margin: 44px 0 12px; font-size: clamp(1.5rem, 3vw, 1.875rem); }
.content .card h2, .content .prose > h2:first-child { margin-top: 0; }
.content .card h2 { font-size: 1.5rem; margin-bottom: 10px; }
.content h3 { margin: 0 0 10px; font-size: 1.375rem; }
.content ul { margin: 0 0 18px; }

/* Footprint bullets */
ul.prints { list-style: none; padding: 0; }
ul.prints > li { position: relative; padding-left: 28px; margin: 0 0 10px; }
ul.prints > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: 13px;
  height: 19px;
  background: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 30'%3E%3Cg fill='%23000'%3E%3Cellipse cx='10.5' cy='19' rx='6' ry='9.5'/%3E%3Ccircle cx='4.2' cy='6.8' r='2.4'/%3E%3Ccircle cx='8.2' cy='4.2' r='2.1'/%3E%3Ccircle cx='12' cy='3.4' r='1.9'/%3E%3Ccircle cx='15.3' cy='4.4' r='1.7'/%3E%3Ccircle cx='17.8' cy='6.6' r='1.5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 30'%3E%3Cg fill='%23000'%3E%3Cellipse cx='10.5' cy='19' rx='6' ry='9.5'/%3E%3Ccircle cx='4.2' cy='6.8' r='2.4'/%3E%3Ccircle cx='8.2' cy='4.2' r='2.1'/%3E%3Ccircle cx='12' cy='3.4' r='1.9'/%3E%3Ccircle cx='15.3' cy='4.4' r='1.7'/%3E%3Ccircle cx='17.8' cy='6.6' r='1.5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(-10deg);
}
ul.prints ul { list-style: disc; margin: 6px 0 0; padding-left: 20px; }
ul.prints ul li { margin: 0 0 2px; }

/* Footprint divider */
hr.trail {
  position: relative;
  height: 30px;
  margin: 44px 0;
  border: 0;
  overflow: visible;
  background:
    linear-gradient(var(--line), var(--line)) left center / calc(50% - 76px) 1px no-repeat,
    linear-gradient(var(--line), var(--line)) right center / calc(50% - 76px) 1px no-repeat;
}
hr.trail::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 120px;
  height: 30px;
  transform: translateX(-50%);
  background: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 30'%3E%3Cdefs%3E%3Cg id='f'%3E%3Cellipse cx='10.5' cy='19' rx='6' ry='9.5'/%3E%3Ccircle cx='4.2' cy='6.8' r='2.4'/%3E%3Ccircle cx='8.2' cy='4.2' r='2.1'/%3E%3Ccircle cx='12' cy='3.4' r='1.9'/%3E%3Ccircle cx='15.3' cy='4.4' r='1.7'/%3E%3Ccircle cx='17.8' cy='6.6' r='1.5'/%3E%3C/g%3E%3C/defs%3E%3Cg fill='%23000'%3E%3Cuse href='%23f' transform='translate%285 1%29 scale%28.75%29 rotate%28-8 10 15%29'/%3E%3Cuse href='%23f' transform='translate%2850 7%29 scale%28-.75 .75%29 rotate%288 10 15%29'/%3E%3Cuse href='%23f' transform='translate%2865 1%29 scale%28.75%29 rotate%28-8 10 15%29'/%3E%3Cuse href='%23f' transform='translate%28110 7%29 scale%28-.75 .75%29 rotate%288 10 15%29'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 30'%3E%3Cdefs%3E%3Cg id='f'%3E%3Cellipse cx='10.5' cy='19' rx='6' ry='9.5'/%3E%3Ccircle cx='4.2' cy='6.8' r='2.4'/%3E%3Ccircle cx='8.2' cy='4.2' r='2.1'/%3E%3Ccircle cx='12' cy='3.4' r='1.9'/%3E%3Ccircle cx='15.3' cy='4.4' r='1.7'/%3E%3Ccircle cx='17.8' cy='6.6' r='1.5'/%3E%3C/g%3E%3C/defs%3E%3Cg fill='%23000'%3E%3Cuse href='%23f' transform='translate%285 1%29 scale%28.75%29 rotate%28-8 10 15%29'/%3E%3Cuse href='%23f' transform='translate%2850 7%29 scale%28-.75 .75%29 rotate%288 10 15%29'/%3E%3Cuse href='%23f' transform='translate%2865 1%29 scale%28.75%29 rotate%28-8 10 15%29'/%3E%3Cuse href='%23f' transform='translate%28110 7%29 scale%28-.75 .75%29 rotate%288 10 15%29'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

/* Accordion (native <details>, no script) */
.offers { margin: 0 0 24px; border-top: 1px solid var(--line); }
.offer { border-bottom: 1px solid var(--line); }
.offer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 16px 4px;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.offer > summary::-webkit-details-marker { display: none; }
.offer > summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  font: 600 1.125rem/1 var(--sans);
  color: var(--accent-ink);
  transition: background-color .2s, border-color .2s;
}
.offer[open] > summary { color: var(--accent-ink); }
.offer[open] > summary::after { content: "\2212"; background: var(--brand); border-color: var(--brand); color: var(--ink); }
.offer-body { padding: 0 4px 24px; font-size: 1.0625rem; }

.cols { display: grid; gap: 8px 36px; }
@media (min-width: 600px) { .cols { grid-template-columns: 1fr 1fr; } }

.figure { display: inline-block; max-width: 100%; margin: 12px 12px 12px 0; vertical-align: top; }
.figure img { display: block; max-width: 100%; height: auto; }
.source { font-size: 0.8125rem; }
figcaption.source { margin-top: 6px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 0 0 24px; }
.card { padding: 22px 24px; background: #ffffff; border: 1px solid var(--line); border-radius: 14px; }
.card-addr { line-height: 1.55; }
.card-map { display: inline-flex; align-items: center; min-height: 44px; font-size: 1rem; font-weight: 600; }
.card-hours { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 1.0625rem; line-height: 1.55; }
.label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* Porträt */
.profile { display: grid; gap: 28px; margin-bottom: 8px; }
.profile-photo { display: block; width: 100%; max-width: 302px; border-radius: 14px; }
@media (min-width: 900px) {
  .profile { grid-template-columns: 1fr 302px; gap: 44px; align-items: start; }
  .profile-photo { grid-column: 2; grid-row: 1; }
}

/* Dated announcement (French home: planned group sessions) */
.notice { margin: 0 0 40px; padding: 24px 24px 8px; background: var(--soft); border-left: 4px solid var(--brand); border-radius: 14px; }
.content .notice h2 { margin: 0 0 10px; font-size: clamp(1.375rem, 2.6vw, 1.625rem); }
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 8px 0 16px; }
.event { margin: 0; padding: 16px 18px; background: #ffffff; border: 1px solid var(--line); border-radius: 12px; overflow-wrap: anywhere; }
.event div { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; padding: 5px 0; }
.event div + div { border-top: 1px solid var(--line); }
.event dt { font-size: 0.8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); padding-top: 3px; }
.event dd { margin: 0; line-height: 1.45; }
@media (max-width: 399.98px) { .event div { grid-template-columns: 1fr; gap: 0; } }

/* Buttons and closing call to action */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 26px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--light { background: var(--on-photo); color: var(--ink); }
.cta { margin: 56px 0 0; text-align: center; }
.cta .cta-q { margin: 0 0 8px; font-family: var(--serif); font-size: clamp(1.5rem, 3.2vw, 2rem); line-height: 1.2; }
.cta .cta-sub { margin: 0 0 22px; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 56px;
  padding: 26px var(--pad-x);
  background: var(--soft);
  font-size: 0.9375rem;
}
.site-footer p { margin: 0; }
.site-footer a { font-weight: 600; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover { transform: none; }
}
