/* ==========================================================================
   White River Recovery — Landing page v2
   Conversion layer: hero form card, contact buttons, footer form, CTA bands.

   MOBILE FIRST. Every base rule below describes the phone. Wider screens are
   layered on with min-width queries only. Breakpoints: 560px, 820px, 1024px.

   Loaded AFTER each page's inline <style> so equal-specificity rules win.
   Depends on the design tokens in brand.css (:root).

   Contact routing, do not "fix" without checking:
     tel:   +31 970 1027 4987   (Dutch CallTrackingMetrics line)
     wa.me  +27 67 389 4020     (South Africa)
   ========================================================================== */

/* --------------------------------------------------------------------------
   CONTACT BUTTONS — phone and WhatsApp are always buttons, never text links.
   Two contexts: on the dark hero, and on light sections.
   -------------------------------------------------------------------------- */
.btn-contact{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  min-height:58px;
  padding:16px 22px;
  border-radius:99px;
  font-family:var(--display);
  font-weight:600;
  font-size:17px;
  letter-spacing:.005em;
  line-height:1.2;
  text-align:center;
  transition:background .22s, color .22s, transform .22s, border-color .22s;
}
.btn-contact svg{width:20px;height:20px;flex-shrink:0}
.btn-contact:hover{transform:translateY(-2px)}

/* Phone — the primary contact action */
.btn-contact.is-phone{
  background:var(--white);
  color:var(--blue-deep);
  border:1.5px solid var(--white);
}
.btn-contact.is-phone:hover{background:var(--accent);border-color:var(--accent);color:var(--blue-darker)}
.btn-contact.is-phone .num{font-size:17px;letter-spacing:-.01em;white-space:nowrap}

/* WhatsApp — its own recognisable colour, it is a third-party channel */
.btn-contact.is-whatsapp{
  background:#25D366;
  color:#06301A;
  border:1.5px solid #25D366;
}
.btn-contact.is-whatsapp:hover{background:#1EBE5B;border-color:#1EBE5B;color:#052a17}

/* On light sections the phone button needs a filled treatment instead */
.on-light .btn-contact.is-phone{
  background:var(--blue-primary);
  color:var(--white);
  border-color:var(--blue-primary);
}
.on-light .btn-contact.is-phone:hover{background:var(--blue-deep);border-color:var(--blue-deep);color:var(--white)}

.contact-buttons{
  display:flex;
  flex-direction:column;
  gap:12px;
  width:100%;
}
.contact-buttons-note{
  font-size:16px;
  line-height:1.5;
  color:#A9C4DA;
  margin-top:4px;
}
.on-light .contact-buttons-note{color:var(--ink-mute)}

/* --------------------------------------------------------------------------
   HERO v2 — photo becomes a full-bleed background, text inverts to white.
   -------------------------------------------------------------------------- */
.hero.hero-v2{
  position:relative;
  padding:32px 20px 40px;
  background:var(--blue-darker);
  overflow:hidden;
}

/* The v1 rule paints .hero::before as a 520px decorative circle. Every one of
   those geometry properties must be unset, or the photo renders as a circle. */
.hero.hero-v2::before{
  content:'';
  position:absolute;
  inset:0;
  top:0;right:0;bottom:0;left:0;
  width:auto;height:auto;
  border-radius:0;
  background:var(--hero-img) center 38% / cover no-repeat;
  z-index:0;
}
.hero.hero-v2::after{
  content:'';
  position:absolute;inset:0;
  background:linear-gradient(180deg, rgba(8,39,67,.90) 0%, rgba(8,39,67,.93) 100%);
  z-index:1;
}
.hero.hero-v2 .hero-grid{
  position:relative;
  z-index:2;
  max-width:1280px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr;
  gap:32px;
  align-items:center;
}
.hero.hero-v2 .hero-eyebrow{color:var(--accent)}
.hero.hero-v2 .hero-eyebrow::before{background:var(--accent)}
.hero.hero-v2 .hero-title{color:var(--white)}
.hero.hero-v2 .hero-title em{color:var(--accent)}
.hero.hero-v2 .hero-lead{color:#D2E2EF;max-width:540px}

.hero-v2-points{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:11px;
  margin:22px 0 24px;
}
.hero-v2-points li{
  display:flex;
  align-items:flex-start;
  gap:11px;
  font-size:16px;
  line-height:1.5;
  color:#E4EEF6;
}
.hero-v2-points svg{
  width:20px;height:20px;
  flex-shrink:0;margin-top:2px;
  color:var(--accent);
}

/* The v1 inline CSS makes .hero-secondary a flex row, which squeezes the button
   row and floats the note beside it. Reset to block and let the children stack. */
.hero.hero-v2 .hero-secondary{
  display:block;
  padding-top:20px;
  border-top:1px solid var(--line-light);
}
.hero.hero-v2 .contact-buttons{max-width:520px}

/* --------------------------------------------------------------------------
   THE FORM CARD
   -------------------------------------------------------------------------- */
.wrr-form-card{
  background:var(--white);
  border-radius:10px;
  padding:26px 20px 24px;
  box-shadow:0 18px 48px rgba(8,39,67,.28);
  position:relative;
}
.wrr-form-card .form-eyebrow{
  font-family:var(--display);font-weight:600;
  font-size:16px;text-transform:uppercase;letter-spacing:.2em;
  color:var(--blue-primary);
  margin-bottom:10px;
}
.wrr-form-card h2,
.wrr-form-card h3{
  font-family:var(--display);font-weight:600;
  font-size:24px;line-height:1.2;letter-spacing:-.018em;
  color:var(--blue-deep);
  margin-bottom:10px;
}
.wrr-form-card .form-sub{
  font-size:16px;line-height:1.55;
  color:var(--ink-soft);
  margin-bottom:22px;
}
.wrr-form-card.is-wide{
  box-shadow:0 14px 36px rgba(8,39,67,.10);
  border:1px solid var(--line);
}

/* --------------------------------------------------------------------------
   FIELDS — 56px targets, visible focus ring, inline errors
   -------------------------------------------------------------------------- */
.wrr-field{display:flex;flex-direction:column;margin-bottom:18px}
.wrr-field > label{
  font-family:var(--display);font-weight:600;
  font-size:16px;
  color:var(--blue-deep);
  margin-bottom:7px;
  letter-spacing:-.005em;
}

.wrr-field input,
.wrr-field textarea,
.wrr-field select{
  font-family:var(--body);
  /* 16px is also what stops iOS Safari zooming the viewport on focus. */
  font-size:16px;
  line-height:1.5;
  color:var(--ink);
  background:var(--white);
  border:1.5px solid var(--line-strong);
  border-radius:6px;
  padding:15px 14px;
  min-height:56px;
  width:100%;
  outline:none;
  transition:border-color .18s, box-shadow .18s;
  -webkit-appearance:none;appearance:none;
}
.wrr-field textarea{min-height:104px;resize:vertical;line-height:1.6}
.wrr-field input::placeholder,
.wrr-field textarea::placeholder{color:var(--ink-mute);opacity:1}

.wrr-field input:focus,
.wrr-field textarea:focus,
.wrr-field select:focus{
  border-color:var(--blue-primary);
  box-shadow:0 0 0 3px rgba(28,117,188,.18);
}

/* Phone: country code stacks above the number on the narrowest screens */
.wrr-phone{display:grid;grid-template-columns:1fr;gap:10px}
.wrr-phone select{
  padding-right:34px;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5C70' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 11px center;
  background-size:16px 16px;
  cursor:pointer;
}

.wrr-field.has-error input,
.wrr-field.has-error textarea,
.wrr-field.has-error select{border-color:#C0392B}
.wrr-field.has-error input:focus,
.wrr-field.has-error textarea:focus{box-shadow:0 0 0 3px rgba(192,57,43,.16)}
.wrr-error{
  font-size:16px;line-height:1.4;
  color:#A32B1E;
  margin-top:6px;
  display:none;
}
.wrr-field.has-error .wrr-error{display:block}

/* Honeypot — hidden from humans, present for bots */
.wrr-hp{
  position:absolute !important;
  left:-9999px;
  width:1px;height:1px;
  overflow:hidden;
}

/* --------------------------------------------------------------------------
   SUBMIT + TRUST
   -------------------------------------------------------------------------- */
.wrr-submit{
  font-family:var(--display);font-weight:600;
  background:var(--blue-primary);
  color:var(--white);
  width:100%;
  min-height:60px;
  padding:18px 24px;
  font-size:17px;letter-spacing:.005em;
  border-radius:99px;
  display:inline-flex;justify-content:center;align-items:center;gap:12px;
  transition:background .22s, transform .22s, opacity .22s;
  margin-top:6px;
}
.wrr-submit:hover:not(:disabled){background:var(--blue-deep);transform:translateY(-2px)}
.wrr-submit:disabled{opacity:.72;cursor:progress;transform:none}
.wrr-submit svg{width:18px;height:18px}
.wrr-submit .spinner{
  width:18px;height:18px;
  border:2px solid rgba(255,255,255,.4);
  border-top-color:var(--white);
  border-radius:50%;
  animation:wrr-spin .7s linear infinite;
  display:none;
}
.wrr-submit.is-busy .spinner{display:block}
.wrr-submit.is-busy .arrow{display:none}
@keyframes wrr-spin{to{transform:rotate(360deg)}}

.wrr-form-error{
  display:none;
  margin-top:14px;
  padding:14px 16px;
  border-radius:6px;
  background:#FDF0EE;
  border:1px solid rgba(192,57,43,.28);
  color:#A32B1E;
  font-size:16px;line-height:1.5;
}
.wrr-form-error.is-visible{display:block}
.wrr-form-error a{color:#A32B1E;text-decoration:underline;font-weight:600}

.wrr-privacy{
  font-size:16px;line-height:1.5;
  color:var(--ink-mute);
  margin-top:14px;
}
.wrr-privacy a{color:var(--blue-primary);text-decoration:underline}

.wrr-trust{
  display:flex;flex-wrap:wrap;gap:10px 18px;
  margin-top:20px;padding-top:18px;
  border-top:1px solid var(--line);
}
.wrr-trust li{
  list-style:none;
  display:flex;align-items:center;gap:8px;
  font-size:16px;line-height:1.35;
  color:var(--ink-soft);
}
.wrr-trust svg{width:17px;height:17px;color:var(--blue-primary);flex-shrink:0}

/* --------------------------------------------------------------------------
   INLINE CTA BANDS
   -------------------------------------------------------------------------- */
.cta-band{background:var(--blue-soft);padding:40px 20px}
.cta-band.is-dark{background:var(--blue-deep)}
.cta-band-inner{
  max-width:1080px;margin:0 auto;
  display:flex;flex-direction:column;align-items:flex-start;
  gap:22px;
}
.cta-band-copy{flex:1 1 auto}
.cta-band h3{
  font-family:var(--display);font-weight:600;
  font-size:24px;line-height:1.25;letter-spacing:-.018em;
  color:var(--blue-deep);
  margin-bottom:8px;
}
.cta-band p{
  font-size:16px;line-height:1.6;
  color:var(--ink-soft);
  max-width:620px;
}
.cta-band.is-dark h3{color:var(--white)}
.cta-band.is-dark h3 em{font-style:normal;color:var(--accent)}
.cta-band.is-dark p{color:#C5D5E4}

.cta-band-actions{
  display:flex;flex-direction:column;
  gap:12px;width:100%;
}

.btn-consult{
  font-family:var(--display);font-weight:600;
  background:var(--blue-primary);
  color:var(--white);
  width:100%;
  padding:18px 28px;
  min-height:60px;
  font-size:17px;letter-spacing:.005em;
  border-radius:99px;
  display:inline-flex;align-items:center;justify-content:center;gap:12px;
  transition:background .22s, transform .22s;
}
.btn-consult:hover{background:var(--blue-deep);transform:translateY(-2px)}
.btn-consult svg{width:18px;height:18px}
.cta-band.is-dark .btn-consult{background:var(--accent);color:var(--blue-darker)}
.cta-band.is-dark .btn-consult:hover{background:var(--white);color:var(--blue-deep)}

/* --------------------------------------------------------------------------
   FOOTER FORM SECTION
   -------------------------------------------------------------------------- */
.form-section{background:var(--white);padding:56px 20px}
.form-section-inner{max-width:1180px;margin:0 auto}
.form-section-grid{
  display:flex;
  flex-direction:column;
  gap:36px;
  margin-top:36px;
}
/* On a phone the form comes first: it is why the visitor scrolled this far. */
.form-section-grid .wrr-form-card{order:-1}

.form-reassure{display:flex;flex-direction:column;gap:24px}
.form-reassure-item{display:grid;grid-template-columns:48px 1fr;gap:16px;align-items:start}
.form-reassure-ic{
  width:48px;height:48px;border-radius:50%;
  background:var(--blue-soft);color:var(--blue-primary);
  display:grid;place-items:center;flex-shrink:0;
}
.form-reassure-ic svg{width:21px;height:21px}
.form-reassure-item h4{
  font-family:var(--display);font-weight:600;font-size:18px;
  color:var(--blue-deep);margin-bottom:5px;letter-spacing:-.008em;
}
.form-reassure-item p{font-size:16px;line-height:1.65;color:var(--ink-soft)}

.form-alt-contact{margin-top:4px;padding-top:24px;border-top:1px solid var(--line)}
.form-alt-contact .lbl{
  font-family:var(--display);font-weight:600;
  font-size:16px;text-transform:uppercase;letter-spacing:.2em;
  color:var(--ink-soft);margin-bottom:14px;
}

/* --------------------------------------------------------------------------
   STICKY MOBILE BAR — three actions
   -------------------------------------------------------------------------- */
.sticky-mobile-inner.is-three{grid-template-columns:1fr 1fr 1.12fr;gap:7px}
.sticky-mobile a.call{background:var(--white);color:var(--blue-deep)}
.sticky-mobile a.wa{background:#25D366;color:#06301A;border:none}
.sticky-mobile a.consult{background:var(--accent);color:var(--blue-darker)}
.sticky-mobile a{font-size:16px;padding:13px 4px;gap:6px}
.sticky-mobile a svg{width:16px;height:16px}

/* ==========================================================================
   >= 560px — roomier phone / small tablet
   ========================================================================== */
@media (min-width:560px){
  .hero.hero-v2{padding:40px 24px 48px}
  .wrr-phone{grid-template-columns:minmax(150px,172px) 1fr}
  .wrr-form-card{padding:30px 26px 26px}
  .cta-band{padding:48px 24px}
  .cta-band h3{font-size:26px}
  .cta-band-actions{flex-direction:row;width:auto}
  .btn-consult{width:auto}
  .contact-buttons{flex-direction:row;flex-wrap:wrap}
  .btn-contact{width:auto;flex:1 1 220px}
  .form-section{padding:72px 24px}
}

/* ==========================================================================
   >= 820px — tablet
   ========================================================================== */
@media (min-width:820px){
  .cta-band-inner{
    flex-direction:row;align-items:center;justify-content:space-between;gap:32px;
  }
  .cta-band-copy{flex:1 1 420px}
  .cta-band-actions{width:auto;flex-shrink:0}
  .btn-consult{white-space:nowrap}
  .form-section-grid{
    display:grid;grid-template-columns:.85fr 1.15fr;gap:48px;align-items:start;
  }
  /* Wide enough for side-by-side: restore reading order. */
  .form-section-grid .wrr-form-card{order:0}
  .wrr-form-card.is-wide{padding:40px 36px 32px}
}

/* ==========================================================================
   >= 1024px — desktop: hero becomes two columns
   ========================================================================== */
@media (min-width:1024px){
  .hero.hero-v2{padding:56px 32px 64px}
  .hero.hero-v2::after{
    background:linear-gradient(100deg, rgba(8,39,67,.93) 0%, rgba(8,39,67,.80) 34%, rgba(8,39,67,.42) 64%, rgba(8,39,67,.58) 100%);
  }
  .hero.hero-v2 .hero-grid{grid-template-columns:1.02fr .98fr;gap:56px}
  .wrr-form-card{padding:36px 34px 30px}
  .wrr-form-card h2,.wrr-form-card h3{font-size:28px}
  .cta-band{padding:56px 32px}
  .cta-band h3{font-size:28px}
  .form-section{padding:112px 32px}
  .form-section-grid{gap:64px;margin-top:56px}
  .wrr-form-card.is-wide{padding:48px 48px 40px}
  .btn-contact{flex:0 1 auto}
  .btn-consult{font-size:18px;padding:19px 34px}
}

/* --------------------------------------------------------------------------
   Preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  .wrr-submit,.btn-consult,.btn-contact{transition:none}
  .wrr-submit:hover:not(:disabled),.btn-consult:hover,.btn-contact:hover{transform:none}
  .wrr-submit .spinner{animation-duration:1.6s}
}
