/* Allergy Centre Research - plain CSS design system
   Palette: evergreen ink, pine, leaf, mint, warm paper. Blush reserved for the
   skin-test panel "positive wheal" only. */

:root {
  --ink: #0B2E26;
  --pine: #0F6E56;
  --leaf: #1D9E75;
  --leaf-bright: #27B586;
  --mint: #E7F4EC;
  --mint-deep: #D5EBE0;
  --paper: #FBFBF8;
  --card: #FFFFFF;
  --line: #E3E6E2;
  --tx: #1B2823;
  --tx-soft: #4A5851;
  --blush: #DE8E76;
  --closed: #A83A2E;
  --closed-soft: #F7E9E6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11,46,38,0.05), 0 10px 30px -18px rgba(11,46,38,0.25);
  --font-display: "Archivo", -apple-system, sans-serif;
  --font-body: "Figtree", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Archivo", -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--tx);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--pine); }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; border-radius: 4px; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }

/* Type */
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); font-weight: 700; margin: 0; }
h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.04; letter-spacing: -0.025em; font-weight: 800; }
h2 { font-size: clamp(27px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: 21px; line-height: 1.3; }
p { margin: 0 0 16px; }
.lede { font-size: 18px; color: #3F4D47; max-width: 60ch; }
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pine);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 3px var(--mint);
}
.mono { font-family: var(--font-mono); }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--pine); color: #fff; }
.btn-solid:hover { background: var(--ink); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--pine); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--pine); background: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-outline-light:hover { border-color: #fff; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,251,248,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 64px; width: auto; }
.nav-desktop { display: flex; align-items: center; gap: 26px; }
.nav-desktop a {
  color: var(--tx); text-decoration: none; font-size: 15px; font-weight: 600;
}
.nav-desktop a:hover { color: var(--pine); }
.nav-desktop .nav-ext { color: var(--tx-soft); font-size: 13.5px; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 10px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px;
}
.nav-mobile {
  display: none; border-top: 1px solid var(--line); background: #fff; padding: 8px 0 16px;
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block; padding: 13px 24px; text-decoration: none; color: var(--tx); font-size: 16px; font-weight: 500;
}

/* Hero */
.hero { background: linear-gradient(180deg, #F1F8F3 0%, var(--paper) 90%); border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
  padding-top: 72px; padding-bottom: 80px;
}
.hero h1 .accent { color: var(--pine); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-note { font-family: var(--font-mono); font-size: 12px; color: var(--tx-soft); margin-top: 22px; letter-spacing: 0.04em; }

/* Signature: skin-test panel */
.panel-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 14px;
}
.panel-card figcaption {
  font-family: var(--font-mono); font-size: 11px; color: var(--tx-soft);
  letter-spacing: 0.08em; padding: 12px 4px 6px; border-top: 1px dashed var(--line); margin-top: 8px;
}
.wheal-pulse { animation: whealPulse 3.2s ease-in-out infinite; transform-origin: center; }
@keyframes whealPulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.12); }
}
.rise { opacity: 0; transform: translateY(10px); animation: rise 600ms ease forwards; }
.rise-2 { animation-delay: 120ms; }
.rise-3 { animation-delay: 240ms; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Trust strip */
.trust {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.trust-inner {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 18px 0;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--tx-soft); text-transform: uppercase;
}
.trust-inner span b { color: var(--ink); font-weight: 600; }

/* Study cards */
.study-card {
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 16px;
  text-decoration: none; color: inherit;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.study-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--mint-deep); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em;
  padding: 5px 10px; border-radius: 999px; font-weight: 600;
}
.chip-enrolling { background: var(--mint); color: var(--pine); }
.chip-enrolling::before { content: "\25CF  "; color: var(--leaf); }
.chip-closed { background: var(--closed-soft); color: var(--closed); }
.chip-phase { background: #F1F2F0; color: var(--tx-soft); }
.study-card h3 { margin-bottom: 4px; }
.study-cond { font-size: 13.5px; color: var(--tx-soft); margin-bottom: 10px; }
.study-desc { font-size: 14.5px; color: var(--tx); margin: 0 0 14px; max-width: 66ch; }
.study-meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--tx-soft); letter-spacing: 0.03em;
}
.study-go {
  text-align: center; background: var(--mint); border-radius: 10px; padding: 16px 20px; min-width: 132px;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.study-go .mono { display: block; font-size: 10.5px; color: var(--pine); letter-spacing: 0.1em; margin-bottom: 5px; }
.study-card.closed { background: #FCFCFA; }
.study-card.closed h3, .study-card.closed .study-desc { color: var(--tx-soft); }

/* Steps (how it works) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 36px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  position: relative;
}
.step-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--mint); color: var(--pine);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  box-shadow: 0 0 0 4px rgba(29,158,117,0.12);
  margin-bottom: 14px;
}
.step h3 { font-size: 17px; margin-bottom: 6px; font-family: var(--font-body); font-weight: 600; }
.step p { font-size: 13.5px; color: var(--tx-soft); margin: 0; }

/* About + conditions */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
.cond-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cond {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 16px; font-size: 13.5px; font-weight: 600; color: var(--ink);
}

/* Sponsors band */
.band { background: var(--ink); color: #EAF3EE; }
.band .eyebrow { color: var(--leaf-bright); }
.band .eyebrow::before { box-shadow: 0 0 0 3px rgba(39,181,134,0.25); }
.band h2 { color: #fff; }
.band .lede { color: rgba(234,243,238,0.8); }
.sponsor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 36px 0; }
.sponsor {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px; padding: 22px;
}
.sponsor b { display: block; color: var(--leaf-bright); font-size: 14px; margin-bottom: 6px; }
.sponsor span { font-size: 13.5px; line-height: 1.6; color: rgba(234,243,238,0.82); }

/* Study page */
.study-hero { background: linear-gradient(180deg, #F1F8F3 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.study-hero-inner { padding: 56px 0 40px; max-width: 780px; }
.metabar {
  display: flex; gap: 26px; flex-wrap: wrap;
  border-top: 1px dashed var(--line);
  margin-top: 26px; padding-top: 18px;
  font-family: var(--font-mono); font-size: 12px; color: var(--tx-soft);
}
.metabar b { display: block; color: var(--ink); font-size: 13px; margin-top: 2px; font-weight: 600; }
.content-narrow { max-width: 780px; }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; }
.checklist li {
  padding: 12px 0 12px 34px; position: relative; border-bottom: 1px dashed var(--line);
  font-size: 15px;
}
.checklist li::before {
  content: "\2713"; position: absolute; left: 4px; top: 11px;
  color: var(--leaf); font-weight: 700;
}
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.info-card {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--leaf);
  border-radius: 12px; padding: 24px;
}
.info-card h3 { font-size: 16px; font-family: var(--font-body); font-weight: 600; margin-bottom: 8px; }
.info-card p { font-size: 14px; color: var(--tx-soft); margin: 0; }
.photo-disclosure { margin-top: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.photo-disclosure summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 14.5px; color: var(--pine);
  list-style: none;
}
.photo-disclosure summary::before { content: "+  "; font-family: var(--font-mono); }
.photo-disclosure[open] summary::before { content: "\2212  "; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px 12px; }
.photo-grid img { border-radius: 8px; }
.photo-cap { font-size: 12px; color: var(--tx-soft); padding: 0 20px 16px; font-family: var(--font-mono); }

/* Wizard */
.wizard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px; max-width: 640px;
}
.wizard-progress {
  height: 4px; background: var(--mint); border-radius: 4px; overflow: hidden; margin-bottom: 24px;
}
.wizard-progress i { display: block; height: 100%; background: var(--leaf); width: 0; transition: width 240ms ease; }
.wizard-q { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 6px; font-family: var(--font-display); letter-spacing: -0.01em; }
.wizard-helper { font-size: 13.5px; color: var(--tx-soft); margin-bottom: 18px; }
.wizard-opts { display: grid; gap: 10px; }
.wizard-opt {
  text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; font-size: 15px; font-weight: 500; cursor: pointer; font-family: var(--font-body);
  transition: border-color 120ms ease, background 120ms ease;
}
.wizard-opt:hover { border-color: var(--leaf); background: #fff; }
.wizard-num { width: 120px; padding: 12px 14px; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; font-family: var(--font-body); }
.wizard-row { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.wizard-back { background: none; border: none; color: var(--tx-soft); font-size: 13px; cursor: pointer; padding: 8px 0; }
.wizard-note { font-family: var(--font-mono); font-size: 11px; color: var(--tx-soft); margin-top: 18px; letter-spacing: 0.04em; }
.wizard-outcome h3 { margin-bottom: 8px; }
.wizard-outcome p { font-size: 15px; color: var(--tx-soft); }

/* Forms */
.form-grid { display: grid; gap: 14px; margin-top: 8px; }
.form-grid label { font-size: 13px; font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: var(--font-body);
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--tx);
}
.form-grid textarea { resize: vertical; }
.form-hint { font-size: 12.5px; color: var(--tx-soft); margin-top: 5px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-status { font-size: 14px; margin-top: 12px; min-height: 20px; }
.form-status.ok { color: var(--pine); font-weight: 600; }
.form-status.err { color: var(--closed); font-weight: 600; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.contact-line { display: grid; grid-template-columns: 20px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.contact-line .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--tx-soft); text-transform: uppercase; }
.contact-line .v { font-size: 15.5px; color: var(--ink); font-weight: 500; }
.contact-line .v a { text-decoration: none; color: var(--ink); }
.contact-line .v a:hover { color: var(--pine); }
.dot-k { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); margin-top: 7px; box-shadow: 0 0 0 3px var(--mint); }

/* CTA band */
.cta-band { background: var(--mint); border-top: 1px solid var(--mint-deep); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 44px 0; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(234,243,238,0.75); font-size: 13.5px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding: 56px 0 32px; }
.site-footer img { height: 72px; width: auto; margin-bottom: 16px; }
.site-footer a { color: rgba(234,243,238,0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-k { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--leaf-bright); margin-bottom: 12px; }
.footer-links a { display: block; padding: 5px 0; }
.footer-base {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0 28px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: rgba(234,243,238,0.5);
}

/* FAQ */
.faq-q { font-weight: 700; color: var(--ink); font-size: 16.5px; margin: 24px 0 4px; }
.jumps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.jumps .chip { text-decoration: none; }

/* Prose (privacy) */
.prose { max-width: 720px; }
.prose h2 { font-size: 21px; margin: 36px 0 10px; }
.prose p, .prose li { font-size: 15px; color: var(--tx); }

/* Responsive */
@media (max-width: 940px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .sponsor-grid { grid-template-columns: 1fr 1fr; }
  .trust-inner { grid-template-columns: 1fr 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 700px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: block; }
  .section { padding: 60px 0; }
  .study-card { grid-template-columns: 1fr; gap: 16px; }
  .study-go { min-width: 0; }
  .steps, .sponsor-grid, .cond-grid, .duo, .form-2col, .photo-grid { grid-template-columns: 1fr; }
  .brand img { height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wheal-pulse, .rise, .rise-2, .rise-3 { animation: none; opacity: 1; transform: none; }
  .btn, .study-card { transition: none; }
}

/* Chat widget */
.chat-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  background: var(--pine); color: #fff; border: none; cursor: pointer;
  padding: 13px 20px; border-radius: 999px; font-family: var(--font-body);
  font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow);
}
.chat-launch:hover { background: var(--ink); }
.chat-panel {
  position: fixed; right: 20px; bottom: 76px; z-index: 91;
  width: min(370px, calc(100vw - 32px));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 18px 50px -12px rgba(11,46,38,0.35);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-head {
  background: var(--ink); color: #fff; padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
}
.chat-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; padding: 0 4px; }
.chat-disclaimer {
  font-size: 11px; line-height: 1.5; color: var(--tx-soft);
  background: var(--mint); padding: 8px 14px; border-bottom: 1px solid var(--mint-deep);
}
.chat-log { padding: 14px; overflow-y: auto; max-height: 340px; min-height: 180px; display: flex; flex-direction: column; gap: 10px; }
.cmsg { max-width: 85%; padding: 10px 13px; border-radius: 12px; font-size: 14px; line-height: 1.55; }
.cmsg.bot { background: var(--mint); color: var(--tx); align-self: flex-start; border-bottom-left-radius: 4px; }
.cmsg.user { background: var(--pine); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.cmsg.thinking { color: var(--tx-soft); }
.cmsg a { color: var(--pine); font-weight: 600; }
.cmsg.user a { color: #fff; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.cchip {
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer; font-family: var(--font-body);
}
.cchip:hover { border-color: var(--leaf); }
.chat-form { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.chat-form input {
  flex: 1; padding: 11px 13px; font-size: 14px; border: 1px solid var(--line);
  border-radius: 10px; font-family: var(--font-body);
}
.chat-form .btn { padding: 11px 16px; font-size: 14px; }
@media (max-width: 480px) {
  .chat-panel { right: 12px; bottom: 70px; }
  .chat-log { max-height: 46vh; }
}
