@import "./tokens.css";

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  background:
    radial-gradient(1200px 600px at 12% -10%, #c5d5e8 0%, transparent 55%),
    radial-gradient(900px 500px at 88% 0%, #dfe7f0 0%, transparent 50%),
    linear-gradient(180deg, var(--field-top), var(--field-mid) 42%, var(--field-bottom));
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
}

main,
footer,
.site-header {
  position: relative;
  z-index: 1;
}

.visually-hidden {
  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: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 80;
  padding: 0.55rem 0.85rem;
  background: var(--navy-deep);
  color: var(--white);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.65rem;
}

.utility-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 1rem;
  background: var(--navy-deep);
  color: #f3f6f9;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

a {
  color: var(--federal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

h1,
h2,
h3,
.brand-name {
  font-family: var(--font-display);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--navy-deep) 94%, transparent);
  color: var(--white);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--signal) 55%, transparent);
  animation: nav-in 0.7s var(--ease) both;
}

.brand {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  color: var(--white);
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-product {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d5deea;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid color-mix(in srgb, var(--white) 35%, transparent);
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: #e4ebf3;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--white);
}

.audience-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0e2b8;
  border: 1px solid color-mix(in srgb, var(--signal) 70%, transparent);
  padding: 0.25rem 0.55rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
  padding: clamp(2.25rem, 6vh, 3.75rem) clamp(1.25rem, 4vw, 3rem) var(--space-5);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  animation: hero-in 0.9s var(--ease) 0.1s both;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 0;
  min-width: 0;
}

.hero-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  border-left: 3px solid var(--signal);
  padding-left: 0.65rem;
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.85rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--navy-deep);
  max-width: 14.5em;
  margin-bottom: 1rem;
}

.hero-lede {
  max-width: 46ch;
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: 0.85rem;
}

.hero-proof {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0 1.2rem;
  border: 1px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--signal);
  color: var(--signal-ink);
  padding-inline: 1.55rem;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #d4af37;
  color: var(--signal-ink);
}

.btn-primary:active {
  background: #b07d2c;
}

.btn-ghost-light {
  background: transparent;
  border-color: color-mix(in srgb, var(--white) 45%, transparent);
  color: var(--white);
}

.btn-ghost-light:hover,
.btn-ghost-light:focus-visible {
  background: color-mix(in srgb, var(--white) 10%, transparent);
  border-color: var(--signal);
  color: var(--white);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.15rem;
  font-weight: 600;
  color: var(--federal);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--navy);
  text-decoration: underline;
}

.text-link:active {
  color: var(--navy-deep);
}

.mission-panel {
  display: grid;
  gap: 0.65rem;
  align-content: center;
  justify-items: center;
  min-width: 0;
  margin: 0;
  color: var(--navy);
}

.mission-panel-art {
  display: block;
  width: 100%;
  height: auto;
  max-width: 40rem;
}

.mission-panel-meta {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-muted);
  max-width: 40rem;
  width: 100%;
  text-align: center;
}

.section {
  display: grid;
  grid-template-columns: minmax(12rem, 22rem) minmax(0, 1fr);
  column-gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding: var(--space-5) clamp(1.25rem, 4vw, 3rem) var(--space-6);
}

.section-alt {
  background: color-mix(in srgb, var(--navy) 3%, transparent);
}

.section h2 {
  grid-column: 1;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--navy-deep);
  margin: 0;
  padding-top: 0;
}

.section > .lede {
  grid-column: 2;
  max-width: 58ch;
  line-height: 1.55;
  color: var(--ink-muted);
  margin: 0 0 var(--space-4);
  padding-top: 0.18rem;
}

.section-alt > .lede {
  margin-bottom: calc(var(--space-4) + 1.75rem);
}

.section > .fact-grid,
.section > .module-list,
.section > .featured-grid,
.section > .lifecycle,
.section-cta .cta-card {
  grid-column: 1 / -1;
}

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

.featured-card {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  padding: 1.2rem 1.2rem 1.3rem;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.featured-card:hover,
.featured-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--signal) 45%, var(--line));
  box-shadow: var(--shadow-md), 0 0 0 1px color-mix(in srgb, var(--signal) 20%, transparent);
  color: inherit;
}

.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.tag-status {
  color: #065f46;
  background: color-mix(in srgb, var(--status) 16%, var(--white));
  border-color: color-mix(in srgb, var(--status) 35%, transparent);
}

.tag-proto {
  color: var(--navy);
  background: color-mix(in srgb, var(--federal) 10%, var(--white));
  border-color: color-mix(in srgb, var(--federal) 28%, transparent);
}

.featured-card h3 {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--navy-deep);
}

.featured-card p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.fact-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.fact-grid li {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.2rem 1.35rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.fact-grid li:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--navy) 18%, var(--line));
  box-shadow: var(--shadow-md), 0 0 0 1px color-mix(in srgb, var(--signal) 16%, transparent);
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.85rem;
  border-radius: 0.45rem;
}

.icon-badge svg {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-badge-navy {
  background: var(--navy-deep);
  color: var(--white);
}

.icon-badge-gold {
  background: var(--signal);
  color: var(--signal-ink);
}

.fact-grid h3 {
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.fact-grid p {
  color: var(--ink-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.module-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}

.module-card {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: 1.2rem 1.2rem 1.3rem;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  animation: tile-in 0.55s var(--ease) both;
}

.module-card:hover {
  border-color: color-mix(in srgb, var(--navy) 35%, var(--line));
  box-shadow: var(--shadow-md);
}

.module-list li:nth-child(1) { animation-delay: 0.05s; }
.module-list li:nth-child(2) { animation-delay: 0.1s; }
.module-list li:nth-child(3) { animation-delay: 0.15s; }
.module-list li:nth-child(4) { animation-delay: 0.2s; }
.module-list li:nth-child(5) { animation-delay: 0.25s; }

.module-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}

.module-title:hover,
.module-title:focus-visible {
  text-decoration: underline;
}

.module-summary {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.module-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
}

.module-details {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.module-detail {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem;
  font-size: 0.86rem;
}

.module-detail dt {
  font-weight: 700;
  color: var(--navy);
}

.module-detail dd {
  color: var(--ink-muted);
  margin: 0;
}

.lifecycle {
  --chevron: clamp(1.65rem, 3.4vw, 2.15rem);
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.22rem;
}

.lifecycle-card {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.4rem;
  min-width: 0;
  min-height: 8.5rem;
  padding: 0.95rem calc(var(--chevron) + 0.55rem) 1rem 0.95rem;
  background: color-mix(in srgb, var(--navy) 12%, var(--white));
  -webkit-clip-path: polygon(
    0 0,
    calc(100% - var(--chevron)) 0,
    100% 50%,
    calc(100% - var(--chevron)) 100%,
    0 100%,
    var(--chevron) 50%
  );
  clip-path: polygon(
    0 0,
    calc(100% - var(--chevron)) 0,
    100% 50%,
    calc(100% - var(--chevron)) 100%,
    0 100%,
    var(--chevron) 50%
  );
}

.lifecycle-card:first-child {
  -webkit-clip-path: polygon(
    0 0,
    calc(100% - var(--chevron)) 0,
    100% 50%,
    calc(100% - var(--chevron)) 100%,
    0 100%
  );
  clip-path: polygon(
    0 0,
    calc(100% - var(--chevron)) 0,
    100% 50%,
    calc(100% - var(--chevron)) 100%,
    0 100%
  );
}

.lifecycle-card:not(:first-child) {
  padding-left: calc(var(--chevron) + 0.55rem);
}

.lifecycle-phase {
  order: 2;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.lifecycle-num {
  order: 1;
  display: inline-flex;
  width: 1.45rem;
  height: 1.45rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--navy-deep);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.lifecycle-card strong {
  order: 3;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy-deep);
}

.lifecycle-sandbox {
  background: color-mix(in srgb, var(--navy) 13%, var(--white));
}

.lifecycle-sandbox .lifecycle-phase {
  color: var(--navy);
}

.lifecycle-scale {
  background: color-mix(in srgb, var(--signal) 22%, var(--white));
}

.lifecycle-scale .lifecycle-phase {
  color: #7a5a1c;
}

.lifecycle-scale .lifecycle-num {
  background: var(--signal);
  color: var(--signal-ink);
}

.section-cta {
  background: transparent;
  padding-bottom: calc(var(--space-6) + 1.25rem);
}

.cta-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.9fr);
  gap: 1.5rem 2rem;
  align-items: center;
  padding: clamp(1.6rem, 3vw, 2.25rem);
  background: var(--navy-deep);
  color: #e8eef5;
  box-shadow: var(--shadow-md);
}

.cta-copy h2 {
  color: var(--white);
  font-size: 1.7rem;
  margin-bottom: 0.65rem;
}

.cta-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 0.45rem;
}

.cta-copy p {
  max-width: 48ch;
  color: #c9d4e1;
}

.cta-contact {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  color: #d7e0ea;
}

.cta-contact a {
  color: #93c5fd;
}

.cta-contact a:hover,
.cta-contact a:focus-visible {
  color: var(--white);
}

.cta-actions {
  display: grid;
  gap: 0.75rem;
  justify-items: stretch;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(12rem, auto) minmax(0, 1fr) auto;
  gap: 1.25rem 2rem;
  align-items: start;
  padding: var(--space-4) clamp(1.25rem, 4vw, 3rem) var(--space-5);
  font-size: 0.98rem;
  line-height: 1.55;
  color: #283849;
  background: color-mix(in srgb, var(--navy) 7%, var(--field-bottom));
  border-top: 1px solid var(--line);
}

.site-footer p {
  line-height: 1.55;
  max-width: 68ch;
}

@keyframes nav-in {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes tile-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
  .lifecycle-card {
    min-height: 8.75rem;
    font-size: 0.95rem;
  }

  .lifecycle-card strong {
    font-size: 0.86rem;
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 16em;
  }

  .mission-panel-art,
  .mission-panel-meta {
    max-width: none;
  }

  .featured-grid,
  .fact-grid {
    grid-template-columns: 1fr;
  }

  .cta-card {
    grid-template-columns: 1fr;
  }

  .lifecycle {
    --chevron: 1.35rem;
    grid-template-columns: 1fr;
    gap: 0.22rem;
  }

  .lifecycle-card,
  .lifecycle-card:first-child,
  .lifecycle-card:not(:first-child) {
    min-height: 0;
    padding: 0.95rem 1.15rem calc(var(--chevron) + 0.85rem);
    -webkit-clip-path: polygon(
      0 0,
      100% 0,
      100% calc(100% - var(--chevron)),
      50% 100%,
      0 calc(100% - var(--chevron))
    );
    clip-path: polygon(
      0 0,
      100% 0,
      100% calc(100% - var(--chevron)),
      50% 100%,
      0 calc(100% - var(--chevron))
    );
  }

  .lifecycle-card:not(:first-child) {
    padding-top: calc(var(--chevron) + 0.7rem);
    -webkit-clip-path: polygon(
      0 0,
      50% var(--chevron),
      100% 0,
      100% calc(100% - var(--chevron)),
      50% 100%,
      0 calc(100% - var(--chevron))
    );
    clip-path: polygon(
      0 0,
      50% var(--chevron),
      100% 0,
      100% calc(100% - var(--chevron)),
      50% 100%,
      0 calc(100% - var(--chevron))
    );
  }

  .lifecycle-card:last-child {
    -webkit-clip-path: polygon(
      0 0,
      50% var(--chevron),
      100% 0,
      100% 100%,
      0 100%
    );
    clip-path: polygon(
      0 0,
      50% var(--chevron),
      100% 0,
      100% 100%,
      0 100%
    );
    padding-bottom: 1rem;
  }
}

@media (max-width: 720px) {
  .utility-bar {
    justify-content: center;
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    gap: 0.25rem 0.5rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-deep);
    border-bottom: 1px solid color-mix(in srgb, var(--signal) 45%, transparent);
    padding: 0.75rem 1.25rem 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .nav-links a {
    display: block;
    padding: 0.7rem 0.15rem;
    min-height: 2.75rem;
  }

  .section,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .section h2,
  .section > .lede,
  .section > .fact-grid,
  .section > .module-list,
  .section > .featured-grid,
  .section > .lifecycle,
  .section-cta .cta-card {
    grid-column: 1;
  }

  .section h2 {
    margin-bottom: 0.55rem;
  }

  .section > .lede {
    padding-top: 0;
  }

  .hero .cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }

  .hero .btn-primary {
    width: 100%;
  }

  .featured-grid,
  .fact-grid,
  .module-list,
  .lifecycle {
    grid-template-columns: 1fr;
  }

  .module-detail {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
