/* =============================================================
   HOMEPAGE V2 — TCF Reskin 2026
   Inner shell pattern: section = full-width bg,
   .hpv2-shell = max-width 1500px + 40px padding container
   ============================================================= */

:root {
  --tcf-blue:    #004766;
  --tcf-green:   #709C59;
  --light-green: #a3b861;
  --tcf-yellow:  #deb54c;
  --tcf-grey:    #434953;
  --tcf-charcoal:#414042;
}

.hpv2 {
  font-family: 'Roboto', sans-serif;
  color: #000;
}

/* ---- Container helpers ---- */

/* Inner shell — controls max width + horizontal padding */
.hpv2-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---- Shared headings ---- */
.hpv2 h1,
.hpv2 h2,
.hpv2 h3 {
  font-family: 'Visby Round CF', sans-serif;
  font-weight: 700;
  margin: 0;
  line-height: 1;
}

/* ---- Shared button pill ---- */
.hpv2-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--tcf-blue);
  color: #fff !important;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 0.7;
  text-decoration: none !important;
  text-transform: uppercase;
  padding: 0 22px;
  height: 48px;
  box-sizing: border-box;
  border-radius: 100px;
  border: 0; /* theme paints 3px solid on <button> elements */
  transition: opacity 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}
.hpv2-btn:hover {
  opacity: 0.9;
  color: #fff !important;
}
.hpv2-btn::after {
  content: '';
  width: 7px;
  height: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='13' viewBox='0 0 7 13'%3E%3Cpath d='M0.5 0.5L6 6.5L0.5 12.5' stroke='white' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.hpv2-btn--green { background: var(--light-green); }

/* ---- Button variants ---- */
.hpv2-btn--outline {
  background: transparent;
  border: 2px solid var(--tcf-blue);
  color: var(--tcf-blue) !important;
  padding: 0 20px;
}
.hpv2-btn--outline::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='13' viewBox='0 0 7 13'%3E%3Cpath d='M0.5 0.5L6 6.5L0.5 12.5' stroke='%23004766' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
}
.hpv2-btn--outline:hover {
  background: var(--tcf-blue);
  color: #fff !important;
  opacity: 1;
}
.hpv2-btn--outline:hover::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='13' viewBox='0 0 7 13'%3E%3Cpath d='M0.5 0.5L6 6.5L0.5 12.5' stroke='white' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
}

/* ---- Contained band shell (yellow/green/grey) ---- */
.hpv2-band {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.hpv2-band__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 60px;
}
.hpv2-band h2 {
  font-size: 55px;
  line-height: 55px;
  color: #fff;
}
.hpv2-band p {
  font-size: 20px;
  line-height: 30px;
  color: #fff;
  font-weight: 400;
  margin: 20px 0 0;
}

/* ---- Band colour fallbacks ---- */
.hpv2-band--yellow { background-color: var(--tcf-yellow); }
.hpv2-band--green  { background-color: var(--tcf-green); }
.hpv2-band--grey   { background-color: var(--tcf-grey); }

/* ---- Section vertical rhythm ---- */
.hpv2 > section { margin-bottom: 40px; }

/* =============================================================
   1 — HERO
   ============================================================= */
.hpv2-hero { position: relative; }
.hpv2-hero__slide {
  position: relative;
  display: flex;
  align-items: center; /* vertical center of badge/heading/body/buttons */
  justify-content: flex-start;
  min-height: 640px;
  box-sizing: border-box;
}
/*
 * tiny-slider gallery parks inactive slides as absolute. Without a fixed
 * height on the gallery + 100% on items, flex centering has no box to
 * center in and content sticks to the top of shorter slides.
 */
.hpv2-hero .tns-outer,
.hpv2-hero .tns-inner,
.hpv2-hero .tns-ovh,
.hpv2-hero .tns-gallery {
  min-height: 640px;
}
.hpv2-hero .tns-gallery > .tns-item,
.hpv2-hero .tns-gallery > .hpv2-hero__slide {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  min-height: inherit;
  height: 100%;
}
.hpv2-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hpv2-hero__bg--mobile { display: none; }
/* Video background wrapper (fideo mp4 <video> or yt/vimeo <iframe>).
   Poster is a background-image fallback until the player cover-fills. */
.hpv2-hero__media { overflow: hidden; }
.hpv2-hero__media video,
.hpv2-hero__media iframe,
.hpv2-hero__media .fideo,
.hpv2-hero__media wistia-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  pointer-events: none;
}
.hpv2-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  padding-top: 50px;
  padding-bottom: 50px;
  /* Keep horizontal auto margins so .hpv2-shell (max-width 1500) centres. */
  margin-top: 0;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.hpv2-hero__badge {
  display: inline-block;
  background: var(--tcf-yellow);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 10px 20px;
  border-radius: 100px;
}
.hpv2-hero__heading {
  font-size: 90px;
  line-height: 90px;
  color: var(--light-green);
  max-width: 850px;
}
/* Per-slide heading colours (ACF button group). */
.hpv2-hero__heading--light-green { color: var(--light-green); }
.hpv2-hero__heading--navy        { color: var(--tcf-blue); }
.hpv2-hero__heading--white       { color: #fff; }
.hpv2-hero__heading--olive       { color: var(--tcf-green); }
.hpv2-hero__heading--grey        { color: var(--tcf-charcoal); }
.hpv2-hero__body {
  font-size: 20px;
  line-height: 30px;
  font-weight: 400;
  color: #000;
  max-width: 630px;
  margin: 0;
}
/* WYSIWYG body: keep <p> at the same size as the wrapper (theme p rules fight this). */
.hpv2-hero__body p {
  font-size: 20px;
  line-height: 30px;
  font-weight: 400;
  margin: 0 0 1em;
}
.hpv2-hero__body p:last-child {
  margin-bottom: 0;
}
/* Per-slide body colours. Triple class beats .hd .hpv2-hero__body navy lock. */
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--black,
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--black p { color: #000; }
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--navy,
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--navy p { color: var(--tcf-blue); }
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--grey,
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--grey p { color: var(--tcf-charcoal); }
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--white,
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--white p { color: #fff; }
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--light-green,
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--light-green p { color: var(--light-green); }
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--olive,
.hpv2-hero .hpv2-hero__body.hpv2-hero__body--olive p { color: var(--tcf-green); }
/* Primary + secondary CTAs side by side. */
.hpv2-hero__buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
/* Hero CTAs keep authored casing (shared .hpv2-btn forces uppercase). */
.hpv2-hero .hpv2-btn {
  text-transform: none;
}
/* Per-slide button fill (navy = base .hpv2-btn). */
.hpv2-hero .hpv2-btn--olive {
  background: var(--tcf-green);
}
.hpv2-hero .hpv2-btn--grey {
  background: var(--tcf-charcoal);
}

/* =============================================================
   2 — DELIVERY
   ============================================================= */
.hpv2-delivery__form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
/* !important: the theme's global `input[type="text"]` rules out-rank this
   class (40px height, 14px font, grey bg) — same fight as the GF fields. */
.hpv2-input {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.8) !important;
  color: var(--tcf-grey) !important;
  font-family: 'Roboto', sans-serif;
  font-size: 16px !important;
  line-height: normal !important;
  padding: 0 22px !important;
  height: 48px !important;
  box-sizing: border-box;
  border: 0 !important;
  border-radius: 100px !important;
  min-width: 200px;
  outline: none;
}
.hpv2-input::placeholder {
  color: var(--tcf-grey);
  opacity: 1;
}
.hpv2-input:focus { background: #fff !important; }
.hpv2-delivery__form .hpv2-btn[disabled] { cursor: default; }

/* =============================================================
   3 — AUDIENCE CARDS
   ============================================================= */
.hpv2-cards {
  background: #eaf0e6;
  padding: 40px 0;
}
.hpv2-cards__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.hpv2-card {
  display: flex;
  flex-direction: column;
  background: #fff;
}
.hpv2-card__media {
  overflow: hidden;
}
.hpv2-card__media img {
  display: block;
  width: 100%;
  height: 277px;
  object-fit: cover;
}
.hpv2-card__body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.hpv2-card .hpv2-card__heading {
  font-size: 28px;
  line-height: 32px;
  color: var(--tcf-blue);
  margin: 0 0 30px;
}
.hpv2-card__text {
  font-size: 18px;
  line-height: 27px;
  color: #000;
  margin: 0 0 30px;
}
.hpv2-card__text p { margin: 0 0 8px; font-size: 18px !important; line-height: 27px; }
.hpv2-card__text p:last-child { margin-bottom: 0; }
.hpv2-card__text strong { font-weight: 600; }
.hpv2-card__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

/* =============================================================
   4 — CATALOGUE (Gravity Form styling)
   ============================================================= */
/* Layout: text + form stacked on the left, product image on the right.
   Content must never be overlapped by the absolute image on the right. */
.hpv2-catalogue .hpv2-band__inner { align-items: center; }
.hpv2-catalogue__content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: calc(100% - 340px);
  padding-right: 20px;
}
/* Allow the rotated product image to overflow the band edges */
.hpv2-band--has-image { overflow: visible; }
.hpv2-catalogue__image {
  position: absolute;
  top: 50%;
  right: 80px;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}
.hpv2-catalogue__image img {
  display: block;
  width: 300px;
  max-width: 100%;
  height: auto;
  transform: rotate(10deg);
  box-shadow: 5px 10px 20px 5px rgba(0, 0, 0, 0.25);
}
.hpv2-catalogue__form {
  flex-shrink: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 12px;
}
/* Pull every gform row + footer onto the same flex line.
   .gform_wrapper and the <form> itself must also collapse, otherwise
   the whole form is a single flex item and the footer wraps below. */
.hpv2-catalogue__form .gform_wrapper,
.hpv2-catalogue__form .gform_wrapper form,
.hpv2-catalogue__form .gform-body,
.hpv2-catalogue__form .gform_fields,
.hpv2-catalogue__form .gform_footer {
  display: contents !important; /* survives gravity-theme's grid after AJAX validation re-render */
}
.hpv2-catalogue__form .gfield { flex: 1 1 200px; min-width: 0; margin: 0 !important; }
/* reCAPTCHA v3 token wrapper is a real (zero-width) flex item once the form
   is display:contents — it adds a phantom gap at the row start. Its hidden
   input still submits with display:none. */
.hpv2-catalogue__form .gf_invisible,
.hpv2-catalogue__form .gform_anchor { display: none !important; }
.hpv2-catalogue__form .gfield_label { display: none !important; }
.hpv2-catalogue__form .gform_heading,
.hpv2-catalogue__form .gform_required_legend { display: none !important; }
.hpv2-catalogue__form .gfield_description:not(.gfield_validation_message) { display: none !important; }
/* Validation: no bulky GF summary box (it inherits the band's 55px h2
   line-height); feedback is a red ring + compact message per field. */
.hpv2-catalogue__form .gform_validation_errors { display: none !important; }
.hpv2-catalogue__form .gfield_error input[type="text"],
.hpv2-catalogue__form .gfield_error input[type="email"] {
  box-shadow: inset 0 0 0 2px #c02b0a !important;
}
.hpv2-catalogue__form .gfield_validation_message {
  display: block !important;
  background: none !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
  margin: 6px 0 0 !important;
  padding: 0 0 0 22px !important;
}
/* !important: the Gravity Forms `gravity-theme` stylesheet loads after this
   file and re-styles inputs (14px font, grey bg, 0 16px padding). */
.hpv2-catalogue__form input[type="text"],
.hpv2-catalogue__form input[type="email"] {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 0 !important;
  border-radius: 100px !important;
  padding: 0 22px !important;
  font-size: 16px !important;
  font-family: 'Roboto', sans-serif;
  color: var(--tcf-grey) !important;
  width: 100%;
  height: 48px !important;
  box-sizing: border-box;
  outline: none;
}
.hpv2-catalogue__form .gform_footer { padding: 0; margin: 0; }
/* GF submit is an <input>, so ::after can't render — the chevron is a
   right-positioned background image instead (same SVG as .hpv2-btn). */
.hpv2-catalogue__form .gform_button {
  display: inline-flex;
  align-items: center;
  background-color: var(--tcf-blue) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='13' viewBox='0 0 7 13'%3E%3Cpath d='M0.5 0.5L6 6.5L0.5 12.5' stroke='white' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 22px center !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 100px !important;
  padding: 0 41px 0 22px !important; /* 22 edge + 7 arrow + 12 gap */
  font-family: 'Roboto', sans-serif;
  font-size: 16px !important;
  font-weight: 400 !important; /* theme bolds submit buttons */
  line-height: 0.7;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transform: none !important; /* theme scales buttons 1.05 on hover */
  transition: opacity 0.2s ease, background-color 0.2s ease !important;
  height: 48px !important;
  box-sizing: border-box;
}
.hpv2-catalogue__form .gform_button:hover,
.hpv2-catalogue__form .gform_button:focus {
  opacity: 0.9;
  transform: none !important;
}

/* GF success confirmation sits on the green band — force white text/links. */
.hpv2-catalogue .gform_confirmation_message,
.hpv2-catalogue .gform_confirmation_message * {
  color: #fff !important;
}
.hpv2-catalogue .gform_confirmation_message a { text-decoration: underline; }

/* Catalogue: body paragraph + form capped at 590px, heading uncapped */
.hpv2-catalogue .hpv2-band__text p { max-width: 590px; }
.hpv2-catalogue__form { max-width: 590px; }

/* Delivery: keep body copy on two lines like the design */
.hpv2-delivery .hpv2-band__text p { max-width: 590px; }

/* =============================================================
   5 — DIRECTOR
   ============================================================= */
.hpv2-director__grid {
  display: flex;
  align-items: flex-start;
  gap: 80px;
}
.hpv2-director__media {
  flex: 0 0 50%;
  overflow: hidden;
}
.hpv2-director__media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.hpv2-director__body { flex: 1; }
/* `.hpv2 .hpv2-director__heading` beats the `.hpv2 h2 { margin: 0 }` reset;
   a lone class selector loses that specificity fight. */
.hpv2 .hpv2-director__heading,
.hpv2-director__heading p {
  font-family: 'Visby Round CF', sans-serif;
  font-weight: 700;
  font-size: 45px;
  line-height: 55px;
  color: var(--tcf-green);
  margin: 0 0 30px;
}
.hpv2-director__text {
  font-size: 20px;
  line-height: 30px;
  font-weight: 400;
  color: #000;
  margin: 0 0 30px;
}

/* =============================================================
   6 — THE TCF DIFFERENCE
   ============================================================= */
.hpv2-difference__inner { align-items: center; }
.hpv2-difference h2 { color: var(--light-green); }
.hpv2-difference__text { flex: 0 0 auto; max-width: 630px; }
.hpv2-difference__features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  flex: 1;
  justify-items: center;
}
.hpv2-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 180px;
}
.hpv2-feature__icon {
  height: 100px;
  width: auto;
  margin-bottom: 20px;
}
.hpv2-feature__caption {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 22px;
  color: #fff;
}

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 991px) {
  .hpv2-shell { padding: 0 20px; }
  .hpv2-band__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 24px;
    gap: 24px;
  }
  .hpv2-band h2 { font-size: 36px; line-height: 40px; }
  .hpv2-band p { font-size: 16px; line-height: 26px; }

  .hpv2-hero__slide,
  .hpv2-hero .tns-outer,
  .hpv2-hero .tns-gallery { min-height: 640px; }
  .hpv2-hero__bg--desktop { display: none; }
  .hpv2-hero__bg--mobile { display: block; }
  .hpv2-hero__heading { font-size: 52px; line-height: 52px; }
  .hpv2-hero__body,
  .hpv2-hero__body p {
    font-size: 16px;
    line-height: 24px;
  }

  .hpv2-cards__grid { grid-template-columns: 1fr; gap: 40px; }
  .hpv2-card__buttons { margin-top: 20px; }

  .hpv2-catalogue__content { width: 100%; max-width: 100%; padding-right: 0; }
  .hpv2-catalogue__form { width: 100%; flex-wrap: wrap; }
  .hpv2-catalogue__form .gfield { flex: 1 1 100%; }
  .hpv2-catalogue__image { display: none; }

  .hpv2-director__grid { flex-direction: column; gap: 30px; }
  .hpv2-director__media { flex: 0 0 auto; width: 100%; }
  .hpv2-director__heading,
  .hpv2-director__heading p { font-size: 32px; line-height: 38px; }
  .hpv2-director__text { font-size: 16px; }

  .hpv2-difference__inner { flex-direction: column; align-items: flex-start; }
  .hpv2-difference__features { grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 10px; justify-items: center; }
  .hpv2-feature { width: 100%; max-width: 180px; }
}

@media (max-width: 480px) {
  .hpv2-delivery__form { flex-direction: column; align-items: stretch; width: 100%; }
  .hpv2-input { text-align: center; }
  .hpv2-delivery__form .hpv2-btn { justify-content: center; }
}
