/* ============================================================
   BDS Global Styles
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600&display=swap');
@import 'tokens.css';

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
}

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

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

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

ul, ol { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--text-primary);
}

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

p {
  color: var(--text-secondary);
  line-height: var(--lh-body);
}

.text-muted {
  color: var(--text-muted);
  font-size: var(--fs-small);
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

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

.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  border-radius: var(--radius);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-border);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: var(--card-hover-lift);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-divider);
}

.btn-ghost:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

/* ---- Cards ---- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-divider);
  border-radius: var(--radius);
  padding: var(--space-3);
  transition: all var(--transition-base);
}

.card:hover {
  transform: var(--card-hover-lift);
  box-shadow: var(--shadow-card);
  border-color: var(--accent-border);
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  border-radius: var(--radius);
  background: var(--accent-subtle-bg);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.badge--production {
  background: rgba(34,197,94,0.08);
  color: var(--color-success);
  border-color: rgba(34,197,94,0.35);
}

.badge--beta {
  background: rgba(59,130,246,0.08);
  color: var(--color-info);
  border-color: rgba(59,130,246,0.35);
}

.badge--roadmap {
  background: rgba(156,163,175,0.08);
  color: var(--text-secondary);
  border-color: rgba(156,163,175,0.2);
}

/* ---- Mandatory-MFA grace period reminder ---- */
[data-mfa-grace-banner] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-1) var(--space-3);
  background: var(--accent-subtle-bg);
  border-bottom: 1px solid var(--accent-border);
  color: var(--text-primary);
  font-size: var(--fs-small);
  text-align: center;
}

[data-mfa-grace-banner] p {
  margin: 0;
}

[data-mfa-grace-banner] a {
  color: var(--accent);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: var(--border-divider);
  border: none;
}

/* ---- Trust Strip ---- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-4) 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}

.trust-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ---- Accessibility ---- */
.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;
}

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

/* ---- Skip Link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-2);
  background: var(--accent);
  color: #fff;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  z-index: 9999;
  font-weight: var(--fw-medium);
}

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

/* ---- Responsive ---- */
@media (max-width: 768px) {
  :root {
    --fs-h1: 2.25rem;
    --fs-h2: 1.75rem;
    --fs-h3: 1.375rem;
    --space-12: 4rem;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  :root {
    --fs-h1: 1.875rem;
    --fs-h2: 1.5rem;
  }
}
