/* CAF Drill Routine Simulator — Copyright (C) 2026 Matthew Dodd
 * SPDX-License-Identifier: LicenseRef-Proprietary  (see LICENSE for full terms)
 *
 * Styles for the apex landing page (landing/index.html). External rather than a
 * <style> block so the page's CSP needs no 'unsafe-inline' — the same standard
 * the app holds itself to. Palette and the parade-square grid echo the
 * simulator so the two pages read as one product.
 */

:root {
  --air: #5d9cec;
  --army: #4a6741;
  --navy: #2c3e50;
  --cmd: #d9534f;
  --ink: #eaf0f6;
  --ink-dim: #b9c6d4;
  --ink-quiet: rgba(185, 198, 212, 0.72);
  --panel: rgba(255, 255, 255, 0.04);
  --panel-edge: rgba(255, 255, 255, 0.1);
  --measure: 68ch;
}

* {
  box-sizing: border-box;
}

/* The page's base colour lives on <html> so it covers the WHOLE canvas, however
 * tall the document gets. Do not move it back onto body with
 * `background-attachment: fixed`: that paints only the first viewport box, so
 * everything below the fold fell back to white with near-white text on it — and
 * iOS Safari mishandles fixed attachment anyway. */
html {
  scroll-behavior: smooth;
  background-color: #1b2733;
}

body {
  margin: 0;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  padding: 0 24px 64px;
}

/* Fixed backdrop: the tint gradients plus the faint parade-square grid at the
 * app's 40px = 1 pace scale. Fixed and viewport-sized, over the html base colour,
 * so it stays put while scrolling and can never leave bare canvas behind. */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(1200px 600px at 50% -10%, rgba(93, 156, 236, 0.18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, #1b2733 100%);
  background-size:
    40px 40px,
    40px 40px,
    auto,
    auto;
  pointer-events: none;
  z-index: 0;
}

header,
main,
footer {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}

/* ---- header ---------------------------------------------------------------- */

header {
  text-align: center;
  padding: 72px 0 8px;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--air);
  border: 1px solid rgba(93, 156, 236, 0.4);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  margin: 0 0 14px;
  line-height: 1.15;
  font-weight: 700;
}

.tagline {
  font-size: 1.08rem;
  color: var(--ink-dim);
  max-width: 52ch;
  margin: 0 auto 30px;
}

abbr {
  text-decoration: underline dotted rgba(185, 198, 212, 0.5);
  cursor: help;
}

.cta {
  display: inline-block;
  background: var(--air);
  color: #10202f;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 8px;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
  box-shadow: 0 6px 18px rgba(93, 156, 236, 0.22);
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(93, 156, 236, 0.32);
}

/* Release line under the CTA — quieter than the tagline, it is a status note. */
.release {
  margin: 22px auto 0;
  max-width: 46ch;
  font-size: 0.9rem;
  color: var(--ink-quiet);
}

/* ---- sections -------------------------------------------------------------- */

main {
  padding-top: 40px;
}

section {
  margin: 0 0 52px;
}

h2 {
  font-size: 1.32rem;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--panel-edge);
}

p {
  max-width: var(--measure);
  color: var(--ink-dim);
  margin: 0 0 16px;
}

.quiet {
  color: var(--ink-quiet);
  font-size: 0.94rem;
}

a {
  color: var(--air);
}

a:hover {
  color: #8fbdf3;
}

/* Visible keyboard focus everywhere — the page is all links. */
a:focus-visible {
  outline: 2px solid var(--air);
  outline-offset: 3px;
  border-radius: 4px;
}

.features {
  margin: 0;
  padding-left: 22px;
  color: var(--ink-dim);
  max-width: var(--measure);
}

.features li {
  margin-bottom: 7px;
}

/* ---- demo cards ------------------------------------------------------------ */

.demos {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.demo a {
  display: grid;
  gap: 5px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-left: 3px solid var(--army);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  transition:
    background 0.14s ease,
    border-left-color 0.14s ease,
    transform 0.14s ease;
}

.demo a:hover,
.demo a:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-left-color: var(--air);
  transform: translateX(3px);
}

.demo-title {
  font-size: 1.08rem;
  font-weight: 600;
}

.demo-meta {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--air);
}

.demo-desc {
  color: var(--ink-dim);
  font-size: 0.95rem;
}

.demo-go {
  margin-top: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--air);
}

/* ---- legal ----------------------------------------------------------------- */

.legal {
  margin: 0;
  max-width: var(--measure);
}

.legal dt {
  font-weight: 600;
  color: var(--ink);
  margin-top: 18px;
  padding-bottom: 2px;
}

.legal dt:first-child {
  margin-top: 0;
}

.legal dd {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.96rem;
  border-left: 2px solid var(--panel-edge);
  padding-left: 14px;
}

/* ---- footer ---------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--panel-edge);
  padding-top: 22px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-quiet);
}

footer p {
  max-width: none;
  margin: 0 0 6px;
  color: inherit;
}

/* ---- motion / small screens ------------------------------------------------ */

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

  .cta,
  .demo a {
    transition: none;
  }

  .cta:hover,
  .cta:focus-visible,
  .demo a:hover,
  .demo a:focus-visible {
    transform: none;
  }
}

@media (max-width: 560px) {
  body {
    padding: 0 18px 48px;
  }

  header {
    padding-top: 52px;
  }

  .cta {
    display: block;
  }
}
