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

:root {
  --gold:   #FCD116;
  --green:  #00A550;
  --red:    #CE1126;
  --dark:   #080C14;
  --dark-2: #0D1120;
  --dark-3: #111827;
  --dark-4: #1A2235;
  --border: rgba(255,255,255,0.07);
  --text:   #E8EAED;
  --muted:  #8B95A7;
  --good:   #22C55E;
  --warn:   #F59E0B;
  --bad:    #EF4444;
  --font:   'Inter', sans-serif;
  --mono:   'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ─── SCROLLBAR ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark-2); }
::-webkit-scrollbar-thumb { background: var(--dark-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ─── CONTAINER ─────────────────────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── NAV ───────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  background: rgba(8, 12, 20, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}
.nav.scrolled { padding: 12px 0; background: rgba(8,12,20,0.9); }
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; }
.logo-icon { font-size: 1.4rem; }
.logo-accent { color: var(--gold); }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-link { font-size: 0.875rem; color: var(--muted); font-weight: 500; transition: color var(--transition); }
.nav-link:hover { color: var(--text); }
.nav-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.75rem; color: var(--muted);
  background: var(--dark-4); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

/* ─── HERO ──────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0 80px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-glow {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.hero-glow-1 { width: 600px; height: 600px; top: -200px; left: -100px; background: rgba(252,209,22,0.08); }
.hero-glow-2 { width: 400px; height: 400px; bottom: -100px; right: 10%; background: rgba(0,165,80,0.07); }
.hero-glow-3 { width: 300px; height: 300px; top: 30%; right: 20%; background: rgba(206,17,38,0.05); }

.hero .container { position: relative; z-index: 1; max-width: 860px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold);
  background: rgba(252,209,22,0.08); border: 1px solid rgba(252,209,22,0.2);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 28px;
}
.eyebrow-flag { font-size: 1rem; }

.hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900; line-height: 1.1; letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.title-highlight {
  background: linear-gradient(135deg, var(--gold) 0%, #FF8C00 50%, var(--red) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem; color: var(--muted); max-width: 620px;
  line-height: 1.7; margin-bottom: 48px;
}
.hero-subtitle strong { color: var(--text); }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px; margin-bottom: 48px;
  background: var(--border); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
}
.hero-stat {
  background: var(--dark-3); padding: 24px 20px; text-align: center;
  transition: background var(--transition);
}
.hero-stat:hover { background: var(--dark-4); }
.stat-value {
  font-size: 2.2rem; font-weight: 800; color: var(--gold);
  font-family: var(--mono); line-height: 1;
}
.stat-label { font-size: 0.75rem; color: var(--muted); margin-top: 6px; font-weight: 500; }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* ─── BUTTONS ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: all var(--transition); border: none; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), #FF8C00);
  color: #000;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(252,209,22,0.3); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.2); background: var(--dark-3); }

/* Scroll hint */
.hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 0.72rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: scrollAnim 2s infinite;
}
@keyframes scrollAnim { 0%,100% { opacity:0; transform: scaleY(0.5); } 50% { opacity:1; transform: scaleY(1); } }

/* ─── SUMMARY CARDS ─────────────────────────────────────────────── */
.summary-section { padding: 48px 0; }
.summary-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.summary-card {
  background: var(--dark-3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  display: flex; gap: 16px; align-items: flex-start;
  transition: transform var(--transition), border-color var(--transition);
}
.summary-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.15); }
.summary-card--best  { border-top: 3px solid var(--good); }
.summary-card--worst { border-top: 3px solid var(--red); }
.summary-card--issue { border-top: 3px solid var(--warn); }
.summary-card--sector{ border-top: 3px solid var(--gold); }
.summary-card-icon { font-size: 1.8rem; line-height: 1; }
.summary-card-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.summary-card-value { font-size: 1.05rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.summary-card-sub { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* ─── SECTION HEADERS ───────────────────────────────────────────── */
.section-eyebrow {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 16px;
}
.section-desc { font-size: 1rem; color: var(--muted); max-width: 600px; line-height: 1.7; }
.section-header { margin-bottom: 40px; }
.section-header--left { text-align: left; }

/* ─── RESULTS TABLE ─────────────────────────────────────────────── */
.results-section { padding: 80px 0; background: var(--dark-2); }

.filter-tabs {
  display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap;
}
.filter-tab {
  padding: 8px 20px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: 0.85rem;
  font-weight: 500; cursor: pointer; font-family: var(--font);
  transition: all var(--transition); display: flex; align-items: center; gap: 6px;
}
.filter-tab:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
.filter-tab.active {
  background: var(--gold); border-color: var(--gold);
  color: #000; font-weight: 600;
}
.tab-emoji { font-size: 0.9em; }

.table-wrapper {
  overflow-x: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--dark-3);
}
.results-table {
  width: 100%; border-collapse: collapse; font-size: 0.875rem;
}
.results-table th {
  padding: 14px 16px; text-align: left;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); border-bottom: 1px solid var(--border);
  white-space: nowrap; background: var(--dark-4);
}
.results-table th.sortable { cursor: pointer; }
.results-table th.sortable:hover { color: var(--text); }
.results-table th.active-sort { color: var(--gold); }
.sort-icon { opacity: 0.5; font-size: 0.8em; }
.th-rank { width: 48px; text-align: center; }
.th-score, .th-metric, .th-a11y { text-align: center; }

.results-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.results-table tbody tr { transition: background var(--transition); }
.results-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.results-table tbody tr:last-child td { border-bottom: none; }

.td-rank {
  text-align: center; font-family: var(--mono);
  font-size: 0.8rem; color: var(--muted); font-weight: 500;
}
.td-site { display: flex; flex-direction: column; gap: 2px; }
.site-name { font-weight: 600; color: var(--text); }
.site-url { font-size: 0.75rem; color: var(--muted); font-family: var(--mono); }

.category-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.badge-news       { background: rgba(59,130,246,0.15); color: #60A5FA; }
.badge-banking    { background: rgba(34,197,94,0.15);  color: #4ADE80; }
.badge-ecommerce  { background: rgba(168,85,247,0.15); color: #C084FC; }
.badge-government { background: rgba(249,115,22,0.15); color: #FB923C; }
.badge-fintech    { background: rgba(20,184,166,0.15); color: #2DD4BF; }
.badge-telecom    { background: rgba(99,102,241,0.15); color: #A5B4FC; }

/* Score ring */
.score-cell { text-align: center; }
.score-ring {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  font-family: var(--mono); font-weight: 700; font-size: 0.85rem;
  border: 3px solid;
}
.score-good   { border-color: var(--good);  color: var(--good);  background: rgba(34,197,94,0.08); }
.score-medium { border-color: var(--warn);  color: var(--warn);  background: rgba(245,158,11,0.08); }
.score-poor   { border-color: var(--bad);   color: var(--bad);   background: rgba(239,68,68,0.08); }

/* Metric cell */
.metric-cell { text-align: center; font-family: var(--mono); font-size: 0.85rem; }
.metric-value { font-weight: 600; }
.metric-good   { color: var(--good); }
.metric-warn   { color: var(--warn); }
.metric-bad    { color: var(--bad); }

/* Issues chips */
.issues-cell { display: flex; flex-wrap: wrap; gap: 4px; max-width: 160px; }
.issue-chip {
  font-size: 0.65rem; padding: 2px 7px; border-radius: 4px;
  font-weight: 600; white-space: nowrap;
  background: rgba(239,68,68,0.12); color: #F87171;
  border: 1px solid rgba(239,68,68,0.2);
}
.issue-chip-count {
  font-size: 0.65rem; padding: 2px 7px; border-radius: 4px;
  background: var(--dark-4); color: var(--muted);
  border: 1px solid var(--border);
}

.table-footnote {
  margin-top: 16px; font-size: 0.8rem; color: var(--muted); text-align: center;
}

/* ─── ANALYSIS / CHARTS ─────────────────────────────────────────── */
.analysis-section { padding: 80px 0; }

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.chart-card {
  background: var(--dark-3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: border-color var(--transition);
}
.chart-card:hover { border-color: rgba(255,255,255,0.12); }
.chart-card--wide { grid-column: 1 / -1; }
.chart-card-header { margin-bottom: 20px; }
.chart-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.chart-subtitle { font-size: 0.78rem; color: var(--muted); }
.chart-wrapper { position: relative; height: 280px; }
.chart-wrapper--tall { height: 360px; }

/* ─── RECOMMENDATIONS ───────────────────────────────────────────── */
.recs-section { padding: 80px 0; background: var(--dark-2); }

.recs-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.rec-card {
  background: var(--dark-3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  display: flex; gap: 20px;
  transition: transform var(--transition), border-color var(--transition);
  position: relative; overflow: hidden;
}
.rec-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.rec-card.priority-critical::before { background: var(--red); }
.rec-card.priority-high::before    { background: var(--warn); }
.rec-card.priority-medium::before  { background: var(--gold); }
.rec-card.priority-low::before     { background: var(--good); }
.rec-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.12); }

.rec-number {
  flex-shrink: 0; width: 40px; height: 40px;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; font-family: var(--mono);
  background: var(--dark-4);
}
.rec-body { flex: 1; }
.rec-priority {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 2px 8px; border-radius: 4px; margin-bottom: 8px;
}
.priority-critical .rec-priority { background: rgba(239,68,68,0.15); color: #F87171; }
.priority-high     .rec-priority { background: rgba(245,158,11,0.15); color: #FCD34D; }
.priority-medium   .rec-priority { background: rgba(252,209,22,0.15); color: var(--gold); }
.priority-low      .rec-priority { background: rgba(34,197,94,0.15);  color: var(--good); }

.rec-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.rec-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.rec-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.rec-meta-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.75rem; color: var(--muted);
}
.rec-meta-item strong { color: var(--text); }

/* ─── METHODOLOGY ───────────────────────────────────────────────── */
.methodology-section { padding: 80px 0; }
.methodology-inner {}
.methodology-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.method-card {
  background: var(--dark-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color var(--transition);
}
.method-card:hover { border-color: rgba(255,255,255,0.12); }
.method-icon { font-size: 1.8rem; margin-bottom: 12px; }
.method-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.method-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.method-card p strong { color: var(--text); }
.method-card p a { color: var(--warn); text-decoration: underline; text-underline-offset: 3px; }
.method-card p a:hover { color: var(--gold); }
.method-card--highlight {
  border-color: rgba(245,158,11,0.25);
  border-left: 3px solid var(--warn);
  background: linear-gradient(135deg, var(--dark-3) 80%, rgba(245,158,11,0.04));
}

/* ─── FOOTER ────────────────────────────────────────────────────── */
.footer {
  padding: 48px 0; border-top: 1px solid var(--border);
  background: var(--dark);
}
.footer-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 20px; text-align: center;
}
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-brand .logo-text { font-size: 1.2rem; font-weight: 800; }
.footer-tagline { font-size: 0.8rem; color: var(--muted); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.85rem; color: var(--muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 0.78rem; color: var(--muted); }

/* ─── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .methodology-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 2.4rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .summary-grid { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card--wide { grid-column: auto; }
  .recs-grid { grid-template-columns: 1fr; }
  .methodology-grid { grid-template-columns: 1fr; }
  .rec-card { flex-direction: column; gap: 12px; }
}
@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 1.6rem; }
}

/* ─── ANIMATIONS ────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.5s ease both; }

/* Row entrance animation */
.results-table tbody tr {
  animation: fadeInUp 0.3s ease both;
}
