/* ============================================================
   TEN GRAND OPERATIONS — styles
   Tokens, site frame, nav, section shell and reveal are carried over
   verbatim from the Ten Grand site (laindoe/ten-grand, css/style.css).
   Operations-specific sections are appended below. See
   DESIGN-SYSTEM.md before adding anything new.
   ============================================================ */

/* Self-hosted, as on the Ten Grand site (SIL OFL; licences in assets/fonts). */
@font-face {
  font-family: 'Oxanium';
  src: url('../assets/fonts/Oxanium-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Italiana';
  src: url('../assets/fonts/Italiana-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --thermal-cherry: #EB1528;
  --thermal-red: #FF3220;
  --thermal-yellow: #FFDC00;
  --thermal-lime: #B8EF00;
  --thermal-green: #A8E000;
  --thermal-cyan: #00CDE8;
  --thermal-blue: #45CDF6;

  /* Pulled from Figma "intro" frame design context */
  --color-bg: #141414;
  --color-card: rgba(217, 217, 217, 0);
  --color-card-border: #f3f3f4;
  --color-text: #f3f3f4;
  --color-text-muted: rgba(243, 243, 244, 0.65);
  --color-accent: #d94f30;

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-digital: "Oxanium", "Share Tech Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --digital-glow:
    0 0 4px rgba(255, 255, 255, .9),
    0 0 14px rgba(63, 214, 255, .75),
    0 0 30px rgba(251, 47, 123, .55);

  --frame-margin: 8px;
  --section-padding-x: clamp(20px, 6vw, 60px);
  --content-max-width: 480px;
  --measure-body: 34ch;
  --measure-subhead: 36ch;
  --measure-wide: 40ch;
  /* Space between a header divider (the rule under a section's own
     headline, or under any full-bleed content block that ends in one)
     and the text on either side of it. One shared value, used the same
     way in every section that has this kind of divider, instead of each
     section hand-picking its own 24/32/40px -- being applied section by
     section as a trial; see .amass__header and its content blocks for
     the first application. */
  --divider-gap: 32px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

ol,
ul {
  list-style: none;
}

/* Chromium's UA stylesheet for [hidden] (display: none) doesn't reach
   svg elements the way it does everything else -- a hidden <svg> still
   computes to display: inline (or block, once blockified by its own
   position: absolute) and keeps rendering. Every icon-toggle pattern on
   the site that puts [hidden] directly on an <svg> needs this to work. */
svg[hidden] {
  display: none;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

/* Mobile browsers apply :focus after a tap (not just keyboard nav),
   and most icon buttons on this site never defined their own focus
   treatment -- so they fell back to the browser's native outline,
   which then visibly "stuck" on the tapped icon. Some of these icons
   (the AMASS share button, for one) also get refocused by script when
   a modal they opened closes, as a screen-reader/keyboard
   accessibility courtesy -- and that programmatic refocus alone is
   enough for :focus-visible to match and show an outline again, with
   no tap or keypress involved. Suppressing the outline for every
   plain button by default removes that entirely; a button that wants
   one back still can, same as .route__pin or .amass-flow__cta already
   do elsewhere, via its own more specific :focus-visible rule.
   -webkit-tap-highlight-color covers the separate tap-flash overlay
   WebKit/Chrome draw on touch, same reasoning. */
a,
button {
  -webkit-tap-highlight-color: transparent;
}

button:focus {
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Site frame ---------- */
/* One continuous outline around the whole site, square corners. */

.site-frame {
  margin: var(--frame-margin);
  margin-bottom: 0;
  border: 1px solid var(--color-card-border);
}

/* The navigation supplies the frame's top edge; avoid stacked 1px lines. */
.site-frame:has(> .nav) { border-top: 0; }

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

.site-footer {
  margin-bottom: 0;
  padding: 24px var(--frame-margin);
  text-align: center;
}

.site-footer__copyright {
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-top: 1px solid var(--color-card-border);
  border-bottom: 1px solid var(--color-card-border);
}

/* Cover the strip above the sticky navigation during mobile viewport
   transitions. The mask moves with the header and cannot intercept taps. */
@media (max-width: 900px), (pointer: coarse) {
  .nav::before {
    content: "";
    position: absolute;
    /* Stop above the border instead of painting over its top pixel. */
    bottom: calc(100% + 1px);
    left: -1px;
    right: -1px;
    height: max(64px, env(safe-area-inset-top, 0px));
    background: var(--color-bg);
    pointer-events: none;
  }
}

.nav__inner {
  display: flex;
  align-items: stretch;
  max-width: 680px;
  margin: 0 auto;
}

.nav__logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 48px;
  padding: 12px 0;
  color: var(--color-text);
}

.nav__logo-mark {
  position: relative;
  display: block;
  width: 16.47px;
  height: 38px;
  overflow: hidden;
}

.nav__logo-mark img {
  position: absolute;
  max-width: none;
  width: 599.28%;
  height: 144.94%;
  left: -359.89%;
  top: -10.11%;
}

.nav__divider {
  flex-shrink: 0;
  width: 1px;
  background: var(--color-card-border);
}

.nav__item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  font-size: clamp(0.5rem, 2.2vw, 0.7rem);
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--color-text);
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease;
}

/* The clamp above floors at 0.5rem, which is already its value from here
   down to ~365px -- so on the narrowest phones (iPhone SE class, ~320-
   340px) "TRANSMISSIONS" (the longest, nowrap label) no longer fits
   its flex:1 share and pushes the page into a few pixels of horizontal
   scroll. Shrinking the floor further only in this narrow band fixes
   that without touching the clamp's behavior at any width it was
   already scaling past 0.5rem. */
@media (max-width: 480px) {
  .nav__item {
    padding-inline: 6px;
  }
}

@media (max-width: 340px) {
  .nav__logo-box {
    width: 40px;
  }

  .nav__item {
    font-size: 0.45rem;
    padding-inline: 6px;
  }
}

.nav__item--inverse {
  background: var(--color-text);
  color: var(--color-bg);
}

.nav__item:not(.nav__item--inverse):focus-visible {
  background: var(--color-text);
  color: var(--color-bg);
}

.nav__item--inverse:focus-visible {
  background: var(--color-bg);
  color: var(--color-text);
}

@media (hover: hover) and (pointer: fine) {
  .nav__item:not(.nav__item--inverse):hover {
    background: var(--color-text);
    color: var(--color-bg);
  }

  .nav__item--inverse:hover {
    background: var(--color-bg);
    color: var(--color-text);
  }
}

.nav__dropdown {
  position: relative;
  flex: 1;
  display: flex;
}

.nav__dropdown-trigger {
  appearance: none;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

/* Share spare space equally around the labels, so shorter labels do not
   receive oversized cells. Keep the logo track and desktop grid intact. */
@media (max-width: 899px) {
  .nav__inner > .nav__item,
  .nav__inner > .nav__dropdown {
    flex: 1 1 auto;
  }
}

.nav__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 101;
  display: flex;
  flex-direction: column;
  width: var(--nav-menu-width, 240px);
  min-width: 0;
  max-width: calc(100vw - 32px);
  /* top:100% alone (no margin adjustment) lands this panel's border
     box exactly where the nav's own border-bottom is drawn, with no
     rounding involved -- it's an exact percentage, not a fudged pixel
     offset. The panel stacks above the nav (z-index) and would paint
     over that line if it had no border of its own, so it draws its
     own border-top here as the visible divider; the earlier version
     of this rule additionally nudged position with a -1px margin on
     top of that already-exact placement, which is what introduced the
     sub-pixel gap on high-density screens -- removing that nudge (not
     the border) was the actual fix. */
  border: 1px solid var(--color-card-border);
  background: var(--color-bg);
  padding: 6px 0;
}

.nav__dropdown-menu[hidden] {
  display: none;
}

.nav__dropdown-link {
  padding: 13px 18px;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--color-text);
  transition: background-color 180ms ease;
}

.nav__dropdown-link:hover,
.nav__dropdown-link:focus-visible {
  background: rgba(243, 243, 244, 0.08);
}

/* ---------- Layout / section shell ---------- */

.section {
  position: relative;
  padding: 60px var(--section-padding-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  /* Clears the sticky nav on anchor-jump/scrollIntoView so section
     content (esp. a section-header flush against the top) isn't
     hidden underneath it. */
  scroll-margin-top: 64px;
}

.card {
  width: 100%;
  max-width: var(--content-max-width);
  padding: clamp(28px, 6vw, 48px) clamp(24px, 5vw, 40px);
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ---------- Intro section ---------- */

.section--intro {
  text-align: center;
}

.intro__logo {
  margin: 0 auto 40px;
  width: 233px;
  height: auto;
}

/* Broken into two lines in the markup. fit-content so the box is never
   narrower than the longer line in whatever font renders; a ch value
   would be a guess. */
.intro__headline {
  font-size: clamp(1rem, 3.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.35;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 40px;
}

/* Below ~360px the longer line needs more than the 1rem floor allows
   and breaks into a third line. */
@media (max-width: 359px) {
  .intro__headline {
    font-size: 0.8125rem;
  }
}

.intro__icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 40px;
  color: var(--color-text);
}

/* Centered, inherited from .section--intro. */
.intro__explainer {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.6;
  max-width: var(--measure-body);
  margin: 0 auto;
}


.section-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  margin-bottom: 24px;
}

/* ============================================================
   REUSABLE COMPONENTS
   Built only from Ten Grand patterns; see DESIGN-SYSTEM.md.
   ============================================================ */

/* ---------- Heat band (WebGL canvas from js/heat.js, CSS fallback) ----------
   Usage: <section class="heat-band"><canvas class="heat-band__canvas"
   data-voices-heat data-heat-variant="header" aria-hidden="true"></canvas>
   ...content...</section> */

.heat-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--color-card-border);
  background: #062d30;
}

/* Static fallback, same pools as .cw-hero::before in the Ten Grand site. */
.heat-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 47% 65% at 49% 66%, #08191beF 25%, #062b2bd9 52%, transparent 100%),
    radial-gradient(ellipse 34% 55% at 3% -4%, #ff142a 12%, #ff3920 30%, #ffcf00 49%, #c9f000 61%, #16ca7a 77%, transparent 100%),
    radial-gradient(ellipse 40% 58% at 94% 8%, #ff102f 8%, #ff4420 28%, #ffcd00 48%, #b5ed00 61%, #00ceab 79%, transparent 100%),
    radial-gradient(ellipse 35% 53% at 0% 104%, #ff1730 14%, #ff4820 33%, #ffda00 53%, #9ddd00 65%, transparent 100%),
    radial-gradient(ellipse 34% 57% at 103% 107%, #ff252b 12%, #ff6a00 32%, #ebee00 53%, #22df76 70%, transparent 100%),
    radial-gradient(ellipse 32% 40% at 85% 70%, #009cfa 15%, #00c9d7 47%, transparent 100%),
    radial-gradient(ellipse 33% 42% at 2% 48%, #00a9fa 17%, #00cdb8 53%, transparent 100%),
    radial-gradient(ellipse 35% 45% at 39% -5%, #009bf1 15%, #00beaa 50%, transparent 100%);
}

.heat-band__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ---------- Digital readout (Oxanium) ---------- */

.digital-readout {
  font-family: var(--font-digital);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: var(--digital-glow);
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons (the Ten Grand CTA: solid light, square, uppercase) ---------- */

.btn {
  display: inline-block;
  border: 1px solid var(--color-text);
  border-radius: 2px;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 14px 18px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.18s ease, background-color 0.18s ease;
}

.btn::after {
  content: '  \2192';
  margin-left: 8px;
  font-size: 1rem;
}

.btn:hover,
.btn:focus-visible { background: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--color-text);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--color-text);
  color: var(--color-bg);
}

/* Keyboard focus ring. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--thermal-cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
