/* ============================================================
   EQ5 Design System — Shared Stylesheet
   equals5.com brand tokens, typography, components, layout
   ============================================================ */

:root {
  --bg:           #0a1020;
  --surface:      #272f46;
  --surface-deep: #253b62;
  --blue:         #3571cb;
  --cyan:         #01b0b0;
  --cyan-alt:     #06acb3;
  --muted:        #8a95b1;
  --border:       rgba(255,255,255,.1);
  --white:        #fff;
  --off-white:    #f3f7ff;
  --gradient:     linear-gradient(93.8deg, #3571cb 0, #01b0b0 100%);
  --gradient-alt: linear-gradient(291.19deg, #3571cb 3.36%, #01b0b0 88.05%);
  --font:         'Alliance No.1', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

/* ─── BASE ─── */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── BACKGROUND BLOBS ─── */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.blob-1 {
  width: 600px; height: 600px;
  background: linear-gradient(180deg, #253b62 0, #492040 100%);
  top: -180px; left: -140px;
}
.blob-2 {
  width: 420px; height: 420px;
  background: linear-gradient(180deg, #253b62 0, #1a3560 100%);
  bottom: -100px; right: -80px;
}
.blob-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(53,113,203,0.18) 0%, transparent 70%);
  top: 40%; left: 60%;
}

/* ─── LAYOUT ─── */
.page-wrap {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 60px 120px;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4 {
  font-family: var(--font);
  letter-spacing: -0.02em;
  line-height: 1.0;
}
h1 { font-size: clamp(42px, 5vw, 68px); font-weight: 800; margin-bottom: 18px; }
h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; margin-bottom: 14px; }
h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; margin-bottom: 12px; }

.grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── EYEBROW ─── */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 30px; height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ─── PAGE HEADER ─── */
.page-header {
  margin-bottom: 72px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 48px;
}
.page-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
  max-width: 520px;
}

/* ─── SECTION DIVIDER ─── */
.section { margin-bottom: 64px; }
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  white-space: nowrap;
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(53,113,203,0.4) 0%, rgba(1,176,176,0.1) 100%);
}

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--cyan-alt);
  background: #2d3650;
  transform: translateY(-2px);
}

/* ─── RESOURCE CARDS ─── */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.resource-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.resource-card:hover {
  border-color: var(--cyan-alt);
  background: #2d3650;
  transform: translateY(-2px);
}
.resource-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(53,113,203,0.2), rgba(1,176,176,0.15));
  border: 1px solid rgba(1,176,176,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.resource-card-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
}
.resource-card-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}
.resource-card-link {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 4px;
}
.resource-card-link::after { content: ' →'; }

/* ─── ASSET CARDS ─── */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.asset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.asset-card:hover {
  border-color: rgba(1,176,176,0.4);
  transform: translateY(-2px);
}
.asset-preview {
  width: 100%;
  aspect-ratio: 1;
  background: #1a2238;
  display: block;
}
.asset-preview img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
.asset-info { padding: 14px 16px; border-top: 1px solid var(--border); }
.asset-name { font-size: 13px; font-weight: 700; color: var(--white); margin-bottom: 3px; letter-spacing: -0.01em; }
.asset-meta { font-size: 11px; color: var(--muted); }
.asset-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  background: rgba(1,176,176,0.1);
  border: 1px solid rgba(1,176,176,0.2);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ─── TERM CHIPS (Glossary) ─── */
.term-category { width: 100%; margin-bottom: 28px; }
.term-category-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.term-category-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.term-category-label.files { color: var(--cyan); }
.term-category-label.files::after { background: rgba(1,176,176,0.15); }

.term-grid { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }

.term-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
  cursor: pointer;
  user-select: none;
}
.term-chip:hover { background: #303a58; border-color: rgba(53,113,203,0.5); color: var(--white); }
.term-chip.active {
  background: linear-gradient(93.8deg, rgba(53,113,203,0.2) 0%, rgba(1,176,176,0.15) 100%);
  border-color: var(--cyan-alt);
  color: var(--white);
  border-radius: 8px 8px 0 0;
  border-bottom-color: transparent;
}
.term-chip.cyan-chip { background: rgba(1,176,176,0.07); border-color: rgba(1,176,176,0.2); color: var(--cyan); }
.term-chip.cyan-chip:hover { background: rgba(1,176,176,0.14); border-color: var(--cyan-alt); color: var(--white); }
.term-chip.cyan-chip.active { background: rgba(1,176,176,0.14); border-color: var(--cyan-alt); color: var(--white); border-radius: 8px 8px 0 0; border-bottom-color: transparent; }

.term-def-panel {
  display: none;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--cyan-alt);
  border-top: none;
  border-radius: 0 8px 8px 8px;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,0.8);
  margin-bottom: 4px;
  animation: fadeUp 0.18s ease both;
  order: 999;
}
.term-def-panel.visible { display: block; }
.term-def-panel strong {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

/* ─── VIDEO METRIC CARDS ─── */
.video-metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; }
.vm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color 0.25s, background 0.25s;
}
.vm-card:hover { border-color: rgba(1,176,176,0.35); background: #2d3650; }
.vm-pill {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  text-align: center;
  min-width: 140px;
  line-height: 1.3;
  color: var(--white);
  background: var(--gradient);
}
.vm-card-body { font-size: 13px; font-weight: 400; line-height: 1.65; color: var(--muted); }
.vm-footnote { margin-top: 18px; font-size: 13px; color: var(--muted); font-style: italic; opacity: 0.7; }

/* ─── AUTHOR CHIP ─── */
.header-meta { margin-top: 28px; }
.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px 6px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.author-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

/* ─── FOOTER ─── */
.page-footer {
  text-align: center;
  padding: 48px 0 72px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(138,149,177,0.35);
}
.version-badge {
  position: fixed;
  bottom: 16px; right: 20px;
  z-index: 100;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(138,149,177,0.4);
  user-select: none;
}

/* ─── BUTTON ─── */
.btn {
  display: inline-block;
  height: 52px;
  line-height: 52px;
  padding: 0 40px;
  border-radius: 8px;
  background: var(--gradient);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.5);
}

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