/* ==========================================================================
   bearhug-site — layout + sections. Tokens come from tokens.css only.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font: 400 var(--body-size)/var(--body-lh) var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; margin: 0; }
h1 { font-size: var(--h1-size); line-height: var(--h1-lh); }
h2 { font-size: var(--h2-size); line-height: var(--h2-lh); }
h3 { font-size: var(--h3-size); line-height: var(--h3-lh); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-3); }
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.icon { width: 24px; height: 24px; flex: 0 0 auto; }

/* focus — visible on every interactive element */
a:focus-visible, button:focus-visible {
  outline: var(--focus-ring); outline-offset: var(--focus-offset);
  border-radius: 4px;
}

/* ---- buttons (contrast deviation documented in tokens.css) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--btn-h); padding: 0 var(--btn-pad-x);
  border-radius: var(--btn-radius);
  font: 600 var(--btn-size)/1 var(--font-body); text-decoration: none;
}
.btn-solid { background: var(--btn-solid-bg); color: var(--btn-solid-text); }
.btn-solid:hover { filter: brightness(1.06); }
.btn-ghost {
  border: 1px solid var(--btn-ghost-border); color: var(--btn-ghost-text);
  background: transparent;
}
.btn-ghost:hover { border-color: #fff; }
.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); font: 600 var(--btn-size)/1 var(--font-body);
  text-decoration: underline; text-underline-offset: 3px;
}
.text-link .icon { width: 18px; height: 18px; color: var(--orange); }
.eyebrow {
  font: 600 var(--eyebrow-size)/1.2 var(--font-body);
  letter-spacing: var(--eyebrow-track); text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: var(--sp-3);
}

/* The skeleton-placeholder utilities were retired with the unshipped module
   cards they filled. We do not ship labelled empty frames. */
.frame-label {
  font: 500 12px/1.2 var(--font-body); color: var(--ink-muted);
  text-align: center; padding-top: 10px;
}

/* ============ nav ============ */
.site-nav { background: var(--navy); }
.nav-row {
  display: flex; align-items: center; gap: var(--sp-4);
  min-height: 76px;
}
.nav-logo { display: inline-flex; }
.nav-logo img { width: 176px; height: auto; }
.nav-links {
  display: flex; align-items: center; gap: var(--sp-4); margin-left: auto;
}
.nav-links a {
  color: var(--text-onnavy); text-decoration: none;
  font: 500 var(--nav-size)/1 var(--font-body);
}
.nav-links a:hover { color: var(--orange); }
/* specificity guard: .nav-links a must never repaint the solid CTA white —
   the AA contrast deviation (navy-on-orange) is mandatory, see tokens.css */
.nav-links a.nav-cta, .nav-links a.nav-cta:hover { color: var(--btn-solid-text); }
.nav-links .nav-cta { height: 44px; }
.nav-toggle { display: none; }

/* ============ hero ============ */
.hero { background: var(--navy); color: var(--text-onnavy); padding: var(--sp-7) 0 var(--sp-8); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-6); align-items: center;
}
.hero h1 { color: #fff; }
.hero .lead {
  font-size: var(--lead-size); line-height: var(--lead-lh);
  color: var(--text-onnavy-soft); margin: var(--sp-3) 0 var(--sp-4); max-width: 30em;
}
.hero-ctas { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.hero-media { position: relative; min-height: 360px; }
.frame-dashboard {
  background: var(--surface); border-radius: 16px; border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0,0,0,.35); padding: 0 0 8px; overflow: hidden;
}
.frame-chrome {
  display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.frame-chrome .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.frame-shot { display: block; width: 100%; height: auto; }
.frame-phone {
  position: absolute; right: -8px; bottom: -26px; width: 170px;
  background: var(--surface); border-radius: 22px; border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0,0,0,.4); padding: 8px; overflow: hidden;
}
.frame-phone .frame-shot { border-radius: 14px; }
.shot-frame {
  margin-top: auto; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: #FBFCFE;
}
.shot-frame img { display: block; width: 100%; height: auto; }

/* ============ problem strip ============ */
.band { padding: var(--sp-7) 0; }
.problem { background: var(--surface); }
.beats {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: var(--sp-4); align-items: start; margin-top: var(--sp-6);
}
.beat { text-align: center; display: grid; justify-items: center; gap: var(--sp-2); }
.beat .icon { width: 96px; height: 96px; stroke-width: 1.25; color: var(--navy); }
.beat h3 { font-family: var(--font-body); font-weight: 700; font-size: 17px; }
.beat p { color: var(--ink-soft); font-size: 14.5px; max-width: 24em; }
.beat-arrow { align-self: center; color: var(--orange); }
.beat-arrow .icon { width: 32px; height: 32px; }

/* ============ proof cards ============ */
.proof { background: var(--page); padding-top: var(--sp-6); }
.proof-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3);
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
}
.proof-card { display: flex; gap: var(--sp-2); padding: var(--sp-3); align-items: flex-start; }
.proof-card h3 { font-family: var(--font-body); font-weight: 700; font-size: 16.5px; line-height: 1.3; }
.proof-card p { color: var(--ink-soft); font-size: 14.5px; margin-top: 6px; }
.proof-icon { position: relative; display: inline-flex; color: var(--navy); }
.proof-icon .icon { width: 40px; height: 40px; stroke-width: 1.5; }
.proof-icon .icon-check {
  position: absolute; right: -6px; bottom: -4px; width: 18px; height: 18px;
  color: var(--orange); background: var(--surface); border-radius: 50%;
}
.proof-icon .icon-shuffle { color: var(--navy); }
.proof-bear .proof-dot {
  position: absolute; right: -10px; top: -8px; color: #fff;
  background: var(--orange); border-radius: 50%; padding: 3px; display: inline-flex;
}
.proof-bear .proof-dot .icon { width: 14px; height: 14px; }
/* stat values: the comp shows orange, but #FE7116 on white is 2.76:1 (AA fail
   for text) — navy text with an orange underline keeps the accent, passes AA */
.stat-token {
  color: var(--navy); font-weight: 700;
  border-bottom: 2px solid var(--orange);
}

/* ============ module grid ============ */
.modules { background: var(--surface); }
.module-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--sp-3); margin-top: var(--sp-6); align-items: stretch;
}
/* Column count tracks the number of shipping modules, not a fixed five. */
.module-grid-3 { grid-template-columns: 2fr 1fr 1fr; }
.module { padding: var(--sp-3); position: relative; display: grid; gap: 10px; align-content: start; }
.module h3 { font-size: 21px; }
.module p { color: var(--ink-soft); font-size: 14.5px; }
.module-featured { border-width: 2px; border-color: var(--orange); }

/* ============ industry router (navy) ============ */
.industries { background: var(--navy); color: var(--text-onnavy); }
.industries h2 { color: #fff; }
.industry-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-3); margin-top: var(--sp-6);
}
.tile {
  display: grid; justify-items: center; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-2); border: 1px solid var(--line-onnavy);
  border-radius: var(--radius-tile); color: var(--text-onnavy); text-decoration: none;
  background: transparent;
}
/* Tiles are descriptive, not navigational — there are no industry pages to
   send anyone to, so they carry no hover affordance. */
.tile .icon { width: 64px; height: 64px; stroke-width: 1; }
.tile span { font: 500 15px/1.2 var(--font-body); }

/* ============ origin strip ============ */
.origin { background: var(--page); padding: var(--sp-5) 0; }
.origin-row { display: flex; align-items: center; gap: var(--sp-3); }
.origin-medallion {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
}
.origin-copy { font-size: 17px; max-width: 34em; font-weight: 500; }
.origin .text-link { margin-left: auto; white-space: nowrap; }

/* ============ closing CTA ============ */
.closing { background: var(--surface); padding: var(--sp-8) 0; }
.closing-bear { margin: 0 auto var(--sp-3); }
.closing h2 { max-width: 18em; margin: 0 auto; }
.closing-ctas {
  display: flex; gap: var(--sp-4); align-items: center; justify-content: center;
  margin-top: var(--sp-4); flex-wrap: wrap;
}

/* ============ footer (navy) ============ */
.site-footer { background: var(--navy); color: var(--text-onnavy); padding: var(--sp-6) 0; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-4);
}
.footer-brand img { width: 164px; height: auto; }
.footer-copyright { color: var(--text-onnavy-soft); font-size: var(--small-size); margin-top: var(--sp-3); }
.footer-head {
  font: 600 13px/1.2 var(--font-body); letter-spacing: .05em;
  text-transform: uppercase; color: #fff; margin: 0 0 var(--sp-2);
}
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col a {
  color: var(--text-onnavy-soft); text-decoration: none; font-size: 14px;
}
.footer-col a:hover { color: #fff; }

/* ============ interior page head (navy) ============ */
.page-head {
  background: var(--navy); color: var(--text-onnavy);
  padding: var(--sp-7) 0 var(--sp-8);
}
.page-head-tight { padding: var(--sp-6) 0 var(--sp-6); }
.page-head h1 { color: #fff; max-width: 18em; }
.page-head .eyebrow { color: var(--text-onnavy-soft); }
.page-head .lead {
  font-size: var(--lead-size); color: var(--text-onnavy-soft);
  margin-top: var(--sp-3); max-width: 42em;
}
.page-head .lead strong { color: #fff; }
.page-head .hero-ctas { margin-top: var(--sp-5); }
.legal-date { color: var(--text-onnavy-soft); font-size: var(--small-size); margin-top: var(--sp-2); }

/* ============ generic interior bands ============ */
.band-alt { background: var(--page); }
.band-sub {
  color: var(--ink-soft); max-width: 44em; margin: var(--sp-3) auto 0;
}
.industries .band-sub { color: var(--text-onnavy-soft); }

/* ---- two-column copy + media ---- */
.split {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: var(--sp-6); align-items: center;
}
.split-copy { display: grid; gap: var(--sp-3); max-width: 34em; }
.split-copy p { color: var(--ink-soft); }
.split-copy h2 { margin-bottom: var(--sp-1); }
.split-media { max-width: 340px; justify-self: center; }

/* ---- feature cards ---- */
.feature-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3); margin-top: var(--sp-6);
}
.feature { padding: var(--sp-4); display: grid; gap: 10px; align-content: start; }
.feature h3 { font-size: 19px; }
.feature p { color: var(--ink-soft); font-size: 15px; }

/* ============ long-form prose ============ */
.prose { max-width: 40em; }
.prose-narrow { max-width: 34em; }
.prose p { margin-bottom: var(--sp-3); color: var(--ink-soft); }
.prose .lead {
  font-size: var(--lead-size); color: var(--ink); margin-bottom: var(--sp-4);
}
.prose h2 {
  margin-top: var(--sp-5); margin-bottom: var(--sp-2); font-size: 27px;
}
.prose h3 {
  margin-top: var(--sp-4); margin-bottom: var(--sp-2);
  font-family: var(--font-body); font-weight: 700; font-size: 17px;
}
.prose strong { color: var(--ink); }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.prose ul {
  list-style: disc; padding-left: 1.25em; margin-bottom: var(--sp-3);
  color: var(--ink-soft);
}
.prose ul li { margin-bottom: 8px; }
.prose-sign {
  margin-top: var(--sp-5); font-weight: 600; color: var(--ink);
}
.prose-legal { max-width: 44em; }
.prose-legal p, .prose-legal ul { font-size: 15.5px; }

/* ============ forms ============ */
.form-layout {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: var(--sp-6);
  align-items: start;
}
.form-card { padding: var(--sp-4); display: grid; gap: var(--sp-3); }
.form-card h2 { font-size: 24px; }
.field { display: grid; gap: 6px; }
.field label { font: 600 14px/1.3 var(--font-body); color: var(--ink); }
.field .opt { font-weight: 400; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  font: 400 15px/1.4 var(--font-body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: var(--focus-ring); outline-offset: var(--focus-offset);
  border-color: var(--navy);
}
.form-card .btn { width: fit-content; }
.form-card button[disabled] { opacity: .6; }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden;
}

.form-status { font-size: 14.5px; min-height: 1.2em; }
.form-status.is-pending { color: var(--ink-muted); }
.form-status.is-ok { color: var(--ink); font-weight: 600; }
.form-status.is-err { color: #B3261E; }
.form-status a { color: inherit; }
.form-fallback { font-size: 14px; color: var(--ink-muted); }
.form-fallback a, .contact-list a { color: var(--ink); }

.form-aside { display: grid; gap: var(--sp-3); align-content: start; }
.form-aside h2 { font-size: 21px; }
.steps { display: grid; gap: var(--sp-3); counter-reset: step; }
.steps li {
  color: var(--ink-soft); font-size: 15px; padding-left: 1.9em; position: relative;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 1.4em; height: 1.4em; border-radius: 50%;
  background: var(--orange); color: var(--navy);
  font: 700 12px/1.4em var(--font-body); text-align: center;
}
.steps strong { color: var(--ink); }
.aside-note { color: var(--ink-muted); font-size: 14px; }
.contact-list { display: grid; gap: 4px; }
.contact-list dt {
  font: 600 13px/1.3 var(--font-body); color: var(--ink);
  margin-top: var(--sp-2);
}
.contact-list dd { margin: 0; font-size: 14.5px; }

/* ==========================================================================
   MOBILE — 390px derivation (flagged judgment calls in the S2 report)
   ========================================================================== */
@media (max-width: 760px) {
  :root { --h1-size: 36px; --h2-size: 26px; }

  .nav-row { min-height: 64px; }
  .nav-logo img { width: 138px; }
  .nav-toggle {
    display: inline-flex; margin-left: auto; background: none; border: 0;
    color: #fff; padding: 8px; cursor: pointer;
  }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    background: var(--navy); flex-direction: column; align-items: flex-start;
    padding: var(--sp-2) var(--sp-3) var(--sp-3); gap: var(--sp-2); z-index: 20;
    border-bottom: 1px solid var(--line-onnavy);
  }
  .nav-links.open { display: flex; }
  .site-nav { position: relative; }

  .hero { padding: var(--sp-5) 0 var(--sp-6); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .hero-media { min-height: 0; }
  .frame-phone { right: 4px; bottom: -18px; width: 108px; }

  .beats { grid-template-columns: 1fr; gap: var(--sp-4); }
  .beat-arrow { display: none; }

  .proof-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .industry-grid { grid-template-columns: 1fr 1fr; }
  .industry-grid li:last-child { grid-column: 1 / -1; }

  .origin-row { flex-direction: column; text-align: center; }
  .origin .text-link { margin-left: 0; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .page-head { padding: var(--sp-6) 0 var(--sp-6); }
  .split { grid-template-columns: 1fr; gap: var(--sp-5); }
  .split-media { max-width: 280px; }
  .feature-grid { grid-template-columns: 1fr; }
  .form-layout { grid-template-columns: 1fr; gap: var(--sp-5); }
  .module-grid-3 { grid-template-columns: 1fr; }
}
