/* ============================================================
   MagicFeedPro Affiliate — design system
   Tokens lifted from blog/app/globals.css so visual language stays
   consistent across blog / affiliate / app. If you change a token
   here, mirror it in the blog's globals.css too.
   ============================================================ */
:root {
  --blue: #0000EE;
  --purple: #716FFF;
  --indigo: #6470FF;
  --lavender: #A264FF;
  --soft-lav: #897BFF;
  --charcoal: #29292E;
  --charcoal-d: #1A1A1F;
  --gold: #FFC869;

  --white: #FFFFFF;
  --cream: #FAFAFF;
  --off-white: #F7F7F7;
  --bg-soft: #F7F7F7;
  --bg-soft-2: #F0F4FF;

  --ink-900: #000000;
  --ink-800: #29292E;
  --ink-700: #343434;
  --ink-600: #4E4E4E;
  --ink-500: #8B8B8B;
  --ink-400: #A3A3A3;
  --ink-300: #D1D5DB;
  --line: #E5E7EB;
  --line-soft: #F1F1F1;

  --success-500: #139B01;
  --success-50: #ECFDF5;
  --danger-500: #D33C3C;
  --danger-50: #FDECEC;

  --g-brand: linear-gradient(135deg, #716FFF 0%, #0000EE 100%);
  --g-hero: linear-gradient(135deg, #716FFF 0%, #6470FF 50%, #0000EE 100%);
  --g-page: linear-gradient(180deg, #FFFFFF 0%, #FAFAFF 100%);
  --g-card: linear-gradient(180deg, #FFFFFF 0%, #F7F7F7 100%);

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 24px;
  --r-pill: 999px;

  --sh-small: 0 4px 6px 0 rgba(15, 23, 42, 0.12);
  --sh-medium: 0 12px 24px 0 rgba(15, 23, 42, 0.10);
  --sh-large: 0 24px 60px 0 rgba(15, 23, 42, 0.14);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--g-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; line-height: 1.2; }
h1 { font-size: clamp(36px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 18px; }
p { margin: 0 0 12px; color: var(--ink-700); }
.muted { color: var(--ink-500); }
small, .small { font-size: 13px; }

/* Containers */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Title gradient — blog signature look */
.title-gradient {
  background: var(--g-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--bg-soft-2); color: var(--blue);
  font-size: 13px; font-weight: 600;
  border: 1px solid #DDE2FF;
}
.pill-dark { background: var(--charcoal); color: var(--white); border-color: var(--charcoal); }
.pill-success { background: var(--success-50); color: var(--success-500); border-color: #BBF7D0; }
.pill-warning { background: #FFF7E6; color: #B45309; border-color: #FDE68A; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--charcoal); color: var(--white); }
.btn-primary:hover { background: var(--charcoal-d); box-shadow: var(--sh-small); }
.btn-brand { background: var(--g-brand); color: var(--white); }
.btn-brand:hover { box-shadow: var(--sh-medium); }
.btn-ghost { background: transparent; color: var(--ink-700); border-color: var(--line); }
.btn-ghost:hover { background: var(--off-white); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* Forms */
.field { display: block; margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.field input,
.field textarea,
.field select {
  width: 100%; padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); font-size: 15px; font-family: inherit;
  background: var(--white); color: var(--ink-900);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 0, 238, 0.1); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.field-error { color: var(--danger-500); font-size: 13px; margin-top: 4px; }
.field-hint { color: var(--ink-500); font-size: 12px; margin-top: 4px; }

/* Cards */
.card {
  background: var(--g-card); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 28px;
}
.card-strong { box-shadow: var(--sh-medium); }
.feature-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 24px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--sh-medium); }
.feature-card .icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--g-brand); color: var(--white);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  font-size: 22px;
}

/* Hero — two-column with form on right */
.hero {
  padding: 60px 0 80px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFF 100%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px;
  align-items: start;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 { margin-bottom: 16px; }
.hero-lead { font-size: 17px; color: var(--ink-700); max-width: 540px; margin-bottom: 28px; }
.hero-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 24px; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat strong { font-size: 28px; color: var(--ink-900); }
.hero-stat span { font-size: 13px; color: var(--ink-500); }

.hero-form-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-2xl); padding: 32px;
  box-shadow: var(--sh-large);
}
.hero-form-card h3 { font-size: 20px; margin-bottom: 4px; }
.hero-form-card p.lead-form { color: var(--ink-600); font-size: 14px; margin-bottom: 20px; }

/* Sections */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { font-size: 17px; color: var(--ink-600); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* How it works numbered steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: stepcounter; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px; position: relative; }
.step::before {
  counter-increment: stepcounter; content: counter(stepcounter);
  position: absolute; top: -16px; left: 24px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--g-brand); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  box-shadow: 0 6px 14px rgba(0, 0, 238, 0.25);
}
.step h3 { margin-top: 12px; }

/* FAQ */
.faq-item {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); margin-bottom: 12px;
}
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600;
  list-style: none; user-select: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--ink-500); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .answer { padding: 0 22px 22px; color: var(--ink-700); }

/* Footer */
.footer { padding: 48px 0; border-top: 1px solid var(--line); color: var(--ink-500); font-size: 14px; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }

/* Dashboard layout */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
@media (max-width: 800px) { .app-shell { grid-template-columns: 1fr; } }
.app-side {
  background: var(--charcoal); color: var(--white);
  padding: 24px; display: flex; flex-direction: column; gap: 4px;
}
.app-side .brand { font-weight: 700; font-size: 18px; margin-bottom: 24px; }
.app-side .nav-item {
  display: block; padding: 10px 12px; border-radius: var(--r-md);
  color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 14px;
}
.app-side .nav-item:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); text-decoration: none; }
.app-side .nav-item.active { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.app-side .footer-side { margin-top: auto; font-size: 12px; color: rgba(255, 255, 255, 0.5); }
.app-main { padding: 32px 40px; max-width: 1000px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 20px;
}
.kpi-label { font-size: 12px; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.kpi-value { font-size: 28px; font-weight: 700; color: var(--ink-900); }
.kpi-sub { font-size: 12px; color: var(--ink-500); margin-top: 4px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--charcoal); color: var(--white);
  padding: 12px 20px; border-radius: var(--r-md);
  font-size: 14px; box-shadow: var(--sh-large);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
  z-index: 9999;
}
.toast.show { opacity: 1; }
.toast.error { background: var(--danger-500); }
.toast.success { background: var(--success-500); }
