/* iw.navy landing page. One file; the page allows no inline styles. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100% 110%;
  font-display: swap;
  src: url("/fonts/archivo-var-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Chivo Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/chivo-mono-var-latin.woff2") format("woff2");
}

/* Colors. Night is the default; day follows the reader's device setting. */
:root {
  color-scheme: dark;
  --page: #04101a;
  --panel: #0a1b29;
  --panel-hover: #0f2638;
  --line: rgba(140, 200, 222, 0.16);
  --line-strong: rgba(140, 215, 235, 0.42);
  --text: #eef7fa;
  --muted: #9bb4c0;
  --quiet: #6f8c99;
  --accent: #3fd6e6;
  --accent-ink: #04101a;
  --gold: #e9b949;
  --space: #050d18;
  --air: #0b2233;
  --sea: #08283a;
  --seabed: #04141f;
  --sans: "Archivo", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Chivo Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gap: 16px;
  --wide: 1120px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --page: #f4f7f9;
    --panel: #ffffff;
    --panel-hover: #eaf3f7;
    --line: rgba(16, 52, 74, 0.14);
    --line-strong: rgba(16, 92, 122, 0.5);
    --text: #0b1f2e;
    --muted: #42596a;
    --quiet: #62788a;
    --accent: #0b6f86;
    --accent-ink: #ffffff;
    --gold: #94690a;
    --space: #0b1b2e;
    --air: #cfe6f1;
    --sea: #7fb6cf;
    --seabed: #2c5266;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, p { margin: 0; }
h1, h2, .lead, .card-desc { text-wrap: balance; }
.foot p { text-wrap: pretty; }

.top, main, .foot {
  max-width: var(--wide);
  margin: 0 auto;
  padding-left: clamp(18px, 4vw, 32px);
  padding-right: clamp(18px, 4vw, 32px);
}

/* ---- top bar ---- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding-top: 20px;
  padding-bottom: 20px;
}
.mark {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-decoration: none;
}
.mark-iw { color: var(--text); }
.mark-dot, .mark-navy { color: var(--accent); }
.unofficial {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  text-align: center;
}

/* ---- hero ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 24px 0 32px;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding: 40px 0 44px; }
}
.label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 10px;
}
h1 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 760;
  font-stretch: 105%;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.lead {
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  max-width: 34em;
}
.hero-actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.94rem;
  text-decoration: none;
}
.button.quiet {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
  font-family: var(--mono);
  font-weight: 500;
}
.button:hover { filter: brightness(1.08); }
.button.quiet:hover { background: var(--panel-hover); filter: none; }

/* ---- the picture ---- */
.hero-picture {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.hero-picture * { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hero-picture .layer-space { fill: var(--space); }
.hero-picture .layer-air { fill: var(--air); }
.hero-picture .layer-sea { fill: var(--sea); }
.hero-picture .seabed { fill: var(--seabed); }
.hero-picture .stars circle { fill: #cfe7f2; }
.hero-picture .orbit { stroke: #7fa9bd; stroke-width: 1.2; stroke-dasharray: 3 6; }
.hero-picture .satellite rect { fill: #dff1f7; stroke: #04101a; stroke-width: 1; }
.hero-picture .downlink { stroke: var(--gold); stroke-width: 1.2; stroke-dasharray: 2 5; }
.hero-picture .duct-top { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 8 6; }
.hero-picture .ray { stroke: var(--gold); stroke-width: 1.8; }
.hero-picture .ray.escape { stroke-width: 1.2; stroke-dasharray: 4 5; }
.hero-picture .balloon circle { fill: var(--panel); stroke: var(--text); stroke-width: 1.4; }
.hero-picture .balloon path { stroke: var(--text); stroke-width: 1.2; }
.hero-picture .balloon rect { fill: var(--text); }
.hero-picture .surface { stroke: var(--text); stroke-width: 1.6; }
.hero-picture .ship path { fill: var(--text); stroke: var(--text); stroke-width: 1.4; }
.hero-picture .sound { stroke: var(--accent); stroke-width: 1.8; }
.hero-picture .sound.deep { stroke-width: 1.2; stroke-dasharray: 4 5; }
.hero-picture .layer-names text {
  fill: #cfe7f2;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
}
@media (prefers-color-scheme: light) {
  .hero-picture .layer-names text:nth-child(n+2) { fill: #0b1f2e; }
  .hero-picture .sound { stroke: #05324a; }
  .hero-picture .ray, .hero-picture .downlink { stroke: #8a5a00; }
}

/* ---- the row of counts ---- */
.jump {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.jump a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 16px;
  background: var(--panel);
  text-decoration: none;
}
.jump a:hover { background: var(--panel-hover); }
.jump a:last-child { grid-column: 1 / -1; }
.jump-count { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; color: var(--accent); line-height: 1; }
.jump-name { font-size: 0.86rem; color: var(--muted); }
@media (min-width: 900px) {
  .jump { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .jump a:last-child { grid-column: auto; }
}

/* ---- sections and cards ---- */
.group { padding-top: 44px; scroll-margin-top: 12px; }
h2 { font-size: 1.4rem; font-weight: 720; letter-spacing: -0.015em; margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 4px;
  align-content: start;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.card:hover, .card:focus-visible {
  border-color: var(--line-strong);
  background: var(--panel-hover);
  transform: translateY(-1px);
}
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon {
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon .faint { opacity: 0.45; }
.icon .dot { fill: var(--accent); stroke: none; }
.card-name { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.card-desc { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.group-compact .card { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
.cac {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 0 4px;
  vertical-align: 2px;
}

/* Column counts chosen so no row is left with a single card at the widths people use. */
@media (min-width: 620px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .count-9 .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .count-4 .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .count-4.group-cards .card { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .count-4.group-cards .icon { grid-row: auto; }
}

/* ---- footer ---- */
.foot {
  margin-top: 56px;
  padding-top: 24px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 0.8rem;
  line-height: 1.55;
}
.foot p + p { margin-top: 10px; }
.foot p { max-width: 78ch; }
.foot-who { color: var(--muted); font-size: 0.9rem; }
.foot a { color: var(--muted); }

@media (max-width: 560px) {
  .top { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
