/* ============================================================
   BASE — resets, typography, layout primitives.
   No hard-coded colours or fonts here — everything references
   the tokens in variables.css.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  background-image: radial-gradient(ellipse at 50% 0%, var(--color-bg-alt) 0%, transparent 55%);
  background-repeat: no-repeat;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- Typography ---- */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400; /* Anton only ships one weight */
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0;
  text-transform: none;
}

h1 { font-size: clamp(2.4rem, 4.4vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
h3 { font-size: 1.4rem; font-family: var(--font-body); font-weight: 700; letter-spacing: normal; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; letter-spacing: normal; }

p {
  max-width: 65ch;
  color: var(--color-text-muted);
}

.text-accent { color: var(--color-primary); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

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

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-section) 0;
}

/* In-page jump links (e.g. "Instant Quote" -> #quote-tool) land right
   under the sticky header instead of tucked behind it. */
[id] {
  scroll-margin-top: var(--header-height);
}

.section--alt {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.flex {
  display: flex;
  align-items: center;
}

.flex--between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex--wrap { flex-wrap: wrap; }
.flex--gap-sm { gap: var(--space-xs); }
.flex--gap-md { gap: var(--space-sm); }

.text-center { text-align: center; }

.mx-auto { margin-left: auto; margin-right: auto; }

/* A centred <p> inside a text-align:center wrapper needs its own
   margin: auto, otherwise the 65ch max-width above shrinks its box
   and it renders flush-left even though the wrapper says centre. */
.text-center p {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Scroll reveal (see js/animations.js) ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
