/*
 * 3by400 Home v8 "Hi-fi full-width" - deployable module CSS.
 * Supersedes home-v4-seo.css. Everything is scoped under .tb4-home-v4
 * (the root wrapper inside Joomla mod_custom #391).
 *
 * The module sits inside YOOtheme's .uk-container (max 1200px), so each
 * top-level section breaks out to full viewport width:
 *   width:100vw; margin-left:calc(50% - 50vw)
 * and the page clips horizontal overflow (overflow-x:clip keeps
 * position:sticky headers working, unlike overflow:hidden).
 */
@font-face { font-family: "Lato"; src: url("/images/home-v4/fonts/Lato-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/images/home-v4/fonts/Lato-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/images/home-v4/fonts/Lato-Black.ttf") format("truetype"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("/images/home-v4/fonts/LibreBaskerville-VariableFont_wght.ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("/images/home-v4/fonts/LibreBaskerville-Italic-VariableFont_wght.ttf") format("truetype"); font-weight: 400 700; font-style: italic; font-display: swap; }

/* ---------- Page-level: no horizontal scrollbar from the 100vw bands ---------- */
html:has(.tb4-home-v4),
body:has(.tb4-home-v4) { overflow-x: clip; }

/* ---------- Root ---------- */
.tb4-home-v4 {
  --green: #3DB54A;
  --green-dark: #2f8f3a;
  --lime: #9FCC45;
  --yellow: #D7DF28;
  --ink: #231F20;
  --ink-soft: #3a3637;
  --muted: #5c5856;
  --line: #e8e8e8;
  --tint: #F3F8E6;
  --white: #ffffff;
  --grad: linear-gradient(90deg, #D7DF28, #9FCC45 50%, #3DB54A);
  --serif: "Libre Baskerville", "Source Serif Pro", Georgia, serif;
  --sans: "Lato", "Helvetica Neue", Arial, sans-serif;
  --gut: max(40px, calc((100vw - 1200px) / 2));

  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  box-sizing: border-box;
}
.tb4-home-v4 *, .tb4-home-v4 *::before, .tb4-home-v4 *::after { box-sizing: border-box; }

/* Every top-level section = full-bleed band with a centered ~1200px column */
.tb4-home-v4 > section {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: var(--gut);
  padding-right: var(--gut);
}

/* ---------- YOOtheme / UIkit theme overrides ----------
 * The theme (master-craft) sets Barlow Condensed + UPPERCASE on headings,
 * buttons, strong etc. Force sentence case + our fonts inside the module. */
.tb4-home-v4 :is(h1, h2, h3, h4, h5, h6, p, a, span, strong, em, li, blockquote, figure, figcaption, button, .btn) {
  text-transform: none !important;
  letter-spacing: normal;
  font-family: var(--sans) !important;
}
.tb4-home-v4 :is(h1, h2, h3, h4, h5, h6) {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-weight: 700 !important;
  font-style: normal;
  line-height: 1.2;
}
.tb4-home-v4 p { margin: 0; }
.tb4-home-v4 ul, .tb4-home-v4 ol { margin: 0; padding: 0; list-style: none; }
.tb4-home-v4 img { max-width: 100%; height: auto; display: block; border: 0; }
.tb4-home-v4 a { color: inherit; text-decoration: none !important; }
.tb4-home-v4 a:hover { text-decoration: none !important; }
.tb4-home-v4 figure { margin: 0; }
.tb4-home-v4 blockquote { margin: 0; padding: 0; border: 0; background: none; font-size: inherit; font-style: normal; color: inherit; }
.tb4-home-v4 blockquote::before, .tb4-home-v4 blockquote::after,
.tb4-home-v4 blockquote footer::before, .tb4-home-v4 figcaption::before { content: none !important; }
.tb4-home-v4 svg { display: block; max-width: none; }
/* serif elements (must beat the !important sans reset above via higher specificity) */
.tb4-home-v4 .hero h1,
.tb4-home-v4 .section-head h2,
.tb4-home-v4 .feature-body h3,
.tb4-home-v4 .tst .quote blockquote,
.tb4-home-v4 .tst .quote blockquote p { font-family: var(--serif) !important; }

/* ---------- Buttons / links ---------- */
.tb4-home-v4 .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700 !important;
  font-size: 15px;
  line-height: 1;
  border-radius: 6px;
  padding: 13px 20px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  transition: filter .15s ease, border-color .15s ease;
}
.tb4-home-v4 .btn-primary { background: var(--green); color: #fff !important; border-color: var(--green); }
.tb4-home-v4 .btn-primary:hover { filter: brightness(0.95); color: #fff !important; }
.tb4-home-v4 .btn-secondary { background: var(--white); color: var(--ink) !important; border-color: #b7b3ae; padding: 12px 18px; }
.tb4-home-v4 .btn-secondary:hover { border-color: var(--green); color: var(--ink) !important; }
.tb4-home-v4 .text-link { color: var(--ink-soft); font-size: 14px; font-weight: 700; border-bottom: 1px solid transparent; }
.tb4-home-v4 .text-link:hover { color: var(--green); border-bottom-color: var(--green); }

/* ---------- Eyebrows (intentionally uppercase) ---------- */
.tb4-home-v4 .eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase !important;
  color: var(--green);
}

/* ---------- Hero ---------- */
.tb4-home-v4 .hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 40px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 60px;
  min-height: 440px;
  background: var(--white);
}
.tb4-home-v4 .hero h1 {
  margin: 0 0 18px;
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 13ch;
}
.tb4-home-v4 .subhead { margin: 0 0 12px; font-size: 18px; line-height: 1.45; color: var(--ink-soft); max-width: 38ch; }
.tb4-home-v4 .support { margin: 0 0 26px; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 42ch; }
.tb4-home-v4 .hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.tb4-home-v4 .hero-art { display: flex; justify-content: center; align-items: center; }
.tb4-home-v4 .hero-art img { width: 100%; max-width: 660px; height: auto; }

/* ---------- Trust band (dark) ---------- */
.tb4-home-v4 .trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding-top: 34px;
  padding-bottom: 34px;
  background: var(--ink);
  color: #fff;
}
.tb4-home-v4 .trust::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: var(--grad);
}
.tb4-home-v4 .trust-item { display: flex; gap: 12px; align-items: flex-start; }
.tb4-home-v4 .trust-icon { flex: 0 0 40px; width: 40px; height: 40px; }
.tb4-home-v4 .trust-icon svg { width: 40px; height: 40px; stroke: var(--lime); }
.tb4-home-v4 .trust-icon svg circle[fill] { fill: var(--lime); }
.tb4-home-v4 .trust-item strong { display: block; margin-bottom: 3px; color: #fff; font-size: 15px; font-weight: 700; line-height: 1.3; }
.tb4-home-v4 .trust-item span { display: block; color: #c9c6c3; font-size: 13px; line-height: 1.4; }

/* ---------- Section heads (serif 36px + gradient bar) ---------- */
.tb4-home-v4 .section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 14px;
}
.tb4-home-v4 .section-head h2 {
  position: relative;
  margin: 0;
  padding-top: 20px;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.tb4-home-v4 .section-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 56px; height: 5px;
  border-radius: 3px;
  background: var(--grad);
}
.tb4-home-v4 .section-head .text-link { font-size: 15px; color: var(--green-dark); padding-bottom: 6px; }
.tb4-home-v4 .section-intro { margin: 0 0 30px; max-width: 70ch; font-size: 17px; line-height: 1.55; color: var(--ink-soft); }

/* ---------- Services (light lime band) ---------- */
.tb4-home-v4 .services { padding-top: 72px; padding-bottom: 76px; background: var(--tint); }
.tb4-home-v4 .service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tb4-home-v4 .card {
  background: var(--white);
  border: 0;
  border-top: 4px solid var(--green);
  border-radius: 12px;
  padding: 28px 24px 26px;
  box-shadow: 0 1px 2px rgba(35,31,32,.06), 0 12px 28px -14px rgba(35,31,32,.22);
}
.tb4-home-v4 .card-icon { margin-bottom: 14px; }
.tb4-home-v4 .card h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.25; }
.tb4-home-v4 .card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }

/* ---------- Featured work (white) ---------- */
.tb4-home-v4 .featured { padding-top: 76px; padding-bottom: 80px; background: var(--white); }
.tb4-home-v4 .feature-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: center;
  margin-top: 14px;
  background: var(--white);
  border: 1px solid #ececec;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 40px -22px rgba(35,31,32,.35);
}
.tb4-home-v4 .feature-photo { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.tb4-home-v4 .feature-body { padding: 20px 32px 28px 8px; }
.tb4-home-v4 .feature-body .eyebrow { color: var(--muted); margin-bottom: 6px; }
.tb4-home-v4 .feature-body h3 { margin: 0 0 12px; font-size: 28px; line-height: 1.2; font-weight: 700; }
.tb4-home-v4 .feature-body p { margin: 0 0 10px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.tb4-home-v4 .feature-body .tags {
  margin-bottom: 18px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase !important;
  color: var(--muted);
}

/* ---------- Testimonials (solid green band, UIkit slideshow) ---------- */
.tb4-home-v4 .testimonials { padding-top: 60px; padding-bottom: 44px; background: var(--green); color: #fff; }
.tb4-home-v4 .testimonials::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--grad);
  opacity: .9;
}
/* Stack all slides in one grid cell so the band is always as tall as the
 * tallest quote (no page jump). Overrides UIkit's absolute positioning,
 * the 16:9 aspect-ratio and display:none on inactive slides. */
.tb4-home-v4 .tst-items {
  display: grid !important;
  position: relative;
  overflow: hidden;
  aspect-ratio: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
}
.tb4-home-v4 .tst-items > li {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  grid-area: 1 / 1;
  overflow: visible;
  margin: 0;
}
.tb4-home-v4 .tst.uk-slideshow .tst-items > li:not(.uk-active):not(.uk-transition-active) { visibility: hidden; }
/* no-JS fallback: show only the first quote */
.tb4-home-v4 .tst:not(.uk-slideshow) .tst-items > li:not(:first-child) { visibility: hidden; }

.tb4-home-v4 .tst .quote {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  align-items: center;
  height: 100%;
}
.tb4-home-v4 .tst .quote blockquote p {
  margin: 0;
  color: #fff;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.5;
}
.tb4-home-v4 .tst .quote figcaption {
  align-self: center;
  padding-left: 20px;
  border-left: 1px solid rgba(255,255,255,.45);
  color: #fff;
  font-style: normal;
}
.tb4-home-v4 .tst .quote figcaption strong { display: block; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.3; }
.tb4-home-v4 .tst .quote figcaption span { display: block; margin-top: 3px; color: #E6F4D6; font-size: 13px; line-height: 1.4; }

.tb4-home-v4 .tst-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}
.tb4-home-v4 .tst-dots { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 0 -10px; padding: 0; }
.tb4-home-v4 .tst-dots > * { padding-left: 10px; margin: 0; }
.tb4-home-v4 .tst-dots > * > * {
  display: block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.35) !important;
  border: 1px solid rgba(255,255,255,.7) !important;
  font-size: 0 !important;
  line-height: 0;
  overflow: hidden;
  transition: background-color .2s ease, transform .2s ease;
}
.tb4-home-v4 .tst-dots > * > :hover,
.tb4-home-v4 .tst-dots > * > :focus-visible { background: rgba(255,255,255,.7) !important; }
.tb4-home-v4 .tst-dots > .uk-active > * { background: #fff !important; border-color: #fff !important; transform: scale(1.15); }
.tb4-home-v4 .tst-dots > * > :focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.tb4-home-v4 .tst-all { color: #fff !important; font-size: 14px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.5); white-space: nowrap; }
.tb4-home-v4 .tst-all:hover { border-bottom-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .tb4-home-v4 .tst-items > li,
  .tb4-home-v4 .tst-dots > * > * { transition: none !important; animation: none !important; }
}

/* ---------- Tablet / mobile ---------- */
@media (max-width: 960px) {
  .tb4-home-v4 .hero h1 { font-size: 40px; }
  .tb4-home-v4 .trust { grid-template-columns: 1fr 1fr; gap: 22px 20px; }
}
@media (max-width: 860px) {
  .tb4-home-v4 { --gut: 20px; }
  .tb4-home-v4 .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 28px;
    padding-bottom: 40px;
    min-height: 0;
  }
  .tb4-home-v4 .hero h1 { font-size: 34px; max-width: none; }
  .tb4-home-v4 .hero-art { order: -1; }
  .tb4-home-v4 .hero-art img { max-width: 380px; margin: 0 auto; }
  .tb4-home-v4 .hero-ctas { gap: 10px; }
  .tb4-home-v4 .hero-ctas .text-link { width: auto; margin-top: 4px; }
  .tb4-home-v4 .trust { padding-top: 28px; padding-bottom: 30px; gap: 20px 14px; }
  .tb4-home-v4 .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tb4-home-v4 .section-head h2 { font-size: 30px; }
  .tb4-home-v4 .section-head .text-link { padding-bottom: 0; }
  .tb4-home-v4 .section-intro { font-size: 16px; margin-bottom: 24px; }
  .tb4-home-v4 .services { padding-top: 52px; padding-bottom: 56px; }
  .tb4-home-v4 .service-grid { grid-template-columns: 1fr; gap: 16px; }
  .tb4-home-v4 .featured { padding-top: 52px; padding-bottom: 56px; }
  .tb4-home-v4 .feature-card { grid-template-columns: 1fr; gap: 0; }
  .tb4-home-v4 .feature-body { padding: 20px; }
  .tb4-home-v4 .feature-body h3 { font-size: 24px; }
  .tb4-home-v4 .feature-photo { min-height: 180px; max-height: 220px; }
  .tb4-home-v4 .testimonials { padding-top: 44px; padding-bottom: 36px; }
  .tb4-home-v4 .tst .quote { grid-template-columns: 1fr; gap: 16px; align-content: start; }
  .tb4-home-v4 .tst .quote blockquote p { font-size: 18px; line-height: 1.5; }
  .tb4-home-v4 .tst .quote figcaption { border-left: 0; padding-left: 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.45); }
  .tb4-home-v4 .tst-nav { flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 24px; }
}
@media (max-width: 400px) {
  .tb4-home-v4 .hero h1 { font-size: 32px; }
}
