/* ==========================================================
   SUCCESSFIED — Design System v2
   Premium SaaS direction. Teal-anchored (from brand logo),
   deep indigo neutrals, coral as a sparing secondary accent.
   Inspired by Linear / Stripe / Notion / Groww discipline:
   one confident accent color, generous whitespace, crisp
   surfaces, restrained motion.
   ========================================================== */

:root {
  --ink: #0F172A;            /* deep indigo-black — headings, nav */
  --ink-soft: #334155;
  --text-muted: #64748B;
  --surface: #FFFFFF;
  --surface-soft: #F8FAFC;
  --surface-tint: #EFFCFA;   /* faint teal-tinted surface for soft sections */
  --line: #E2E8F0;

  --teal: #0EA89E;           /* primary brand color, from logo */
  --teal-deep: #0A7D75;
  --teal-tint: #DFF7F4;
  --teal-50: #ECFDFB;

  --coral: #EC4899;          /* secondary accent, used sparingly */
  --coral-tint: #FCE7F3;

  --orange: #FE9A04;         /* logo-only accent, near-zero use elsewhere */
  --orange-tint: #FFF1DB;

  --success: #10B981;
  --success-tint: #DCFCE7;
  --danger: #E11D48;
  --danger-tint: #FFE4E9;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-md: 0 4px 16px rgba(15,23,42,0.08);
  --shadow-lg: 0 12px 40px rgba(15,23,42,0.12);
  --shadow-teal: 0 8px 24px rgba(14,168,158,0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.font-hi { font-family: 'Noto Sans Devanagari', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
* { scrollbar-width: thin; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.navbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.navbar-brand {
  display: flex; align-items: center;
  font-weight: 700; font-size: 20px; color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
}
.navbar-links { display: flex; align-items: center; gap: 30px; }
.navbar-links a { font-size: 14.5px; font-weight: 500; color: var(--ink-soft); transition: color .15s; }
.navbar-links a:hover, .navbar-links a.active { color: var(--teal); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: all .18s cubic-bezier(.4,0,.2,1);
  border: 1px solid transparent;
  font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow-teal); }
.btn-primary:hover { background: var(--teal-deep); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(14,168,158,0.32); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 24px 80px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 800px 500px at 15% -10%, var(--teal-tint) 0%, transparent 60%),
    radial-gradient(ellipse 600px 400px at 100% 10%, var(--coral-tint) 0%, transparent 55%);
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
  max-width: 1180px; margin: 0 auto;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px; border-radius: 100px; font-size: 13px; font-weight: 600;
  background: var(--teal-tint); color: var(--teal-deep);
  margin-bottom: 24px; border: 1px solid rgba(14,168,158,0.2);
}
.hero h1 {
  font-size: clamp(36px, 4.8vw, 58px); font-weight: 700; line-height: 1.08;
  color: var(--ink); margin-bottom: 20px; max-width: 580px;
}
.hero h1 .accent {
  background: linear-gradient(180deg, var(--teal) 0%, var(--teal) 48%, var(--coral) 52%, var(--coral) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.subhead {
  font-size: 17.5px; color: var(--text-muted); max-width: 500px; margin-bottom: 32px; line-height: 1.65;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Floating abstract shapes — subtle, premium, not clutter */
.hero-shape {
  position: absolute; border-radius: 50%; z-index: 1; filter: blur(0px);
  animation: float 8s ease-in-out infinite;
}
.hero-shape.s1 { width: 90px; height: 90px; background: linear-gradient(135deg, var(--teal), var(--teal-deep)); opacity: 0.15; top: 8%; right: 8%; animation-delay: 0s; }
.hero-shape.s2 { width: 50px; height: 50px; background: var(--coral); opacity: 0.15; top: 55%; right: 2%; animation-delay: 1.5s; }
.hero-shape.s3 { width: 36px; height: 36px; background: var(--orange); opacity: 0.18; top: 18%; left: 2%; animation-delay: 0.8s; border-radius: 10px; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-shape { animation: none; }
}

/* Product-shot demo card — the hero's signature element */
.demo-card {
  position: relative; z-index: 2;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.demo-card-header {
  background: var(--ink); color: #fff;
  padding: 16px 22px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 600;
}
.demo-card-header .dots { display: flex; gap: 6px; }
.demo-card-header .dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.25); }
.demo-card-body { padding: 28px 26px; }
.demo-q-label { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.demo-q-text { font-size: 16px; font-weight: 600; margin-bottom: 20px; color: var(--ink); }
.demo-option {
  padding: 13px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 10px; font-size: 14px; font-weight: 500; transition: all .2s;
  display: flex; align-items: center; gap: 10px;
}
.demo-option.correct { border-color: var(--success); background: var(--success-tint); color: #047857; font-weight: 600; }
.demo-option .check-icon {
  width: 20px; height: 20px; border-radius: 50%; background: var(--success); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0;
}
.demo-score-row {
  margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.demo-score-row .label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.demo-score-row .val { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; color: var(--teal); }

/* Stat strip */
.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px,1fr)); gap: 14px;
  margin-top: 44px;
}
.stat-item { text-align: left; }
.stat-item .num { font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 700; color: var(--ink); }
.stat-item .label { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 100px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em;
}
.badge-blue { background: #EFF6FF; color: #2563EB; }
.badge-green { background: var(--success-tint); color: #047857; }
.badge-amber { background: var(--orange-tint); color: #B45309; }
.badge-gray { background: var(--surface-soft); color: var(--text-muted); }
.badge-teal { background: var(--teal-tint); color: var(--teal-deep); }
.badge-coral { background: var(--coral-tint); color: #BE185D; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: all .2s cubic-bezier(.4,0,.2,1);
}
.card:hover { border-color: var(--teal); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-flat { box-shadow: none; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.feature-card {
  padding: 30px 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  transition: all .2s cubic-bezier(.4,0,.2,1);
}
.feature-card:hover { border-color: var(--teal); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.feature-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm); margin-bottom: 18px;
  background: var(--teal-tint); display: flex; align-items: center; justify-content: center; font-size: 22px;
  color: var(--teal-deep);
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* Intelligence section cards — the moat, slightly elevated treatment */
.intel-card {
  padding: 28px 24px; border-radius: var(--radius); background: var(--ink); color: #fff;
  position: relative; overflow: hidden;
}
.intel-card::before {
  content: ''; position: absolute; top: -40%; right: -30%; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(14,168,158,0.35), transparent 70%); border-radius: 50%;
}
.intel-card .intel-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); background: rgba(14,168,158,0.18);
  display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 16px;
  color: var(--teal); position: relative; z-index: 1;
}
.intel-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; position: relative; z-index: 1; }
.intel-card p { font-size: 13.5px; color: #CBD5E1; line-height: 1.6; position: relative; z-index: 1; }

/* ---------- Sections ---------- */
.section { padding: 80px 24px; }
.section-soft { background: var(--surface-soft); }
.section-eyebrow { font-size: 13px; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.section-title { font-size: 34px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.02em; }
.section-subtitle { color: var(--text-muted); font-size: 16px; margin-bottom: 44px; max-width: 560px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.form-control {
  width: 100%; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14.5px; transition: all .15s; font-family: inherit; background: var(--surface);
}
.form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-tint); }
.form-error { color: var(--danger); font-size: 13px; margin-top: 6px; }
.alert { padding: 13px 18px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; border: 1px solid; }
.alert-error { background: var(--danger-tint); color: var(--danger); border-color: rgba(225,29,72,0.25); }
.alert-success { background: var(--success-tint); color: #047857; border-color: rgba(16,185,129,0.25); }

/* ---------- Auth pages ---------- */
.auth-wrap { max-width: 420px; margin: 70px auto; padding: 0 24px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px 34px; box-shadow: var(--shadow-lg); }

/* ---------- Test palette / engine ---------- */
.test-shell { max-width: 1080px; margin: 0 auto; padding: 20px; }
.test-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--ink); color: #fff; border-radius: var(--radius);
  margin-bottom: 20px;
}
.timer { font-family: 'Space Grotesk', monospace; font-size: 19px; font-weight: 700; color: #fff; }
.timer.low { color: #FB7185; }

.option-row {
  padding: 15px 17px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: 10px; cursor: pointer; font-size: 14.5px; transition: all .15s; background: var(--surface);
}
.option-row:hover { border-color: var(--teal); background: var(--teal-50); }
.option-row.selected { border: 2px solid var(--teal); background: var(--teal-tint); font-weight: 600; }
.option-row.correct { border-color: var(--success); background: var(--success-tint); }
.option-row.incorrect { border-color: var(--danger); background: var(--danger-tint); }

.q-palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.q-dot {
  width: 34px; height: 34px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; cursor: pointer; border: 1.5px solid var(--line); background: var(--surface); color: var(--text-muted);
  transition: all .15s;
}
.q-dot:hover { border-color: var(--teal); }
.q-dot.current { background: var(--teal); color: #fff; border-color: var(--teal); }
.q-dot.answered { background: var(--success); color: #fff; border-color: var(--success); }
.q-dot.marked { background: var(--coral); color: #fff; border-color: var(--coral); }

/* ---------- Dashboard: progress rings + score cards ---------- */
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px,1fr)); gap: 18px; }
.score-card {
  padding: 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); text-align: center; transition: all .2s;
}
.score-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.score-card .score-val { font-family: 'Space Grotesk', sans-serif; font-size: 34px; font-weight: 700; color: var(--teal); }
.score-card .score-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }
.score-card.hero-score {
  background: linear-gradient(135deg, var(--ink), #1E293B); color: #fff; border: none; position: relative; overflow: hidden;
}
.score-card.hero-score::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(14,168,158,0.4), transparent 70%); border-radius: 50%;
}
.score-card.hero-score .score-val { color: var(--teal); font-size: 46px; position: relative; z-index: 1; }
.score-card.hero-score .score-label { color: #94A3B8; position: relative; z-index: 1; }

/* Progress ring (SVG-driven, see dashboard markup) */
.progress-ring { transform: rotate(-90deg); }
.progress-ring-bg { stroke: var(--line); fill: none; }
.progress-ring-fill { stroke: var(--teal); fill: none; stroke-linecap: round; transition: stroke-dashoffset 0.6s cubic-bezier(.4,0,.2,1); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 24px 36px; background: var(--surface-soft); }
.footer-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 28px; }
.footer p { font-size: 13.5px; color: var(--text-muted); }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px,1fr)); gap: 22px; max-width: 780px; margin: 0 auto; }
.price-card { padding: 32px 28px; border-radius: var(--radius-lg); border: 1px solid var(--line); text-align: left; position: relative; background: var(--surface); transition: all .2s; }
.price-card:hover { box-shadow: var(--shadow-md); }
.price-card.featured { border: 2px solid var(--teal); box-shadow: var(--shadow-teal); }
.price-card .tag {
  position: absolute; top: -13px; right: 24px; background: var(--teal); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 5px 14px; border-radius: 100px;
}
.price-card .amount { font-family: 'Space Grotesk', sans-serif; font-size: 42px; font-weight: 700; margin: 8px 0; }
.price-card .amount span { font-size: 15px; font-weight: 400; color: var(--text-muted); font-family: 'Inter', sans-serif; }
.price-feature { font-size: 14.5px; margin-bottom: 10px; display: flex; gap: 9px; align-items: flex-start; }
.price-feature .check { color: var(--teal); font-weight: 700; }

/* ---------- Loading skeleton ---------- */
@keyframes skeleton-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.skeleton { background: var(--surface-soft); border-radius: var(--radius-sm); animation: skeleton-pulse 1.4s ease-in-out infinite; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .demo-card { max-width: 460px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .navbar-links { gap: 16px; }
  .navbar-links span.hide-mobile, .navbar-links a.hide-mobile { display: none; }
  .hero { padding: 56px 20px 44px; }
  .section { padding: 52px 20px; }
  .test-shell .test-grid { grid-template-columns: 1fr !important; }
}
