/* ============================================================
   ReduceOps landing — 2026 redesign
   Scoped to .ro-landing so the other pages keep their current look
   until this direction is approved and rolled out.
   ============================================================ */

/* Fonts are declared once, in assets/css/index.css, which always loads. */

body:has(.ro-landing) {
  background-color: #0a0a0b;
}

.ro-landing {
  --ro-bg: #0a0a0b;
  --ro-surface: #101012;
  --ro-raised: #151517;
  --ro-line: #26262a;
  --ro-line-soft: #1c1c1f;
  --ro-ink: #edeae4;
  --ro-ink-dim: #c3bfb7;
  --ro-muted: #918d85;
  --ro-accent: #2f9fbf;
  --ro-accent-soft: #74cfe6;

  --ro-display: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --ro-sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --ro-mono: "Fira Code", ui-monospace, monospace;

  --ro-measure: 34rem;

  /* The one content column width. Every screen uses it, so the page has a single
     left edge and a single measure from top to bottom. */
  --ro-col: 46rem;

  background-color: var(--ro-bg);
  color: var(--ro-ink);
  font-family: var(--ro-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- header, restyled inside the landing ---------- */

body:has(.ro-landing) .site-header {
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 220ms ease, border-color 220ms ease;
}

body:has(.ro-landing) .site-header.scrolled {
  background-color: rgba(10, 10, 11, 0.86);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--ro-line-soft);
}

body:has(.ro-landing) .site-header a {
  color: var(--ro-ink-dim);
}

body:has(.ro-landing) .site-header a:hover {
  color: var(--ro-ink);
}

/* ---------- scroll progress ---------- */

.ro-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background-color: var(--ro-accent);
  z-index: 60;
  pointer-events: none;
}

/* ---------- layout primitives ---------- */

.ro-wrap {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 768px) {
  .ro-wrap { padding-inline: 2.5rem; }
}

.ro-sec {
  position: relative;
  padding-block: 5rem;
}

@media (min-width: 768px) {
  .ro-sec { padding-block: 7rem; }
}

/* deliberate rhythm: one section breathes wider, one runs tighter */
.ro-sec--tight { padding-block: 3.5rem; }
.ro-sec--wide { padding-block: 7rem; }

@media (min-width: 768px) {
  .ro-sec--tight { padding-block: 4.5rem; }
  .ro-sec--wide { padding-block: 9.5rem; }
}

.ro-rule {
  height: 1px;
  background-color: var(--ro-line-soft);
  border: 0;
}

/* ---------- section head: number + title, sticky on desktop ---------- */

.ro-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 900px) {
  .ro-head {
    grid-template-columns: 5rem 1fr;
    gap: 2rem;
    align-items: start;
  }
}

.ro-num {
  font-family: var(--ro-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--ro-muted);
  padding-top: 0.9rem;
  text-transform: uppercase;
}

@media (min-width: 900px) {
  .ro-num {
    position: sticky;
    top: 6.5rem;
  }
}

.ro-h2 {
  font-family: var(--ro-display);
  font-weight: 400;
  font-optical-sizing: auto;
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
  max-width: 24ch;
}

.ro-lede {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ro-ink-dim);
  max-width: var(--ro-measure);
}

.ro-lede + .ro-lede { margin-top: 1rem; }

/* ---------- hero ---------- */

.ro-hero {
  position: relative;
  padding-top: 8.5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--ro-line-soft);
}

@media (min-width: 768px) {
  .ro-hero {
    padding-top: 11rem;
    padding-bottom: 6.5rem;
  }
}

.ro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ro-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ro-accent-soft);
  margin-bottom: 1.75rem;
}

.ro-eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background-color: var(--ro-accent);
}

.ro-h1 {
  font-family: var(--ro-display);
  font-weight: 400;
  font-optical-sizing: auto;
  /* font-size lives in the fit-the-window block further down. It was declared
     here as well, width-based, and then silently overwritten by the height-based
     one, so this value never applied. One declaration, one owner. */
  line-height: 1.03;
  letter-spacing: -0.028em;
  margin: 0 0 1.75rem;
  max-width: 20ch;
  text-wrap: balance;
  overflow-wrap: break-word;
  color: var(--ro-ink);
}

.ro-h1 em {
  font-style: italic;
  color: var(--ro-accent-soft);
}

.ro-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--ro-ink-dim);
  max-width: 33rem;
  margin: 0 0 2.5rem;
}

.ro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

.ro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ro-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.9rem 1.6rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.ro-btn--primary {
  background-color: var(--ro-accent);
  border: 1px solid var(--ro-accent);
}

.ro-btn--primary:hover {
  background-color: var(--ro-accent-soft);
  border-color: var(--ro-accent-soft);
}

.ro-btn--quiet {
  background: transparent;
  color: var(--ro-ink-dim);
  border: 1px solid var(--ro-line);
}

.ro-btn--quiet:hover {
  color: var(--ro-ink);
  border-color: #3a3a40;
}

.ro-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-top: 3rem;
  font-family: var(--ro-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ro-muted);
}

.ro-facts span { display: inline-flex; align-items: center; gap: 0.5rem; }

.ro-facts span + span::before {
  content: "/";
  color: #3a3a40;
  margin-right: 0.75rem;
}

.ro-caption {
  margin-top: 0.9rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ro-muted);
  max-width: var(--ro-measure);
}

/* ---------- numbered list (not cards) ---------- */

.ro-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 42rem;
}

.ro-list li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 1.25rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--ro-line-soft);
}

.ro-list li:last-child { border-bottom: 1px solid var(--ro-line-soft); }

.ro-list .n {
  font-family: var(--ro-mono);
  font-size: 0.72rem;
  color: var(--ro-accent);
  padding-top: 0.35rem;
  letter-spacing: 0.08em;
}

.ro-list h3 {
  font-family: var(--ro-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 0.35rem;
  color: var(--ro-ink);
}

.ro-list p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ro-muted);
}

/* ---------- price ---------- */

.ro-price {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .ro-price { grid-template-columns: 1fr 20rem; gap: 4rem; }
}

.ro-price__figure {
  border-left: 2px solid var(--ro-accent);
  padding-left: 1.5rem;
}

.ro-price__amount {
  font-family: var(--ro-display);
  font-optical-sizing: auto;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ro-ink);
  margin: 0;
}

.ro-price__note {
  font-family: var(--ro-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ro-muted);
  margin: 0.75rem 0 0;
}

/* ---------- person ---------- */

.ro-person {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 768px) {
  .ro-person { grid-template-columns: 11rem 1fr; gap: 2.75rem; }
}

.ro-person img {
  width: 11rem;
  height: 11rem;
  object-fit: cover;
  border-radius: 2px;
  filter: grayscale(0.15) contrast(1.02);
}

.ro-person__name {
  font-family: var(--ro-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
}

.ro-person__role {
  font-family: var(--ro-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ro-muted);
  margin: 0 0 1.25rem;
}

.ro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.ro-links a {
  color: var(--ro-accent-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(224, 162, 119, 0.3);
  padding-bottom: 1px;
}

.ro-links a:hover { border-bottom-color: var(--ro-accent-soft); }

/* ---------- writing ---------- */

.ro-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 46rem;
}

.ro-posts li {
  border-top: 1px solid var(--ro-line-soft);
}

.ro-posts li:last-child { border-bottom: 1px solid var(--ro-line-soft); }

.ro-posts a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding-block: 1.35rem;
  text-decoration: none;
  color: var(--ro-ink);
}

.ro-posts .t {
  font-size: 1rem;
  line-height: 1.45;
  transition: color 160ms ease;
}

.ro-posts a:hover .t { color: var(--ro-accent-soft); }

.ro-posts .d {
  font-family: var(--ro-mono);
  font-size: 0.72rem;
  color: var(--ro-muted);
  white-space: nowrap;
}

/* ---------- close ---------- */

.ro-close {
  border-top: 1px solid var(--ro-line-soft);
  padding-block: 6rem;
  text-align: left;
}

@media (min-width: 768px) {
  .ro-close { padding-block: 8rem; }
}

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

.ro-reveal {
  opacity: 1;
  transform: none;
}

html.js .ro-reveal {
  opacity: 0;
  transform: translate3d(0, 1.25rem, 0);
  transition: opacity 620ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 620ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

html.js .ro-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .ro-reveal,
  html.js .ro-reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ro-progress { display: none; }
}

/* focus visibility, matched to the brand */
.ro-landing a:focus-visible,
.ro-landing button:focus-visible {
  outline: 2px solid var(--ro-accent-soft);
  outline-offset: 3px;
}

/* ============================================================
   Fixes after first review
   ============================================================ */

/* The header CTA sits outside .ro-landing, so it needs the body:has scope and
   enough specificity to beat the generic `a` colour rule above.

   No border and no font-weight override. The border was 1px of the same colour
   as the fill in both themes, so it never drew, and it still added 2px to the
   box, which made this button 46px tall against 44px everywhere else. The
   weight override made the same partial render at 500 here and 600 on every
   other page. */
body:has(.ro-landing) .site-header a.btn-primary {
  background-color: var(--ro-accent);
  color: #140c06;
}

body:has(.ro-landing) .site-header a.btn-primary:hover {
  background-color: var(--ro-accent-soft);
  color: #140c06;
}

/* Consent banner belongs to the page's palette, not the vendor's. */
body:has(.ro-landing) .cookie-btn-accept {
  background-color: var(--ro-accent);
  border-color: var(--ro-accent);
  color: #140c06;
}

body:has(.ro-landing) .cookie-btn-accept:hover {
  background-color: var(--ro-accent-soft);
  border-color: var(--ro-accent-soft);
}

body:has(.ro-landing) .cookie-banner-link {
  color: var(--ro-accent-soft);
}

body:has(.ro-landing) .cookie-banner {
  background-color: rgba(16, 16, 18, 0.97);
  border-top: 1px solid var(--ro-line);
  color: var(--ro-ink-dim);
}

/* Secondary action needs to read as clickable, not disabled. */
.ro-btn--quiet {
  border-color: #3d3d44;
  color: var(--ro-ink);
}

.ro-btn--quiet:hover {
  border-color: var(--ro-accent);
  color: var(--ro-ink);
}

/* Metadata row was too quiet to read. */
.ro-facts {
  font-size: 0.78rem;
  color: #9aa4aa;
}

/* ---------- hero: two columns, with the deliverable as the counterweight ---------- */

.ro-hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .ro-hero__grid {
    grid-template-columns: minmax(0, 1fr) 25rem;
    gap: 4rem;
  }
}

.ro-report {
  border: 1px solid var(--ro-line);
  border-radius: 4px;
  background-color: var(--ro-surface);
  padding: 1.25rem 1.35rem 1.1rem;
}

.ro-report__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--ro-line-soft);
}

.ro-report__label {
  font-family: var(--ro-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ro-accent-soft);
}

.ro-report__meta {
  font-family: var(--ro-mono);
  font-size: 0.7rem;
  color: var(--ro-muted);
}

.ro-report ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ro-report li {
  display: grid;
  grid-template-columns: 0.6rem 1fr;
  gap: 0.85rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--ro-line-soft);
  align-items: start;
}

.ro-report li:last-child { border-bottom: 0; }

.ro-report .sev {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  margin-top: 0.45rem;
}

.ro-report .sev--crit { background-color: #d9705f; }
.ro-report .sev--high { background-color: #d9a15f; }
.ro-report .sev--med  { background-color: #7fae7a; }

.ro-report b {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ro-ink);
  margin-bottom: 0.15rem;
}

.ro-report p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ro-muted);
}

.ro-report__foot {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--ro-line-soft);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ro-muted);
}

/* ============================================================
   Token scope fix.
   The header and the consent banner live OUTSIDE .ro-landing, so custom
   properties defined only on .ro-landing do not resolve there. An invalid
   var() makes the property unset, which is why the header CTA and the accept
   button rendered with a transparent background and dark text on dark.
   Declaring the same tokens on the body fixes every element on the page.
   ============================================================ */

body:has(.ro-landing) {
  --ro-bg: #0a0a0b;
  --ro-surface: #101012;
  --ro-raised: #151517;
  --ro-line: #26262a;
  --ro-line-soft: #1c1c1f;
  --ro-ink: #edeae4;
  --ro-ink-dim: #c3bfb7;
  --ro-muted: #918d85;
  --ro-accent: #2f9fbf;
  --ro-accent-soft: #74cfe6;
  --ro-display: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --ro-sans: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --ro-mono: "Fira Code", ui-monospace, monospace;
  --ro-measure: 34rem;

  /* The one content column width. Every screen uses it, so the page has a single
     left edge and a single measure from top to bottom. */
  --ro-col: 46rem;
}

/* Everything after the section head aligns to the head's second column, so the
   page has one left edge per section rather than three. */
@media (min-width: 900px) {
  .ro-sec .ro-wrap > .ro-head ~ * {
    margin-left: 7rem;
  }
}

/* Mono labels were borderline at 12px on near-black. */
.ro-price__note {
  font-size: 0.78rem;
  color: #9aa4aa;
}

.ro-num {
  color: #9aa4aa;
}

/* ============================================================
   Light variant. Same structure, cool paper instead of ink.
   The background is a very light cool grey (#f9fafb), not a warm cream: a warm
   cream reads as Anthropic/Claude, and the logo is blue-cyan-green, so the
   neutrals lean cool to sit under it.
   Activated by ?theme=light (see landing.js), so both can be compared
   at the same URL without a rebuild.
   ============================================================ */

html.ro-light body:has(.ro-landing) {
  background-color: #f9fafb;
  --ro-bg: #f9fafb;
  --ro-surface: #ffffff;
  --ro-raised: #f1f4f6;
  --ro-line: #dfe6ea;
  --ro-line-soft: #eaeff2;
  --ro-ink: #0f1517;
  --ro-ink-dim: #35424a;
  --ro-muted: #5f6f77;
  --ro-accent: #1a6c86;
  --ro-accent-soft: #13505f;
}

html.ro-light body:has(.ro-landing) .site-header.scrolled {
  background-color: rgba(249, 250, 251, 0.9);
  border-bottom-color: #dfe6ea;
}

html.ro-light body:has(.ro-landing) .site-header a {
  color: #35424a;
}

html.ro-light body:has(.ro-landing) .site-header a:hover {
  color: #0f1517;
}

html.ro-light body:has(.ro-landing) .site-header a.btn-primary {
  color: #ffffff;
}

html.ro-light body:has(.ro-landing) .cookie-banner {
  background-color: rgba(255, 255, 255, 0.98);
  border-top-color: #dfe6ea;
  color: #35424a;
}

html.ro-light body:has(.ro-landing) .cookie-btn-accept {
  color: #ffffff;
}

html.ro-light body:has(.ro-landing) .cookie-btn-reject {
  color: #5f6f77;
  border-color: #d5dde1;
}

html.ro-light .ro-person img {
  filter: none;
}

html.ro-light .ro-report .sev--crit { background-color: #b4432f; }
html.ro-light .ro-report .sev--high { background-color: #b07c22; }
html.ro-light .ro-report .sev--med  { background-color: #3f6b3a; }

/* The token block on .ro-landing outranks the body-level light tokens for
   everything inside it, so the light palette has to be declared there too.
   Without this, text stayed near-white on warm paper. */
html.ro-light .ro-landing {
  --ro-bg: #f9fafb;
  --ro-surface: #ffffff;
  --ro-raised: #f1f4f6;
  --ro-line: #dfe6ea;
  --ro-line-soft: #eaeff2;
  --ro-ink: #0f1517;
  --ro-ink-dim: #35424a;
  --ro-muted: #5f6f77;
  --ro-accent: #1a6c86;
  --ro-accent-soft: #13505f;
  background-color: #f9fafb;
  color: #0f1517;
}

html.ro-light body:has(.ro-landing) {
  color: #0f1517;
}

html.ro-light .ro-h1,
html.ro-light .ro-h2,
html.ro-light .ro-price__amount,
html.ro-light .ro-person__name,
html.ro-light .ro-posts a {
  color: #0f1517;
}

html.ro-light .ro-h1 em {
  /* was the old copper #8f4222, left behind when the palette moved to teal.
     The light-theme emphasis is the deep teal, not the dark-theme one. */
  color: var(--ro-accent-soft, #13505f);
}

/* ============================================================
   Button label colour, driven by a variable.
   A direct `color` override on the button lost the cascade even at higher
   specificity, while custom properties resolve reliably in the same scope.
   So the label colour is a token, set per theme and accent.
   ============================================================ */

.ro-btn--primary,
body:has(.ro-landing) .site-header a.btn-primary,
body:has(.ro-landing) .cookie-btn-accept {
  color: var(--ro-btn-text, #120b06);
}

body:has(.ro-landing),
.ro-landing {
  --ro-btn-text: #120b06;   /* dark paper: ink label on the teal button */
}

html.ro-light body:has(.ro-landing),
html.ro-light .ro-landing {
  --ro-btn-text: #ffffff;   /* light paper: cream label on the ink button */
}

.ro-landing .ro-btn.ro-btn--primary {
  color: var(--ro-btn-text, #120b06);
}

body:has(.ro-landing) .site-header a.btn-primary,
body:has(.ro-landing) .cookie-btn-accept {
  color: var(--ro-btn-text, #120b06);
}

/* ============================================================
   Light paper: the primary button is ink, not accent.
   A mid-tone accent button cannot carry a light label on cream at 4.5:1
   without going so dark it stops reading as the accent. Ink on paper is the
   stronger editorial answer, and the contrast is not close to marginal.
   ============================================================ */

html.ro-light .ro-landing .ro-btn.ro-btn--primary {
  background-color: #0f1517;
  /* .ro-btn--primary carries a real border, so it needs the matching colour.
     The header CTA and the cookie button do not have one, which is why they are
     a separate rule: a border there only made the button 2px taller. */
  border-color: #0f1517;
  color: #ffffff;
}

html.ro-light body:has(.ro-landing) .site-header a.btn-primary,
html.ro-light body:has(.ro-landing) .cookie-btn-accept {
  background-color: #0f1517;
  color: #ffffff;
}

html.ro-light .ro-landing .ro-btn.ro-btn--primary:hover {
  background-color: #2e2822;
  border-color: #2e2822;
  color: #ffffff;
}

html.ro-light body:has(.ro-landing) .site-header a.btn-primary:hover,
html.ro-light body:has(.ro-landing) .cookie-btn-accept:hover {
  background-color: #2e2822;
  color: #ffffff;
}

/* ============================================================
   Full-screen sections with scroll snapping.
   Andrew's requirement: one scroll gesture moves one whole screen, and the
   content sits centred on each screen rather than offset by a number gutter.

   scroll-snap-stop: always is what makes a single gesture land on exactly one
   boundary instead of skipping two or three sections on a fast trackpad flick.
   ============================================================ */

html:has(.ro-landing) {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.ro-screen {
  min-height: 100svh;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-sizing: border-box;
  padding-block: 6rem 4rem;
  position: relative;
}

/* the fixed header sits over the first screen, so it needs clearance */
.ro-screen--hero { padding-block: 8rem 5rem; }

/* the footer must be a valid resting place or mandatory snapping traps it */
body:has(.ro-landing) > footer {
  scroll-snap-align: start;
}

/* one centred column per screen */
.ro-col {
  width: 100%;
  max-width: var(--ro-col);
  margin-inline: 0;
}

/* the number is now an inline marker above the heading, not a gutter */
.ro-num {
  position: static;
  display: block;
  padding-top: 0;
  margin: 0 0 1rem;
  font-family: var(--ro-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ro-accent-soft);
}

.ro-num::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  margin-right: 0.6rem;
  vertical-align: middle;
  background-color: var(--ro-accent);
}

.ro-h2 { max-width: 22ch; margin-bottom: 1.75rem; }

.ro-lede { margin-top: 0; }
.ro-lede + .ro-lede { margin-top: 1rem; }
.ro-lede--tight { margin-top: 1.75rem; }
.ro-caption { margin-top: 0.9rem; }

/* hero: two columns, vertically centred, both sitting on the same baseline grid */
.ro-hero__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  width: 100%;
}

@media (min-width: 1024px) {
  .ro-hero__grid {
    grid-template-columns: minmax(0, 1fr) 24rem;
    gap: 3.5rem;
  }
}


/* price: the figure column is narrower so the pair fits a centred measure */
.ro-price {
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

@media (min-width: 900px) {
  .ro-price {
    grid-template-columns: minmax(0, 1fr) 13rem;
    gap: 3rem;
  }
}

.ro-price__figure { padding-left: 1.25rem; }
.ro-price__amount + .ro-price__note { margin-top: 0.5rem; }
.ro-price__note + .ro-price__amount { margin-top: 1.75rem; }

/* person and posts sit inside the centred column now */
.ro-person { grid-template-columns: 1fr; gap: 1.75rem; }

@media (min-width: 768px) {
  .ro-person { grid-template-columns: 9rem 1fr; gap: 2.25rem; }
}

.ro-person img { width: 9rem; height: 9rem; }

.ro-posts { max-width: none; }
.ro-list { max-width: none; }

/* reveal transitions are wasted on a snapped page: each screen arrives whole */
.ro-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  html:has(.ro-landing) { scroll-behavior: auto; }
}

/* baseof puts a 64px spacer between the fixed header and <main>. On a
   full-screen snap layout that spacer becomes a visible band above the first
   screen and pushes every snap point down by 64px. Remove it here only. */
body:has(.ro-landing) > .h-16 {
  display: none;
}

/* Tightened so the tallest screen (the artefact one) still fits a 900px
   viewport. An 18px overflow on a mandatory snap point is a trap: the caption
   below the fold cannot be reached without fighting the snap. */
.ro-screen {
  padding-block: 5rem 2.5rem;
}

.ro-screen--hero {
  padding-block: 6.5rem 3rem;
}

/* the artefact was the tallest block;

/* Anchor navigation and programmatic scrolling were both dead: every fragment
   resolved to scrollY 0, and a scripted scroll never settled. The combination
   of scroll-behavior:smooth with scroll-snap-stop:always blocks long jumps,
   because the scroller refuses to pass more than one snap point at a time.
   Dropping both keeps the one-screen-per-gesture behaviour (that comes from
   mandatory snapping against 100svh sections) while letting links work. */
html:has(.ro-landing) {
  scroll-behavior: auto;
}

.ro-screen {
  scroll-snap-stop: normal;
}

/* The fixed consent banner covers the bottom ~72px of every screen, which ate
   the caption under the artefact. Reserve that space so content is never
   hidden behind it, and keep the vertical centring honest. */
.ro-screen {
  padding-block: 4.5rem 6.5rem;
}

.ro-screen--hero {
  padding-block: 6rem 6.5rem;
}

/* The artefact screen was 937px against a 900px viewport. A section taller than
   the viewport is a trap under mandatory snapping: its caption cannot be
   reached without fighting the snap. Trim the terminal type and the screen
   padding until it fits with headroom. */
.ro-screen {
  padding-block: 4rem 6rem;
}

.ro-caption {
  margin-top: 0.75rem;
  font-size: 0.78rem;
}

#quiet-failure .ro-lede + .ro-lede { margin-top: 0.75rem; }

/* ============================================================
   Centring against the real visible area.

   The previous version centred inside a padded box using hardcoded values that
   guessed at the header and the consent banner. That is wrong twice: the guess
   is not the measurement, and it stays wrong after the banner is dismissed.

   Now the header and banner heights are measured from the live DOM and written
   to custom properties. Each screen is exactly one viewport tall, the header
   height is reserved at the top and the banner height at the bottom, so the
   flex centring happens in the space a visitor can actually see. When the
   banner goes away its height becomes 0 and the content recentres itself.
   ============================================================ */

:root {
  --ro-header-h: 79px;
  --ro-banner-h: 0px;
}

.ro-screen,
.ro-screen--hero {
  min-height: 100svh;
  box-sizing: border-box;
  padding-top: calc(var(--ro-header-h) + 1.75rem);
  padding-bottom: calc(var(--ro-banner-h) + 1.75rem);
  padding-left: 0;
  padding-right: 0;
}

/* keep the snap aligned to the true top of each screen, not under the header */
html:has(.ro-landing) {
  scroll-padding-top: var(--ro-header-h);
}

/* scroll-padding-top shifted every snap point down by the header height, so a
   gesture landed on 821 instead of 900 and the screens stopped aligning with
   the viewport. The sections already reserve header space with their own top
   padding, so this was both redundant and wrong. */
html:has(.ro-landing) {
  scroll-padding-top: 0;
}

/* ============================================================
   Every screen must fit the window with no scrolling inside it.

   Measured before this change: at 900px height the tightest screen had 66px of
   slack, but at 800px it overflowed by 34px and at 720px by 114px. Fixed pixel
   sizes cannot hold a viewport, so type and spacing are now expressed as a
   fraction of viewport height with a floor and a ceiling. Each middle value is
   the size that measured correct at 900px, written as vh (px / 900 * 100).

   Floors are set low enough to still fit a 700px-tall window.
   ============================================================ */

.ro-h1 {
  /* min() of the two axes, not vh alone. A tall narrow phone reports 844px of
     height, so 8.44vh asked for a 71px headline inside a 327px column, where
     the single word "infrastructure" measures 411px. Unbreakable, so it pushed
     the document 84px wide and dragged the fixed header with it. Desktop is
     unchanged: at 1440x900 the height term still wins. */
  font-size: clamp(2.25rem, min(8.44vh, 7vw), 4.75rem);
  line-height: 1.03;
  margin-bottom: clamp(0.75rem, 3.11vh, 1.75rem);
}

.ro-h2 {
  font-size: clamp(1.5rem, min(5.07vh, 4.6vw), 2.85rem);
  overflow-wrap: break-word;
  line-height: 1.1;
  margin-bottom: clamp(0.75rem, 3.11vh, 1.75rem);
}

.ro-sub {
  font-size: clamp(0.95rem, 2.13vh, 1.2rem);
  line-height: 1.55;
}

.ro-lede {
  font-size: clamp(0.85rem, 1.89vh, 1.0625rem);
  line-height: 1.6;
  margin-top: clamp(0.5rem, 1.78vh, 1rem);
}

.ro-eyebrow,
.ro-num {
  font-size: clamp(0.6rem, 1.28vh, 0.72rem);
  margin-bottom: clamp(0.5rem, 1.78vh, 1rem);
}

.ro-caption {
  font-size: clamp(0.62rem, 1.39vh, 0.78rem);
  line-height: 1.5;
  margin-top: clamp(0.4rem, 1.33vh, 0.75rem);
}

.ro-list h3 {
  font-size: clamp(0.85rem, 1.78vh, 1rem);
  line-height: 1.4;
  margin-bottom: clamp(0.15rem, 0.62vh, 0.35rem);
}

.ro-list p {
  font-size: clamp(0.78rem, 1.67vh, 0.9375rem);
  line-height: 1.5;
}

.ro-list li {
  padding-top: clamp(0.5rem, 2.49vh, 1.4rem);
  padding-bottom: clamp(0.5rem, 2.49vh, 1.4rem);
}

.ro-btn {
  font-size: clamp(0.85rem, 1.67vh, 0.9375rem);
  padding-top: clamp(0.55rem, 1.6vh, 0.9rem);
  padding-bottom: clamp(0.55rem, 1.6vh, 0.9rem);
}

.ro-facts {
  font-size: clamp(0.62rem, 1.39vh, 0.78rem);
  margin-top: clamp(0.9rem, 5.33vh, 3rem);
}

.ro-actions {
  margin-top: clamp(0.9rem, 3.5vh, 2rem);
}

.ro-hero__grid {
  gap: clamp(1.25rem, 3.5vh, 3.5rem);
}

.ro-price,
.ro-person {
  gap: clamp(0.9rem, 3vh, 2.25rem);
}

.ro-price__note + .ro-price__amount {
  margin-top: clamp(0.6rem, 1.94vh, 1.75rem);
}

/* screen padding also breathes with the window, on top of the measured chrome */
.ro-screen,
.ro-screen--hero {
  padding-top: calc(var(--ro-header-h) + clamp(0.9rem, 3.5vh, 1.75rem));
  padding-bottom: calc(var(--ro-banner-h) + clamp(0.9rem, 3.5vh, 1.75rem));
}

/* last resort: if a window is so short that even the floors overflow, drop the
   decorative extras rather than forcing the reader to scroll inside a screen */
@media (max-height: 700px) {
  .ro-facts { display: none; }
  .ro-caption { display: none; }
}

/* ============================================================
   Cool paper: the mono greys were tuned against near-black and are far too
   pale on a light background. Darken them for this theme only.
   ============================================================ */

html.ro-light .ro-num,
html.ro-light .ro-price__note,
html.ro-light .ro-caption {
  color: #5f6f77;
}

/* The consent banner body text is slate-400 (#94a3b8) from the shared partial.
   On the old cream it just passed; on cool white it measures 2.7:1 and reads
   washed out. Darken it for the light theme only. */
html.ro-light body:has(.ro-landing) .cookie-banner p,
html.ro-light body:has(.ro-landing) .cookie-banner p a {
  color: #5f6f77;
}

html.ro-light body:has(.ro-landing) .cookie-banner p a {
  color: #1a6c86;
  text-decoration: underline;
}

/* ============================================================
   Footer in the light theme.

   The footer is a shared partial with dark-theme classes: bg-slate-950/20,
   border-slate-700, text-white for the brand and slate-400 for every link.
   On light paper that is a grey wash with a white brand name on it, and the
   links measure 2.7:1. Nothing here changes the dark theme.
   ============================================================ */

html.ro-light body:has(.ro-landing) > footer {
  background-color: #ffffff;
  border-top-color: #dfe6ea;
  margin-top: 0;
  --color-muted: #5f6f77;
}

html.ro-light body:has(.ro-landing) > footer a {
  color: #5f6f77;
}

/* the brand link carries text-white in the partial: invisible on light paper */
html.ro-light body:has(.ro-landing) > footer .footer-brand > a {
  color: #0f1517;
}

html.ro-light body:has(.ro-landing) > footer a:hover {
  color: #1a6c86;
}

html.ro-light body:has(.ro-landing) > footer .footer-description,
html.ro-light body:has(.ro-landing) > footer .footer-copyright {
  color: #5f6f77;
}

html.ro-light body:has(.ro-landing) > footer img {
  filter: none;
}

/* On light paper the translucent blurred header turns any text passing under it
   into a grey smudge above the fold. Make it solid instead: cleaner, and it
   stops the header edge from looking like a rendering defect. */
html.ro-light body:has(.ro-landing) .site-header.scrolled {
  background-color: #f9fafb;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: #dfe6ea;
}

/* The header relies on a .scrolled class from index.js to gain a background.
   On the snapped landing page that class did not update, so the header stayed
   transparent and any text passing under it smudged. The landing is a stack of
   full screens, so the header always sits over content: give it a solid
   background unconditionally and stop depending on the class. The colour is
   the page colour, so it reads as no seam at all until a hairline is wanted. */
html.ro-light body:has(.ro-landing) .site-header,
html.ro-light body:has(.ro-landing) .site-header.scrolled {
  background-color: #f9fafb;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: none;
}

/* The mono fact row under the hero measured 2.43:1 in light: it was inheriting
   the pale grey meant for large numbers. Small text needs the darker muted. */
html.ro-light .ro-facts,
html.ro-light .ro-facts span {
  color: #5f6f77;
}
