:root {
  --field-gray: #aeb4bc;
  --midnight: #061a4c;
  --cyan: #00e8ff;
  --white: #ffffff;
  --ink: #0d1c3d;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--field-gray);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--field-gray);
  font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
}

.site-shell {
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  overflow: hidden;
  background: var(--field-gray);
}

.cin-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 26, 76, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 26, 76, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.2), transparent 46%);
  background-size: 42px 42px, 42px 42px, 100% 100%;
  mask-image: linear-gradient(to bottom, transparent, #000 13%, #000 88%, transparent);
}

.scan-line {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(78vw, 1080px);
  height: 1px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, rgba(0, 232, 255, 0.5), transparent);
  box-shadow: 0 0 18px rgba(0, 232, 255, 0.28);
}

.portal-header,
.portal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: var(--midnight);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.portal-header {
  padding: 1.25rem clamp(1.15rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(6, 26, 76, 0.32);
}

.portal-identity,
.network-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.identity-mark {
  color: var(--cyan);
  font-size: 1.2rem;
  line-height: 1;
  text-shadow: 0 0 9px rgba(0, 232, 255, 0.48);
  -webkit-text-stroke: 1px var(--midnight);
}

.status-pulse {
  width: 0.5rem;
  height: 0.5rem;
  border: 2px solid var(--midnight);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 232, 255, 0.7);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 4.5rem) 1.25rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 clamp(1rem, 2vh, 1.6rem);
  color: var(--midnight);
  font-size: clamp(0.68rem, 1.2vw, 0.8rem);
  font-weight: 900;
  letter-spacing: 0.34em;
}

.emblem-crop {
  position: relative;
  width: clamp(210px, 34vw, 410px);
  aspect-ratio: 764 / 665;
  overflow: hidden;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 17px 19px rgba(3, 20, 61, 0.28));
}

.emblem-crop::after {
  position: absolute;
  inset: 2% 2.5% 1.5%;
  border: 1px solid rgba(0, 232, 255, 0.22);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  content: "";
  pointer-events: none;
}

.emblem-crop img {
  position: absolute;
  top: -23.91%;
  left: -50.52%;
  display: block;
  width: 201.05%;
  max-width: none;
  height: auto;
}

.wordmark {
  margin: clamp(1.5rem, 3.5vh, 2.5rem) 0 0;
  font-size: clamp(2.3rem, 7.1vw, 6.4rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.wordmark-evolutionary,
.wordmark-republic {
  -webkit-text-stroke: clamp(2px, 0.07em, 6px) var(--midnight);
  paint-order: stroke fill;
}

.wordmark-evolutionary {
  color: var(--cyan);
}

.wordmark-republic {
  color: var(--white);
}

.declaration {
  max-width: 720px;
  margin: clamp(1.15rem, 3vh, 2rem) auto 0;
  color: rgba(6, 26, 76, 0.86);
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0.025em;
}

.civic-principles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.2rem, 4vw, 3.8rem);
  margin-top: clamp(1.5rem, 4vh, 2.75rem);
  color: var(--midnight);
  font-size: clamp(0.63rem, 1.2vw, 0.76rem);
  font-weight: 900;
  letter-spacing: 0.23em;
}

.civic-principles span {
  position: relative;
}

.civic-principles span:not(:last-child)::after {
  position: absolute;
  top: 50%;
  left: calc(100% + clamp(0.52rem, 1.8vw, 1.8rem));
  width: 0.35rem;
  height: 0.35rem;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid var(--midnight);
  background: var(--cyan);
  content: "";
}

.portal-footer {
  justify-content: center;
  gap: 0.65rem;
  padding: 1.1rem clamp(1.15rem, 4vw, 3.5rem);
  border-top: 1px solid rgba(6, 26, 76, 0.26);
  color: rgba(6, 26, 76, 0.66);
}

.footer-divider {
  width: 2.6rem;
  height: 1px;
  background: rgba(6, 26, 76, 0.45);
}

@media (max-width: 640px) {
  .portal-header {
    align-items: flex-start;
  }

  .portal-identity,
  .network-status {
    max-width: 48%;
    font-size: 0.59rem;
    line-height: 1.4;
  }

  .network-status {
    justify-content: flex-end;
    text-align: right;
  }

  .wordmark {
    display: flex;
    flex-direction: column;
    gap: 0.12em;
  }

  .civic-principles {
    flex-direction: column;
    gap: 0.8rem;
  }

  .civic-principles span:not(:last-child)::after {
    top: calc(100% + 0.39rem);
    left: 50%;
  }

  .portal-footer {
    flex-wrap: wrap;
    font-size: 0.56rem;
    text-align: center;
  }

  .footer-divider {
    width: 1.4rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .status-pulse {
    animation: civic-pulse 2.8s ease-in-out infinite;
  }

  .emblem-crop {
    animation: emblem-arrival 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .wordmark,
  .declaration,
  .civic-principles {
    animation: content-arrival 750ms ease-out both;
  }

  .declaration {
    animation-delay: 100ms;
  }

  .civic-principles {
    animation-delay: 180ms;
  }
}

@keyframes civic-pulse {
  0%, 100% {
    opacity: 0.56;
    box-shadow: 0 0 5px rgba(0, 232, 255, 0.42);
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 14px rgba(0, 232, 255, 0.86);
  }
}

@keyframes emblem-arrival {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes content-arrival {
  from {
    opacity: 0;
    transform: translateY(9px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
