/* ==========================================================================
   Defense Directory — Design System
   Steel/graphite base, amber "signal" accent, reticle motif for ratings.
   ========================================================================== */

:root {
  /* Color */
  --bg: #F5F6F4;
  --surface: #FFFFFF;
  --ink: #12171A;
  --ink-soft: #4C555C;
  --ink-faint: #8B939A;
  --steel: #26323B;
  --steel-deep: #131A1F;
  --steel-line: rgba(255,255,255,0.12);
  --line: #E1E4E1;
  --signal: #FF7A1A;
  --signal-dark: #D45E0A;
  --signal-mist: #FFEEE0;
  --verified: #2F8F5B;
  --verified-mist: #E7F5EC;
  --alert: #C1442E;

  /* Type */
  --font-display: "Golos Text", "Manrope", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  /* Scale */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(18,23,26,0.05), 0 12px 26px -18px rgba(18,23,26,0.28);
  --container: 1220px;
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
p { line-height: 1.65; margin: 0; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px;
  border: 1.5px solid transparent; transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--signal); color: #1A1000; }
.btn-primary:hover { background: var(--signal-dark); transform: translateY(-1px); }
.btn-dark { background: var(--steel); color: #fff; }
.btn-dark:hover { background: var(--steel-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal-dark); }
.btn-ghost-light { background: transparent; color: #fff; border-color: var(--steel-line); }
.btn-ghost-light:hover { border-color: var(--signal); }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-block { width: 100%; }

/* Header -------------------------------------------------------------------- */
.site-header { background: var(--steel-deep); color: #fff; position: sticky; top: 0; z-index: 60; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: #fff; }
.brand .brand-mark { width: 34px; height: 34px; flex-shrink: 0; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav a { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 500; color: rgba(255,255,255,0.78); }
.main-nav a:hover, .main-nav .current-menu-item > a { color: #fff; background: rgba(255,255,255,0.08); }
.main-nav li.menu-item-has-children { position: relative; }
.main-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
  padding: 8px; margin-top: 8px;
}
.main-nav li.menu-item-has-children:hover .sub-menu,
.main-nav li.menu-item-has-children:focus-within .sub-menu { display: block; }
.main-nav .sub-menu a { color: var(--ink-soft); display: block; }
.main-nav .sub-menu a:hover { background: var(--bg); color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; border: none; background: none; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: #fff; }
.menu-toggle:hover { background: rgba(255,255,255,0.08); }
.menu-toggle svg { width: 22px; height: 22px; }

/* Breadcrumbs ---------------------------------------------------------------- */
.breadcrumbs { padding: 18px 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-faint); }
.breadcrumbs a { color: var(--ink-faint); }
.breadcrumbs a:hover { color: var(--signal-dark); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line); }

/* Hero (dark, console-style) --------------------------------------------------- */
.hero-console { background: var(--steel-deep); color: #fff; padding: 56px 0 40px; position: relative; overflow: hidden; }
.hero-console::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 82% 20%, rgba(255,122,26,0.14), transparent 55%);
  pointer-events: none;
}
.hero-console .container { position: relative; display: grid; grid-template-columns: 1.05fr 0.85fr; gap: 48px; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--signal); font-weight: 600; font-size: 14px; margin-bottom: 18px; }
.hero-console h1 { font-size: clamp(30px, 3.6vw, 46px); max-width: 16ch; margin-bottom: 16px; }
.hero-console .hero-lede { color: rgba(255,255,255,0.72); font-size: 17px; max-width: 48ch; margin-bottom: 28px; }

.filter-bar {
  background: rgba(255,255,255,0.05); border: 1px solid var(--steel-line); border-radius: var(--radius);
  padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.filter-bar select, .filter-bar input[type="text"] {
  background: var(--steel); border: 1px solid var(--steel-line); color: #fff;
  padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14.5px; font-family: inherit; flex: 1; min-width: 140px;
}
.filter-bar select:focus, .filter-bar input:focus { outline: none; border-color: var(--signal); }

.hero-stats { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-family: var(--font-display); font-size: 26px; color: #fff; }
.hero-stats .stat span { font-size: 13px; color: rgba(255,255,255,0.6); }

.reticle-art { position: relative; height: 340px; }
.reticle-art svg { width: 100%; height: 100%; }

/* Section rhythm -------------------------------------------------------------- */
section { padding: 68px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head .kicker { color: var(--signal-dark); font-weight: 600; font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.section-head h2 { font-size: clamp(24px, 2.8vw, 34px); margin-bottom: 12px; }
.section-head p { color: var(--ink-soft); font-size: 16.5px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.bg-surface { background: var(--surface); }
.bg-steel { background: var(--steel-deep); color: #fff; }
.bg-steel .section-head h2, .bg-steel .section-head p { color: #fff; }
.bg-steel .section-head p { color: rgba(255,255,255,0.68); }
.bg-steel .section-head .kicker { color: var(--signal); }

/* Category pills --------------------------------------------------------------- */
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-soft); background: var(--surface);
}
.pill:hover, .pill[aria-current="true"] { border-color: var(--signal); color: var(--signal-dark); background: var(--signal-mist); }

/* Company / ranking cards -------------------------------------------------------- */
.company-list { display: grid; gap: 16px; }
.company-card {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-card);
}
.company-card .rank { font-family: var(--font-display); font-size: 20px; color: var(--ink-faint); width: 28px; text-align: center; flex-shrink: 0; }

/* Reusable logo/avatar container — used on company cards, company/product
   profile heads, and product cards. Kept as a standalone class (not
   nested under .company-card) so every usage gets overflow containment
   and object-fit by default; callers only need to override width/height. */
.logo-slot {
  width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.logo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.company-card .logo-slot img { object-fit: contain; }

.company-card .info { min-width: 0; flex: 1 1 240px; }
.company-card .info h3 { font-size: 18px; margin-bottom: 4px; }
.company-card .info h3 a:hover { color: var(--signal-dark); }
.company-card .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge-tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: var(--signal-mist); color: var(--signal-dark);
}
.badge-tag.is-verified { background: var(--verified-mist); color: var(--verified); }
.company-card .meta-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-faint); margin-top: 6px; }

.reticle-score { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.reticle-score svg { width: 64px; height: 64px; }
.reticle-score .score-num { font-family: var(--font-display); font-size: 20px; fill: var(--ink); }
.reticle-score .score-label { font-size: 11.5px; color: var(--ink-faint); text-align: center; }

.company-list-empty {
  border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--ink-soft);
}

/* Stats / trust banner ------------------------------------------------------------- */
.stats-banner { background: var(--steel-deep); color: #fff; border-radius: var(--radius); padding: 40px; }
.stats-banner .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stats-banner .stat b { display: block; font-family: var(--font-display); font-size: 32px; color: var(--signal); }
.stats-banner .stat span { font-size: 13.5px; color: rgba(255,255,255,0.65); }

/* Comparison table ------------------------------------------------------------------ */
.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data-table th, table.data-table td { padding: 15px 18px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--line); }
table.data-table th { background: var(--bg); font-family: var(--font-display); font-weight: 600; font-size: 13.5px; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table td.is-yes { color: var(--verified); font-weight: 700; }
table.data-table td.is-no { color: var(--ink-faint); }
table.data-table tr.is-highlight td { background: var(--signal-mist); }

/* Grid / tiles ----------------------------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-card); }
.tile .tile-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); background: var(--signal-mist); color: var(--signal-dark); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.tile .tile-icon svg { width: 22px; height: 22px; }
.tile h3 { font-size: 18px; margin-bottom: 8px; }
.tile p { color: var(--ink-soft); font-size: 15px; }

/* Post cards (news / guides) ------------------------------------------------------------ */
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 10px; }
.post-card .post-kicker { font-size: 12.5px; font-weight: 700; color: var(--signal-dark); }
.post-card h3 { font-size: 17px; }
.post-card h3 a:hover { color: var(--signal-dark); }
.post-card .post-excerpt { font-size: 14.5px; color: var(--ink-soft); }
.post-card .post-date { font-size: 12.5px; color: var(--ink-faint); margin-top: auto; }

/* FAQ --------------------------------------------------------------------------------- */
.faq-list { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; background: none; border: none; font-weight: 600; font-size: 15.5px; text-align: left; color: var(--ink); }
.faq-question .faq-icon { width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px; background: var(--signal-mist); color: var(--signal-dark); display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease; }
.faq-item[data-open="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-answer p { padding: 0 20px 18px; color: var(--ink-soft); font-size: 14.5px; max-width: 68ch; }

/* CTA band ------------------------------------------------------------------------------ */
.cta-band { border-radius: var(--radius); background: var(--steel); color: #fff; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(21px, 2.4vw, 28px); margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.72); }

/* Company profile (single-company.php) --------------------------------------------------- */
.profile-head { display: grid; grid-template-columns: 100px 1fr auto; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-card); }
.profile-head .logo-slot { width: 100px; height: 100px; }
.profile-head h1 { font-size: 28px; margin-bottom: 8px; }
.profile-body { display: grid; grid-template-columns: 1fr 320px; gap: 32px; margin-top: 32px; align-items: start; }
.profile-side { display: grid; gap: 16px; position: sticky; top: 96px; }
.profile-side .tile dl { display: grid; gap: 10px; }
.profile-side .tile dt { font-size: 12.5px; color: var(--ink-faint); text-transform: none; }
.profile-side .tile dd { margin: 0; font-size: 14.5px; font-weight: 600; }
.profile-content { min-width: 0; }

/* Rich-text typography for anything rendered via the_content() — profile
   descriptions, pages, posts. Needed because the global reset earlier in
   this file intentionally zeroes list-style/margins for UI components
   (cards, nav, footer columns) — editor content needs its own rules
   restored on top of that reset, or paragraphs/lists render with no
   spacing or bullets at all. */
.entry-content, .profile-content {
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.75;
}
.entry-content > *:first-child, .profile-content > *:first-child { margin-top: 0; }
.entry-content p, .profile-content p { margin: 0 0 18px; color: var(--ink-soft); }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4,
.profile-content h1, .profile-content h2, .profile-content h3, .profile-content h4 {
  color: var(--ink); margin: 32px 0 14px;
}
.entry-content h2, .profile-content h2 { font-size: 22px; }
.entry-content h3, .profile-content h3 { font-size: 19px; }
.entry-content h4, .profile-content h4 { font-size: 16.5px; }
.entry-content ul, .entry-content ol, .profile-content ul, .profile-content ol {
  list-style: revert; margin: 0 0 18px; padding-left: 22px;
}
.entry-content li, .profile-content li { margin-bottom: 8px; }
.entry-content a, .profile-content a { color: var(--signal-dark); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover, .profile-content a:hover { color: var(--signal); }
.entry-content strong, .entry-content b, .profile-content strong, .profile-content b { color: var(--ink); font-weight: 700; }
.entry-content blockquote, .profile-content blockquote {
  margin: 0 0 18px; padding: 4px 20px; border-left: 3px solid var(--signal);
  color: var(--ink); font-style: italic;
}
.entry-content img, .profile-content img { border-radius: var(--radius-sm); margin: 8px 0 18px; }
.entry-content hr, .profile-content hr { border: none; border-top: 1px solid var(--line); margin: 28px 0; }
.entry-content table, .profile-content table { width: 100%; border-collapse: collapse; margin: 0 0 18px; }
.entry-content table th, .entry-content table td,
.profile-content table th, .profile-content table td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; font-size: 14.5px; }
.entry-content table th, .profile-content table th { background: var(--bg); font-family: var(--font-display); }
.entry-content code, .profile-content code {
  background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; font-size: 0.92em;
}

.profile-content h2 { margin-top: 28px; }
.profile-content h2:first-child { margin-top: 0; }

/* Footer ---------------------------------------------------------------------------------- */
.site-footer { background: var(--steel-deep); color: rgba(255,255,255,0.68); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid var(--steel-line); }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 19px; margin-bottom: 14px; }
.footer-brand .brand-mark { width: 30px; height: 30px; }
.footer-col h4 { color: #fff; font-size: 13.5px; margin-bottom: 14px; font-family: var(--font-body); font-weight: 600; }
.footer-col ul { display: grid; gap: 9px; }
.footer-col a { font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-desc { font-size: 13.5px; max-width: 32ch; margin-bottom: 16px; color: rgba(255,255,255,0.55); }
.footer-legal-block { padding-top: 24px; font-size: 12px; line-height: 1.7; color: rgba(255,255,255,0.4); max-width: 100ch; }
.footer-bottom { padding-top: 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: rgba(255,255,255,0.45); }
.lang-switch { display: flex; gap: 6px; }
.lang-switch a { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--steel-line); font-size: 12.5px; font-weight: 600; }
.lang-switch a.is-active { background: var(--signal); color: #1A1000; border-color: var(--signal); }

/* Cookie notice ------------------------------------------------------------------------------ */
.cookie-notice {
  position: fixed; left: 20px; right: 20px; bottom: 20px; max-width: 520px; z-index: 80;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 20px; display: none; gap: 14px; flex-direction: column;
}
.cookie-notice.is-visible { display: flex; }
.cookie-notice p { font-size: 13.5px; color: var(--ink-soft); }
.cookie-notice .cookie-actions { display: flex; gap: 10px; }

/* Mobile ---------------------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero-console .container { grid-template-columns: 1fr; }
  .reticle-art { height: 220px; order: -1; }
  .stats-banner .grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .profile-body { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-actions .btn-ghost-light { display: none; }
  section { padding: 48px 0; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .company-card { flex-direction: column; align-items: flex-start; text-align: left; }
  .company-card .info { flex-basis: auto; width: 100%; }
  .company-card .reticle-score { flex-direction: row; justify-content: flex-start; }
  .cta-band, .stats-banner, .profile-head { padding: 24px; }
  .profile-head { grid-template-columns: 72px 1fr; }
  .profile-head .logo-slot { width: 72px; height: 72px; }
  .footer-grid { grid-template-columns: 1fr; }

  .mobile-nav { position: fixed; inset: 72px 0 0 0; background: var(--steel-deep); z-index: 55; padding: 22px; overflow-y: auto; display: none; }
  .mobile-nav.open { display: block; }
  .mobile-nav a { display: flex; align-items: center; padding: 15px 4px; font-size: 17px; font-weight: 600; color: #fff; border-bottom: 1px solid var(--steel-line); }
  .mobile-nav .mobile-cta { margin-top: 20px; display: grid; gap: 12px; }
}
@media (min-width: 721px) { .mobile-nav { display: none !important; } }
