/* ==========================================================================
   Wildbox Solutions — design system
   Single source of truth for tokens and components.

   The accent is emitted by PHP into --accent / --accent-rgb (includes/header.php)
   from getPrimaryColor(), and the Tailwind config consumes those same variables.
   Never hardcode an accent-derived colour below — use color-mix() so the admin
   colour picker keeps driving the whole site.
   ========================================================================== */

:root {
    /* Surfaces — white canvas, one sunk tone for inset panels only */
    --paper:        #ffffff;
    --paper-sunk:   #f7f7f6;

    /* Ink */
    --ink:          #14171a;
    --ink-soft:     #565d63;
    --ink-faint:    #8b9299;

    /* Structure — hairlines carry separation, not shadows */
    --rule:         #e6e7e8;
    --rule-strong:  #d3d5d7;

    /* Accent — --accent and --accent-rgb are set inline by header.php.
       Everything accent-derived is computed, so one admin change moves it all. */
    --accent-ink:   color-mix(in oklch, var(--accent) 88%, #000);
    --accent-hover: color-mix(in oklch, var(--accent) 86%, #000);
    --accent-wash:  color-mix(in oklch, var(--accent) 7%, #fff);
    --accent-edge:  color-mix(in oklch, var(--accent) 22%, #fff);

    /* Status */
    --ok:           #2e7d32;
    --warn:         #9a6700;
    --err:          #b3261e;
    --ok-wash:      color-mix(in oklch, var(--ok) 8%, #fff);
    --warn-wash:    color-mix(in oklch, var(--warn) 10%, #fff);
    --err-wash:     color-mix(in oklch, var(--err) 8%, #fff);

    /* Type */
    --display: "Bricolage Grotesque", "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --body:    "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Space — 8px grid, explicit */
    --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;  --s5: 24px;
    --s6: 32px;  --s7: 48px;  --s8: 64px;  --s9: 96px;  --s10: 128px;
    --section-y: clamp(72px, 9vw, 128px);
    --gutter: 24px;
    --measure: 68ch;

    /* Shape — one radius per role */
    --r-input: 10px;
    --r-card:  14px;
    --r-pill:  999px;

    /* Motion */
    --t-fast: 140ms;
    --t-slow: 220ms;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 16.5px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.022em;
    line-height: 1.1;
}

::selection { background: var(--accent-edge); color: var(--ink); }

/* One visible focus treatment, everywhere */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 3px;
}

img { max-width: 100%; height: auto; }

/* Tabular numerals wherever a figure is read as data */
.tnum, .spec-row dd, .stat-band__value {
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section-padding,
.section {
    padding-block: var(--section-y);
}

.section--tight { padding-block: clamp(48px, 6vw, 80px); }

/* Section hairlines — the only separator the system uses */
.section--ruled      { border-top: 1px solid var(--rule); }
.section--ruled-both { border-block: 1px solid var(--rule); }

/* Two heading steps that recur outside the hero */
.h-band { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; }
.h-sect { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; }
.h-detail { font-size: clamp(34px, 4vw, 52px); }

/* Hairline separators do the work shadows used to */
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.measure { max-width: var(--measure); }

@media (max-width: 768px) {
    :root { --gutter: 20px; }
}

/* --------------------------------------------------------------------------
   Type components
   -------------------------------------------------------------------------- */

.eyebrow,
.label-chip {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* The accent eyebrow is one half of the two-per-screen accent budget */
.eyebrow--accent { color: var(--accent); }

.lede {
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: var(--measure);
}

.prose { max-width: var(--measure); color: var(--ink-soft); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 1.8em; font-size: 28px; color: var(--ink); }
.prose h3 { margin-top: 1.6em; font-size: 21px; color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn,
.btn-primary,
.btn-outline,
.btn-quiet,
.btn-invert,
.btn-ghost-light,
.btn-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    min-height: 46px;
    padding: 12px 26px;
    border-radius: var(--r-input);
    font-family: var(--body);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.005em;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease),
                color var(--t-fast) var(--ease);
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
}
.btn-primary:hover { background-color: var(--accent-hover); color: #fff; }
.btn-primary:active { background-color: var(--accent-ink); }

.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--rule-strong);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-quiet {
    background: transparent;
    color: var(--ink-soft);
    border-color: var(--rule);
}
.btn-quiet:hover { color: var(--ink); border-color: var(--rule-strong); }

/* On the footer, the site's only dark surface */
.btn-invert {
    background: #fff;
    color: var(--ink);
}
.btn-invert:hover { background: var(--paper-sunk); }

/* Ghost button for dark bands (pre-footer CTA) */
.btn-ghost-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}
.btn-ghost-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn-wa {
    background-color: #1faa53;
    color: #fff;
}
.btn-wa:hover { background-color: #179144; color: #fff; }

.btn[disabled], .btn-primary[disabled] {
    opacity: 0.45;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--r-card);
    overflow: hidden;
    transition: border-color var(--t-slow) var(--ease);
}
.card:hover { border-color: var(--rule-strong); }

.card__media {
    aspect-ratio: 4 / 3;
    background: var(--paper-sunk);
    overflow: hidden;
    display: block;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card__body { padding: var(--s5); }
.card__meta {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Forms — the enquiry path is the site's conversion path
   -------------------------------------------------------------------------- */

.field,
input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], input[type="search"], input[type="password"],
input[type="date"], select, textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: var(--r-input);
    font-family: var(--body);
    font-size: 16px;
    color: var(--ink);
    transition: border-color var(--t-fast) var(--ease);
}

input::placeholder, textarea::placeholder { color: var(--ink-faint); }

.field:hover,
input:hover, select:hover, textarea:hover { border-color: var(--ink-faint); }

.field:focus,
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

textarea { min-height: 132px; resize: vertical; line-height: 1.6; }

.label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }

.help { font-size: 13px; color: var(--ink-faint); margin-top: 6px; }
.error { font-size: 13px; color: var(--err); margin-top: 6px; }
.field--error { border-color: var(--err); }

.form-note {
    background: var(--paper-sunk);
    border: 1px solid var(--rule);
    border-radius: var(--r-card);
    padding: var(--s5);
}

/* --------------------------------------------------------------------------
   Specs — containers have real numbers, so they get mono and hairlines
   -------------------------------------------------------------------------- */

.spec-list { border-top: 1px solid var(--rule); }
.spec-row {
    display: flex;
    justify-content: space-between;
    gap: var(--s4);
    padding: 13px 0;
    border-bottom: 1px solid var(--rule);
    margin: 0;
}
.spec-row dt { color: var(--ink-soft); font-size: 15px; }
.spec-row dd {
    margin: 0;
    font-family: var(--mono);
    font-size: 14px;
    color: var(--ink);
    text-align: right;
}

/* --------------------------------------------------------------------------
   Status pills — never colour alone, always a word
   -------------------------------------------------------------------------- */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--rule);
    background: var(--paper-sunk);
    color: var(--ink-soft);
}
.pill--ok     { background: var(--ok-wash);     border-color: color-mix(in oklch, var(--ok) 25%, #fff);   color: var(--ok); }
.pill--warn   { background: var(--warn-wash);   border-color: color-mix(in oklch, var(--warn) 25%, #fff); color: var(--warn); }
.pill--err    { background: var(--err-wash);    border-color: color-mix(in oklch, var(--err) 25%, #fff);  color: var(--err); }
.pill--accent { background: var(--accent-wash); border-color: var(--accent-edge);                         color: var(--accent); }

/* --------------------------------------------------------------------------
   Heroes — white and type-led. No black gradient washes.
   -------------------------------------------------------------------------- */

.hero {
    padding-block: clamp(56px, 7vw, 104px) clamp(48px, 6vw, 88px);
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
}

/* Editorial split: type left, real image right */
.hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.hero__title {
    font-family: var(--display);
    font-size: clamp(44px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.032em;
    font-weight: 600;
    color: var(--ink);
}

.hero__frame {
    border-radius: var(--r-card);
    overflow: hidden;
    background: var(--paper-sunk);
    border: 1px solid var(--rule);
    aspect-ratio: 4 / 3;
    position: relative;
}
.hero__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Offset accent frame — a 2px accent border offset up-left, drawn behind the
   image so it peeks out around the corner. Matches the service detail
   "Advantage" imagery the client loves.
   NB: must use the space+slash rgb() syntax (rgb(var(--accent-rgb) / .4));
   rgba(var(--accent-rgb), .4) expands to invalid mixed-separator CSS and the
   border silently never renders. */
.frame-offset { position: relative; }
.frame-offset::before {
    content: "";
    position: absolute;
    top: -16px;
    left: -16px;
    width: 100%;
    height: 100%;
    border: 2px solid rgb(var(--accent-rgb) / 0.4);
    border-radius: var(--r-card);
    pointer-events: none;
}
@media (max-width: 767px) { .frame-offset::before { display: none; } }

/* Page hero: content pages, no image */
.hero--page .hero__title { font-size: clamp(34px, 4vw, 48px); letter-spacing: -0.015em; }

@media (max-width: 920px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__frame { aspect-ratio: 16 / 10; }
}

/* Slide stack for the home hero */
.hero-slide { display: none; height: 100%; }
.hero-slide.is-active { display: block; }
.hero-text-slide { display: none; }
.hero-text-slide.is-active { display: block; }

/* Slider dots — a rule indicator, not floating circles */
.hero-dot {
    width: 34px; height: 2px;
    background: var(--rule-strong);
    border: 0; padding: 0; cursor: pointer;
    transition: background-color var(--t-fast) var(--ease);
}
.hero-dot:hover { background: var(--ink-faint); }
.hero-dot.is-active { background: var(--accent); }

/* --------------------------------------------------------------------------
   Stat band
   -------------------------------------------------------------------------- */

.stat-band {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding-block: var(--s7);
    background: var(--paper);
}
.stat-band__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s6);
}
.stat-band__value {
    font-family: var(--display);
    font-size: clamp(26px, 2.6vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.025em;
    font-weight: 600;
    color: var(--ink);
}
.stat-band__label {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-top: 6px;
}
@media (max-width: 768px) {
    .stat-band__grid { grid-template-columns: repeat(2, 1fr); gap: var(--s5); }
}

/* --------------------------------------------------------------------------
   Yard gallery — real container imagery, caption beside the photo not over it
   -------------------------------------------------------------------------- */

.yard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s5);
}
.yard-shot { margin: 0; }
.yard-shot__frame {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--r-card);
    border: 1px solid var(--rule);
    background: var(--paper-sunk);
}
.yard-shot__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yard-shot figcaption {
    margin-top: var(--s4);
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-soft);
}
.yard-shot figcaption strong {
    display: block;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 6px;
}
@media (max-width: 900px) { .yard-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Statement blocks — Vision / Mission on About
   -------------------------------------------------------------------------- */

.statement-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(32px, 5vw, 64px);
}
.statement { border-top: 2px solid var(--ink); padding-top: var(--s5); }
.statement h3 {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: var(--s4);
}
.statement p {
    font-family: var(--display);
    font-size: clamp(20px, 2vw, 25px);
    line-height: 1.45;
    letter-spacing: -0.018em;
    font-weight: 500;
    color: var(--ink);
}
@media (max-width: 768px) { .statement-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Numbered sequence — How It Works
   -------------------------------------------------------------------------- */

.step-list { border-top: 1px solid var(--rule); }
.step {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: var(--s5);
    padding-block: var(--s6);
    border-bottom: 1px solid var(--rule);
}
.step__n {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--accent);
    padding-top: 6px;
}
@media (max-width: 640px) { .step { grid-template-columns: 1fr; gap: var(--s3); } }

/* Outlined step numeral — How It Works (was an inline <style> in how-it-works.php) */
.hiw-step-num {
    -webkit-text-stroke: 1px var(--accent);
    color: transparent;
    font-family: var(--display);
    font-weight: 600;
    font-size: 64px;
    line-height: 1;
    pointer-events: none;
}
#hiwJourney { transition: opacity var(--t-slow) var(--ease); }

/* --------------------------------------------------------------------------
   Empty states
   -------------------------------------------------------------------------- */

.empty {
    text-align: center;
    padding: var(--s9) var(--s5);
    border: 1px dashed var(--rule-strong);
    border-radius: var(--r-card);
    background: var(--paper-sunk);
}
.empty h3 { font-size: 21px; margin-bottom: var(--s2); }
.empty p { color: var(--ink-soft); max-width: 46ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in oklch, var(--paper) 92%, transparent);
    backdrop-filter: saturate(1.6) blur(10px);
    border-bottom: 1px solid var(--rule);
}

.nav__link {
    font-size: 15px;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color var(--t-fast) var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); font-weight: 500; }

.nav__sheet {
    border-top: 1px solid var(--rule);
    background: var(--paper);
}

.cart-dot {
    position: absolute;
    top: -6px; right: -8px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent);
    color: #fff;
    border-radius: var(--r-pill);
    font-family: var(--mono);
    font-size: 10.5px;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   Pre-footer hero (CTA band) — the site's one dramatic dark moment.
   claude.md: exactly 100px vertical padding, zero margins, faded background
   image under a gradient overlay, content wrapped at z-20 for legibility.
   -------------------------------------------------------------------------- */

.prefooter-cta {
    position: relative;
    overflow: hidden;
    padding: 100px 0;
    margin: 0;
    display: block;
    background: #101c2b;
    border-top: 1px solid var(--rule);
}

.prefooter-cta__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.16;
    filter: saturate(0.7);
}

.prefooter-cta__overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: linear-gradient(100deg,
        rgba(9, 17, 27, 0.90) 0%,
        rgba(12, 30, 52, 0.78) 45%,
        rgba(31, 78, 121, 0.60) 100%);
}

.prefooter-cta .eyebrow { color: #9fc0e0; }

.prefooter-cta__title {
    font-family: var(--display);
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.025em;
    font-weight: 600;
    color: #fff;
    max-width: none;
    text-wrap: nowrap;
    margin: 16px auto 0;
}

@media (max-width: 900px) { .prefooter-cta__title { text-wrap: balance; } }

.prefooter-cta__lede {
    color: #c3d0dc;
    max-width: 56ch;
    margin: 18px auto 0;
    font-size: 18px;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Footer — the one dark surface on the site
   -------------------------------------------------------------------------- */

.site-footer {
    position: relative;
    overflow: hidden;
    background: #10151a;
    color: #d7dbde;
}

/* Faded container scene behind the footer content */
.footer__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.07;
    filter: saturate(0.6) brightness(0.9);
}

/* Legibility shade over the faded image */
.footer__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 21, 26, 0.80) 0%, rgba(12, 16, 20, 0.96) 100%);
}
.site-footer h4 {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8b9299;
}
/* Link colour applies to footer LINKS only — :not() keeps it off buttons, which carry
   their own colour. Without this, .site-footer a (0,2,0) beat .btn-invert (0,1,0) and
   painted the white "Request a quote" button in #d7dbde text: 1.35:1, unreadable. */
.site-footer a:not([class*="btn-"]) { color: #d7dbde; text-decoration: none; transition: color var(--t-fast) var(--ease); }
.site-footer a:not([class*="btn-"]):hover { color: #fff; }

.wa-float {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 60;
    width: 52px; height: 52px;
    border-radius: var(--r-pill);
    background: #1faa53;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(20, 23, 26, 0.18);
    transition: background-color var(--t-fast) var(--ease);
}
.wa-float:hover { background: #179144; }

/* --------------------------------------------------------------------------
   About timeline (was an inline <style> block in index.php)
   -------------------------------------------------------------------------- */

.about-timeline { position: relative; }
.about-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background-color: var(--rule);
    z-index: 0;
}
@media (max-width: 768px) { .about-timeline::before { left: 24px; transform: none; } }

/* --------------------------------------------------------------------------
   Icons
   -------------------------------------------------------------------------- */

.material-symbols-outlined {
    font-family: "Material Symbols Outlined" !important;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
}

/* Print */
@media print {
    .site-header, .site-footer, .wa-float { display: none; }
    body { color: #000; }
}

/* Icon-only WhatsApp control (product card row) */
.btn-wa--icon { min-height: 36px; width: 36px; padding: 0; }

/* Three-up variant of the stat band, used on About */
.stat-band__grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) { .stat-band__grid--3 { grid-template-columns: repeat(3, 1fr); } }
