/* ============================================================
   THE SIGNAL — landing page
   Editorial medical-communication brand
   ============================================================ */

:root {
  /* palette */
  --bg: #FBFAF7;
  --ink: #15140F;
  --muted: #272620;
  --faint: #1a1e44;
  --line: #E4E1D7;
  --line-strong: #15140F;
  --accent: #9EE6D4;          /* mint panel */
  --accent-ink: #15140F;
  --cta: #362fb9;             /* blue-violet */
  --cta-ink: #FFFFFF;
  --card: #FFFFFF;

  /* type */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Archivo', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  --maxw: 1240px;
  --gutter: 40px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- shared type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ink);
  display: inline-block;
}

.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin: 0;
}

.serif-quote {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
}

.lead {
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 52ch;
  text-wrap: pretty;
}

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 100px;
  padding: 13px 24px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-cta {
  background: var(--cta);
  color: var(--cta-ink);
}
.btn-cta:hover { filter: brightness(1.08); }

.btn-ink {
  background: var(--ink);
  color: var(--bg);
}
.btn-ink:hover { filter: brightness(1.25); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-outline:hover { background: var(--ink); color: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn .arrow {
  font-family: var(--font-mono);
  font-size: 14px;
}

/* NAV lives in nav.css (partials/nav.html) */

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 78px 0 0;
}
.hero-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}
.hero h1 {
  font-size: clamp(64px, 10vw, 150px);
}
.hero-aside {
  max-width: 360px;
  padding-bottom: 12px;
}
.hero-aside .lead { font-size: 18px; }
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* lime panel + signal viz */
.hero-panel {
  margin-top: 52px;
  background: var(--accent);
  border-radius: 26px;
  padding: 40px 48px 0;
  position: relative;
  overflow: hidden;
}
.hero-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 8px;
}
.panel-stat {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.2;
  font-weight: 500;
}
.panel-stat span {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  display: block;
  margin-top: 8px;
  letter-spacing: 0;
  max-width: 20ch;
}
.panel-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: var(--ink);
  color: var(--bg);
  padding: 7px 13px;
  border-radius: 100px;
  white-space: nowrap;
}
.signal-svg { width: 100%; display: block; }

/* ============================================================
   WHY — statement strip
   ============================================================ */
.section { padding: 110px 0; }
.section-sm { padding: 80px 0; }

.why {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.why-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
.why-statement {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.why-statement em {
  font-style: italic;
  color: var(--cta);
}

/* section header block */
.sec-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 56px;
}
.sec-head h2 {
  font-size: clamp(40px, 5.4vw, 78px);
  margin: 18px 0 0;
}
.sec-head .lead { margin-top: 20px; font-size: 19px; }
.sec-head-actions { padding-bottom: 8px; }

/* ============================================================
   THE METHOD — framework + articles
   ============================================================ */
.framework {
  background: var(--ink);
  color: var(--bg);
  border-radius: 26px;
  padding: 52px 52px 44px;
  margin-bottom: 64px;
}
.framework-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}
.framework-top .eyebrow { color: var(--accent); }
.framework-top .eyebrow::before { background: var(--accent); }
.framework h3 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
  margin: 4px 0 0;
  letter-spacing: -0.01em;
}
.framework-chart { margin: 30px 0 6px; }
.ap-svg { width: 100%; display: block; overflow: visible; }
.phase-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  border-top: 1px solid rgba(255,255,255,.16);
  padding-top: 22px;
  margin-top: 14px;
}
.phase {
  font-size: 14px;
}
.phase .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.phase .pname {
  font-weight: 600;
  margin: 6px 0 5px;
  font-size: 15px;
}
.phase .pdesc { color: rgba(255,255,255,.95); line-height: 1.4; }

/* article cards */
.articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.article {
  background: var(--bg);
  padding: 30px 30px 34px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  transition: background .25s ease;
}
.article:hover { background: var(--card); }
.article .a-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 26px;
}
.article h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.article p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.5;
  margin: 0;
}
.article .a-foot {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}
.article .a-foot .arrow { font-family: var(--font-mono); transition: transform .2s; }
.article:hover .a-foot .arrow { transform: translateX(4px); }

/* ============================================================
   THE MYELIN — auditor tool mock
   ============================================================ */
.myelin { background: var(--ink); color: var(--bg); }
.myelin .eyebrow { color: var(--accent); }
.myelin .eyebrow::before { background: var(--accent); }
.myelin .sec-head h2 { color: var(--bg); }
.myelin .sec-head .lead { color: rgba(255,255,255,.95); }

.tools-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.tool-chip {
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid var(--ink);
  border-radius: 100px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}
.tool-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.tool-chip.active { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.tool-chip.active .dot { background: var(--ink); }

/* auditor window */
.auditor {
  margin-top: 44px;
  background: #1E1D17;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.7);
}
.auditor-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: #181712;
}
.auditor-bar .dots { display: flex; gap: 7px; }
.auditor-bar .dots i { width: 11px; height: 11px; border-radius: 50%; display: block; background: rgba(255,255,255,.22); }
.auditor-bar .title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,.65);
}
.auditor-bar .title b { color: var(--accent); font-weight: 400; }
.auditor-bar .pill {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.16);
  padding: 5px 11px;
  border-radius: 100px;
}
.auditor-body {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
}
.auditor-doc {
  padding: 30px 34px;
  border-right: 1px solid rgba(255,255,255,.1);
}
.auditor-doc .doc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: 18px;
}
.auditor-doc p {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,.9);
  margin: 0 0 14px;
}
.mk {
  border-radius: 3px;
  padding: 1px 2px;
  cursor: help;
  position: relative;
  border-bottom: 2px solid;
}
.mk-warn { background: rgba(255,176,32,.16); border-color: rgba(255,176,32,.8); }
.mk-risk { background: rgba(255,90,90,.16); border-color: rgba(255,90,90,.85); }
.mk-good { background: rgba(120,225,140,.15); border-color: rgba(120,225,140,.7); }

.auditor-panel { padding: 28px 30px; }
.score-ring {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}
.score-ring svg { flex: none; }
.score-ring .sr-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.score-ring .sr-val {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  margin-top: 4px;
}
.score-ring .sr-delta { font-size: 13px; color: #7DE18C; margin-top: 6px; font-weight: 600; }

.audit-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.audit-item .ai-icon {
  width: 22px; height: 22px; border-radius: 6px; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  margin-top: 1px;
}
.ai-warn { background: rgba(255,176,32,.18); color: #FFB020; }
.ai-risk { background: rgba(255,90,90,.18); color: #FF7A7A; }
.ai-good { background: rgba(120,225,140,.16); color: #7DE18C; }
.audit-item .ai-body strong { font-size: 14.5px; font-weight: 600; display: block; margin-bottom: 3px; }
.audit-item .ai-body span { font-size: 13.5px; color: rgba(255,255,255,.58); line-height: 1.45; }

/* ============================================================
   THE MYELIN — media panels (toggled by the tool chips)
   ============================================================ */
.tools-media { position: relative; }
.tool-media { display: none; }
.tool-media.active { display: block; }
.tool-media img,
.tool-media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.tool-media iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 20px;
}
.tool-media-placeholder {
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  border: 1px dashed var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   THE LIBRARY / THE ARCHIVE
   ============================================================ */
.library-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.lib-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  cursor: pointer;
  group: lib;
}
.lib-cover {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 40%, var(--bg)), var(--bg));
  border: 1px solid var(--line);
}
.lib-card:hover .lib-cover { border-color: var(--ink); }
.lib-cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lib-cover .lib-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.lib-cover[data-art="1"] { background: linear-gradient(135deg, color-mix(in srgb, var(--cta) 16%, var(--bg)), var(--bg)); }
.lib-cover[data-art="2"] { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, var(--bg)), var(--bg)); }
.lib-cover[data-art="3"] { background: linear-gradient(135deg, color-mix(in srgb, var(--ink) 8%, var(--bg)), var(--bg)); }
.lib-cover .lib-num {
  position: absolute;
  top: 16px; left: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink);
  z-index: 2;
  mix-blend-mode: multiply;
}
.lib-cover .lib-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}
.lib-meta { display: flex; flex-direction: column; gap: 9px; }
.lib-meta .lib-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  display: flex; gap: 12px; align-items: center;
}
.lib-card h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.lib-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.5;
  max-width: 46ch;
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.cta {
  background: var(--accent);
  color: var(--accent-ink);
}
.cta-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.cta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 6.5vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 16px 0 0;
}
.cta-right p { font-size: 18px; line-height: 1.55; margin: 0 0 14px; max-width: 46ch; }
.cta-right p.fine { font-size: 16px; color: rgba(21,20,15); }
.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  max-width: 480px;
}
.signup input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 15px 20px;
  border-radius: 100px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  outline: none;
}
.signup input::placeholder { color: rgba(21,20,15,.5); }
.signup input:focus { box-shadow: 0 0 0 3px rgba(21,20,15,.15); }
.signup input[aria-invalid="true"] { border-color: #b00020; box-shadow: 0 0 0 3px rgba(176,0,32,.18); }
.signup .ok {
  display: none;
  font-weight: 600;
  align-items: center;
  gap: 9px;
}
.signup.done input, .signup.done .btn { display: none; }
.signup.done .ok { display: flex; }

/* FOOTER lives in footer.css (partials/footer.html) */

/* ============================================================
   ACCESSIBILITY — WCAG 2.0 AA
   ============================================================ */

/* Skip-to-content link — visible only on keyboard focus */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 22px;
  font-weight: 600;
  font-size: 15px;
  border-radius: 0 0 10px 0;
  white-space: nowrap;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

/* Screen-reader-only utility (visually hidden but announced) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Keyboard focus ring — applies only on keyboard navigation */
:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* Form error text */
.signup-error {
  flex-basis: 100%;
  font-size: 13.5px;
  color: #b00020;
  display: none;
}
.signup-error:not(:empty) { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  :root { --gutter: 24px; }
  .hero-head { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .hero-aside { max-width: 100%; }
  .why-grid { grid-template-columns: 1fr; gap: 24px; }
  .articles { grid-template-columns: 1fr; }
  .auditor-body { grid-template-columns: 1fr; }
  .auditor-doc { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); }
  .library-grid { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; gap: 32px; }
  .phase-row { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .framework { padding: 36px 26px 32px; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head-actions { padding-bottom: 0; }
}

@media (max-width: 540px) {
  .hero h1 { font-size: clamp(48px, 16vw, 80px); }
  .hero-panel { padding: 26px 22px 0; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .phase-row { grid-template-columns: 1fr; }
  .framework { padding: 28px 20px; }
  .signup { flex-direction: column; }
  .signup .btn { justify-content: center; }
}
