/* ChromaXP — Core styles & design tokens */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('hcc-design.css');
@import url('premium-ui.css');

:root {
  --brand-primary: #7c3aed;
  --brand-accent: #06b6d4;
  --brand-gold: #f59e0b;

  --bg-base: #0a0a0f;
  --bg-surface: #111118;
  --bg-elevated: #1a1a24;
  --bg-border: #2a2a3a;

  --text-primary: #f8f8ff;
  --text-secondary: #a0a0b8;
  --text-muted: #606078;

  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #06b6d4;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(124, 58, 237, 0.25);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(124, 58, 237, 0.18), transparent),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(6, 182, 212, 0.08), transparent);
  background-attachment: fixed;
}

[data-theme='light'] body {
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(124, 58, 237, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(6, 182, 212, 0.06), transparent);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

p {
  margin-top: 0;
  color: var(--text-secondary);
}

a {
  color: var(--brand-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-primary);
}

code,
.hex-value,
.color-code,
kbd {
  font-family: var(--font-mono);
}

main {
  padding-top: var(--header-h);
  min-height: 60vh;
}

.cx-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.cx-container--narrow {
  max-width: 800px;
}

.cx-section {
  padding-block: var(--space-2xl);
}

.cx-section-title {
  margin-bottom: var(--space-sm);
}

.cx-section-lead {
  max-width: 52ch;
  margin-bottom: var(--space-xl);
  font-size: 1.125rem;
}

.cx-preview-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  height: 4px;
  background: var(--preview-color, var(--brand-primary));
  box-shadow: var(--shadow-glow);
  transition: background var(--transition-base);
}

.cx-hero {
  padding-block: var(--space-3xl) var(--space-2xl);
  text-align: center;
}

.cx-hero__title {
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme='light'] .cx-hero__title {
  background: linear-gradient(135deg, var(--text-primary-light) 0%, #4a4a6a 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.cx-hero__lead {
  font-size: 1.2rem;
  max-width: 36em;
  margin-inline: auto var(--space-md);
  margin-bottom: var(--space-xl);
}

.cx-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  align-items: center;
}

.cx-skip-link {
  position: absolute;
  left: -9999px;
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  background: var(--brand-primary);
  color: #fff;
  border-radius: var(--radius-sm);
}

.cx-skip-link:focus {
  left: var(--space-md);
  top: var(--space-md);
}

/* —— Homepage & editorial (human-scale layout, vs. thin landing strips) —— */

.cx-home .cx-hero--home {
  text-align: left;
  padding-block: var(--space-3xl) var(--space-2xl);
}

@media (min-width: 992px) {
  .cx-home .cx-hero--home .cx-hero__inner {
    max-width: 52rem;
  }
}

.cx-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-sm);
}

.cx-hero__title--home {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--text-primary);
  font-size: clamp(2.25rem, 4.5vw, 3.35rem);
  line-height: 1.08;
  max-width: 18ch;
}

.cx-hero__title--home em {
  font-style: normal;
  color: var(--brand-primary);
}

[data-theme='light'] .cx-hero__title--home {
  color: #14141f;
}

.cx-hero__lead--home {
  font-size: 1.125rem;
  max-width: 40rem;
  margin: 0 0 var(--space-md);
}

.cx-hero__lead--home + .cx-hero__lead--home {
  margin-top: var(--space-md);
}

.cx-hero__micro {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: var(--space-md) 0 0;
  max-width: 36rem;
}

.cx-hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-xl);
}

.cx-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  padding: var(--space-lg);
  margin-top: var(--space-2xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
}

.cx-stat-strip dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 var(--space-xs);
}

.cx-stat-strip dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cx-home-band {
  border-top: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border);
  background: rgba(17, 17, 24, 0.5);
}

[data-theme='light'] .cx-home-band {
  background: rgba(248, 248, 252, 0.92);
}

.cx-home-band__inner {
  max-width: 1200px;
  margin-inline: auto;
  padding: var(--space-2xl) var(--space-md);
}

.cx-home-band h2 {
  margin-bottom: var(--space-md);
}

.cx-home-band p {
  max-width: 58ch;
  margin-bottom: var(--space-md);
}

.cx-home-band p:last-child {
  margin-bottom: 0;
}

/* Homepage — honest comparison vs. common site archetypes (no competitor names) */

.cx-compare-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
  margin-top: var(--space-lg);
}

@media (min-width: 768px) {
  .cx-compare-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

.cx-compare-card {
  height: 100%;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
}

.cx-compare-card__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.cx-compare-card h3 {
  font-size: 1.05rem;
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
}

.cx-compare-card p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.cx-ref-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.cx-ref-card {
  display: block;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
  text-decoration: none;
  color: inherit;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.cx-ref-card:hover {
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: var(--shadow-md);
}

.cx-ref-card h3 {
  font-size: 1.05rem;
  margin: 0 0 var(--space-xs);
  color: var(--text-primary);
}

.cx-ref-card p {
  font-size: 0.875rem;
  margin: 0;
  color: var(--text-secondary);
}

.cx-blog-picks {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .cx-blog-picks {
    flex-direction: row;
  }
}

.cx-blog-picks a {
  flex: 1;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
}

.cx-blog-picks a:hover {
  border-color: var(--brand-accent);
}

.cx-blog-picks .cx-blog-picks__title {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.cx-blog-picks time {
  font-size: 0.8rem;
  color: var(--text-muted);
}
