/* QubiQ Digital — company site v2
   One typeface (Public Sans), brand teal from the logo, white paper.
   Specificity kept flat: one class per rule wherever possible. */

:root {
  --paper: #ffffff;
  --mist: #f2f7f6;
  --ink: #182a2e;
  --ink-2: #51666a;
  --teal: #1d807b;
  --teal-2: #4abab6;
  --teal-soft: #dff0ee;
  --line: #d6e2e0;
  --todo: #b7791f;

  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 62ch;
  --wrap: 1120px;
  --gutter: 20px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "tnum" 1;
}

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.4rem); font-weight: 700; max-width: 18ch; }
h2 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.25rem); font-weight: 700; max-width: 24ch; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; max-width: var(--measure); }
p + p { margin-top: 0.8em; }
a { color: var(--teal); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }

:focus-visible { outline: 3px solid var(--teal-2); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.lede { color: var(--ink-2); font-size: 1.1rem; }
.muted { color: var(--ink-2); }

/* Placeholders the owner still needs to fill in */
.todo {
  color: var(--todo);
  border: 1px dashed var(--todo);
  border-radius: 3px;
  padding: 0 0.3em;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.7em 1.2em;
  border: 1.5px solid var(--teal);
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #166662; border-color: #166662; color: #fff; }
.btn-quiet { background: transparent; color: var(--teal); }
.btn-quiet:hover { background: var(--teal-soft); color: var(--teal); border-color: var(--teal); }

/* Header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.logo svg { height: 30px; width: auto; display: block; }
.logo .cls-1 { fill: var(--ink); }
.logo .cls-2 { fill: var(--teal-2); }
.logo .cls-3 { fill: var(--teal); }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-nav a:hover { color: var(--teal); }
.site-nav .btn { padding: 0.5em 0.95em; font-size: 0.9rem; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45em 0.7em;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

/* Sections */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-mist { background: var(--mist); }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { margin-top: 12px; }

/* Hero */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 64px); }
.hero .lede { margin-top: 20px; }
.doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: clamp(32px, 4vw, 56px);
}
.door {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: var(--radius);
  background: var(--paper);
}
.door h2 { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; }
.door-icon { width: 56px; height: 56px; margin: -6px 0 -6px -8px; flex: none; }
.door p { flex: 1; color: var(--ink-2); }
.door .btn { align-self: flex-start; }
.door small { color: var(--ink-2); font-size: 0.85rem; }

/* Hero with an image behind the text (index-images.html) */
.hero-photo { position: relative; color: #fff; overflow: hidden; isolation: isolate; }
.hero-photo .wrap { position: relative; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background: var(--ink); }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; display: block; }
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(24, 42, 46, 0.9) 0%, rgba(24, 42, 46, 0.74) 45%, rgba(29, 128, 123, 0.5) 100%);
}
.hero-photo h1 { color: #fff; }
.hero-photo .lede { color: rgba(255, 255, 255, 0.86); }
.hero-photo .door { color: var(--ink); border-color: transparent; border-top-color: var(--teal-2); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); }
.hero-photo .door h2 { color: var(--ink); }
.hero-photo .door p, .hero-photo .door small { color: var(--ink-2); }
.hero-photo .facts { border-top-color: rgba(255, 255, 255, 0.28); }
.hero-photo .fact b { color: #fff; }
.hero-photo .fact span { color: rgba(255, 255, 255, 0.78); }

/* Animated variant (index-animated.html): canvas network over a dark teal gradient */
.hero-animated .hero-bg {
  background: linear-gradient(110deg, #16262a 0%, #1a3a3c 55%, #1d6f6b 100%);
}
.hero-animated .hero-bg::after {
  background: radial-gradient(ellipse at 20% 30%, rgba(24, 42, 46, 0.55) 0%, rgba(24, 42, 46, 0) 60%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Light variant: pattern image behind dark text (use with assets/hero-hex.webp) */
.hero-light { position: relative; overflow: hidden; isolation: isolate; }
.hero-light .wrap { position: relative; }
.hero-light .hero-bg { position: absolute; inset: 0; z-index: -1; background: var(--paper); }
.hero-light .hero-bg img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.9; }
.hero-light .hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.55) 60%, rgba(255, 255, 255, 0.2) 100%);
}

/* Facts row */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.fact b { display: block; font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.fact span { color: var(--ink-2); font-size: 0.95rem; }

/* Lead record — the one visual the page is built around */
.record-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.record {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
  overflow: hidden;
}
.record-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 20px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
}
.record-top b { font-weight: 600; }
.record-top .status { color: var(--teal-2); font-weight: 600; }
.record-rows { margin: 0; padding: 6px 0; }
.record-row {
  display: grid;
  grid-template-columns: 24px 150px 1fr;
  gap: 12px;
  align-items: start;
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.record-row:first-child { border-top: 0; }
.record-row dt { color: var(--ink-2); font-weight: 500; }
.record-row dd { margin: 0; overflow-wrap: anywhere; }
.record-row .check {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--teal-2);
  color: var(--teal);
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.record-row .check::before { content: "✓"; }
.record-row .check.pending { border-color: var(--line); color: transparent; }
.record-row .check.flag { border-color: var(--todo); color: var(--todo); }
.record-row .check.flag::before { content: "!"; }
.record-row q { font-style: italic; }
.record-foot { padding: 12px 20px; background: var(--mist); color: var(--ink-2); font-size: 0.85rem; }

/* Reveal: rows check in once, when the record scrolls into view */
.record.animate .record-row { opacity: 0; transform: translateY(4px); }
.record.animate.in .record-row {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transition-delay: calc(var(--i) * 90ms);
}
@media (prefers-reduced-motion: reduce) {
  .record.animate .record-row { opacity: 1; transform: none; transition: none; }
}

.record-notes { display: grid; gap: 22px; }
.record-notes h3 { margin-bottom: 4px; }
.record-notes p { font-size: 1rem; color: var(--ink-2); }

/* Two-column prose blocks */
.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
}
.col h3 { margin-bottom: 8px; }
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #155f5b;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.col p, .col li { font-size: 1rem; color: var(--ink-2); }
.col ul { display: grid; gap: 6px; }
.col li { padding-left: 16px; position: relative; }
.col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-2);
}

/* Verticals strip */
.verticals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.verticals li {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 500;
  font-size: 0.95rem;
}

/* Markets */
.markets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.market { background: var(--paper); padding: 22px 20px; }
.market b { display: flex; align-items: center; font-size: 1.15rem; font-weight: 600; }
.market .flag { width: 27px; height: 18px; flex: none; margin-right: 10px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(24, 42, 46, 0.12); }
.market .code { color: var(--ink-2); font-size: 0.85rem; margin-left: 6px; font-weight: 400; }
.market p { margin-top: 6px; font-size: 0.95rem; color: var(--ink-2); }
.market-note { margin-top: 16px; font-size: 0.95rem; }

/* Compliance */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.95rem;
}
.trust li::before { content: "✓ "; color: var(--teal); font-weight: 700; }

/* Publishers */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.split .btn { margin-top: 24px; }
.split ul { display: grid; gap: 10px; }
.split li { padding-left: 18px; position: relative; color: var(--ink-2); font-size: 1rem; }
.split li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-2);
}

/* Contact form */
.form { display: grid; gap: 18px; max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: 0.95rem; }
.field input, .field textarea, .field select {
  font: inherit;
  padding: 0.65em 0.8em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--teal-soft); }
.field textarea { min-height: 120px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.checks input { accent-color: var(--teal); width: 16px; height: 16px; }
.form-foot { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.form-foot p { font-size: 0.95rem; color: var(--ink-2); }
.form-note { margin-top: 10px; min-height: 1.4em; font-size: 0.95rem; }
.form .hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; } /* honeypot, never shown */
.form { position: relative; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.form-note.ok { color: var(--teal); }
.form-note.err { color: #a33a2a; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 40px; font-size: 0.9rem; color: var(--ink-2); }
.site-foot .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: start; }
.site-foot p { max-width: none; }
.site-foot .links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot a { color: var(--ink-2); }
.site-foot a:hover { color: var(--teal); }

/* Legal pages */
.legal { padding-block: clamp(40px, 6vw, 72px); }
.legal h1 { margin-bottom: 24px; }
.legal-body { max-width: 72ch; font-size: 1rem; }
.legal-body h2, .legal-body h3 { margin: 1.6em 0 0.5em; max-width: none; }
.legal-body p, .legal-body li { max-width: none; margin-bottom: 0.8em; color: var(--ink); }
.legal-body ul, .legal-body ol { padding-left: 1.3em; list-style: revert; }
/* Section numbering, same scheme as the shared legals stylesheet on st.formulead.com */
.legal-body { counter-reset: h2counter; }
.legal-body h5 { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.02em; margin: 2em 0 0.6em; }
.legal-body h5::before { content: counter(h2counter) ".\00a0\00a0"; counter-increment: h2counter; }
.legal-body hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.legal-body .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.legal-body table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.legal-body td, .legal-body th { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }

/* Responsive */
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr 1fr; }
  .markets { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .record-grid, .split { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .doors, .cols, .form-row { grid-template-columns: 1fr; }
  .record-row { grid-template-columns: 24px 1fr; }
  .record-row dd { grid-column: 2; }
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; }
  .site-nav .btn { margin-top: 8px; text-align: center; }
  .site-foot .wrap { grid-template-columns: 1fr; }
}
