/* guide.css — Field Manual knowledge base.
   Layers on top of styles.css; reuses the same tokens (--bg, --teal, --radius…). */

.kb-body {
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(69, 215, 218, 0.10), transparent 60%),
    radial-gradient(900px 600px at 8% 4%, rgba(240, 174, 79, 0.08), transparent 62%),
    var(--bg);
}

/* ---- Hero ---------------------------------------------------------------- */

.kb-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(128px, 15vw, 210px) clamp(20px, 4vw, 56px) clamp(48px, 6vw, 80px);
  overflow: hidden;
}

.kb-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.kb-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.kb-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 9, 13, 0.55) 0%, rgba(5, 9, 13, 0.72) 46%, var(--bg) 100%),
    linear-gradient(90deg, rgba(5, 9, 13, 0.82) 0%, rgba(5, 9, 13, 0.25) 62%, transparent 100%);
}

.kb-hero-copy {
  max-width: 760px;
}

.kb-hero h1 {
  margin: 12px 0 0;
  font-size: clamp(3rem, 7vw, 5.6rem);
  line-height: 0.92;
}

.kb-hero-line {
  margin: 18px 0 30px;
  max-width: 40ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  line-height: 1.5;
}

/* ---- Search + chips ------------------------------------------------------ */

.kb-search-wrap {
  position: relative;
  max-width: 560px;
}

.kb-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  border: 2px solid var(--dim);
  border-radius: 50%;
  pointer-events: none;
}

.kb-search-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  background: var(--dim);
  transform: rotate(45deg);
  border-radius: 2px;
}

.kb-search {
  width: 100%;
  min-height: 54px;
  padding: 0 18px 0 42px;
  border: 1px solid rgba(244, 247, 242, 0.18);
  border-radius: var(--radius);
  background: rgba(10, 17, 22, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ink);
  font-family: inherit;
  font-size: 1.02rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.kb-search::placeholder {
  color: var(--dim);
}

.kb-search:focus {
  border-color: rgba(69, 215, 218, 0.7);
  box-shadow: 0 0 0 4px rgba(69, 215, 218, 0.12);
}

.kb-search::-webkit-search-cancel-button {
  filter: grayscale(1) opacity(0.6);
  cursor: pointer;
}

.kb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.kb-chip {
  padding: 8px 14px;
  border: 1px solid rgba(244, 247, 242, 0.16);
  border-radius: 999px;
  background: rgba(244, 247, 242, 0.04);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.16s ease;
}

.kb-chip:hover {
  color: var(--ink);
  border-color: rgba(69, 215, 218, 0.5);
}

.kb-chip.is-active {
  color: #05121a;
  background: linear-gradient(135deg, var(--teal), var(--green));
  border-color: transparent;
}

/* ---- Catalog ------------------------------------------------------------- */

.kb-catalog {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: clamp(40px, 5vw, 64px);
}

.kb-empty {
  margin: 0 0 40px;
  color: var(--muted);
  font-size: 1.02rem;
}

.kb-section {
  margin-bottom: clamp(48px, 6vw, 78px);
  scroll-margin-top: 96px;
}

.kb-section-head {
  position: relative;
  padding-left: 18px;
  margin-bottom: 26px;
}

.kb-section-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 4px;
  background: var(--accent, var(--teal));
}

.kb-section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.02;
}

.kb-section-head p {
  margin-top: 8px;
  color: var(--dim);
  font-size: 0.96rem;
}

.accent-teal { --accent: var(--teal); }
.accent-green { --accent: var(--green); }
.accent-blue { --accent: #6ba7ff; }
.accent-aurora { --accent: #7ef0b6; }
.accent-ember { --accent: var(--ember); }
.accent-gold { --accent: var(--gold); }

.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.kb-card {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 24px;
  border: 1px solid rgba(244, 247, 242, 0.09);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 26, 32, 0.72), rgba(10, 17, 22, 0.62));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.kb-card:hover {
  transform: translateY(-3px);
  border-color: rgba(69, 215, 218, 0.4);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
}

.kb-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.kb-card h3 {
  font-size: 1.12rem;
  line-height: 1.2;
  text-transform: none;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

.kb-pro {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(240, 174, 79, 0.22), rgba(255, 98, 70, 0.18));
  border: 1px solid rgba(240, 174, 79, 0.4);
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kb-benefit {
  margin-top: 10px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
}

.kb-where {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.kb-pin {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 2px solid var(--teal);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.kb-how {
  margin-top: 12px;
  padding-top: 13px;
  border-top: 1px solid rgba(244, 247, 242, 0.08);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ---- Closing CTA --------------------------------------------------------- */

.kb-cta {
  position: relative;
  isolation: isolate;
  margin-top: clamp(20px, 3vw, 36px);
  padding: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 60px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.kb-cta-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.kb-cta-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.kb-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 300px at 80% 0%, rgba(69, 215, 218, 0.14), transparent 65%),
    linear-gradient(90deg, rgba(5, 9, 13, 0.9) 0%, rgba(5, 9, 13, 0.55) 70%, rgba(5, 9, 13, 0.3) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.kb-cta-inner {
  max-width: 640px;
}

.kb-cta h2 {
  margin-top: 8px;
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.kb-cta p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.kb-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.nav-links a[aria-current="page"] {
  color: var(--teal);
}

@media (max-width: 640px) {
  .kb-grid {
    grid-template-columns: 1fr;
  }
  .kb-hero {
    padding-top: 118px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kb-card {
    transition: none;
  }
  .kb-card:hover {
    transform: none;
  }
}
