/* =====================================================================
   ASB Freight — site styles (prototype 2026)
   Plain CSS, no build step. Sections are commented so the agency can
   find things quickly. Colours and type live in the tokens below.
   ===================================================================== */

/* ---- tokens -------------------------------------------------------- */
:root {
  --orange: #f5831f;          /* ASB orange: buttons, accents, large display only */
  --orange-deep: #a85200;     /* small orange text on light backgrounds: 5.4:1 on white, 4.9:1 on paper */
  --orange-text: #cf6a12;     /* large orange headline words on light backgrounds: 3.3:1 (large-text minimum is 3:1) */
  --orange-light: #ff9a4a;    /* small orange text on navy: 5.5:1 or more, even where navy takes its blue glow */
  --blue: #1f4e9c;            /* ASB royal blue */
  --navy: #14203a;            /* text and dark sections */
  --navy-2: #1b2b4a;
  --ink: #14203a;
  --ink-2: #4a5568;           /* secondary text */
  --ink-3: #5f6877;           /* hints, captions: 5.1:1 on paper */
  --paper: #f6f4f0;           /* warm off-white page background */
  --paper-2: #efece6;
  --white: #ffffff;
  --line: #e2dfd8;
  --line-dark: rgba(255, 255, 255, 0.14);

  --font-display: "Funnel Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --pill: 999px;
  --gutter: clamp(16px, 3.2vw, 40px);
  --max: 1440px;
  --nav-h: 64px;

  --shadow-1: 0 1px 2px rgba(20, 32, 58, 0.06), 0 8px 24px rgba(20, 32, 58, 0.08);
  --shadow-2: 0 2px 6px rgba(20, 32, 58, 0.08), 0 24px 60px rgba(20, 32, 58, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 28px); }   /* anchors and focused fields clear the fixed header */
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-footer :focus-visible, .offices :focus-visible { outline-color: #fff; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* ---- type scale ---------------------------------------------------- */
.display-xl { font-size: clamp(44px, 7.4vw, 120px); font-weight: 300; letter-spacing: -0.035em; line-height: 0.98; }
.display-l  { font-size: clamp(36px, 5.2vw, 84px);  font-weight: 300; letter-spacing: -0.03em; }
.display-m  { font-size: clamp(28px, 3.4vw, 52px);  font-weight: 400; }
.lead       { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.small      { font-size: 14px; color: var(--ink-3); }
.accent     { color: var(--orange-text); }
.on-dark .accent { color: var(--orange); }

/* eyebrow tag: small square + label */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 12px/1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--orange); transform: rotate(45deg); border-radius: 2px; }
.on-dark .eyebrow { color: rgba(255, 255, 255, 0.72); }

/* ---- buttons ------------------------------------------------------- */
.btn {
  --bg: var(--orange); --fg: var(--navy);
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 8px 0 24px;
  border: 0; border-radius: var(--pill);
  background: var(--bg); color: var(--fg);
  font: 600 15px/1 var(--font-body); letter-spacing: 0.01em; text-decoration: none;
  cursor: pointer; transition: transform 0.35s var(--ease), background 0.25s, box-shadow 0.35s var(--ease);
}
.btn .arrow {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #fff; transition: transform 0.35s var(--ease);
}
.btn .arrow svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(245, 131, 31, 0.32); }
.btn:hover .arrow { transform: translateX(3px) rotate(-45deg); }
.btn--ghost { --bg: transparent; --fg: var(--navy); box-shadow: inset 0 0 0 1.5px rgba(20, 32, 58, 0.22); }
.btn--ghost .arrow { background: var(--orange); color: var(--navy); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn--light { --bg: #fff; --fg: var(--navy); }
.on-dark .btn--ghost { --fg: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); }
.on-dark .btn--ghost:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* text link with arrow */
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--navy); }
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---- forms --------------------------------------------------------- */
.field { display: grid; gap: 6px; align-content: start; }
.field label { font: 600 13px/1.2 var(--font-body); color: var(--ink-2); }
.field label .req { color: var(--orange-deep); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 13px 16px;
  font: 400 16px/1.4 var(--font-body); color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea { min-height: 140px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2314203a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 78, 156, 0.14); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #c0392b; }
.field .error { font-size: 13px; color: #b3261e; margin: 0; }
.field .error:empty { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* segmented choice (enquiry vs quotation, LCL/FCL/AIR) */
.segmented { display: inline-flex; padding: 5px; gap: 4px; background: var(--paper-2); border-radius: var(--pill); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  padding: 11px 20px; border-radius: var(--pill); cursor: pointer;
  font: 600 14px/1 var(--font-body); color: var(--ink-2); transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.segmented input:checked + label { background: var(--white); color: var(--navy); box-shadow: var(--shadow-1); }
.segmented input:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { padding: 10px 18px; border: 1.5px solid var(--line); border-radius: var(--pill); cursor: pointer; font: 600 14px/1 var(--font-body); background: #fff; }
.chips input:checked + label { border-color: var(--navy); background: var(--navy); color: #fff; }
.chips input:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---- footer -------------------------------------------------------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, 0.78); padding: clamp(56px, 7vw, 96px) 0 28px; font-size: 15px; }
.site-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer h3 { font: 600 13px/1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-logo { background: #fff; display: inline-block; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.footer-logo img { width: 160px; height: auto; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line-dark); font-size: 13px; color: rgba(255, 255, 255, 0.55); }
.footer-credit { display: inline-flex; align-items: center; gap: 6px; }
.footer-credit a { display: inline-flex; align-items: center; gap: 7px; }
.footer-credit img { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-dark); }
.socials a:hover { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.socials svg { width: 17px; height: 17px; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- motion preferences --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
