:root {
  color-scheme: light;
  --ink: #14231f;
  --muted: #52645e;
  --forest: #123c34;
  --forest-bright: #187b68;
  --water: #d9eef2;
  --paper: #f7faf8;
  --line: #cbd8d3;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  min-height: 68px;
  padding: 12px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: #ffffff;
  font-size: 13px;
}

.pilot-status {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.header-actions,
.intro-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-login {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  background: var(--forest);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.intro {
  position: relative;
  min-height: min(680px, calc(82svh - 68px));
  display: grid;
  align-items: end;
  isolation: isolate;
  background-image: url("../images/vida-map-preview.jpg");
  background-position: center 44%;
  background-size: cover;
}

.intro-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 35, 30, 0.72);
}

.intro-content {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto clamp(64px, 11vh, 120px);
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 10px;
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
}

.intro-copy {
  max-width: 650px;
  margin-bottom: 28px;
  font-size: clamp(18px, 2.2vw, 24px);
}

.primary-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 0 20px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: var(--forest);
  font-weight: 800;
  text-decoration: none;
}

.secondary-link {
  color: #ffffff;
  font-weight: 800;
  text-underline-offset: 5px;
}

.primary-link:focus-visible,
.brand:focus-visible,
.header-login:focus-visible,
.secondary-link:focus-visible,
.portal-action:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 4px;
}

.project-band,
.access-band {
  padding: clamp(56px, 9vw, 108px) clamp(20px, 7vw, 110px);
}

.project-band {
  background: #ffffff;
}

.content-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 8vw, 110px);
  align-items: start;
}

.content-grid .eyebrow,
.access-copy .eyebrow {
  color: var(--forest-bright);
}

.content-grid > p,
.access-copy > p {
  color: var(--muted);
  font-size: 18px;
}

.access-band {
  background: var(--water);
}

.access-copy,
.institution-actions {
  width: min(980px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.access-copy {
  max-width: 780px;
}

.institution-actions {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.institution-access {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(18, 60, 52, 0.35);
  border-radius: 6px;
  background: #ffffff;
}

.institution-access header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.institution-access header strong,
.institution-access header small {
  display: block;
}

.institution-access header strong {
  font-size: 19px;
}

.institution-access header small {
  color: var(--muted);
  font-size: 13px;
}

.role-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.portal-action {
  min-width: 0;
  min-height: 88px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
}

.portal-action:hover {
  border-color: var(--forest-bright);
}

.portal-code {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: #ffffff;
  font-weight: 800;
}

.portal-action strong,
.portal-action small {
  display: block;
}

.portal-action strong {
  font-size: 18px;
}

.portal-action small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.portal-command {
  color: var(--forest-bright);
  font-weight: 800;
}

.redirect-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--forest);
  color: #ffffff;
}

.redirect-page main {
  width: min(560px, 100%);
}

.redirect-page h1 {
  font-size: clamp(34px, 7vw, 54px);
}

.site-footer {
  padding: 26px clamp(20px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  background: var(--forest);
  color: #ffffff;
  font-size: 14px;
}

@media (max-width: 720px) {
  .site-header {
    min-height: 62px;
  }

  .pilot-status {
    display: none;
  }

  .intro {
    min-height: min(660px, calc(84svh - 62px));
  }

  .intro-content {
    margin-bottom: 56px;
  }

  .content-grid,
  .institution-actions {
    grid-template-columns: 1fr;
  }

  .intro-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-action {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-footer {
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.super-admin-access { grid-column: 1 / -1; }
