/*  Orion site: tokens, type, layout, nav, buttons, captions, footer.
 *
 *  Direction (decision #256): the page is a darkroom. A neutral near-black
 *  ground, Orion's own renders edge to edge, Archivo set wide for display and
 *  Martian Mono for anything the app or a camera would print: filenames,
 *  values, times. Neutrals stay neutral; a tinted ground reads as a colour
 *  cast next to a photograph.
 *
 *  Teal is the app's accent and keeps the app's one job here: it marks a
 *  value Orion changed or is changing, and focus. It is never a fill and
 *  never decoration. Buttons are off-white.
 */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("../fonts/MartianMono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

:root {
  --ground:  #0b0b0c;
  --panel:   #131315;
  --line:    #242427;
  --text:    #ececee;
  --dim:     #8d8d93;   /* 5.9:1 on ground: the floor for any readable text */
  --faint:   #55555b;   /* hairline glyphs only, never copy */
  --accent:  #4db6c4;   /* a value Orion changed, and focus. never a fill */

  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r: 6px;                                 /* one radius on the page, */
  --r-glass: 18px;                          /* but glass panels, which are softer */
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1360px;
  --nav-h: 78px;                            /* the pill, 12px from the top, plus air */
  --section: clamp(80px, 9vw, 144px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, ul, ol, figure, table { margin: 0; }
p, li { text-wrap: pretty; }
a { color: inherit; }
a, button, input { touch-action: manipulation; }
button { font: inherit; color: inherit; }
::selection { background: rgba(77, 182, 196, 0.35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Lenis adds these classes when it runs (vendor CSS, reduced to what applies). */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: var(--r);
  background: var(--text); color: var(--ground); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- layout ---------- */
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: var(--section); scroll-margin-top: var(--nav-h); }

/* ---------- type ---------- */
/* Two registers and nothing between them: very large wide display, and small
 * text. Display is Archivo stretched to 118%, the proportion of lettering
 * engraved on a lens barrel. */
.display, .h2 {
  font-stretch: 118%;
  font-weight: 700;
  text-wrap: balance;
}
.display {
  font-size: clamp(2.5rem, 5.6vw, 5.6rem);
  letter-spacing: -0.035em;
  line-height: 0.96;
}
.h2 {
  font-size: clamp(1.9rem, 3.3vw, 3.3rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
  max-width: 21ch;
}
.h3 {
  font-size: 1rem;
  font-weight: 600;
  font-stretch: 105%;
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.lede { font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem); line-height: 1.5; color: var(--dim); max-width: 36rem; }
.small { font-size: 0.9rem; line-height: 1.5; color: var(--dim); }
.mono, .caption { font-family: var(--mono); font-stretch: 100%; }
.small .mono { font-size: 0.86em; }
.caption { font-size: 11.5px; line-height: 1.7; letter-spacing: 0.01em; color: var(--dim); }
.caption b, .val { font-weight: 400; color: var(--accent); }
.link { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 0.22em; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: currentColor; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px;
  border: 1px solid var(--text); border-radius: var(--r);
  background: var(--text); color: var(--ground);
  font-size: 0.95rem; font-weight: 600; font-stretch: 108%; letter-spacing: -0.005em;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); background: #ffffff; }
.btn:active { transform: translateY(0) scale(0.98); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--panel); border-color: var(--faint); }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 1.02rem; }

/* ---------- glass ---------- */
/* What floats over the sky or a photograph: the nav, the panels, the compare
 * labels. Glass rather than frost: a light blur with the colour behind pushed
 * up, a sheen falling from the upper left, a rim lit on the edges that face
 * the light, a bright top edge, and a shadow beneath. */
.glass, .nav__in, .cmp__label {
  --glass-tint: rgba(16, 16, 19, 0.34);
  background-color: var(--glass-tint);
  background-image:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0) 46%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 30% 72%, rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 -1px 0 rgba(255, 255, 255, 0.05), 0 24px 60px -28px rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(7px) saturate(1.9) brightness(1.12); backdrop-filter: blur(7px) saturate(1.9) brightness(1.12);
  transition: background-color .35s;
}
.glass { position: relative; }
/* the rim: brightest facing the light, with a second catch on the far corner */
.glass::before, .nav__in::before, .cmp__label::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08) 32%, rgba(255, 255, 255, 0.03) 62%, rgba(255, 255, 255, 0.26));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .nav__in, .cmp__label { --glass-tint: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- nav: a floating pill ---------- */
/* The one exception to the page's single radius: the bar, its links and its
 * button are pills. Three columns, so the links sit on the pill's centre
 * whatever the widths of the mark and the button. The section in view gets a
 * lit pill that slides between links. */
.nav { position: fixed; top: 12px; left: 0; right: 0; z-index: 50; pointer-events: none; }
.nav__in {
  position: relative; pointer-events: auto;
  width: min(1080px, 100% - 2 * var(--gutter)); height: 54px; margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 12px;
  padding: 0 7px; border-radius: 999px;
}
.nav.is-solid .nav__in, .nav.is-open .nav__in { --glass-tint: rgba(16, 16, 19, 0.6); }
.nav__mark {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding-left: 9px;
  font-size: 0.9rem; font-weight: 700; font-stretch: 125%; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
}
.nav__mark img { width: 30px; height: auto; }
.nav__mark { min-height: 44px; }
.nav__nav { position: relative; }
.nav__links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  position: relative; display: flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px;
  font-size: 0.86rem; color: rgba(236, 236, 238, 0.72); text-decoration: none; transition: color .2s, background-color .2s;
}
.nav__links .ico { font-size: 16px; transition: color .3s; }
.nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav__links a[aria-current] { color: var(--text); }
.nav__links a[aria-current] .ico { color: var(--accent); }
.nav__glow {
  position: absolute; top: 0; left: 0; height: 100%; width: var(--iw, 0px); translate: var(--ix, 0px) 0;
  border-radius: 999px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0; pointer-events: none;
  transition: translate .55s var(--ease), width .55s var(--ease), opacity .3s;
}
.nav__nav.has-current .nav__glow { opacity: 1; }
.nav__cta { justify-self: end; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 0.85rem; }
.nav__toggle { display: none; }
@media (min-width: 761px) and (max-width: 920px) { .nav__links .ico { display: none; } .nav__links a { padding-inline: 10px; } }

@media (max-width: 760px) {
  .nav__in { grid-template-columns: auto 1fr auto auto; column-gap: 6px; }
  .nav__mark { padding-left: 7px; }
  .nav__nav { position: static; }
  .nav__glow { display: none; }
  .js .nav__toggle {
    display: grid; place-items: center; width: 40px; height: 40px;
    background: none; border: 0; cursor: pointer;
  }
  .nav__toggle span, .nav__toggle span::before {
    content: ""; display: block; width: 18px; height: 1.5px; background: var(--text);
    transition: transform .3s var(--ease);
  }
  .nav__toggle span { position: relative; transform: translateY(-3px); }
  .nav__toggle span::before { position: absolute; top: 6px; }
  .nav.is-open .nav__toggle span { transform: rotate(45deg); }
  .nav.is-open .nav__toggle span::before { transform: translateY(-6px) rotate(-90deg); }
  /* scripts on: a rounded sheet under the pill. scripts off: the row scrolls sideways. */
  .js .nav__links {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 8px;
    border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.09);
    background: radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 50%) rgba(16, 16, 19, 0.74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 24px 60px -28px rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s, transform .35s var(--ease), visibility 0s .35s;
  }
  .js .nav.is-open .nav__links { visibility: visible; opacity: 1; transform: none; transition: opacity .25s, transform .35s var(--ease); }
  .js .nav__links a { padding: 13px 14px; font-size: 1rem; border-radius: 14px; }
  .js .nav__links .ico { display: block; }
  html:not(.js) .nav__in { height: auto; min-height: 54px; grid-template-columns: 1fr auto; border-radius: 22px; }
  html:not(.js) .nav__nav { grid-row: 2; grid-column: 1 / -1; overflow-x: auto; padding-block: 4px; }
  html:not(.js) .nav__cta { grid-column: 2; grid-row: 1; }
}
@media (max-width: 400px) { .nav__mark { letter-spacing: 0.08em; } .nav__cta { padding-inline: 12px; } }

/* ---------- footer ---------- */
.footer { padding-block: 40px 48px; }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px 40px; }
.footer__mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.9rem; }
.footer__links { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; font-size: 0.9rem; color: var(--dim); }
.footer__mark img { width: 24px; height: auto; }
.footer__credit { margin-top: 6px; font-size: 0.78rem; }
.footer__credit a { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 0.2em; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer__links a:hover { color: var(--text); }
.section--tight { padding-block: clamp(64px, 7vw, 112px); }
