/* ==========================================================================
   Oqio Terra — public site stylesheet
   Deep charcoal, graticule, film grain, one instrument motif, one blue.
   No webfonts, no CDN, no build step.
   ========================================================================== */

:root {
  --ink: #f5f7fb;
  /* Neutral scale, measured against the painted background rather than chosen
     by eye. Every tier clears WCAG AA for its size: body 11.9:1, muted 7.4:1,
     faint 5.3:1. The old faint (#545c6a) measured 2.96:1 at 12px — a real
     failure, and the reason the spec lines under each download read as washed
     out. Each tier is now roughly where the tier above it used to sit. */
  --body-c: #c4cbd7;
  --muted: #98a1b0;
  --faint: #7c8595;
  --hair: rgba(255, 255, 255, 0.085);
  --hair-2: rgba(255, 255, 255, 0.20);
  --blue: #1666c1;
  --blue-2: #6fa7e9;
  --blue-3: #a8cdf7;
  --glow: rgba(22, 102, 193, 0.22);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --shell: 1100px;
  --gutter: 24px;

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #07090d; }

body {
  margin: 0;
  background:
    radial-gradient(1020px 640px at 92% -22%, rgba(22, 102, 193, 0.20), transparent 62%),
    radial-gradient(760px 520px at -12% 92%, rgba(22, 102, 193, 0.075), transparent 58%),
    linear-gradient(180deg, #0c1017 0%, #090b11 46%, #07090d 100%);
  background-attachment: fixed;
  color: var(--body-c);
  font-family: var(--sans); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  min-height: 100vh;
}

/* graticule — a surveyor's grid, densest under the orbit, gone by mid-page */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.038) 1px, transparent 1px);
  background-size: 84px 84px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.45) 34%, transparent 62%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.45) 34%, transparent 62%);
}

/* film grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2 { margin: 0; color: var(--ink); font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(22, 102, 193, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; border-radius: 2px; }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.k {
  font-family: var(--mono); font-size: 0.75rem;   /* was 0.6875 (11px) */
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 60;
  background: rgba(9, 11, 16, 0.62);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  transition: background 0.3s var(--ease);
}
/* hairline that fades at both ends, matching the section rules */
.top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.13) 18%, rgba(255,255,255,0.13) 82%, transparent);
}
.top--sticky { background: rgba(8, 10, 14, 0.88); }
.top__in {
  height: 66px; max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark { display: flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; }
/* the marks are inline SVG, so they take their colour from the link.
   .wordmark__mark is the planet symbol — currently not in the lockup, kept so
   restoring it is a one-line change in build/make_pages.py */
.wordmark__mark { height: 25px; width: auto; display: block; }
.wordmark__oqio { height: 19px; width: auto; display: block; }
.wordmark__product {
  font-size: 0.9rem; color: var(--muted); letter-spacing: -0.005em;
  padding-left: 12px; border-left: 1px solid var(--hair-2);
  transition: color 0.18s var(--ease);
}
.wordmark:hover .wordmark__product { color: var(--body-c); }
.top__cta {
  text-decoration: none; color: var(--ink); font-size: 0.875rem; font-weight: 500;
  border: 1px solid var(--hair-2); border-radius: 7px; padding: 9px 18px;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}
.top__cta:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* ---------- primary navigation ---------- */
.top__nav { display: flex; align-items: center; gap: 28px; }
.top__nav a {
  font-size: 0.875rem; color: var(--muted); text-decoration: none;
  transition: color 0.16s ease;
}
.top__nav a:hover { color: var(--ink); }
.top__act { display: flex; align-items: center; gap: 10px; }
.top__go {
  text-decoration: none; font-size: 0.875rem; font-weight: 550; letter-spacing: -0.01em;
  color: #0b0d11; background: #fff; border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px; padding: 9px 17px; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.34);
  transition: background 0.15s ease, transform 0.15s ease;
}
.top__go:hover { background: #eef0f4; transform: translateY(-1px); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 148px 0 104px; overflow: hidden; }
/* bloom sitting behind the instrument */
.hero::before {
  content: ""; position: absolute; top: -80px; right: -170px;
  width: 820px; height: 820px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(22, 102, 193, 0.16) 0%, rgba(22, 102, 193, 0.05) 44%, transparent 68%);
}
.hero__orbit {
  /* The globe is drawn as a real orthographic projection and sits in a masked
     group, so its left limb dissolves behind the headline. The satellite group
     is outside that mask and keeps the full ring — which is what allows the
     globe to be this large without crowding the type. The ring still has to
     stay inside the viewport: --globe is bounded so it does. */
  --globe: clamp(430px, 44vw, 780px);
  position: absolute;
  /* Optical centre, not true centre. The ring is 0.92x the globe's width, so a
     780px globe leaves only ~135px of vertical slack in the whole hero — a fixed
     lift would eat all of it and put the ring against the header. Scaling the
     offset with the globe keeps a ~35:65 top-to-bottom ratio at every width. */
  top: calc(273px - var(--globe) * 0.334);   /* 32:68 — one step above optical centre */
  right: 8px;
  width: var(--globe); height: var(--globe);
  pointer-events: none; user-select: none;
  filter: drop-shadow(0 0 30px rgba(22, 102, 193, 0.30));
}
.orbit__spin {
  transform-origin: 400px 400px; transform-box: view-box;
  animation: orbitspin 90s linear infinite;
  filter: drop-shadow(0 0 7px rgba(111, 167, 233, 0.75));
}
@keyframes orbitspin { to { transform: rotate(360deg); } }
.hero__in { position: relative; z-index: 1; }

.hero .k {
  display: inline-flex; align-items: center; gap: 15px;
  margin-bottom: 30px; color: var(--blue-2);
}
.hero .k::before {
  content: ""; width: 26px; height: 1px; flex: none;
  background: linear-gradient(90deg, transparent, var(--blue-2));
}
.hero h1 {
  font-size: clamp(2.6rem, 5.8vw, 4.35rem); font-weight: 700;
  letter-spacing: -0.048em; line-height: 1.045; max-width: 21ch;
  background: linear-gradient(174deg, #ffffff 6%, #eff3f9 48%, #dde5f1 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero h1 .dim {
  /* Solid fill, deliberately NOT a second gradient. Two nested
     background-clip:text elements meet at a fractional-pixel box edge, and the
     parent's gradient bleeds into the child's last glyph — which renders a full
     stop that is half grey and half white. It is font-dependent, so it shows in
     Space Grotesk and hides in a fallback face. A solid fill removes the second
     gradient box, and with it the whole class of bug. */
  background: none;
  -webkit-text-fill-color: #838d9f; color: #838d9f;
}
.hero__sub {
  margin-top: 32px; font-size: 1.1875rem; line-height: 1.62;
  color: var(--body-c); max-width: 52ch; text-wrap: pretty;
}
.hero__act { margin-top: 46px; display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }

/* ---------- actions ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #eceff5 100%); color: #0a0d12;
  text-decoration: none;
  padding: 14px 26px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 10px 28px rgba(0, 0, 0, 0.46);
  font-size: 0.9375rem; font-weight: 560; letter-spacing: -0.012em;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease), filter 0.18s var(--ease);
}
.btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1.5px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 16px 38px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(111, 167, 233, 0.18);
}
.btn:active { transform: translateY(0); }
.arr { display: inline-block; transition: transform 0.2s var(--ease-out); }
.btn:hover .arr--r, .alink:hover .arr--r { transform: translateX(3px); }
.alink:hover .arr--d, .row:hover .arr--d { transform: translateY(3px); }
.row:hover .arr--o { transform: translate(2px, -2px); }
.alink {
  position: relative; font-size: 0.9375rem; font-weight: 500; color: var(--blue-2);
  text-decoration: none; white-space: nowrap; padding-bottom: 3px;
  transition: color 0.18s var(--ease);
}
.alink::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s var(--ease-out);
}
.alink:hover { color: var(--blue-3); }
.alink:hover::after { transform: scaleX(1); }

/* ---------- numbered sections ---------- */
.sec { position: relative; padding: 78px 0; scroll-margin-top: 66px; }
/* Alternating tonal band rather than a drawn rule: a section boundary and a
   row separator should not be the same object. The rows keep the only lines. */
.sec:nth-of-type(even) { background: rgba(255, 255, 255, 0.017); }
.sec__grid {
  position: relative;
  display: grid; grid-template-columns: 268px 1fr; gap: 76px; align-items: start;
}
/* the spec-sheet spine between index and list */
.sec__grid::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 306px; width: 1px;
  background: linear-gradient(180deg, transparent, var(--hair) 12%, var(--hair) 88%, transparent);
}
.sec__idx {
  display: block; font-family: var(--mono); font-size: 2.6rem; line-height: 1;
  font-weight: 300; letter-spacing: -0.02em;
  background: linear-gradient(180deg, rgba(255,255,255,0.50), rgba(255,255,255,0.18));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.sec__grid h2 { font-size: 1.6rem; margin-top: 20px; letter-spacing: -0.03em; }
.sec__note { margin-top: 13px; font-size: 1rem; color: var(--muted); max-width: 30ch; }

/* ---------- ruled index list ---------- */
.list { margin-inline: -20px; }
.row {
  position: relative; display: grid; grid-template-columns: 1fr auto;
  gap: 8px 28px; align-items: center;
  padding: 25px 20px; border-radius: 12px; text-decoration: none;
  transition: background 0.2s var(--ease);
}
.row::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 1px;
  background: var(--hair);
}
.list > li:first-child .row::before {
  content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 1px;
  background: var(--hair);
}
.row:hover {
  background: linear-gradient(90deg, rgba(111, 167, 233, 0.075) 0%, rgba(111, 167, 233, 0.018) 34%, transparent 72%);
  box-shadow: inset 2px 0 0 var(--blue-2);
}
.row__txt { display: block; }
.row__name {
  display: block; font-size: 1.09375rem; font-weight: 560; color: var(--ink);
  letter-spacing: -0.018em; transition: color 0.18s var(--ease);
}
.row:hover .row__name { color: #fff; }
.row__meta {
  display: block; font-family: var(--mono); font-size: 0.8125rem; color: var(--faint);
  margin-top: 7px; letter-spacing: 0.035em; transition: color 0.18s var(--ease);
}
.row:hover .row__meta { color: var(--muted); }
.row__go {
  display: inline-flex; align-items: center; gap: 9px; justify-content: flex-end;
  min-width: 118px; /* fixed lane, so the arrow moves without reflowing the row */
  font-size: 0.9375rem; font-weight: 500; color: var(--muted); white-space: nowrap;
  transition: color 0.18s var(--ease);
}
.row:hover .row__go { color: var(--blue-2); }

/* ---------- footer ---------- */
.foot { position: relative; padding: 46px 0 56px; }
.foot { background: rgba(255, 255, 255, 0.017); }
.foot__in { display: flex; justify-content: space-between; gap: 16px 40px; flex-wrap: wrap; }
.foot p, .foot a { font-size: 0.875rem; color: var(--muted); text-decoration: none; }
.foot a { transition: color 0.18s var(--ease); }
.foot a:hover { color: var(--blue-2); }
.foot__links { display: flex; gap: 26px; flex-wrap: wrap; }

.sec__grid > *, .row > * { min-width: 0; }

/* ---------- entrance ----------
   Keyframes carry the "from" state only, so when animation is disabled the
   element renders in its natural, visible state. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fadein { from { opacity: 0; } }

.hero .k     { animation: rise 0.85s var(--ease-out) 0.02s both; }
.hero h1     { animation: rise 0.90s var(--ease-out) 0.10s both; }
.hero__sub   { animation: rise 0.90s var(--ease-out) 0.18s both; }
.hero__act   { animation: rise 0.90s var(--ease-out) 0.26s both; }
.hero__orbit { animation: fadein 1.6s ease-out 0.10s both; }

/* No scroll-triggered reveals on this site by design: a specimen page is
   routinely captured as a full-page screenshot or printed to PDF, and content
   that only appears once scrolled into view can capture blank. The hero
   entrance below is time-based and settles on load. */

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .sec__grid { grid-template-columns: 1fr; gap: 30px; }
  .sec__grid::before { display: none; }
  .sec__note { max-width: 60ch; }
  .sec__idx { font-size: 2.1rem; }
  .hero { padding: 128px 0 104px; }
  .hero__orbit { --globe: 400px; top: 30px; right: 6px; opacity: 0.78; }
  .hero::before { width: 560px; height: 560px; top: -60px; right: -140px; }
}
@media (max-width: 760px) { .top__nav { display: none; } }
@media (max-width: 430px) { .top__cta { display: none; } }
@media (max-width: 640px) {
  .hero { padding: 100px 0 84px; }
  .hero h1 { letter-spacing: -0.04em; }
  .hero__sub { font-size: 1.0625rem; margin-top: 26px; }
  .hero__act { margin-top: 36px; gap: 22px; }
  .sec { padding: 68px 0; }
  .hero__orbit { --globe: 320px; top: 14px; right: 6px; opacity: 0.68; }
  .hero::before { width: 420px; height: 420px; top: -70px; right: -120px; }
  .list { margin-inline: -14px; }
  .row { grid-template-columns: 1fr; padding: 21px 14px; }
  .row::after, .list > li:first-child .row::before { left: 14px; right: 14px; }
  .row__go { justify-self: start; justify-content: flex-start; min-width: 0; margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
@media print {
  *, *::before, *::after { animation: none !important; }
  body { background: #fff; color: #333; }
  body::before, body::after, .hero__orbit, .hero::before { display: none; }
  h1, h2, .row__name, .wordmark, .wordmark__product { color: #111; -webkit-text-fill-color: #111; background: none; }
  .sec__idx { -webkit-text-fill-color: #555; background: none; }
}
