/* =========================================================
   EmergeRank — Global Stylesheet
   CSP: default-src 'self' — no external fonts, no images,
   no inline styles or scripts.
   ========================================================= */

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

/* ---- Design tokens ---- */
:root {
  --brand:        #4F46E5;
  --brand-dark:   #3730A3;
  --brand-light:  #6366F1;
  --text:         #1E1B4B;
  --text-muted:   #6B7280;
  --bg:           #ffffff;
  --bg-subtle:    #F5F3FF;
  --bg-card:      #ffffff;
  --border:       #E5E7EB;
  --border-card:  #EDE9FE;
  --shadow-card:  0 1px 4px rgba(79, 70, 229, 0.07), 0 4px 16px rgba(79, 70, 229, 0.06);
  --radius:       10px;
  --radius-sm:    6px;
  --max-width:    800px;
  --max-width-narrow: 600px;
}

/* ---- Base ---- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  text-decoration: underline;
}

/* =========================================================
   LOGO IMAGE  — actual EmergeRank logo (apple-touch-icon.png)
   Used in header (.site-logo-img) and footer (.site-logo-img--small)
   ========================================================= */
.site-logo-img {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.site-logo-img--small {
  width: 22px;
  height: 22px;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.92);
  /* Sticky glass-like header on scroll — pure CSS, no JS */
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo lockup: mark + wordmark side by side */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.site-logo:hover {
  text-decoration: none;
}

.site-logo-wordmark {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--bg-subtle);
  text-decoration: none;
}

/* =========================================================
   HERO
   ========================================================= */

/* Gradient band behind the hero — no image, pure CSS */
.hero {
  position: relative;
  max-width: 100%;
  padding: 88px 24px 72px;
  text-align: center;
  /* Full-width gradient swatch */
  background: linear-gradient(
    180deg,
    #EEF2FF 0%,
    #F5F3FF 40%,
    #ffffff 100%
  );
}

/* Subtle dot-grid overlay — uses radial-gradient, no external images */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #C7D2FE 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.45;
  pointer-events: none;
}

.hero > * {
  position: relative; /* sit above the ::before overlay */
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 24px;
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  max-width: var(--max-width);
  margin: 0 auto 20px;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 auto 36px;
  max-width: 540px;
  line-height: 1.7;
}

.hero-trust {
  margin: 16px auto 0 !important;
  font-size: 13px !important;
  color: var(--text-muted) !important;
  max-width: none !important;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.cta-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--brand);
  border: 1px solid var(--border-card);
}

.btn-secondary:hover {
  background: #EDE9FE;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.12);
}

/* =========================================================
   FEATURES SECTION
   ========================================================= */
.features {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 72px;
}

.features-intro {
  text-align: center;
  margin-bottom: 48px;
}

.features-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 12px 0;
  color: var(--text);
}

.features-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 480px;
  line-height: 1.65;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Feature cards */
.features-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.features-card:hover {
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1), 0 8px 28px rgba(79, 70, 229, 0.1);
  transform: translateY(-2px);
}

.features-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.features-card strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.35;
}

.features-card span {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =========================================================
   BOTTOM CTA SECTION
   ========================================================= */
.cta-section {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  padding: 72px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Faint arc decoration — CSS only */
.cta-section::before {
  content: "";
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.cta-section::after {
  content: "";
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.cta-section-inner {
  position: relative;
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0 0 14px 0;
  line-height: 1.2;
}

.cta-section p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 32px 0;
  line-height: 1.65;
}

.cta-section .btn-primary {
  background: #ffffff;
  color: var(--brand);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-primary:hover {
  background: #F5F3FF;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.site-footer-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 20px 0;
}

.site-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.site-footer-links a {
  color: var(--text-muted);
  font-size: 13px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.site-footer-links a:hover {
  color: var(--brand);
  text-decoration: none;
}

/* =========================================================
   LEGAL PAGES  (privacy.html + terms.html)
   These styles are intentionally isolated and do not depend
   on any landing-page classes.
   ========================================================= */
.legal {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.legal h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.legal .updated {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 32px 0;
}

.legal h2 {
  font-size: 20px;
  margin: 40px 0 12px 0;
  line-height: 1.3;
}

.legal h3 {
  font-size: 17px;
  margin: 24px 0 8px 0;
  line-height: 1.3;
}

.legal p {
  margin: 0 0 16px 0;
}

.legal ul {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.legal li {
  margin-bottom: 8px;
}

.legal strong {
  color: var(--text);
}

.legal .signature {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* =========================================================
   MOBILE  ( <= 600px )
   ========================================================= */
@media (max-width: 600px) {
  /* Header */
  .site-header {
    padding: 14px 16px;
  }

  .site-logo-wordmark {
    font-size: 16px;
  }

  .site-nav a {
    padding: 6px 8px;
  }

  /* Hero */
  .hero {
    padding: 64px 20px 56px;
  }

  .hero h1 {
    font-size: 34px;
    letter-spacing: -0.025em;
  }

  .hero p {
    font-size: 16px;
  }

  /* Features */
  .features {
    padding: 56px 20px 56px;
  }

  .features-title {
    font-size: 26px;
  }

  .features-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .features-card {
    padding: 20px;
  }

  /* Bottom CTA */
  .cta-section {
    padding: 56px 20px;
  }

  .cta-section h2 {
    font-size: 26px;
  }

  .cta-section p {
    font-size: 15px;
  }

  /* Legal */
  .legal h1 {
    font-size: 26px;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .features-card {
    transition: none;
  }
}
