/* AITools500 Market Intelligence Platform - Main CSS v1.0 */
/* Design tokens */
:root {
  --bg: #FFFFFF;
  --surface: #F8F9FC;
  --ink: #162447;
  --ink-muted: #4A5568;
  --ink-subtle: #8896A8;
  --accent: #0066FF;
  --accent-hover: #0052CC;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --green: #059669;
  --red: #DC2626;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 1160px;
  --nav-h: 64px;
  --radius-sm: 3px;
  --radius: 6px;
  --transition: 150ms ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body.at500-page {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.at500-page *, body.at500-page *::before, body.at500-page *::after {
  font-family: var(--font);
}
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Layout */
.at500-container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .at500-container { padding: 0 20px; } }

/* ---- NAV ---- */
.at500-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.at500-nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}
.at500-nav__logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.at500-nav__logo span { color: var(--accent); }
.at500-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.at500-nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.at500-nav__links a:hover { color: var(--ink); background: var(--surface); }
.at500-nav__links a.active { color: var(--ink); }
.at500-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.at500-nav__search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: text;
  transition: border-color var(--transition);
}
.at500-nav__search:hover { border-color: var(--border-strong); }
.at500-nav__search svg { color: var(--ink-subtle); flex-shrink: 0; }
.at500-nav__search span { font-size: 13px; color: var(--ink-subtle); white-space: nowrap; }
.at500-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition); white-space: nowrap; border: 1px solid transparent; text-decoration: none; }
.at500-btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.at500-btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.at500-btn--ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.at500-btn--ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.at500-btn--sm { height: 30px; padding: 0 12px; font-size: 13px; }

/* Hamburger (mobile) */
.at500-nav__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; margin-left: auto; }
.at500-nav__hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: all 0.2s; }
@media (max-width: 900px) {
  .at500-nav__links, .at500-nav__actions .at500-btn--ghost { display: none; }
  .at500-nav__hamburger { display: flex; }
  .at500-nav__inner { gap: 16px; }
}

/* ---- HERO ---- */
.at500-hero {
  padding: 80px 0 72px;
  border-bottom: 1px solid var(--border);
}
.at500-hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}
.at500-hero__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 20px;
}
.at500-hero__headline {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 640px;
  margin-bottom: 20px;
}
.at500-hero__sub {
  font-size: 18px;
  font-weight: 400;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 36px;
}
.at500-hero__ctas {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}
.at500-hero__search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  max-width: 480px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0 16px;
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 48px;
}
.at500-hero__search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,102,255,0.08); }
.at500-hero__search svg { color: var(--ink-subtle); flex-shrink: 0; }
.at500-hero__search input { flex: 1; border: none; outline: none; font-size: 15px; font-family: var(--font); color: var(--ink); background: transparent; }
.at500-hero__search input::placeholder { color: var(--ink-subtle); }
.at500-hero__metrics {
  display: flex;
  align-items: center;
  gap: 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.at500-hero__metric {
  padding-right: 32px;
  margin-right: 32px;
  border-right: 1px solid var(--border);
}
.at500-hero__metric:last-child { border-right: none; padding-right: 0; margin-right: 0; }
.at500-hero__metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.at500-hero__metric-label { font-size: 13px; color: var(--ink-subtle); line-height: 1.3; }

/* ---- SECTION STRUCTURE ---- */
.at500-section { padding: 72px 0; border-bottom: 1px solid var(--border); }
.at500-section:last-of-type { border-bottom: none; }
.at500-section__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 8px;
}
.at500-section__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 40px;
}
.at500-section__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
.at500-section__title-row .at500-section__title { margin-bottom: 0; }
.at500-view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.at500-view-all:hover { color: var(--accent-hover); }

/* ---- INDUSTRIES GRID ---- */
.at500-industries {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.at500-industry-card {
  background: var(--bg);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  transition: background var(--transition);
}
.at500-industry-card:hover { background: var(--surface); }
.at500-industry-card__number { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-subtle); }
.at500-industry-card__name { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.at500-industry-card__count { font-size: 13px; color: var(--ink-subtle); }
.at500-industry-card__arrow { font-size: 18px; color: var(--accent); margin-top: 8px; }
@media (max-width: 640px) { .at500-industries { grid-template-columns: 1fr; } }

/* ---- LEADERBOARD TABLE ---- */
.at500-leaderboards { display: flex; flex-direction: column; gap: 48px; }
.at500-leaderboard__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.at500-leaderboard__title { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.at500-leaderboard__month { font-size: 12px; color: var(--ink-subtle); }
.at500-table { width: 100%; border-collapse: collapse; }
.at500-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
}
.at500-table thead th:first-child { padding-left: 0; }
.at500-table thead th:last-child { padding-right: 0; text-align: right; }
.at500-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.at500-table tbody tr:last-child { border-bottom: none; }
.at500-table tbody tr:hover { background: var(--surface); }
.at500-table td { padding: 14px 16px; vertical-align: middle; }
.at500-table td:first-child { padding-left: 0; }
.at500-table td:last-child { padding-right: 0; text-align: right; }

.at500-rank { font-size: 14px; font-weight: 700; color: var(--ink); min-width: 24px; }
.at500-rank--1 { color: var(--ink); }
.at500-company {
  display: flex;
  align-items: center;
  gap: 12px;
}
.at500-company__logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  flex-shrink: 0;
  overflow: hidden;
  letter-spacing: 0;
}
.at500-company__name { font-size: 14px; font-weight: 600; color: var(--ink); }
.at500-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.at500-change { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.at500-change--up { color: var(--green); }
.at500-change--down { color: var(--red); }
.at500-change--flat { color: var(--ink-subtle); }
.at500-profile-link { font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.at500-profile-link:hover { color: var(--accent-hover); }

/* ---- MOVERS ---- */
.at500-movers { display: flex; flex-direction: column; gap: 0; }
.at500-mover {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.at500-mover:last-child { border-bottom: none; }
.at500-mover__logo { width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink-muted); flex-shrink: 0; }
.at500-mover__name { font-size: 14px; font-weight: 700; color: var(--ink); min-width: 120px; }
.at500-mover__change { font-size: 16px; font-weight: 700; min-width: 56px; }
.at500-mover__change--up { color: var(--green); }
.at500-mover__change--down { color: var(--red); }
.at500-mover__reason { font-size: 13px; color: var(--ink-muted); }

/* ---- MONTHLY WINNERS ---- */
.at500-winners-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.at500-winner-col { background: var(--bg); padding: 28px 28px 32px; }
.at500-winner-col__industry { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-subtle); margin-bottom: 20px; }
.at500-winner-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.at500-winner-row + .at500-winner-row { border-top: 1px solid var(--border); }
.at500-winner-medal { font-size: 18px; flex-shrink: 0; width: 24px; }
.at500-winner-logo { width: 28px; height: 28px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--ink-muted); flex-shrink: 0; }
.at500-winner-name { font-size: 14px; font-weight: 600; color: var(--ink); }
@media (max-width: 640px) { .at500-winners-grid { grid-template-columns: 1fr; } }

/* ---- INSIGHTS ---- */
.at500-insights-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 32px; }
.at500-insight { border-top: 2px solid var(--border); padding-top: 20px; }
.at500-insight__meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.at500-insight__category { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.at500-insight__date { font-size: 12px; color: var(--ink-subtle); }
.at500-insight__title { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 8px; }
.at500-insight__title a { color: var(--ink); }
.at500-insight__title a:hover { color: var(--accent); }
.at500-insight__read-time { font-size: 12px; color: var(--ink-subtle); }
@media (max-width: 640px) { .at500-insights-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---- GET LISTED ---- */
.at500-getlisted {
  padding: 72px 0;
  background: var(--ink);
}
.at500-getlisted__inner { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.at500-getlisted__title { font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 8px; }
.at500-getlisted__sub { font-size: 16px; color: rgba(255,255,255,0.6); max-width: 420px; }
.at500-getlisted .at500-btn--primary { background: var(--accent); border-color: var(--accent); flex-shrink: 0; padding: 0 28px; height: 44px; font-size: 15px; }
.at500-getlisted .at500-btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
@media (max-width: 720px) { .at500-getlisted__inner { flex-direction: column; align-items: flex-start; } }

/* ---- FOOTER ---- */
.at500-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.at500-footer__inner { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.at500-footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; margin-bottom: 40px; }
.at500-footer__brand .logo { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; margin-bottom: 8px; }
.at500-footer__brand .logo span { color: var(--accent); }
.at500-footer__brand p { font-size: 13px; color: var(--ink-subtle); max-width: 260px; line-height: 1.6; }
.at500-footer__nav { display: flex; gap: 48px; }
.at500-footer__nav-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-subtle); margin-bottom: 14px; }
.at500-footer__nav-col a { display: block; font-size: 14px; color: var(--ink-muted); margin-bottom: 10px; transition: color var(--transition); }
.at500-footer__nav-col a:hover { color: var(--ink); }
.at500-footer__bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.at500-footer__bottom p { font-size: 12px; color: var(--ink-subtle); }
.at500-footer__bottom a { font-size: 12px; color: var(--ink-subtle); }
.at500-footer__bottom a:hover { color: var(--ink-muted); }
@media (max-width: 720px) { .at500-footer__top { flex-direction: column; } .at500-footer__nav { flex-wrap: wrap; gap: 32px; } .at500-footer__bottom { flex-direction: column; text-align: center; } }

/* ---- ADMIN BAR OFFSET ---- */
.admin-bar .at500-nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .at500-nav { top: 46px; } }
