/* Base reset + typography. Uses tokens.css. */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: var(--type-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

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

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: "Fraunces", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 32, "SOFT" 0;
  color: var(--ink);
  margin: 0;
}

h1 {
  font-size: var(--type-h1);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 600;
}

h2 {
  font-size: var(--type-h2);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 600;
}

h3 {
  font-size: var(--type-h3);
  line-height: 1.3;
  font-weight: 500;
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -1000px;
  top: -1000px;
  background: var(--ink);
  color: var(--surface);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
}

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

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

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container--narrow {
  max-width: 720px;
}

.container--wide {
  max-width: 1200px;
}

@media (min-width: 480px) {
  .container {
    padding-inline: var(--space-5);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--space-6);
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--input-height-md);
  padding: 0 var(--space-5);
  font-family: "Inter", sans-serif;
  font-size: var(--type-ui);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background-color var(--motion-fast) var(--easing),
    border-color var(--motion-fast) var(--easing),
    box-shadow var(--motion-fast) var(--easing),
    color var(--motion-fast) var(--easing);
  white-space: nowrap;
}

.btn--primary {
  background: var(--brand-red);
  color: var(--surface);
}

.btn--primary:hover {
  background: var(--brand-red-dark);
  box-shadow: var(--shadow-xs);
}

.btn--primary:active {
  background: var(--brand-red-dark);
  box-shadow: none;
}

.btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn--secondary:hover {
  background: var(--surface-alt);
  border-color: var(--line-strong);
}

.btn--on-red {
  background: var(--surface);
  color: var(--brand-red-dark);
}

.btn--on-red:hover {
  background: var(--surface-alt);
}

.btn--on-red-secondary {
  background: transparent;
  color: var(--surface);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--on-red-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--tertiary {
  min-height: auto;
  padding: 0;
  color: var(--brand-red);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  background: none;
  border: 0;
  border-radius: 2px;
}

.btn--tertiary:hover {
  text-decoration-color: var(--brand-red);
}

.btn--small {
  min-height: 36px;
  padding: 0 var(--space-4);
  font-size: var(--type-small);
}

/* Utility: data placeholder marker */
[data-placeholder="true"] {
  border-bottom: 1px dashed var(--brand-red);
  padding-bottom: 1px;
}

.card--placeholder {
  outline: 1px dashed var(--brand-red);
  outline-offset: 2px;
}

/* Eyebrow label */
.eyebrow {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: var(--type-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-red);
  margin-bottom: var(--space-3);
}

.eyebrow--muted {
  color: var(--ink-muted);
}

/* Reveal animation — applied via IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--motion-med) var(--easing),
    transform var(--motion-med) var(--easing);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
