:root {
  --ink: #17231a;
  --muted: #657067;
  --paper: #f5f6f0;
  --surface: #ffffff;
  --line: rgba(23, 35, 26, 0.12);
  --green: #466a4c;
  --max-width: 1240px;
  --radius-lg: 30px;
  --radius-md: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 8%, rgba(70, 106, 76, 0.11), transparent 27rem),
    var(--paper);
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

img,
svg {
  display: block;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid transparent;
  background: rgba(245, 246, 240, 0.82);
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  border-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

.master-brand,
.portal-logo,
.footer-brand {
  display: flex;
  align-items: center;
}

.master-brand {
  gap: 10px;
  font-size: 1.14rem;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.master-brand svg {
  width: 32px;
  height: 32px;
  color: var(--green);
}

.master-brand__suffix {
  padding-left: 10px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.86rem;
  font-weight: 650;
}

nav > a:not(.nav-cta) {
  color: var(--muted);
  transition: color 180ms ease;
}

nav > a:not(.nav-cta):hover {
  color: var(--ink);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
}

.nav-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 180ms ease;
}

.nav-cta:hover svg {
  transform: translate(2px, -2px);
}

.hero {
  padding: 92px 0 116px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 8vw;
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(70, 106, 76, 0.1);
}

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

h1 {
  max-width: 780px;
  margin-bottom: 28px;
  font-size: clamp(3.4rem, 6.4vw, 6.45rem);
  font-weight: 560;
  letter-spacing: -0.068em;
  line-height: 0.94;
}

h1 em,
.closing em {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.055em;
}

.hero-lead {
  max-width: 650px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 16px 18px 16px 22px;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(70, 106, 76, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button span {
  display: grid;
  width: 27px;
  height: 27px;
  color: var(--green);
  background: #fff;
  border-radius: 50%;
  place-items: center;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(70, 106, 76, 0.28);
}

.hero-note {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.45;
}

.network-map {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.network-map::before,
.network-map__rings {
  position: absolute;
  inset: 8%;
  content: "";
  border: 1px solid rgba(70, 106, 76, 0.18);
  border-radius: 50%;
}

.network-map::before {
  inset: 25%;
}

.network-map__rings::before,
.network-map__rings::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 100%;
  content: "";
  background: rgba(70, 106, 76, 0.13);
  transform-origin: center;
}

.network-map__rings::before {
  transform: translate(-50%, -50%) rotate(52deg);
}

.network-map__rings::after {
  transform: translate(-50%, -50%) rotate(-58deg);
}

.network-map__center {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 104px;
  height: 104px;
  color: #fff;
  background: var(--green);
  border: 14px solid #e7ece5;
  border-radius: 50%;
  place-items: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 16px 45px rgba(70, 106, 76, 0.25);
}

.network-map__center svg {
  width: 42px;
  height: 42px;
}

.network-map > p {
  position: absolute;
  top: calc(50% + 70px);
  left: 50%;
  width: 220px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: center;
  transform: translateX(-50%);
}

.network-map > p strong {
  color: var(--ink);
  font-weight: 400;
}

.network-node {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 25px rgba(23, 35, 26, 0.08);
  backdrop-filter: blur(8px);
}

.network-node i {
  display: block;
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}

.network-node--consulting { top: 4%; left: 38%; color: #466a4c; }
.network-node--note { top: 31%; right: -1%; color: #466a4c; }
.network-node--safe { right: 3%; bottom: 18%; color: #1769aa; }
.network-node--university { bottom: 8%; left: 5%; color: #cf1d56; }
.network-node--aps { top: 29%; left: -3%; color: #b87d05; }

.portals-section {
  padding: 110px 0 120px;
  background: #ebece5;
  border-radius: 52px 52px 0 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.58fr);
  gap: 72px;
  align-items: end;
  margin-bottom: 58px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.8rem, 5.3vw, 5rem);
  font-weight: 550;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.section-heading > p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
}

.portal-card {
  position: relative;
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  min-height: 490px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(23, 35, 26, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 0 rgba(23, 35, 26, 0.02);
  transition: transform 300ms cubic-bezier(.2,.8,.2,1), box-shadow 300ms ease, border-color 300ms ease;
}

.portal-card::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 250ms ease, transform 350ms ease;
}

.portal-card--consulting {
  grid-column: span 7;
}

.portal-card--note {
  grid-column: span 5;
}

.card-media {
  position: relative;
  min-height: 225px;
  overflow: hidden;
  background: var(--soft);
}

.portal-card--consulting .card-media {
  min-height: 285px;
}

.card-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(17, 28, 20, 0.3), transparent 50%);
  pointer-events: none;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(.2,.75,.2,1), filter 350ms ease;
}

.card-index {
  position: absolute;
  z-index: 1;
  top: 18px;
  right: 18px;
  display: grid;
  width: 39px;
  height: 39px;
  color: #fff;
  background: rgba(14, 22, 16, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  place-items: center;
  backdrop-filter: blur(10px);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px 30px 26px;
}

.card-category {
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-logo {
  gap: 11px;
  margin-bottom: 18px;
  color: var(--accent);
}

.portal-logo svg {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
}

.portal-logo > span {
  font-size: clamp(1.5rem, 2.1vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.055em;
}

.portal-logo strong {
  font-weight: 700;
}

.card-description {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.58;
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
  color: var(--ink);
  border-top: 1px solid var(--line);
  font-size: 0.79rem;
  font-weight: 700;
}

.card-link svg {
  width: 21px;
  height: 21px;
  color: var(--accent);
  transition: transform 220ms ease;
}

.portal-card:hover {
  z-index: 2;
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
  transform: translateY(-7px);
  box-shadow: 0 22px 50px rgba(23, 35, 26, 0.12);
}

.portal-card:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.portal-card:hover .card-media img {
  filter: saturate(1.05);
  transform: scale(1.045);
}

.portal-card:hover .card-link svg {
  transform: translate(3px, -3px);
}

.portal-card:focus-visible,
.master-brand:focus-visible,
nav a:focus-visible,
.primary-button:focus-visible {
  outline: 3px solid var(--accent, var(--green));
  outline-offset: 4px;
}

.closing {
  padding: 128px 0;
  background: var(--ink);
}

.closing-inner {
  display: grid;
  grid-template-columns: 94px 1fr auto;
  gap: 44px;
  align-items: center;
  color: #fff;
}

.closing-inner > svg {
  width: 82px;
  height: 82px;
  color: #95ad99;
}

.closing-inner > p {
  margin: 0;
  font-size: clamp(2.2rem, 4.3vw, 4.4rem);
  font-weight: 520;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.closing-inner > span {
  max-width: 150px;
  color: #aab4ac;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.55;
  text-transform: uppercase;
}

.site-footer {
  padding: 32px 0;
  color: #c2cac4;
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 36px;
  align-items: center;
}

.footer-brand {
  gap: 12px;
  color: #fff;
}

.footer-brand svg {
  width: 28px;
  height: 28px;
  color: #95ad99;
}

.footer-brand div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-brand strong {
  font-size: 0.86rem;
}

.footer-brand span,
.footer-inner > p {
  margin: 0;
  color: #929f96;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(.2,.75,.2,1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js .portal-card:nth-child(2) { transition-delay: 70ms; }
.js .portal-card:nth-child(3) { transition-delay: 50ms; }
.js .portal-card:nth-child(4) { transition-delay: 100ms; }
.js .portal-card:nth-child(5) { transition-delay: 150ms; }

@media (max-width: 1020px) {
  .hero {
    padding-top: 72px;
  }

  .hero-grid {
    grid-template-columns: 1fr minmax(300px, 0.65fr);
    gap: 36px;
  }

  .network-map {
    transform: scale(0.9);
  }

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

  .portal-card,
  .portal-card--consulting,
  .portal-card--note {
    grid-column: auto;
  }

  .portal-card--aps {
    grid-column: 1 / -1;
  }

  .portal-card--consulting .card-media {
    min-height: 225px;
  }
}

@media (max-width: 780px) {
  .container {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .header-inner {
    min-height: 72px;
  }

  nav > a:not(.nav-cta) {
    display: none;
  }

  .hero {
    padding: 64px 0 80px;
  }

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

  h1 {
    font-size: clamp(3rem, 13vw, 5rem);
  }

  .network-map {
    width: min(100%, 380px);
    margin-top: 28px;
    transform: none;
  }

  .portals-section {
    padding: 82px 0;
    border-radius: 32px 32px 0 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 42px;
  }

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

  .portal-card--aps {
    grid-column: auto;
  }

  .closing {
    padding: 88px 0;
  }

  .closing-inner {
    grid-template-columns: 66px 1fr;
    gap: 28px;
  }

  .closing-inner > svg {
    width: 58px;
    height: 58px;
  }

  .closing-inner > span {
    grid-column: 2;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 480px) {
  .master-brand__suffix {
    display: none;
  }

  .nav-cta {
    padding: 9px 12px;
  }

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

  .network-map {
    font-size: 0.9rem;
  }

  .network-node {
    padding: 7px 10px;
    font-size: 0.62rem;
  }

  .portal-card {
    min-height: 470px;
    border-radius: 24px;
  }

  .card-body {
    padding: 25px 24px 23px;
  }

  .closing-inner {
    grid-template-columns: 1fr;
  }

  .closing-inner > svg {
    width: 52px;
    height: 52px;
  }

  .closing-inner > span {
    grid-column: auto;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
