/* ==========================================================================
   qbittco design system v1.0
   Loaded AFTER the prebuilt Tailwind file. Rules here are intentionally
   unlayered so they win over Tailwind's @layer utilities at equal specificity.
   See DESIGN-SYSTEM.md for the rationale behind every value.
   ========================================================================== */

:root {
  /* Palette — sampled from logo.svg and the waves video. Nothing invented. */
  --ink:       #0B0609;  /* video ground        — page background            */
  --oxblood:   #461220;  /* logo .cls-3         — raised surface             */
  --wine:      #8C2F39;  /* logo .cls-5         — borders, rules              */
  --signal:    #B23A48;  /* logo .cls-6         — brand red, FILLS only      */
  --ember:     #CF7480;  /* tint of signal      — accent TEXT on dark        */
  --filament:  #EFD7D6;  /* video highlight     — headings                   */
  --ash:       #B9A3A5;  /* warm grey           — body text                  */
  --bone:      #EAEAEA;  /* logo .cls-7         — text on light surfaces     */

  --surface-1: var(--ink);
  --surface-2: #140A0D;
  --surface-3: var(--oxblood);

  --edge:        rgba(140, 47, 57, 0.32);
  --edge-strong: rgba(140, 47, 57, 0.55);

  --font-display: 'Michroma', ui-sans-serif, system-ui, sans-serif;
  --font-text:    'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-data:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --step:  1.5rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 68ch;
  --shell: 1180px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* .q-nav is fixed, so this is also how far every anchor jump has to
     clear. Kept as a token so the two can never drift apart. */
  --nav-h: 68px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  /* Without this an in-page target lands at y=0, underneath the fixed
     nav. Worst case is the skip link: a keyboard user activates it and
     the top of <main> is the part that ends up covered. */
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  background: var(--ink);
  color: var(--ash);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Michroma has no bold. Never let the browser fake one. */
h1, h2, h3, h4, h5, h6 { font-synthesis-weight: none; }

::selection { background: var(--signal); color: #fff; }

/* One focus treatment, everywhere, visible on every surface in the system. */
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* Visually hidden, still announced. Carries meaning that a decorative glyph
   (a + or a − in a plan list) conveys to sighted users only. */
.q-vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.q-skip {
  position: absolute;
  left: var(--gutter);
  top: -100%;
  z-index: 100;
  background: var(--signal);
  color: #fff;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-data);
  font-size: 0.8125rem;
  transition: top 0.15s var(--ease);
}
.q-skip:focus { top: 1rem; }

/* --------------------------------------------------------------------------
   Type roles
   -------------------------------------------------------------------------- */

.q-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 6.4vw, 5.5rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--filament);
  text-wrap: balance;
}

.q-h2 {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: clamp(1.625rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--filament);
  text-wrap: balance;
}

.q-h3 {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--filament);
}

/* Eyebrow — the one place besides h1/wordmark where Michroma is allowed. */
.q-eyebrow {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.625rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ember);
  display: block;
}

/* Data voice — carries real machine-readable content, never decoration. */
.q-data {
  font-family: var(--font-data);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--ember);
}

.q-lede {
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  line-height: 1.6;
  color: var(--ash);
  max-width: 46ch;
}

.q-body { color: var(--ash); max-width: var(--measure); }
.q-body strong { color: var(--filament); font-weight: 600; }

/* --------------------------------------------------------------------------
   Shell + sections
   -------------------------------------------------------------------------- */

.q-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.q-section { padding-block: clamp(3.5rem, 8vw, 6.5rem); position: relative; }
.q-section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.q-section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.q-section-head .q-eyebrow { margin-bottom: 0.875rem; }
.q-section-head .q-h2 { margin-bottom: 0.75rem; }

/* --------------------------------------------------------------------------
   Buttons
   --signal for fills (white on it = 5.85:1), --ember never used as a fill.
   -------------------------------------------------------------------------- */

.q-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease),
              color 0.16s var(--ease), transform 0.16s var(--ease);
}

.q-btn--primary { background: var(--signal); color: #fff; }
.q-btn--primary:hover { background: #C4414F; transform: translateY(-1px); }

.q-btn--ghost { background: transparent; color: var(--filament); border-color: var(--edge-strong); }
.q-btn--ghost:hover { border-color: var(--ember); background: rgba(178, 58, 72, 0.12); }

.q-btn--light { background: var(--filament); color: var(--oxblood); }
.q-btn--light:hover { background: #fff; transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.q-card {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease), background-color 0.16s var(--ease);
}
a.q-card:hover, .q-card--hover:hover {
  border-color: var(--edge-strong);
  background: #180B0F;
  transform: translateY(-2px);
}

.q-grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.q-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.q-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
/* Short metadata tiles — four across, never a 3+1 orphan row. */
.q-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); }

/* Work card — type-led. Leads with the project's real metadata, not a photo. */
.q-work { display: flex; flex-direction: column; gap: 0.625rem; height: 100%; }
.q-work-media {
  display: block;
  aspect-ratio: 16 / 10;
  margin: calc(-1 * clamp(1.25rem, 2.5vw, 1.75rem)) calc(-1 * clamp(1.25rem, 2.5vw, 1.75rem)) 0.375rem;
  background: var(--surface-3) center/cover no-repeat;
  border-bottom: 1px solid var(--edge);
}
.q-work-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
}
.q-work-meta span:last-child { color: var(--ash); }
.q-work-summary { font-size: 0.9375rem; }
.q-work-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
}
.q-work-flag {
  font-family: var(--font-data);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  border: 1px solid var(--edge-strong);
  border-radius: 2px;
  padding: 0.1875rem 0.5rem;
  white-space: nowrap;
}

.q-head-split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.q-textlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding-block: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ember);
  border-bottom: 1px solid var(--edge-strong);
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.q-textlink:hover { color: var(--filament); border-color: var(--filament); }

/* Tag / meta pills */
.q-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.q-tag {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--ash);
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: 0.1875rem 0.5rem;
}

/* --------------------------------------------------------------------------
   Readout strip — three facts in the data voice, filling the hero's base
   -------------------------------------------------------------------------- */

/* Two-column split (copy beside a panel) */
.q-split { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 900px) { .q-split { grid-template-columns: 1fr 1fr; } }

/* Code panel — syntax colours stay inside the palette's warm range rather than
   importing a generic editor theme. Classes, not inline styles, so the copy
   button's state can actually take effect. */

.q-inline {
  font-family: var(--font-data);
  font-size: 0.875em;
  color: var(--ember);
  background: rgba(178, 58, 72, 0.14);
  border-radius: 2px;
  padding: 0.1em 0.35em;
}

.q-code {
  background: #12090C;
  border: 1px solid var(--edge);
  border-radius: 3px;
  overflow: hidden;
  min-width: 0;
}
.q-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  border-bottom: 1px solid var(--edge);
  background: rgba(70, 18, 32, 0.35);
}
.q-code-file {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
}
.q-code pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  font-family: var(--font-data);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ash);
  tab-size: 2;
}
.q-code .t-kw  { color: var(--ember); }
.q-code .t-str,
.q-code .t-lit { color: #E4B7A8; }
.q-code .t-fn  { color: var(--filament); }
.q-code .t-cm  { color: #907779; font-style: italic; }

.q-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(1rem, 3vw, 2.25rem);
  border-top: 1px solid var(--edge);
  padding-top: 1rem;
}
.q-readout li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
  padding-block: 0.375rem;
}
.q-readout li b { color: var(--filament); font-weight: 500; }
.q-readout li::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--signal);
  flex-shrink: 0;
  transform: translateY(-2px);
}

/* Documentation layout */
.q-doc { display: grid; gap: clamp(2rem, 4vw, 3.5rem); padding-block: clamp(2.5rem, 6vw, 4rem); align-items: start; }
@media (min-width: 960px) { .q-doc { grid-template-columns: 13rem 1fr; } }

.q-doc-nav { position: sticky; top: 92px; }
.q-doc-nav-title {
  display: block;
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 0.875rem;
}
.q-doc-nav ol { display: grid; gap: 0.125rem; counter-reset: dn; }
.q-doc-nav li { counter-increment: dn; }
.q-doc-nav a {
  display: flex;
  gap: 0.625rem;
  padding: 0.4375rem 0.5rem 0.4375rem 0;
  font-size: 0.875rem;
  color: var(--ash);
  border-left: 1px solid var(--edge);
  padding-left: 0.875rem;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.q-doc-nav a::before {
  content: counter(dn, decimal-leading-zero);
  font-family: var(--font-data);
  font-size: 0.6875rem;
  color: var(--ember);
  opacity: 0.7;
}
.q-doc-nav a:hover { color: var(--filament); border-left-color: var(--ember); }

.q-doc-body { min-width: 0; }
.q-doc-section { margin-bottom: clamp(2.5rem, 5vw, 4rem); scroll-margin-top: 92px; }
.q-doc-section > * + * { margin-top: 1rem; }
.q-doc-section .q-h2 { margin-bottom: 0.25rem; }
.q-doc-section p { max-width: var(--measure); font-size: 0.9375rem; }
.q-doc-section a:not(.q-textlink):not(.q-btn) { color: var(--ember); border-bottom: 1px solid var(--edge-strong); }
.q-doc-section a:not(.q-textlink):not(.q-btn):hover { color: var(--filament); border-color: var(--filament); }
.q-doc-sub { margin-top: 1.75rem !important; }
.q-doc-note { font-size: 0.8125rem !important; color: var(--ash); }

.q-tier {
  display: inline-block;
  vertical-align: middle;
  font-family: var(--font-data);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  background: rgba(178, 58, 72, 0.18);
  border: 1px solid var(--edge-strong);
  border-radius: 2px;
  padding: 0.1875rem 0.4375rem;
  margin-left: 0.5rem;
  transform: translateY(-2px);
}

.q-spec { display: grid; gap: 0.5rem; margin-top: 0.875rem; font-size: 0.9375rem; }
.q-spec li { display: grid; grid-template-columns: 0.75rem 1fr; gap: 0.5rem; align-items: start; }
.q-spec li::before { content: ""; width: 4px; height: 4px; background: var(--signal); margin-top: 0.6875em; }

.q-table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--edge);
  border-radius: 3px;
  background: var(--surface-2);
}
.q-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.875rem; text-align: left; }
.q-table th {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--edge-strong);
  background: rgba(70, 18, 32, 0.35);
  white-space: nowrap;
}
.q-table td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--edge); color: var(--ash); vertical-align: top; }
.q-table tr:last-child td { border-bottom: 0; }
.q-table td code { font-family: var(--font-data); font-size: 0.8125rem; color: var(--ember); white-space: nowrap; }
.q-table abbr { text-decoration: none; color: var(--ember); cursor: help; }

/* Long-form prose (case studies, docs) */
.q-prose { max-width: var(--measure); }
.q-prose > * + * { margin-top: 1rem; }
.q-prose .q-h2, .q-prose h2 { margin-top: 2.5rem; margin-bottom: 0.25rem; }
.q-prose > :first-child { margin-top: 0; }
.q-prose ul, .q-prose ol { display: grid; gap: 0.625rem; padding-left: 1.125rem; }
.q-prose li { list-style: none; position: relative; }
.q-prose ul li::before {
  content: "";
  position: absolute;
  left: -1.125rem;
  top: 0.6875em;
  width: 5px; height: 5px;
  background: var(--signal);
}
.q-prose ol { counter-reset: q; }
.q-prose ol li { counter-increment: q; }
.q-prose ol li::before {
  content: counter(q);
  position: absolute;
  left: -1.375rem;
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--ember);
}
.q-prose a { color: var(--ember); border-bottom: 1px solid var(--edge-strong); }
.q-prose a:hover { color: var(--filament); border-color: var(--filament); }
.q-prose code { font-family: var(--font-data); font-size: 0.875em; color: var(--ember); background: rgba(178,58,72,.14); border-radius: 2px; padding: .1em .35em; }

.q-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  font-family: var(--font-data);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
  padding-block: 0.375rem;
}
.q-back:hover { color: var(--ember); }

.q-project-shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--edge);
  border-radius: 3px;
  margin-bottom: 1.25rem;
}

.q-metrics { display: grid; gap: 1rem; margin-top: 1.125rem; }
.q-metrics dt {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
}
.q-metrics dd { color: var(--filament); font-size: 1.0625rem; margin-top: 0.125rem; }

/* Before / after comparison.
   The distinction is carried by the marker and a border tint from inside the
   palette — no imported red/green semantic colours. */
.q-compare { display: flex; flex-direction: column; }
.q-compare-title {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.125rem;
}
.q-compare ul { display: grid; gap: 0.75rem; font-size: 0.9375rem; }
.q-compare li { display: grid; grid-template-columns: 1.25rem 1fr; gap: 0.5rem; align-items: start; }
.q-compare li::before { font-family: var(--font-data); line-height: 1.55; }

.q-compare--bad { border-color: rgba(140, 47, 57, 0.28); }
.q-compare--bad .q-compare-title { color: #8A7679; }
.q-compare--bad li { color: #9C8689; }
.q-compare--bad li::before { content: "\2715"; color: #8A7679; }

.q-compare--good { border-color: var(--edge-strong); background: rgba(70, 18, 32, 0.34); }
.q-compare--good .q-compare-title { color: var(--ember); }
.q-compare--good li::before { content: "\2713"; color: var(--ember); }

/* Pricing */
.q-plans { align-items: stretch; }
.q-plan { display: flex; flex-direction: column; position: relative; }
.q-plan--featured { border-color: var(--signal); background: rgba(70, 18, 32, 0.42); }
.q-plan-flag {
  position: absolute;
  top: 0; left: clamp(1.25rem, 2.5vw, 1.75rem);
  transform: translateY(-50%);
  background: var(--signal);
  color: #fff;
  font-family: var(--font-data);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 2px;
}
.q-plan-price { margin-top: 0.625rem; display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.q-plan-price b {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 400;
  color: var(--filament);
  line-height: 1;
}
.q-plan-price span { font-family: var(--font-data); font-size: 0.75rem; color: var(--ash); }
.q-plan-summary { margin-top: 0.875rem; font-size: 0.9375rem; }
.q-plan-list { display: grid; gap: 0.625rem; margin: 1.5rem 0; font-size: 0.875rem; }
.q-plan-list li { display: grid; grid-template-columns: 1.125rem 1fr; gap: 0.5rem; align-items: start; }
.q-plan-mark { font-family: var(--font-data); line-height: 1.6; }
.q-plan-list .is-in .q-plan-mark { color: var(--ember); }
.q-plan-list .is-out { color: #8A7679; }
.q-plan-list .is-out .q-plan-mark { color: #8A7679; }
.q-plan-cta { margin-top: auto; width: 100%; }

.q-faq { display: grid; gap: 0; }
.q-faq > div { padding-block: 1.375rem; border-bottom: 1px solid var(--edge); }
.q-faq > div:first-child { padding-top: 0; }
.q-faq dt { font-weight: 600; color: var(--filament); margin-bottom: 0.4375rem; }
.q-faq dd { font-size: 0.9375rem; color: var(--ash); max-width: 62ch; }

/* Forms */
.q-form { display: grid; gap: 1.125rem; }
.q-field { display: grid; gap: 0.4375rem; }
.q-field-row { display: grid; gap: 1.125rem; }
@media (min-width: 560px) { .q-field-row { grid-template-columns: 1fr 1fr; } }
.q-field label {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
}
.q-optional { color: var(--ash); text-transform: none; letter-spacing: 0.02em; font-size: 0.6875rem; opacity: 0.85; }
.q-field input,
.q-field select,
.q-field textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: 0.6875rem 0.875rem;
  font-family: var(--font-text);
  font-size: 0.9375rem;
  color: var(--filament);
  transition: border-color 0.16s var(--ease);
}
.q-field textarea { min-height: 8rem; resize: vertical; line-height: 1.6; }
.q-field input:hover, .q-field select:hover, .q-field textarea:hover { border-color: var(--edge-strong); }
.q-field ::placeholder { color: #8A7679; }
.q-form-note { font-size: 0.8125rem; color: var(--ash); }

.q-contact-list { display: grid; gap: 1.125rem; margin-top: 1.25rem; }
.q-contact-list li { display: grid; gap: 0.25rem; }
.q-contact-label {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
}
.q-contact-list a { color: var(--filament); border-bottom: 1px solid var(--edge); }
.q-contact-list a:hover { color: var(--ember); border-color: var(--ember); }

/* Person card */
.q-person { display: flex; flex-direction: column; gap: 0.375rem; }
.q-person-photo {
  display: block;
  aspect-ratio: 4 / 5;
  margin: calc(-1 * clamp(1.25rem, 2.5vw, 1.75rem)) calc(-1 * clamp(1.25rem, 2.5vw, 1.75rem)) 1rem;
  background: var(--surface-3) center 20%/cover no-repeat;
  border-bottom: 1px solid var(--edge);
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.3s var(--ease);
}
.q-person:hover .q-person-photo { filter: none; }
.q-person-role {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
}
.q-person-bio { font-size: 0.9375rem; margin-top: 0.375rem; }
.q-person-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-top: auto; padding-top: 1rem; }
.q-person-links a { font-size: 0.8125rem; color: var(--ash); border-bottom: 1px solid var(--edge); }
.q-person-links a:hover { color: var(--ember); border-color: var(--ember); }

/* Panel — raised block used beside body copy */
.q-panel {
  background: var(--surface-2);
  border: 1px solid var(--edge);
  border-radius: 3px;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.q-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--edge);
}
.q-stats dt {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 0.375rem;
}
.q-stats dd {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
  color: var(--ember);
}

.q-principles { display: grid; gap: 1.125rem; margin-top: 1.5rem; }
.q-principles li { display: grid; gap: 0.25rem; }
.q-principle-label {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
}
.q-principle-body { font-size: 0.9375rem; color: var(--ash); }

/* Closing CTA */
.q-cta { background: var(--surface-3); border-block: 1px solid var(--edge); }
.q-cta-inner { text-align: center; max-width: 46rem; margin-inline: auto; }
.q-cta-inner .q-lede { margin-top: 1rem; }
.q-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
  margin-top: 2rem;
}

.q-social { display: flex; flex-wrap: wrap; gap: 0.375rem 1rem; padding-top: 0.375rem; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.q-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(38rem, 92vh, 54rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
}

.q-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--ink) center/cover no-repeat;
}
.q-hero-media canvas,
.q-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* The still is the ground. The canvas fades in over it once a WebGL context
   is actually live, so there is never an empty box and never a visible swap.
   Without WebGL — or on reduced motion, or save-data — the still is the hero. */
.q-hero-media canvas { opacity: 0; transition: opacity 0.9s var(--ease); }
.q-hero-media.is-live canvas { opacity: 1; }

/* Scrim: holds text contrast over any frame of the loop, and lets the
   waves bleed out to the section boundary rather than stopping at an edge. */
.q-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 85% at 50% 45%, rgba(11, 6, 9, 0.18) 0%, rgba(11, 6, 9, 0.70) 55%, rgba(11, 6, 9, 0.92) 100%),
    linear-gradient(to bottom, rgba(11, 6, 9, 0.85) 0%, rgba(11, 6, 9, 0.10) 28%, rgba(11, 6, 9, 0.50) 72%, var(--ink) 100%);
}

.q-hero-inner { width: 100%; padding-block: clamp(6rem, 12vh, 9rem) clamp(2rem, 5vh, 3.5rem); }

.q-hero-mark {
  width: clamp(56px, 7vw, 84px);
  height: auto;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  filter: drop-shadow(0 6px 24px rgba(11, 6, 9, 0.6));
}

.q-hero .q-display { margin-bottom: 1.25rem; }
.q-hero .q-lede { margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }

.q-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

/* Load sequence — one orchestrated moment, not scattered effects. */
.q-rise { opacity: 0; transform: translateY(14px); animation: q-rise 0.62s var(--ease) forwards; }
.q-rise-1 { animation-delay: 0.05s; }
.q-rise-2 { animation-delay: 0.14s; }
.q-rise-3 { animation-delay: 0.23s; }
.q-rise-4 { animation-delay: 0.32s; }
.q-rise-5 { animation-delay: 0.41s; }
@keyframes q-rise { to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */

.q-nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.24s var(--ease), border-color 0.24s var(--ease),
              backdrop-filter 0.24s var(--ease);
}
.q-nav.is-stuck {
  background: rgba(11, 6, 9, 0.94);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--edge);
}

.q-nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--nav-h); }

.q-brand { display: inline-flex; align-items: center; gap: 0.625rem; }
.q-brand img { width: 30px; height: 30px; display: block; }
.q-brand span {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--filament);
  letter-spacing: 0.01em;
  transition: color 0.16s var(--ease);
}
.q-brand:hover span { color: var(--ember); }

.q-nav-links { display: none; align-items: center; gap: 0.25rem; }
.q-nav-links a {
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ash);
  border-radius: 2px;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.q-nav-links a:hover { color: var(--filament); background: rgba(178, 58, 72, 0.14); }
.q-nav-links a[aria-current="page"] { color: var(--ember); }

.q-nav-cta { display: none; }

.q-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: var(--filament);
  background: transparent;
  border: 1px solid var(--edge);
  border-radius: 2px;
  cursor: pointer;
}

/* The open menu had no close affordance: the button kept showing three bars
   with nothing to say a second tap would dismiss it. aria-expanded is already
   the source of truth, so the icon hangs off that rather than a second class. */
.q-burger .q-burger-close { display: none; }
.q-burger[aria-expanded="true"] .q-burger-open { display: none; }
.q-burger[aria-expanded="true"] .q-burger-close { display: block; }

.q-mobile-menu { display: none; border-top: 1px solid var(--edge); padding-block: 0.5rem 1rem; }
.q-mobile-menu.is-open { display: block; }
.q-mobile-menu a {
  display: block;
  padding: 0.875rem 0.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ash);
  border-bottom: 1px solid rgba(140, 47, 57, 0.18);
}
.q-mobile-menu a:last-child { border-bottom: 0; }
.q-mobile-menu a[aria-current="page"] { color: var(--ember); }
.q-mobile-menu .q-btn { width: 100%; margin-top: 1rem; }

@media (min-width: 900px) {
  .q-nav-links, .q-nav-cta { display: flex; }
  .q-burger { display: none; }
  .q-mobile-menu { display: none !important; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.q-footer { background: var(--surface-2); border-top: 1px solid var(--edge); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.q-footer-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  margin-bottom: 3rem;
}
@media (min-width: 640px) { .q-footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .q-footer-grid { grid-template-columns: 1.8fr 1fr 1.2fr; } }

.q-footer-col-title {
  font-family: var(--font-data);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1rem;
}
.q-footer-col ul { display: grid; gap: 0.625rem; }
.q-footer-col a, .q-footer-col span { color: var(--ash); font-size: 0.875rem; }
.q-footer-col a:hover { color: var(--filament); }

.q-footer-base {
  border-top: 1px solid var(--edge);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--ash);
}

/* --------------------------------------------------------------------------
   Page headers (interior pages)
   -------------------------------------------------------------------------- */

.q-page-head {
  position: relative;
  padding-block: clamp(7rem, 14vh, 9.5rem) clamp(2.5rem, 6vw, 4rem);
  background: var(--ink);
  overflow: hidden;
}
.q-page-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 130% at 12% 0%, rgba(178, 58, 72, 0.16) 0%, transparent 62%);
  pointer-events: none;
}
.q-page-head > * { position: relative; z-index: 1; }
.q-page-head .q-eyebrow { margin-bottom: 1rem; }
.q-page-head .q-lede { margin-top: 1.25rem; max-width: 58ch; }

/* --------------------------------------------------------------------------
   Compatibility layer
   The interior pages still use the original Tailwind colour utilities.
   Repointing the tokens re-skins every one of them from a single place.
   -------------------------------------------------------------------------- */

:root {
  --color-qbittco-dark:    #0B0609;  /* was #3D0E15 */
  --color-qbittco-primary: #461220;  /* was #581C26 */
  --color-qbittco-light:   #CF7480;  /* was #AC565F — 3.34:1, failed AA      */
}

/* qbittco-light is now a TEXT colour, so any fill that used it must move to
   --signal or white would drop to 3.25:1 on it. */
.bg-qbittco-light { background-color: var(--signal) !important; }
.hover\:bg-qbittco-light:hover { background-color: var(--signal) !important; }

/* Light sections inherited from the old design, mapped onto the dark field. */
.bg-slate-50, .bg-white { background-color: var(--surface-2) !important; }
.bg-gray-50 { background-color: var(--surface-3) !important; }

.text-qbittco-dark { color: var(--filament) !important; }
.text-gray-900, .text-gray-800, .text-gray-700 { color: var(--ash) !important; }
.text-gray-600, .text-gray-500 { color: var(--ash) !important; }
.text-gray-400, .text-gray-300, .text-gray-200 { color: var(--ash) !important; }

.border-gray-100, .border-gray-200, .border-gray-300 { border-color: var(--edge) !important; }

/* Form controls on the new ground */
input, select, textarea {
  background: var(--surface-1) !important;
  border-color: var(--edge) !important;
  color: var(--filament) !important;
  border-radius: 2px;
  min-height: 44px;
}
input::placeholder, textarea::placeholder { color: #8A7679 !important; }
select option { background: var(--surface-2); color: var(--filament); }

/* Typography compatibility: Michroma stays on h1 and .brand-font only.
   The prebuilt sheet puts it on h2/h3/h4 as well — undo that. */
h2, h3, h4, h5, h6 { font-family: var(--font-text); }
h1, .brand-font { font-family: var(--font-display); }
h2 { font-weight: 600; letter-spacing: -0.02em; color: var(--filament); }
h3, h4 { font-weight: 600; letter-spacing: -0.01em; color: var(--filament); }
code, pre, .font-mono { font-family: var(--font-data); }

/* --------------------------------------------------------------------------
   Word-mask reveal

   Applied by motion.js only, and only once GSAP is confirmed loaded. The
   padding/margin pair keeps descenders out of the clip — "pulse" loses its
   tail otherwise.
   -------------------------------------------------------------------------- */

.q-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}
.q-mask-i { display: inline-block; }

/* --------------------------------------------------------------------------
   Vitals spine — signature

   A monitor for the page. The trace plots scroll velocity against time; the
   figure below reports position. Lives in the gutter beside the shell, so it
   only appears once there is a gutter wide enough to hold it.
   -------------------------------------------------------------------------- */

.q-vitals { display: none; }

@media (min-width: 1360px) {
  .q-vitals {
    position: fixed;
    left: clamp(1rem, 2.4vw, 2.25rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
  }
}

.q-vitals-label,
.q-vitals-pct {
  font-family: var(--font-data);
  font-size: 0.5625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ash);
  opacity: 0.45;
  transition: opacity 0.45s var(--ease);
}

.q-vitals-label { writing-mode: vertical-rl; letter-spacing: 0.34em; }

.q-vitals-trace {
  display: block;
  width: 56px;
  height: clamp(260px, 40vh, 400px);
}

.q-vitals-pct {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
}
.q-vitals-pct i { font-style: normal; color: var(--filament); }

/* Brightens while the page is actually moving. */
.q-vitals.is-hot .q-vitals-label,
.q-vitals.is-hot .q-vitals-pct { opacity: 0.92; }

/* No canvas, or reduced motion: position still reports, the trace does not run. */
.q-vitals.is-static .q-vitals-trace { display: none; }

/* Counting numbers must not reflow the panel as digits change. */
.q-stats dd { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .q-rise { opacity: 1; transform: none; }
  .q-btn:hover, a.q-card:hover, .q-card--hover:hover { transform: none; }
  .q-vitals-trace { display: none; }
}
