/* base.css: variables, reset, typography. Palette: navy / sand / brick red accent. */

:root {
  --brand: #1b2a49;        /* navy */
  --brand-dark: #111c33;   /* darker navy for the full-width band */
  --accent: #b8412e;       /* brick red */
  --accent-dark: #93321f;
  --sand: #e8dcc3;
  --sand-light: #f3ecdc;
  --neutral-100: #faf8f3;  /* page background */
  --neutral-200: #ebe6da;
  --neutral-600: #5d6373;
  --neutral-900: #1c1f26;
  --on-dark: #f6f1e6;

  --font-display: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;

  /* 5-step type scale, base 17px */
  --type-base: 17px;
  --type-small: 15px;
  --type-h3: 22px;
  --type-h2: 30px;
  --type-display: 56px;

  --radius-card: 8px;
  --radius-btn: 2px;
  --max-width: 1160px;
  --gutter: 20px;
}

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

html {
  font-size: var(--type-base);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--type-base);
  line-height: 1.55;
  color: var(--neutral-900);
  background: var(--neutral-100);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--brand);
  letter-spacing: 0.01em;
}

h1 {
  font-size: var(--type-display);
}

h2 {
  font-size: var(--type-h2);
  text-transform: uppercase;
}

h3 {
  font-size: var(--type-h3);
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

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

address {
  font-style: normal;
}

ul {
  padding-left: 1.2em;
}

small,
.small {
  font-size: var(--type-small);
}

/* Visible focus for keyboard users, on every interactive element */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Skip link: hidden until focused */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--brand);
  color: var(--on-dark);
  padding: 8px 14px;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

/* Hero fade-in on page load, the only motion on the site */
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero__inner {
  animation: hero-in 600ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .hero__inner {
    animation: none;
  }
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 840px) {
  :root {
    --type-display: 38px;
    --type-h2: 26px;
    --type-h3: 20px;
  }
}
