/* ═══════════════════════════════════════════════════════════════
   majiklTrust & Marketing Intelligence — Alpha Homepage Styles
   ═══════════════════════════════════════════════════════════════

   Depends on app.css for :root tokens, base reset, body styles,
   ambient glow, and shared component definitions (.btn, .btn-primary,
   .btn-ghost, .section-title, .logout-btn, .user-name).

   This file adds marketing-specific components and uses scoped
   overrides (parent selectors) where marketing contexts need
   different styling than the dashboard defaults.
   ═══════════════════════════════════════════════════════════════ */

/* ── Skip link ──────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: 0;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  z-index: 100;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
  opacity: 1;
  top: 1rem;
}

/* ── Layout primitives ──────────────────────────────────────── */

.site-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.alpha-section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.alpha-section-alt {
  background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.4) 50%, transparent 100%);
}

.alpha-section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-blue);
  margin-bottom: 1rem;
}

.alpha-section-lede {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 55ch;
  margin-bottom: 3rem;
}

/* ── Scoped overrides for shared classes ─────────────────────
   Adjusts app.css definitions ONLY inside marketing containers.
   Dashboard rendering is unaffected.
   ──────────────────────────────────────────────────────────── */

.hero-cta .btn,
.cta-inner .btn,
.site-nav .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  line-height: 1;
  border: 1px solid transparent;
  transition: all 180ms ease;
  text-decoration: none;
  white-space: nowrap;
}

.hero-cta .btn-primary,
.cta-inner .btn-primary {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 0 var(--glow-blue);
}

.hero-cta .btn-primary:hover,
.cta-inner .btn-primary:hover {
  border-color: #2563eb;
  box-shadow: 0 8px 24px -8px var(--glow-blue);
  transform: translateY(-1px);
}

.hero-cta .btn-ghost {
  border-color: transparent;
}

.hero-cta .btn-ghost:hover {
  background: var(--bg-card);
}

.alpha-section .section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  display: block;
  max-width: 40ch;
}

/* Scoped inside .header-user-info — higher specificity than
   the dashboard's base .user-name and .logout-btn */
.header-user-info .user-name {
  font-size: 0.8125rem;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  padding: 0.3rem 0.875rem;
}

.header-user-info .logout-btn {
  text-decoration: none;
}

.header-user-info .logout-btn:hover {
  color: var(--accent-red);
  border-color: var(--accent-red);
}

/* ── New classes (not in app.css) ────────────────────────────── */

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

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

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-active);
}

.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--bg-card);
  color: var(--text-muted);
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}

/* ── Header ─────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: relative;
}

.header-user-info {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}

.header-user-info[hidden] {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 180ms ease;
}

.nav-link:hover { color: var(--text-primary); }

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  padding: 7rem 0 6rem;
  position: relative;
  z-index: 1;
}

.hero-inner { max-width: 800px; text-align: left; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-blue);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  max-width: 20ch;
}

.hero-lede {
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 58ch;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-footnote {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Features grid ──────────────────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 180ms ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ── Steps ──────────────────────────────────────────────────── */

.steps-list {
  list-style: none;
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 180ms ease;
}

.step:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  line-height: 1;
}

.step-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.step-body p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ── CTA section ────────────────────────────────────────────── */

.alpha-section-cta { padding: 5rem 0 6rem; }

.cta-inner {
  max-width: 600px;
  text-align: center;
  padding: 3.5rem 2rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.cta-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.cta-lede {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ── Footer ─────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy { font-size: 0.875rem; color: var(--text-muted); }

.footer-nav { display: flex; gap: 1.75rem; }

.footer-nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 180ms ease;
}

.footer-nav a:hover { color: var(--text-primary); }

/* ── Banner (degraded state) ────────────────────────────────── */

.alpha-banner {
  position: relative;
  z-index: 5;
  border-top: 1px solid rgba(245, 158, 11, 0.3);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}

.alpha-banner-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
}

.alpha-banner-icon {
  font-size: 1.25rem;
  color: var(--accent-amber);
  flex-shrink: 0;
}

.alpha-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-size: 0.9375rem;
}

.alpha-banner-text strong { color: var(--text-primary); font-weight: 600; }
.alpha-banner-text span { color: var(--text-secondary); }

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .site-container { padding: 0 1.25rem; }
  .alpha-section { padding: 4rem 0; }
  .hero { padding: 4rem 0 3.5rem; }
  .header-inner { height: 64px; }
  .site-nav { gap: 1rem; }
  .nav-link { display: none; }
  .header-user-info { display: none; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .features-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 1rem; }
  .step-num { justify-self: start; }
  .cta-inner { padding: 2.5rem 1.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
