/* Tiragena brand layer — biotech / science polish.
   Load after main.css. Uses design tokens only — no !important overrides. */

:root {
  --brand-bg-deep: #050a12;
  --brand-surface: rgba(12, 22, 38, 0.55);
  --brand-accent: #22d3ee;
  --brand-accent-strong: #06b6d4;
  --brand-violet: #8b5cf6;
  --brand-text: #e8eef7;
  --brand-muted: #94b0cc;
  --brand-line: rgba(34, 211, 238, 0.14);
  --brand-glow: rgba(34, 211, 238, 0.12);
}

/* Align with smart nav + main — single scroll offset (avoids conflicting hard-coded rem) */
html {
  scroll-padding-top: calc(
    env(safe-area-inset-top, 0px) + var(--tir-nav-h, var(--tir-nav-h-fallback, 7rem)) + 0.5rem
  );
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Header chrome is owned by main.css + theme-tokens.css (surface tokens). */

.nav-cta .btn-primary {
  box-shadow: 0 4px 22px rgba(34, 211, 238, 0.22);
}

.page-hero h1,
.hero h1 {
  letter-spacing: -0.035em;
}

.section,
.content-block {
  scroll-margin-top: calc(
    env(safe-area-inset-top, 0px) + var(--tir-nav-h, var(--tir-nav-h-fallback, 5.35rem)) + 0.25rem
  );
}

/* Single scroll root: html = the only vertical scrollport; body grows with content (no body scroll). */
html {
  height: auto;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

body {
  min-height: 100%;
  max-height: none;
  overflow-x: clip;
  overflow-y: visible !important;
}

/* Hard reset when menu is closed — prevents stuck scroll from partial class/style failure */
html:not(.tir-menu-open) body:not(.tir-menu-open) {
  position: static !important;
  top: auto !important;
  width: auto !important;
  left: auto !important;
}

@supports not (overflow: clip) {
  body {
    overflow-x: hidden;
  }
}

/* Production render-path proof (see deploy.sh → /var/www/tiragena). Injected in HTML + theme-boot.js */
.runtime-render-check {
  position: fixed;
  top: max(4px, env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  z-index: 2147483000;
  margin: 0;
  padding: 5px 10px;
  text-align: center;
  font: 700 12px/1.25 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.06em;
  color: #0f172a;
  background: linear-gradient(90deg, #5eead4, #22d3ee);
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  pointer-events: none;
}

/* Mobile QA strip (theme-boot.js) — scroll / menu / carousel verification */
.tir-mobile-verify-final {
  position: fixed;
  bottom: max(8px, env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  z-index: 2147483001;
  margin: 0 auto;
  padding: 6px 10px;
  max-width: min(100%, 40rem);
  text-align: center;
  font: 600 10px/1.35 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.03em;
  color: #ccfbf1;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(45, 212, 191, 0.4);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

html[data-theme="light"] .tir-mobile-verify-final {
  color: #0f172a;
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(13, 148, 136, 0.35);
}
