/* MeshWars: styles for the standalone /about page (frontend/about.html).
   Matches the dark theme shared with join.css -- self-contained, no
   external fonts, libraries, or CDN assets. */

* { box-sizing: border-box; }

/* Type scales modestly with the viewport instead of being one fixed
   size everywhere -- subtle (15px-17px base), not the enormous text a
   naive vw-only scale would produce on a large monitor. Site chrome
   (.mw-nav, frontend/nav.css) stays in px throughout and is unaffected
   -- it needs to render identically on every page regardless of this
   page's root font-size. */
html {
  font-size: clamp(15px, 0.35vw + 14px, 17px);
}

body {
  margin: 0;
  background: var(--mw-page);
  color: var(--mw-text-1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.landing-wrap {
  /* Fluid: grows with the viewport (block default width is already
     100% of the available space) up to a real reading-page maximum,
     rather than a fixed narrow column. On a phone this is just 100%
     minus the 16px side padding below -- effectively full width with
     small gutters. */
  max-width: 1160px;
  margin: 0 auto;
  padding: calc(var(--mw-nav-h) + 16px) 16px 64px;
}

/* ---- page header ---------------------------------------------------------
   .landing-header/.landing-title/.landing-sub: the plain "large gold
   title plus a one-line subtitle" header rules.css's own .rules-header/
   .rules-title/.rules-sub define -- used as-is by /results (this file
   is the only stylesheet that page loads besides theme.css/results.css,
   neither of which carry a header treatment of their own). /about
   doesn't use these three classes at all; its own header is the hero
   lockup below instead. */
.landing-header { margin-bottom: 32px; }

.landing-title {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--mw-gold-light);
  margin: 0 0 8px;
}

.landing-sub {
  color: var(--mw-text-2);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
  max-width: 62ch;
}

/* ---- hero --------------------------------------------------------------
   The page's one hero moment: nav mark stays a small wordmark, this is
   the full lockup, shown once, centered, over the topographic texture
   plate from the brand pack (darkened so the lockup and tagline stay
   legible). If the texture is ever removed, the gradient fallback
   below still gives the band its own presence rather than resting on
   flat page background. */
.landing-hero {
  position: relative;
  text-align: center;
  padding: 48px 20px 40px;
  margin-bottom: 28px;
  border: 1px solid var(--mw-line);
  border-radius: 12px;
  background-color: var(--mw-page);
  background-image:
    var(--mw-hero-scrim),
    url("/static/assets/texture/meshwars-topo.webp");
  background-size: cover;
  background-position: center;
}

/* A background rather than an <img>, so the lockup follows --mw-logo the
   way the crest follows --mw-crest. The aspect ratio is stated here
   because a background carries no intrinsic size: both artworks are
   1010x320, so the box reserves its space before either loads and the
   hero never jumps. The element keeps role="img" and a label, since a
   background has no alt text of its own. */
.landing-hero-logo {
  display: block;
  width: min(640px, 100%);
  aspect-ratio: 1010 / 320;
  margin: 0 auto;
  background-image: var(--mw-logo);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---- live numbers band --------------------------------------------------
   Real-time figures fetched by about.js from the existing /api/mc/scores
   and /api/mc/players endpoints. Every value starts as an em dash in the
   markup itself, so with JS disabled -- or if either fetch fails -- the
   band still renders cleanly with dashes instead of an error or a
   layout break. This is deliberately a flat row of labeled numbers, not
   another grey panel, so it reads as a live status strip under the hero
   rather than one more section of text. */
.landing-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.landing-stat {
  flex: 1 1 160px;
  max-width: 220px;
  text-align: center;
  background: var(--mw-panel);
  border: 1px solid var(--mw-line);
  border-radius: 8px;
  padding: 14px 12px;
}

.landing-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--mw-gold-light);
  line-height: 1.2;
}

.landing-stat-label {
  display: block;
  margin-top: 4px;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mw-text-5);
}

/* ---- panels ------------------------------------------------------------
   No boxed cards -- Matt does not want bordered, rounded-corner panels
   around plain content. These now read the way rules.css's own
   <section>s do: prose under a gold heading with a 2px gold rule,
   separated from the next one by a thin bottom border rather than a
   background/border/radius box. The hero and the stat tiles above
   (.landing-hero/.landing-stat) and the protocol cards inside "The two
   protocols" below (.protocol-card) are deliberately NOT included here
   -- those are genuinely their own component, not a content section,
   and stay boxed. */
.landing-panel {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--mw-line);
}
.landing-panel:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* This page's own <section> h2 -- same size/weight/rule as rules.css's
   .rules-body h2, so a heading reads the same whether it's reached on
   /about or /rules. Was a plain <div>, uppercase and smaller, until
   this page grew the same contents rail /docs, /rules and /account use
   -- search and the rail both need a real heading with an id
   (frontend/page-search.js only indexes h2/h3), so every one of these
   is now an <h2 id> instead, id'd in about.html. */
.landing-panel-title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--mw-gold-light);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--mw-gold);
}

.landing-panel p {
  margin: 0 0 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--mw-text-2);
}
.landing-panel p:last-child { margin-bottom: 0; }

.landing-panel p a {
  color: var(--mw-accent);
  font-weight: 700;
  text-decoration: none;
}
.landing-panel p a:hover { text-decoration: underline; }

.landing-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--mw-text-2);
}
.landing-list li { margin-bottom: 8px; }
.landing-list li:last-child { margin-bottom: 0; }

/* ---- protocol cards ----------------------------------------------------- */
.protocol-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.protocol-card {
  background: #141414;
  border: 1px solid var(--mw-raised);
  border-radius: 6px;
  padding: 12px 14px;
}

/* MeshCore is the live protocol -- a friendly-green border and a
   filled "Live" badge give it visual weight the pending card doesn't
   get. Meshtastic is dimmed and dashed, reading as "planned" at a
   glance before a visitor reads a word of the copy. */
.protocol-card-live {
  border-color: var(--mw-friendly);
  background: #12190f;
}

.protocol-card-pending {
  border-style: dashed;
  opacity: 0.82;
}

.protocol-card-title {
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--mw-accent);
  margin-bottom: 6px;
}

.protocol-card p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--mw-text-3);
}

.protocol-live-badge {
  display: inline-block;
  background: var(--mw-friendly);
  color: #d8f0c8;
  border: 1px solid #4a7a38;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* "Coming soon" badge on the Meshtastic protocol card -- shows the
   option is planned rather than hiding it, while making clear it
   isn't open yet. Same treatment as join.css's .protocol-badge on the
   /join protocol picker, kept in sync wording-wise. */
.protocol-badge {
  display: inline-block;
  background: var(--mw-accent-wash);
  color: var(--mw-accent);
  border: 1px solid var(--mw-accent-wash-line);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---- join steps ----------------------------------------------------------- */
.landing-steps {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--mw-text-2);
}
.landing-steps li { margin-bottom: 6px; }
.landing-steps li:last-child { margin-bottom: 0; }

.landing-steps a {
  color: var(--mw-accent);
}

/* Nested numbered list for the MeshMapper connection sub-steps inside
   "How to join" step 4 -- same list styling as join.css's .join-steps
   so the instructions read identically whichever page a player is on. */
.landing-substeps {
  margin: 8px 0;
  padding-left: 20px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--mw-text-2);
}
.landing-substeps li { margin-bottom: 8px; }
.landing-substeps li:last-child { margin-bottom: 0; }
.landing-substeps code {
  background: var(--mw-page);
  border: 1px solid var(--mw-line);
  border-radius: 3px;
  padding: 1px 4px;
}

/* The one step people actually miss (switching Custom API Endpoint on)
   -- everything else can be set up perfectly and nothing is sent while
   this stays off, so it gets real visual weight instead of blending in
   as list item number four. */
.landing-step-critical {
  background: #241c0a;
  border: 1px solid var(--mw-accent);
  border-radius: 4px;
  padding: 6px 8px;
  margin-left: -8px;
  color: var(--mw-gold-light);
}

/* A clear-box warning, distinct from the smaller inline
   .landing-warnings text below -- used for the "do not paste the
   meshmapper:// link into the URL field" caution, which needs to stop
   the eye rather than blend into the surrounding paragraphs. Same
   treatment as join.css's .join-warning-box. */
.landing-warning-box {
  background: var(--mw-accent-deep);
  border: 1px solid var(--mw-hostile);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 10px 0 4px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #f0c0a8;
}
.landing-warning-box strong {
  display: block;
  color: #ffb088;
  margin-bottom: 2px;
}

.landing-warnings {
  background: #141414;
  border: 1px solid var(--mw-raised);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.landing-warnings p {
  margin: 0 0 6px;
  font-size: 0.75rem;
  color: var(--mw-text-3);
}
.landing-warnings p:last-child { margin-bottom: 0; }

.landing-join-cta {
  display: block;
  text-align: center;
  background: var(--mw-raised);
  color: var(--mw-accent);
  border: 1px solid var(--mw-line-strong);
  border-radius: 4px;
  padding: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}
.landing-join-cta:hover { background: var(--mw-line); }

/* ---- links list ----------------------------------------------------------- */
.landing-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.landing-links li {
  margin-bottom: 10px;
}
.landing-links li:last-child { margin-bottom: 0; }

.landing-links a {
  color: var(--mw-accent);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
}
.landing-links a:hover { text-decoration: underline; }

/* A community in the same list that has no site to link to yet (Central
   Oregon). Same weight, size and accent colour as the anchors above so the
   list reads as one set of titles -- deliberately NOT an <a>, so there is
   no pointer cursor or hover underline promising a link that isn't there. */
.landing-link-name {
  color: var(--mw-accent);
  font-weight: 700;
  font-size: 0.875rem;
}

.landing-link-desc {
  display: block;
  color: var(--mw-text-5);
  font-size: 0.75rem;
  margin-top: 2px;
}

/* ---- wide-screen layout -------------------------------------------------
   This page used to flow its .landing-panel sections into two CSS
   multicol columns above this breakpoint. It now carries the same
   sticky contents-rail layout /docs, /rules and /account use instead
   (rules.css's .rules-layout, wrapping the search box and every panel
   below the hero/stats band) -- that grid supplies its own 210px rail
   plus a single reading column at this same breakpoint, so
   .landing-wrap itself no longer needs to be a multicol container, and
   .landing-header/.landing-stats (the hero and the live-numbers band,
   both still direct children of .landing-wrap, ahead of the rail
   layout) no longer need column-span: all to sit above columns that
   don't exist any more. */
.landing-body { max-width: 100%; }

@media (max-width: 480px) {
  .landing-hero {
    padding: 36px 16px 30px;
  }
}

/* A plain bulleted list inside a panel -- the streak table and the
   monthly honors on /about. Separate from .landing-list, which is the
   numbered scoring rules and carries its own counter styling; this one
   is just prose in bullets and matches .landing-panel p's size and
   colour so a list does not read as a different voice from the
   paragraph above it. */
.landing-plain {
  margin: 0 0 10px;
  padding-left: 20px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--mw-text-2);
}

.landing-plain li { margin-bottom: 4px; }
.landing-plain li:last-child { margin-bottom: 0; }
.landing-plain strong { color: var(--mw-gold-light); }

/* A quiet line at the very foot of /about, pointing at the API docs.
   Not a panel and not in the nav: it is for the few people who want to
   build something, and it should read as a footnote to everyone else. */
.landing-footnote {
  margin: 8px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--mw-line);
  color: var(--mw-text-6);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.landing-footnote a { color: var(--mw-gold); font-weight: 600; text-decoration: none; }
.landing-footnote a:hover { text-decoration: underline; }

@media (min-width: 900px) {
  /* Spans both columns, so it sits under the whole page rather than
     landing at the bottom of whichever column it flowed into. The
     disclaimer needs it for the same reason -- it is addressed to
     everyone reading the page, not to whichever column it happened to
     flow into. */
  .landing-footnote,
  .landing-disclaimer { column-span: all; }
}

/* Coverage disclaimer, foot of the about page. Bold enough that someone
   from another mesh does not read the whole site before finding out it
   cannot see them, quiet enough that it is not the loudest thing on the
   page -- a left rule and a bold lead sentence, not a warning banner. */
.landing-disclaimer {
  /* No max-width, unlike the body copy above it: this is meant to run
     the full width of the page so it reads as a statement about the
     whole site rather than another paragraph in a column. */
  margin: 28px 0 20px;
  padding: 14px 0 14px 16px;
  border-left: 3px solid var(--mw-gold, #d9b45b);
  color: var(--mw-text-3, #b9b2a6);
  font-size: 0.95rem;
  line-height: 1.6;
}
.landing-disclaimer strong { display: block; margin-bottom: 6px; color: var(--mw-text-1); }
.landing-disclaimer a { color: var(--mw-gold); text-decoration: none; }
.landing-disclaimer a:hover { text-decoration: underline; }
.landing-disclaimer code {
  font-size: 0.9em;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--mw-surface-2, rgba(255,255,255,0.06));
}

/* Site-wide footer: about.html, docs.html, rules.html, privacy.html,
   results.html and api.html all load this file, so it lives here --
   duplicated into join.css for the one content page that does not (the
   nav above is split the same way; see that file's own note on this).
   Sits after </main> as a sibling, not inside it, so the max-width and
   gutter are repeated here rather than inherited from .landing-wrap /
   .rules-wrap / .join-wrap. Same quiet treatment as .landing-footnote /
   rules.css's .rules-footnote just above it on the page where both
   exist -- a rule, muted small type -- so the two read as one closing
   passage instead of two competing sign-offs. */
.mw-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  border-top: 1px solid var(--mw-line);
}

.mw-footer p {
  margin: 0;
  color: var(--mw-text-6);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.mw-footer a { color: var(--mw-gold); font-weight: 600; text-decoration: none; }
.mw-footer a:hover { text-decoration: underline; }
