/* Role Replacer: shared tokens and components. Every page loads css/brand.css, then this file.
   The brand's own values (colours, fonts, corners) are in css/brand.css and nowhere else; the names below are the
   ones the pages' stylesheets use, each set from a brand value. Page-specific styles live in their own files. */
@import url("/css/brand.css"); /* a page links brand.css itself; this is the net for one that forgets */

:root {
  --ground: var(--brand-ground);
  --ground-2: var(--brand-ground-soft);
  --paper: var(--brand-card);
  --ink: var(--brand-ink);
  --ink-2: var(--brand-ink-2);
  --ink-3: var(--brand-ink-3);
  --text: var(--brand-ink);
  --text-2: var(--brand-text-strong);
  --text-3: var(--brand-text-mid);
  --muted: var(--brand-text-2);
  --line: var(--brand-line);
  --line-soft: var(--brand-line-soft);
  --line-field: var(--brand-line-field);
  --track: var(--brand-line);
  --accent: var(--brand-accent);
  --accent-light: var(--brand-accent-light);
  --accent-dark: var(--brand-accent-dark);
  --accent-soft: var(--brand-accent-soft);
  --on-accent: var(--brand-on-accent);
  --highlight: var(--brand-highlight);
  --danger: var(--brand-danger);
  --danger-soft: var(--brand-danger-soft);

  /* On ink backgrounds */
  --on-ink: var(--brand-on-ink);
  --on-ink-2: var(--brand-on-ink-2);
  --on-ink-muted: var(--brand-on-ink-muted);
  --ink-line: var(--brand-ink-line);
  --ink-border: var(--brand-ink-border);

  --font-sans: var(--brand-font-body);
  --font-display: var(--brand-font-head);
  --font-mono: var(--brand-font-body); /* the labels that were set in a mono face are Inter now */

  --radius-sm: var(--brand-radius-button);
  --radius: var(--brand-radius-card);
  --radius-lg: var(--brand-radius-card);
  --border: 1px solid var(--line);
  --gutter: clamp(16px, 4vw, 32px);
  --maxw: 1280px;

  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--accent);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-ink);
  padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--on-ink); }

/* ---------- Layout ---------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-narrow { max-width: 960px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: clamp(64px, 9vw, 104px); padding-bottom: clamp(64px, 9vw, 104px); }
.section-paper { background: var(--paper); border-top: var(--border); border-bottom: var(--border); }
.section-ink { background: var(--ink); color: var(--on-ink); }
.section-orange { background: var(--accent); color: var(--on-accent); border-top: var(--border); }
[hidden] { display: none !important; }

/* ---------- Type ---------- */

.display {
  font-family: var(--font-display);
  font-weight: var(--brand-head-weight);
  letter-spacing: var(--brand-head-spacing);
  line-height: 1.06;
}
.h-hero { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.04; letter-spacing: -0.035em; }
.h-section { font-size: clamp(32px, 4vw, 52px); max-width: 980px; }
.h-card { font-size: clamp(24px, 2.4vw, 30px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-accent { color: var(--accent-dark); }
.section-ink .eyebrow { color: var(--on-ink-muted); }
.mono { font-family: var(--font-mono); }
.lede { font-size: clamp(20px, 2vw, 24px); line-height: 1.4; color: var(--text-2); max-width: 560px; }
.muted { color: var(--text-3); }
.small { font-size: 15px; }
.tiny { font-size: 13px; }

/* ---------- Header and footer ---------- */

.site-header { border-bottom: var(--border); background: var(--ground); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }

/* The logo is the lockup file (assets/brand/lockup.svg) inside .brand (css/brand.css). */
.logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo img { display: block; height: 30px; width: auto; }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.site-nav a { text-decoration: none; }

.site-footer { background: var(--ink); color: var(--on-ink-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-top: 40px; padding-bottom: 40px; font-size: 15px; }
.site-footer a { color: var(--on-ink-2); }
.site-footer a:hover { color: var(--accent-light); }
.site-footer .footer-name { display: inline-flex; align-items: center; }
.site-footer .footer-name img { display: block; height: 26px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--brand-tap); padding: 0 20px; border-radius: var(--brand-radius-button); border: 2px solid transparent;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 17px; }
.btn-xl { min-height: 56px; padding: 0 30px; font-size: 18px; font-weight: 600; }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-dark); color: var(--on-accent); }
.btn-dark { background: var(--ink); color: var(--on-ink); }
.btn-dark:hover { background: var(--ink-2); color: var(--on-ink); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--paper); color: var(--ink); }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--ink); font-size: 15px; font-weight: 600; padding: 0 18px; }
.btn-paper:hover { background: var(--ground-2); color: var(--ink); }
.btn-light { background: var(--on-ink); color: var(--ink); }
.btn-light:hover { background: var(--ground); color: var(--ink); }
.section-ink .btn-outline, .card-ink .btn-outline { color: var(--on-ink); border-color: var(--on-ink); }

.btn-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; background: none; border: none;
  font-family: inherit; font-size: 15px; color: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
.btn-link:hover { color: var(--accent-dark); }
.section-ink .btn-link:hover, .card-ink .btn-link:hover { color: var(--accent-light); }

/* ---------- Cards, pills and chips ---------- */

.card { background: var(--paper); border: var(--border); border-radius: var(--radius-lg); padding: 28px; }
.card-ink { background: var(--ink); color: var(--on-ink); border-radius: var(--radius-lg); padding: 28px; }
.card-outline { border: var(--border); border-radius: var(--radius-lg); padding: 28px; }

.pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-field); border-radius: 999px; background: transparent;
  font-family: inherit; font-size: 15px; font-weight: 500; color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.pill:hover { background: var(--paper); color: var(--ink); }

.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 12px; font-size: 14px; background: var(--ground); color: var(--ink); }
.chip-outline { background: transparent; border: 1px solid var(--line); }
.card-ink .chip-outline, .section-ink .chip-outline { border-color: var(--ink-border); color: var(--on-ink); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }

.tag-mono {
  flex: none; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-dark); border: 1px solid var(--accent-dark); border-radius: 999px; padding: 3px 9px;
}

.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .live-dot.is-pulsing { animation: hc-pulse 1.6s ease-in-out infinite; }
}
@keyframes hc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 14px; font-weight: 600; }
.input, .select, .textarea {
  min-height: 48px; padding: 0 14px; width: 100%;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-field); border-radius: var(--radius-sm);
  font-size: 16px;
}
.textarea { padding: 12px 14px; min-height: 160px; resize: vertical; line-height: 1.5; }
.select { padding: 0 12px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { box-shadow: var(--focus); border-radius: var(--radius-sm); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.field-hint { font-size: 13px; color: var(--muted); }
.field-error { font-size: 14px; color: var(--danger); font-weight: 600; }

/* Inputs on ink backgrounds */
.on-ink .input, .on-ink .select { background: var(--ink-2); color: var(--on-ink); border-color: var(--ink-border); }
.on-ink .field label, .on-ink .label { color: var(--on-ink-2); font-weight: 500; }
.on-ink .field-hint { color: var(--on-ink-muted); }

/* ---------- Notices ---------- */

.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px;
  border: var(--border); border-radius: var(--radius-sm); background: var(--paper); font-size: 15px;
}
.notice-error { border-color: var(--danger); }
.notice-error::before { content: ''; flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--danger); }

/* ---------- Dialog (hire and plan forms) ---------- */

dialog.hc-dialog {
  width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: var(--border);
  border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); overflow: auto;
}
dialog.hc-dialog::backdrop { background: rgba(15, 30, 54, .55); }

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 20px;
  background: var(--ink); color: var(--on-ink); border-radius: var(--radius); font-size: 15px;
}
.cookie-banner p { flex: 1 1 320px; color: var(--on-ink-2); }
.cookie-banner a { color: var(--on-ink); }
.cookie-banner .cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
