/* i-cobots — "refined" comparison variant.
   Loaded after styles.css by refined.html only (built by _build_refined.py).
   Every rule here is an override; index.html never loads this file. */

/* ---- 1. Header: legible over any section, one-line CTA on phones ---- */

/* The film owns the screen, so the header stays a soft gradient there.
   Once the film is over (refined.js sets .past-film at #scale), content is
   ordinary scrolling copy and needs a real bar behind the chrome, or body
   text slides visibly underneath the logo. */
.site-header {
  transition: background-color 300ms ease, border-color 300ms ease,
    -webkit-backdrop-filter 300ms ease, backdrop-filter 300ms ease;
  border-bottom: 1px solid transparent;
}
.site-header.past-film {
  background: rgba(5, 6, 7, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(244, 246, 240, 0.08);
  padding-bottom: 1.05rem;
}
.site-header.past-film.on-light {
  background: rgba(231, 228, 220, 0.9);
  border-bottom-color: rgba(16, 19, 24, 0.1);
}

.demo-link { white-space: nowrap; }

/* on the paper section the Fleet pill kept its dark glass fill under
   dark text (~2:1); give it a paper fill instead */
.site-header.on-light .nav-toggle { background: rgba(231, 228, 220, 0.7); }

@media (max-width: 720px) {
  .site-header { gap: 0.6rem; }
  .site-header.past-film { padding-bottom: 0.9rem; }
  .nav-toggle { margin-right: 0; }
  .demo-link { padding-inline: 0.85rem; }
}

@media (max-width: 360px) {
  .brand-logo { width: 92px; }
  .nav-toggle { padding-inline: 0.7rem; }
}

/* ---- 2. Long in-page jumps: a quick fade instead of a 30-screen fast-forward ---- */
.jump-veil {
  position: fixed;
  inset: 0;
  z-index: 110; /* under the header (120) so the chrome never blinks */
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.jump-veil.is-on { opacity: 1; }

/* ---- 3. Small text to WCAG AA (4.5:1) ----
   Dark ground: captions were 34% ink on #050607 = 2.8:1; 62% is ~7:1 and
   still clearly tertiary next to the 72% ledes. Paper (#e7e4dc): #8a8f96 was
   2.6:1 and the #018fe0 blue 2.75:1; #585d65 / #0068a8 clear 5:1. */
.slab-foot,
.spec-source,
.story-illus {
  color: color-mix(in srgb, var(--ink, #f4f6f0) 62%, transparent);
}
.slab-foot { font-size: 0.72rem; }
.fleet-kicker { color: color-mix(in srgb, var(--ink, #f4f6f0) 62%, transparent); }

.scale-name,
.scale-use,
.scale-hint,
.scale-unit--human .scale-mm,
.scale-unit--human .scale-name { color: #585d65; }
.scale-mm,
.scale-kicker { color: #0068a8; }
.scale-use { font-size: 0.62rem; }

/* the retired rail was only transparent: its seven links stayed in the
   tab order after the footer */
.chapter-rail { transition: opacity 280ms ease, visibility 0s; }
.chapter-rail.is-retired,
.menu-open .chapter-rail,
.specs-open .chapter-rail {
  visibility: hidden;
  transition: opacity 280ms ease, visibility 0s linear 280ms;
}

/* ---- 4. Form handoff state (no endpoint) ---- */
.form-done[data-mode="mail"] .form-done-mark { color: var(--accent); }
.form-done-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  margin-top: 1.6rem;
}
.form-done-actions button.ghost-link {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}
.form-done-copy {
  width: 100%;
  min-height: 9rem;
  margin-top: 1.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(244, 246, 240, 0.16);
  border-radius: 10px;
  background: rgba(244, 246, 240, 0.04);
  color: var(--soft);
  font: 0.85rem/1.55 var(--font-mono);
  resize: vertical;
}

/* ---- 5. Finale, now the lead-in to the form ---- */
/* It used to sit above three reference slabs; directly above the form it
   needs less air below, so the CTA and the form read as one move. */
.finale { min-height: 88svh; }
.finale + .slab--contact { border-top: 0; }

/* ---- focus rings on the dark ground ---- */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
