/* ============================================================
   MAX BALTHES YARD SERVICES — styles.css
   ============================================================ */

/* ── 1. @font-face ────────────────────────────────────────── */

@font-face {
  font-family: 'Archivo';
  src: url('assets/fonts/archivo-semicondensed.woff2') format('woff2');
  font-weight: 700 900;
  font-stretch: 75%;
  font-display: swap;
}

@font-face {
  font-family: 'Public Sans';
  src: url('assets/fonts/public-sans.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}

/* ── 2. Design tokens (light mode) ───────────────────────── */

:root {
  --ink:      #0E0F0D;
  --paper:    #F5F5F1;
  --forest:   #2E4620;
  --olive:    #7FA23F;
  --olive-hi: #9BC257;
  --slate:    #5A5F57;

  --card-bg-dark:  #1A1C18;
  --border-dark:   rgba(46, 70, 32, 0.5);

  --error:    #B3261E;
  --error-hi: #DC3B31;

  --surface:     var(--paper);
  --on-surface:  var(--ink);
  --accent:      var(--olive);
  --accent-hi:   var(--olive-hi);

  --header-h: 64px;
}

/* ── 3. Dark-mode token overrides ────────────────────────── */

/* System preference (when no explicit override) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface:    var(--ink);
    --on-surface: var(--paper);
    --accent:     var(--olive-hi);
    --accent-hi:  #B4D66E;
  }
}

/* Explicit dark override */
[data-theme="dark"] {
  --surface:    var(--ink);
  --on-surface: var(--paper);
  --accent:     var(--olive-hi);
  --accent-hi:  #B4D66E;
}

/* Explicit light override */
[data-theme="light"] {
  --surface:    var(--paper);
  --on-surface: var(--ink);
  --accent:     var(--olive);
  --accent-hi:  var(--olive-hi);
}

/* ── 4. Reset & base ──────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  font-family: 'Public Sans', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  color: var(--on-surface);
  background-color: var(--surface);
  /* Reserve space for sticky bar on mobile */
  padding-bottom: 80px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── 5. Typography ────────────────────────────────────────── */

h1,
h2,
h3,
h4 {
  font-family: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  font-stretch: semi-condensed;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h3 {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 800;
}

.section-label {
  font-family: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--olive-hi);
  display: block;
  margin-bottom: 0.5rem;
}

/* ── 6. Layout ────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

section {
  padding-block: 4rem;
}

/* ── 7. Focus ring ────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--olive-hi);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── 8. Header ────────────────────────────────────────────── */

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background-color: var(--ink);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.header-seal {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.header-wordmark {
  font-family: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  font-stretch: semi-condensed;
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.header-wordmark span {
  display: block;
  font-weight: 400;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--olive-hi);
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Header CTA button */
.header-cta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 3px;
  border: 1.5px solid var(--olive);
  color: var(--olive-hi);
  font-family: 'Public Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  min-height: 44px;
}

.header-cta:hover,
.header-cta.scrolled {
  background-color: var(--olive);
  border-color: var(--olive);
  color: var(--ink);
}

/* Header "Get a quote" link — hidden below 768px, sticky bar/hero cover it there */
.header-callback-link {
  display: none;
  align-items: center;
  padding: 0.45rem 1rem;
  border-radius: 3px;
  border: 1.5px solid rgba(159, 188, 87, 0.4);
  color: var(--olive-hi);
  font-family: 'Public Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  min-height: 44px;
  transition: background-color 0.2s, border-color 0.2s;
}

.header-callback-link:hover {
  border-color: var(--olive-hi);
  background-color: rgba(155, 194, 87, 0.08);
}

/* ── 9. Curved seam dividers ──────────────────────────────── */

.seam {
  display: block;
  line-height: 0;
  font-size: 0;
  overflow: hidden;
  height: 72px;
  margin-bottom: -1px;
}

.seam svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Seam fills are pinned to the same fixed tokens the sections themselves
   use (not the theme-reactive --surface), so the wave is always fully
   opaque and never reveals the body background during a theme switch. */
.seam-fill-paper {
  fill: var(--paper);
}

.seam-fill-ink {
  fill: var(--ink);
}

/* ── 10. Hero section ─────────────────────────────────────── */

#hero {
  background-color: var(--paper);
  padding-block: 4.5rem 0;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.hero-seal {
  width: 220px;
  height: 220px;
  margin-bottom: 2rem;
}

.hero-text {
  max-width: 600px;
}

.hero-text h1 {
  color: var(--forest);
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--slate);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

/* Primary CTA — call */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background-color: var(--olive);
  color: var(--ink);
  font-family: 'Public Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  min-height: 52px;
  min-width: 220px;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: var(--olive-hi);
}

/* Secondary CTA — text/SMS */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background-color: transparent;
  color: var(--forest);
  font-family: 'Public Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 3px;
  border: 1.5px solid var(--forest);
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  min-width: 200px;
  transition: background-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background-color: var(--forest);
  color: var(--paper);
}

.hero-reassurance {
  font-size: 0.85rem;
  color: var(--slate);
  letter-spacing: 0.02em;
}

.hero-reassurance span + span::before {
  content: " · ";
}

/* ── 11. Services section ─────────────────────────────────── */

#services {
  background-color: var(--ink);
  padding-block: 4.5rem;
}

#services h2 {
  color: var(--paper);
  margin-bottom: 2.5rem;
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.service-card {
  background-color: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  padding: 1.5rem;
}

.service-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 0.6rem;
}

.service-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--olive);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.service-check svg {
  width: 14px;
  height: 14px;
  stroke: var(--olive);
}

.service-card h3 {
  color: var(--paper);
}

.service-card p {
  color: var(--slate);
  font-size: 0.925rem;
  padding-left: calc(28px + 0.875rem);
}

/* ── 12. Trust section ────────────────────────────────────── */

#trust {
  background-color: var(--paper);
  padding-block: 4rem;
}

#trust h2 {
  color: var(--forest);
  text-align: center;
  margin-bottom: 2.5rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.trust-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background-color: var(--forest);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-icon svg {
  width: 30px;
  height: 30px;
  stroke: var(--olive-hi);
}

.trust-item h3 {
  font-size: 1.25rem;
  color: var(--forest);
  margin-bottom: 0.2rem;
}

.trust-item p {
  font-size: 0.875rem;
  color: var(--slate);
}

/* ── 13. Reviews section ──────────────────────────────────── */

#reviews {
  background-color: var(--ink);
  padding-block: 4.5rem;
}

#reviews h2 {
  color: var(--paper);
  margin-bottom: 0.75rem;
  text-align: center;
}

.reviews-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  /* hide scrollbar but keep functionality */
  scrollbar-width: thin;
  scrollbar-color: var(--forest) transparent;
}

.reviews-scroll::-webkit-scrollbar {
  height: 4px;
}

.reviews-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.reviews-scroll::-webkit-scrollbar-thumb {
  background: var(--forest);
  border-radius: 2px;
}

.review-card {
  flex: 0 0 min(80vw, 320px);
  scroll-snap-align: start;
  background-color: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.review-stars {
  display: flex;
  gap: 0.2rem;
}

.review-stars svg {
  width: 18px;
  height: 18px;
  fill: var(--olive-hi);
}

.review-text {
  color: var(--paper);
  font-size: 0.925rem;
  line-height: 1.6;
  flex: 1;
}

.review-text::before {
  content: '\201C';
}

.review-text::after {
  content: '\201D';
}

.review-meta {
  font-size: 0.8rem;
  color: var(--slate);
}

.review-meta strong {
  color: var(--olive-hi);
}

/* ── 14. Service area section ─────────────────────────────── */

#service-area {
  background-color: var(--paper);
  padding-block: 4rem;
  text-align: center;
}

#service-area h2 {
  color: var(--forest);
  margin-bottom: 1.5rem;
}

#service-area p {
  color: var(--slate);
  max-width: 640px;
  margin: 0 auto 1.25rem;
}

.suburb-groups {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 860px;
  margin: 0 auto;
}

.suburb-group {
  width: 100%;
  border: 1px solid rgba(46, 70, 32, 0.2);
  border-radius: 6px;
  background-color: rgba(46, 70, 32, 0.03);
  padding: 0;
  overflow: hidden;
  text-align: left;
}

.suburb-group summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1rem;
  color: var(--forest);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.suburb-group summary::-webkit-details-marker {
  display: none;
}

.suburb-group summary::after {
  content: "+";
  font-size: 1.25rem;
  line-height: 1;
  color: var(--olive);
  flex-shrink: 0;
  margin-left: 1rem;
}

.suburb-group[open] summary::after {
  content: "\2212";
}

.suburb-group[open] summary {
  border-bottom: 1px solid rgba(46, 70, 32, 0.15);
}

.suburb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 1rem 1.1rem 1.1rem;
}

.suburb-list li {
  color: var(--ink);
  font-size: 0.925rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(46, 70, 32, 0.3);
  border-radius: 3px;
  background-color: rgba(46, 70, 32, 0.06);
}

.suburb-more {
  color: var(--slate);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.suburb-more a {
  color: var(--forest);
  font-weight: 600;
}

/* ── 15. Final CTA section ────────────────────────────────── */

#final-cta {
  background-color: var(--paper);
  padding-block: 5rem;
  text-align: center;
}

#final-cta h2 {
  color: var(--forest);
  margin-bottom: 0.5rem;
}

.final-cta-sub {
  color: var(--slate);
  font-size: 1rem;
  margin-bottom: 1.75rem;
}

.final-phone {
  display: block;
  font-family: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 12vw, 5rem);
  color: var(--forest);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 2rem;
  text-decoration: none;
}

.final-phone:hover {
  color: var(--olive);
}

.final-cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.final-cta-tertiary {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--olive);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.final-cta-tertiary:hover {
  color: var(--forest);
}

/* ── 16. Footer ───────────────────────────────────────────── */

footer {
  background-color: var(--ink);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

footer p {
  font-size: 0.8rem;
  color: var(--slate);
}

footer a {
  color: var(--olive-hi);
}

footer a:hover {
  color: var(--paper);
}

/* ── 17. Sticky mobile bar ────────────────────────────────── */

#sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background-color: var(--ink);
  border-top: 1px solid rgba(46, 70, 32, 0.5);
  padding: 0.75rem 1rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  display: flex;
  gap: 0.75rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

#sticky-bar.visible {
  transform: translateY(0);
}

.sticky-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem;
  font-family: 'Public Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 3px;
  text-decoration: none;
  min-height: 44px;
  cursor: pointer;
}

.sticky-btn-call {
  background-color: var(--olive);
  color: var(--ink);
  border: none;
  transition: background-color 0.2s;
}

.sticky-btn-call:hover {
  background-color: var(--olive-hi);
}

.sticky-btn-text {
  background-color: transparent;
  color: var(--paper);
  border: 1.5px solid rgba(245, 245, 241, 0.35);
  transition: border-color 0.2s;
}

.sticky-btn-text:hover {
  border-color: var(--paper);
}

.sticky-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── 18. Responsive breakpoints ───────────────────────────── */

@media (min-width: 480px) {
  .hero-seal {
    width: 260px;
    height: 260px;
  }

  .hero-ctas {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .trust-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .final-cta-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  html {
    font-size: 18px;
  }

  body {
    /* No sticky bar on desktop */
    padding-bottom: 0;
  }

  #sticky-bar {
    display: none;
  }

  .header-callback-link {
    display: flex;
  }

  .hero-seal {
    width: 320px;
    height: 320px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .reviews-scroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .review-card {
    flex: unset;
  }

  section {
    padding-block: 5rem;
  }
}

@media (min-width: 1024px) {
  .hero-seal {
    width: 380px;
    height: 380px;
  }

  .hero-inner {
    flex-direction: row;
    text-align: left;
    align-items: center;
    justify-content: center;
    gap: 4rem;
  }

  .hero-ctas {
    justify-content: flex-start;
  }

  .hero-reassurance {
    text-align: left;
  }

  .hero-text h1 {
    max-width: 480px;
  }
}

/* ── 19. Get in touch (callback form) ─────────────────────── */

#get-in-touch {
  background-color: var(--ink);
  padding-block: 4.5rem;
  text-align: center;
}

#get-in-touch h2 {
  color: var(--paper);
}

.callback-sub {
  color: var(--slate);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.callback-sub a {
  color: var(--olive-hi);
  font-weight: 600;
}

.callback-form {
  max-width: 520px;
  margin-inline: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 768px) {
  .callback-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "name phone suburb"
      "email company jobtype"
      "description description description"
      "turnstile turnstile turnstile"
      "error error error"
      "button button button"
      "privacy privacy privacy";
    gap: 0.6rem 1.5rem;
    max-width: 720px;
  }

  .field-name { grid-area: name; }
  .field-phone { grid-area: phone; }
  .field-suburb { grid-area: suburb; }
  .field-email { grid-area: email; }
  .field-company { grid-area: company; }
  .field-jobtype { grid-area: jobtype; }
  .field-description { grid-area: description; }
  .cf-turnstile { grid-area: turnstile; }
  .callback-form-error { grid-area: error; }
  .callback-form .btn-primary { grid-area: button; }
  .callback-privacy { grid-area: privacy; }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-field label {
  font-family: 'Public Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--paper);
}

.field-optional {
  font-weight: 400;
  color: var(--slate);
  font-size: 0.825rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(245, 245, 241, 0.3);
  border-radius: 3px;
  background-color: var(--card-bg-dark);
  color: var(--paper);
  font-family: 'Public Sans', system-ui, sans-serif;
  font-size: 1rem;
  min-height: 48px;
}

.form-field textarea {
  min-height: unset;
  resize: vertical;
}

.form-field select {
  cursor: pointer;
}

.field-error {
  color: var(--error-hi);
  font-size: 0.85rem;
  min-height: 1.1em;
  margin: 0;
}

.field-hint {
  color: var(--slate);
  font-size: 0.8rem;
  min-height: 1.1em;
  margin: 0;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: var(--error-hi);
}

/* Honeypot: off-screen, not display:none, so naive bots that skip hidden
   fields still fill it in while real users never encounter it. */
.callback-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.callback-form-error {
  color: var(--error-hi);
  text-align: center;
  font-weight: 600;
  margin: 0;
}

.callback-form .btn-primary {
  align-self: center;
  width: 100%;
}

.callback-privacy {
  color: var(--slate);
  font-size: 0.8rem;
  text-align: center;
  margin: 0;
}

.cf-turnstile {
  align-self: center;
}

.callback-confirmation {
  max-width: 520px;
  margin-inline: auto;
  text-align: center;
}

.callback-confirmation-check {
  width: 48px;
  height: 48px;
  margin-inline: auto;
  margin-bottom: 1rem;
}

.callback-confirmation-check svg {
  width: 24px;
  height: 24px;
}

.callback-confirmation h3 {
  color: var(--paper);
  margin-bottom: 0.5rem;
}

.callback-confirmation p {
  color: var(--slate);
}

.callback-confirmation-sub a {
  color: var(--olive-hi);
  font-weight: 600;
}

/* ── 20. Reduced motion ───────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }

  #sticky-bar {
    transform: none;
  }

  #sticky-bar.visible {
    transform: none;
  }
}
