/* SNARE Lab — the one stylesheet (DESIGN.md v2; layout of 1 Oct 2026: landing page + Patients / Clinics pages).
   Monochrome, system fonts, no accent colour, no cards, no icons, no shadows. */

:root {
  /* Colour tokens (DESIGN.md section 2) — only these */
  --black: #000000;
  --graphite: #1d1d1f;
  --white: #ffffff;
  --snow: #f5f5f7;
  --text-on-dark: #f5f5f7;
  --muted-on-dark: #a1a1a6;
  --text-on-light: #1d1d1f;
  --muted-on-light: #6e6e73;
  --hair-dark: rgba(255, 255, 255, 0.14);
  --hair-light: rgba(0, 0, 0, 0.10);

  /* Type and layout */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --page: 1100px;
  --gutter: 20px;
}
@media (min-width: 900px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text-on-light);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }

/* Type (DESIGN.md section 3). Headlines never break to three lines: the size also shrinks
   with the headline's length (--h1c = number of characters, set on each h1). */
h1, h2 { font-weight: 600; margin: 0; }
h1 {
  font-size: min(clamp(2.75rem, 7vw, 6rem), calc(min(100vw - 2 * var(--gutter), 980px) * 2 / (var(--h1c, 20) * 0.56)));
  letter-spacing: -0.035em;
  line-height: 1.02;
}
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 0.75rem; }
* + h2 { margin-top: 4rem; }
h2.small { font-size: 1.0625rem; letter-spacing: 0; line-height: 1.55; margin: 3rem 0 0.25rem; }
p { margin: 0 0 1rem; max-width: 62ch; }
.lead { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.4; color: var(--muted-on-light); }
.caption { font-size: 0.8125rem; line-height: 1.6; color: var(--muted-on-light); }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
/* Secondary actions: text links with a trailing "›" (DESIGN.md section 4) */
.more { text-decoration: none; font-weight: 500; }
.more:hover { text-decoration: underline; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--white); color: var(--black); padding: 0.5rem 0.75rem; }

/* Buttons: pills, 46px (DESIGN.md section 4) */
.btn, .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.btn:hover, .pill:hover { text-decoration: none; opacity: 0.88; }

/* Header (BRIEF.md section 3, DESIGN.md section 4): sticky, black at 86 % with blur, hairline below.
   Desktop: one 48px row. Under 640px: row 1 wordmark + EN · HR (+ email), row 2 the four links. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hair-dark);
  color: var(--text-on-dark);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: var(--page);
  height: 48px;
  margin: 0 auto;
  padding: 0 20px;
}
.site-header a { color: var(--text-on-dark); text-decoration: none; }
.site-header a:hover { text-decoration: underline; text-underline-offset: 5px; }
.wordmark { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.header-nav { display: flex; gap: 20px; margin-left: auto; font-size: 13px; font-weight: 500; white-space: nowrap; }
.header-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.lang-switch { font-size: 13px; color: var(--muted-on-dark); white-space: nowrap; }
.site-header .lang-switch a { color: var(--muted-on-dark); }
.site-header .lang-switch a[aria-current="true"] { color: var(--text-on-dark); font-weight: 500; }
.header-email { font-size: 13px; color: var(--muted-on-dark); white-space: nowrap; }
.site-header a.header-email { color: var(--muted-on-dark); }
@media (max-width: 639px) {
  .header-inner { height: auto; flex-wrap: wrap; gap: 6px 14px; padding: 12px 20px; }
  .wordmark { flex: 1; }
  .lang-switch { order: 2; }
  .header-email { order: 3; }
  .header-nav { order: 4; width: 100%; margin-left: 0; gap: 18px; padding-top: 4px; }
}

/* Home — 1. hero (BRIEF.md section 5) */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78vh;
  background: var(--black);
  color: var(--text-on-dark);
  text-align: center;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: brightness(0.7); }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 55%, var(--black) 100%),
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.6) 100%);
}
.hero-text { position: relative; z-index: 1; padding: 96px var(--gutter); max-width: 980px; }
.hero h1 { margin: 0 auto; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 40px auto 0; max-width: none; }
.pill { background: var(--white); color: var(--black); height: 46px; min-width: 150px; padding: 0 28px; font-size: 16px; }
@media (max-width: 419px) {
  .pills { flex-direction: column; align-items: stretch; max-width: 280px; }
}

/* Home — 2. stripe */
.stripe { background: var(--snow); text-align: center; padding: 84px var(--gutter); }
.stripe .eyebrow { margin: 0 auto 18px; font-size: 0.8125rem; color: var(--muted-on-light); }
.stripe-text {
  margin: 0 auto;
  max-width: 38ch;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--text-on-light);
}

/* Home — 3. specimen band: full-bleed image, caption, reference and trust line (DESIGN.md section 5) */
.specimen { background: var(--black); color: var(--text-on-dark); text-align: center; }
.specimen figure { margin: 0; }
.specimen img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 40%; }
@media (min-width: 768px) { .specimen img { aspect-ratio: 21 / 9; max-height: 560px; } }
.specimen figcaption { padding: 40px var(--gutter) 72px; }
.specimen .caption { max-width: 70ch; margin: 0 auto; color: var(--muted-on-dark); }
.specimen .caption a { color: var(--text-on-dark); }
.specimen .trust { margin-top: 28px; }

/* Inner pages (DESIGN.md section 4): white, left-aligned column, 72px top padding */
.page { max-width: var(--page); margin: 0 auto; padding: 72px var(--gutter) 96px; }
.col { max-width: 720px; }
.col-form { max-width: 620px; }
.page-title {
  font-size: min(clamp(2.2rem, 5vw, 4rem), calc(min(100vw - 2 * var(--gutter), 720px) * 2 / (var(--h1c, 20) * 0.56)));
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin-bottom: 18px;
}
.page .lead { margin-bottom: 1.5rem; }
.page > .col > p .btn { margin-top: 0.25rem; }
.note { margin-top: 1.5rem; font-size: 15px; color: var(--muted-on-light); }
.form-intro { margin-top: 1.5rem; }
.plain-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.plain-list li { padding: 0.35rem 0; }
.publications { padding-left: 1.2rem; }
.publications li { margin-bottom: 0.5rem; }
.contact-email { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 1.5rem; }
.contact-email a { text-decoration: none; }
.article-body { color: var(--muted-on-light); margin-bottom: 2rem; }

/* Native forms (DESIGN.md section 4, forms paragraph; forms-spec.md) */
.site-form { margin: 2rem 0 1.5rem; max-width: 560px; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: 6px; font-size: 0.8125rem; color: var(--muted-on-light); }
.site-form input[type="text"], .site-form input[type="email"], .site-form select, .site-form textarea {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--hair-light);
  border-radius: 10px;
  background-color: var(--white);
  color: var(--text-on-light);
  font: inherit;
  font-size: 16px;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
.site-form select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.site-form textarea { height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.site-form input:focus, .site-form select:focus, .site-form textarea:focus {
  outline: none;
  border-color: var(--graphite);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.field.check { display: flex; align-items: flex-start; gap: 10px; margin-top: 1.4rem; }
.field.check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--black); }
.field.check label { margin: 0; font-size: 0.875rem; line-height: 1.45; color: var(--text-on-light); }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 720px) { .field-row { grid-template-columns: 1fr 1fr; } }
.site-form .btn { margin-top: 0.5rem; border: 0; cursor: pointer; font-family: inherit; }
.site-form .btn:disabled { opacity: 0.55; cursor: default; }
.form-error { margin: 0.75rem 0 0; font-size: 0.8125rem; color: var(--graphite); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Success block replaces the form in place: H3 and one muted line between two hairlines */
.form-success { margin: 2rem 0 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--hair-light); border-bottom: 1px solid var(--hair-light); outline: none; }
.form-success h3 { margin: 0 0 0.35rem; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.form-success p { margin: 0; color: var(--muted-on-light); }

/* Questions (patients pages): native details, hairline between items, "+" that becomes "–" */
.faq { margin-top: 1rem; }
.qa { border-top: 1px solid var(--hair-light); padding: 18px 0; }
.qa:last-child { border-bottom: 1px solid var(--hair-light); }
.qa summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-weight: 300; font-size: 26px; line-height: 1; color: var(--muted-on-light); }
.qa[open] summary::after { content: "–"; }
.qa p { margin: 12px 0 0; color: var(--muted-on-light); }

/* Footer: black, caption size, hairline on top */
.site-footer {
  background: var(--black);
  color: var(--muted-on-dark);
  border-top: 1px solid var(--hair-dark);
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.5;
  padding: 40px var(--gutter) 60px;
}
.site-footer p { margin: 10px auto 0; max-width: 60ch; }
.site-footer a { color: var(--text-on-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 16px; }

/* Motion: the "reveal" fade only (DESIGN.md section 6); visible without JavaScript */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.hero-text .reveal:nth-child(2) { transition-delay: 80ms; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
