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

html {
  scroll-behavior: smooth;
}

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

/* <picture> wraps images only to offer WebP; it must not affect layout. */
picture {
  display: contents;
}

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

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

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

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: 0.98;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--color-ink);
  color: var(--color-bg);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 1000;
}

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

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

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-muted);
  font-weight: 600;
}

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

.section-dark {
  background: var(--color-dark);
  color: var(--color-bg);
}

.section-header {
  max-width: 640px;
  margin: 0 0 var(--space-12);
}

/* Muted grey is too dark on black sections (3.4:1): use light text instead (WCAG AA). */
.section-dark .eyebrow {
  color: rgba(247, 244, 236, 0.6);
}

.section-header .eyebrow {
  margin-bottom: var(--space-3);
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: var(--space-4);
}

.section-header p {
  color: var(--color-muted);
  font-size: 1.05rem;
}

.section-header-with-cta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  max-width: none;
}

.section-header-link {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  padding-bottom: var(--space-2);
  transition: color 0.2s var(--ease-premium);
}

.section-header-link:hover {
  color: var(--color-accent);
}

@media (max-width: 640px) {
  .section-header-with-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.section-dark .section-header p {
  color: rgba(247, 244, 236, 0.65);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease-premium), background 0.3s var(--ease-premium), color 0.3s var(--ease-premium);
}

.btn-primary {
  background: var(--color-ink);
  color: var(--color-bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  border-color: var(--color-ink);
  transform: translateY(-2px);
}

.btn-arrow {
  transition: transform 0.25s var(--ease-premium);
  display: inline-block;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* Availability dot */

.availability-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  display: inline-block;
  flex-shrink: 0;
}

/* Cards */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease-premium), box-shadow 0.3s var(--ease-premium);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.08);
}

/* Reveal-on-scroll (progressive enhancement; content is visible without JS) */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-premium), transform 0.7s var(--ease-premium);
}

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

/* ---- Credibility / stats metrics (shared across pages) ---- */

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.metric {
  padding: var(--space-10) var(--space-4);
  text-align: center;
  border-left: 1px solid var(--color-border);
}

.metric:first-child {
  border-left: none;
}

.metric-value {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

.metric-label {
  margin-top: var(--space-2);
  font-size: 13px;
  color: var(--color-muted);
}

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

@media (max-width: 600px) {
  .metrics-row {
    grid-template-columns: 1fr;
  }

  .metric {
    border-left: none;
    border-top: 1px solid var(--color-border);
  }

  .metric:first-child {
    border-top: none;
  }
}

/* ---- CTA (shared across pages) ---- */

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

.cta-section h2 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  max-width: 760px;
  margin: 0 auto var(--space-8);
}

/* ---- Newsletter (shared across pages) ---- */

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

.newsletter-form {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-8);
  flex-wrap: wrap;
}

.newsletter-form input {
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  min-width: 280px;
  font-size: 14px;
  font-family: inherit;
}

.newsletter-status {
  margin-top: var(--space-4);
  font-size: 13px;
  min-height: 1em;
}

.newsletter-status.is-error {
  color: #b3261e;
}

.newsletter-status.is-success {
  color: var(--color-success);
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card:hover,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }
}

@media (max-width: 720px) {
  .section {
    padding: var(--space-16) 0;
  }

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