/* ============================================================
   FSME Logic — Universal Stylesheet
   Last updated: March 2026
   ============================================================ */

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

/* VARIABLES — --dim bumped to #8a9bb8 for WCAG AA compliance */
:root {
  --bg:     #0e1118;
  --bg2:    #141822;
  --card:   #181f2e;
  --steel:  #1c2438;
  --border: #242e42;
  --bord2:  #2e3a52;
  --blue:   #3d8ef0;
  --blue2:  #2d6fd0;
  --cyan:   #5bb8d4;
  --gold:   #c9a84c;
  --green:  #3db87a;
  --red:    #e05252;
  --text:   #c5d2e8;
  --muted:  #8a9bb8;
  --dim:    #8a9bb8;
  --head:   'Barlow Condensed', sans-serif;
  --mono:   'IBM Plex Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* GRID BACKGROUND */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(61,142,240,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61,142,240,0.018) 1px, transparent 1px);
  background-size: 52px 52px;
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 4px);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  background: rgba(8,10,16,0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(61,142,240,0.12);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 2rem;
}
.nav-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.nav-logo img { height: 42px; width: 42px; object-fit: contain; border-radius: 4px; }
.nav-logo-text { font-family: var(--mono); font-weight: 700; font-size: 1rem; color: var(--blue); letter-spacing: 0.1em; }

.nav-links { display: flex; list-style: none; align-items: center; gap: 0.25rem; }
.nav-links a {
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
  text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.45rem 0.9rem; transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); background: rgba(61,142,240,0.08); }
.nav-links .nav-cta a {
  color: var(--blue); border: 1px solid rgba(61,142,240,0.5); padding: 0.45rem 1rem;
}
.nav-links .nav-cta a:hover { background: var(--blue); color: #fff; }

/* HAMBURGER */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 0.5rem; background: none; border: none;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--muted); transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE MENU */
.mobile-menu {
  display: none; flex-direction: column;
  background: rgba(8,10,16,0.98);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem 1.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--mono); font-size: 0.85rem; color: var(--muted);
  text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.85rem 0; border-bottom: 1px solid var(--border); transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--blue); }
/* First link = Request Audit (highlighted blue, no border at bottom) */
.mobile-menu a:first-child {
  color: var(--blue); font-weight: 700; border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
section, .wrap { position: relative; z-index: 1; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 5rem 2rem; }

.section-label {
  font-family: var(--mono); font-size: 0.78rem; color: var(--blue);
  letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.section-label::before { content: '//'; color: var(--dim); }

.section-title {
  font-family: var(--head); font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; color: #dde6f5; line-height: 1.05; margin-bottom: 1.25rem;
}
.section-title em { font-style: normal; color: var(--blue); }

.section-sub {
  font-family: var(--mono); font-size: 0.95rem; color: var(--muted);
  max-width: 640px; line-height: 1.9; margin-bottom: 3rem;
}

.bg-alt {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 1rem 2rem; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.6rem;
  transition: all 0.2s;
}
.btn-primary { background: var(--blue); color: #fff; border: 2px solid var(--blue); }
.btn-primary:hover {
  background: var(--blue2); border-color: var(--blue2);
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(61,142,240,0.3);
}
.btn-secondary { background: transparent; color: var(--text); border: 2px solid var(--bord2); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }

/* ============================================================
   FOOTER
   ============================================================ */
footer { background: #080a10; border-top: 1px solid var(--border); padding: 2.5rem 2rem; position: relative; z-index: 1; }
.foot-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 1.25rem;
}
.foot-left { font-family: var(--mono); font-size: 0.77rem; color: var(--dim); line-height: 1.8; }
.foot-left a { color: var(--blue); text-decoration: none; }
.foot-right { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.foot-right a {
  font-family: var(--mono); font-size: 0.73rem; color: var(--dim);
  text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.2s;
}
.foot-right a:hover { color: var(--blue); }
.foot-social { display: flex; align-items: center; gap: 1rem; }
.foot-social a { color: var(--dim); transition: color 0.2s; display: flex; align-items: center; }
.foot-social a:hover { color: var(--blue); }

/* ============================================================
   TABLE WCAG FIX
   ============================================================ */
.tbl-wrap { overflow-x: auto; margin-top: 2rem; }
table { width: 100%; border-collapse: collapse; }
th {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 1rem 1.25rem; text-align: left;
  border-bottom: 2px solid var(--border);
}
th:first-child { color: var(--dim); }
th:nth-child(2) { color: var(--muted); }
th:last-child { color: var(--blue); background: rgba(61,142,240,0.06); }
td {
  font-family: var(--mono); font-size: 0.84rem; color: var(--muted);
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle;
}
td:first-child { color: var(--text); font-weight: 500; }
td:last-child { background: rgba(61,142,240,0.04); color: var(--text); }
tr:last-child td { border-bottom: none; }
.tag-bad {
  display: inline-block; font-size: 0.78rem; padding: 0.2rem 0.55rem;
  background: rgba(180,60,60,0.14); color: #e08080; border: 1px solid rgba(180,60,60,0.28);
}
.tag-good {
  display: inline-block; font-size: 0.78rem; padding: 0.2rem 0.55rem;
  background: rgba(61,142,240,0.12); color: var(--blue); border: 1px solid rgba(61,142,240,0.3);
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
#cookie-banner {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(12,16,26,0.97);
  border-top: 1px solid var(--border);
  padding: 1.1rem 2rem;
  align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
}
#cookie-banner p {
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted);
  max-width: 700px; line-height: 1.7; flex: 1;
}
#cookie-banner a { color: var(--blue); text-decoration: none; }
#cookie-banner button {
  background: var(--blue); color: #fff;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.65rem 1.5rem; border: none; cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
#cookie-banner button:hover { background: var(--blue2); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .wrap { padding: 3.5rem 1.25rem; }
  footer { padding: 2rem 1.25rem; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
  #cookie-banner { padding: 1rem 1.25rem; }
}

/* ============================================================
   DESKTOP "MORE" DROPDOWN
   ============================================================ */
.nav-more { position: relative; }
.nav-more-btn {
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
  background: none; border: none; cursor: pointer;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.45rem 0.9rem; transition: color 0.2s;
}
.nav-more-btn:hover, .nav-more-btn[aria-expanded="true"] { color: var(--blue); }
.nav-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: rgba(8,10,16,0.98); border: 1px solid var(--border);
  border-top: 2px solid var(--blue);
  list-style: none; min-width: 200px; z-index: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.nav-more:hover .nav-dropdown,
.nav-more-btn[aria-expanded="true"] + .nav-dropdown { display: block; }
.nav-dropdown li a {
  display: block; font-family: var(--mono); font-size: 0.75rem;
  color: var(--muted); text-decoration: none; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border); transition: color 0.2s, background 0.2s;
}
.nav-dropdown li:last-child a { border-bottom: none; }
.nav-dropdown li a:hover { color: var(--blue); background: rgba(61,142,240,0.08); }
