:root {
  --ink: #0b1f2a;
  --ink-soft: #3a5360;
  --mist: #e7f1f4;
  --paper: #f4f8fa;
  --teal: #1a6b7a;
  --teal-deep: #0b3a4a;
  --accent: #c45c26;
  --line: #c9 rec8d4;
  --ok: #1f7a4c;
  --danger: #9b2c2c;
  --font-display: "Fraunces", "Source Serif 4", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --max: 70rem;
  --header: 4.25rem;
  --shadow: 0 18px 50px rgba(11, 31, 42, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(26, 107, 122, 0.16), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(196, 92, 38, 0.10), transparent 55%),
    linear-gradient(180deg, #f7fbfc 0%, var(--paper) 40%, #eef5f7 100%);
  line-height: 1.55;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--teal); }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(244, 248, 250, 0.82);
  border-bottom: 1px solid rgba(11, 31, 42, 0.06);
}

.nav {
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand img { width: 2.4rem; height: 2.4rem; }
.brand span { font-size: 1.15rem; }
.brand em {
  font-style: normal;
  color: var(--teal);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 220ms var(--ease), background 220ms var(--ease), box-shadow 220ms var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: #f7fcfd;
  box-shadow: 0 10px 24px rgba(11, 58, 74, 0.25);
}
.btn-primary:hover { color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(11, 31, 42, 0.18);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header));
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f4fbfc;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 31, 42, 0.25) 0%, rgba(11, 58, 74, 0.72) 55%, rgba(11, 31, 42, 0.88) 100%),
    radial-gradient(circle at 70% 30%, rgba(159, 208, 216, 0.35), transparent 40%),
    linear-gradient(135deg, #0b3a4a 0%, #145868 45%, #1a6b7a 100%);
  transform: scale(1.02);
  animation: drift 18s var(--ease) infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, black, transparent 70%);
  opacity: 0.45;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 4rem 0 5rem;
  max-width: 40rem;
  animation: rise 900ms var(--ease) both;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.hero-brand img {
  width: 3.5rem;
  height: 3.5rem;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.25));
}

.hero-brand strong {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 1.5rem;
  font-size: 1.08rem;
  color: rgba(244, 251, 252, 0.88);
  max-width: 34rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.section {
  padding: 4.5rem 0;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

.section .lede {
  margin: 0 0 2rem;
  color: var(--ink-soft);
  max-width: 38rem;
}

.steps {
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}

@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  padding: 0;
  border: 0;
  background: transparent;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  color: var(--teal);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.step h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
}

.split {
  display: grid;
  gap: 2rem;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}

.panel {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(11, 31, 42, 0.08);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.panel h3 { margin-top: 0; }

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid rgba(11, 31, 42, 0.08);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
}

.muted { color: var(--ink-soft); }
.tiny { font-size: 0.85rem; }

/* Portal */
.portal-shell {
  width: min(100% - 2rem, 56rem);
  margin: 2rem auto 3rem;
}

.portal-shell h1 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.tab {
  border: 1px solid rgba(11,31,42,0.12);
  background: rgba(255,255,255,0.6);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.tab[aria-selected="true"] {
  background: var(--teal-deep);
  color: #fff;
  border-color: transparent;
}

.form {
  display: grid;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 650;
  font-size: 0.92rem;
}

input, textarea, select {
  font: inherit;
  border: 1px solid rgba(11,31,42,0.16);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: #fff;
}

.flash {
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  margin: 0.75rem 0;
  font-size: 0.95rem;
}
.flash-error { background: #fdecec; color: var(--danger); }
.flash-ok { background: #e8f7ef; color: var(--ok); }

.study-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.study-item {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(11,31,42,0.08);
}

.study-item strong { font-size: 1.02rem; }
.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.consent-box {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 0;
}

.consent-box label.row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-weight: 500;
}

.hidden { display: none !important; }

@keyframes drift {
  from { transform: scale(1.02) translate3d(0,0,0); }
  to { transform: scale(1.06) translate3d(-1.5%, 1%, 0); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
