/*
  Load order (from templates, once the build exists):
  1. base.css      — tokens, reset, element defaults
  2. layout.css    — containers, sections, grid
  3. components.css — header, nav, footer, button, hero, content, CTA

  Rebrand a client by changing the :root custom properties below.
  Do not fork these files for colour/spacing tweaks.
*/

:root {
  --font-family: "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  --font-heading: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.75rem;
  --font-size-2xl: clamp(2rem, 4vw, 3.15rem);
  --line-height-tight: 1.2;
  --line-height-body: 1.65;

  --content-width: 72rem;
  --content-width-narrow: 42rem;
  --gutter: 1.5rem;

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5rem;

  --radius-sm: 0.35rem;
  --radius-md: 0.75rem;

  --color-bg: #ffffff;
  --color-bg-subtle: #f4f6f8;
  --color-text: #1a2b3c;
  --color-text-muted: #5b6b7c;
  --color-border: #e2e8ee;
  --color-link: #1a2b3c;
  --color-link-hover: #103464;
  --color-accent: #1a2b3c;
  --color-accent-contrast: #ffffff;
  --color-focus: #103464;
  --color-header-bg: #ffffff;
  --color-header-text: #1a2b3c;
  --color-sky: #74bce8;
  --color-nav-current: #eef1f4;
  --shadow-card: 0 8px 24px rgba(26, 43, 60, 0.06);

  --transition-fast: 150ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-bg);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  line-height: var(--line-height-tight);
  font-weight: 700;
}

h1 {
  font-size: var(--font-size-2xl);
}

h2 {
  font-size: var(--font-size-xl);
}

h3 {
  font-size: var(--font-size-lg);
}

p {
  margin: 0 0 var(--space-sm);
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

ul,
ol {
  margin: 0 0 var(--space-sm);
  padding-left: var(--space-md);
}

li {
  margin-bottom: var(--space-2xs);
}

blockquote {
  margin: 0 0 var(--space-sm);
  padding-left: var(--space-sm);
  border-left: 4px solid var(--color-border);
  color: var(--color-text-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--space-md);
}

caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

th,
td {
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

th {
  background-color: var(--color-bg-subtle);
  font-weight: 700;
}

label {
  display: block;
  margin-bottom: var(--space-2xs);
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  max-width: 32rem;
  padding: var(--space-xs) var(--space-sm);
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

button {
  cursor: pointer;
}

fieldset {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

legend {
  padding: 0 var(--space-2xs);
  font-weight: 700;
}

hr {
  margin: var(--space-lg) 0;
  border: 0;
  border-top: 1px solid var(--color-border);
}

code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.9em;
}

pre {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm);
  overflow-x: auto;
  background-color: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

pre code {
  font-size: var(--font-size-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 55.99rem) {
  :root {
    --font-size-2xl: clamp(1.65rem, 8vw, 2.35rem);
    --space-xl: 4.25rem;
    --space-2xl: 5.5rem;
  }
}

@media (min-width: 56rem) {
  :root {
    --gutter: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
