/* =====================================================================
   IAITP — design tokens
   ===================================================================== */
:root {
  --ink: #0B1B33;
  --ink-2: #33425C;
  --muted: #62708A;
  --line: #E3E9F2;
  --line-2: #CCD6E4;

  --bg: #FFFFFF;
  --bg-soft: #F5F8FC;
  --bg-tint: #EAF1FD;

  --brand: #2F6FDB;
  --brand-600: #2459B9;
  --brand-300: #8BBDFF;
  --brand-50: #EEF4FE;

  --navy: #0B1B33;
  --navy-2: #13284A;
  --on-dark: #E8EEF8;
  --on-dark-muted: #9DAECB;

  --success: #138A5B;
  --danger: #C8372D;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(11, 27, 51, .06);
  --shadow: 0 1px 2px rgba(11, 27, 51, .05), 0 8px 24px -12px rgba(11, 27, 51, .14);
  --shadow-lg: 0 2px 4px rgba(11, 27, 51, .04), 0 24px 48px -20px rgba(11, 27, 51, .28);

  --header-h: 72px;
  --gutter: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

html.dialog-open { overflow: hidden; }

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

h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
address { font-style: normal; }
[hidden] { display: none !important; }
main:focus { outline: none; }

::selection { background: var(--brand); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-md { width: 22px; height: 22px; }
.icon-lg { width: 26px; height: 26px; stroke-width: 1.6; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.mono-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn .icon { transition: transform .2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(47, 111, 219, .7); }
.btn-primary:hover { background: var(--brand-600); }

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

.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  min-width: 40px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); background: var(--bg-soft); }
.icon-btn:disabled { opacity: .4; cursor: default; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}

/* =====================================================================
   Header
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block for the fixed-position mobile menu. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
.menu-open .site-header::before { background: #fff; }
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); flex: none; }
.brand-mark { width: 38px; height: 38px; color: var(--navy); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: .04em; }
.brand-sub { margin-top: 5px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 999px;
  transition: color .2s, background-color .2s;
}
.nav-link:hover { color: var(--ink); background: var(--bg-soft); }
.nav-link.active { color: var(--brand); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--brand);
}
.nav-cta-mobile { display: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang-switch button {
  height: 32px;
  min-width: 40px;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }

/* =====================================================================
   Sections & typography
   ===================================================================== */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0 clamp(72px, 9vw, 112px); }
.section-soft { background: var(--bg-soft); }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head-row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.section-head-row > div { max-width: 640px; }

.section-tag {
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
}

.section-title { font-size: clamp(2rem, 4.2vw, 3.25rem); letter-spacing: -0.03em; }
.section-sub { margin-top: 18px; font-size: clamp(1rem, 1.4vw, 1.125rem); color: var(--muted); max-width: 640px; }

.lead { font-size: clamp(1.125rem, 1.8vw, 1.375rem); line-height: 1.55; color: var(--ink); letter-spacing: -0.01em; }

/* =====================================================================
   Hero
   ===================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 112px) 0 clamp(64px, 8vw, 104px);
  background:
    radial-gradient(60% 70% at 85% 10%, rgba(47, 111, 219, .14), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(47, 111, 219, .07), transparent 70%),
    var(--bg);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(11, 27, 51, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 27, 51, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(80% 70% at 70% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(80% 70% at 70% 30%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }

.hero-title {
  margin-top: 28px;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.hero-title em { font-style: normal; color: var(--brand); }

.hero-lead {
  margin-top: 28px;
  max-width: 560px;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}
.hero-roles li { display: inline-flex; align-items: center; gap: 8px; }
.hero-roles li::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--line-2); }

.hero-panel { display: flex; flex-direction: column; gap: 14px; }

.panel-card {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  background: #E8F6EF;
  border-radius: 999px;
}
.pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(.4); opacity: .7; } 100% { transform: scale(1.3); opacity: 0; } }

.panel-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; }
.panel-num { font-size: clamp(2.5rem, 4vw, 3.25rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.panel-num.accent { color: var(--brand); }
.panel-cap { margin-top: 8px; font-size: 14px; color: var(--muted); }

.meter {
  position: relative;
  height: 8px;
  margin-top: 26px;
  overflow: hidden;
  background: var(--bg-tint);
  border-radius: 999px;
}
.meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v);
  min-width: 8px;
  background: var(--brand);
  border-radius: inherit;
}
.panel-foot { margin-top: 14px; font-size: 14px; color: var(--muted); }
.panel-foot strong { color: var(--ink); }

.panel-members {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--navy);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  transition: transform .25s var(--ease), background-color .25s;
}
.panel-members:hover { background: var(--navy-2); transform: translateY(-2px); }
.panel-members > div:nth-child(2) { flex: 1; min-width: 0; }
.panel-members-title { font-weight: 600; font-size: 15px; }
.panel-members-sub { font-size: 13px; color: var(--on-dark-muted); }
.panel-members .icon { color: var(--brand-300); }

.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--navy); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-more { background: var(--navy-2) !important; color: var(--brand-300); }

/* =====================================================================
   Avatar
   ===================================================================== */
.avatar {
  --size: 48px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  overflow: hidden;
  border-radius: calc(var(--size) * .3);
  background: var(--tone, var(--brand));
  color: #fff;
  font-weight: 700;
  font-size: calc(var(--size) * .36);
  letter-spacing: .02em;
}
.avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .28), transparent 55%),
    radial-gradient(80% 80% at 0% 100%, rgba(0, 0, 0, .18), transparent 60%);
}
.avatar > span { position: relative; }
.avatar-xs { --size: 32px; }
.avatar-sm { --size: 34px; border-radius: 50%; }
.avatar-lg { --size: 56px; }
.avatar-xl { --size: 96px; }

/* =====================================================================
   Stats strip
   ===================================================================== */
.stats-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 36px 28px 36px 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat-num { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.stat-text { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* =====================================================================
   About
   ===================================================================== */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
}
.split-body { display: grid; gap: 20px; color: var(--ink-2); font-size: 1.0625rem; }

.mission-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: clamp(48px, 7vw, 88px);
}
.mission-item { padding-top: 24px; border-top: 1px solid var(--ink); }
.mission-num { font-family: var(--mono); font-size: 13px; color: var(--brand); }
.mission-item h3 { margin-top: 18px; font-size: clamp(1.125rem, 1.8vw, 1.375rem); font-weight: 600; letter-spacing: -0.015em; max-width: 320px; }

/* =====================================================================
   Benefits (dark)
   ===================================================================== */
.section-dark {
  background:
    radial-gradient(50% 60% at 100% 0%, rgba(47, 111, 219, .28), transparent 70%),
    var(--navy);
  color: #fff;
}
.section-dark .section-tag { color: var(--brand-300); }
.section-dark .section-sub { color: var(--on-dark-muted); }

.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bento-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 28px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius-lg);
  transition: background-color .25s, border-color .25s;
}
.bento-card:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
.bento-card .icon { color: var(--brand-300); }
.bento-card h3 { margin-top: auto; padding-top: 32px; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; }
.bento-card p { margin-top: 8px; font-size: 15px; color: var(--on-dark-muted); }
.bento-wide { grid-column: span 2; }
.bento-wide h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.bento-accent { grid-column: span 2; background: var(--brand); border-color: var(--brand); }
.bento-accent:hover { background: #3a7ae4; border-color: #3a7ae4; }
.bento-accent .icon { color: #fff; }
.bento-accent p { color: rgba(255, 255, 255, .82); }

/* =====================================================================
   Requirements
   ===================================================================== */
.req-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.req-card {
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.req-card .icon {
  width: 44px;
  height: 44px;
  padding: 11px;
  color: var(--brand);
  background: var(--brand-50);
  border-radius: 12px;
}
.req-card h3 { margin-top: 24px; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.req-card p { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* =====================================================================
   Steps
   ===================================================================== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 4px; }
.step::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 56px;
  right: -24px;
  height: 1px;
  background: repeating-linear-gradient(to right, var(--line-2) 0 6px, transparent 6px 12px);
}
.step:last-child::before { display: none; }
.step-num {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 50%;
}
.step h3 { margin-top: 24px; font-size: 1.25rem; font-weight: 600; }
.step p { margin-top: 8px; font-size: 15px; color: var(--muted); max-width: 260px; }

/* =====================================================================
   Member cards
   ===================================================================== */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.member-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.member-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-3px); }
.member-card:focus-within { border-color: var(--brand); }

.member-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.member-link:focus-visible { outline-offset: -2px; }

.member-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.field-badge {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand-600);
  background: var(--brand-50);
  border-radius: 999px;
}
.member-name { margin-top: 20px; font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; }
.member-role { margin-top: 6px; font-size: 14.5px; line-height: 1.45; color: var(--muted); }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tag-list li {
  padding: 4px 10px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tag-list-lg li { font-size: 14px; padding: 6px 12px; }

.member-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.member-card .member-foot { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 14px; }
.member-foot .icon { color: var(--ink-2); transition: transform .25s var(--ease), color .25s; }
.member-card:hover .member-foot .icon { color: var(--brand); transform: translate(2px, -2px); }

/* =====================================================================
   Pricing
   ===================================================================== */
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 900px; }
.plan {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.plan-head h3 { font-size: 1.25rem; font-weight: 600; }
.plan-badge {
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--brand-300);
  border-radius: 999px;
}
.plan-price { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 28px; }
.plan-amount { font-size: 3.25rem; font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.plan-period { color: var(--muted); font-size: 15px; }
.plan-features { display: grid; gap: 14px; margin-bottom: 32px; }
.plan-features li { display: flex; gap: 12px; font-size: 15px; }
.plan-features .icon { margin-top: 3px; color: var(--brand); }
.plan .btn { margin-top: auto; }

.plan-featured { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: var(--shadow-lg); }
.plan-featured .plan-period { color: var(--on-dark-muted); }
.plan-featured .plan-features li { color: var(--on-dark); }
.plan-featured .plan-features .icon { color: var(--brand-300); }

/* =====================================================================
   Application form
   ===================================================================== */
.apply-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.apply-contacts { display: grid; gap: 12px; margin-top: 36px; }
.apply-contacts li { display: flex; align-items: center; gap: 12px; color: var(--ink-2); }
.apply-contacts .icon { color: var(--brand); }
.apply-contacts a { border-bottom: 1px solid var(--line-2); transition: border-color .2s, color .2s; }
.apply-contacts a:hover { color: var(--brand); border-color: var(--brand); }

.form-card {
  padding: clamp(24px, 4vw, 40px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.form-card form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { padding: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.field legend { margin-bottom: 8px; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 128px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: #98A3B6; }
.field input:hover, .field textarea:hover { border-color: var(--line-2); }
.field input:focus, .field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(47, 111, 219, .14);
}
.field-error { display: none; font-size: 13px; color: var(--danger); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); background: #fff; }
.field.invalid .field-error { display: block; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block;
  padding: 12px 14px;
  font-size: 14.5px;
  font-weight: 500;
  text-align: center;
  color: var(--ink-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.segmented input:checked + span { color: var(--brand-600); background: var(--brand-50); border-color: var(--brand); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.form-note { font-size: 13px; color: var(--muted); text-align: center; }
.form-status:empty { display: none; }
.form-status { padding: 14px 16px; font-size: 14.5px; border-radius: var(--radius-sm); }
.form-status.is-pending { color: var(--ink-2); background: var(--bg-soft); }
.form-status.is-success { color: var(--success); background: #E8F6EF; }
.form-status.is-error { color: var(--danger); background: #FCEDEC; }

/* =====================================================================
   Inner pages
   ===================================================================== */
.page-hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px);
  background:
    radial-gradient(50% 80% at 100% 0%, rgba(47, 111, 219, .1), transparent 70%),
    var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.breadcrumb { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.page-title { margin-top: 20px; font-size: clamp(2.25rem, 5vw, 3.75rem); letter-spacing: -0.04em; }
.page-lead { margin-top: 18px; max-width: 680px; font-size: clamp(1rem, 1.5vw, 1.125rem); color: var(--ink-2); }

/* Directory */
.directory-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 280px;
  max-width: 380px;
}
.search-field .icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: border-color .2s, box-shadow .2s;
}
.search-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(47, 111, 219, .14); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip[aria-pressed="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.chip-n { font-family: var(--mono); font-size: 11.5px; opacity: .6; }

.directory-count { margin: 28px 0 16px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.empty-state {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
}

/* Charter */
.charter-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.charter-side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; }
.tabs button {
  height: 38px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}
.tabs button[aria-selected="true"] { color: var(--ink); background: #fff; box-shadow: var(--shadow-sm); }

.charter-meta {
  display: grid;
  gap: 10px;
  padding: 20px;
  font-size: 14px;
  color: var(--ink-2);
  background: var(--brand-50);
  border-radius: var(--radius);
}
.charter-meta .icon { color: var(--brand); }
.charter-meta a { font-weight: 600; color: var(--brand-600); }

.doc { max-width: 760px; }
.doc-head { padding-bottom: 32px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc-approved { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; color: var(--muted); }
.doc-approved strong { color: var(--ink); }
.doc-head h2 { margin-top: 16px; font-size: clamp(1.5rem, 2.6vw, 2.125rem); letter-spacing: -0.025em; }
.doc section { padding: 32px 0; border-bottom: 1px solid var(--line); }
.doc section:last-child { border-bottom: 0; }
.doc h3 { font-size: 1.25rem; font-weight: 700; }
.doc h4 { margin: 24px 0 10px; font-size: 1rem; font-weight: 600; color: var(--brand-600); }
.doc p { margin-top: 10px; color: var(--ink-2); line-height: 1.75; }

/* Contacts */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-card {
  display: grid;
  gap: 6px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.contact-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.contact-card .icon, .map-info .icon { margin-bottom: 18px; color: var(--brand); }
.contact-label { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.contact-value { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.contact-hint { font-size: 14px; color: var(--muted); }

.map-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  margin-top: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.map-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 28px; }
.map-info address { font-size: 1.125rem; font-weight: 500; line-height: 1.5; margin-bottom: 20px; }
.map-frame { min-height: 340px; background: var(--bg-soft); border-left: 1px solid var(--line); }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer { padding-top: clamp(56px, 8vw, 88px); background: var(--navy); color: var(--on-dark); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; }
.brand-light { color: #fff; }
.brand-light .brand-sub { color: var(--on-dark-muted); }
.footer-brand p { margin-top: 20px; max-width: 360px; font-size: 14.5px; color: var(--on-dark-muted); }
.footer-title { margin-bottom: 16px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); }
.footer-links { display: grid; gap: 10px; font-size: 15px; }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--brand-300); }
.footer-address { color: var(--on-dark-muted); font-size: 14px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  padding-bottom: 28px;
  font-size: 13.5px;
  color: var(--on-dark-muted);
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.footer-bottom .link-btn:hover { color: #fff; }

/* =====================================================================
   Dialogs
   ===================================================================== */
dialog {
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 0;
}
dialog::backdrop {
  background: rgba(11, 27, 51, .45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Member profile — side sheet */
.profile {
  width: min(680px, 100%);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  box-shadow: var(--shadow-lg);
}
.profile[open] { display: flex; flex-direction: column; animation: sheet-in .35s var(--ease); }
@keyframes sheet-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }

.profile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.profile-nav { display: flex; align-items: center; gap: 10px; }
.profile-pos { min-width: 64px; text-align: center; }
.profile-body { flex: 1; overflow-y: auto; padding: clamp(24px, 4vw, 40px); overscroll-behavior: contain; }

.profile-head { display: flex; align-items: flex-start; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.profile-head h2 { margin-top: 12px; font-size: clamp(1.75rem, 3vw, 2.25rem); letter-spacing: -0.03em; }
.profile-title { margin-top: 8px; font-size: 1.0625rem; color: var(--ink-2); }
.profile-since { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.profile-section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.profile-section:last-child { border-bottom: 0; padding-bottom: 8px; }
.profile-section .mono-label { margin-bottom: 16px; }
.profile-section .tag-list { margin-top: 0; }
.profile-bio { font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); }

.icon-list { display: grid; gap: 12px; }
.icon-list li { display: flex; gap: 14px; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.icon-list .icon { margin-top: 2px; color: var(--brand); }

/* Search — command palette */
.search {
  width: min(640px, calc(100% - 32px));
  max-height: min(560px, 76vh);
  margin: 12vh auto auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.search[open] { display: flex; flex-direction: column; animation: pop-in .2s var(--ease); }
@keyframes pop-in { from { transform: translateY(-8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

.search-head { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.search-head > .icon { color: var(--muted); }
.search-head input {
  flex: 1;
  height: 60px;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: none;
  border: 0;
  outline: none;
}
.search-head input::-webkit-search-cancel-button { display: none; }
.kbd-btn { cursor: pointer; }

.search-results { flex: 1; overflow-y: auto; padding: 8px; }
.search-group { padding: 12px 12px 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.search-results a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
.search-results a > .icon { margin-left: auto; color: var(--muted); opacity: 0; transition: opacity .15s; }
.search-results [aria-selected="true"] a, .search-results a:hover { background: var(--bg-soft); }
.search-results [aria-selected="true"] a > .icon { opacity: 1; color: var(--brand); }
.search-ico { display: grid; place-items: center; width: 32px; height: 32px; color: var(--brand); background: var(--brand-50); border-radius: 9px; flex: none; }
.search-text { display: grid; min-width: 0; }
.search-text span { font-weight: 500; }
.search-text small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-empty { padding: 32px 12px; text-align: center; color: var(--muted); }

/* =====================================================================
   Reveal on scroll
   ===================================================================== */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1080px) {
  .req-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }

  .menu-toggle { display: inline-flex; }
  .search-trigger .kbd { display: none; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 12px var(--gutter) 32px;
    overflow-y: auto;
    background: #fff;
    border-top: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .menu-open .main-nav { opacity: 1; visibility: visible; transform: none; }
  .menu-open { overflow: hidden; }

  .nav-link {
    padding: 18px 4px;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav-link:hover { background: none; }
  .nav-link.active::after { left: auto; right: 4px; top: 50%; bottom: auto; margin: -3px 0 0; width: 6px; height: 6px; }
  .nav-cta-mobile { display: inline-flex; margin-top: 28px; height: 52px; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { max-width: 520px; }

  .split, .apply-grid { grid-template-columns: 1fr; }

  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-wide, .bento-accent { grid-column: span 2; }

  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .step:nth-child(2)::before { display: none; }

  .charter-layout { grid-template-columns: 1fr; }
  .charter-side { position: static; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; }

  .contact-grid { grid-template-columns: 1fr 1fr; }
  .map-card { grid-template-columns: 1fr; }
  .map-frame { border-left: 0; border-top: 1px solid var(--line); }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }

  .header-inner { gap: 12px; }
  .header-actions { gap: 8px; margin-left: auto; }
  .header-cta { display: none; }
  .brand-sub { display: none; }
  .brand-mark { width: 34px; height: 34px; }

  .hero-actions .btn { width: 100%; }
  .hero-roles { gap: 8px 16px; }
  .panel-card { padding: 22px; }

  .stats-grid { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 24px 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }

  .mission-list { grid-template-columns: 1fr; gap: 0; }
  .mission-item { padding: 20px 0 24px; }
  .mission-item h3 { margin-top: 10px; }

  .bento { grid-template-columns: 1fr; }
  .bento-wide, .bento-accent { grid-column: auto; }
  .bento-card { min-height: 0; padding: 24px; }
  .bento-card h3 { padding-top: 24px; }

  .req-grid { grid-template-columns: 1fr; }

  .steps { grid-template-columns: 1fr; row-gap: 0; }
  .step { display: grid; grid-template-columns: 44px 1fr; column-gap: 18px; padding-bottom: 28px; }
  .step::before { display: block !important; top: 48px; bottom: 0; left: 22px; right: auto; width: 1px; height: auto;
    background: repeating-linear-gradient(to bottom, var(--line-2) 0 6px, transparent 6px 12px); }
  .step:last-child::before { display: none !important; }
  .step h3 { grid-column: 2; margin-top: 8px; }
  .step p { grid-column: 2; }
  .step-num { grid-row: span 2; }

  .section-head-row { flex-direction: column; align-items: flex-start; }

  .pricing-grid { grid-template-columns: 1fr; }
  .plan { padding: 26px; }

  .form-row, .segmented { grid-template-columns: 1fr; }

  .directory-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); }
  .search-field { max-width: none; flex-basis: auto; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }

  .charter-side { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .profile-head { flex-direction: column; gap: 16px; }
  .avatar-xl { --size: 72px; }
  .search { margin-top: 16px; max-height: calc(100dvh - 32px); }
}
