/* ============================================
   P77 Game – Official Website Styles
   Optimized for Core Web Vitals (LCP, CLS, INP)
   ============================================ */

:root {
  --brand-primary: #6C5CE7;
  --brand-secondary: #FF7675;
  --brand-dark: #2D3436;
  --brand-light: #F9F9FB;
  --brand-accent: #00CEC9;
  --text: #374151;
  --text-muted: #6B7280;
  --white: #ffffff;
  --border: #E5E7EB;
  --shadow: 0 10px 40px -10px rgba(108, 92, 231, 0.15);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2.5rem;
  --font: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 80rem;
  --header-h: 5rem;
}

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

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

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

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

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

ul, ol { list-style: none; }

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

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding-left: 2rem; padding-right: 2rem; }
}

.gradient-text {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  /* Reserve height to prevent CLS */
  min-height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--brand-dark);
  flex-shrink: 0;
  z-index: 102;
}

.logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-link .brand-accent {
  color: var(--brand-primary);
}

/* Desktop nav */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
}

.nav-desktop a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--brand-primary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 102;
}

.btn-download {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 20px -4px rgba(108, 92, 231, 0.35);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-download:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-download .material-icons-outlined {
  font-size: 1.125rem;
}

@media (min-width: 640px) {
  .btn-download { display: inline-flex; }
}

/* Hamburger button */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  gap: 5px;
  z-index: 102;
  transition: background 0.2s ease;
}

.nav-toggle:hover {
  background: var(--brand-light);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--brand-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
}

/* Mobile menu panel */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 101;
  background: var(--white);
  padding: calc(var(--header-h) + 1.5rem) 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-mobile.is-open {
  transform: translateX(0);
  visibility: visible;
}

.nav-mobile a {
  display: block;
  padding: 1rem 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brand-dark);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--brand-primary);
  background: var(--brand-light);
}

.nav-mobile .btn-download-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-bottom: none;
}

@media (min-width: 900px) {
  .nav-mobile { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0;
  background: radial-gradient(circle at top right, rgba(108, 92, 231, 0.06), transparent 60%);
  /* content-visibility for CWV on long pages */
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

@media (min-width: 1024px) {
  .hero { padding: 5.5rem 0; }
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
    gap: 3rem;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background: #EEF2FF;
  border: 1px solid rgba(99, 102, 241, 0.2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.badge-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: #10B981;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .badge-dot {
    animation: pulse 2s infinite;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: clamp(1.875rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--brand-dark);
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  background: var(--brand-dark);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 24px -8px rgba(45, 52, 54, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
  min-height: 3.25rem;
}

.btn-primary:hover {
  background: #1a1f21;
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  background: var(--white);
  color: var(--text);
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, color 0.2s ease;
  min-height: 3.25rem;
}

.btn-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.hero-stats strong {
  display: block;
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 700;
  color: var(--brand-dark);
  line-height: 1.2;
}

.hero-stats span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .hero-stats span { font-size: 0.875rem; }
}

/* Phone mockup – fixed aspect ratio prevents CLS */
.phone-wrap {
  display: flex;
  justify-content: center;
}

.phone-glow {
  position: relative;
  width: min(18rem, 85vw);
}

@media (min-width: 640px) {
  .phone-glow { width: 20rem; }
}

.phone-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, rgba(108, 92, 231, 0.12), rgba(255, 118, 117, 0.2));
  border-radius: 50%;
  filter: blur(48px);
  z-index: 0;
  will-change: auto;
}

.phone-frame {
  position: relative;
  z-index: 1;
  background: var(--brand-dark);
  padding: 0.75rem;
  border-radius: 3rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 4px solid #F3F4F6;
  aspect-ratio: 9 / 18;
  width: 100%;
}

.phone-screen {
  height: 100%;
  width: 100%;
  border-radius: 2.5rem;
  overflow: hidden;
  background: linear-gradient(to bottom, #312E81, #581C87, #1E1B4B);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  color: var(--white);
}

.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  opacity: 0.8;
}

.phone-top .material-icons-outlined {
  color: #FBBF24;
  font-size: 1.125rem;
}

.phone-body {
  text-align: center;
  margin: auto 0;
}

.phone-body img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 1rem;
}

.phone-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.phone-body > p {
  font-size: 0.75rem;
  color: #A5B4FC;
  margin-bottom: 1rem;
}

.prize-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.prize-box .label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #D1D5DB;
}

.prize-box .amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: #FDE047;
}

.phone-cta {
  width: 100%;
  background: #10B981;
  padding: 0.625rem;
  border-radius: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Sections ---------- */
.section {
  padding: 3.5rem 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

@media (min-width: 768px) {
  .section { padding: 4rem 0; }
}

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

.section-narrow {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: clamp(1.625rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 1rem;
}

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

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 40rem;
}

.section-subtitle.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
}

.prose p {
  margin-bottom: 1.25rem;
  color: var(--text);
  line-height: 1.7;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ---------- Trust badges ---------- */
.trust-bar {
  padding: 1.75rem 0;
  background: var(--brand-light);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  text-align: center;
}

@media (min-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.trust-item .material-icons-outlined {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.trust-item .icon-primary { color: var(--brand-primary); }
.trust-item .icon-secondary { color: var(--brand-secondary); }
.trust-item .icon-accent { color: var(--brand-accent); }
.trust-item .icon-yellow { color: #EAB308; }

.trust-item span:last-child {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  text-align: left;
  line-height: 1.3;
}

/* ---------- Games table ---------- */
.table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.games-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 640px;
}

.games-table thead {
  background: var(--brand-light);
  border-bottom: 1px solid var(--border);
}

.games-table th {
  padding: 1.125rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.games-table th:last-child {
  text-align: right;
}

.games-table tbody tr {
  border-bottom: 1px solid #F9FAFB;
  transition: background 0.15s ease;
}

.games-table tbody tr:hover {
  background: rgba(249, 249, 251, 0.9);
}

.games-table tbody tr:last-child {
  border-bottom: none;
}

.games-table td {
  padding: 1.125rem 1.25rem;
  vertical-align: middle;
}

.game-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.game-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.game-icon.purple { background: #F3E8FF; color: var(--brand-primary); }
.game-icon.rose { background: #FFE4E6; color: var(--brand-secondary); }
.game-icon.emerald { background: #D1FAE5; color: #059669; }
.game-icon.amber { background: #FEF3C7; color: #D97706; }

.game-name {
  font-weight: 600;
  color: #111827;
}

.game-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rtp {
  font-weight: 600;
  color: #059669;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: #EEF2FF;
  color: var(--brand-primary);
  font-size: 0.75rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  min-height: 2.25rem;
}

.btn-play:hover {
  background: var(--brand-primary);
  color: var(--white);
}

.btn-play .material-icons-outlined {
  font-size: 0.875rem;
}

td.action {
  text-align: right;
}

/* ---------- Feature cards ---------- */
.cards-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.feature-card {
  background: var(--white);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon.purple { background: #F5F3FF; color: var(--brand-primary); }
.feature-icon.rose { background: #FFF1F2; color: var(--brand-secondary); }
.feature-icon.emerald { background: #ECFDF5; color: var(--brand-accent); }

.feature-icon .material-icons-outlined {
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- How to play steps ---------- */
.steps-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  position: relative;
}

.step-num {
  font-size: 3.5rem;
  font-weight: 800;
  color: #EEF2FF;
  position: absolute;
  top: -1.75rem;
  left: -0.25rem;
  z-index: 0;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.step-content {
  position: relative;
  z-index: 1;
}

.step-content h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

.step-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  max-width: 48rem;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  color: var(--brand-dark);
  cursor: pointer;
  list-style: none;
  user-select: none;
  min-height: 3.5rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .material-icons-outlined {
  color: var(--brand-primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] summary .material-icons-outlined {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border-radius: var(--radius-xl);
  padding: 2rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

@media (min-width: 640px) {
  .cta-banner { padding: 2.75rem; }
}

@media (min-width: 1024px) {
  .cta-banner { padding: 3.5rem; }
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at bottom left, rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.cta-content h2 {
  font-size: clamp(1.625rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 0.875rem;
}

.cta-content p {
  color: #E0E7FF;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .cta-content p { font-size: 1.0625rem; }
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  background: var(--white);
  color: var(--brand-dark);
  font-weight: 700;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease;
  min-height: 3.25rem;
}

.btn-white:hover {
  background: #F3F4F6;
}

.cta-qr {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #E0E7FF;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cta-qr .material-icons-outlined {
  font-size: 1.875rem;
}

/* ---------- Explore more links ---------- */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .explore-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.explore-grid a {
  display: block;
  padding: 0.875rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand-dark);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.explore-grid a:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: #F5F3FF;
}

/* ---------- Internal links page ---------- */
.links-page .section {
  content-visibility: visible;
}

.links-group {
  margin-bottom: 2.5rem;
}

.links-group h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brand-primary);
  display: inline-block;
}

.links-group ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .links-group ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .links-group ul {
    grid-template-columns: repeat(3, 1fr);
  }
}

.links-group a {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--brand-light);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand-dark);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.links-group a:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: #F5F3FF;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #111827;
  color: #9CA3AF;
  padding: 3rem 0;
  border-top: 1px solid #1F2937;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-col h5 {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.75rem;
  line-height: 1.6;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul a {
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.footer-col ul a:hover {
  color: var(--white);
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.footer-contact .material-icons-outlined {
  font-size: 0.875rem;
}

.compliance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.compliance-tags span {
  font-size: 0.625rem;
  background: #1F2937;
  color: #D1D5DB;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.footer-bottom {
  border-top: 1px solid #1F2937;
  padding-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom p {
  font-size: 0.75rem;
}

.footer-legal {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
}

.footer-legal a:hover {
  color: var(--white);
}

.disclaimer {
  font-size: 0.625rem;
  color: #4B5563;
  margin-top: 1.5rem;
  line-height: 1.6;
  border-top: 1px solid rgba(31, 41, 55, 0.5);
  padding-top: 1rem;
}

/* ---------- Accessibility & CWV ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Material icons font display */
.material-icons-outlined {
  font-display: swap;
  font-size: 1.25rem;
  line-height: 1;
  vertical-align: middle;
}