/*
 * TapLenx Marketing UI v2
 * Single-source presentation layer for the marketing site.
 * Replaces the legacy style/rebuild/premium/hotfix cascade on migrated pages.
 */

:root {
  --brand: #1267e8;
  --brand-hover: #0e55c2;
  --brand-soft: #eaf3ff;
  --brand-pale: #f5f9ff;
  --navy: #071b33;
  --navy-2: #0b2a4d;
  --text: #0d2039;
  --text-muted: #52647a;
  --text-on-dark: #cbd5e1;
  --accent-on-dark: #93c5fd;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --surface-selected: #eaf3ff;
  --border: #dce5ef;
  --border-strong: #c8d7e8;
  --success: #14804a;
  --danger: #c53030;
  --warning: #9a6700;
  --shadow-xs: 0 2px 8px rgba(7, 27, 51, .05);
  --shadow-sm: 0 10px 30px rgba(7, 27, 51, .07);
  --shadow-md: 0 20px 55px rgba(7, 27, 51, .10);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shell: min(1200px, calc(100vw - 48px));
  --header-h: 74px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--surface); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--surface);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; color: inherit; text-wrap: balance; }

.rb-shell, .shell { width: var(--shell); margin-inline: auto; }
.rb-page { padding-top: var(--header-h); overflow: clip; }
.light-section, .rb-section.white { background: var(--surface); color: var(--text); }
.rb-section.soft { background: var(--surface-soft); color: var(--text); }
.rb-section.navy, .dark-section { background: var(--navy); color: #fff; }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 0 max(28px, calc((100vw - 1200px) / 2));
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(220, 229, 239, .9);
  backdrop-filter: blur(18px);
  transition: height .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.site-header.scrolled {
  height: 66px;
  background: rgba(255, 255, 255, .985);
  box-shadow: var(--shadow-xs);
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 7px;
  min-height: 44px;
}
.brand-main {
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .04em;
}
.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(18, 103, 232, .10);
}
.desktop-nav { display: flex; align-items: center; justify-content: center; gap: 34px; }
.desktop-nav a {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #40546d;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s var(--ease);
}
.desktop-nav a:hover, .desktop-nav a.nav-active { color: var(--brand); }
.desktop-nav a.nav-active::after { transform: scaleX(1); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span { width: 18px; height: 2px; border-radius: 999px; background: var(--navy); }
.mobile-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 999;
  padding: 14px 20px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.mobile-panel.open { display: grid; }
.mobile-panel a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 14px;
  color: var(--text);
  font-weight: 650;
  border-radius: 10px;
}
.mobile-panel a.nav-active { color: var(--brand); background: var(--surface-selected); }

/* Buttons */
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--brand); border-color: var(--brand); box-shadow: 0 9px 22px rgba(18, 103, 232, .16); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); box-shadow: 0 12px 26px rgba(18, 103, 232, .22); }
.btn-ghost { color: var(--navy); background: #fff; border-color: var(--border-strong); }
.btn-ghost:hover { border-color: #9db6d2; background: var(--brand-pale); }
.btn-small { min-height: 46px; padding-inline: 20px; }

/* Typography roles */
.rb-kicker {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.rb-title {
  max-width: 900px;
  color: var(--navy);
  font-size: clamp(48px, 4.8vw, 64px);
  line-height: 1.07;
  font-weight: 760;
  letter-spacing: -.045em;
}
.rb-title span, .rb-section-title span { color: var(--brand); }
.rb-section-title {
  max-width: 760px;
  color: var(--navy);
  font-size: clamp(36px, 3.5vw, 44px);
  line-height: 1.14;
  font-weight: 740;
  letter-spacing: -.035em;
}
.rb-section.navy .rb-section-title { color: #fff; }
.rb-section.navy .rb-section-title span { color: var(--accent-on-dark); }
.rb-lead {
  max-width: 680px;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
}
.rb-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .65fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 36px;
}
.rb-head h2 {
  max-width: 760px;
  color: var(--navy);
  font-size: clamp(36px, 3.5vw, 44px);
  line-height: 1.14;
  font-weight: 740;
  letter-spacing: -.035em;
}
.rb-head > p { max-width: 520px; color: var(--text-muted); font-size: 16px; line-height: 1.7; }
.rb-section.navy .rb-head h2 { color: #fff; }
.rb-section.navy .rb-head > p { color: var(--text-on-dark); }
.rb-section.navy .rb-kicker, .rb-hero.dark .rb-kicker { color: var(--accent-on-dark); }

/* Hero */
.rb-home-hero, .rb-hero { padding: 80px 0 84px; }
.rb-home-hero, .rb-hero.dark {
  background: radial-gradient(circle at 82% 20%, rgba(57, 139, 255, .17), transparent 28%), linear-gradient(145deg, var(--navy), var(--navy-2));
  color: #fff;
}
.rb-home-hero .rb-title, .rb-hero.dark .rb-title { color: #fff; }
.rb-home-hero .rb-lead, .rb-hero.dark .rb-lead { color: var(--text-on-dark); }
.rb-home-hero .rb-title span, .rb-hero.dark .rb-title span { color: #65a8ff; }
.rb-hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.rb-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.rb-chip-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.rb-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid rgba(147, 197, 253, .32); border-radius: 999px; background: rgba(255, 255, 255, .05); color: #e5eef9; font-size: 12px; font-weight: 700; }
.rb-stage { position: relative; min-width: 0; min-height: 500px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-xl); background: linear-gradient(145deg, #fff, #edf5fd); box-shadow: var(--shadow-md); }
.rb-stage.dark { border-color: rgba(147, 197, 253, .18); background: rgba(5, 23, 42, .50); }
.rb-stage img { position: static; width: min(82%, 520px); height: auto; max-height: 450px; padding: 0; object-fit: contain; object-position: center; }
.pd-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 20px; color: var(--accent-on-dark); font-size: 13px; font-weight: 700; }

/* Sections and cards */
.rb-section { padding: 84px 0; }
.rb-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.rb-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.rb-grid-4, .rb-principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.rb-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.rb-card { min-width: 0; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.rb-card .num { width: 34px; height: 34px; display: inline-grid; place-items: center; margin-bottom: 28px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 800; }
.rb-card h3 { margin-bottom: 9px; color: var(--navy); font-size: 21px; line-height: 1.25; letter-spacing: -.02em; }
.rb-card p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.rb-photo { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; }
.rb-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; }
.rb-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rb-pair figure { margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; }
.rb-pair img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; }
.rb-pair figcaption { padding: 13px 16px; color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .12em; }

/* Product previews */
.rb-home-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.rb-mini-product { min-width: 0; display: block; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-xs); transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease); }
a.rb-mini-product:hover { transform: translateY(-3px); border-color: #b9cce2; box-shadow: var(--shadow-sm); }
.rb-mini-product img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; background: var(--surface-soft); }
.rb-mini-product > div { padding: 16px 18px 18px; }
.rb-mini-product strong { display: block; color: var(--navy); font-size: 20px; line-height: 1.25; }
.rb-mini-product small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 13px; }

/* Catalog */
.catalog-page { background: var(--surface); }
.catalog-hero { padding: 82px 0 72px; background: linear-gradient(180deg, #fff 0%, var(--surface-soft) 100%); }
.catalog-hero-grid { width: var(--shell); margin-inline: auto; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.catalog-hero-copy h1 { color: var(--navy); font-size: clamp(50px, 4.2vw, 56px); line-height: 1.08; letter-spacing: -.04em; }
.catalog-hero-copy h1 span { color: var(--brand); }
.catalog-lead { max-width: 620px; margin-top: 20px; color: var(--text-muted); font-size: 17px; line-height: 1.7; }
.catalog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.catalog-hero-art { min-height: 500px; display: grid; place-items: center; padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow-sm); }
.catalog-hero-art img { max-height: 420px; width: auto; object-fit: contain; }
.catalog-art-note { margin-top: 16px; color: var(--text-muted); font-size: 12px; font-weight: 750; letter-spacing: .10em; }
.catalog-products { padding: 84px 0; background: #fff; }
.product-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.product-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-xs); }
.product-card.product-featured { grid-column: auto; }
.product-visual { position: relative; min-width: 0; display: grid; place-items: center; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-soft); }
.product-visual img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.product-chip, .product-index { position: absolute; top: 14px; z-index: 2; display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.product-chip { left: 14px; color: #fff; background: var(--brand); }
.product-index { right: 14px; color: var(--brand); background: rgba(255,255,255,.94); }
.product-info { flex: 1; display: flex; flex-direction: column; padding: 22px; }
.product-category { margin-bottom: 6px; color: var(--brand); font-size: 12px; line-height: 1.4; font-weight: 800; letter-spacing: .10em; text-transform: uppercase; }
.product-info h2 { color: var(--navy); font-size: 25px; line-height: 1.18; letter-spacing: -.025em; }
.product-info > p { margin-top: 10px; color: var(--text-muted); font-size: 14px; line-height: 1.65; }
.product-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: auto; padding-top: 16px; color: var(--brand); font-size: 14px; font-weight: 750; }

/* Technology and use cases */
.rb-tech-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.rb-tech { padding: 30px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.rb-tech .icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 26px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-weight: 850; }
.rb-tech h3 { margin-bottom: 10px; color: var(--navy); font-size: 26px; line-height: 1.2; }
.rb-tech p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.rb-tech ul { list-style: none; padding: 0; margin: 20px 0 0; }
.rb-tech li { padding: 11px 0; border-top: 1px solid var(--border); color: var(--text); font-size: 14px; }
.rb-targets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rb-target { padding: 22px; border: 1px solid rgba(147, 197, 253, .18); border-radius: var(--radius-md); background: rgba(255,255,255,.05); }
.rb-target b { display: block; margin-bottom: 10px; color: var(--accent-on-dark); font-size: 11px; letter-spacing: .08em; }
.rb-target strong { color: #fff; font-size: 19px; line-height: 1.3; }
.usecase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.usecase-card { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.usecase-card > span { display: block; margin-bottom: 28px; color: var(--brand); font-size: 12px; font-weight: 800; }
.usecase-card h3 { margin-bottom: 10px; color: var(--navy); font-size: 21px; }
.usecase-card p { color: var(--text-muted); font-size: 15px; line-height: 1.65; }
.usecase-card p strong { color: var(--navy); font-weight: 700; }

/* Brand pairs */
.rb-brand-pairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.rb-brand-pair { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.rb-brand-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.rb-brand-images img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; background: var(--surface-soft); }
.rb-brand-copy { padding: 20px; }
.rb-brand-copy h3 { color: var(--navy); font-size: 19px; line-height: 1.25; }
.rb-brand-copy p { margin-top: 7px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* CTA */
.rb-cta { padding: 58px 0; background: var(--brand); color: #fff; }
.rb-cta-grid { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.rb-cta-grid > div { min-width: 0; max-width: 760px; }
.rb-cta h2 { color: #fff; font-size: clamp(36px, 3.5vw, 44px); line-height: 1.12; letter-spacing: -.035em; }
.rb-cta p { margin-top: 10px; color: #eaf3ff; font-size: 16px; }
.rb-cta .btn { flex: 0 0 auto; min-width: 156px; background: #fff; color: var(--brand); border-color: #fff; }

/* Quote form */
.rb-quote-hero { padding: 64px 0 58px; background: linear-gradient(180deg, #fff 0%, var(--surface-soft) 100%); }
.rb-quote-intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .7fr); gap: 48px; align-items: end; }
.rb-quote-intro h1 { max-width: 720px; color: var(--navy); font-size: clamp(44px, 4vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.rb-quote-intro h1 span { color: var(--brand); }
.rb-quote-intro > div > p:not(.rb-kicker) { color: var(--text-muted); font-size: 16px; line-height: 1.7; }
.qt-form-section { padding: 64px 0 96px; background: var(--surface-soft); }
.qt-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 36px; align-items: start; }
.qt-aside { position: sticky; top: 98px; min-width: 0; }
.qt-aside > h2 { color: var(--navy); font-size: 27px; line-height: 1.18; letter-spacing: -.025em; }
.qt-aside > p { margin-top: 14px; color: var(--text-muted); font-size: 15px; line-height: 1.65; }
.qt-summary, .qt-assurance, .qt-form { border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.qt-summary { margin-top: 24px; overflow: hidden; }
.qt-summary > div { display: grid; gap: 4px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.qt-summary > div:last-child { border-bottom: 0; }
.qt-summary span { color: #687a90; font-size: 12px; line-height: 1.3; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.qt-summary strong { color: var(--navy); font-size: 14px; line-height: 1.45; font-weight: 650; overflow-wrap: anywhere; }
.qt-assurance { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: center; margin-top: 18px; padding: 16px; }
.qt-assurance > span { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid #bad3ef; border-radius: 12px; color: var(--brand); font-size: 18px; font-weight: 850; }
.qt-assurance strong { color: var(--navy); font-size: 14px; }
.qt-assurance p { margin-top: 3px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.qt-form { min-width: 0; padding: 34px 36px 38px; }
.qt-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.qt-form-head > div { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: center; }
.qt-form-head > div > span { grid-row: 1 / span 2; color: var(--brand); font-size: 18px; font-weight: 850; }
.qt-form-head p { color: var(--brand); font-size: 11px; line-height: 1.3; font-weight: 800; letter-spacing: .13em; }
.qt-form-head h2 { color: var(--navy); font-size: 27px; line-height: 1.2; letter-spacing: -.025em; }
.qt-form-head > small { color: var(--text-muted); font-size: 12px; }
.qt-divider { height: 1px; margin: 34px 0; background: var(--border); }
.qt-fields { display: grid; gap: 18px; margin-top: 24px; }
.qt-fields.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qt-span-2 { grid-column: 1 / -1; }
.qt-field { min-width: 0; display: grid; gap: 7px; }
.qt-field > span, .qt-choice-group legend, .qt-check-group legend { color: var(--navy); font-size: 14px; font-weight: 700; }
.qt-field > small { color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.qt-field input, .qt-field select, .qt-field textarea { width: 100%; min-width: 0; min-height: 50px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); outline: 0; background: #fff; color: var(--text); font-size: 16px; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease); }
.qt-field textarea { min-height: 140px; padding-block: 13px; resize: vertical; line-height: 1.55; }
.qt-field input:focus, .qt-field select:focus, .qt-field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18,103,232,.10); }
.qt-choice-group, .qt-check-group { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; }
.qt-choice-group legend, .qt-check-group legend { margin-bottom: 10px; }
.qt-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qt-choice { position: relative; min-width: 0; cursor: pointer; }
.qt-choice input { position: absolute; opacity: 0; pointer-events: none; }
.qt-choice > span { min-height: 92px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease); }
.qt-choice b { color: var(--navy); font-size: 14px; line-height: 1.3; font-weight: 700; }
.qt-choice small { color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.qt-choice input:checked + span { border-color: var(--brand); background: var(--surface-selected); box-shadow: inset 0 0 0 1px var(--brand); }
.qt-choice input:focus-visible + span { outline: 3px solid rgba(18,103,232,.16); outline-offset: 2px; }
.qt-gap-top { margin-top: 20px; }
.qt-color-layout { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 20px; align-items: end; }
.qt-choice-colors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.color-choice > span { min-height: 74px; align-items: center; padding: 10px; text-align: center; }
.color-choice i { width: 22px; height: 22px; display: block; border: 1px solid rgba(7,27,51,.14); border-radius: 50%; background: var(--swatch); }
.multi-swatch { background: conic-gradient(#1267e8, #d71920, #e9d7bf, #111827, #1267e8) !important; }
.qt-qty { align-self: end; }
.qt-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qt-check-grid label { min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; color: var(--navy); font-size: 14px; font-weight: 650; cursor: pointer; transition: border-color .18s var(--ease), background .18s var(--ease); }
.qt-check-grid input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.qt-check-grid label:has(input:checked) { border-color: var(--brand); background: var(--surface-selected); }
.qt-upload { min-height: 152px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; padding: 22px; border: 1px dashed #a9bfd8; border-radius: var(--radius-md); background: var(--brand-pale); text-align: center; cursor: pointer; }
.qt-upload input { position: absolute; opacity: 0; pointer-events: none; }
.qt-upload-icon { color: var(--brand); font-size: 26px; line-height: 1; }
.qt-upload strong { color: var(--navy); font-size: 15px; }
.qt-upload small { color: var(--text-muted); font-size: 13px; }
.qt-upload em { margin-top: 3px; color: var(--brand); font-size: 13px; font-style: normal; font-weight: 700; }
.qt-submit-row { display: flex; align-items: center; gap: 16px; margin-top: 24px; }
.qt-submit { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 24px; border: 1px solid var(--brand); border-radius: var(--radius-sm); background: var(--brand); color: #fff; font-size: 16px; font-weight: 750; cursor: pointer; }
.qt-submit:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.qt-submit-row > p { color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.qt-status { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; }
.qt-status-ready { padding: 0; background: transparent; color: var(--text-muted); }
.qt-status-ready .qt-status-title { display: none; }
.qt-status-error { background: #fff1f1; color: var(--danger); border: 1px solid #f3c0c0; }
.qt-status-success { background: #edf9f2; color: var(--success); border: 1px solid #b9e4ca; }
.hp-field { position: absolute !important; left: -99999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

/* Product detail */
.product-detail-page .rb-page { padding-top: var(--header-h); }
.product-detail-page .rb-hero { padding-top: 70px; }
.product-detail-page .rb-stage img { width: min(80%, 500px); max-height: 480px; }

/* Legal */
.legal-content { min-height: calc(100vh - var(--header-h)); padding: 80px 0; }
.legal-content h1 { color: var(--navy); font-size: clamp(40px, 4vw, 54px); line-height: 1.1; }
.legal-content p { max-width: 780px; margin-top: 20px; color: var(--text-muted); }

/* Footer */
.footer { padding: 58px 0 28px; background: var(--navy); color: var(--text-on-dark); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer .brand-main { color: #fff; font-size: 24px; }
.footer-brand p { margin-top: 10px; color: #9fb0c3; font-size: 14px; }
.footer h4 { margin-bottom: 12px; color: #fff; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.footer a { display: block; width: fit-content; min-height: 34px; color: #c6d5e5; font-size: 14px; }
.footer a:hover { color: var(--accent-on-dark); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.10); color: #8295aa; font-size: 12px; }

/* Motion: content remains visible even if JS fails */
.reveal { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .site-header { padding-inline: 24px; }
  .desktop-nav { gap: 22px; }
  .rb-hero-grid, .catalog-hero-grid { gap: 40px; }
  .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rb-home-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rb-targets, .rb-grid-4, .rb-principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qt-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 30px; }
}

@media (max-width: 960px) {
  :root { --shell: min(100% - 40px, 760px); }
  .site-header { grid-template-columns: 1fr auto; }
  .desktop-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-actions .btn { display: none; }
  .rb-hero-grid, .catalog-hero-grid, .rb-quote-intro, .rb-head { grid-template-columns: 1fr; }
  .rb-head { gap: 18px; align-items: start; }
  .rb-head > p { max-width: 680px; }
  .rb-stage, .catalog-hero-art { min-height: 430px; }
  .rb-grid-3, .rb-steps, .usecase-grid, .rb-brand-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rb-cta-grid { align-items: flex-start; }
  .qt-layout { grid-template-columns: 1fr; }
  .qt-aside { position: static; }
  .qt-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qt-summary > div:nth-child(odd) { border-right: 1px solid var(--border); }
}

@media (max-width: 700px) {
  :root { --shell: calc(100% - 40px); }
  .rb-page { padding-top: var(--header-h); }
  .rb-home-hero, .rb-hero, .catalog-hero { padding: 56px 0; }
  .rb-section { padding: 52px 0; }
  .rb-title { font-size: clamp(36px, 10.5vw, 42px); line-height: 1.08; }
  .rb-section-title { font-size: clamp(28px, 8vw, 32px); }
  .catalog-hero-copy h1 { font-size: clamp(36px, 10.5vw, 42px); }
  .rb-head h2 { font-size: clamp(28px, 8vw, 32px); }
  .rb-lead, .catalog-lead { font-size: 16px; }
  .rb-stage, .catalog-hero-art { min-height: 350px; }
  .rb-stage img { width: min(86%, 420px); max-height: 330px; }
  .rb-grid-2, .rb-grid-3, .rb-grid-4, .rb-principles, .rb-steps, .rb-tech-split, .usecase-grid, .rb-brand-pairs, .product-list { grid-template-columns: 1fr; }
  .rb-home-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .rb-mini-product > div { padding: 13px 14px 15px; }
  .rb-mini-product strong { font-size: 16px; }
  .rb-targets { grid-template-columns: 1fr 1fr; }
  .rb-cta { padding: 48px 0; }
  .rb-cta-grid { flex-direction: column; }
  .rb-cta h2 { font-size: 32px; }
  .rb-cta .btn { width: 100%; min-height: 50px; }
  .rb-quote-hero { padding: 48px 0 42px; }
  .rb-quote-intro h1 { font-size: 38px; }
  .qt-form-section { padding: 44px 0 70px; }
  .qt-form { padding: 24px 20px 28px; }
  .qt-fields.two-col, .qt-choice-grid, .qt-check-grid, .qt-color-layout { grid-template-columns: 1fr; }
  .qt-choice-colors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qt-summary { grid-template-columns: 1fr; }
  .qt-summary > div:nth-child(odd) { border-right: 0; }
  .qt-submit-row { align-items: stretch; flex-direction: column; }
  .qt-submit { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 24px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  :root { --shell: calc(100% - 32px); }
  .site-header { padding-inline: 16px; }
  .brand-main { font-size: 20px; }
  .rb-home-products { grid-template-columns: 1fr; }
  .rb-targets { grid-template-columns: 1fr; }
  .rb-pair { grid-template-columns: 1fr; }
  .qt-choice-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
}
