:root {
  --bg-deep: #02040a;
  --bg-glow: #071021;
  --text-main: #f4f7ff;
  --text-soft: #b8c7e3;
  --accent-warm: #ffd29d;
  --panel: rgba(9, 16, 30, 0.82);
  --panel-border: rgba(163, 205, 255, 0.26);
  --button-text: #04111f;
}

@font-face {
  font-family: 'D-DIN';
  src:
    local('D-DIN'),
    local('D-DIN Regular'),
    local('D-DIN-PRO'),
    local('D-DIN Condensed');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'D-DIN';
  src:
    local('D-DIN Bold'),
    local('D-DIN-PRO Bold'),
    local('D-DIN Condensed Bold');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'D-DIN', 'Roboto Condensed', 'Roboto', 'Trebuchet MS', sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 18% 16%, rgba(110, 179, 255, 0.2), transparent 32%),
    radial-gradient(circle at 78% 12%, rgba(196, 224, 255, 0.12), transparent 30%),
    radial-gradient(circle at 52% 108%, rgba(103, 190, 255, 0.2), transparent 38%),
    linear-gradient(180deg, var(--bg-glow), var(--bg-deep));
  min-height: 100vh;
  position: relative;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  opacity: 0.55;
  background-image:
    radial-gradient(2px 2px at 10% 22%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 18% 74%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(2px 2px at 32% 36%, rgba(179, 220, 255, 0.75), transparent),
    radial-gradient(1px 1px at 48% 16%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 60% 66%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(2px 2px at 75% 32%, rgba(146, 205, 255, 0.75), transparent),
    radial-gradient(1px 1px at 86% 78%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(2px 2px at 92% 22%, rgba(209, 232, 255, 0.8), transparent);
}

body::after {
  background: radial-gradient(circle at 50% 30%, rgba(87, 162, 255, 0.09), transparent 52%);
}

.app-shell {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding-bottom: 4rem;
}

.site-header {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  gap: 0.8rem;
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  background: rgba(8, 15, 28, 0.28);
  backdrop-filter: blur(8px);
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-family: 'D-DIN', 'Roboto Condensed', 'Roboto', 'Trebuchet MS', sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.48rem 0.92rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(12, 25, 45, 0.45);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-link:hover {
  transform: translateY(-1px);
  border-color: rgba(159, 206, 255, 0.38);
  background: rgba(17, 36, 61, 0.72);
}

.view {
  min-height: 92vh;
  display: grid;
  align-content: center;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.view-landing {
  display: block;
  padding-top: 0;
  isolation: isolate;
  min-height: 100vh;
  height: 100vh;
}

.view-landing::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 0;
  background: linear-gradient(rgba(0, 4, 12, 0.94), rgba(1, 8, 19, 0.96));
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.55);
}

.orbit-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  justify-self: center;
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background: #040913;
  border: 0;
  box-shadow: none;
}

.planet {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.earth {
  background: url('/assets/earth-transparent.png') center / contain no-repeat;
  filter: saturate(1.02) contrast(1.05);
  animation: earthFade 8s ease-in-out 1 forwards;
}

.moon {
  background: url('/assets/moon-transparent.png') center / contain no-repeat;
  filter: grayscale(0.1) contrast(1.08);
  opacity: 0;
  animation: moonFade 8s ease-in-out 1 forwards;
}

.landing-copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  text-align: center;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.9rem;
  padding: 1.2rem;
  background: linear-gradient(rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.48));
}

.transition-line {
  margin: 0;
  color: var(--accent-warm);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  animation: pulseText 8s ease-in-out 1 forwards;
}

h2.transition-line {
  margin: 0;
  color: var(--text-soft);
  letter-spacing: 0.1em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  animation: pulseTextFull 8s ease-in-out 1 forwards;
}


.landing-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3.7rem);
  line-height: 1.1;
  text-transform: uppercase;
  max-width: 20ch;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.72rem 1.15rem;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button.primary {
  background: var(--text-main);
  color: var(--button-text);
  border: 1px solid var(--panel-border);
}

.button.ghost {
  background: rgba(13, 28, 49, 0.78);
  color: var(--text-main);
  border: 1px solid var(--panel-border);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.view-how {
  margin-top: 1.2rem;
  border-radius: 1.3rem;
  overflow: hidden;
  min-height: 78vh;
  background:
    linear-gradient(rgba(0, 5, 14, 0.74), rgba(0, 4, 12, 0.95));
}

.moon-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(180, 238, 255, 0.2), transparent 40%),
    radial-gradient(circle at 12% 88%, rgba(255, 214, 148, 0.16), transparent 35%);
}

.how-card,
.form-card {
  width: min(680px, 92%);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 1rem;
  padding: 1.25rem;
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.how-card h2,
.form-card h2 {
  margin: 0.5rem 0 0;
  line-height: 1.2;
}

.how-card p,
.form-card p {
  color: var(--text-soft);
}

.how-carousel {
  margin-top: 1rem;
  height: 40rem;
  overflow: hidden;
  position: relative;
}

.how-carousel.is-loading::before,
.how-carousel.is-loading::after {
  content: '';
  position: absolute;
  z-index: 5;
}

.how-carousel.is-loading::before {
  inset: 0;
  background: rgba(2, 9, 18, 0.45);
}

.how-carousel.is-loading::after {
  width: 2rem;
  height: 2rem;
  top: 50%;
  left: 50%;
  margin-top: -1rem;
  margin-left: -1rem;
  border-radius: 999px;
  border: 2px solid rgba(157, 214, 255, 0.3);
  border-top-color: rgba(196, 235, 255, 0.95);
  animation: carouselSpin 700ms linear infinite;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 280ms ease;
}

.carousel-card {
  min-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.carousel-card > .request-card,
.carousel-card > .certificate-preview,
.carousel-card > .automation-card {
  flex: 1 1 auto;
  min-height: 0;
}

.placeholder-card {
  width: 100%;
  height: 100%;
  padding: 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(164, 203, 255, 0.28);
  background: rgba(6, 14, 28, 0.78);
  box-shadow: inset 0 0 0 1px rgba(118, 186, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-content: center;
  justify-items: center;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  overflow: auto;
}

.certificate-preview {
  width: 100%;
  height: 100%;
  padding: 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(184, 223, 255, 0.38);
  background:
    linear-gradient(165deg, rgba(12, 24, 43, 0.94), rgba(9, 17, 30, 0.88)),
    radial-gradient(circle at 90% 10%, rgba(154, 205, 255, 0.12), transparent 35%);
  box-shadow:
    inset 0 0 0 1px rgba(118, 186, 255, 0.12),
    0 16px 36px rgba(1, 7, 16, 0.38);
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.cert-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.certificate-preview h3 {
  margin: 0.35rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cert-status {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-accent {
  color: #9ff6b5;
  font-weight: 700;
  text-shadow: 0 0 16px rgba(145, 255, 175, 0.34);
}

.cert-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.8rem;
}

.cert-grid p {
  margin: 0;
  display: grid;
  gap: 0.1rem;
}

.cert-grid span {
  font-size: 0.7rem;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cert-grid strong {
  font-size: 0.88rem;
  color: var(--text-main);
  word-break: break-word;
}

.signature-block {
  margin-top: 1.35rem;
}

.signature-block .validity-title + .cert-signature {
  margin-top: 0.45rem;
}

.signature-block .download-link + .validity-title {
  margin-top: 0.95rem;
}

.cert-signature {
  margin-top: 0.3rem;
  display: block;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(164, 203, 255, 0.3);
  background: rgba(4, 11, 22, 0.8);
  color: #cde8ff;
  font-size: 0.74rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.placeholder-card h3 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.placeholder-card p {
  margin: 0;
  font-size: 1rem;
}

.automation-card {
  width: 100%;
  height: 100%;
  padding: 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(184, 223, 255, 0.38);
  background:
    linear-gradient(165deg, rgba(8, 20, 36, 0.94), rgba(8, 16, 30, 0.88)),
    radial-gradient(circle at 18% 12%, rgba(154, 205, 255, 0.12), transparent 42%);
  box-shadow:
    inset 0 0 0 1px rgba(118, 186, 255, 0.12),
    0 16px 36px rgba(1, 7, 16, 0.38);
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.automation-card h3 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.automation-desc {
  margin: 0.5rem 0 0;
  color: var(--text-soft);
}

.automation-grid {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.55rem;
}

.automation-grid p {
  margin: 0;
  display: grid;
  gap: 0.15rem;
}

.automation-grid span {
  font-size: 0.7rem;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.automation-grid strong {
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(164, 203, 255, 0.3);
  background: rgba(4, 11, 22, 0.8);
  color: #cde8ff;
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.api-example {
  margin-top: 0.95rem;
}

.api-meta {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.api-request-body {
  margin: 0.55rem 0 0;
  padding: 0.6rem 0.7rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(164, 203, 255, 0.3);
  background: rgba(4, 11, 22, 0.8);
  color: #cde8ff;
  font-size: 0.74rem;
  line-height: 1.38;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.request-card {
  margin-top: 0;
  width: 100%;
  height: 100%;
  padding: 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(164, 203, 255, 0.28);
  background: rgba(6, 14, 28, 0.78);
  box-shadow: inset 0 0 0 1px rgba(118, 186, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.request-card h3 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1rem;
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.sector-button {
  font: inherit;
  color: var(--text-main);
  background: rgba(14, 29, 52, 0.74);
  border: 1px solid rgba(153, 196, 245, 0.3);
  border-radius: 0.75rem;
  padding: 0.55rem;
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.sector-button:hover {
  border-color: rgba(173, 221, 255, 0.54);
  background: rgba(22, 42, 72, 0.86);
  transform: translateY(-1px);
}

.sector-button.is-selected {
  border-color: rgba(181, 231, 255, 0.8);
  background: rgba(44, 86, 128, 0.88);
  box-shadow: inset 0 0 0 1px rgba(196, 235, 255, 0.45);
}

.sector-icon {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(4, 12, 24, 0.75);
  border: 1px solid rgba(138, 195, 255, 0.35);
}

.sector-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: #9dd6ff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control-block {
  margin-top: 0.9rem;
}

.control-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.control-block label,
.field-group label,
.validity-title {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.control-block input[type='range'] {
  width: 100%;
  accent-color: #9dd6ff;
}

.slider-wrap {
  position: relative;
  margin-top: 0.35rem;
}

.slider-value-tooltip {
  position: absolute;
  top: -1.65rem;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(153, 196, 245, 0.35);
  background: rgba(13, 27, 48, 0.9);
  color: var(--text-main);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.range-meta {
  margin-top: 0.2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.download-link {
  margin-top: 0.35rem;
  border: 1px solid rgba(164, 203, 255, 0.35);
  background: rgba(12, 25, 45, 0.62);
  color: var(--text-main);
  border-radius: 999px;
  font: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.38rem 0.68rem;
  cursor: pointer;
}

.request-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.center-block {
  margin-top: 0.9rem;
}

.coordinate-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.field-group input {
  width: 100%;
  border: 1px solid rgba(164, 203, 255, 0.32);
  background: rgba(4, 11, 22, 0.8);
  color: var(--text-main);
  border-radius: 0.6rem;
  padding: 0.66rem;
  font: inherit;
}

.icon-input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.9;
}

.icon-input-wrap input {
  padding-left: 2rem;
}

.time-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
}

.time-nav {
  border: 1px solid rgba(164, 203, 255, 0.35);
  background: rgba(12, 25, 45, 0.62);
  color: var(--text-main);
  border-radius: 999px;
  width: 1.8rem;
  height: 1.8rem;
  font: inherit;
  cursor: pointer;
  line-height: 1;
}

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

.card-action-row {
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 0;
  display: flex;
  justify-content: center;
}

.card-action-row .button {
  min-width: 10.5rem;
}

.card-action-row .button.primary {
  background: linear-gradient(120deg, rgba(141, 211, 255, 0.22), rgba(116, 178, 255, 0.18));
  color: var(--text-main);
  border: 1px solid rgba(157, 214, 255, 0.45);
  box-shadow: 0 8px 22px rgba(9, 21, 40, 0.46);
}

.view-application {
  min-height: 84vh;
  margin-top: 1.2rem;
}

.application-form {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.application-form label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.application-form input {
  border: 1px solid rgba(164, 203, 255, 0.32);
  background: rgba(4, 11, 22, 0.8);
  color: var(--text-main);
  border-radius: 0.6rem;
  padding: 0.72rem;
  font: inherit;
}

.application-form input:focus {
  outline: 2px solid rgba(126, 214, 255, 0.44);
  outline-offset: 1px;
}

.form-feedback {
  min-height: 1.2rem;
  margin: 0.8rem 0 0;
  color: var(--accent-warm);
  font-size: 0.9rem;
}

@keyframes earthFade {
  0%,
  46% {
    opacity: 1;
    transform: scale(1.01);
  }
  68%,
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes moonFade {
  0%,
  42% {
    opacity: 0;
    transform: scale(1.02);
  }
  72%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseText {
  0%,
  100% {
    opacity: 0.4;
  }
  45%,
  62% {
    opacity: 1;
  }
}

@keyframes pulseTextFull {
  0%,
  100% {
    opacity: 0.4;
  }
  45%,
  100% {
    opacity: 1;
  }
}

@keyframes carouselSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 740px) {
  .site-header {
    top: 0.6rem;
    right: 0.6rem;
    padding: 0.35rem 0.45rem;
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 0.42rem 0.65rem;
  }

  .view {
    min-height: auto;
    padding: 2.1rem 0;
  }

  .orbit-stage {
    min-height: 440px;
    height: 62vh;
  }

  .view-how,
  .view-application {
    min-height: auto;
  }

  .how-carousel {
    height: auto;
  }

  .carousel-track {
    height: auto;
  }

  .carousel-card {
    height: auto;
  }

  .sector-grid,
  .request-grid,
  .validity-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .card-action-row {
    justify-content: center;
  }

  .card-action-row .button {
    width: 100%;
  }
}
