:root {
  --bg-0: #05080b;
  --bg-1: #0b1620;
  --panel: #0f1f2be0;
  --line: #2c5162;
  --accent: #6cfbe3;
  --accent-soft: #7de7ff;
  --text-main: #d9eff7;
  --text-soft: #8baebf;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 18% 18%, #153140, #061017 45%),
    linear-gradient(120deg, var(--bg-0), var(--bg-1));
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
}

.totem {
  position: relative;
  padding: 2rem 1.5rem;
  border-right: 1px solid color-mix(in srgb, var(--line), transparent 42%);
  background:
    linear-gradient(180deg, #0a1722dc, #08131cd1),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 24px,
      #a6ffff06 24px,
      #a6ffff06 25px
    );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
  overflow: hidden;
}

.totem::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 8%, #76fff033, transparent 30%);
  pointer-events: none;
}

.totem__core {
  position: relative;
  z-index: 1;
}

.totem__emblem {
  width: 92px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 18px #82f5ff55);
}

.totem__kicker {
  margin: 0;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--accent-soft);
}

h1 {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  margin: 0.45rem 0 0;
  letter-spacing: 0.07rem;
}

#name-trigger {
  cursor: crosshair;
  transition: text-shadow 0.22s ease, color 0.22s ease;
}

#name-trigger:hover,
#name-trigger:focus-visible {
  color: #f0feff;
  text-shadow: 0 0 18px #87f7ff5f;
  outline: none;
}

.totem__subtitle {
  margin-top: 0.7rem;
  color: var(--text-soft);
  line-height: 1.45;
  max-width: 25ch;
}

.totem__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.85rem;
  padding: 0.56rem 0.84rem;
  border-radius: 10px;
  border: 1px solid #95f8ff70;
  background: linear-gradient(135deg, #0f4458, #123450);
  color: #e8fdff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.totem__cta:hover,
.totem__cta:focus-visible {
  border-color: #adfbff;
  box-shadow: 0 0 0 1px #97f3ff42, 0 8px 22px #07223595;
  transform: translateY(-1px);
  outline: none;
}

.totem__tags {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.totem__tags li {
  margin: 0;
  padding: 0;
}

.totem__tag-btn {
  border: 1px solid #87f4e533;
  color: #b9f6ef;
  font-size: 0.74rem;
  font-family: inherit;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: #0c2b3155;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.totem__tag-btn:hover {
  border-color: #9af7ee77;
  color: #e5fffb;
  transform: translateY(-1px);
}

.totem__tag-btn.is-active {
  border-color: #8ef5ff;
  color: #f0ffff;
  background: #0f394577;
  box-shadow: 0 0 0 1px #8ef5ff22;
}

.totem__metrics {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.7rem;
}

.totem__metrics article {
  background: #0b2835aa;
  border: 1px solid #8af4f029;
  border-radius: 14px;
  padding: 0.65rem 0.8rem;
}

.totem__metric-card {
  margin: 0;
}

.totem__metric-card.is-interactive {
  cursor: pointer;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.totem__metric-card.is-interactive:hover,
.totem__metric-card.is-interactive:focus-visible {
  border-color: #9df7ff74;
  box-shadow: 0 0 0 1px #84ecff33, 0 8px 22px #0a273a80;
  transform: translateY(-1px);
  outline: none;
}

.totem__metric-card.is-active {
  border-color: #8df5ff7f;
  box-shadow: 0 0 0 1px #84ecff38, 0 10px 28px #0622359b;
  background: #0c3040b2;
}

.totem__metrics .label {
  display: block;
  font-size: 0.73rem;
  color: #91b3c2;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
}

.totem__metrics strong {
  display: block;
  margin-top: 0.25rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 0.84rem;
  line-height: 1.35;
  color: #ecffff;
}

.totem__nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.totem__nav a {
  color: #b6e9f6;
  text-decoration: none;
  font-size: 0.8rem;
  border-bottom: 1px solid #76d9e400;
  transition: color 0.25s ease, border-color 0.25s ease;
  word-break: break-word;
}

.totem__nav a:hover {
  color: #ddffff;
  border-color: #9eefff;
}

.totem__nav-contact-link {
  width: 100%;
}

.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;
}

.contact-page {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 22% 22%, #153140, #061017 45%),
    linear-gradient(120deg, var(--bg-0), var(--bg-1));
}

.contact-card {
  width: min(860px, 100%);
  border: 1px solid #8df4fb34;
  border-radius: 16px;
  padding: 1.2rem;
  background: linear-gradient(155deg, #0b2030e8, #091523ef);
  box-shadow: 0 18px 42px #03111b8e;
}

.contact-card__kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: #8cd6e6;
}

.contact-card h1 {
  margin: 0.5rem 0 0.55rem;
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: #ebfdff;
}

.contact-card__intro {
  margin: 0 0 0.35rem;
  color: #9fc2d2;
  line-height: 1.5;
}

.contact-card__reassurance {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  color: #cdeef8;
  line-height: 1.45;
}

.contact-card__alert {
  border: 1px solid #8ef5ff40;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
}

.contact-card__alert--success {
  background: #113f4f99;
  color: #dffeff;
  border-color: #79f5df88;
}

.contact-card__alert--error {
  background: #431f2dbf;
  color: #ffe5ed;
  border-color: #ff8ea766;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.contact-form__field {
  display: grid;
  gap: 0.38rem;
}

.contact-form__field--full {
  grid-column: 1 / -1;
}

.contact-form label {
  font-size: 0.8rem;
  color: #8db3c5;
  letter-spacing: 0.04rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #86eefe3b;
  background: #0e2939cc;
  color: #e8fdff;
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  font-family: inherit;
  font-size: 0.93rem;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.45;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #9af6ff88;
  box-shadow: 0 0 0 1px #89ecff33;
}

.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.contact-form button {
  border: 1px solid #84f3fe5f;
  background: linear-gradient(135deg, #10435a, #0d2b42);
  color: #e4fdff;
  font-size: 0.93rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  padding: 0.62rem 0.92rem;
  font-family: inherit;
}

.contact-form button:hover {
  border-color: #9ef9ff99;
}

.contact-form__ghost {
  background: transparent;
  border-color: #8deefe4c;
  color: #cfeef8;
}

.contact-form__ghost:hover {
  border-color: #9af6ff8a;
  color: #edffff;
}

.contact-form__back {
  color: #bdebf8;
  text-decoration: none;
  font-size: 0.84rem;
  border-bottom: 1px solid transparent;
}

.contact-form__back:hover {
  color: #e6ffff;
  border-color: #9ef9ff99;
}

.contact-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 28;
}

.contact-modal.is-open {
  display: block;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: linear-gradient(180deg, #020c14d8, #01070dd9);
}

.contact-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(780px, calc(100% - 2rem));
  max-height: min(86vh, 780px);
  overflow: auto;
  padding: 1.12rem 1.15rem 1rem;
  border-radius: 16px;
  border: 1px solid #9cf4ff4a;
  background:
    radial-gradient(circle at 92% 6%, #2f8ca233, transparent 30%),
    linear-gradient(135deg, #0b2030f5, #081527f4);
  box-shadow: 0 20px 52px #03111bdb;
}

.contact-modal__close {
  position: absolute;
  right: 0.8rem;
  top: 0.6rem;
  border: 1px solid #9ff2ff4e;
  background: #0b2334;
  color: #e9fcff;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.contact-modal h3 {
  margin: 0.5rem 0 0.55rem;
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: #ebfdff;
}

.contact-card__alert p {
  margin: 0;
}

.contact-card__alert p + p {
  margin-top: 0.28rem;
}

.cyber-stage {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background:
    radial-gradient(circle at 76% 30%, #1d4e6f44, transparent 45%),
    linear-gradient(120deg, #09131a, #050a0f 55%, #060f1a);
}

.cyber-stage.intervention-mode {
  background:
    radial-gradient(circle at 72% 30%, #4dc4ff36, transparent 50%),
    linear-gradient(120deg, #09131a, #050a0f 55%, #050f18);
}

.cyber-stage::before,
.cyber-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cyber-stage::before {
  inset: 0;
  background-image:
    linear-gradient(to right, #88ffef09 1px, transparent 1px),
    linear-gradient(to bottom, #88ffef08 1px, transparent 1px);
  background-size: 62px 62px;
  mix-blend-mode: screen;
}

.cyber-stage::after {
  width: 48vmax;
  height: 48vmax;
  top: -12vmax;
  right: -16vmax;
  background: radial-gradient(circle, #6afbe526, transparent 70%);
  filter: blur(2px);
}

#network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#portrait-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 7;
}

.stage-overlay {
  position: absolute;
  left: 2.2rem;
  bottom: 2.2rem;
  max-width: min(580px, 70%);
  padding: 1.1rem 1.3rem;
  border: 1px solid #8df4fb2a;
  border-radius: 16px;
  background: linear-gradient(145deg, #0d2230c7, #0919249f);
  backdrop-filter: blur(5px);
}

.stage-overlay__label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-size: 0.66rem;
  color: #8bd8e8;
}

.stage-overlay h2 {
  margin: 0.45rem 0 0.5rem;
  font-family: "Orbitron", "Segoe UI", sans-serif;
  letter-spacing: 0.03rem;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
}

.stage-overlay p {
  margin: 0;
  color: #a2c0ce;
  line-height: 1.45;
}

.signal-card {
  position: absolute;
  top: 1.8rem;
  right: 1.8rem;
  width: min(380px, calc(100% - 3rem));
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid #88eef13a;
  background: #0c1f2ec0;
  backdrop-filter: blur(4px);
  z-index: 3;
}

.signal-card p {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  color: #9cc5d7;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
}

.service-pillars__title {
  margin-bottom: 0.75rem;
  color: #bdefff;
}

.service-pillars ul {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.45rem;
}

.service-pillars li {
  color: #d2edf5;
  font-size: 0.85rem;
  line-height: 1.35;
}

.impact-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 4;
  background:
    radial-gradient(circle at 50% 50%, #81faff6e 0%, #81faff1f 26%, transparent 52%),
    radial-gradient(circle at 20% 30%, #6df8ff33 0%, transparent 45%);
}

.impact-flash.is-active {
  animation: impactPulse 1.1s ease;
}

@keyframes impactPulse {
  0% { opacity: 0; transform: scale(0.84); }
  22% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.16); }
}

.impact-banner {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  width: min(620px, calc(100% - 3.2rem));
  border-radius: 14px;
  border: 1px solid #8ef5ff44;
  background: linear-gradient(130deg, #0a2230e3, #0a1935d4);
  padding: 0.8rem 1rem;
  opacity: 0;
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 20px 45px #0316208c;
}

.impact-banner.is-visible {
  animation: bannerDrop 0.75s cubic-bezier(0.18, 0.76, 0.23, 1.1) forwards;
}

@keyframes bannerDrop {
  0% { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(0.94); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.impact-banner__kicker {
  margin: 0;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: #90dae8;
}

.impact-banner h3 {
  margin: 0.35rem 0 0;
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: clamp(0.95rem, 1.45vw, 1.2rem);
  color: #dcf8ff;
}

.intervention-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.intervention-node {
  position: absolute;
  pointer-events: auto;
  border: 1px solid #86f4ff7b;
  background: linear-gradient(135deg, #0b2e3fe8, #0f2140d8);
  color: #e3fbff;
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
  min-width: 170px;
  max-width: 240px;
  text-align: left;
  box-shadow: 0 10px 35px #041723cc;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  animation: nodeAppear 0.6s cubic-bezier(0.16, 0.85, 0.2, 1.08) forwards;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.intervention-node:hover,
.intervention-node:focus-visible {
  border-color: #aef9ff;
  box-shadow: 0 10px 32px #031926df, 0 0 0 1px #9beeff45;
  transform: translate(-50%, -50%) scale(1.02);
  outline: none;
}

.intervention-node__kicker {
  display: block;
  font-size: 0.63rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: #9ecce0;
  margin-bottom: 0.3rem;
}

.intervention-node__title {
  display: block;
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 600;
}

@keyframes nodeAppear {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.76) translateY(16px); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.intervention-modal {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 12;
}

.intervention-modal.is-open {
  display: block;
}

.intervention-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  background: linear-gradient(180deg, #031119cc, #01070dcc);
}

.intervention-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100% - 2rem));
  max-height: min(86vh, 780px);
  overflow: auto;
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 16px;
  border: 1px solid #9cf4ff4a;
  background:
    radial-gradient(circle at 92% 6%, #2f8ca233, transparent 30%),
    linear-gradient(135deg, #0b2030f5, #081527f4);
  box-shadow: 0 20px 52px #03111bdb;
}

.intervention-modal__close {
  position: absolute;
  right: 0.8rem;
  top: 0.6rem;
  border: 1px solid #9ff2ff4e;
  background: #0b2334;
  color: #e9fcff;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.intervention-modal__kicker {
  margin: 0;
  font-size: 0.67rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: #8dc9d9;
}

.intervention-modal h3 {
  margin: 0.45rem 0 0.9rem;
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  color: #e4fbff;
}

.intervention-modal__illustration {
  border: 1px solid #97ecfb36;
  border-radius: 14px;
  background: linear-gradient(160deg, #0b2032d9, #0a1a2ae8);
  padding: 0.6rem;
  margin-bottom: 0.85rem;
}

.intervention-modal__illustration svg {
  display: block;
  width: 100%;
  height: auto;
}

.intervention-modal__explain {
  margin: 0;
  color: #c9e8f3;
  line-height: 1.55;
  font-size: 0.93rem;
  white-space: pre-line;
}

.bar {
  width: 100%;
  height: 7px;
  border-radius: 10px;
  background: #194056;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.bar span {
  display: block;
  width: var(--fill);
  height: 100%;
  background: linear-gradient(90deg, #5de8d6, #8be6ff);
  box-shadow: 0 0 15px #8defff8a;
}

.data-streams {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.data-streams span {
  position: absolute;
  top: -20%;
  width: 2px;
  height: 40%;
  background: linear-gradient(180deg, #73fde200, #73fde2aa, #73fde200);
  animation: drift 8s linear infinite;
  opacity: 0.6;
}

.data-streams span:nth-child(1) { left: 8%; animation-duration: 7s; }
.data-streams span:nth-child(2) { left: 17%; animation-duration: 11s; animation-delay: -2s; }
.data-streams span:nth-child(3) { left: 26%; animation-duration: 9s; animation-delay: -1.5s; }
.data-streams span:nth-child(4) { left: 35%; animation-duration: 12s; animation-delay: -5s; }
.data-streams span:nth-child(5) { left: 44%; animation-duration: 10s; }
.data-streams span:nth-child(6) { left: 57%; animation-duration: 9s; animation-delay: -4s; }
.data-streams span:nth-child(7) { left: 68%; animation-duration: 8s; animation-delay: -2.2s; }
.data-streams span:nth-child(8) { left: 77%; animation-duration: 11s; animation-delay: -3s; }
.data-streams span:nth-child(9) { left: 86%; animation-duration: 10.5s; animation-delay: -6s; }
.data-streams span:nth-child(10) { left: 94%; animation-duration: 12s; animation-delay: -7s; }

@keyframes drift {
  from {
    transform: translateY(-35vh);
  }
  to {
    transform: translateY(135vh);
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .totem {
    min-height: 280px;
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 42%);
  }

  .totem__subtitle {
    max-width: 65ch;
  }

  .cyber-stage {
    min-height: 68vh;
  }
}

@media (max-width: 680px) {
  .contact-form__grid {
    grid-template-columns: 1fr;
  }

  .stage-overlay {
    left: 1rem;
    right: 1rem;
    max-width: none;
    bottom: 1rem;
  }

  .signal-card {
    top: 0.9rem;
    right: 0.9rem;
    left: 0.9rem;
    width: auto;
  }

  .intervention-node {
    min-width: 155px;
    max-width: 210px;
    padding: 0.54rem 0.58rem;
  }

  .intervention-node__title {
    font-size: 0.81rem;
  }

  .totem {
    padding: 1.3rem 1rem;
  }
}
