/* =========================================================================
   Resthaven – Support at Home landing page
   ========================================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Druk Condensed";
  src: url("assets/fonts/DrukCondensed-Super.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Display Pro";
  src: url("assets/fonts/NeueHaasDisplayRoman.ttf") format("truetype");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Grotesk Display Pro";
  src: url("assets/fonts/NeueHaasDisplayBold.ttf") format("truetype");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

/* Body type: Neue Haas Grotesk Display Pro, loaded locally from
   assets/fonts/. Edge has previously rendered Roman as Bold — every rule
   declares an explicit font-weight value rather than relying on inheritance. */

:root {
  --red:       #d0343a;
  --light-blue:#2b7de1;
  --dark-blue: #002d74;
  --darkest:   #1c2d69;
  --white:     #ffffff;
  --ink:       #1a1a1a;
  --muted:     #4a4a4a;
  --hairline:  rgba(255,255,255,0.25);

  --ff-display: "Druk Condensed", "Helvetica Neue Condensed", "Impact", sans-serif;
  --ff-sans:    "Neue Haas Grotesk Display Pro", "neue-haas-grotesk-display", "Helvetica Neue", Arial, sans-serif;

  --container-max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);

  --radius: 8px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-sans);
  font-weight: 400; /* Roman */
  font-style: normal;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, video, svg { max-width: 100%; display: block; }

a { color: inherit; }

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid #ffd84a;
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* =========================================================================
   HEADER
   ========================================================================= */
.site-header {
  background: var(--red);
  color: var(--white);
  position: relative;
  z-index: 30;
}

/* When the mobile nav is open, blur only the inner content of each section
   (text, images, frames) — section background colours stay crisp so the
   layout structure remains visible. */
.hero__frame,
.hero__copy,
.two-col__inner,
.video__frame,
.about-strip p,
.site-footer__inner {
  transition: filter 0.25s ease;
}
body.nav-open .hero__frame,
body.nav-open .hero__copy,
body.nav-open .two-col__inner,
body.nav-open .video__frame,
body.nav-open .about-strip p,
body.nav-open .site-footer__inner {
  filter: blur(6px);
  pointer-events: none;
}
/* Subtle dim overlay so the blur feels intentional */
body.nav-open::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  z-index: 5;
  pointer-events: none;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 18px;
}

.logo img {
  height: 56px;
  width: auto;
}

/* Hamburger */
.menu-toggle {
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  padding: 10px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  color: var(--white);
}
.menu-toggle__bar {
  display: block;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: center;
  transition: transform .22s ease, opacity .22s ease;
}
/* When open, the top and bottom bars translate to the centre (10.5px = half of
   the 24px content area minus half a bar) and rotate 45° to form a clean X. */
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* Nav */
.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
}
.primary-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .01em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  border-bottom-color: var(--white);
}

/* Mobile nav */
@media (max-width: 980px) {
  .primary-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--red);
    border-top: 1px solid transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease, border-top-color .28s ease;
  }
  .primary-nav.is-open {
    max-height: 360px;
    border-top-color: var(--hairline);
  }
  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 24px;
  }
  .primary-nav li + li { border-top: 1px solid var(--hairline); }
  .primary-nav a {
    display: block;
    padding: 16px 0;
    font-size: 18px;
  }
}

@media (min-width: 981px) {
  .menu-toggle { display: none; }
  .primary-nav {
    display: flex;
    align-items: flex-end;
    align-self: stretch;
    padding-bottom: 10px;
  }
  .primary-nav ul {
    align-items: center;
  }
}

/* =========================================================================
   HERO — colour-block frame composition (campaign style guide p.12)
   Headline overlaid on the bottom-left of the image, inside the red frame.
   ========================================================================= */
.hero {
  background: var(--red);
  color: var(--white);
  position: relative;
}

.hero__inner {
  padding-top: clamp(8px, 1vw, 16px);
  padding-bottom: clamp(28px, 4vw, 56px);
  /* Bleed image to the left viewport edge; keep red gutter on the right */
  padding-right: var(--gutter);
}

.hero__frame {
  position: relative;
  border-top-right-radius: 24px;
  border-bottom-right-radius: 24px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 21 / 9;
  min-height: 420px;
}

.hero__image {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 1;
}
.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
}

/* Soft scrim hugging the bottom-left headline only — kept low so it
   fades out well before the faces higher up in the photo. */
.hero__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    115% 60% at 12% 108%,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.4) 38%,
    rgba(0, 0, 0, 0) 66%
  );
}

.hero__copy {
  position: absolute;
  left: clamp(20px, 4vw, 56px);
  bottom: clamp(20px, 4vw, 48px);
  right: clamp(20px, 4vw, 56px);
  z-index: 3;
}

.hero__headline {
  font-family: var(--ff-display);
  font-weight: 900;
  font-style: normal;
  color: var(--white);
  line-height: 0.88;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  margin: 0 0 18px;
  font-size: clamp(56px, 10vw, 144px);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}
.hero__headline span {
  display: block;
}

@media (min-width: 1024px) {
  .hero__headline { font-size: clamp(120px, 12.5vw, 200px); }
}

.hero__subhead {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 36px);
  letter-spacing: 0.005em;
  margin: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

/* Tablet portrait (769–980px): close the asymmetric corner gap by inset-padding
   the frame on both sides so all four corners can be rounded equally. */
@media (min-width: 769px) and (max-width: 980px) {
  .hero__inner {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
  .hero__frame {
    border-radius: 24px;
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .hero__inner {
    padding-right: clamp(12px, 4vw, 20px);
    padding-left: clamp(12px, 4vw, 20px);
  }
  .hero__frame {
    aspect-ratio: 4 / 5;
    min-height: 0;
    border-radius: 16px;
  }
  .hero__image img { object-position: center top; }
  .hero__copy {
    left: 22px;
    right: 22px;
    bottom: 26px;
  }
  .hero__headline { font-size: clamp(80px, 18vw, 118px); margin-bottom: 12px; }
}

/* =========================================================================
   TWO-COLUMN: COPY + FORM
   ========================================================================= */
.two-col {
  background: var(--red);
  color: var(--white);
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(72px, 10vw, 128px);
}

.two-col__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

@media (max-width: 980px) {
  .two-col__inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.section-heading {
  font-family: var(--ff-sans);
  font-weight: 700;
  color: var(--white);
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}

.lede {
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-align: left;
  margin: 0 0 28px;
  max-width: 56ch;
  color: var(--white);
}

.awards {
  margin: 0;
  max-width: 520px;
}
.two-col__copy .btn--phone {
  margin-top: 0;
  margin-bottom: clamp(36px, 4.5vw, 56px);
}
.awards img {
  width: 100%;
  height: auto;
}

/* Single-column tablet / large mobile range (570–980px): let the lede paragraph
   grow with the viewport (no 56ch cap) and centre the awards graphic. */
@media (min-width: 570px) and (max-width: 980px) {
  .two-col__copy .lede {
    max-width: none;
  }
  .two-col__copy .awards {
    margin-inline: auto;
  }
}

/* Contact card */
.form-card {
  background: var(--white);
  color: var(--ink);
  padding: clamp(8px, 1.5vw, 18px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.18);
  border-radius: var(--radius);
  overflow: hidden;
}

.formester-wrap {
  overflow: hidden;
  width: 100%;
  /* Crop the iframe's internal top/bottom whitespace so the visible space
     around the form inside the white card matches the left/right padding. */
  margin-top: -60px;
  margin-bottom: -40px;
}
.formester-wrap iframe,
#formester-lMLctrITZ {
  background: transparent !important;
  /* Smooth, longer transition than Formester's default 0.2s so height
     changes (when conditional fields appear) feel gentle, not jumpy */
  transition: height 0.35s ease-out !important;
}

formester-standard-form {
  display: block;
  width: 100%;
  min-height: 420px;
}

.form-card__heading {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 18px;
  color: var(--darkest);
  position: relative;
  z-index: 2;
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.contact-form label {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.contact-form input,
.contact-form select {
  font: inherit;
  font-weight: 400;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c9ced6;
  background: var(--white);
  color: var(--ink);
  border-radius: 6px;
  transition: border-color .15s ease, box-shadow .15s ease;
  min-height: 48px;
}
.contact-form input:focus,
.contact-form select:focus {
  outline: 0;
  border-color: var(--light-blue);
  box-shadow: 0 0 0 3px rgba(43,125,225,0.22);
}
.contact-form input:user-invalid,
.contact-form select:user-invalid {
  border-color: var(--red);
}

.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
}

.form-error {
  color: var(--red);
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 12px;
}

/* Buttons — curved edges with thin white internal outline, per campaign style guide */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--ff-sans);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  border: 0;
  border-radius: 12px;
  padding: 14px 22px;
  min-height: 52px;
  cursor: pointer;
  position: relative;
  transition: background-color .15s ease, color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }

/* Inner outline that follows the curved edge */
.btn::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2.5px solid var(--white);
  border-radius: 12px;
  pointer-events: none;
}

.btn--solid {
  background: var(--red);
  color: var(--white);
  width: 100%;
  font-size: 16px;
  text-transform: uppercase;
}
.btn--solid:hover,
.btn--solid:focus-visible {
  background: #b62a2f;
}

.btn--phone {
  margin-top: 14px;
  background: var(--red);
  color: var(--white);
  gap: 10px;
  padding: 16px 28px;
  border: 2px solid var(--white);
  border-radius: 16px;
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 22px);
  letter-spacing: 0.02em;
}
.btn--phone::after { display: none; }
.btn--phone__label,
.btn--phone__number {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: inherit;
  letter-spacing: 0.02em;
  line-height: 1;
}
.btn--phone:hover,
.btn--phone:focus-visible {
  background: #b62a2f;
}

/* =========================================================================
   VIDEO
   ========================================================================= */
.video {
  background: var(--light-blue);
  padding: 0;
}
.video__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 844;
  background: #000;
  overflow: hidden;
}
.video__frame video,
.video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
/* Block pointer events on the inline muted preview so clicks always reach the CTA */
.video__inline { pointer-events: none; }

.video__cta {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: transparent;
  border: 0;
  color: var(--white);
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: clamp(15px, 1.2vw, 18px);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.video__cta:hover,
.video__cta:focus-visible {
  background: rgba(0, 0, 0, 0.18);
  outline: none;
}
.video__cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--red);
  padding-left: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, background-color 160ms ease;
}
.video__cta:hover .video__cta-icon,
.video__cta:focus-visible .video__cta-icon {
  transform: scale(1.06);
  background: var(--white);
}
/* Lightbox */
.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px);
  background: rgba(8, 12, 24, 0.88);
  backdrop-filter: blur(6px);
}
.video-lightbox[hidden] { display: none; }
.video-lightbox__frame {
  position: relative;
  width: min(100%, 1200px);
  aspect-ratio: 1920 / 844;
  background: #000;
  border-radius: clamp(12px, 1.4vw, 20px);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.video-lightbox__player,
.video-lightbox__player iframe,
.video-lightbox__player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-lightbox__close {
  position: absolute;
  top: clamp(12px, 2vw, 24px);
  right: clamp(12px, 2vw, 24px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: background-color 160ms ease, transform 160ms ease;
}
.video-lightbox__close:hover,
.video-lightbox__close:focus-visible {
  background: var(--white);
  transform: scale(1.05);
  outline: none;
}

/* =========================================================================
   ABOUT STRIP
   ========================================================================= */
.about-strip {
  background: var(--light-blue);
  color: var(--white);
  padding-block: clamp(44px, 7vw, 80px);
}
.about-strip p {
  margin: 0;
  text-align: center;
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.5;
  max-width: 80ch;
  margin-inline: auto;
}
@media (max-width: 768px) {
  .about-strip p {
    font-size: 16px;
  }
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  background: var(--darkest);
  color: var(--white);
  padding-block: clamp(28px, 4vw, 44px);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px 36px;
  align-items: center;
}

.site-footer__logo img {
  height: 44px;
  width: auto;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  justify-content: center;
  font-size: 15px;
  font-weight: 400;
}
.site-footer__links a {
  color: var(--white);
  text-decoration: none;
}
.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  text-decoration: underline;
}
.site-footer__links span[aria-hidden] {
  opacity: 0.45;
}
.site-footer__abn { white-space: nowrap; }

.site-footer__copy {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  opacity: 0.85;
  text-align: right;
}

@media (max-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .site-footer__copy { text-align: center; }
}

/* =========================================================================
   Reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
