:root {
  --nas-green: #6fbe44;
  --nas-green-dark: #55ad3a;
  --nas-green-deep: #08783e;
  --nas-green-bright: #8bc53f;
  --nas-white: #ffffff;
  --nas-text: #153c2c;
  --nas-muted: #5d6b63;
  --nas-border: #d8e3d6;
  --nas-accent: #f2a53b;
  --nas-page: #f5f6f5;
  --nas-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

/* Reset */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--nas-page);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--nas-text);
  background: var(--nas-white);
  font-family: Arial, Helvetica, sans-serif;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px clamp(24px, 5vw, 64px);
  background: var(--nas-white);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--nas-green-deep);
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: var(--nas-white);
  background: var(--nas-green-deep);
  border: 7px dotted var(--nas-green-bright);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
}

/* Navigation
   Left image remains at the far left.
   Title remains centered.
   Right image remains at the far right.
*/

.site-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 10px clamp(20px, 4vw, 60px);
  background: var(--nas-green);
  box-shadow: var(--nas-shadow);
}

/* Image containers */

.nav-image-box {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 64px;
}

.nav-image-box:first-child {
  justify-self: start;
  justify-content: flex-start;
}

.nav-image-box:last-child {
  justify-self: end;
  justify-content: flex-end;
}

/* Navigation images */

.nav-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 240px;
  max-height: 58px;
  object-fit: contain;
}

.nav-image-left {
  object-position: left center;
}

.nav-image-right {
  object-position: right center;
}

/* Center navigation title */

.nav-title {
  justify-self: center;
  padding: 0 24px;
  color: var(--nas-white);
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

/* Main introduction area */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  width: min(1420px, calc(100% - 40px));
  min-height: 230px;
  margin: 32px auto 0;
  padding: 42px clamp(24px, 6vw, 84px);
  overflow: hidden;
  color: var(--nas-white);
  background:
    linear-gradient(
      rgba(87, 180, 61, 0.93),
      rgba(87, 180, 61, 0.93)
    ),
    url("/images/numerical-hero.jpg") center / cover no-repeat;
  text-align: center;
}

.hero-overlay {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--nas-white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--nas-white);
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.intro {
  max-width: 950px;
  margin: 20px auto 0;
  color: var(--nas-white);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.35;
}

/* Application version section */

.versions {
  width: min(1420px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 70px;
}

.versions h2 {
  margin: 0 0 28px;
  color: var(--nas-green-deep);
  font-size: clamp(1.2rem, 2vw, 2rem);
  text-align: center;
}

/* Horizontally centered version cards */

.version-grid {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  width: 100%;
  margin: 0 auto;
}

/* Individual application link */

.version-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 1 320px;
  width: 320px;
  min-height: 100px;
  padding: 28px 60px 28px 28px;

  overflow: hidden;
  color: var(--nas-white);
  background: var(--nas-green-dark);
  border-bottom: 2px solid #000000;
  text-align: center;
  text-decoration: none;

  transition:
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.version-card:hover {
  z-index: 1;
  background: var(--nas-green-deep);
  box-shadow: 0 8px 18px rgba(8, 120, 62, 0.25);
  transform: translateY(-2px);
}

.version-card:focus-visible {
  z-index: 2;
  outline: 4px solid var(--nas-accent);
  outline-offset: 3px;
}

/* Angled dividers disabled */

.version-card::after {
  display: none;
}

.version-number {
  display: none;
}

.version-name {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.arrow {
  position: absolute;
  right: 40px;
  z-index: 1;
  color: var(--nas-white);
  font-size: 1.5rem;
  font-weight: 500;
}

/* Footer */

footer {
  padding: 26px 24px;
  color: var(--nas-white);
  background: var(--nas-green-deep);
  text-align: center;
}

footer p {
  margin: 0;
}

/* Tablet layout */

@media (max-width: 900px) {
  .site-nav {
    gap: 12px;
    padding: 10px 20px;
  }

  .nav-image {
    min-width: min(190px, 28vw);
    min-height: 100px;
  }

  .nav-title {
    padding: 0 12px;
    font-size: clamp(1.1rem, 2.8vw, 1.5rem);
  }
}

/* Mobile layout
   All three items remain on the same line.
*/

@media (max-width: 760px) {
  .site-header {
    justify-content: center;
  }

  .site-nav {
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    min-height: 64px;
    padding: 8px 12px;
  }

  .nav-image-box {
    height: 48px;
  }

  .nav-image {
    max-width: min(150px, 28vw);
    max-height: 42px;
  }

  .nav-title {
    padding: 0 6px;
    font-size: clamp(0.85rem, 3vw, 1.25rem);
    white-space: nowrap;
  }

  .hero {
    width: 100%;
    min-height: 210px;
    margin-top: 20px;
    padding: 36px 24px;
  }

  .versions {
    width: min(100% - 32px, 1420px);
    padding: 40px 0 56px;
  }

  .version-grid {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .version-card {
    flex-basis: auto;
    width: min(100%, 320px);
  }
}

/* Small mobile layout */

@media (max-width: 480px) {
  .site-nav {
    gap: 5px;
    min-height: 58px;
    padding: 6px 8px;
  }

  .nav-image-box {
    height: 42px;
  }

  .nav-image {
    max-width: 27vw;
    max-height: 36px;
  }

  .nav-title {
    padding: 0 3px;
    font-size: clamp(0.72rem, 3vw, 0.95rem);
  }

  h1 {
    font-size: 2rem;
  }

  .intro {
    font-size: 1rem;
  }

  .version-card {
    min-height: 92px;
    padding: 24px 48px 24px 20px;
  }

  .version-name {
    font-size: 1.1rem;
  }

  .arrow {
    top: 12px;
    right: 20px;
  }
}

.service-status {
  position: absolute;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-checking .status-dot {
  background: #d1d5db;
  animation: status-pulse 1.2s infinite;
}

.status-available .status-dot {
  background: #7dff79;
}

.status-unavailable .status-dot {
  background: #d1d5db;
}

.version-card.service-unavailable {
  color: #eeeeee;
  background: #7b827e;
  border-color: #606662;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.75;
  pointer-events: none;
  transform: none;
}

.version-card.service-unavailable:hover {
  background: #7b827e;
  box-shadow: none;
  transform: none;
}

.version-card.service-unavailable .arrow {
  display: none;
}

.version-card.service-checking {
  color: #eeeeee;
  background: #7b827e;
  border-color: #606662;
  box-shadow: none;
  cursor: wait;
  opacity: 0.75;
  pointer-events: none;
  transform: none;
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}
