/* ============================================================================
   ProField — stylesheet
   ============================================================================
   ORGANISATION (search these headings to jump to a part):
     [1] DESIGN TOKENS     — colours, type, spacing as CSS variables
     [2] RESET & BASE      — element defaults
     [3] LAYOUT HELPERS    — .container, .grid, spacing
     [4] BUTTONS           — .btn variants
     [5] HEADER & NAV      — sticky header, mobile menu
     [6] HERO              — section 2
     [7] BENEFITS          — section 3 cards
     [8] AI SHOWCASE       — section 4
     [9] TESTIMONIALS      — section 5
     [10] PRICING          — section 6
     [11] SIGNUP           — section 7 form
     [12] FOOTER           — section 8
     [13] REVEAL ANIMATION — scroll-in effect
     [14] RESPONSIVE       — mobile / tablet breakpoints

   To re-theme the whole site, change the variables in [1] DESIGN TOKENS only.
   ============================================================================ */


/* ============================================================================
   [1] DESIGN TOKENS
   ============================================================================ */
:root {
  /* Brand colours — "high-vis" tradie orange on a deep navy */
  --c-accent:        #ff6a1a;   /* primary action / highlight */
  --c-accent-dark:   #e2550c;
  --c-ink:           #0e1525;   /* near-black navy — dark sections, text */
  --c-ink-soft:      #1b2435;
  --c-text:          #232a38;   /* body text on light backgrounds */
  --c-text-muted:    #5b6473;
  --c-bg:            #ffffff;
  --c-bg-muted:      #f5f6f8;   /* alternating section background */
  --c-border:        #e6e8ec;
  --c-white-dim:     rgba(255, 255, 255, 0.72);

  /* Typography */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Layout */
  --maxw: 1140px;            /* content max width */
  --radius: 16px;            /* default corner radius */
  --radius-sm: 10px;

  /* Elevation */
  --shadow-sm: 0 2px 8px rgba(14, 21, 37, 0.06);
  --shadow-md: 0 12px 30px rgba(14, 21, 37, 0.10);
  --shadow-lg: 0 30px 60px rgba(14, 21, 37, 0.18);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}


/* ============================================================================
   [2] RESET & BASE
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; /* offset for sticky header */ }

body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Headings — fluid sizing with clamp() so they scale on any screen */
h1, h2, h3 { line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; color: var(--c-ink); }
h2 { font-size: clamp(1.8rem, 1.1rem + 2.4vw, 2.7rem); }
h3 { font-size: 1.2rem; font-weight: 700; }

/* Accessibility: visible focus outline for keyboard users */
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }

/* Skip link — hidden until focused */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--c-ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Shared accent text colour */
.text-accent { color: var(--c-accent); }


/* ============================================================================
   [3] LAYOUT HELPERS
   ============================================================================ */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* Standard vertical rhythm for every <section> */
.section { padding-block: clamp(56px, 4rem + 4vw, 104px); }
.section--muted { background: var(--c-bg-muted); }
.section--dark  { background: var(--c-ink); }
.section--dark h2 { color: #fff; }

/* Section heading block */
.section__head { max-width: 640px; margin: 0 auto clamp(36px, 4vw, 56px); text-align: center; }
.section__lead { color: var(--c-text-muted); font-size: 1.08rem; margin-top: 12px; }
.section--dark .section__lead { color: var(--c-white-dim); }

/* Eyebrow label above headings */
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--c-accent); margin-bottom: 10px;
}

/* Responsive card grid — used by benefits, testimonials, pricing */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }


/* ============================================================================
   [4] BUTTONS
   ============================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 0.98rem;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease),
                               background 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--c-accent); color: #fff; box-shadow: 0 8px 20px rgba(255, 106, 26, 0.35); }
.btn--primary:hover { background: var(--c-accent-dark); }

.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-border); }
.btn--ghost:hover { border-color: var(--c-ink); }
/* Light-on-dark ghost variant — applies to dark sections AND the hero */
.section--dark .btn--ghost,
.hero .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover { border-color: #fff; }

.btn--lg { padding: 15px 30px; font-size: 1.05rem; }
.btn--block { width: 100%; }


/* ============================================================================
   [5] HEADER & NAV
   ============================================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
/* .is-scrolled is toggled by JS once the page is scrolled */
.site-header.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--c-border); }

.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

/* Brand / logo lockup */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__name { font-size: 1.25rem; color: var(--c-ink); letter-spacing: -0.02em; }
.brand__mark { display: inline-flex; }

/* Nav links */
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-weight: 600; font-size: 0.96rem; color: var(--c-text); transition: color 0.15s var(--ease); }
.nav a:hover { color: var(--c-accent); }
.nav__cta { color: #fff; }
.nav__cta:hover { color: #fff; }

/* Mobile hamburger — hidden on desktop, shown via [14] RESPONSIVE */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--c-ink); border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
/* Animated hamburger -> X when menu open */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ============================================================================
   [6] HERO
   ============================================================================ */
.hero {
  position: relative; overflow: hidden;
  background: var(--c-ink);
  color: #fff;
  padding-block: clamp(56px, 5vw, 96px);
}

/* Soft orange glow behind the hero — purely decorative */
.hero__glow {
  position: absolute; top: -180px; right: -120px;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 26, 0.55), transparent 62%);
  filter: blur(20px); pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center;
}

.hero__title {
  color: #fff;
  font-size: clamp(2.3rem, 1.3rem + 3.8vw, 3.8rem);
  margin-bottom: 18px;
}
.hero__lead { color: var(--c-white-dim); font-size: 1.15rem; max-width: 30em; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.hero__trust {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin-top: 26px; font-size: 0.92rem; color: var(--c-white-dim);
}
.hero__trust li { display: flex; align-items: center; gap: 7px; }
.hero__trust span { color: var(--c-accent); font-weight: 800; }

/* --- Hero visual: stylised schedule card --------------------------------- */
.hero__visual { display: flex; justify-content: center; }

.schedule-card {
  width: 100%; max-width: 380px;
  background: #fff; color: var(--c-text);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-lg);
  transform: rotate(2deg);
}
.schedule-card__head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.schedule-card__title { font-weight: 800; color: var(--c-ink); }

.badge {
  font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.badge--live { background: rgba(255, 106, 26, 0.12); color: var(--c-accent-dark); }

.schedule-card__jobs { display: flex; flex-direction: column; gap: 12px; }
.schedule-card__jobs li {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  font-size: 0.9rem;
}
.schedule-card__jobs .job-time { color: var(--c-text-muted); font-weight: 700; }

/* Status dot per job row */
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-border); }
.dot--done { background: #2bb673; }
.dot--now  { background: var(--c-accent); box-shadow: 0 0 0 4px rgba(255, 106, 26, 0.18); }

/* "drive between jobs" row */
.schedule-card__jobs .travel {
  display: block; font-size: 0.78rem; color: var(--c-text-muted);
  padding-left: 20px; font-style: italic;
}

.schedule-card__foot {
  display: flex; justify-content: space-between;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--c-border);
  font-size: 0.86rem; font-weight: 700;
}


/* ============================================================================
   [7] BENEFITS
   ============================================================================ */
.card {
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 28px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              border-color 0.2s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; background: rgba(255, 106, 26, 0.1); margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--c-text-muted); font-size: 0.97rem; }


/* ============================================================================
   [8] AI SHOWCASE
   ============================================================================ */
.ai__inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.ai__copy .section__lead { margin-bottom: 22px; }

/* Checklist — reused by AI section + signup section */
.checklist { display: flex; flex-direction: column; gap: 11px; margin-bottom: 28px; }
.checklist li { position: relative; padding-left: 30px; color: var(--c-white-dim); }
.signup .checklist li { color: var(--c-text-muted); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--c-accent); color: #fff;
  font-size: 0.72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* --- AI before/after panel ----------------------------------------------- */
.ai-panel {
  background: var(--c-ink-soft); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius); padding: 26px;
}
.ai-panel__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ai-panel__label { color: var(--c-white-dim); font-weight: 700; font-size: 0.9rem; }
.ai-panel__stat { font-weight: 800; font-size: 0.9rem; }
.ai-panel__stat--bad  { color: #ff8b6b; }
.ai-panel__stat--good { color: #3fd18b; }

/* Route bars — visual stand-in for a map route */
.ai-panel__route { display: flex; gap: 6px; height: 14px; margin-bottom: 18px; }
.ai-panel__route span { flex: 1; border-radius: 4px; }
.ai-panel__route--bad span  { background: rgba(255, 139, 107, 0.35); }
.ai-panel__route--good span { background: rgba(63, 209, 139, 0.55); }

.ai-panel__divider {
  text-align: center; margin: 6px 0 18px; position: relative;
}
.ai-panel__divider::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: rgba(255, 255, 255, 0.1);
}
.ai-panel__divider span {
  position: relative; background: var(--c-ink-soft); padding: 0 12px;
  font-size: 0.78rem; font-weight: 700; color: var(--c-accent);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.ai-panel__result {
  margin-top: 18px; text-align: center; font-weight: 800; color: #fff;
}


/* ============================================================================
   [9] TESTIMONIALS
   ============================================================================ */
.quote {
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.quote__stars { color: var(--c-accent); letter-spacing: 2px; font-size: 0.95rem; }
.quote blockquote { font-size: 1.02rem; color: var(--c-text); }
.quote figcaption { display: flex; flex-direction: column; }
.quote__name { font-weight: 800; color: var(--c-ink); }
.quote__role { font-size: 0.86rem; color: var(--c-text-muted); }

/* Stats strip */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: 42px; padding: 30px; border-radius: var(--radius);
  background: var(--c-ink);
}
.stats__item { text-align: center; }
.stats__num { display: block; font-size: 1.9rem; font-weight: 800; color: var(--c-accent); }
.stats__label { font-size: 0.86rem; color: var(--c-white-dim); }


/* ============================================================================
   [10] PRICING
   ============================================================================ */
.plan {
  position: relative; background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 30px;
  display: flex; flex-direction: column; gap: 16px;
}
/* Featured plan stands out */
.plan--featured { border-color: var(--c-accent); box-shadow: var(--shadow-md); }
.plan__tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--c-accent); color: #fff;
  font-size: 0.74rem; font-weight: 700; padding: 5px 14px; border-radius: 999px;
}
.plan__name { font-size: 1.1rem; }
.plan__price { font-size: 1rem; color: var(--c-text-muted); }
.plan__price span { font-size: 2.4rem; font-weight: 800; color: var(--c-ink); }
.plan__features { display: flex; flex-direction: column; gap: 9px; flex-grow: 1; }
.plan__features li { padding-left: 24px; position: relative; font-size: 0.95rem; }
.plan__features li::before {
  content: "✓"; position: absolute; left: 0; color: var(--c-accent); font-weight: 800;
}
.plan .btn { width: 100%; }


/* ============================================================================
   [11] SIGNUP
   ============================================================================ */
.signup__inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}

.signup-form {
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 0.9rem; color: var(--c-ink); }
.field input, .field select {
  font-family: var(--font); font-size: 1rem;
  padding: 12px 14px; border: 1.5px solid var(--c-border); border-radius: var(--radius-sm);
  background: #fff; color: var(--c-text); transition: border-color 0.15s var(--ease);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--c-accent); }
/* Invalid state added by JS */
.field input.is-invalid, .field select.is-invalid { border-color: #e23b3b; }

.signup-form__note { font-size: 0.8rem; color: var(--c-text-muted); text-align: center; }
.signup-form__note a { color: var(--c-accent); font-weight: 600; }

.signup-form__success {
  background: rgba(43, 182, 115, 0.12); color: #1d8a55;
  font-weight: 700; text-align: center; padding: 12px; border-radius: var(--radius-sm);
}


/* ============================================================================
   [12] FOOTER
   ============================================================================ */
.site-footer { background: var(--c-ink); color: var(--c-white-dim); padding-top: 56px; }
.site-footer__inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px;
}
.site-footer__brand p { margin-top: 12px; font-size: 0.92rem; max-width: 26em; }
.site-footer__brand .brand__name { color: #fff; }
.site-footer__col h2 {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: #fff; margin-bottom: 14px;
}
.site-footer__col { display: flex; flex-direction: column; gap: 9px; }
.site-footer__col a { font-size: 0.93rem; transition: color 0.15s var(--ease); }
.site-footer__col a:hover { color: var(--c-accent); }

.site-footer__bar {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
}


/* ============================================================================
   [13] REVEAL ANIMATION
   ============================================================================
   Elements with .reveal start hidden + shifted down; JS adds .is-visible
   when they scroll into view. See assets/js/main.js. */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Respect users who prefer reduced motion — show everything immediately */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn:hover, .card:hover { transform: none; }
}


/* ============================================================================
   [14] RESPONSIVE
   ============================================================================ */

/* --- Tablet — collapse 3-up grids to 2-up -------------------------------- */
@media (max-width: 920px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .hero__inner,
  .ai__inner,
  .signup__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: -1; }              /* show the card first on stacked layout */
  .schedule-card { transform: none; }
  .ai__visual { max-width: 460px; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

/* --- Mobile — single column + slide-in nav menu -------------------------- */
@media (max-width: 640px) {
  .grid--3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .site-footer__inner { grid-template-columns: 1fr; }

  /* Show hamburger, hide inline nav until toggled */
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; padding: 16px 24px 24px;
    border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow-md);
    /* Hidden state — slid up out of view */
    transform: translateY(-130%); transition: transform 0.28s var(--ease);
  }
  /* .is-open is toggled by JS */
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 12px 4px; font-size: 1.05rem; }
  .nav__cta { margin-top: 8px; text-align: center; }

  .hero__actions .btn { flex: 1 1 100%; }
}
