:root {
  --text-primary: #1a1b1f;
  --text-muted: #4b4f5c;
  --surface: rgba(255, 255, 255, 0.76);
  --stroke: rgba(26, 27, 31, 0.12);
  --glow: rgba(32, 80, 120, 0.18);
  --hero-grad-1: #f7d7de;
  --hero-grad-2: #c9e6f3;
  --hero-grad-3: #f5f0d0;
  --accent: #1f2f44;
  --panel-bg: rgba(250, 249, 246, 0.96);
  --shadow-soft: 0 18px 40px rgba(20, 24, 38, 0.16);
  --shadow-hard: 0 24px 50px rgba(20, 24, 38, 0.22);
  --map-offset-x: 0%;
  --map-offset-y: 1%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: #f5f6f8;
  min-height: 100vh;
  font-size: clamp(1rem, 0.98rem + 0.2vw, 1.06rem);
  line-height: 1.6;
}

.container {
  width: min(75rem, 100%);
  margin: 0 auto;
}

.section {
  padding: clamp(1rem, 4vw, 3rem);
}

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

a:focus-visible,
button:focus-visible {
  outline: 0.125rem solid #1f2f44;
  outline-offset: 0.125rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: #ffffff;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  z-index: 10;
}

.skip-link:focus {
  left: 1rem;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(32rem, 82vh, 50rem);
  display: grid;
  place-items: center;
  padding: clamp(4rem, 12vw, 6.5rem) clamp(1rem, 4vw, 3rem);
}

/* Layered pastel field with gentle drift + grain. */
.hero__bg {
  position: absolute;
  inset: 0;
  background: #eef3f7;
  background-image: none;
  animation: none;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
  background-image: none;
  mix-blend-mode: normal;
  opacity: 0.4;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 45rem;
  text-align: center;
  margin: 0 auto;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 1.125rem;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
  margin: 0 0 1rem;
}

.hero__subtitle {
  font-size: clamp(1rem, 1.2rem + 0.6vw, 1.5rem);
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 auto 1.75rem;
  max-width: 40rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  border: 1px solid rgba(31, 47, 68, 0.4);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 12px 24px rgba(31, 47, 68, 0.2);
}

main {
  display: flex;
  flex-direction: column;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.field {
  width: 100%;
  margin: 0;
}

.field__header {
  display: grid;
  gap: 0.75rem;
  max-width: 45rem;
  margin-bottom: 2rem;
}

.field__header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
}

.field__header p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Interactive map container with depth and currents. */
.field__stage {
  position: relative;
  border-radius: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(31, 47, 68, 0.12);
  background: #f3f6f9;
  min-height: clamp(24rem, 60vh, 40rem);
  overflow: hidden;
  padding: clamp(1rem, 3vw, 2rem);
  --map-offset-x: -4%;
  --map-offset-y: 1%;
  --field-scale: 1;
  --drift-x: 0px;
  --drift-y: 0px;
  --line-drift-x: 0px;
  --line-drift-y: 0px;
  transition: box-shadow 0.4s ease;
}

.field__stage::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: none;
  transform: translate(var(--drift-x), var(--drift-y));
  transition: transform 0.4s ease;
}

.field__nodes,
.field__lines,
.field__aura {
  position: absolute;
  inset: 0;
}

.field__lines {
  inset: 0;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Connection lines with subtle dashed motion. */
.field__lines line {
  stroke: rgba(31, 47, 68, 0.2);
  stroke-width: 1.4;
  stroke-dasharray: 6 14;
  opacity: 0.5;
  transition: opacity 0.25s ease, stroke 0.25s ease;
  animation: dash 20s linear infinite;
}

.field__lines line.is-highlight {
  stroke: rgba(31, 47, 68, 0.6);
  opacity: 0.9;
}

/* Active island aura blob. */
.field__aura {
  width: clamp(10rem, 22vw, 15rem);
  height: clamp(10rem, 22vw, 15rem);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  transform: translate(-50%, -50%) scale(0.96);
  filter: blur(0.75rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
  display: none;
}

.field__aura.is-visible {
  opacity: 0.75;
  animation: aura 6s ease-in-out infinite;
}

.field__nodes {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(4.5rem, auto);
  gap: clamp(0.85rem, 2vw, 1.6rem);
  align-content: space-between;
  min-height: clamp(24rem, 60vh, 40rem);
  left: 50%;
  transform-origin: top left;
  transform: translateX(calc(-50% + var(--map-offset-x) + (1 - var(--field-scale)) * 50%)) translateY(var(--map-offset-y)) scale(var(--field-scale));
  width: calc(100% / var(--field-scale));
  margin: 0;
}

.island-node {
  position: relative;
  display: grid;
  gap: 0.25rem;
  padding: 0.35rem;
  width: auto;
  max-width: none;
  --grid-span: 2;
  --float-x: 0rem;
  --float-y: 0rem;
  align-items: center;
  justify-items: center;
  border-radius: 0;
  border: none;
  background: none;
  color: var(--text-primary);
  box-shadow: none;
  cursor: pointer;
  transform: translate(var(--float-x), var(--float-y)) translateY(var(--lift));
  --lift: 0px;
  --parallax-x: 0px;
  --parallax-y: 0px;
  --reveal-delay: 0ms;
  opacity: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.5s ease var(--reveal-delay);
  justify-self: center;
  grid-column: var(--grid-col, auto) / span var(--grid-span, 2);
  grid-row: var(--grid-row, auto);
}

.field.is-ready .island-node {
  opacity: 1;
}

.island-node::before {
  display: none;
}

.island-node::after {
  display: none;
}

.island-node .node__island {
  width: clamp(4rem, 8vw, 5rem);
  max-height: 5rem;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  justify-self: center;
  display: block;
  color: var(--color-a);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.island-node .node__text {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  left: 50%;
  transform: translate(-50%, 8px);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(31, 47, 68, 0.12);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.island-node .node__name {
  font-weight: 600;
  font-size: 1.05rem;
}

.island-node .node__tag {
  font-size: 0.85rem;
  color: rgba(20, 24, 38, 0.75);
}

.island-node:hover,
.island-node:focus-visible {
  --lift: -4px;
}

.island-node:hover .node__island,
.island-node:focus-visible .node__island,
.island-node.is-active .node__island {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 10px 20px rgba(31, 47, 68, 0.16));
}

.island-node.is-related {
  opacity: 1;
}

.panel-open .island-node:not(.is-active):not(.is-related) {
  opacity: 0.45;
  filter: saturate(0.85);
}

.island-node:hover .node__text,
.island-node:focus-visible .node__text,
.island-node.is-active .node__text {
  opacity: 1;
  transform: translate(-50%, 0px);
}

.panel {
  position: fixed;
  inset: auto;
  left: var(--panel-left, 50%);
  top: var(--panel-top, 18%);
  width: min(var(--panel-width, 520px), calc(100vw - 3rem));
  max-height: 65vh;
  background: var(--panel-bg);
  border: 1px solid rgba(31, 47, 68, 0.12);
  border-radius: clamp(1rem, 2vw, 1.5rem);
  box-shadow: 0 20px 40px rgba(31, 47, 68, 0.14);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.25s ease;
  z-index: 10;
  display: grid;
  grid-template-rows: auto 1fr;
  transform: translate(-50%, 0);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.panel.is-open {
  border-color: rgba(31, 47, 68, 0.25);
  box-shadow: 0 24px 50px rgba(31, 47, 68, 0.18);
  opacity: 1;
  pointer-events: auto;
}

.panel__close {
  margin: 1.25rem 1.25rem 0 auto;
  border: 1px solid rgba(31, 47, 68, 0.2);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

.panel__content {
  padding: 1rem clamp(1.2rem, 3vw, 1.9rem) clamp(1.5rem, 4vw, 2.2rem);
  overflow-y: auto;
}

.panel__stripe {
  height: 0.35rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
  background: #dfe7ff;
}

.panel__content h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
}

.panel__content p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.panel__section {
  margin-bottom: 1.5rem;
}

.panel__section h4 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(31, 47, 68, 0.7);
}

.panel__partners,
.panel__signals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.panel__partners li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
}

.partner__logo {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  background: rgba(31, 47, 68, 0.06);
  border: 1px solid rgba(31, 47, 68, 0.2);
}

.panel__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(31, 47, 68, 0.35);
  background: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.footer {
  border-top: 1px solid rgba(31, 47, 68, 0.1);
}

.footer__inner {
  display: grid;
  gap: 1.25rem;
  justify-items: center;
  text-align: center;
}

.footer p {
  max-width: 38.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.footer__cta {
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(31, 47, 68, 0.25);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

@media (min-width: 48rem) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 64rem) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 43.75rem) {
  .field__stage {
    padding: clamp(1rem, 4vw, 1.5rem);
    --map-offset-x: 0%;
  }

  .panel {
    width: min(var(--panel-width, 420px), calc(100vw - 1.5rem));
    max-height: 60vh;
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(31, 47, 68, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .field__lines line {
    animation: none;
  }
}

@keyframes drift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: -120;
  }
}

@keyframes aura {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.03);
  }
}
