/* ------------------------------------------------------------------
   Core-block compatibility layer.
   The homepage is authored in Gutenberg, so these rules map core block
   markup (wp-block-group, wp-block-columns, wp-block-button, wp-block-cover)
   onto the TB Tober design. Keep in sync with main.css.
   ------------------------------------------------------------------ */

/* Core blocks bring their own flow margins; sections control spacing here. */
.tb-body :where(.wp-block-group, .wp-block-columns, .wp-block-column) { margin-block: 0; }
.tb-body .entry-content > * { margin-block: 0; }

/* ---------- Container ---------- */
.tb-body .tb-container.wp-block-group {
  max-width: var(--tb-container);
  margin-inline: auto;
  padding-inline: var(--tb-gutter);
}
@media (min-width: 1024px) { .tb-body .tb-container.wp-block-group { padding-inline: var(--tb-gutter-lg); } }

/* ---------- Buttons ---------- */
.tb-body .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }
.tb-body .wp-block-button { margin: 0; }
.tb-body .wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--tb-radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.tb-body .wp-block-button.tb-btn--primary .wp-block-button__link { background: var(--tb-accent-action); color: #fff; }
.tb-body .wp-block-button.tb-btn--primary .wp-block-button__link:hover { background: var(--tb-accent-dark); color: #fff; }

.tb-body .wp-block-button.tb-btn--outline-light .wp-block-button__link { background: transparent; border-color: #fff; color: #fff; }
.tb-body .wp-block-button.tb-btn--outline-light .wp-block-button__link:hover { background: #fff; color: var(--tb-ground); }

.tb-body .wp-block-button.tb-btn--outline-accent .wp-block-button__link { background: transparent; border-color: var(--tb-accent); color: var(--tb-accent); }
.tb-body .wp-block-button.tb-btn--outline-accent .wp-block-button__link:hover { background: var(--tb-accent); color: #fff; }

/* Arrow on the primary call to action, kept in CSS so editing the label cannot lose it */
.tb-body .wp-block-button.tb-btn--arrow .wp-block-button__link::after {
  content: "";
  width: 1rem;
  height: 1rem;
  flex: none;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .25s ease;
}
.tb-body .wp-block-button.tb-btn--arrow .wp-block-button__link:hover::after { transform: translateX(4px); }

/* ---------- Hero ---------- */
.tb-body .tb-hero .tb-hero__media .wp-block-image,
.tb-body .tb-hero .tb-hero__media figure { margin: 0; height: 100%; }
.tb-body .tb-hero .tb-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; opacity: .7; transform: none; }
.tb-body .tb-hero .tb-hero__lead { color: var(--tb-on-ground); font-size: 1.125rem; line-height: 1.7; max-width: 36rem; margin-bottom: var(--tb-lg); }
.tb-body .tb-hero h1 { color: #fff; font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.08; margin-bottom: var(--tb-md); }

/* ---------- Photo cards built on core/cover ---------- */
.tb-body .tb-cards.wp-block-columns { gap: var(--tb-md); margin-top: 4rem; }
@media (max-width: 781px) { .tb-body .tb-cards.wp-block-columns { flex-wrap: wrap; } }
.tb-body .tb-card.wp-block-cover {
  min-height: 20rem;
  border-radius: var(--tb-radius-xl);
  overflow: hidden;
  padding: 1.75rem;
  align-items: flex-end;
}
.tb-body .tb-card.wp-block-cover .wp-block-cover__image-background { transition: transform .5s ease; }
.tb-body .tb-card.wp-block-cover:hover .wp-block-cover__image-background { transform: scale(1.05); }
.tb-body .tb-card .wp-block-cover__inner-container { width: 100%; }
.tb-body .tb-card h3 {
  color: #fff;
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 8px;
}
.tb-body .tb-card h3::before {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  background: rgba(255,255,255,.5);
  margin-bottom: 0.75rem;
}
.tb-body .tb-card p { color: rgba(255,255,255,.78); font-size: 1.0625rem; margin: 0; max-width: none; }

/* ---------- Uber-uns split ---------- */
.tb-body .tb-split.wp-block-columns { gap: 0; max-width: var(--tb-container); margin-inline: auto; align-items: stretch; }
.tb-body .tb-split .tb-split__copy { padding: var(--tb-section) var(--tb-gutter); display: flex; align-items: center; }
@media (min-width: 1024px) { .tb-body .tb-split .tb-split__copy { padding-inline: 3rem; } }
.tb-body .tb-split .tb-split__copy > * { max-width: 32rem; }
.tb-body .tb-split h2 { font-size: clamp(1.75rem, 3.6vw, 3rem); margin-bottom: 32px; }
.tb-body .tb-split p { color: var(--tb-ink-soft); }
.tb-body .tb-split .tb-split__media { position: relative; min-height: 500px; }
.tb-body .tb-split .tb-split__media figure,
.tb-body .tb-split .tb-split__media .wp-block-image { margin: 0; height: 100%; }
.tb-body .tb-split .tb-split__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tb-body .tb-split .tb-signature { color: var(--tb-accent); font-size: 1.75rem; margin: var(--tb-lg) 0 0; }
.tb-body .tb-split .tb-signature + p { font-size: .875rem; color: var(--tb-ink-soft); margin-top: 4px; }

/* ---------- Value proposition cards ---------- */
.tb-body .tb-vp.wp-block-group { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 768px) { .tb-body .tb-vp.wp-block-group { grid-template-columns: repeat(2, 1fr); } }
.tb-body .tb-vp .tb-vp__card {
  background: var(--tb-ground);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--tb-radius-xl);
  padding: 2.5rem;
  transition: background-color .3s ease, border-color .3s ease;
}
.tb-body .tb-vp .tb-vp__card:hover { background: rgba(0,89,200,.6); border-color: rgba(0,89,200,.6); }
.tb-body .tb-vp .tb-vp__card::before {
  content: "";
  display: block;
  width: 3rem;
  height: 3rem;
  border-radius: var(--tb-radius-lg);
  background-color: var(--tb-accent-action);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.75rem 1.75rem;
  margin-bottom: var(--tb-md);
}
.tb-body .tb-vp .tb-vp--target::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E"); }
.tb-body .tb-vp .tb-vp--chart::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round'%3E%3Cline x1='6' y1='20' x2='6' y2='13'/%3E%3Cline x1='12' y1='20' x2='12' y2='7'/%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3C/svg%3E"); }
.tb-body .tb-vp .tb-vp--shield::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E"); }
.tb-body .tb-vp .tb-vp--hexagon::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpolygon points='12,2 21,7 21,17 12,22 3,17 3,7'/%3E%3C/svg%3E"); }
.tb-body .tb-vp .tb-vp__card h3 {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.4;
  margin: 0 0 var(--tb-sm);
}
.tb-body .tb-vp .tb-vp__card p { color: rgba(255,255,255,.7); margin: 0; font-size: 1rem; max-width: none; }

/* ---------- USP band ---------- */
.tb-body .tb-usp.wp-block-group { background: var(--tb-ground-deep); padding-block: var(--tb-section); }
@media (min-width: 1024px) { .tb-body .tb-usp.wp-block-group { padding-block: var(--tb-section-lg); } }
.tb-body .tb-usp__grid.wp-block-columns { gap: 4rem; align-items: flex-start; }
@media (min-width: 1024px) { .tb-body .tb-usp__grid.wp-block-columns { gap: 6rem; } }
.tb-body .tb-usp .tb-eyebrow { color: var(--tb-accent-soft); }
.tb-body .tb-usp h2 { color: #fff; font-size: clamp(1.75rem, 3.6vw, 3rem); font-weight: 700; line-height: 1.12; margin-bottom: var(--tb-md); }
.tb-body .tb-usp p { color: rgba(255,255,255,.6); }

/* Numbers come from a counter, so adding or removing a line renumbers itself */
.tb-body ul.tb-usp__list { list-style: none; margin: 0; padding: 0; counter-reset: tbusp; }
.tb-body ul.tb-usp__list li {
  counter-increment: tbusp;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding-block: var(--tb-md);
  border-top: 1px solid rgba(255,255,255,.15);
  color: #fff;
  font-size: 1.125rem;
  line-height: 1.4;
}
.tb-body ul.tb-usp__list li:first-child { border-top: 0; padding-top: 0; }
.tb-body ul.tb-usp__list li::before {
  content: counter(tbusp, decimal-leading-zero);
  color: var(--tb-accent-soft);
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  flex: none;
  padding-top: 4px;
}

/* ---------- Editor parity ---------- */
.editor-styles-wrapper .tb-hero,
.editor-styles-wrapper .tb-usp { color: #fff; }

/* ---------- Corrections after screenshot comparison ---------- */

/* The blanket margin reset above also killed section spacing; restore it. */
.tb-body .entry-content > .tb-split-section { margin-bottom: var(--tb-section); }

/* Services band uses the source's asymmetric padding (pt-20 pb-28). */
.tb-body .entry-content > .tb-section:first-of-type { padding-bottom: 112px; }

/* Hero media must be a full-height layer, not a flow image. */
.tb-body .tb-hero .tb-hero__media { position: absolute; right: 0; top: 0; bottom: 0; width: 50%; }
.tb-body .tb-hero .tb-hero__media figure,
.tb-body .tb-hero .tb-hero__media .wp-block-image { margin: 0; height: 100%; }
.tb-body .tb-hero .tb-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--tb-ground) 0%, rgba(30,46,76,.5) 50%, rgba(30,46,76,0) 100%);
}
@media (max-width: 1023px) { .tb-body .tb-hero .tb-hero__media { display: none; } }

/* Footer: logo matches the source's 40px, columns are equal. */
.tb-footer__logo img { height: 40px; }
.tb-footer__grid { gap: 48px; }
@media (min-width: 1024px) { .tb-footer__grid { grid-template-columns: repeat(4, 1fr); } }