/* ==========================================================================
   Averon Analytics · base (reset, type, layout, buttons, header, menu, footer)
   Needs tokens.css first. Selectors stay low in specificity (single classes,
   :where() for resets) so page CSS loaded later can override them easily.
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
:where(html, body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul) { margin: 0; }
:where(ol, ul)[class] { padding: 0; list-style: none; }
:where(img, svg, video, canvas, picture) { display: block; max-width: 100%; }
:where(img, video) { height: auto; }
:where(input, button, textarea, select) { font: inherit; color: inherit; letter-spacing: inherit; }
:where(button) { cursor: pointer; background: none; border: 0; padding: 0; }
:where(a) { color: inherit; text-decoration: none; }
:where(table) { border-collapse: collapse; }
:where(address) { font-style: normal; }
[hidden] { display: none !important; }

/* ---------- 2. Document ---------- */
html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: var(--mist-a24) var(--navy-900);
  hanging-punctuation: first;
}
body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  font-size: var(--fs-base);
  font-weight: 300;
  line-height: var(--lh-body);
  font-kerning: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--gold); color: var(--navy); }

/* Headings: Adventor, uppercase, wide tracking, balanced lines */
:where(h1, h2, h3, .display, .h1, .h2, .h3, .title) {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--track-heading);
  line-height: var(--lh-heading);
  text-wrap: balance;
  overflow-wrap: break-word;
  color: var(--text);
}
:where(h1, .h1) { font-size: var(--fs-h1); line-height: var(--lh-tight); }
:where(h2, .h2) { font-size: var(--fs-h2); }
:where(h3, .h3) { font-size: var(--fs-h3); line-height: 1.2; }
:where(h4, h5, h6) { font-size: var(--fs-h4); font-weight: 500; line-height: var(--lh-snug); text-wrap: balance; }
.display {
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-display);
}
.title { font-size: var(--fs-h4); letter-spacing: var(--track-title); line-height: 1.3; }
/* Balanced lines (Mohamed's rule): short blocks split into lines of about equal length.
   Long paragraphs (over 6 lines) get their last three words joined by site.js instead. */
:where(p, li, dd, figcaption, blockquote) { text-wrap: pretty; text-wrap: balance; }
:where(strong, b) { font-weight: 500; }
:where(small) { font-size: var(--fs-small); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-muted); text-wrap: balance; }
.muted { color: var(--text-muted); }
.measure { max-width: var(--measure); }
:where(hr) { border: 0; height: 1px; background: var(--line); margin-block: var(--space-xl); }

/* Text links */
.link, :where(.prose, .site-footer__legal) a:not([class]) {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--gold-a72);
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
  transition: color var(--dur-fast) linear, text-decoration-color var(--dur-fast) linear;
}
.link:hover, :where(.prose, .site-footer__legal) a:not([class]):hover { color: var(--gold); text-decoration-color: var(--gold); }
.link-ext { display: inline-flex; align-items: center; gap: .45em; transition: color var(--dur-fast) linear; }
.link-ext::after {
  content: "";
  width: .62em; height: .62em; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 1h7v7M9 1 1 9' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 1h7v7M9 1 1 9' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--dur-base) var(--ease-out);
}
.link-ext:hover { color: var(--gold); }
.link-ext:hover::after { transform: translate(2px, -2px); }

/* Focus: always visible, gold */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
main:focus { outline: none; }

.skip-link {
  position: fixed; left: 12px; top: 12px; z-index: var(--z-skip);
  padding: 12px 18px;
  background: var(--gold); color: var(--navy);
  font: 600 var(--fs-label)/1 var(--font-text); letter-spacing: var(--track-button); text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out-soft);
}
.skip-link:focus { transform: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Form basics (the request page styles its own form) */
:where(input, select, textarea) { font-size: max(16px, 1em); }
::placeholder { color: var(--text-dim); opacity: 1; }

/* ---------- 3. Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.container--narrow { max-width: calc(var(--max-text) + var(--gutter) * 2); }
.container--wide { max-width: calc(var(--max-wide) + var(--gutter) * 2); }

.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section--deep { background: var(--bg-deep); }
.section--space { background: var(--bg-space); }
/* two plain sections in a row: half the top space, so the gap is 1.5×, not 2× */
.section + .section:not(.section--deep, .section--space, .on-paper) { padding-top: calc(var(--section-y) * .5); }

/* The one light section: navy words on Paper (gold text never on light) */
.on-paper {
  --bg: var(--paper);
  --text: var(--navy);
  --text-muted: rgba(0, 36, 63, .80);
  --text-dim: rgba(0, 36, 63, .68);
  --accent: var(--navy);
  --line: rgba(0, 36, 63, .14);
  --line-strong: rgba(0, 36, 63, .26);
  --line-gold: rgba(0, 36, 63, .40);
  --tick: rgba(0, 36, 63, .55);
  --grid-line: rgba(0, 36, 63, .05);
  --focus: var(--navy);
  background: var(--bg);
  color: var(--text);
  color-scheme: light;
}
.on-paper ::selection { background: var(--navy); color: var(--paper); }

.section-head { display: grid; gap: var(--space-s); max-width: 860px; margin-bottom: clamp(2.5rem, 1.6rem + 3vw, 4.5rem); }
.section-head__title { font-size: var(--fs-h2); }
.section-head__lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-muted); max-width: 52ch; text-wrap: balance; }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

.stack > * + * { margin-top: var(--stack); }
.split { display: grid; gap: var(--space-xl); }
.grid-2, .grid-3 { display: grid; gap: var(--space-m); }
@media (min-width: 720px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(3rem, 6vw, 7rem); align-items: start; }
  .split > .section-head { position: sticky; top: calc(var(--header-h) + 32px); margin-bottom: 0; }
}

/* ---------- 4. Data labels and readouts ---------- */
.label {
  display: inline-flex; align-items: center; gap: .9em;
  font-family: var(--font-text);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.label--mist { color: var(--text-muted); }
.label--diamond::before {
  content: ""; flex: none;
  width: 10px; height: 5px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.label--index > span:first-child {
  display: inline-flex; align-items: center; gap: .9em;
  color: var(--accent);
}
.label--index > span:first-child::after { content: ""; width: 28px; height: 1px; background: var(--line-gold); }
.label--index { color: var(--text-muted); }

.readout {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5em 1.2em;
  font-size: var(--fs-label); font-weight: 500; line-height: 1.4;
  letter-spacing: .16em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.readout > * { display: inline-flex; align-items: center; gap: 1.2em; }
.readout > * + *::before { content: ""; width: 4px; height: 4px; background: var(--line-gold); transform: rotate(45deg); }
.readout b, .readout strong { font-weight: 500; color: var(--accent); white-space: nowrap; }

/* Lists with the brand's flat 27° diamond as bullet */
.list-diamond { display: grid; gap: .7em; padding: 0; list-style: none; }
.list-diamond > li { position: relative; padding-left: 1.6em; }
.list-diamond > li::before {
  content: ""; position: absolute; left: 0; top: calc(.82em - 2.5px);
  width: 10px; height: 5px;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
/* two columns only when each column can be 14 rem wide (works in narrow cards too) */
.list-diamond--2col { grid-template-columns: repeat(auto-fill, minmax(max(14rem, calc((100% - var(--space-l)) / 2)), 1fr)); column-gap: var(--space-l); }

/* ---------- 5. Brand shapes and instrument marks ---------- */
.diamond {
  display: inline-block; width: 20px; height: 10px; flex: none;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.node {
  position: relative; display: inline-block; width: 10px; height: 10px; flex: none;
  border-radius: var(--radius-dot); background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-a12), 0 0 18px var(--gold-a48);
}

/* Ruler: a gold hairline with minor and major ticks, like an instrument scale */
.ruler {
  --ruler-step: 24px;
  height: 10px;
  background:
    linear-gradient(var(--line-gold), var(--line-gold)) 0 100% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--line-gold) 0 1px, transparent 1px var(--ruler-step)) 0 100% / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px calc(var(--ruler-step) * 6)) 0 100% / 100% 10px no-repeat;
  transform-origin: left center;
}

/* Corner ticks: four small gold L-marks, like a viewfinder */
.ticks { position: relative; }
.ticks::before {
  --tl: 12px; --tw: 1px; --tc: var(--tick);
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(var(--tc), var(--tc)) top left / var(--tl) var(--tw),
    linear-gradient(var(--tc), var(--tc)) top left / var(--tw) var(--tl),
    linear-gradient(var(--tc), var(--tc)) top right / var(--tl) var(--tw),
    linear-gradient(var(--tc), var(--tc)) top right / var(--tw) var(--tl),
    linear-gradient(var(--tc), var(--tc)) bottom left / var(--tl) var(--tw),
    linear-gradient(var(--tc), var(--tc)) bottom left / var(--tw) var(--tl),
    linear-gradient(var(--tc), var(--tc)) bottom right / var(--tl) var(--tw),
    linear-gradient(var(--tc), var(--tc)) bottom right / var(--tw) var(--tl);
  background-repeat: no-repeat;
}
.ticks--2::before {
  background:
    linear-gradient(var(--tc), var(--tc)) top left / var(--tl) var(--tw),
    linear-gradient(var(--tc), var(--tc)) top left / var(--tw) var(--tl),
    linear-gradient(var(--tc), var(--tc)) bottom right / var(--tl) var(--tw),
    linear-gradient(var(--tc), var(--tc)) bottom right / var(--tw) var(--tl);
  background-repeat: no-repeat;
}

/* 27° chamfers (clip only). --cy = rise of the cut; run = rise × 1.9626 */
.cut, .cut-2 { --cy: var(--cut-l); --cx: calc(var(--cy) * var(--cut-ratio)); }
.cut {
  clip-path: polygon(var(--cx) 0, calc(100% - var(--cx)) 0, 100% var(--cy), 100% calc(100% - var(--cy)),
    calc(100% - var(--cx)) 100%, var(--cx) 100%, 0 calc(100% - var(--cy)), 0 var(--cy));
}
.cut-2 { clip-path: polygon(0 0, calc(100% - var(--cx)) 0, 100% var(--cy), 100% 100%, var(--cx) 100%, 0 calc(100% - var(--cy))); }

/* Icon tile: a gold brand icon on a navy tile with a soft gold glow, corners cut at 27°.
   Two ways (same look):  <span class="icon-tile"><img src="/assets/img/brand/icons/icon-05-satellite-tasking-gold.svg" alt="" width="40" height="40"></span>
                          <span class="icon-tile" style="--icon:url('/assets/img/brand/icons/icon-05-satellite-tasking.svg')"></span> */
.icon-tile {
  --cy: 9px; --cx: calc(var(--cy) * var(--cut-ratio)); --t: 1px;
  --icon-size: 36px;
  position: relative; display: inline-grid; place-items: center; flex: none; vertical-align: middle;
  width: 68px; height: 68px;
  background:
    radial-gradient(closest-side, rgba(239, 187, 117, .24), rgba(239, 187, 117, 0) 88%),
    linear-gradient(155deg, var(--navy-600), var(--navy-900));
  clip-path: polygon(var(--cx) 0, calc(100% - var(--cx)) 0, 100% var(--cy), 100% calc(100% - var(--cy)),
    calc(100% - var(--cx)) 100%, var(--cx) 100%, 0 calc(100% - var(--cy)), 0 var(--cy));
}
.icon-tile::after {   /* fine gold edge along the cut shape */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--gold-a32);
  clip-path: polygon(evenodd,
    var(--cx) 0, calc(100% - var(--cx)) 0, 100% var(--cy), 100% calc(100% - var(--cy)),
    calc(100% - var(--cx)) 100%, var(--cx) 100%, 0 calc(100% - var(--cy)), 0 var(--cy), var(--cx) 0,
    calc(var(--cx) + var(--t) * .2401) var(--t),
    var(--t) calc(var(--cy) + var(--t) * .6128),
    var(--t) calc(100% - var(--cy) - var(--t) * .6128),
    calc(var(--cx) + var(--t) * .2401) calc(100% - var(--t)),
    calc(100% - var(--cx) - var(--t) * .2401) calc(100% - var(--t)),
    calc(100% - var(--t)) calc(100% - var(--cy) - var(--t) * .6128),
    calc(100% - var(--t)) calc(var(--cy) + var(--t) * .6128),
    calc(100% - var(--cx) - var(--t) * .2401) var(--t),
    calc(var(--cx) + var(--t) * .2401) var(--t));
}
.icon-tile img { width: var(--icon-size); height: var(--icon-size); object-fit: contain; filter: drop-shadow(0 0 7px rgba(239, 187, 117, .55)); }
.icon-tile[style*="--icon"]::before {
  content: ""; width: var(--icon-size); height: var(--icon-size);
  background: var(--gold);
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}
.icon-tile--sm { width: 48px; height: 48px; --cy: 7px; --icon-size: 26px; }
.icon-tile--lg { width: 88px; height: 88px; --cy: 11px; --icon-size: 46px; }

/* Glass: translucent navy panel for data cards */
.glass {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(135%);
  backdrop-filter: blur(var(--glass-blur)) saturate(135%);
  box-shadow: inset 0 1px 0 rgba(239, 238, 235, .05), var(--shadow-panel);
}
.glass--flat, .on-paper .glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
.glass--flat { background: linear-gradient(155deg, rgba(14, 46, 70, .92), rgba(0, 28, 50, .92)); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: linear-gradient(155deg, rgba(14, 46, 70, .94), rgba(0, 28, 50, .94)); }
}
.on-paper .glass { background: rgba(255, 255, 255, .55); box-shadow: none; }

/* ---------- 6. Buttons ----------
   Shape = a long hexagon with flattened tips: all four corners cut at 27°.
   ::before = the body (fill), ::after = the line / the focus ring (outside, same angle). */
.btn {
  --cy: var(--cut-m);
  --cx: calc(var(--cy) * var(--cut-ratio));
  --btn-bg: transparent;
  --btn-line: transparent;
  --btn-fg: var(--text);
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .75em;
  min-height: 48px;
  max-width: 100%;
  padding: .7em calc(var(--cx) + 1.25em);
  font-family: var(--font-text);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
  color: var(--btn-fg);
  border: 0; border-radius: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color var(--dur-fast) linear, transform var(--dur-fast) var(--ease-out-soft);
}
.btn::before, .btn::after { content: ""; position: absolute; pointer-events: none; }
.btn::before {
  inset: 0; z-index: -1;
  background: var(--btn-bg);
  clip-path: polygon(var(--cx) 0, calc(100% - var(--cx)) 0, 100% var(--cy), 100% calc(100% - var(--cy)),
    calc(100% - var(--cx)) 100%, var(--cx) 100%, 0 calc(100% - var(--cy)), 0 var(--cy));
  transition: background-color var(--dur-fast) linear;
}
.btn::after {
  --d: 0px;      /* distance outside the button */
  --t: 1px;      /* line thickness */
  --rcy: calc(var(--cy) + var(--d) * .3872);
  --rcx: calc(var(--rcy) * var(--cut-ratio));
  inset: calc(var(--d) * -1);
  background: var(--btn-line);
  clip-path: polygon(evenodd,
    var(--rcx) 0, calc(100% - var(--rcx)) 0, 100% var(--rcy), 100% calc(100% - var(--rcy)),
    calc(100% - var(--rcx)) 100%, var(--rcx) 100%, 0 calc(100% - var(--rcy)), 0 var(--rcy), var(--rcx) 0,
    calc(var(--rcx) + var(--t) * .2401) var(--t),
    var(--t) calc(var(--rcy) + var(--t) * .6128),
    var(--t) calc(100% - var(--rcy) - var(--t) * .6128),
    calc(var(--rcx) + var(--t) * .2401) calc(100% - var(--t)),
    calc(100% - var(--rcx) - var(--t) * .2401) calc(100% - var(--t)),
    calc(100% - var(--t)) calc(100% - var(--rcy) - var(--t) * .6128),
    calc(100% - var(--t)) calc(var(--rcy) + var(--t) * .6128),
    calc(100% - var(--rcx) - var(--t) * .2401) var(--t),
    calc(var(--rcx) + var(--t) * .2401) var(--t));
  transition: background-color var(--dur-fast) linear;
}
.btn:focus-visible { outline: none; }
.btn:focus-visible::after { --d: 5px; --t: 2px; background: var(--focus); }
.btn:active { transform: translateY(1px); }

/* Primary: gold light. A thin scan of light crosses it on hover. */
.btn--primary { --btn-bg: var(--gold); --btn-fg: var(--navy); }
.btn--primary::before {
  background:
    linear-gradient(105deg, transparent 0 38%, rgba(255, 251, 242, .55) 50%, transparent 62% 100%) -180% 0 / 55% 100% no-repeat,
    var(--btn-bg);
  transition: background-color var(--dur-fast) linear, background-position 0s;
}
.btn--primary:hover { --btn-bg: var(--gold-soft); }
.btn--primary:hover::before { background-position: 300% 0, 0 0; transition: background-color var(--dur-fast) linear, background-position .9s var(--ease-scan); }

/* Secondary: a fine gold outline that fills softly on hover */
.btn--ghost { --btn-line: var(--gold-a72); --btn-fg: var(--text); }
.btn--ghost:hover { --btn-bg: var(--gold-a12); --btn-line: var(--gold); --btn-fg: var(--gold); }
.btn--ghost:focus-visible { --btn-bg: var(--gold-a12); }

.on-paper .btn--primary { --btn-bg: var(--navy); --btn-fg: var(--paper); }
.on-paper .btn--primary:hover { --btn-bg: #0A3556; }
.on-paper .btn--ghost { --btn-line: var(--navy-a72); --btn-fg: var(--navy); }
.on-paper .btn--ghost:hover { --btn-bg: rgba(0, 36, 63, .08); --btn-line: var(--navy); --btn-fg: var(--navy); }

.btn--sm { --cy: 7px; min-height: 44px; padding: .55em calc(var(--cx) + 1em); font-size: .8125rem; }
.btn--block { display: flex; width: 100%; }
@media (min-width: 768px) { .btn { min-height: 52px; } .btn--sm { min-height: 44px; } }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-s); }
@media (max-width: 359px) { .btn { letter-spacing: .08em; padding-inline: calc(var(--cx) + .6em); } }
@media (max-width: 479px) {
  .btn-row > .btn { flex: 1 1 100%; }
}

/* ---------- 7. Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  height: var(--header-h);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  transition: transform var(--dur-slow) var(--ease-out);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0, 20, 36, .86), rgba(0, 24, 42, .72));
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity var(--dur-base) linear;
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-hidden:not(:focus-within) { transform: translateY(calc(-100% - 2px)); }
.site-header__bar { position: relative; height: 100%; display: flex; align-items: center; gap: var(--space-m); }
.site-header__logo {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; margin-right: auto; padding: 4px 0;
}
.site-header__logo img { width: 46px; height: auto; transition: opacity var(--dur-fast) linear; }
.site-header__logo:hover img { opacity: .82; }
.site-header__cta { display: none; }
@media (min-width: 600px) { .site-header__cta { display: inline-flex; } }
@media (min-width: 1280px) { .site-header__logo img { width: 52px; } }

/* Desktop links */
.site-nav { display: none; }
.site-nav__list { display: flex; align-items: center; gap: calc(clamp(1.5rem, 2.6vw, 2.75rem) - 12px); }
.site-nav__link {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding-inline: 6px;   /* same small padding on every link: tap area of 44 px or more, even gaps */
  font-size: var(--fs-label); font-weight: 500; line-height: 1;
  letter-spacing: var(--track-nav); text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--dur-fast) linear;
}
.site-nav__link::after {
  content: ""; position: absolute; left: 6px; right: calc(6px + .18em); bottom: 10px; height: 1px;
  background: var(--gold);
  transform: scaleX(0); transform-origin: right center;
  transition: transform var(--dur-base) var(--ease-out);
}
.site-nav__link:hover { color: var(--paper); }
.site-nav__link:hover::after { transform: scaleX(1); transform-origin: left center; }
.site-nav__link[aria-current="page"] { color: var(--gold); }
.site-nav__link[aria-current="page"]::before {
  content: ""; width: 8px; height: 4px; flex: none; background: var(--gold);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
@media (min-width: 1024px) {
  .site-nav { display: block; margin-right: clamp(.5rem, 1.5vw, 1.5rem); }
  .site-header__logo { margin-right: auto; }
}

/* Phone menu button: a real button, 44 px or more */
.menu-toggle {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; min-width: 44px; margin-right: -8px; padding: 0 8px;
  font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--track-nav); text-transform: uppercase;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.menu-toggle__icon { position: relative; width: 26px; height: 12px; }
.menu-toggle__icon i {
  position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform var(--dur-base) var(--ease-out), top var(--dur-base) var(--ease-out), width var(--dur-base) var(--ease-out);
}
.menu-toggle__icon i:first-child { top: 1px; }
.menu-toggle__icon i:last-child { top: 9.5px; left: 8px; }
.menu-toggle:hover .menu-toggle__icon i:last-child { left: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon i:first-child { top: 5.25px; transform: rotate(27deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon i:last-child { top: 5.25px; left: 0; transform: rotate(-27deg); }
@media (min-width: 1024px) { .menu-toggle { display: none; } }
html:not(.js) .menu-toggle { display: none; }   /* without JavaScript the footer menu has every link */

/* ---------- 8. Phone full-screen menu ---------- */
.site-menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(239, 187, 117, .07), transparent 60%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900) 70%, var(--navy));
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-base) linear, visibility 0s linear var(--dur-base);
}
.site-menu::before {   /* a quiet orbit line behind the links */
  content: ""; position: absolute; pointer-events: none;
  width: 190vw; height: 70vw; right: -95vw; top: 52%;
  border: 1px solid var(--gold-a20); border-radius: 50%;
  transform: rotate(-14deg);
}
.site-menu.is-open { opacity: 1; visibility: visible; transition: opacity var(--dur-base) linear; }
.site-menu__inner {
  position: relative;
  min-height: 100%;
  display: flex; flex-direction: column; gap: var(--space-xl);
  padding-top: calc(var(--header-h) + env(safe-area-inset-top) + clamp(1.5rem, 5vh, 3rem));
  padding-bottom: calc(var(--space-l) + env(safe-area-inset-bottom));
}
.site-menu__list { display: grid; border-top: 1px solid var(--line); }
.site-menu__item { border-bottom: 1px solid var(--line); }
.site-menu__link {
  display: flex; align-items: baseline; gap: var(--space-m);
  min-height: 64px; padding: 18px 0 16px;
  color: var(--text);
}
.site-menu__num {
  flex: none; width: 2.2em;
  font-size: var(--fs-label); font-weight: 500; letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.site-menu__text {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem);
  line-height: 1;
  letter-spacing: var(--track-heading);
  text-transform: uppercase;
  transition: color var(--dur-fast) linear, transform var(--dur-base) var(--ease-out);
}
.site-menu__link:hover .site-menu__text { color: var(--gold); transform: translateX(6px); }
.site-menu__link[aria-current="page"] .site-menu__text { color: var(--gold); }
.site-menu__link[aria-current="page"]::after {
  content: ""; align-self: center; margin-left: auto;
  width: 14px; height: 7px; background: var(--gold);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.site-menu__actions { display: grid; gap: var(--space-xs); }
.site-menu__meta {
  margin-top: auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-s);
  font-size: var(--fs-small); color: var(--text-muted);
}
.site-menu__meta .link-ext { min-height: 44px; }
.site-menu__line {
  font-family: var(--font-display); font-size: var(--fs-label);
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-muted);
}
@media (min-width: 600px) { .site-menu__actions { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .site-menu { display: none !important; } }

/* Menu entrance: links rise in one after another */
.site-menu__item, .site-menu__actions, .site-menu__meta {
  opacity: 0; transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.site-menu.is-open :is(.site-menu__item, .site-menu__actions, .site-menu__meta) { opacity: 1; transform: none; }
.site-menu.is-open .site-menu__item:nth-child(1) { transition-delay: 60ms; }
.site-menu.is-open .site-menu__item:nth-child(2) { transition-delay: 110ms; }
.site-menu.is-open .site-menu__item:nth-child(3) { transition-delay: 160ms; }
.site-menu.is-open .site-menu__item:nth-child(4) { transition-delay: 210ms; }
.site-menu.is-open .site-menu__actions { transition-delay: 270ms; }
.site-menu.is-open .site-menu__meta { transition-delay: 330ms; }

/* While the menu is open */
.menu-open .site-header { transform: none; }
.menu-open .site-header::before { opacity: 0; }
.menu-open .site-header__cta { visibility: hidden; }
.scroll-locked, .scroll-locked body { overflow: hidden; }

/* ---------- 9. Footer ---------- */
.site-footer {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--bg-space);
  color: var(--text-muted);
  font-size: clamp(0.9375rem, 0.9rem + 0.1vw, 1rem);   /* sentences: 15 px on phones, 16 px on desktop */
  line-height: 1.6;
  padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
}
.site-footer::after {   /* one giant pattern star, cropped off the edge (brand usage) */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: min(92vw, 640px); aspect-ratio: 1; right: max(-30vw, -220px); bottom: -14%;
  background: var(--mist);
  opacity: .035;
  -webkit-mask: url("/assets/img/brand/averon-pattern-icon-offwhite.svg") center / contain no-repeat;
          mask: url("/assets/img/brand/averon-pattern-icon-offwhite.svg") center / contain no-repeat;
}
.site-footer__ruler { margin-bottom: clamp(3rem, 2rem + 4vw, 5.5rem); }
.site-footer__grid {
  display: grid; gap: var(--space-xl) var(--space-l);
  grid-template-columns: minmax(0, 1fr);
}
.site-footer__brand { display: grid; justify-items: start; gap: var(--space-s); }
.site-footer__logo { display: inline-block; padding: 4px 0; }
.site-footer__logo img { width: 140px; height: auto; }
.site-footer__line {
  margin-top: var(--space-s);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: var(--track-heading);
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--gold);
}
.site-footer__services { max-width: 34ch; color: var(--text-muted); text-wrap: balance; }
.site-footer__label { display: flex; margin-bottom: var(--space-xs); }
.site-footer__links { display: grid; }
.site-footer__links a, .site-footer__social, .site-footer__privacy {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px;
  font-size: var(--fs-base); font-weight: 400; color: var(--text);
  transition: color var(--dur-fast) linear;
}
.site-footer__links a { white-space: nowrap; }   /* "Request an Observation" stays on one line */
.site-footer__links a:hover, .site-footer__privacy:hover { color: var(--gold); }
.site-footer__links a[aria-current="page"], .site-footer__privacy[aria-current="page"] { color: var(--gold); }
.site-footer__address { margin-bottom: var(--space-l); font-size: var(--fs-base); color: var(--text); line-height: 1.55; text-wrap: balance; max-width: 26ch; }
.site-footer__legal {
  display: grid; gap: var(--space-s);
  margin-top: clamp(3rem, 2rem + 4vw, 5rem); padding-top: var(--space-l);
  border-top: 1px solid var(--line);
  color: var(--text-dim);
}
.site-footer__credits .label { margin-right: .9em; }
.site-footer__credits, .site-footer__disclaimer { max-width: 96ch; text-wrap: balance; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2xs) var(--space-l);
  margin-top: var(--space-xs);
}
.site-footer__copy { color: var(--text-muted); }
.site-footer__privacy { font-size: inherit; text-decoration: underline; text-decoration-color: var(--gold-a48); text-underline-offset: .3em; }

@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer__logo img { width: 156px; }
}

/* ---------- 10. Reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="line"] { opacity: 1; transform: scaleX(0); transform-origin: left center; transition: transform var(--dur-draw) var(--ease-out); transition-delay: var(--reveal-delay, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.no-reveal [data-reveal] { opacity: 1 !important; transform: none !important; }

/* ---------- 11. Reduced motion, high contrast, print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .site-menu__item, .site-menu__actions, .site-menu__meta { transform: none; }
}
@media (forced-colors: active) {
  .btn { border: 1px solid ButtonText; }
  .btn:focus-visible { outline: 2px solid Highlight; outline-offset: 3px; }
  .ticks::before, .site-footer::after, .site-menu::before { display: none; }
  /* high-contrast mode drops gradients: give the phone menu and the header glass a solid backing,
     so page text never shows through them, and keep the menu icon lines visible */
  .site-menu, .site-header::before { background-color: Canvas; }
  .menu-toggle__icon i { forced-color-adjust: none; background: CanvasText; }
}
@media print {
  .site-header, .site-menu, .skip-link, .site-footer::after, .orbit, .cta-band { display: none !important; }
  html, body, .site-footer { background: #fff !important; color: #000 !important; }
  :where(h1, h2, h3, p, li, a, .label, .site-footer__line) { color: #000 !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .glass { background: none !important; border-color: #999 !important; box-shadow: none !important; }
}
