/* ============================================================
   BLUE COLLAR KIT — shared foundation
   Token values live in each template's theme block.
   This file defines structure, components, and behavior only.
   ============================================================ */

/* --- 1. Reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
body { margin: 0; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
:where(ul[class], ol[class]) { list-style: none; margin: 0; padding: 0; }   /* zero specificity so component spacing wins */
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 6rem; }

/* --- 2. Focus ------------------------------------------------ */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.skip-link {
  position: absolute; left: 50%; translate: -50% -120%;
  z-index: 200; background: var(--ink); color: var(--paper);
  padding: .75rem 1.25rem; border-radius: 0 0 .5rem .5rem;
  font-weight: 600; text-decoration: none;
  transition: translate .15s var(--ease-out);
}
.skip-link:focus { translate: -50% 0; }

/* --- 3. Page frame ------------------------------------------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.wrap {
  width: min(100% - 2.5rem, var(--measure-wide));
  margin-inline: auto;
}
.wrap--narrow { width: min(100% - 2.5rem, 46rem); }
/* --space-section is a HALF gap: two stacked sections read as one full
   rhythm unit, and a section with its own background still gets even
   padding on both sides. No cancelling `+` rule needed. */
.section { padding-block: var(--space-section); position: relative; }
.section--tint { background: var(--surface-2); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink .lede { color: color-mix(in oklab, var(--paper) 74%, transparent); }
.section--ink .panel { background: color-mix(in oklab, var(--paper) 7%, transparent); border-color: color-mix(in oklab, var(--paper) 16%, transparent); }

/* --- 4. Type ------------------------------------------------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  line-height: var(--display-leading);
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
}
h1, .t-hero { font-size: var(--step-5); }
h2, .t-section { font-size: var(--step-4); }
h3, .t-card { font-size: var(--step-2); letter-spacing: -0.01em; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
p { text-wrap: pretty; }
.prose p + p { margin-top: 1em; }
.prose { max-width: 62ch; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: flex; align-items: center; gap: .6rem;
}
.eyebrow::before {
  content: ""; inline-size: 1.75rem; block-size: 2px;
  background: var(--accent); flex: none;
}
.eyebrow--plain::before { display: none; }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* --- 5. Buttons ---------------------------------------------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-contrast);
  display: inline-flex; align-items: center; justify-content: center;
  gap: .55rem;
  min-height: 3rem;
  padding: .85rem 1.5rem;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-ui);
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  border-radius: var(--radius-btn);
  transition: translate var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              background-color var(--dur-2) var(--ease-out);
  box-shadow: var(--shadow-btn);
}
.btn:hover { translate: 0 -2px; box-shadow: var(--shadow-btn-hover); }
.btn:active { translate: 0 0; }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--rule-strong);
}
.btn--ghost:hover { --btn-bg: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--lg { min-height: 3.5rem; padding: 1rem 2rem; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn__note {
  display: block; font-size: .8125rem; font-weight: 500;
  color: var(--ink-3); margin-top: .6rem; font-family: var(--font-ui);
}
.btn-row { display: flex; flex-wrap: wrap; gap: .875rem; align-items: center; }

/* --- 6. Header + mobile call bar ----------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 90;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow var(--dur-2) var(--ease-out);
}
.masthead[data-stuck="true"] { box-shadow: 0 1px 24px -8px rgb(0 0 0 / .28); }
.masthead__inner {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand__mark { inline-size: 2.35rem; block-size: 2.35rem; flex: none; }
.brand__name {
  font-family: var(--font-display); font-weight: 750;
  font-size: 1.125rem; letter-spacing: -0.02em; line-height: 1.05;
}
.brand__sub {
  display: block; font-family: var(--font-ui); font-weight: 550;
  font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
}
.nav { display: flex; gap: 1.75rem; }
.nav a {
  font-family: var(--font-ui); font-weight: 550; font-size: .9375rem;
  text-decoration: none; color: var(--ink-2); padding-block: .5rem;
  position: relative;
}
.nav a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: .15rem;
  block-size: 2px; background: var(--accent);
  scale: 0 1; transform-origin: left;
  transition: scale var(--dur-2) var(--ease-out);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { scale: 1 1; }
.masthead__phone {
  font-family: var(--font-display); font-weight: 750;
  font-size: 1.0625rem; letter-spacing: -0.02em; text-decoration: none;
  display: flex; align-items: center; gap: .5rem;
}
.nav-toggle { display: none; }

@media (max-width: 62rem) {
  .nav, .masthead__phone { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    min-height: 2.75rem; padding: .5rem .9rem;
    font-family: var(--font-ui); font-weight: 600; font-size: .9375rem;
    border-radius: var(--radius-btn);
    box-shadow: inset 0 0 0 1.5px var(--rule-strong);
  }
  .masthead[data-open="true"] .nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; inset-inline: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: .5rem 1.25rem 1.25rem;
  }
  .masthead[data-open="true"] .nav a {
    padding-block: .9rem; border-bottom: 1px solid var(--rule);
    font-size: 1.0625rem; color: var(--ink);
  }
  .masthead[data-open="true"] .masthead__phone {
    display: flex; position: absolute; inset-inline: 1.25rem; top: 100%;
    translate: 0 100%;
  }
}

/* Sticky tap-to-call bar — the single highest-leverage mobile element */
.callbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 95;
  display: none;
  padding: .625rem .875rem calc(.625rem + env(safe-area-inset-bottom, 0px));
  background: var(--callbar-bg);
  border-top: 1px solid var(--callbar-rule);
  gap: .625rem;
}
.callbar .btn { flex: 1; min-height: 3.25rem; padding-inline: .75rem; }
@media (max-width: 48rem) {
  .callbar { display: flex; }
  body { padding-bottom: 4.75rem; }
}

/* --- 7. Hero ------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero__grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
@media (min-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
}
.hero__copy > * + * { margin-top: 1.25rem; }
.hero h1 { max-width: 16ch; }
.hero .lede { max-width: 46ch; }

/* Trust strip under the fold line */
.trustbar {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  align-items: center;
  padding-block: 1rem;
  border-block: 1px solid var(--rule);
  font-family: var(--font-ui); font-size: .875rem; font-weight: 550;
  color: var(--ink-2);
}
.trustbar li { display: flex; align-items: center; gap: .45rem; }
.trustbar svg { inline-size: 1.05rem; block-size: 1.05rem; color: var(--accent-ink); flex: none; }

/* --- 8. Surfaces --------------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.panel--raised { box-shadow: var(--shadow-panel); border-color: var(--rule-soft); }
.panel--accent {
  background: var(--accent-wash);
  border-color: color-mix(in oklab, var(--accent) 26%, transparent);
}
.panel--dark { background: var(--ink); color: var(--paper); border-color: transparent; }
.panel--dark .lede, .panel--dark p { color: color-mix(in oklab, var(--paper) 78%, transparent); }

.grid { display: grid; gap: var(--space-grid); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.section__head { display: grid; gap: .875rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section__head h2 { max-width: 20ch; }
.section__head .lede { max-width: 56ch; }
.section__head--split {
  grid-template-columns: 1fr; align-items: end;
}
@media (min-width: 62rem) {
  .section__head--split { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: 2.5rem; }
}

/* --- 9. Offer stack (the Hormozi module) --------------------- */
.stack { display: grid; gap: 0; }
.stack__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.5rem;
  align-items: baseline;
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--rule);
}
.stack__row:first-child { border-top: 1px solid var(--rule); }
.stack__label { font-weight: 600; }
.stack__label small {
  display: block; font-weight: 450; font-size: .875rem;
  color: var(--ink-3); margin-top: .2rem;
}
.stack__value {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.stack__total {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  align-items: baseline; justify-content: space-between;
  padding-block: 1.25rem;
  font-family: var(--font-display); font-weight: 750;
  font-size: var(--step-2); letter-spacing: -0.02em;
}
.strike { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .55; }

/* --- 10. Guarantee ------------------------------------------- */
.guarantee {
  display: grid; gap: 1.5rem; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 48rem) { .guarantee { grid-template-columns: auto minmax(0, 1fr); } }
.guarantee__seal {
  inline-size: clamp(6rem, 14vw, 8.5rem);
  block-size: clamp(6rem, 14vw, 8.5rem);
  flex: none;
}

/* --- 11. Proof ----------------------------------------------- */
.reviews { display: grid; gap: var(--space-grid); }
.review { display: grid; gap: .875rem; align-content: start; }
.review__stars { display: flex; gap: .15rem; color: var(--star); }
.review__stars svg { inline-size: 1.05rem; block-size: 1.05rem; }
.review blockquote { font-size: 1.0625rem; line-height: 1.55; }
.review__who { display: flex; align-items: center; gap: .75rem; }
.review__who img { inline-size: 2.5rem; block-size: 2.5rem; border-radius: 50%; object-fit: cover; }
.review__name { font-family: var(--font-ui); font-weight: 600; font-size: .9375rem; }
.review__meta { font-size: .8125rem; color: var(--ink-3); }

.ratingbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem;
  font-family: var(--font-ui); font-weight: 550;
}
.ratingbar strong { font-size: 1.5rem; font-family: var(--font-display); }

/* Before / after slider */
.ba {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3; max-width: 100%;
  background: var(--surface-2);
  touch-action: pan-y;
}
.ba img, .ba .ph {
  position: absolute; inset: 0; inline-size: 100%; block-size: 100%;
  object-fit: cover; border-radius: 0; border: 0; aspect-ratio: auto;
}
.ba__after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.ba__handle {
  position: absolute; inset-block: 0; left: var(--pos, 50%);
  inline-size: 3px; background: #fff; translate: -50% 0;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .25);
}
.ba__handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  translate: -50% -50%;
  inline-size: 2.75rem; block-size: 2.75rem; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 12px rgb(0 0 0 / .3);
}
.ba input[type="range"] {
  position: absolute; inset: 0; inline-size: 100%; block-size: 100%;
  opacity: 0; cursor: ew-resize; margin: 0;
}
.ba input[type="range"]:focus-visible { opacity: .001; outline-offset: -4px; }
.ba__tag {
  position: absolute; bottom: .75rem; z-index: 2;
  padding: .3rem .7rem; border-radius: 99px;
  background: rgb(0 0 0 / .62); color: #fff;
  font-family: var(--font-ui); font-size: .75rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.ba__tag--b { left: .75rem; }
.ba__tag--a { right: .75rem; }

/* --- 12. Form ------------------------------------------------ */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field > label {
  font-family: var(--font-ui); font-weight: 600; font-size: .875rem;
}
.field input, .field select, .field textarea {
  min-height: 3rem;
  padding: .7rem .9rem;
  background: var(--input-bg);
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
  width: 100%;
}
.field textarea { min-height: 6.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
  outline: none;
}
.field--invalid input, .field--invalid select { border-color: var(--danger); }
.field__err {
  font-size: .8125rem; color: var(--danger); font-family: var(--font-ui); font-weight: 550;
}
.field__err[hidden] { display: none; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }

/* Big tappable choice chips — beats a <select> on mobile */
.choices { display: grid; gap: .625rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.25rem; padding: .75rem .9rem; text-align: center;
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-weight: 600; font-size: .9375rem;
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out);
}
.choice input:checked + span {
  border-color: var(--accent); background: var(--accent-wash);
}
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Multi-step */
.steps { display: grid; gap: 1.25rem; }
.steps__bar { display: flex; gap: .4rem; }
.steps__bar i {
  block-size: 4px; flex: 1; border-radius: 99px;
  background: var(--rule-strong);
  transition: background-color var(--dur-2) var(--ease-out);
}
.steps__bar i[data-on] { background: var(--accent); }
.steps__count {
  font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.step[hidden] { display: none !important; }

.consent {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem;
  align-items: start;
  font-size: .75rem; line-height: 1.45; color: var(--ink-3);
}
.consent input { margin-top: .2rem; inline-size: 1.15rem; block-size: 1.15rem; accent-color: var(--accent); }
.consent a { text-underline-offset: 2px; }

/* --- 13. FAQ ------------------------------------------------- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding-block: 1.25rem; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 650; font-size: 1.125rem;
  letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; inline-size: 1rem; block-size: 1rem;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  rotate: 45deg; translate: 0 -25%;
  transition: rotate var(--dur-2) var(--ease-out);
}
.faq details[open] summary::after { rotate: -135deg; translate: 0 25%; }
.faq details > div { padding-bottom: 1.35rem; max-width: 68ch; color: var(--ink-2); }

/* --- 14. Service area ---------------------------------------- */
.areas { display: flex; flex-wrap: wrap; gap: .5rem; }
.areas li {
  padding: .4rem .8rem; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--rule);
  font-family: var(--font-ui); font-size: .875rem; font-weight: 550;
}

/* --- 15. Footer ---------------------------------------------- */
.footer { background: var(--footer-bg); color: var(--footer-fg); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.footer h3 {
  font-family: var(--font-ui); font-size: .75rem; font-weight: 650;
  letter-spacing: .14em; text-transform: uppercase;
  color: color-mix(in oklab, var(--footer-fg) 60%, transparent);
  margin-bottom: 1rem;
}
.footer ul { display: grid; gap: .55rem; font-size: .9375rem; }
.footer__legal {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid color-mix(in oklab, var(--footer-fg) 18%, transparent);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between;
  font-size: .8125rem;
  color: color-mix(in oklab, var(--footer-fg) 62%, transparent);
}

/* --- 16. Reveal (visible at rest, animates only if JS + motion OK) */
.reveal { opacity: 1; }
html[data-anim="on"] .reveal {
  opacity: 0; translate: 0 14px;
  transition: opacity .55s var(--ease-out), translate .55s var(--ease-out);
}
html[data-anim="on"] .reveal[data-shown] { opacity: 1; translate: 0 0; }

/* --- 17. Photo placeholder -------------------------------------
   Every real business photo swap is a single <img> away: this block
   makes an unfilled slot look intentional (not a broken-image icon)
   and states exactly what to shoot. Delete the .ph__note when a real
   <img> replaces the div. --- */
.ph {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  background: var(--surface-2);
  background-image: repeating-linear-gradient(
    -45deg, var(--rule) 0 1px, transparent 1px 14px
  );
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  aspect-ratio: var(--ph-ratio, 4 / 3);
}
.ph__note {
  margin: .75rem; padding: .55rem .8rem;
  background: color-mix(in oklab, var(--ink) 88%, transparent);
  color: var(--paper);
  font-family: var(--font-ui); font-size: .75rem; font-weight: 600;
  border-radius: var(--radius-sm);
  max-width: calc(100% - 1.5rem);
}

/* --- 18. Utilities ------------------------------------------- */
.sr-only {
  position: absolute; inline-size: 1px; block-size: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.stack-y > * + * { margin-top: var(--flow, 1rem); }
.center { text-align: center; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.i { inline-size: 1em; block-size: 1em; }
