/*
 * ═══════════════════════════════════════════════════════════════
 * eGuru24 — Brand Design System v1.0
 * PISRO Consultancy Pvt. Ltd.
 *
 * USAGE: Add to every page <head>:
 * <link rel="stylesheet" href="/assets/brand.css">
 *
 * Then in page CSS, just use:
 * :root { } (no need to redefine tokens)
 * ═══════════════════════════════════════════════════════════════
 */

/* ── GOOGLE FONTS ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ── DESIGN TOKENS ───────────────────────────────────────────── */
:root {

  /* Brand Colors */
  --brand:        #2563EB;   /* Primary blue — buttons, links, accents */
  --brand2:       #1D4ED8;   /* Hover state */
  --brand3:       #1E40AF;   /* Active/pressed state */
  --brand-bg:     #EFF6FF;   /* Light blue background */
  --brand-light:  #BFDBFE;   /* Border / subtle accent */
  --brand-dark:   #1E3A8A;   /* Dark blue for dark backgrounds */

  /* Secondary Colors */
  --green:        #059669;
  --green2:       #047857;
  --green-bg:     #ECFDF5;
  --green-light:  #BBF7D0;

  --amber:        #D97706;
  --amber2:       #B45309;
  --amber-bg:     #FFFBEB;
  --amber-light:  #FDE68A;

  --red:          #DC2626;
  --red2:         #B91C1C;
  --red-bg:       #FEF2F2;
  --red-light:    #FECACA;

  --purple:       #7C3AED;
  --purple2:      #6D28D9;
  --purple-bg:    #F5F3FF;
  --purple-light: #DDD6FE;

  /* Neutral — Ink Scale */
  --ink:          #0A0F1E;   /* Headings, primary text */
  --ink2:         #1C2333;   /* Secondary headings */
  --sub:          #4A5578;   /* Body text, labels */
  --muted:        #7E8DAA;   /* Placeholder, captions */
  --dim:          #B8C3D8;   /* Disabled, decorative */

  /* Stroke / Border */
  --stroke:       #E2E8F4;   /* Default border */
  --stroke2:      #CDD5E6;   /* Stronger border */

  /* Backgrounds */
  --white:        #FFFFFF;
  --bg:           #F7F9FD;   /* Page background */
  --bg2:          #EEF2FA;   /* Section alternate bg */
  --bg3:          #E5EAF5;   /* Deeper alternate */

  /* Dark backgrounds (hero, footer) */
  --dark:         #0A0F1E;
  --dark2:        #1a1245;

  /* Typography */
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  --font-mono:    'Fira Code', 'Courier New', monospace;

  /* Font Sizes */
  --text-xs:      0.68rem;   /* 10.88px — captions, tags */
  --text-sm:      0.78rem;   /* 12.48px — small body */
  --text-base:    0.88rem;   /* 14.08px — body text */
  --text-md:      1rem;      /* 16px — medium */
  --text-lg:      1.15rem;   /* 18.4px — large body */
  --text-xl:      1.35rem;   /* 21.6px — subheading */
  --text-2xl:     1.6rem;    /* 25.6px — heading */
  --text-3xl:     2rem;      /* 32px — section title */
  --text-4xl:     2.5rem;    /* 40px — hero */

  /* Font Weights */
  --fw-normal:    400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-black:     800;

  /* Spacing */
  --space-1:      4px;
  --space-2:      8px;
  --space-3:      12px;
  --space-4:      16px;
  --space-5:      20px;
  --space-6:      24px;
  --space-8:      32px;
  --space-10:     40px;
  --space-12:     48px;
  --space-16:     64px;
  --space-20:     80px;

  /* Border Radius */
  --radius-sm:    6px;
  --radius:       9px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --radius-full:  100px;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(10,15,30,.08);
  --shadow:       0 4px 12px rgba(10,15,30,.08);
  --shadow-md:    0 6px 24px rgba(10,15,30,.1);
  --shadow-lg:    0 12px 40px rgba(10,15,30,.12);
  --shadow-brand: 0 4px 16px rgba(37,99,235,.25);

  /* Transitions */
  --ease:         all 0.2s ease;
  --ease-slow:    all 0.35s ease;

  /* Nav height */
  --nav-h:        62px;

  /* Max widths */
  --max-w:        1060px;
  --max-w-narrow: 720px;
  --max-w-wide:   1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.4px;
}

h1 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h2 { font-size: clamp(var(--text-xl), 3vw, var(--text-3xl)); }
h3 { font-size: clamp(var(--text-lg), 2vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

p {
  color: var(--sub);
  font-size: var(--text-base);
  line-height: 1.75;
}

a { color: var(--brand); transition: var(--ease); }
a:hover { color: var(--brand2); }

/* ── NAVBAR ──────────────────────────────────────────────────── */
.eg-nav {
  background: var(--white);
  border-bottom: 1px solid var(--stroke);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 5%;
  gap: var(--space-3);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.eg-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1.05rem;
  font-weight: var(--fw-black);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.eg-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: var(--fw-black);
  color: #fff;
  flex-shrink: 0;
}

.eg-nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: 1.5rem;
  align-items: center;
  list-style: none;
}

.eg-nav-links a {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--sub);
  text-decoration: none;
  transition: var(--ease);
}
.eg-nav-links a:hover { color: var(--brand); }
.eg-nav-links a.active { color: var(--brand); font-weight: var(--fw-bold); }

.eg-nav-right { margin-left: auto; display: flex; gap: var(--space-2); align-items: center; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.eg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: var(--ease);
  white-space: nowrap;
  line-height: 1;
}

/* Primary */
.eg-btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.eg-btn-primary:hover {
  background: var(--brand2);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,.35);
}
.eg-btn-primary:active { background: var(--brand3); transform: translateY(0); }

/* Secondary / Ghost */
.eg-btn-ghost {
  background: transparent;
  color: var(--sub);
  border: 1.5px solid var(--stroke2);
}
.eg-btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-bg);
}

/* Outline */
.eg-btn-outline {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}
.eg-btn-outline:hover {
  background: var(--brand);
  color: #fff;
}

/* Danger */
.eg-btn-danger {
  background: var(--red);
  color: #fff;
}
.eg-btn-danger:hover { background: var(--red2); color: #fff; }

/* Sizes */
.eg-btn-sm  { padding: 6px 14px; font-size: var(--text-sm); border-radius: var(--radius-sm); }
.eg-btn-lg  { padding: 14px 28px; font-size: var(--text-md); border-radius: var(--radius-md); }
.eg-btn-xl  { padding: 16px 36px; font-size: var(--text-lg); border-radius: var(--radius-md); }
.eg-btn-full{ width: 100%; }

/* ── CARDS ───────────────────────────────────────────────────── */
.eg-card {
  background: var(--white);
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: var(--ease);
}
.eg-card:hover {
  border-color: var(--stroke2);
  box-shadow: var(--shadow);
}
.eg-card-hover:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Feature card */
.eg-feature-card {
  background: var(--white);
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: var(--ease);
  cursor: pointer;
}
.eg-feature-card:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-brand);
}

/* Stat card */
.eg-stat-card {
  background: var(--white);
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  text-align: center;
}
.eg-stat-val {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--fw-black);
  color: var(--brand);
  letter-spacing: -1px;
  line-height: 1;
}
.eg-stat-lbl {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: var(--space-1);
}

/* ── BADGES & TAGS ───────────────────────────────────────────── */
.eg-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.eg-badge-blue   { background: var(--brand-bg);  color: var(--brand);  }
.eg-badge-green  { background: var(--green-bg);  color: var(--green);  }
.eg-badge-amber  { background: var(--amber-bg);  color: var(--amber);  }
.eg-badge-red    { background: var(--red-bg);    color: var(--red);    }
.eg-badge-purple { background: var(--purple-bg); color: var(--purple); }
.eg-badge-grey   { background: var(--bg2);       color: var(--sub);    }

/* Plan pills */
.eg-plan-free    { background: var(--bg2);       color: var(--sub);    }
.eg-plan-pro     { background: var(--brand-bg);  color: var(--brand);  }
.eg-plan-elite   { background: var(--purple-bg); color: var(--purple); }

/* ── FORM ELEMENTS ───────────────────────────────────────────── */
.eg-input,
.eg-select,
.eg-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--stroke2);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: var(--ease);
  line-height: 1.5;
}
.eg-input:focus,
.eg-select:focus,
.eg-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-bg);
}
.eg-input::placeholder,
.eg-textarea::placeholder { color: var(--dim); }

.eg-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--sub);
  margin-bottom: var(--space-1);
}
.eg-label-req::after { content: ' *'; color: var(--red); }

.eg-form-group { margin-bottom: var(--space-4); }

/* ── SECTION HEADERS ─────────────────────────────────────────── */
.eg-eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--fw-black);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand);
  margin-bottom: var(--space-2);
  display: block;
}

.eg-section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
  font-weight: var(--fw-bold);
  color: var(--ink);
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: var(--space-3);
}

.eg-section-sub {
  font-size: var(--text-base);
  color: var(--sub);
  line-height: 1.75;
  max-width: 560px;
}

/* ── LAYOUT HELPERS ──────────────────────────────────────────── */
.eg-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 5%;
}
.eg-container-narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 5%;
}

.eg-section {
  padding: var(--space-20) 5%;
}
.eg-section-sm {
  padding: var(--space-12) 5%;
}

/* ── HERO PATTERNS ───────────────────────────────────────────── */
.eg-hero {
  background: linear-gradient(135deg, var(--dark), var(--dark2));
  padding: var(--space-20) 5%;
  position: relative;
  overflow: hidden;
}
.eg-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(37,99,235,.18), transparent 60%);
  pointer-events: none;
}

.eg-hero-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--fw-black);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

/* ── SPONSOR STRIP ───────────────────────────────────────────── */
.eg-sponsor-strip {
  background: linear-gradient(135deg, var(--dark), var(--dark2));
  padding: 10px 5%;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ── ALERTS ──────────────────────────────────────────────────── */
.eg-alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.eg-alert-info    { background: var(--brand-bg);  border: 1px solid var(--brand-light); color: var(--brand); }
.eg-alert-success { background: var(--green-bg);  border: 1px solid var(--green-light); color: var(--green); }
.eg-alert-warning { background: var(--amber-bg);  border: 1px solid var(--amber-light); color: var(--amber); }
.eg-alert-error   { background: var(--red-bg);    border: 1px solid var(--red-light);   color: var(--red);   }

/* ── DIVIDER ─────────────────────────────────────────────────── */
.eg-divider {
  border: none;
  border-top: 1px solid var(--stroke);
  margin: var(--space-8) 0;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.eg-footer {
  background: var(--dark);
  padding: var(--space-6) 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.eg-footer-copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.3);
}
.eg-footer-links {
  display: flex;
  gap: var(--space-5);
}
.eg-footer-links a {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.4);
  text-decoration: none;
  transition: var(--ease);
}
.eg-footer-links a:hover { color: #fff; }

/* ── UTILITY CLASSES ─────────────────────────────────────────── */
.eg-text-brand   { color: var(--brand); }
.eg-text-green   { color: var(--green); }
.eg-text-amber   { color: var(--amber); }
.eg-text-red     { color: var(--red); }
.eg-text-muted   { color: var(--muted); }
.eg-text-sub     { color: var(--sub); }
.eg-text-center  { text-align: center; }
.eg-font-display { font-family: var(--font-display); }
.eg-fw-bold      { font-weight: var(--fw-bold); }
.eg-fw-black     { font-weight: var(--fw-black); }
.eg-bg-brand     { background: var(--brand-bg); }
.eg-bg-dark      { background: var(--dark); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .eg-nav-links { display: none; }
  .eg-section   { padding: var(--space-12) 5%; }
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
}

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