/* Reset, page frame, and the primitives every section reuses. */

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

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

body {
  margin: 0;
  background: var(--surface-alt);
  color: var(--ink-500);
  font-family: 'Be Vietnam Pro', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
}

h2 {
  font-size: var(--fs-h2);
}

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

p {
  margin: 0;
}

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

a {
  color: var(--brand-700);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

img {
  height: auto;
}

/* The sticky header must not cover the section a #anchor just scrolled to. */
[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

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

/* Keyboard-only escape hatch past the sticky nav. */
.skip-link {
  position: absolute;
  z-index: 50;
  top: var(--space-2);
  left: var(--space-2);
  padding: var(--space-3) var(--space-5);
  transform: translateY(-200%);
  border-radius: var(--radius-btn);
  background: var(--brand-600);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.skip-link:focus-visible {
  transform: none;
  text-decoration: none;
}

/* ---------------------------------------------------------------- layout */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: 88px;
}

.section--alt {
  background: var(--surface);
}

.section--tint {
  background: var(--surface-tint);
}

.section--dark {
  background: var(--navy-900);
  color: var(--on-dark-muted);
}

.section--dark h2,
.section--dark h3 {
  color: var(--on-dark);
}

/* ---------------------------------------------------------------- headings */

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  color: var(--brand-700);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* The design's section header: a left-aligned h2 with an optional "see all" link on the far right. */
.section-head {
  margin-bottom: var(--space-12);
}

.section-head__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}

.section-head--center {
  max-width: 940px;
  margin-inline: auto;
  text-align: center;
}

.section-head--center p {
  margin-inline: auto;
}

.section-head p {
  max-width: 62ch;
  margin-top: var(--space-3);
  color: var(--ink-500);
  font-size: var(--fs-lead);
}

.section--dark .section-head p {
  color: var(--on-dark-muted);
}

.section-lead {
  max-width: 58ch;
  margin-top: var(--space-4);
  color: var(--ink-500);
  font-size: var(--fs-lead);
}

.stack-cta {
  margin-top: var(--space-8);
}

.link-more {
  flex: 0 0 auto;
  color: var(--brand-700);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.link-more::after {
  content: ' →';
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn:hover {
  text-decoration: none;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 6px 16px rgba(10, 127, 78, 0.22);
}

.btn--primary:hover {
  background: var(--brand-800);
}

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

.btn--ghost:hover {
  border-color: var(--brand-600);
  color: var(--brand-700);
}

.btn--light {
  background: var(--surface);
  color: var(--ink-900);
}

.btn--light:hover {
  color: var(--brand-700);
}

.btn--accent {
  background: var(--accent-btn);
  color: #fff;
  box-shadow: 0 6px 16px rgba(184, 81, 8, 0.26);
}

.btn--accent:hover {
  background: #9e4507;
}

.btn--soft {
  background: var(--brand-50);
  color: var(--brand-700);
}

.btn--soft:hover {
  background: var(--brand-100);
}

/* Play button that sits next to the hero's primary CTA in the design. */
.btn--play {
  padding-left: var(--space-2);
  border-color: rgba(11, 36, 71, 0.12);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink-900);
  backdrop-filter: blur(4px);
}

.btn--play:hover {
  background: var(--surface);
}

.btn__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
}

.btn__play .icon {
  width: 14px;
  height: 14px;
  margin-left: 1px;
}

/* ---------------------------------------------------------------- surfaces */

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.card h3 {
  margin-bottom: var(--space-2);
}

.card p {
  color: var(--ink-500);
  font-size: var(--fs-sm);
}

.card--link {
  color: inherit;
}

.card--link:hover {
  transform: translateY(-2px);
  border-color: var(--brand-400);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

/* Icon in a tinted circle — the design's card and stats affordance. */
/* A circle in the design, holding a solid Material glyph. */
.icon-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-700);
}

.icon-badge .icon {
  width: 22px;
  height: 22px;
}

.icon-badge--blue {
  background: var(--blue-50);
  color: var(--blue-700);
}

.icon-badge--orange {
  background: var(--accent-50);
  color: var(--accent-700);
}

.icon-badge--violet {
  background: var(--violet-50);
  color: var(--violet-700);
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.card__chevron {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  color: #a9b6c8;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.card--link:hover .card__chevron {
  transform: translateX(3px);
  color: var(--brand-600);
}

/* Material Icons are solid glyphs — fill only, no stroke. */
.icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: none;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------------------------------------------------------------- motion */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
