/* =========================================================
   FIFO Finance Australia — Stylesheet
   Design tokens follow the FIFO Finance design blueprint:
   restrained yellow, charcoal ink, warm off-white background.
   ========================================================= */

:root {
  /* Colour tokens */
  --bg-base: #FAFAF8;
  --bg-card: #F3F2EE;
  --bg-dark: #1A1A1A;
  --ink-primary: #1A1A1A;
  --ink-secondary: #63625E;
  --brand-yellow: #FFC72C;
  --brand-amber: #D99A00;
  --border-subtle: #E4E2DC;
  --white: #FFFFFF;
  --success: #2E7D4F;

  /* Type */
  --font-head: "Space Grotesk", "Arial Narrow", Arial, sans-serif;
  --font-body: "Inter", "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  --radius-card: 16px;
  --radius-btn: 8px;
  --max-width: 1200px;

  --shadow-header: 0 2px 12px rgba(26, 26, 26, 0.06);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--ink-primary);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.12;
  margin: 0 0 var(--space-2);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.4vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.4rem); }

p { margin: 0 0 var(--space-2); color: var(--ink-primary); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.section {
  padding: var(--space-7) 0;
}

@media (max-width: 720px) {
  .section { padding: var(--space-6) 0; }
}

.section--tint { background: var(--bg-card); }
.section--dark { background: var(--bg-dark); color: var(--white); }
.section--dark p, .section--dark h2, .section--dark h3 { color: var(--white); }

.section-head {
  max-width: 680px;
  margin: 0 0 var(--space-5);
}

.section-head p { color: var(--ink-secondary); font-size: 1.05rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-amber);
  margin-bottom: var(--space-2);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 3px;
  background: var(--brand-yellow);
  border-radius: 2px;
  display: inline-block;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-yellow);
  color: var(--ink-primary);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 160ms ease, transform 120ms ease, border-color 160ms ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--brand-amber);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--brand-yellow);
  color: var(--ink-primary);
}
.btn--primary:hover { background: var(--brand-amber); }
.btn--primary:active { transform: scale(0.98); }

.btn--secondary {
  background: transparent;
  color: var(--ink-primary);
  border-color: var(--ink-primary);
}
.btn--secondary:hover { background: var(--ink-primary); color: var(--white); }

.section--dark .btn--secondary {
  color: var(--white);
  border-color: var(--white);
}
.section--dark .btn--secondary:hover { background: var(--white); color: var(--ink-primary); }

.btn--block { width: 100%; }

.btn--sm { padding: 10px 18px; font-size: 0.9rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: rgba(250, 250, 248, 0.94);
  backdrop-filter: saturate(160%) blur(6px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 200ms ease, border-color 200ms ease, padding 200ms ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-header);
  border-bottom-color: var(--border-subtle);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--space-3);
  transition: padding 200ms ease;
}

.site-header.is-scrolled .site-header__bar { padding: 10px var(--space-3); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-primary);
}

.brand__mark {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.1;
}
.brand__name span { color: var(--brand-amber); }

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.main-nav__links {
  display: flex;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav__links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-primary);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}
.main-nav__links a:hover { border-color: var(--brand-yellow); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink-primary);
  position: relative;
  transition: transform 160ms ease, opacity 160ms ease;
}
.nav-toggle__bar::before { content: ""; position: absolute; top: -8px; }
.nav-toggle__bar::after { content: ""; position: absolute; top: 8px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 880px) {
  .main-nav__links { display: none; }
  .nav-toggle { display: inline-flex; }
  .main-nav { gap: var(--space-2); }
  .header-cta-desktop { display: none; }

  .mobile-panel {
    position: fixed;
    top: 82px; /* JS sets the exact value from the header height */
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-base);
    padding: var(--space-3);
    padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
    display: none;
    flex-direction: column;
    gap: var(--space-2);
    z-index: 490;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-panel.is-open { display: flex; }
  .mobile-panel a:not(.btn) {
    text-decoration: none;
    color: var(--ink-primary);
    font-weight: 600;
    font-size: 1.15rem;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .mobile-panel .btn { margin-top: 4px; }
}

@media (min-width: 881px) {
  .mobile-panel { display: none !important; }
}

/* ---------- Hero ----------
   Background is a genuine photo of a FIFO camp at sunset (site vehicles and
   accommodation dongas under a dramatic sky, supplied by the client), faded
   under a translucent cream scrim so it reads clearly without competing
   with the text sitting on top of it. */
.hero {
  padding: 148px 0 var(--space-6);
  background-color: var(--bg-base);
  background-image:
    linear-gradient(rgba(250, 250, 248, 0.72), rgba(250, 250, 248, 0.78)),
    url("/assets/images/hero-donga.jpg?v=20261007");
  background-size: cover, cover;
  background-position: center, center 68%;
  background-repeat: no-repeat, no-repeat;
}

@media (max-width: 720px) {
  .hero { padding: 108px 0 var(--space-4); }
  .hero { background-position: center, center 74%; }
}

.hero__body {
  max-width: 640px;
}

.hero__body h1 {
  color: #000000;
}

.hero__body p {
  font-size: 1.1rem;
  color: #2E2D29;
  max-width: 52ch;
}

/* Trust strip */
.trust-strip {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-3);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

.trust-strip__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-primary);
}

.trust-strip__item .icon { color: var(--brand-amber); flex-shrink: 0; }

/* ---------- Pain points ---------- */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

@media (max-width: 780px) {
  .pain-grid { grid-template-columns: 1fr; }
}

.pain-card {
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  text-align: left;
}

.pain-card .icon { color: var(--brand-amber); margin-bottom: 10px; }
.pain-card h3 { margin-bottom: 6px; }
.pain-card p { color: var(--ink-secondary); margin: 0; font-size: 0.95rem; }

.pain-resolution {
  margin-top: var(--space-4);
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
}

/* ---------- Why us ---------- */
.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-6);
  align-items: center;
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--space-4); }
}

.split--reverse .split__media { order: 2; }

.split__media {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-card);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

.split__media--pair {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border-radius: 0;
  overflow: visible;
  background: transparent;
}
.split__media--pair img {
  border-radius: var(--radius-card);
}
.split__media--pair img:first-child {
  aspect-ratio: 4/3;
}
.split__media--pair img:last-child {
  aspect-ratio: 16/9;
}

.photo-with-caption {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-card);
}
.photo-with-caption img {
  border-radius: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  display: block;
}

.property-photo-caption,
.photo-caption {
  padding: 10px 14px;
  margin: 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-secondary);
  background: var(--bg-card);
}

.property-intro {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) {
  .property-intro { grid-template-columns: 1fr; }
}

.pull-line {
  border-left: 3px solid var(--brand-yellow);
  padding-left: var(--space-2);
  font-weight: 600;
  margin-top: var(--space-3);
}

.why-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}
@media (max-width: 560px) {
  .why-benefits { grid-template-columns: 1fr; }
}

/* ---------- Benefits row ---------- */
.benefits-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
@media (max-width: 900px) {
  .benefits-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .benefits-row { grid-template-columns: 1fr; }
}
.benefit-item {
  text-align: left;
  padding: var(--space-2) 0;
}
.benefit-item .icon { color: var(--brand-amber); margin-bottom: 8px; }
.benefit-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.benefit-item p { color: var(--ink-secondary); font-size: 0.92rem; margin: 0; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  min-height: 240px;
}
@media (max-width: 620px) {
  .service-card { min-height: 0; }
}
.service-card .icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
  color: var(--ink-primary);
}
.service-card .icon-badge--triple {
  width: auto;
  align-self: flex-start;
  padding: 0 10px;
  gap: 4px;
}
.service-card h3 { margin-bottom: 6px; }
.service-card p { color: var(--ink-secondary); font-size: 0.95rem; margin: 0; }

.service-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 12px 0 0;
  margin-top: auto;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-primary);
  cursor: pointer;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
  justify-content: space-between;
}
.service-card__toggle:focus-visible {
  outline: 3px solid var(--brand-amber);
  outline-offset: 2px;
}
.service-card__toggle-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  position: relative;
}
.service-card__toggle-icon::before, .service-card__toggle-icon::after {
  content: "";
  position: absolute;
  background: var(--brand-amber);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.service-card__toggle-icon::before { width: 12px; height: 2px; }
.service-card__toggle-icon::after { width: 2px; height: 12px; transition: transform 200ms ease; }
.service-card__toggle[aria-expanded="true"] .service-card__toggle-icon::after { transform: translate(-50%, -50%) rotate(90deg) scale(0); }

.service-card__more {
  max-height: 0;
  overflow: hidden;
  transition: max-height 320ms ease;
}
.service-card__toggle[aria-expanded="true"] + .service-card__more {
  max-height: 620px;
}
.service-card__more p {
  font-size: 0.92rem;
  margin: 12px 0 0;
}
.service-card__more .btn {
  margin-top: 14px;
}

/* ---------- Property pathway ---------- */
.pathway-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  margin: var(--space-5) 0 var(--space-4);
  position: relative;
}
.pathway-steps::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border-subtle);
}
@media (max-width: 820px) {
  .pathway-steps { grid-template-columns: 1fr; gap: var(--space-3); }
  .pathway-steps::before { display: none; }
  .pathway-step__num { margin: 0 0 10px; }
}

.pathway-step { position: relative; text-align: left; }
.pathway-step__num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--brand-yellow);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--font-head);
  margin: 0 auto 10px;
  position: relative;
  z-index: 1;
}
.pathway-step p { font-size: 0.9rem; color: var(--ink-secondary); margin: 0; }

.compliance-note {
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-card);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

/* ---------- Three step process ---------- */
.process-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 780px) {
  .process-track { grid-template-columns: 1fr; }
}

.process-line {
  position: absolute;
  top: 18px;
  left: 8%;
  right: 8%;
  height: 3px;
  background: var(--border-subtle);
  overflow: hidden;
  border-radius: 3px;
}
.process-line__fill {
  height: 100%;
  width: 0%;
  background: var(--brand-yellow);
  transition: width 900ms ease;
}
@media (max-width: 780px) { .process-line { display: none; } }

.process-step {
  background: transparent;
  text-align: left;
  padding-top: var(--space-4);
}
.process-step__num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--border-subtle);
  transition: color 300ms ease;
  line-height: 1;
  margin-bottom: 8px;
}
.process-step.is-active .process-step__num { color: var(--brand-amber); }
.process-step p { color: var(--ink-secondary); }

/* ---------- Trust wall ---------- */
.trust-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}
@media (max-width: 900px) {
  .trust-wall { grid-template-columns: repeat(2, 1fr); }
}
.trust-badge {
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: var(--space-2);
  text-align: center;
}
.trust-badge strong { display: block; font-family: var(--font-head); font-size: 1.1rem; }
.trust-badge span { font-size: 0.82rem; color: var(--ink-secondary); }

.broker-bios {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}
@media (max-width: 700px) { .broker-bios { grid-template-columns: 1fr; } }

.broker-card {
  display: flex;
  gap: var(--space-2);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-3);
}
.broker-card__photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--bg-card);
  flex-shrink: 0;
  object-fit: cover;
}
.broker-card h3 { margin-bottom: 2px; font-size: 1rem; }
.broker-card .role { color: var(--brand-amber); font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.broker-card p { font-size: 0.88rem; color: var(--ink-secondary); margin: 0; }

/* ---------- Testimonials ---------- */
#testimonials.section { padding-top: 32px; padding-bottom: 32px; }
#property-pathway.section { padding-bottom: 32px; }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
}
.testimonial-card .stars { color: var(--brand-amber); margin-bottom: 10px; letter-spacing: 2px; }
.testimonial-card p { font-style: italic; color: var(--ink-primary); }
.testimonial-card footer {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  font-style: normal;
  margin-top: auto;
  padding-top: 14px;
}


/* ---------- FAQ ---------- */
#faqs.section { padding-top: 32px; }
.faq-list { border-top: 1px solid var(--border-subtle); }
.faq-item { border-bottom: 1px solid var(--border-subtle); }
.faq-item__q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: var(--space-2) 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  color: var(--ink-primary);
}
.faq-item__q:focus-visible { outline: 3px solid var(--brand-amber); outline-offset: 2px; }
.faq-item__icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  position: relative;
}
.faq-item__icon::before, .faq-item__icon::after {
  content: "";
  position: absolute;
  background: var(--ink-primary);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.faq-item__icon::before { width: 14px; height: 2px; }
.faq-item__icon::after { width: 2px; height: 14px; transition: transform 200ms ease; }
.faq-item__q[aria-expanded="true"] .faq-item__icon::after { transform: translate(-50%, -50%) rotate(90deg) scale(0); }

.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 240ms ease, padding 240ms ease;
  color: var(--ink-secondary);
}
.faq-item__a p { padding-bottom: var(--space-2); margin: 0; }
.faq-item__q[aria-expanded="true"] + .faq-item__a { max-height: 340px; }

/* ---------- Final CTA + form ---------- */
#lead-form.section {
  padding: var(--space-5) 0;
}

.final-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: flex-start;
}
@media (max-width: 900px) {
  .final-cta { grid-template-columns: 1fr; gap: var(--space-3); }
}

.lead-form {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
}

.form-row { margin-bottom: 12px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 5px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg-base);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 3px solid var(--brand-amber);
  outline-offset: 1px;
  border-color: var(--brand-amber);
}
.form-row--check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.form-row--check input { width: auto; margin-top: 4px; }
.form-row--check label { font-weight: 400; font-size: 0.85rem; color: var(--ink-secondary); }

.form-microcopy {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  margin-bottom: var(--space-2);
}
.form-microcopy strong { color: var(--ink-primary); }

.final-cta__mark {
  display: block;
  width: 210px;
  height: auto;
  margin: var(--space-4) auto 0;
  opacity: 0.95;
}
@media (max-width: 900px) {
  .final-cta__mark { margin-top: var(--space-3); width: 160px; }
}


.form-success, .form-error {
  display: none;
  padding: var(--space-3);
  border-radius: 10px;
  margin-bottom: var(--space-2);
}
.form-success { background: #E7F4EC; color: var(--success); }
.form-error { background: #FBEAEA; color: #A3342B; }
.form-error a { color: inherit; font-weight: 600; text-decoration: underline; }
.form-success.is-visible, .form-error.is-visible { display: block; }

.honeypot-field { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-dark);
  color: #D8D6D0;
  padding: var(--space-5) 0 var(--space-2);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: var(--space-2);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #D8D6D0; text-decoration: none; }
.site-footer a:hover { color: var(--brand-yellow); }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--space-2);
  font-size: 0.78rem;
  color: #9A9891;
  line-height: 1.6;
}
.footer-legal p { color: #9A9891; margin-bottom: 0; }
.placeholder-flag {
  color: var(--brand-yellow);
  font-weight: 600;
}

/* ---------- Sticky mobile CTA ---------- */
.mobile-cta-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 480;
  background: var(--white);
  border-top: 1px solid var(--border-subtle);
  padding: 10px var(--space-2);
  padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
  transform: translateY(120%);
  transition: transform 220ms ease;
  display: none;
}
.mobile-cta-bar.is-visible { transform: translateY(0); }
@media (max-width: 880px) {
  .mobile-cta-bar { display: flex; gap: 10px; }
  body { padding-bottom: 0; }
}

/* ---------- Reveal on scroll ----------
   Visible by default so content never depends on JavaScript running.
   Only once `.js` is added to <html> (see inline script in <head>) do
   reveal elements start hidden, ready for main.js to animate them in. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms ease, transform 480ms ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.text-center { text-align: center; }
.section-head.text-center { margin-left: auto; margin-right: auto; text-align: center; }


/* ---------- Phone refinements ---------- */
@media (max-width: 600px) {
  /* Long button labels wrap instead of forcing the page wider than the screen */
  .btn { white-space: normal; text-align: center; line-height: 1.25; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; }
}
body { overflow-x: clip; }

/* ---------- Phone tap targets & form comfort (applies to tablets and phones) ---------- */
@media (max-width: 880px) {
  /* 16px stops iPhones zooming the whole page in when a field is tapped */
  .form-row input,
  .form-row select,
  .form-row textarea { font-size: 16px; padding: 13px 14px; min-height: 48px; }
  .form-row textarea { min-height: 110px; }
  .form-row--check input { width: 22px; height: 22px; min-height: 0; padding: 0; flex-shrink: 0; margin-top: 2px; }
  .form-row--check label { font-size: 0.9rem; }
  /* "Learn more" bars on the service tiles: full finger-height */
  .service-card__toggle { min-height: 48px; padding-top: 14px; padding-bottom: 8px; }
  /* Footer and small text links: easier to hit with a thumb */
  .site-footer li { margin-bottom: 0; }
  .site-footer li a { display: inline-block; padding: 13px 0; }
  .lead-form > p a { display: inline-block; padding: 12px 0; }
}

/* ---------- Late overrides (must come after the base rules above) ---------- */
@media (max-width: 820px) {
  /* Single-column steps: circle sits at the left, lined up with its heading */
  .pathway-step__num { margin: 0 0 10px; }
}
/* Links inside the white form card were inheriting white text from the dark section */
.lead-form a { color: var(--ink-primary); text-decoration: underline; font-weight: 600; }
.lead-form .form-row--check a { font-weight: 500; color: var(--ink-secondary); }
@media (max-width: 900px) {
  /* Keep the form close to the top on phones */
  .final-cta__mark { width: 88px; margin-top: var(--space-3); }
}

/* ---------- Reviews carousel ---------- */
.carousel__hint { font-size: 0.95rem; color: var(--ink-secondary); margin: 0 auto; }
.carousel { position: relative; }
.carousel__track {
  display: flex;
  gap: 16px;
  position: relative;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0 8px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline: 3px solid var(--brand-amber); outline-offset: 4px; border-radius: var(--radius-card); }
.carousel__slide {
  flex: 0 0 calc((100% - 32px) / 3);
  scroll-snap-align: start;
}
.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.carousel__count { min-width: 92px; text-align: center; font-weight: 600; font-size: 0.95rem; color: var(--ink-primary); }
.carousel__btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--ink-primary);
  background: var(--white);
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 160ms ease, opacity 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.carousel__btn:hover { background: var(--brand-yellow); border-color: var(--ink-primary); }
.carousel__btn:focus-visible { outline: 3px solid var(--brand-amber); outline-offset: 2px; }
.carousel__btn[aria-disabled="true"] { opacity: 0.35; cursor: default; background: var(--white); }
@media (max-width: 900px) {
  /* Two reviews per view, track runs to the screen edges so the next card peeks in */
  .carousel__track { margin: 0 -24px; padding: 4px 24px 8px; scroll-padding: 0 24px; }
  .carousel__slide { flex-basis: calc((100% - 16px) / 2); }
}
@media (max-width: 600px) {
  /* One review per view, with a sliver of the next one showing to invite a swipe */
  .carousel__slide { flex-basis: 90%; padding: 20px; }
  .carousel__slide p { font-size: 0.95rem; line-height: 1.5; margin-bottom: 12px; }
  .carousel__slide .stars { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .carousel__track { scroll-behavior: auto; } }
