:root {
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --motion-fast: 140ms;
  --motion-medium: 240ms;
  --motion-enter: 480ms;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --explore-background: #086b78;
  --explore-ink: #ffffff;
  --ambient-primary-opacity: 0.13;
  --ambient-secondary-opacity: 0.09;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #16232b;
  --panel-digital: #20333c;
  --panel-systems: #1a2b34;
  --panel-hover: rgba(20, 216, 224, 0.035);
  --ink: #f3f7f7;
  --ink-soft: #d0dce0;
  --ink-muted: #bacad0;
  --accent: #18d8e0;
  --accent-strong: #31edf0;
  --accent-ink: #021013;
  --accent-soft: rgba(24, 216, 224, 0.18);
  --accent-faint: rgba(24, 216, 224, 0.09);
  --line: rgba(158, 211, 221, 0.32);
  --line-soft: rgba(158, 211, 221, 0.16);
  --logo: brightness(0) invert(1);
  --internal-mark: rgba(14, 119, 153, 0.66);
  --shadow: rgba(0, 0, 0, 0.28);
  --ambient-primary-opacity: 0.2;
  --ambient-secondary-opacity: 0.14;
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f1f5f5;
  --panel-digital: #f8fbfb;
  --panel-systems: #eaf0f1;
  --panel-hover: rgba(0, 133, 148, 0.045);
  --ink: #071012;
  --ink-soft: #3f5052;
  --ink-muted: #5b6d70;
  --accent: #007f91;
  --accent-strong: #006e80;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 127, 145, 0.15);
  --accent-faint: rgba(0, 127, 145, 0.07);
  --line: rgba(20, 81, 88, 0.25);
  --line-soft: rgba(20, 81, 88, 0.11);
  --logo: none;
  --internal-mark: rgba(0, 63, 105, 0.28);
  --shadow: rgba(22, 53, 57, 0.17);
}

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

html {
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
}

/* Local, decorative shapes sit behind the page; the middle stays quiet. */
.ambient-backdrop {
  position: fixed;
  z-index: -1;
  inset: 6rem 0 0;
  overflow: hidden;
  contain: strict;
  pointer-events: none;
  user-select: none;
  color: var(--accent);
  mask-image: linear-gradient(90deg, #000, #0000 42%, #0000 58%, #000);
}

.ambient-backdrop__form {
  position: absolute;
  width: clamp(24rem, 58vw, 58rem);
  height: auto;
  stroke: currentColor;
  stroke-width: 1;
  opacity: var(--ambient-primary-opacity);
}

.ambient-backdrop__form--primary {
  top: 3%;
  left: -25%;
}

.ambient-backdrop__form--secondary {
  right: -27%;
  bottom: -15%;
  opacity: var(--ambient-secondary-opacity);
}

.ambient-backdrop__nodes {
  fill: currentColor;
  stroke: none;
}

.ambient-backdrop__glow {
  position: absolute;
  inset: 8% -20% -12%;
  background:
    radial-gradient(ellipse 45% 48% at 8% 48%, var(--accent-faint), transparent),
    radial-gradient(ellipse 40% 45% at 94% 55%, var(--accent-faint), transparent);
}

.gateway-panel > .ambient-backdrop {
  position: absolute;
  inset: 10rem 0 0;
  mask-image: linear-gradient(#0000, #000 22%, #000 80%, #0000);
}

.gateway-panel .ambient-backdrop__form {
  width: max(24rem, 120%);
}

.gateway-panel .ambient-backdrop__form--primary {
  top: 2%;
  left: -80%;
}

.gateway-panel .ambient-backdrop__form--secondary {
  right: -85%;
  bottom: -20%;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.di-icon {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
}

.gateway-panel,
.branch-action,
[data-theme-toggle],
.mobile-menu summary,
.contact-band > a {
  -webkit-tap-highlight-color: transparent;
}

.gateway-panel:active .gateway-panel__cta:not(.explore-fill),
.branch-action--primary:not(.explore-fill):active {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.theme-toggle:active,
.site-theme-toggle:active,
.mobile-menu summary:active {
  border-color: var(--accent);
  background: var(--accent-faint);
}

.branch-action:not(.branch-action--primary):active,
.contact-band > a:active {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--page);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
  transform: translateY(calc(-100% - 1rem));
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

.brand-lockup {
  position: absolute;
  top: clamp(1rem, 3.3vh, 2.25rem);
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.42rem;
  width: min(13rem, 48vw);
  transform: translateX(-50%);
  pointer-events: none;
}

.brand-lockup__mark {
  display: block;
  width: clamp(2.4rem, 7.2vw, 4.6rem);
  height: clamp(2.4rem, 7.2vw, 4.6rem);
  filter: var(--logo);
}

.brand-lockup__name {
  color: var(--ink-soft);
  font-size: clamp(0.68rem, 1.4vw, 0.84rem);
  font-weight: 520;
  letter-spacing: 0.1em;
  line-height: 1.2;
  white-space: nowrap;
}

.gateway-privacy {
  position: absolute;
  top: clamp(1rem, 3.3vh, 2.25rem);
  left: clamp(0.65rem, 2.4vw, 2rem);
  z-index: 10;
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.gateway-privacy:hover {
  color: var(--ink);
}

.gateway-privacy:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 4px;
  border-radius: 0.2rem;
}

.theme-toggle {
  position: absolute;
  top: clamp(1rem, 3.3vh, 2.25rem);
  right: clamp(0.65rem, 2.4vw, 2rem);
  z-index: 10;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--page) 84%, transparent);
  color: var(--ink-soft);
  cursor: pointer;
}

.theme-toggle__icon {
  position: absolute;
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.theme-toggle__icon--dark {
  opacity: 0;
}

[data-theme="light"] .theme-toggle__icon--light {
  opacity: 0;
}

[data-theme="light"] .theme-toggle__icon--dark {
  opacity: 1;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 4px;
}

.gateway {
  min-height: 100svh;
}

.gateway__panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: max(100svh, 44rem);
  overflow: hidden;
  background: var(--page);
}

.gateway-panel {
  position: relative;
  z-index: 0;
  display: flex;
  min-width: 0;
  min-height: 100%;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
  isolation: isolate;
}

.gateway-panel::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 57%, var(--accent-faint), transparent 30%),
    var(--panel-background);
  content: "";
}

.gateway-panel::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--panel-hover);
  content: "";
  opacity: 0;
}

.gateway-panel--digital {
  --panel-background: var(--panel-digital);
}

.gateway-panel--systems {
  --panel-background: var(--panel-systems);
}

.gateway-panel__content {
  position: relative;
  display: flex;
  width: min(calc(100% - clamp(1.4rem, 5vw, 4.5rem)), 35rem);
  min-width: 0;
  padding-block: clamp(7.35rem, 19vh, 10.5rem) clamp(1.8rem, 5vh, 4rem);
  flex-direction: column;
  justify-content: space-around;
  gap: clamp(1.05rem, 2.5vh, 2.5rem);
}

.gateway-panel__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.gateway-panel__eyebrow {
  color: var(--ink-muted);
  font-size: clamp(0.625rem, 1.2vw, 0.75rem);
  font-weight: 680;
  letter-spacing: 0.13em;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.gateway-panel__symbol {
  display: block;
  margin-block: 0.65rem 0.85rem;
  color: var(--accent-strong);
}

.gateway-panel__symbol .di-icon {
  width: 2rem;
  height: 2rem;
}

.gateway-panel__title {
  max-width: 9ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 5.15vw, 4.8rem);
  font-weight: 540;
  letter-spacing: -0.047em;
  line-height: 1.04;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.gateway-panel__body {
  display: block;
  max-width: 34rem;
  margin-top: clamp(0.85rem, 2.2vh, 1.45rem);
  color: var(--ink-soft);
  font-size: clamp(0.875rem, 1.35vw, 1.05rem);
  font-weight: 420;
  letter-spacing: -0.012em;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.interface-art,
.systems-art {
  position: relative;
  display: block;
  width: min(100%, 22rem);
  height: clamp(8.7rem, 22vh, 14.5rem);
  margin-inline: auto;
  flex: 0 0 auto;
}

.interface-art__shadow {
  position: absolute;
  top: 12%;
  right: 1%;
  width: 75%;
  height: 78%;
  border: 1px solid var(--line-soft);
  background: var(--accent-faint);
  transform: translate(6%, 4%);
}

.interface-art__window {
  position: absolute;
  inset: 5% 8% 8% 2%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--panel-background) 89%, var(--accent) 11%);
  box-shadow: 0 1.3rem 3.5rem var(--shadow), 0 0 2rem var(--accent-faint);
  transform: perspective(50rem) rotateY(4deg) rotateX(2deg);
}

.interface-art__bar {
  display: flex;
  align-items: center;
  height: 14%;
  padding-inline: 6%;
  gap: 3.5%;
  border-bottom: 1px solid var(--line-soft);
}

.interface-art__bar > span {
  width: 0.28rem;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.interface-art__bar > span:first-child {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0.6rem var(--accent-soft);
}

.interface-art__layout {
  display: grid;
  height: 86%;
  grid-template-columns: 22% 1fr;
}

.interface-art__rail {
  display: flex;
  padding: 30% 21%;
  flex-direction: column;
  gap: 15%;
  border-right: 1px solid var(--line-soft);
}

.interface-art__rail > span {
  width: 100%;
  height: 1px;
  background: var(--line);
}

.interface-art__rail > span:first-child {
  background: var(--accent);
}

.interface-art__canvas {
  position: relative;
  display: flex;
  padding: 14% 11%;
  flex-direction: column;
  align-items: flex-start;
}

.interface-art__kicker {
  width: 26%;
  height: 3px;
  margin-bottom: 9%;
  background: var(--accent);
}

.interface-art__line {
  width: 52%;
  height: 1px;
  margin-top: 5%;
  background: var(--line);
}

.interface-art__line--wide {
  width: 78%;
  height: 5px;
  margin-top: 0;
  background: color-mix(in srgb, var(--ink) 72%, transparent);
}

.interface-art__cards {
  display: grid;
  width: 100%;
  margin-top: 13%;
  grid-template-columns: repeat(3, 1fr);
  gap: 5%;
}

.interface-art__cards > i {
  aspect-ratio: 1.25;
  border: 1px solid var(--line-soft);
  background: var(--accent-faint);
}

.interface-art__cards > i:nth-child(2) {
  border-color: var(--line);
  background: var(--accent-soft);
}

.interface-art__button {
  width: 31%;
  height: 6px;
  margin-top: auto;
  border: 1px solid var(--accent);
  border-radius: 999px;
}

.interface-art__cursor {
  position: absolute;
  right: 5%;
  bottom: 3%;
  width: 0;
  height: 0;
  border-top: 0.85rem solid var(--accent-strong);
  border-right: 0.55rem solid transparent;
  filter: drop-shadow(0 0 0.45rem var(--accent));
  transform: rotate(-24deg);
}

.systems-art__network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.systems-art__orbit--middle {
  stroke: color-mix(in srgb, var(--accent) 44%, transparent);
}

.systems-art__orbit--inner {
  stroke: var(--accent);
  stroke-dasharray: 3 5;
}

.systems-art__nodes {
  fill: var(--panel-background);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.systems-art__nodes circle:nth-child(2n) {
  fill: var(--accent);
}

.systems-art__ticks {
  stroke: color-mix(in srgb, var(--accent) 55%, transparent);
}

.systems-art__halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 43%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 69%);
  transform: translate(-50%, -50%);
}

.systems-art__mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(2.3rem, 31%, 5.5rem);
  aspect-ratio: 1;
  background: var(--internal-mark);
  -webkit-mask: url("/brand/logo-DI-final.svg") center / contain no-repeat;
  mask: url("/brand/logo-DI-final.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 0.9rem var(--accent-soft));
  transform: translate(-50%, -50%);
}

.capability-list {
  display: flex;
  min-width: 0;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
}

.capability-list li {
  display: inline-flex;
  min-height: 1.65rem;
  padding: 0.35rem 0.56rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: clamp(0.625rem, 0.95vw, 0.72rem);
  font-weight: 680;
  letter-spacing: 0.08em;
  line-height: 1;
  overflow-wrap: anywhere;
}

.gateway-panel__cta {
  display: flex;
  min-height: 2.9rem;
  padding: 0.64rem clamp(0.62rem, 1.6vw, 1.05rem);
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: clamp(0.72rem, 1.16vw, 0.91rem);
  font-weight: 590;
  letter-spacing: -0.012em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.gateway-panel__cta svg {
  width: 1rem;
  min-width: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

/* Reveal the white surface and its dark label together, preserving contrast
   on both sides of the fill in either theme. Only the base label is accessible. */
.explore-fill {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.gateway-panel__cta.explore-fill,
.branch-action.explore-fill {
  border: 2px solid var(--accent);
  background: var(--explore-background);
  color: var(--explore-ink);
}

.explore-fill__overlay {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  padding: inherit;
  align-items: inherit;
  justify-content: inherit;
  gap: inherit;
  /* Keep the white layer inside the rounded blue border. */
  border-radius: inherit;
  background: #fff;
  color: #021013;
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
  user-select: none;
}

[data-explore-fill]:is(:focus-visible, :active, .is-pressed) .explore-fill__overlay {
  clip-path: inset(0);
}

@media (hover: hover) and (pointer: fine) {
  [data-explore-fill]:hover .explore-fill__overlay {
    clip-path: inset(0);
  }
}

.gateway-panel:focus-visible {
  z-index: 4;
  outline: none;
  box-shadow: inset 0 0 0 3px var(--accent-strong);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .gateway-panel:hover::after {
    opacity: 1;
  }

  .gateway-panel:hover .gateway-panel__cta {
    border-color: var(--accent);
    box-shadow: 0 0 1.25rem var(--accent-faint);
  }
}

@media (max-width: 699px) {
  .theme-toggle {
    width: 2.75rem;
    height: 2.75rem;
  }

  .gateway-panel__content {
    width: calc(100% - 1.5rem);
    padding-block-end: 0.75rem;
  }

  .gateway-panel__title {
    max-width: 6.5ch;
    min-height: 2.08em;
  }

  .gateway-panel__eyebrow {
    min-height: 2.9em;
  }

  .interface-art,
  .systems-art {
    width: min(100%, 11.75rem);
  }

  .gateway-panel__cta {
    align-items: flex-start;
  }
}

@media (min-width: 700px) {
  .gateway__panels {
    min-height: max(100svh, 50rem);
  }

  .gateway-panel__content {
    padding-block-start: clamp(9.5rem, 20vh, 12rem);
  }
}

@media (min-width: 1200px) {
  .gateway-panel__content {
    width: min(calc(100% - 7rem), 35rem);
  }

  .gateway-panel__body {
    max-width: 31rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ambient-backdrop__form--primary {
    transform: translateY(calc(-1 * var(--ambient-shift, 0px))) rotate(var(--ambient-turn, 0deg));
  }

  .ambient-backdrop__form--secondary {
    transform: translateY(var(--ambient-shift, 0px)) rotate(calc(-1 * var(--ambient-turn, 0deg)));
  }

  .ambient-backdrop__glow {
    transform: translateY(calc(-0.5 * var(--ambient-shift, 0px)));
  }

  .explore-fill__overlay {
    transition: clip-path 220ms ease-out;
  }

  [data-explore-fill]:focus-visible .explore-fill__overlay {
    transition-duration: 420ms;
  }

  @media (hover: hover) and (pointer: fine) {
    [data-explore-fill]:hover .explore-fill__overlay {
      transition-duration: 420ms;
    }
  }

  [data-explore-fill]:is(:active, .is-pressed) .explore-fill__overlay {
    transition-duration: 160ms;
  }

  .gateway-panel::after,
  .gateway-panel__cta,
  .theme-toggle,
  .theme-toggle__icon,
  .skip-link {
    transition:
      border-color var(--motion-fast) ease,
      box-shadow var(--motion-medium) ease,
      color var(--motion-fast) ease,
      opacity var(--motion-medium) ease,
      transform var(--motion-medium) var(--motion-ease);
  }

  .gateway-panel__cta svg {
    transition: transform var(--motion-medium) var(--motion-ease);
  }

  .gateway-panel__symbol {
    animation: di-icon-in var(--motion-enter) var(--motion-ease);
  }

  .gateway-panel .interface-art,
  .gateway-panel .systems-art {
    animation: di-art-in var(--motion-enter) var(--motion-ease);
  }

  .theme-toggle__icon--dark {
    transform: rotate(-28deg) scale(0.78);
  }

  [data-theme="light"] .theme-toggle__icon--light {
    transform: rotate(28deg) scale(0.78);
  }

  [data-theme="light"] .theme-toggle__icon--dark {
    transform: none;
  }

  .gateway-panel:focus-visible .gateway-panel__cta {
    transform: translateY(-2px);
    box-shadow: 0 0.45rem 1.5rem var(--accent-soft);
  }

  .gateway-panel:focus-visible .gateway-panel__cta svg {
    transform: translateX(3px);
  }

  .theme-toggle:focus-visible {
    transform: translateY(-2px);
  }

  @media (hover: hover) and (pointer: fine) {
    .gateway-panel:hover .gateway-panel__cta {
      transform: translateY(-2px);
      box-shadow: 0 0.45rem 1.5rem var(--accent-soft);
    }

    .gateway-panel:hover .gateway-panel__cta svg {
      transform: translateX(3px);
    }

    .theme-toggle:hover {
      transform: translateY(-2px);
    }
  }

  .gateway-panel:active .gateway-panel__cta {
    transform: scale(0.98);
    box-shadow: 0 0 0 0.2rem var(--accent-soft);
    transition-duration: var(--motion-fast);
  }

  .theme-toggle:active {
    transform: scale(0.97);
    transition-duration: var(--motion-fast);
  }
}

@keyframes di-icon-in {
  from {
    opacity: 0.5;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes di-art-in {
  from {
    opacity: 0.55;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes di-menu-in {
  from {
    opacity: 0.55;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .explore-fill__overlay {
    transition-property: none;
  }

  html {
    scroll-behavior: auto;
  }

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