/* =========================================================================
   The IQ Collective — Cold Traffic Funnel
   Design: "Ink & Rust" — warm off-white, near-black ink, restrained rust accent.
   Editorial. Serif headlines, system sans body. No gradients, no glass, no glow.
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg:          #faf8f4;   /* warm off-white page */
  --surface:     #ffffff;   /* cards / embeds */
  --surface-alt: #f3efe8;   /* subtle alt sections */
  --ink:         #1a1815;   /* near-black, warm */
  --ink-soft:    #423e38;   /* body text */
  --muted:       #6e685f;   /* secondary text */
  --line:        #e5e0d8;   /* subtle borders */
  --line-strong: #d6cfc3;

  --accent:      #b4441e;   /* rust — buttons, marks */
  --accent-dark: #8f3416;   /* hover / text-links on light */
  --accent-tint: #f6ebe4;   /* pale rust wash */

  --ok:          #2f6f4f;   /* qualified/positive marks */

  --maxw: 1080px;
  --maxw-narrow: 720px;

  --radius: 10px;
  --radius-sm: 6px;

  --shadow: 0 1px 2px rgba(26,24,21,.04), 0 4px 16px rgba(26,24,21,.05);

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.15rem); }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--ink); font-weight: 700; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 68px 0; }
.section--tight { padding: 44px 0; }
.section--alt { background: var(--surface-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.narrow { max-width: var(--maxw-narrow); margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.eyebrow {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 14px;
}
.lead { font-size: 1.12rem; color: var(--ink-soft); }
.kicker { font-family: var(--sans); font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--sans); font-size: 1.02rem; font-weight: 700;
  padding: 15px 30px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--lg { padding: 17px 36px; font-size: 1.08rem; }
.btn:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; }

/* ---------- Masthead (logo only, no nav) ---------- */
.site-masthead { text-align: center; padding: 26px 22px 0; }
.site-masthead img { display: inline-block; height: 72px; width: auto; margin: 0 auto; }
@media (max-width: 560px) { .site-masthead img { height: 56px; } }

/* ---------- Hero ---------- */
.hero { padding: 22px 0 44px; }
/* two-column: copy left, form right (form sits above the fold) */
.hero-split {
  display: grid; grid-template-columns: 1.02fr 0.98fr;
  gap: 48px; align-items: start;
}
.hero-copy { text-align: left; }
.hero-copy .sub { max-width: 560px; margin: 18px 0 26px; font-size: 1.12rem; color: var(--ink-soft); }
.hero-cta { min-width: 240px; }
.friction { margin: 14px 0 0; font-size: .9rem; color: var(--muted); }
.hero-form { width: 100%; }
.form-kicker {
  font-family: var(--sans); font-size: .8rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent-dark);
  margin: 0 0 12px; text-align: center;
}
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy { text-align: center; }
  .hero-copy .sub { margin-left: auto; margin-right: auto; }
  .hero-cta { min-width: 260px; }
}

/* trust strip under hero */
.trust-strip {
  margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 34px; justify-content: center;
  color: var(--muted); font-size: .9rem;
}
.trust-strip span { display: inline-flex; align-items: center; gap: 8px; }
.trust-strip span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Trusted By marquee (rolling logos) ---------- */
.kicker.center { text-align: center; margin-bottom: 22px; }
.marquee {
  overflow: hidden; position: relative; width: 100%;
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; width: max-content; align-items: center;
  animation: marquee-scroll 26s linear infinite;
  will-change: transform; backface-visibility: hidden;
}
.marquee .logo {
  flex: 0 0 auto; margin: 0 38px; white-space: nowrap;
  display: inline-flex; align-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.4rem;
  color: var(--ink); letter-spacing: .01em; opacity: .82;
}
/* real logo images */
.marquee .logo img {
  height: 84px; width: auto; max-width: 240px;
  object-fit: contain; display: block; vertical-align: middle;
}
.marquee .logo img.is-missing { display: none; }
/* text fallback shown only when the image fails to load / is missing */
.logo-fallback { display: none; }
.marquee .logo img.is-missing + .logo-fallback { display: inline; }
@media (max-width: 560px) { .marquee .logo img { height: 64px; max-width: 190px; } }
@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; }
  .marquee .logo { margin: 8px 22px; }
}

/* ---------- Problem blocks ---------- */
.blocks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 8px; }
.block {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 24px 20px;
}
.block h3 { margin-bottom: 8px; }
.block p { margin: 0; color: var(--ink-soft); }

/* ---------- Mechanism / prose ---------- */
.prose p { font-size: 1.08rem; }
.prose p + p { margin-top: 4px; }

/* ---------- What we install (definition list) ---------- */
.install-list { margin-top: 10px; border-top: 1px solid var(--line); }
.install-item {
  display: grid; grid-template-columns: 240px 1fr; gap: 8px 28px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.install-item dt { font-family: var(--serif); font-weight: 700; color: var(--ink); font-size: 1.12rem; }
.install-item dd { margin: 0; color: var(--ink-soft); }

/* ---------- Steps (how it works) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 8px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent-dark);
  font-family: var(--serif); font-weight: 700; font-size: 1.1rem;
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; }

/* ---------- What you get (checklist) ---------- */
.checklist { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; }
.checklist li {
  position: relative; padding-left: 34px; color: var(--ink-soft); font-size: 1.06rem;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / 15px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / 15px no-repeat;
}

/* ---------- Proof section ---------- */
/* Client-results cards: dark-green card, gold accents, circular client badge */
.results-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-bottom: 34px;
}
.result-card {
  background: var(--accent);                    /* brick red — matches site accent */
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  padding: 34px 34px 30px;
  color: #fff;
  display: flex; flex-direction: column; align-items: flex-start;
}
.result-badge {
  width: 78px; height: 78px; border-radius: 50%;
  object-fit: cover; background: #fff;
  border: 2px solid rgba(255, 255, 255, .8);     /* clean white ring */
  margin-bottom: 22px;
}
.result-figure {
  font-family: var(--serif); font-weight: 700; line-height: 1;
  font-size: clamp(2.4rem, 5vw, 3.1rem); color: #fff;
}
.result-desc { margin: 12px 0 0; color: #fbe7dc; font-size: 1.05rem; }  /* light warm cream */
.result-time {
  margin: 18px 0 0; padding-top: 16px; width: 100%;
  border-top: 1px solid rgba(255, 255, 255, .3);
  color: #f6d2c2; font-size: .78rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
}

.proof-video { max-width: 340px; margin: 0 auto; }   /* portrait 9:16 testimonial */
.video-frame {
  position: relative; aspect-ratio: 9 / 16; background: #000;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong);
}
.video-frame video, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-caption { margin-top: 12px; text-align: center; color: var(--muted); font-size: .9rem; }

/* CRM proof screenshots under the testimonial */
.proof-shots {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  max-width: 920px; margin: 40px auto 0;
}
.proof-shots .shot {
  margin: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.proof-shots img { width: 100%; height: auto; display: block; }
@media (max-width: 640px) { .proof-shots { grid-template-columns: 1fr; } }

/* ---------- For / not for ---------- */
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.fit-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.fit-col h3 { margin-bottom: 14px; }
.fit-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.fit-col li { position: relative; padding-left: 30px; color: var(--ink-soft); }
.fit-col li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.fit-col--yes li::before { content: "+"; color: var(--ok); font-size: 1.2rem; line-height: 1.35; }
.fit-col--no  li::before { content: "\2013"; color: var(--muted); font-size: 1.2rem; line-height: 1.35; }

/* ---------- FAQ accordion ---------- */
.faq { max-width: var(--maxw-narrow); margin: 8px auto 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--serif); font-weight: 700; font-size: 1.14rem; color: var(--ink);
  padding: 20px 44px 20px 0; position: relative;
}
.faq-q::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-weight: 400; font-size: 1.6rem; color: var(--accent-dark);
  transition: transform .2s ease;
}
.faq-item.open .faq-q::after { content: "\2013"; }
.faq-q:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 3px; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a-inner { padding: 0 0 20px; color: var(--ink-soft); }

/* ---------- Form / embed sections ---------- */
.embed-shell {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
/* Typeform: no surrounding card. Parent is flex, so the embed child must be told
   to grow/fill explicitly — flexbox otherwise shrinks children to content size and
   left-aligns them (the "offset left, dead space right" symptom). justify-content
   on the parent is a safety net. No Typeform-internal classes are targeted. */
.form-embed { width: 100%; display: flex; justify-content: center; }
[data-tf-live] {
  flex: 1 1 auto;                     /* fill available width instead of shrinking to content */
  width: 100%; max-width: 720px; margin: 0 auto; min-width: 0;
  min-height: 500px; height: 600px;   /* explicit height so the injected iframe fills; min-height guards against collapse before init */
}
[data-tf-live] iframe { width: 100% !important; height: 100% !important; border: 0; display: block; margin: 0 auto; }
@media (max-width: 560px) { [data-tf-live] { height: 640px; } }
.calendar-shell { min-height: 700px; }
.calendar-shell iframe { width: 100%; min-height: 700px; border: 0; display: block; }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }
.final-cta .btn { min-width: 260px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfc9bf; padding: 40px 0; margin-top: 0; }
.site-footer .brand { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: #fff; margin-bottom: 6px; }
.site-footer p { margin: 0 0 14px; color: #a9a397; font-size: .92rem; max-width: 520px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.footer-links a { color: #e9e4da; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-copy { margin-top: 18px; font-size: .82rem; color: #8a8479; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(250,248,244,.96); border-top: 1px solid var(--line-strong);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateY(120%); transition: transform .22s ease;
  backdrop-filter: saturate(1.1) blur(4px);
}
.sticky-cta.show { transform: translateY(0); }
.sticky-cta .btn { width: 100%; }

/* ---------- Minimal page (booking / thank-you / legal) ---------- */
.minimal { min-height: 100vh; display: flex; flex-direction: column; }
.minimal main { flex: 1; padding: 56px 0; }
.mini-head { text-align: center; margin-bottom: 34px; }
.mini-head .brand-tag { font-family: var(--serif); font-weight: 700; color: var(--ink); font-size: 1.15rem; margin-bottom: 22px; }
.reassure { color: var(--muted); max-width: 560px; margin: 0 auto 30px; text-align: center; }

/* centered logo on minimal (booking / thank-you / legal) pages */
.mini-logo { height: 56px; width: auto; display: block; margin: 8px auto 26px; }
@media (max-width: 560px) { .mini-logo { height: 46px; } }

/* pill eyebrow */
.pill-eyebrow {
  display: inline-block; margin: 0 0 22px;
  border: 1px solid var(--accent); color: var(--accent-dark);
  border-radius: 999px; padding: 9px 22px;
  font-family: var(--sans); font-size: .8rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}

/* minimal-page subheadline */
.mini-sub { max-width: 620px; margin: 16px auto 0; font-size: 1.12rem; color: var(--ink-soft); }
.mini-sub .hl { color: var(--accent-dark); font-weight: 700; }
.mini-sub--accent { color: var(--accent-dark); font-weight: 600; }

/* confirm-on-calendar button + helper (thank-you page) */
.confirm-wrap { text-align: center; margin-top: 6px; }
.confirm-btn { min-width: 320px; max-width: 100%; }
.ty-help { max-width: 560px; margin: 16px auto 0; text-align: center; color: var(--muted); font-size: .92rem; }
@media (max-width: 560px) { .confirm-btn { min-width: 0; width: 100%; } }

/* thank-you video (Cloudflare Stream, responsive 16:9) */
.ty-video { max-width: 640px; margin: 0 auto 34px; }
.cf-stream {
  position: relative; padding-top: 56.25%;
  background: #000; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-strong);
}
.cf-stream iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* thank-you steps */
.ty-steps { max-width: 620px; margin: 36px auto 26px; display: grid; gap: 16px; }
.ty-step {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
}
.ty-step .num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.2rem;
}
.ty-step p { margin: 0; }
.ty-step strong { display: block; margin-bottom: 3px; }
.ty-note { text-align: center; max-width: 560px; margin: 0 auto; }
.ty-note .warn { color: var(--accent-dark); font-weight: 700; }
.ty-note .help { color: var(--muted); font-size: .92rem; margin-top: 8px; }

/* legal pages */
.legal { max-width: var(--maxw-narrow); margin: 0 auto; }
.legal h2 { margin-top: 32px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 20px; }
.back-link { display: inline-block; margin-top: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .blocks { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .fit { grid-template-columns: 1fr; }
  .install-item { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 48px 0; }
  .hero { padding: 52px 0 40px; }
  .results-grid { grid-template-columns: 1fr; }
  .hero .btn, .final-cta .btn { width: 100%; min-width: 0; }
  .wrap { padding: 0 18px; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
