/* Venbeck Transport — one-page quote site.
   Design language mirrors venbeckwholesale.co.za: Syncopate wordmark, Geist
   body text, steel-blue (#285780) primary on a warm off-white ground, white
   cards with hairline borders, 0.5rem radii. Tokens below are the same names
   and values the wholesale app uses, so the two sites stay in step.
   Mobile-first: most visitors are on a phone at a loading bay. */

/* --- self-hosted fonts (latin subset) ------------------------------------ */
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-400_700.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Syncopate";
  src: url("/fonts/syncopate-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Syncopate";
  src: url("/fonts/syncopate-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* --- tokens (light) ------------------------------------------------------ */
:root {
  --background: #faf8f5;
  --foreground: #285780;
  --card: #ffffff;
  --card-foreground: #285780;
  --border: #dfdedc;
  --input: #dfdedc;
  --muted: #ecebe9;
  --muted-foreground: #555555;
  --primary: #285780;
  --primary-foreground: #f8f8f8;
  --destructive: #a20519;
  --destructive-soft: #fdecea;
  --ok: #17694a;
  --ok-soft: #f2fbf7;
  --warn: #8a5a00;
  --warn-soft: #fdf6e7;
  --radius: .5rem;
  --radius-lg: 1.5rem;
  --wrap: 660px;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --display: "Syncopate", var(--sans);
  color-scheme: light;
}

/* Wholesale defines its dark palette on a `.dark` class and never consults the
   OS colour-scheme preference at all, so that site stays light even for a
   visitor whose machine is in dark mode. Match that exactly — same token
   names, same class trigger, no automatic flip — otherwise the two sites
   disagree on a dark-mode machine. Set class="dark" on <html> for a toggle. */
.dark {
  --background: #060606;
  --foreground: #f8f8f8;
  --card: #0d0d0d;
  --card-foreground: #f8f8f8;
  --border: #242424;
  --input: #242424;
  --muted: #1b1b1b;
  --muted-foreground: #8f8f8f;
  --primary: #285780;
  --primary-foreground: #f8f8f8;
  --destructive: #cc272e;
  --destructive-soft: #2a0d0f;
  --ok: #4ec08d;
  --ok-soft: #0c1a14;
  --warn: #d8a33c;
  --warn-soft: #1e1708;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* An author rule setting `display` beats the browser's default
   [hidden] { display: none }, so .quote-detail > div { display: flex } left
   hidden rows visible showing their placeholders. This restores the attribute
   as the single switch for showing a row. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font: 16px/1.6 var(--sans);
  color: var(--foreground);
  background: var(--background);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* --- hero ----------------------------------------------------------------
   Wholesale renders its masthead as a solid --primary block with a large
   rounded radius and a centred Syncopate wordmark; same shape here. */
.hero { padding: 20px 0 0; }
.hero .wrap > .hero-panel {
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius-lg);
  padding: 44px 24px 48px;
  text-align: center;
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(19px, 6.2vw, 34px);
  letter-spacing: -.04em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--primary-foreground);
  margin: 0 0 18px;
}
/* The wholesale wordmark is a single weight — no accent colour on one word. */
.brand span { color: inherit; }

.hero h1 {
  margin: 0 auto 14px;
  font-size: clamp(24px, 5.4vw, 32px);
  line-height: 1.22;
  letter-spacing: -.02em;
  font-weight: 600;
  max-width: 18em;
}
.lede {
  margin: 0 auto;
  color: rgba(248, 248, 248, .82);
  font-size: 16px;
  max-width: 34em;
}

/* --- cards --------------------------------------------------------------- */
main { padding: 28px 0 56px; }
.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 18px;
}
.card h2 {
  margin: 0 0 18px; font-size: 17px; font-weight: 600;
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 10px;
}
.step {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; flex: 0 0 26px;
  background: var(--primary); color: var(--primary-foreground);
  border-radius: 50%; font-size: 13px; font-weight: 700;
}

/* --- form ---------------------------------------------------------------- */
label {
  display: block; font-size: 14px; font-weight: 600;
  margin: 16px 0 6px; color: var(--foreground);
}
label:first-of-type { margin-top: 0; }
.opt { font-weight: 400; color: var(--muted-foreground); }

select, input, textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 16px;
  color: var(--foreground); background: var(--card);
  border: 1px solid var(--input); border-radius: var(--radius);
}
select:focus, input:focus, textarea:focus {
  outline: 2px solid var(--primary); outline-offset: 1px;
  border-color: transparent;
}
textarea { resize: vertical; }
.truck-hint { margin: 8px 0 0; }

/* Google's autocomplete web component drops into these slots. The tag name has
   changed across API versions, so match any custom element rather than one name
   — a missed selector renders a zero-width box that looks like a broken API. */
.place-slot > * { width: 100%; display: block; box-sizing: border-box; }
.place-slot gmp-place-autocomplete,
.place-slot gmp-placeautocomplete { width: 100%; display: block; }
.place-slot { width: 100%; min-height: 46px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: block; width: 100%; margin-top: 20px;
  padding: 13px 18px; font: inherit; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--radius); cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease;
}
.btn.primary { background: var(--primary); color: var(--primary-foreground); }
.btn.primary:hover:not(:disabled) { background: #21496c; }
.btn:disabled { background: var(--muted); color: var(--muted-foreground); cursor: not-allowed; }
.btn.busy { opacity: .7; cursor: progress; }

.hint { margin: 10px 0 0; font-size: 13.5px; color: var(--muted-foreground); }

/* --- quote --------------------------------------------------------------- */
.quote-card { background: var(--muted); border-color: var(--border); }
.quote-figure {
  display: flex; align-items: baseline; gap: 4px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 8vw, 40px); letter-spacing: -.05em;
  color: var(--foreground); margin-bottom: 20px;
}
.quote-figure .currency {
  font-size: .6em; font-weight: 400; color: var(--muted-foreground);
}

.quote-detail {
  margin: 0 0 14px; display: grid; gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.quote-detail > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 13px; background: var(--card); font-size: 14.5px;
}
.quote-detail .total-row { background: var(--muted); font-weight: 600; }
.quote-detail .total-row dt { color: var(--foreground); }
.quote-detail dt { color: var(--muted-foreground); margin: 0; }
.quote-detail dd { margin: 0; font-weight: 600; text-align: right; }

.note {
  margin: 0 0 12px; padding: 10px 12px; font-size: 14px;
  background: var(--warn-soft); color: var(--foreground);
  border-left: 3px solid var(--warn); border-radius: var(--radius);
}
.fineprint { margin: 0; font-size: 13px; color: var(--muted-foreground); }

/* --- states -------------------------------------------------------------- */
.alert {
  margin: 0 0 18px; padding: 13px 15px; border-radius: var(--radius);
  background: var(--destructive-soft); color: var(--destructive);
  border: 1px solid var(--destructive); font-size: 15px;
}
.success { border-color: var(--ok); background: var(--ok-soft); }
.success h2 { color: var(--ok); }
.contact { border-color: var(--warn); background: var(--warn-soft); }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.dark a { color: #7fb3dd; }

footer {
  border-top: 1px solid var(--border); padding: 26px 0 34px;
  font-size: 13.5px; color: var(--muted-foreground);
}
footer p { margin: 0; }
.footer-mark {
  font-family: var(--display); font-weight: 700; font-size: 12px;
  letter-spacing: -.02em; text-transform: uppercase;
  color: var(--foreground); display: block; margin-bottom: 8px;
}

@media (min-width: 620px) {
  .hero .wrap > .hero-panel { padding: 64px 40px 68px; }
  .card { padding: 26px 24px; }
  .btn { width: auto; min-width: 240px; }
}
