/* ==========================================================================
   Accessible Data Storytelling — landing page styles
   Built for accessibility: high contrast, large type, visible focus,
   reduced-motion support, and a print stylesheet.
   ========================================================================== */

:root {
  /* Palette (derived from the study flyer) */
  --blue-900: #0A3A7A;
  --blue-700: #0F4FA8;   /* links on white: ~7.5:1 */
  --blue-600: #1A66D6;   /* primary button bg  */
  --blue-300: #9DBEF0;
  --blue-100: #E8F1FE;
  --blue-050: #F4F8FF;

  --ink:      #14181F;
  --ink-soft: #3D4757;
  --muted:    #5A6474;

  --amber-600: #A85D00;
  --amber-100: #FFF4E0;
  --amber-300: #F0A93B;

  --green-700: #0B6B41;
  --green-100: #E4F5EC;

  --white: #FFFFFF;
  --surface: #F6F9FE;
  --line: #D6E2F5;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(16, 42, 84, .06), 0 2px 8px rgba(16, 42, 84, .06);
  --shadow-md: 0 4px 14px rgba(16, 42, 84, .10), 0 12px 32px rgba(16, 42, 84, .08);

  --wrap: 1120px;
  --wrap-narrow: 760px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;   /* clears the sticky header */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.0625rem, 0.55vw + 0.95rem, 1.1875rem); /* 17px → 19px */
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; color: var(--blue-900); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.05rem, 3.4vw + 1rem, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 1.6vw + 1.1rem, 2.2rem); letter-spacing: -.015em; }
h3 { font-size: clamp(1.15rem, 0.6vw + 1rem, 1.35rem); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-700); text-underline-offset: 3px; }
a:hover { color: var(--blue-900); }

strong { font-weight: 700; }

img, svg { max-width: 100%; height: auto; }

/* ---------- Focus: always visible, never removed ---------- */
:focus-visible {
  outline: 3px solid var(--amber-300);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--blue-900);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; color: var(--white); }

/* ---------- Layout helpers ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }
.prose { max-width: 48em; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding-block: .6rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--blue-700);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.01em;
}
.brand-mark { display: inline-flex; }
.brand-text { font-size: 1.02rem; line-height: 1.15; }
.brand:hover { color: var(--blue-900); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: .5rem .8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
  color: var(--ink-soft);
}
.site-nav a:hover { background: var(--blue-100); color: var(--blue-900); }
.site-nav .nav-cta {
  background: var(--blue-600);
  color: var(--white);
  padding-inline: 1.15rem;
}
.site-nav .nav-cta:hover { background: var(--blue-700); color: var(--white); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 480px at 12% -10%, var(--blue-100) 0%, rgba(232,241,254,0) 65%),
    linear-gradient(180deg, var(--blue-050) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.75rem, 5vw, 4.5rem);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.eyebrow {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--blue-700);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.lede { font-size: 1.12em; color: var(--ink-soft); max-width: 34em; }

/* Facts strip */
.facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1.6rem 0 0;
  padding: 0;
}
.facts li {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .5rem 1rem;
  font-size: .95rem;
  box-shadow: var(--shadow-sm);
}
.fact-ico { font-size: 1.1em; line-height: 1; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;   /* keeps both buttons the same height */
  gap: .8rem;
  margin-top: 2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .1rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.03rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-note { font-weight: 500; font-size: .76rem; opacity: .85; }

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { background: var(--blue-700); color: var(--white); }

.btn-secondary {
  background: var(--white);
  color: var(--blue-700);
  border-color: var(--blue-600);
}
.btn-secondary:hover { background: var(--blue-100); color: var(--blue-900); }
.btn-secondary.on-light { background: var(--white); }

.btn-lg { font-size: 1.15rem; padding: 1.05rem 2.4rem; }

/* ---------- Hero art ---------- */
.hero-art { display: flex; justify-content: center; }
.art { width: 100%; max-width: 460px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.75rem, 5vw, 4.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-lede { font-size: 1.08em; color: var(--ink-soft); max-width: 46em; }

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin-top: 1.75rem;
  border: 1px solid;
}
.callout p { color: var(--ink-soft); }
.callout-title { margin-bottom: .35rem; font-size: 1.1rem; }

.callout-info {
  background: var(--blue-050);
  border-color: var(--blue-300);
}
.callout-info .callout-title { color: var(--blue-900); }

.callout-note {
  background: var(--amber-100);
  border-color: var(--amber-300);
}
.callout-note .callout-title { color: var(--amber-600); }
.callout-note a { color: var(--amber-600); font-weight: 600; }

/* ---------- Checklist ---------- */
.check-list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: .9rem;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  font-size: 1.02rem;
}
.check {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: .1rem;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
}

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 1rem;
}
.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue-600);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 1.35rem;
  box-shadow: var(--shadow-sm);
}
.step-num {
  position: absolute;
  top: -20px;
  left: 1.35rem;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-900);
  color: var(--white);
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.step h3 { margin-top: .85rem; font-size: 1.12rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* ---------- Example banner ---------- */
.example-banner {
  margin-top: 2.25rem;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: var(--shadow-md);
}
.example-banner h3 { color: var(--white); margin-bottom: .3rem; }
.example-banner p { color: #D8E6FB; margin: 0; max-width: 40em; }

/* ---------- Sign-up ---------- */
.section-signup {
  background:
    radial-gradient(900px 380px at 50% 0%, var(--blue-100) 0%, rgba(232,241,254,0) 70%),
    var(--white);
}
.signup-alt { margin-top: 1.25rem; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.contact-card h3 { font-size: 1.05rem; margin-bottom: .6rem; }
.contact-card p { margin: 0 0 .3rem; color: var(--ink-soft); font-size: .99rem; }
.contact-name { font-weight: 700; color: var(--ink); font-size: 1.08rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blue-900);
  color: #C6D9F5;
  padding-block: 2rem;
}
.footer-inner { display: grid; gap: .6rem; }
.footer-irb { font-size: .95rem; margin: 0; }
.footer-irb a, .site-footer a { color: var(--white); }
.footer-copy { font-size: .88rem; margin: 0; color: #9FBBE4; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .art { max-width: 340px; }
}

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; }
  .site-nav ul { flex-wrap: wrap; gap: .2rem; }
  .site-nav a { padding: .45rem .65rem; font-size: .92rem; }
  .brand-text { font-size: .95rem; }
  .hero-actions .btn { width: 100%; }
  .example-banner { flex-direction: column; align-items: flex-start; }
  .example-banner .btn { width: 100%; }
}

@media (max-width: 400px) {
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: flex-start; }
}

/* Very small screens: keep only the primary action in the nav.
   The page is a single short scroll and the hero already offers both
   calls to action, so dropping the jump links reduces clutter. */
@media (max-width: 560px) {
  .site-nav li:not(:last-child) { display: none; }
  .site-nav .nav-cta { padding-inline: 1.35rem; }
}

/* ---------- Motion & contrast preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --ink-soft: #1D2530; --muted: #333B48; --line: #8FAEDC; }
  .btn-secondary { border-width: 3px; }
}

/* ---------- Print (works as a paper flyer) ---------- */
@media print {
  .site-header, .skip-link, .hero-actions, .example-banner .btn,
  .section-signup .btn, .site-footer { display: none !important; }
  body { font-size: 11.5pt; color: #000; }
  .hero, .section, .section-alt, .section-signup { background: #fff !important; padding-block: .6rem; }
  .check-list li, .step, .contact-card, .callout { box-shadow: none; break-inside: avoid; }
  .example-banner { background: #fff !important; color: #000; border: 1.5pt solid #000; }
  .example-banner h3, .example-banner p { color: #000; }
  a { color: #000; }
  a[href^="http"]::after, a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
