/* Vantum Resource Hub. Tokens aligned with docs/VANTUM-WEB-DESIGN-SYSTEM.md */

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --app-bg: #f7f8fa;
  --surface-1: #ffffff;
  --surface-3: #f1f5f9;
  --charcoal: #1a1e29;
  --text-primary: #0f172a;
  --text-soft: #334155;
  --text-muted: #475569;
  --text-on-dark: #a3a6b4;
  --border: rgba(15, 23, 42, 0.08);
  --emerald: #059669;
  --emerald-hover: #047857;
  --emerald-light: #d1fae5;
  --emerald-text: #065f46;
  --cyan: #0891b2;
  --cyan-light: #e0f7fa;
  --cyan-text: #155e6e;
  --ochre: #c97b00;
  --ochre-light: #fff4e0;
  --ochre-text: #7a4d00;
  --violet-light: #ede9fe;
  --violet-text: #5b21b6;
  --nav-bg: rgba(247, 248, 250, 0.92);
  --shadow-card: 0 1px 0 rgba(15, 23, 42, 0.04), 0 8px 32px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 12px 40px rgba(15, 23, 42, 0.1);
  --container: 1180px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --app-bg: #030a17;
  --surface-1: #0f1729;
  --surface-3: #1a2234;
  --text-primary: #e8edf2;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --text-on-dark: #a3a6b4;
  --border: rgba(255, 255, 255, 0.1);
  --emerald-light: rgba(5, 150, 105, 0.22);
  --emerald-text: #6ee7b7;
  --cyan-light: rgba(8, 145, 178, 0.2);
  --cyan-text: #67e8f9;
  --ochre-light: rgba(201, 123, 0, 0.18);
  --ochre-text: #fcd34d;
  --violet-light: rgba(167, 139, 250, 0.18);
  --violet-text: #c4b5fd;
  --nav-bg: rgba(3, 10, 23, 0.92);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background: var(--app-bg);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn-primary {
  background: var(--emerald);
  color: #fff;
}

.btn-primary:hover {
  background: var(--emerald-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--emerald);
  color: var(--emerald);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

/* Nav */
.hub-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.hub-nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo img {
  display: block;
  height: 28px;
  width: auto;
}

.logo .logo-wordmark-dark {
  display: none;
}

:root[data-theme="dark"] .logo .logo-wordmark-light {
  display: none;
}

:root[data-theme="dark"] .logo .logo-wordmark-dark {
  display: block;
}

.hub-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hub-nav-links a:not(.btn) {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.hub-nav-links a:not(.btn):hover {
  color: var(--emerald);
}

@media (max-width: 640px) {
  .hub-nav-links a:not(.btn) {
    display: none;
  }
}

/* Hero */
.hub-hero {
  padding: 72px 0 48px;
  background: linear-gradient(180deg, var(--surface-3) 0%, var(--app-bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hub-hero h1 {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 720px;
  margin-bottom: 20px;
}

.hub-hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
  font-weight: 400;
}

@media (max-width: 768px) {
  .hub-hero {
    padding: 48px 0 36px;
  }

  .hub-hero h1 {
    font-size: 32px;
  }

  .hub-hero-sub {
    font-size: 16px;
  }
}

/* Toolbar + filters */
.hub-main {
  padding: 48px 0 96px;
}

.hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}

.hub-toolbar-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hub-pill {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.hub-pill:hover {
  border-color: var(--emerald);
  color: var(--emerald);
}

.hub-pill.is-active {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #fff;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.28);
}

:root[data-theme="dark"] .hub-pill.is-active {
  color: #030a17;
}

/* Grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 960px) {
  .hub-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

.resource-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.resource-card[hidden] {
  display: none;
}

@media (hover: hover) {
  .resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(5, 150, 105, 0.35);
  }
}

:root[data-theme="dark"] .resource-card {
  background: linear-gradient(180deg, rgba(15, 23, 41, 0.95), rgba(10, 16, 32, 0.9));
}

.resource-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.resource-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.badge-tool {
  background: var(--emerald-light);
  color: var(--emerald-text);
}

.badge-guide {
  background: var(--cyan-light);
  color: var(--cyan-text);
}

.badge-internal {
  background: var(--violet-light);
  color: var(--violet-text);
}

.resource-audience {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.resource-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.resource-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex: 1;
}

.resource-meta {
  list-style: none;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resource-meta li {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  padding-left: 18px;
  position: relative;
}

.resource-meta li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
}

.resource-cta {
  width: 100%;
  margin-top: auto;
}

.hub-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 15px;
}

.hub-empty-link {
  background: none;
  border: none;
  color: var(--emerald);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
}

/* Footer */
.hub-footer {
  background: var(--charcoal);
  padding: 48px 0 32px;
}

.hub-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hub-footer-copy,
.hub-footer-email {
  font-size: 13px;
  color: var(--text-on-dark);
  font-weight: 500;
}

.hub-footer-email {
  color: var(--emerald-text);
  text-decoration: none;
  font-weight: 600;
}

.hub-footer-email:hover {
  text-decoration: underline;
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 85;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
}

.theme-toggle:hover {
  border-color: var(--emerald);
  color: var(--emerald);
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

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

  .resource-card:hover {
    transform: none;
  }
}
