/*
 * TowMe.ie — base styles
 *
 * Every .css file in this folder is loaded automatically (see the
 * `stylesheet_link_tag :app` line in the layout). Files are split by purpose:
 *
 *   application.css  colours, fonts, resets (this file)
 *   layout.css       header, footer, page containers
 *   buttons.css      .btn variants
 *   badges.css       small labels, chips, pills
 *   cards.css        white boxes and provider cards
 *   forms.css        inputs, selects, checkboxes
 *   home.css, provider.css, county.css, for_providers.css  page-specific bits
 *   map.css          Leaflet map + pins
 */

/* ---- Design tokens: change the look of the whole site here ----
   Brand colours come from the Tow Me Brand Guidelines (v1.0, page 7).
   Rough mix: 60% white, 20% red accents, 15% black type, 5% grey surfaces. */
:root {
  /* Brand palette */
  --red: #d0010a;          /* Tow Me Red: main buttons, Priority, accents */
  --red-dark: #a80008;     /* red on hover */
  --ink: #111111;          /* Near Black: text, dark buttons, dark sections */
  --ink-2: #222222;        /* slightly lighter black (stat boxes on black) */
  --card: #ffffff;         /* White */
  --tint: #f2f2f2;         /* Support Grey: quiet boxes and surfaces */

  /* Neutrals built from the palette */
  --bg: #ffffff;           /* page background */
  --muted: #5c5c5c;        /* secondary text */
  --line: #e3e3e3;         /* borders */
  --on-dark-muted: #c4c4c4;/* secondary text on black backgrounds */

  /* Functional colours (not brand colours; they each mean something) */
  --error: #a3121a;        /* darker than brand red so errors don't look like buttons */
  --error-soft: #fdeded;
  --error-line: #f3c2c2;
  --warn: #7a5a00;         /* admin "Pending" label */
  --warn-soft: #fdf6e3;
  --warn-line: #ecd79a;
  --green-soft: #e1f3e6;
  --green: #1e6b3a;
  --road-m: #1f5fbf;       /* motorway sign blue */
  --road-n: #1f7a3a;       /* national road green */

  /* Fonts (brand page 8): Inter for headings, Roboto for everything else */
  --font-display: "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Roboto", system-ui, -apple-system, sans-serif;

  /* Spacing scale: use these instead of one-off pixel values.
     clamp(min, preferred, max) grows the space smoothly with screen width. */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: clamp(48px, 6vw, 72px);
  --space-section: clamp(72px, 10vw, 128px);  /* top/bottom of each page section */
  --gutter: clamp(20px, 4vw, 48px);           /* left/right page edge (10px on phones, see below) */

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
}

/* Phones: half the usual page-edge padding, so content gets more width */
@media (max-width: 480px) {
  :root { --gutter: 10px; }
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;         /* brand: body text 16–18px */
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---- Typography ---- */
/* Brand: H1 Inter ExtraBold 800, H2 Inter Bold 700. Sentence case. */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
h1 { font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }

.lead { font-size: 1.2rem; line-height: 1.65; color: var(--muted); max-width: 40rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.text-red { color: var(--red); }
.link-arrow { font-weight: 600; font-size: 0.9rem; text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; }
