/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  font: 400 15px/24px var(--font-body);
  color: var(--obsidian);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--primary-text-safe); text-decoration: none; }
a:hover { text-decoration: underline; }
ul[class], ol[class] { list-style: none; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--obsidian); }

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

::selection { background: rgba(46, 117, 187, 0.2); }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--primary-midnight);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* Layout container */
.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--margin);
}
@media (max-width: 1279px) { .container { padding-inline: 2rem; } }
@media (max-width: 767px) { .container { padding-inline: var(--margin-mobile); } }

/* Sections */
.section { padding-block: var(--space-xl); }
.section-title { margin-bottom: var(--space-lg); }
.section-intro { max-width: 720px; color: var(--on-surface-variant); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font: 600 15px/24px var(--font-body);
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
}
.btn:active { transform: scale(0.98); }
.btn svg { flex: none; }

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border: 1px solid var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 0 12px rgba(46, 117, 187, 0.35);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--obsidian);
  border: 1px solid rgba(13, 27, 42, 0.16);
}
.btn-ghost:hover {
  background: rgba(46, 117, 187, 0.04);
  border-color: var(--primary);
  text-decoration: none;
}

.btn-ghost-inverse {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.btn-ghost-inverse:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
  text-decoration: none;
}

/* Status chip */
.chip-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(46, 117, 187, 0.08);
  color: var(--primary-dark-ink);
  font: 600 12px/16px var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chip-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: chip-pulse 2s ease-in-out infinite;
}
@keyframes chip-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(46, 117, 187, 0.2); }
  50% { box-shadow: 0 0 0 2px rgba(46, 117, 187, 0.35); }
}

/* Bento cards */
.bento {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1023px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .bento { grid-template-columns: 1fr; gap: var(--gutter-mobile); } }

.bento-card {
  position: relative;
  background: var(--surface-container-lowest);
  border: 1px solid rgba(15, 37, 55, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-1);
  transition: box-shadow 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.bento-card:hover {
  box-shadow: var(--shadow-2);
  border-color: rgba(46, 117, 187, 0.2);
  transform: translateY(-2px);
}
.bento-card::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary-tint-200);
  box-shadow: 0 0 0 2px rgba(46, 117, 187, 0.15);
}
.bento-card h3 { font-size: 18px; line-height: 26px; font-weight: 700; margin-bottom: 8px; }
.bento-card p { color: var(--on-surface-variant); font-size: 14px; line-height: 22px; }
.bento-card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--primary-tint-50);
  color: var(--primary);
  margin-bottom: 12px;
}

/* Signal guide divider with traveling node */
.signal-guide {
  position: relative;
  height: 1px;
  background: rgba(46, 117, 187, 0.12);
  overflow: visible;
}
.signal-guide::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px 2px rgba(46, 117, 187, 0.5);
  animation: signal-travel 6s linear infinite;
}
@keyframes signal-travel {
  0% { left: 0; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { left: calc(100% - 5px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .signal-guide::before { animation: none; }
  .chip-status .dot { animation: none; }
}

/* Dark band sections */
.band-dark {
  background: var(--primary-midnight);
  color: var(--inverse-on-surface);
}
.band-dark h1, .band-dark h2, .band-dark h3 { color: #fff; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

/* Screen-reader only */
.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;
}
