/* JDM Pest Services - design tokens + base styles
   Palette sampled directly from the client's existing banner (JDM Banner.JPG):
   dark navy top of banner, mid steel-blue body, pale blue base, brick-red logo rings. */

:root {
  /* Brand colors, extracted from banner */
  --navy: #232a3b;
  --navy-deep: #171c28;
  --blue: #2d4164;
  --blue-mid: #4d6f96;
  --blue-pale: #aecbe0;
  --blue-pale-bg: #eef4f9;
  --red: #a13a32;
  --red-dark: #862f28;

  /* Neutrals */
  --cream: #f8f6f1;
  --white: #ffffff;
  --charcoal: #262b30;
  --gray-600: #5b6470;
  --gray-300: #d8dce1;
  --gray-100: #eef0f2;

  /* Semantic */
  --color-bg: var(--cream);
  --color-surface: var(--white);
  --color-text: var(--charcoal);
  --color-text-muted: var(--gray-600);
  --color-accent: var(--red);
  --color-accent-dark: var(--red-dark);
  --color-primary: var(--navy);
  --color-primary-soft: var(--blue);

  /* One corner-radius scale for the whole site */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-pill: 999px;

  /* Type */
  --font-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --shadow-sm: 0 2px 8px rgba(23, 28, 40, 0.08);
  --shadow-md: 0 12px 32px rgba(23, 28, 40, 0.14);

  --nav-height: 72px;
}

/* Reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
p { margin: 0 0 1em; max-width: 65ch; }
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (prefers-reduced-motion: no-preference) {
  .transition { transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn:disabled:active { transform: none; }
.btn-primary {
  background: var(--color-accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--color-accent-dark); box-shadow: var(--shadow-sm); }
.btn-outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.55);
}
.btn-ghost:hover { background: rgba(255,255,255,0.14); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  height: var(--nav-height);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand img { height: 42px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--gray-600);
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { border-color: var(--color-accent); color: var(--navy); }
.mobile-quote-link { display: none; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.header-phone {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--blue);
  white-space: nowrap;
}
.header-phone span { display: block; font-size: 0.68rem; font-weight: 500; color: var(--gray-600); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 6px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    overflow-y: auto;
  }
  .main-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .main-nav a { width: 100%; padding: 14px 4px; border-bottom: 1px solid var(--gray-100); }
  .mobile-quote-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    padding: 14px;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    color: var(--white);
    font-weight: 600;
    border-bottom: none;
  }
  .nav-toggle { display: inline-flex; }
  .header-phone { display: none; }
  .header-actions .btn-primary { display: none; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 1rem; }
  .brand img { height: 34px; }
}

/* ---------- Hero (copy + logo one side, form the other) ---------- */
.hero {
  position: relative;
  background: linear-gradient(155deg, var(--navy-deep) 0%, var(--blue) 52%, var(--blue-mid) 100%);
  color: var(--white);
  overflow: hidden;
}
.hero-watermark {
  position: absolute;
  left: -110px;
  bottom: -90px;
  width: 620px;
  max-width: 70vw;
  opacity: 0.14;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(380px, 460px);
  align-items: center;
  gap: 48px;
  padding: 64px 0 0;
}
.hero-logo {
  height: 52px;
  width: auto;
  margin-bottom: 22px;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.35));
}
.hero h1 {
  color: var(--white);
  font-size: clamp(1.9rem, 3.4vw, 2.4rem);
  max-width: 34ch;
  margin-bottom: 0.5em;
}
.hero p.lead {
  color: rgba(255,255,255,0.88);
  font-size: 1.05rem;
  max-width: 42ch;
  margin-bottom: 0;
}
.hero .quote-card {
  width: 100%;
}

.hero-more-wrap {
  text-align: center;
  padding: 32px 0 40px;
}
.more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.92rem;
}
.more-toggle:hover { background: rgba(255,255,255,0.12); }
.more-toggle .chev { width: 16px; height: 16px; transition: transform 0.2s ease; }
.more-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; padding: 40px 0 0; }
  .hero h1 { max-width: none; }
  .hero-watermark { width: 380px; opacity: 0.12; left: -70px; bottom: -50px; }
}

#more-content.reveal { animation: fadein 0.25s ease; }

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--navy);
  color: var(--white);
}
.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 36px;
  padding: 22px 24px;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
}
.trust-strip .item { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.92); }
.trust-strip svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--blue-pale); }

/* ---------- Sections generic ---------- */
section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 0.5em; }
.section-head p { color: var(--color-text-muted); font-size: 1.05rem; }
.bg-surface { background: var(--white); }
.bg-tint { background: var(--blue-pale-bg); }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-navy p { color: rgba(255,255,255,0.82); }

/* ---------- Services grid (asymmetric, priority pests larger) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.service-card {
  grid-column: span 2;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-card.priority {
  background: linear-gradient(165deg, var(--blue-pale-bg), var(--white));
  border-color: var(--blue-pale);
}
.service-card .icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--blue-pale-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
}
.service-card.priority .icon { background: var(--color-accent); color: var(--white); }
.service-card .icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 1.05rem; margin-bottom: 0; }

@media (max-width: 760px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service-card, .service-card.priority { grid-column: span 1; }
}
@media (max-width: 520px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card, .service-card.priority { grid-column: span 1; }
}

/* ---------- Why us / stats strip ---------- */
.reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.reason strong { display: block; font-family: var(--font-display); font-size: 1rem; color: var(--navy); margin-bottom: 6px; }
.reason p { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: 0; }
@media (max-width: 860px) { .reasons { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .reasons { grid-template-columns: 1fr; } }

/* ---------- Split section (image/content) ---------- */
.split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: center;
}
.split.reverse { grid-template-columns: 1.05fr 0.95fr; }
.split.reverse .split-media { order: 2; }
.split-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--blue-pale-bg);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid var(--gray-100);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.split-media.photo-pending {
  flex-direction: column;
  gap: 10px;
  color: var(--blue);
  text-align: center;
  padding: 24px;
}
.split-media.photo-pending svg { width: 40px; height: 40px; opacity: 0.55; }
.split-media.photo-pending span { font-size: 0.82rem; color: var(--color-text-muted); max-width: 26ch; }
.split-content .kicker {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: block;
}
.check-list { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.98rem; }
.check-list svg { width: 20px; height: 20px; color: var(--color-accent); flex-shrink: 0; margin-top: 2px; }
@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse .split-media { order: 0; }
  .split-media { min-height: 220px; }
}

/* ---------- Areas ---------- */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.area-chip {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}
.area-chip span { display: block; font-weight: 400; font-size: 0.82rem; color: var(--color-text-muted); margin-top: 3px; }
@media (max-width: 760px) { .areas-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .areas-grid { grid-template-columns: 1fr; } }

/* ---------- Quote form ---------- */
.quote-section { background: var(--navy); color: var(--white); position: relative; }
.quote-wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: flex-start;
}
.quote-intro h2 { color: var(--white); }
.quote-intro p { color: rgba(255,255,255,0.82); }
.quote-intro .check-list svg { color: var(--blue-pale); }
.quote-intro .check-list li { color: rgba(255,255,255,0.9); }
.quote-card {
  background: var(--white);
  color: var(--charcoal);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.quote-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
}
.quote-progress .bar {
  flex: 1;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--gray-100);
  overflow: hidden;
}
.quote-progress .bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  transition: width 0.25s ease;
}
.quote-progress .bar.done span { width: 100%; }
.quote-step-label { font-size: 0.82rem; font-weight: 600; color: var(--color-text-muted); margin-bottom: 4px; }
.quote-step { display: none; }
.quote-step.active { display: block; animation: fadein 0.2s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.quote-step h3 { font-size: 1.2rem; margin-bottom: 4px; }
.quote-step .hint { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 18px; }

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}
.option-pill {
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.option-pill:hover { border-color: var(--blue); }
.option-pill.selected { border-color: var(--color-accent); background: rgba(161,58,50,0.06); color: var(--color-accent-dark); }
@media (max-width: 480px) { .option-grid { grid-template-columns: repeat(2, 1fr); } }

.option-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.option-row {
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
  background: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.option-row:hover { border-color: var(--blue); }
.option-row.selected { border-color: var(--color-accent); background: rgba(161,58,50,0.06); color: var(--color-accent-dark); }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-300);
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--charcoal);
  background: var(--white);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45,65,100,0.15);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.field .helper { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 5px; }
.suburb-note {
  display: none;
  font-size: 0.85rem;
  color: var(--color-accent-dark);
  background: rgba(161,58,50,0.08);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
}
.suburb-note.show { display: block; }

.step-error {
  color: var(--color-accent-dark);
  background: rgba(161,58,50,0.08);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-top: 10px;
}
.quote-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 12px; }
.quote-nav .btn-back { visibility: hidden; }
.quote-nav .btn-back.show { visibility: visible; }

.quote-success { text-align: center; padding: 20px 4px; }
.quote-success svg { width: 56px; height: 56px; color: var(--color-accent); margin: 0 auto 16px; }
.quote-success h3 { margin-bottom: 8px; }
.quote-success p { color: var(--color-text-muted); }

@media (max-width: 860px) {
  .quote-wrap { grid-template-columns: 1fr; gap: 32px; }
  .quote-card { padding: 24px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.82); padding: 64px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 38px; }
.footer-brand span { font-family: var(--font-display); font-weight: 700; color: var(--white); font-size: 1.05rem; }
.site-footer h4 { color: var(--white); font-size: 0.85rem; letter-spacing: 0.03em; margin-bottom: 14px; }
.site-footer ul { display: flex; flex-direction: column; gap: 9px; }
.site-footer a, .site-footer li { font-size: 0.9rem; color: rgba(255,255,255,0.72); }
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(155deg, var(--navy-deep), var(--blue));
  color: var(--white);
  padding: 56px 0;
}
.page-hero .breadcrumb { font-size: 0.85rem; color: var(--blue-pale); margin-bottom: 10px; }
.page-hero .breadcrumb a { color: var(--blue-pale); }
.page-hero .breadcrumb a:hover { color: var(--white); }
.page-hero h1 { color: var(--white); font-size: clamp(1.9rem, 4vw, 2.6rem); max-width: 22ch; }
.page-hero p { color: rgba(255,255,255,0.85); max-width: 52ch; font-size: 1.05rem; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack-lg > * + * { margin-top: 20px; }
.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  background: rgba(161,58,50,0.08);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
