/* Reel Cartography — base.css
   Reset, design tokens and global element defaults.
   Utility classes (.stack, .cluster, .card, .badge, etc.) live in utilities.css.
*/

:root {
  /* Colour tokens — exactly one accent colour (racing green) used across the whole site */
  --color-bg: #f6f1e3;
  --color-bg-alt: #eee5cf;
  --color-surface: #fffdf7;
  --color-ink: #1c211c;
  --color-ink-soft: #4a5148;
  --color-line: rgba(28, 33, 27, 0.14);
  --color-line-strong: rgba(28, 33, 27, 0.28);
  --color-accent: #1f4d3a;
  --color-accent-dark: #143529;
  --color-accent-soft: rgba(31, 77, 58, 0.09);
  --color-accent-soft-strong: rgba(31, 77, 58, 0.16);
  --color-on-accent: #f6f1e3;

  /* Type */
  --font-display: "Space Grotesk", "Arial Black", sans-serif;
  --font-body: "Space Grotesk", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;

  /* Spacing scale — 4/8 based */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Layout */
  --container-w: 1180px;
  --radius-0: 0px;
  --radius-1: 3px;
  --shadow-1: 0 1px 0 var(--color-line);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-1: 160ms;
  --dur-2: 320ms;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

img,
picture,
svg {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
  color: var(--color-ink);
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.3rem;
}

h4 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

p {
  margin: 0 0 var(--space-4);
  max-width: 68ch;
}

p.lead {
  font-size: 1.15rem;
  color: var(--color-ink-soft);
}

ul,
ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.2em;
}

li {
  margin-bottom: var(--space-2);
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition: color var(--dur-1) var(--ease);
}

a:hover {
  color: var(--color-accent-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2.5px solid var(--color-accent);
  outline-offset: 3px;
}

button {
  font-family: inherit;
}

small,
.small {
  font-size: 0.82rem;
  color: var(--color-ink-soft);
}

code,
.mono {
  font-family: var(--font-mono);
}

hr {
  border: none;
  border-top: 1px solid var(--color-line);
  margin: var(--space-6) 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

::selection {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-on-accent);
  padding: var(--space-2) var(--space-4);
  z-index: 200;
}

.skip-link:focus {
  left: var(--space-3);
  top: var(--space-3);
}

.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;
}
