/* America.co /flags — All Mission Flags directory & Why Join page */
.fd-page {
  background: #081022;
  color: #f4f1ea;
}

.fd-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;
}

.fd-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(8, 16, 34, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fd-header nav {
  align-items: center;
  flex-wrap: wrap;
}

.fd-header nav a {
  text-decoration: none;
  color: #c8d7ec;
  font-weight: 550;
  transition: color 0.15s ease;
}

.fd-header nav a:hover,
.fd-header nav a[aria-current="page"] {
  color: #ffffff;
}

.fd-header nav a.fd-nav-cta {
  padding: 9px 15px;
  border-radius: 6px;
  background: #e33140;
  color: #ffffff;
  font-weight: 650;
}

.fd-header nav a.fd-nav-cta:hover {
  filter: brightness(1.1);
}

/* Hero */
.fd-hero {
  padding: 64px 0 56px;
  background:
    radial-gradient(ellipse 68% 60% at 15% 15%, rgba(227, 49, 64, 0.14), transparent 62%),
    radial-gradient(ellipse 55% 65% at 85% 20%, rgba(45, 96, 168, 0.28), transparent 64%),
    linear-gradient(180deg, #0b162f 0%, #081022 100%);
  border-bottom: 1px solid rgba(145, 169, 204, 0.16);
}

.fd-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.fd-hero h1 {
  margin: 14px 0 20px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.fd-hero h1 em {
  font-style: italic;
  color: #f4d399;
}

.fd-lead {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.65;
  color: #ccd9ec;
  max-width: 58ch;
}

.fd-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.fd-edit-link {
  color: #b7cae6;
  margin-left: 4px;
}

.fd-edit-link:hover {
  color: #ffffff;
}

.fd-hero-panel {
  background: rgba(17, 32, 60, 0.72);
  border: 1px solid rgba(154, 180, 218, 0.24);
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 18px 46px rgba(3, 8, 20, 0.38);
}

.fd-panel-kicker {
  margin: 0 0 18px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #9bb5da;
}

.fd-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fd-stat {
  background: rgba(8, 16, 34, 0.6);
  border: 1px solid rgba(145, 169, 204, 0.16);
  border-radius: 10px;
  padding: 16px 16px 14px;
}

.fd-stat strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.fd-stat span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #a9bedd;
}

.fd-panel-note {
  margin: 16px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #93aacb;
}

.fd-panel-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Sections */
.fd-section {
  padding: 72px 0;
}

.fd-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.fd-section-head h2,
.fd-why-head h2 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.12;
  color: #ffffff;
}

.fd-sub {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: #b8c9e2;
  max-width: 64ch;
}

/* Toolbar */
.fd-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px;
  border-radius: 12px;
  background: rgba(18, 34, 64, 0.72);
  border: 1px solid rgba(145, 169, 204, 0.2);
  margin-bottom: 16px;
}

.fd-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fd-filter {
  appearance: none;
  border: 1px solid rgba(154, 180, 218, 0.28);
  background: rgba(8, 16, 34, 0.55);
  color: #d0def1;
  padding: 9px 15px;
  border-radius: 999px;
  font: 600 13px/1.2 Inter, Arial, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fd-filter:hover {
  border-color: rgba(203, 221, 245, 0.55);
  color: #ffffff;
}

.fd-filter.is-active {
  background: #e33140;
  border-color: #e33140;
  color: #ffffff;
}

.fd-search-wrap {
  flex: 1 1 260px;
  max-width: 380px;
}

.fd-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(154, 180, 218, 0.32);
  border-radius: 9px;
  background: rgba(8, 16, 34, 0.85);
  color: #ffffff;
  padding: 10px 14px;
  font: 400 14px/1.4 Inter, Arial, sans-serif;
}

.fd-search::placeholder {
  color: #8da4c5;
}

.fd-search:focus {
  outline: 2px solid #75aaf0;
  outline-offset: 2px;
}

.fd-results-note {
  margin: 0 0 22px;
  font-size: 12.5px;
  color: #9cb3d4;
}

/* Flag Card Grid */
.fd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.fd-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #101e39;
  border: 1px solid rgba(145, 169, 204, 0.22);
  border-top: 3px solid var(--card-accent, #214676);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.fd-card:hover {
  transform: translateY(-3px);
  border-color: rgba(186, 208, 238, 0.48);
  box-shadow: 0 16px 34px rgba(3, 8, 20, 0.42);
}

.fd-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.fd-card-art {
  display: block;
  width: 96px;
  flex-shrink: 0;
}

.fd-card-art svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.3));
}

.fd-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 0;
}

.fd-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fd-badge--evolution {
  background: rgba(56, 132, 230, 0.18);
  color: #a9d0ff;
  border: 1px solid rgba(114, 169, 240, 0.35);
}

.fd-badge--veterans {
  background: rgba(212, 164, 71, 0.18);
  color: #f4d694;
  border: 1px solid rgba(212, 164, 71, 0.38);
}

.fd-badge--custom {
  background: rgba(42, 179, 134, 0.16);
  color: #9cebd0;
  border: 1px solid rgba(56, 217, 150, 0.32);
}

.fd-parent-tag {
  font-size: 11px;
  color: #9cb3d4;
  text-align: right;
  line-height: 1.35;
}

.fd-card-body {
  flex: 1 1 auto;
}

.fd-card-body h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.fd-card-body h3 a {
  text-decoration: none;
  color: inherit;
}

.fd-card-body h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.fd-author {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: #a9bedd;
}

.fd-author strong {
  color: #eef3fa;
  font-weight: 650;
}

.fd-mission {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: #cad7ea;
  overflow-wrap: anywhere;
}

.fd-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(145, 169, 204, 0.16);
}

.fd-meta {
  font-size: 11.5px;
  color: #8ea6c7;
}

.fd-card-link {
  font-size: 12.5px;
  font-weight: 650;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.fd-card-link:hover {
  color: #f4d399;
}

/* Open Slot Invite Card */
.fd-card--invite {
  text-decoration: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(16, 30, 57, 0.4);
  border: 1.5px dashed rgba(154, 180, 218, 0.42);
  border-top-width: 1.5px;
  gap: 10px;
  padding: 28px 22px;
}

.fd-card--invite:hover {
  background: rgba(24, 44, 80, 0.62);
  border-color: #e33140;
}

.fd-invite-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #f4d399;
}

.fd-card--invite h3 {
  margin: 0;
  font-size: 21px;
  color: #ffffff;
}

.fd-card--invite p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #bdd0e9;
  max-width: 30ch;
}

.fd-invite-cta {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 6px;
  background: #e33140;
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
}

.fd-empty {
  margin: 24px 0 0;
  padding: 24px;
  border-radius: 10px;
  background: rgba(16, 30, 57, 0.7);
  border: 1px solid rgba(145, 169, 204, 0.22);
  font-size: 14px;
  color: #cdd9ec;
}

.fd-empty a {
  color: #f4d399;
  text-decoration: underline;
}

/* Why Join Section */
.fd-why {
  background: linear-gradient(180deg, #0d1a34 0%, #091327 100%);
  border-block: 1px solid rgba(145, 169, 204, 0.16);
}

.fd-why-head {
  margin-bottom: 36px;
}

.fd-pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.fd-pillar {
  background: rgba(11, 22, 46, 0.85);
  border: 1px solid rgba(145, 169, 204, 0.2);
  border-radius: 12px;
  padding: 24px;
}

.fd-pillar-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #f25e69;
  margin-bottom: 10px;
}

.fd-pillar h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: #ffffff;
}

.fd-pillar p {
  margin: 0;
  font-size: 14px;
  line-height: 1.68;
  color: #bfd0e7;
}

.fd-pillar code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: #f7f3ea;
}

.fd-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.fd-step {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(145, 169, 204, 0.18);
  border-radius: 10px;
  padding: 20px;
}

.fd-step span {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f4d399;
  margin-bottom: 6px;
}

.fd-step strong {
  display: block;
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 8px;
}

.fd-step p {
  margin: 0;
  font-size: 13px;
  line-height: 1.62;
  color: #b7c8e1;
}

.fd-step a {
  color: #e8eef8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Official Quests Wrap */
.fd-quests-wrap {
  padding: 20px 0 64px;
}

.fd-vet-callout {
  margin-top: 28px;
  padding: 26px 28px;
  border-radius: 12px;
  background: #101e39;
  border: 1px solid rgba(212, 164, 71, 0.34);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.fd-vet-callout h3 {
  margin: 4px 0 6px;
  font-size: 22px;
  color: #ffffff;
}

.fd-vet-callout p {
  margin: 0;
  font-size: 14px;
  color: #bfd0e7;
  max-width: 56ch;
}

.fd-vet-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Closing CTA */
.fd-cta-band {
  padding: 64px 0;
  background:
    radial-gradient(ellipse 60% 80% at 90% 50%, rgba(227, 49, 64, 0.18), transparent 65%),
    #0d1933;
  border-top: 1px solid rgba(145, 169, 204, 0.18);
}

.fd-cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.fd-cta-inner h2 {
  margin: 6px 0 10px;
  font-size: clamp(26px, 3vw, 38px);
  color: #ffffff;
}

.fd-cta-inner p {
  margin: 0;
  font-size: 15px;
  color: #bfd0e7;
  max-width: 54ch;
}

.fd-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 1020px) {
  .fd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fd-hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 720px) {
  .fd-hero {
    padding: 40px 0 38px;
  }
  .fd-section {
    padding: 48px 0;
  }
  .fd-grid,
  .fd-pillars,
  .fd-steps {
    grid-template-columns: 1fr;
  }
  .fd-search-wrap {
    max-width: none;
  }
  .fd-search {
    font-size: 16px;
  }
  .fd-header nav {
    gap: 12px;
  }
  .fd-header nav a.fd-nav-cta {
    padding: 7px 11px;
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fd-card {
    transition: none !important;
  }
}
