/* Home composition: spatial tools first, match evidence second. */

.home-experience {
  --home-deep: #092328;
  --home-mid: #12544f;
  --home-focus: #2a835f;
  --home-light: #8bbb92;
}

/* 01 — Open spatial atlas. The map has no dashboard frame or utility chrome. */
.home-explorer {
  min-height: calc(100vh - 68px);
  padding-top: clamp(72px, 9vh, 118px);
  padding-bottom: clamp(52px, 7vh, 92px);
}

.home-explorer-heading {
  display: block;
  text-align: center;
}

.home-explorer-heading h2 {
  margin-top: 13px;
  color: var(--home-light);
  font-size: clamp(44px, 5.5vw, 78px);
  font-weight: 590;
  letter-spacing: -.06em;
}

.home-explorer-heading .eyebrow {
  color: rgba(139, 187, 146, .6);
}

.home-spatial-atlas {
  position: relative;
  width: min(100%, 1040px);
  min-height: clamp(500px, 61vh, 700px);
  margin: clamp(24px, 2.5vh, 38px) auto 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
}

.home-spatial-atlas::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 16% 18% 10%;
  border-radius: 50%;
  background: rgba(42, 131, 95, .14);
  filter: blur(82px);
  pointer-events: none;
}

.home-atlas-viewport,
.home-atlas-world {
  position: absolute;
  inset: 0;
}

.home-atlas-viewport {
  z-index: 1;
  overflow: visible;
  perspective: 1200px;
}

.home-atlas-world {
  transform-origin: 50% 50%;
}

.home-atlas-scene {
  position: absolute;
  z-index: 2;
  top: -4%;
  left: 50%;
  width: min(76%, 730px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform-origin: 50% 55%;
  transform: translateX(-50%) perspective(1200px) rotateX(var(--atlas-rotate-x, 58deg)) rotateZ(var(--atlas-rotate-z, -7deg));
  transition: transform 320ms cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}

.home-atlas-depth,
.home-atlas-plane {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 0;
  border-radius: 25px;
  background: var(--home-deep);
}

.home-atlas-depth.depth-3 {
  transform: translate3d(0, 24px, -32px);
  background: rgba(18, 84, 79, .32);
}

.home-atlas-depth.depth-2 {
  transform: translate3d(0, 16px, -21px);
  background: rgba(18, 84, 79, .5);
}

.home-atlas-depth.depth-1 {
  transform: translate3d(0, 8px, -10px);
  background: var(--home-mid);
}

.home-atlas-plane {
  transform: translateZ(0);
  box-shadow: 0 46px 82px rgba(9, 35, 40, .72);
}

.home-atlas-plane::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 62% 34%, rgba(139, 187, 146, .12), transparent 29%);
  pointer-events: none;
}

.home-atlas-plane img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
  filter: contrast(1.34) brightness(1.12) sepia(.35) hue-rotate(91deg) saturate(1.3);
  mix-blend-mode: screen;
}

.home-atlas-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(139, 187, 146, .1) 50%, transparent 60%);
  transform: translateY(-22%);
  opacity: .34;
  transition: transform 420ms ease;
}

.home-explorer[data-observe-active="resources"] .home-atlas-scan {
  transform: translateY(26%);
}

.home-atlas-node {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(139, 187, 146, .72);
  text-decoration: none;
  transform: translate(-50%, -50%);
}

.home-atlas-node.node-rings { top: 24%; left: 66%; }
.home-atlas-node.node-resources { top: 68%; left: 27%; }

.home-atlas-node-icon {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  border: 1px solid rgba(139, 187, 146, .42);
  border-radius: 50%;
  background: rgba(9, 35, 40, .94);
  box-shadow: 0 14px 34px rgba(9, 35, 40, .58);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.home-atlas-node-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-atlas-node-copy {
  display: block;
  min-width: max-content;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 2px 16px rgba(9, 35, 40, .9);
}

.home-atlas-node-copy small,
.home-atlas-node-copy strong {
  display: block;
}

.home-atlas-node-copy small {
  color: rgba(139, 187, 146, .55) !important;
  font-size: 10px;
  letter-spacing: .14em;
}

.home-atlas-node-copy strong {
  margin-top: 3px;
  color: var(--home-light) !important;
  font-size: 14px;
  font-weight: 690;
}

.home-atlas-node:hover,
.home-atlas-node:focus-visible {
  outline: none;
  color: var(--home-light);
}

.home-atlas-node:hover .home-atlas-node-icon,
.home-atlas-node:focus-visible .home-atlas-node-icon,
.home-atlas-node.is-active .home-atlas-node-icon {
  border-color: var(--home-light);
  background: var(--home-focus);
  box-shadow: 0 0 0 6px rgba(42, 131, 95, .14), 0 0 34px rgba(139, 187, 146, .24), 0 16px 38px rgba(9, 35, 40, .6);
  transform: translateY(-4px);
}

/* 02 — Match evidence. A flat E-District map carries Replay and Anomaly. */
.home-story {
  min-height: 128vh;
  border-top: 0;
  border-bottom: 0;
  background: var(--home-deep);
}

.home-story-sticky {
  grid-template-columns: minmax(420px, .86fr) minmax(560px, 1.14fr);
}

.home-story-copy {
  padding-left: clamp(0px, 3vw, 42px);
}

.home-story-index {
  margin-bottom: clamp(42px, 7vh, 80px);
}

.home-story h1 span,
.home-story h1 strong {
  color: var(--home-light) !important;
}

.home-story-copy > p {
  color: rgba(139, 187, 146, .68) !important;
}

.home-primary-link,
.home-secondary-link {
  border-radius: 999px;
}

.home-evidence-field {
  position: relative;
  min-height: min(70vh, 720px);
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  isolation: isolate;
  transform: none;
}

.home-evidence-field::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 13% 12%;
  border-radius: 50%;
  background: rgba(42, 131, 95, .14);
  filter: blur(76px);
}

.home-evidence-map {
  position: absolute;
  z-index: 1;
  inset: 2% 0 0;
  width: 100%;
  height: 96%;
  object-fit: contain;
  opacity: .7;
  filter: contrast(1.28) brightness(1.12) sepia(.3) hue-rotate(91deg) saturate(1.24);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 68% 64% at 50% 49%, #092328 52%, transparent 96%);
  mask-image: radial-gradient(ellipse 68% 64% at 50% 49%, #092328 52%, transparent 96%);
}

.home-evidence-wash {
  position: absolute;
  z-index: 2;
  inset: 8% 8%;
  background:
    linear-gradient(180deg, transparent 48%, rgba(42, 131, 95, .08) 49%, transparent 50%),
    radial-gradient(circle at var(--focus-x, 48%) var(--focus-y, 48%), rgba(139, 187, 146, .13), transparent 19%);
  background-size: auto 7px, auto;
  mix-blend-mode: screen;
  pointer-events: none;
}

.home-evidence-glitch {
  position: absolute;
  z-index: 3;
  width: 31%;
  aspect-ratio: 1.2;
  opacity: 0;
  background: url("./assets/visual/edistrict-line.webp") center / 205% auto no-repeat;
  filter: contrast(1.55) brightness(1.28) sepia(.3) hue-rotate(91deg) saturate(1.35);
  mix-blend-mode: screen;
  clip-path: polygon(0 9%, 100% 9%, 100% 22%, 4% 22%, 4% 36%, 96% 36%, 96% 45%, 0 45%, 0 62%, 100% 62%, 100% 72%, 7% 72%, 7% 88%, 100% 88%, 100% 96%, 0 96%);
  pointer-events: none;
}

.glitch-replay { top: 21%; left: 18%; }
.glitch-anomaly { right: 12%; bottom: 19%; background-position: 73% 62%; }

.home-evidence-field[data-evidence-active="replay"] .glitch-replay,
.home-evidence-field[data-evidence-active="anomaly"] .glitch-anomaly,
.home-evidence-field.is-glitching .home-evidence-glitch {
  animation: evidence-glitch 420ms steps(2, end) both;
}

@keyframes evidence-glitch {
  0% { opacity: 0; transform: translate(0); }
  20% { opacity: .42; transform: translate(8px, -2px); }
  45% { opacity: .2; transform: translate(-5px, 3px); }
  70% { opacity: .34; transform: translate(3px, 0); }
  100% { opacity: 0; transform: translate(0); }
}

.home-evidence-node {
  position: absolute;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(139, 187, 146, .68);
  text-decoration: none;
}

.evidence-replay { top: 31%; left: 25%; }
.evidence-anomaly { right: 17%; bottom: 28%; }

.home-evidence-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(139, 187, 146, .42);
  border-radius: 50%;
  background: rgba(9, 35, 40, .9);
  box-shadow: 0 12px 28px rgba(9, 35, 40, .7);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.home-evidence-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-evidence-node span:last-child,
.home-evidence-node small,
.home-evidence-node strong {
  display: block;
}

.home-evidence-node small {
  color: rgba(139, 187, 146, .56) !important;
  font-size: 10px;
  letter-spacing: .14em;
}

.home-evidence-node strong {
  margin-top: 3px;
  color: var(--home-light) !important;
  font-size: 14px;
  text-shadow: 0 2px 16px rgba(9, 35, 40, .92);
}

.home-evidence-node:hover,
.home-evidence-node:focus-visible {
  outline: none;
}

.home-evidence-node:hover .home-evidence-icon,
.home-evidence-node:focus-visible .home-evidence-icon,
.home-evidence-node.is-active .home-evidence-icon {
  background: var(--home-focus);
  box-shadow: 0 0 0 6px rgba(42, 131, 95, .15), 0 0 34px rgba(139, 187, 146, .24), 0 16px 34px rgba(9, 35, 40, .58);
  transform: translateY(-3px);
}

.home-evidence-label {
  position: absolute;
  z-index: 5;
  right: 8%;
  top: 16%;
  text-align: right;
}

.home-evidence-label span,
.home-evidence-label strong {
  display: block;
}

.home-evidence-label span {
  color: rgba(139, 187, 146, .46) !important;
  font-size: 10px;
  letter-spacing: .16em;
}

.home-evidence-label strong {
  margin-top: 5px;
  color: rgba(139, 187, 146, .7) !important;
  font-size: 13px;
  font-weight: 560;
}

/* Open data strip: two facts, no framed dashboard cells. */
.home-snapshot {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(360px, 1.28fr);
  gap: clamp(52px, 10vw, 150px);
  align-items: end;
  padding-top: clamp(44px, 7vh, 78px);
  padding-bottom: clamp(76px, 10vh, 124px);
}

.home-snapshot > * {
  min-height: 0;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
}

.home-snapshot > a {
  position: relative;
  padding-right: 42px;
}

.home-snapshot > a::after {
  content: "↗";
  position: absolute;
  right: 0;
  bottom: 3px;
  color: var(--home-light);
  font-size: 18px;
  transition: transform 180ms ease;
}

.home-snapshot > a:hover::after,
.home-snapshot > a:focus-visible::after {
  transform: translate(3px, -3px);
}

.home-snapshot > a:focus-visible {
  outline: 1px solid var(--home-light);
  outline-offset: 9px;
}

.home-snapshot strong {
  margin-top: 11px;
  font-size: clamp(17px, 1.5vw, 22px);
}

.home-snapshot small {
  margin-top: 7px;
  font-size: 12px;
}

.home-snapshot .home-snapshot-latest {
  margin-top: 18px;
}

.home-snapshot .home-snapshot-latest[hidden] {
  display: none;
}

.home-snapshot .home-snapshot-latest small {
  margin: 0 0 6px;
}

.home-experience .home-snapshot .home-snapshot-latest span {
  display: block;
  max-width: 360px;
  color: var(--fg-primary) !important;
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

/* Footer: two calm reading columns, then one compact metadata row. */
.site-footer .footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, .6fr) minmax(0, 1.4fr);
  align-items: start;
  gap: clamp(42px, 8vw, 120px);
  padding-top: 46px;
  padding-bottom: 40px;
}

.site-footer .footer-brand strong {
  font-size: 14px;
  letter-spacing: .07em;
}

.site-footer .footer-brand > span {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.65;
}

.site-footer .footer-maker {
  margin-top: 18px !important;
}

.footer-content {
  min-width: 0;
}

.site-footer .footer-legal {
  max-width: 900px;
}

.site-footer .footer-legal p {
  margin: 0;
  font-size: 12px;
  line-height: 1.8;
}

.site-footer .footer-legal .footer-english {
  margin-top: 7px;
  color: rgba(139, 187, 146, .48);
  font-size: 11px;
}

.site-footer .footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
}

.site-footer .filing-row {
  margin-top: 0;
}

.site-footer .footer-meta {
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: right;
  font-size: 11px;
}

@media (max-width: 980px) {
  .home-story-sticky {
    grid-template-columns: 1fr;
  }

  .home-evidence-field {
    min-height: 570px;
  }

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

@media (max-width: 700px) {
  .home-explorer {
    min-height: auto;
    padding: 72px 18px 54px;
  }

  .home-explorer-heading h2 {
    font-size: clamp(36px, 10vw, 46px);
  }

  .home-spatial-atlas {
    min-height: 470px;
    margin-top: 18px;
  }

  .home-atlas-scene {
    top: 3%;
    width: 108%;
    --atlas-rotate-x: 54deg;
    --atlas-rotate-z: -5deg;
  }

  .home-atlas-node.node-rings { top: 23%; left: 69%; }
  .home-atlas-node.node-resources { top: 67%; left: 26%; }

  .home-atlas-node-icon,
  .home-evidence-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .home-atlas-node-copy small,
  .home-evidence-node small {
    display: none !important;
  }

  .home-atlas-node-copy strong,
  .home-evidence-node strong {
    margin-top: 0;
    font-size: 12px;
  }

  .home-story {
    min-height: auto;
  }

  .home-story-sticky {
    padding-top: 76px;
    padding-bottom: 72px;
  }

  .home-evidence-field {
    min-height: 440px;
    margin: 8px -12px 0;
  }

  .evidence-replay { top: 30%; left: 13%; }
  .evidence-anomaly { right: 8%; bottom: 27%; }
  .home-evidence-label { top: 11%; right: 5%; }

  .home-snapshot {
    grid-template-columns: 1fr;
    gap: 46px;
    padding: 48px 18px 76px;
  }

  .site-footer .footer-inner {
    padding: 34px 18px;
  }

  .site-footer .footer-bottom-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .site-footer .footer-meta {
    text-align: left;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-atlas-scene,
  .home-atlas-scan,
  .home-atlas-node-icon,
  .home-evidence-icon,
  .home-snapshot > a::after {
    transition: none;
  }

  .home-evidence-glitch {
    animation: none !important;
  }
}
