/* Power Manthan marketing site
   Matched to the powerias-pilot product: gray app canvas, white cards with
   hairline borders, single-hue indigo, dense small type (14px body, 11-12px
   labels), 6px chips / 10px cards. Mobile-first, flat specificity. */

:root {
  --brand: #4f46e5;
  --brand-strong: #4338ca;
  --brand-subtle: #eef2ff;
  --app-bg: #f9fafb;
  --surface: #ffffff;
  --surface-muted: #f2f4f7;
  --border: #eaecf0;
  --text: #1d2939;
  --text-2: #667085;
  --success: #059669;
  --success-subtle: #ecfdf3;
  --warning: #d97706;
  --warning-subtle: #fffaeb;
  --radius-card: 10px;
  --radius-chip: 6px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .04);
  --shell: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--app-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

h1, h2, h3 { margin: 0 0 .4em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.45rem); font-weight: 650; line-height: 1.25; letter-spacing: -.015em; }
h3 { font-size: .95rem; font-weight: 600; line-height: 1.35; }
p { margin: 0 0 .7em; }
a { color: var(--brand); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-chip);
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 20px; }
.shell-narrow { max-width: 720px; }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 8px;
}

.section { padding: 56px 0; }
.section-muted { background: transparent; border: none; }

/* Section headers sit on the canvas; content lives in white cards below */
.section h2 { margin-bottom: 4px; }
.section h2 + * { margin-top: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.45;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.btn-lg { padding: 9px 18px; font-size: 14px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: #d0d5dd; }

/* ---------- chips & badges ---------- */
.badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  padding: 2px 6px;
  border-radius: var(--radius-chip);
  white-space: nowrap;
}
.badge-live { background: var(--success-subtle); color: var(--success); }
.badge-soon { background: var(--warning-subtle); color: var(--warning); }

.chip {
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  padding: 2px 6px;
  font-variant-numeric: tabular-nums;
}
.chip-total { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  font-size: 14.5px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.01em;
}
.mark { width: 26px; height: 26px; flex: none; }

.main-nav { display: none; gap: 2px; margin-left: 4px; }
.main-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  padding: 6px 10px;
  border-radius: var(--radius-chip);
}
.main-nav a:hover { color: var(--text); background: var(--surface-muted); }

.header-actions { display: none; gap: 8px; margin-left: auto; }

.nav-toggle {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  place-content: center;
  gap: 4px;
  cursor: pointer;
}
.nav-toggle span { width: 15px; height: 1.5px; background: var(--text); border-radius: 2px; }

.nav-open .main-nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px 16px;
  box-shadow: var(--shadow-card);
}
.nav-open .main-nav a { padding: 10px; font-size: 14.5px; }
.nav-open .nav-mobile-only { border-top: 1px solid var(--border); border-radius: 0; font-weight: 600; color: var(--text); }
.nav-open .nav-mobile-cta { color: var(--brand); }

@media (min-width: 880px) {
  .main-nav { display: flex; }
  .header-actions { display: flex; }
  .nav-toggle { display: none; }
  .nav-mobile-only { display: none; }
}

/* ---------- hero ---------- */
.hero {
  padding: 48px 0 56px;
  background: linear-gradient(180deg, var(--brand-subtle) 0%, var(--app-bg) 60%);
  border-bottom: 1px solid var(--border);
}
.hero-grid { display: grid; gap: 36px; align-items: center; }
.hero-copy h1 { max-width: 15em; }
.lede { font-size: 15px; color: var(--text-2); max-width: 36em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 22px 0 0;
}
.stats > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
}
.stats dt {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stats dd { margin: 1px 0 0; color: var(--text-2); font-size: 12px; }

.hero-stack { display: grid; gap: 8px; align-content: start; }
.stack-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 2px;
}
.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 11px 14px;
}
.mini-card p { margin: 3px 0 0; color: var(--text-2); font-size: 12.5px; }
.mini-card strong { color: var(--text); }
.mini-head { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; }
.mini-time { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-indigo { background: var(--brand); }
.dot-green { background: var(--success); }
.dot-amber { background: var(--warning); }

@media (min-width: 880px) {
  .hero { padding: 64px 0 68px; }
  .hero-grid { grid-template-columns: 1.4fr 1fr; gap: 56px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- tracks ---------- */
.track-grid { display: grid; gap: 14px; margin-top: 20px; }
.track-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.track-top { display: flex; align-items: center; gap: 10px; width: 100%; }
.track-top h3 { font-size: 16px; margin: 0; }
.track-sub { color: var(--text-2); font-size: 12px; margin: 0; }
.track-card p:not(.track-sub) { color: var(--text-2); margin: 6px 0 0; }
.track-card .btn { margin-top: 14px; }

.exam-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 10px 0 0;
}
.exam-list li {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
}

@media (min-width: 760px) {
  .track-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- courses ---------- */
.course-grid { display: grid; gap: 14px; margin-top: 20px; }
.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.course-exams {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}
.course-card h3 { font-size: 16px; }
.course-desc { color: var(--text-2); }

.ticks { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 6px; }
.ticks li { padding-left: 22px; position: relative; color: var(--text-2); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .42em;
  width: 11px;
  height: 6px;
  border-left: 1.5px solid var(--brand);
  border-bottom: 1.5px solid var(--brand);
  transform: rotate(-45deg);
}

.course-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.price { font-size: 18px; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.price s { color: var(--text-2); font-weight: 400; font-size: 13px; margin-left: 5px; }
.off {
  font-size: 11px;
  font-weight: 500;
  color: var(--success);
  background: var(--success-subtle);
  border-radius: var(--radius-chip);
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: 2px;
}
.shelf-note { color: var(--text-2); font-size: 12.5px; margin: 14px 2px 0; max-width: 52em; }

@media (min-width: 760px) {
  .course-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- platform features ---------- */
.feature-grid { display: grid; gap: 14px; margin-top: 20px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
}
.feature-card p { color: var(--text-2); margin: 0; }
.feature-wide { background: var(--brand-subtle); border-color: #dfe3fb; box-shadow: none; }
.feature-wide h3 { color: var(--brand-strong); }

@media (min-width: 760px) {
  .feature-grid { grid-template-columns: repeat(6, 1fr); }
  .feature-wide { grid-column: span 3; }
  .feature-card:not(.feature-wide) { grid-column: span 2; }
}

/* ---------- evaluation / answer sheet ---------- */
.eval-grid { display: grid; gap: 32px; align-items: start; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding-left: 42px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--brand);
  font-weight: 650;
  font-size: 13px;
  display: grid;
  place-content: center;
}
.steps h3 { margin-bottom: .15em; font-size: 14.5px; }
.steps p { color: var(--text-2); margin: 0; }

.answer-sheet {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.sheet-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--app-bg);
}
.sheet-q {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 3px;
}
.sheet-qtext { font-weight: 600; margin: 0; font-size: 13px; line-height: 1.45; }
.sheet-head .badge { margin-left: 0; flex: none; }

.sheet-body {
  padding: 16px;
  font-size: 13px;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 23px,
      #f2f4f7 23px,
      #f2f4f7 24px
    );
}
.sheet-body p { line-height: 24px; margin: 0 0 24px; }
.sheet-body p:last-child { margin-bottom: 0; }
.sheet-body mark { background: var(--brand-subtle); color: inherit; border-bottom: 2px solid var(--brand); padding: 0 2px; }
.sheet-note {
  color: var(--brand-strong);
  font-style: italic;
  font-size: 12px;
  border-left: 2px solid var(--brand);
  padding-left: 9px;
}

.sheet-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
}
.sheet-sign { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--success); }

@media (min-width: 880px) {
  .eval-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
}

/* ---------- about ---------- */
.about-grid { display: grid; gap: 28px; align-items: center; }
.about-photo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 5;
  max-width: 300px;
  display: grid;
  place-content: center;
  gap: 8px;
  justify-items: center;
}
.about-initial {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  display: grid;
  place-content: center;
}
.about-caption { color: var(--text-2); font-size: 12px; font-weight: 500; }
.about-copy p:not(.eyebrow) { color: var(--text-2); }

.pull-quote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 2px solid var(--brand);
  background: var(--brand-subtle);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
}
.pull-quote cite { display: block; margin-top: 4px; font-style: normal; font-weight: 500; color: var(--text-2); font-size: 12px; }

.social-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

@media (min-width: 880px) {
  .about-grid { grid-template-columns: 300px 1fr; gap: 56px; }
}

/* ---------- FAQ ---------- */
#faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 0 16px;
  margin-top: 8px;
}
#faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  padding: 13px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 16px;
  font-weight: 500;
}
#faq details[open] summary::after { content: "–"; }
#faq details p { color: var(--text-2); margin: 0 0 14px; }

/* ---------- closing ---------- */
.closing { padding: 64px 0; }
.closing-inner {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 36px 28px;
}
.closing-inner h2 { margin-bottom: .35em; }
.closing-inner p { color: var(--text-2); margin-bottom: 1.4em; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 40px 0 20px; }
.footer-grid { display: grid; gap: 28px; }
.footer-word { font-weight: 650; font-size: 14px; margin: 0 0 5px; }
.footer-line { color: var(--text-2); font-size: 12px; margin: 0 0 3px; }
.footer-head { font-weight: 600; font-size: 12px; margin: 0 0 8px; }
.footer-grid nav { display: grid; gap: 6px; align-content: start; }
.footer-grid nav a { color: var(--text-2); text-decoration: none; font-size: 12.5px; }
.footer-grid nav a:hover { color: var(--text); }
.footer-base { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); }
.footer-base p { color: var(--text-2); font-size: 11.5px; margin: 0; }

@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ---------- texture ---------- */
body {
  background-image: radial-gradient(circle, rgba(29, 41, 57, .035) 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 320px at 12% -10%, rgba(79, 70, 229, .10), transparent 70%),
    radial-gradient(460px 300px at 95% 10%, rgba(5, 150, 105, .05), transparent 70%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero .shell { position: relative; z-index: 1; }

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 9px 0;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.ticker-track span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-2);
}
.ticker-track i { color: var(--brand); font-style: normal; font-size: 9px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker:hover .ticker-track { animation-play-state: paused; }

/* ---------- free starters ---------- */
.free-grid { display: grid; gap: 14px; margin-top: 20px; }
.free-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.free-card .badge { margin-left: 0; }
.free-card h3 { margin: 4px 0 0; font-size: 15px; }
.free-card p { color: var(--text-2); margin: 0; }
.free-card .btn { margin-top: 10px; }

@media (min-width: 760px) {
  .free-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- community ---------- */
.community-grid { display: grid; gap: 14px; margin-top: 20px; grid-template-columns: repeat(2, 1fr); }
.community-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.community-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.community-label { color: var(--text-2); font-size: 12px; margin: 0; }
.community-cta { color: var(--brand); font-size: 12px; font-weight: 600; margin-top: 8px; }

@media (min-width: 760px) {
  .community-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- testimonials ---------- */
.quote-grid { display: grid; gap: 14px; margin-top: 20px; }
.quote-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.quote-card blockquote {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.6;
}
.quote-card blockquote::before { content: "\201C"; color: var(--brand); font-weight: 700; }
.quote-card blockquote::after { content: "\201D"; color: var(--brand); font-weight: 700; }
.quote-card figcaption {
  margin-top: auto;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 760px) {
  .quote-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- hover lift ---------- */
.track-card, .course-card, .feature-card, .free-card, .community-tile, .quote-card, .mini-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.track-card:hover, .course-card:hover, .feature-card:hover, .free-card:hover,
.community-tile:hover, .quote-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(16, 24, 40, .05), 0 14px 32px rgba(16, 24, 40, .08);
  border-color: #dfe3fb;
}
.btn { transition: background .15s ease, border-color .15s ease, transform .12s ease; }
.btn:active { transform: scale(.97); }

/* ---------- scroll reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .3, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- hero entrance ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: rise .6s cubic-bezier(.2, .7, .3, 1) both; }
.hero-copy > .eyebrow { animation-delay: .05s; }
.hero-copy > h1 { animation-delay: .12s; }
.hero-copy > .lede { animation-delay: .22s; }
.hero-copy > .hero-ctas { animation-delay: .3s; }
.hero-copy > .stats { animation-delay: .38s; }
.hero-stack > * { animation: rise .6s cubic-bezier(.2, .7, .3, 1) both; }
.hero-stack > .stack-label { animation-delay: .42s; }
.hero-stack > .mini-card:nth-of-type(1) { animation-delay: .5s; }
.hero-stack > .mini-card:nth-of-type(2) { animation-delay: .62s; }
.hero-stack > .mini-card:nth-of-type(3) { animation-delay: .74s; }

/* ======================================================================
   Chat widget
   ====================================================================== */
.chat-root { position: fixed; inset: auto 0 18px 0; z-index: 60; pointer-events: none; }
.chat-root > * { pointer-events: auto; }

/* collapsed pill — floating, centered */
.chat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .35), 0 16px 40px rgba(79, 70, 229, .25);
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, opacity .2s ease;
}
.chat-pill:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(79, 70, 229, .4), 0 20px 48px rgba(79, 70, 229, .3); }
.chat-pill::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .25), transparent);
  animation: shimmer 4.5s ease-in-out infinite;
}
@keyframes shimmer { 0%, 70% { left: -60%; } 85%, 100% { left: 130%; } }
.chat-spark { width: 14px; height: 14px; flex: none; }
.chat-pill-hint { font-weight: 400; font-size: 12px; color: rgba(255, 255, 255, .75); }
.chat-open .chat-pill { opacity: 0; pointer-events: none; transform: translateY(8px); }

.chat-nudging .chat-pill { animation: nudge-bounce .7s cubic-bezier(.34, 1.56, .64, 1) 2; }
@keyframes nudge-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-7px); } }

.chat-nudge {
  width: fit-content;
  max-width: min(300px, calc(100vw - 32px));
  margin: 0 auto 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  animation: rise .4s cubic-bezier(.2, .7, .3, 1) both;
}

/* expanded panel */
.chat-panel {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(24px) scale(.92);
  transform-origin: bottom center;
  width: min(430px, calc(100vw - 20px));
  height: min(600px, calc(100dvh - 84px));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08), 0 24px 64px rgba(0, 0, 0, .16);
  opacity: 0;
  transition: transform .28s cubic-bezier(.34, 1.4, .64, 1), opacity .2s ease;
  overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-open .chat-panel { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--app-bg);
}
.chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-content: center;
  flex: none;
}
.chat-avatar svg { width: 14px; height: 14px; }
.chat-avatar-sm { width: 20px; height: 20px; }
.chat-avatar-sm svg { width: 10px; height: 10px; }
.chat-head-text { min-width: 0; }
.chat-title { margin: 0; font-size: 13.5px; font-weight: 650; }
.chat-status { margin: 0; font-size: 11.5px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.chat-online { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: online-pulse 2.4s ease-in-out infinite; }
@keyframes online-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, .35); } 50% { box-shadow: 0 0 0 4px rgba(5, 150, 105, 0); } }
.chat-tg {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand);
  background: var(--brand-subtle);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.chat-close {
  border: none;
  background: none;
  color: var(--text-2);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-chip);
}
.chat-close:hover { background: var(--surface-muted); color: var(--text); }

.chat-chips {
  display: flex;
  gap: 6px;
  padding: 10px 14px 4px;
  flex-wrap: wrap;
}
.chat-chip {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
  border: 1px dashed #c9cede;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.chat-chip:hover { color: var(--brand-strong); border-color: var(--brand); background: var(--brand-subtle); }

.chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-bubble-user {
  margin: 0 0 0 auto;
  max-width: 85%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 12px 12px 4px 12px;
  animation: rise .25s ease both;
}
.chat-bubble-bot {
  max-width: 94%;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  animation: rise .25s ease both;
}
.chat-bot-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.chat-bot-name { font-size: 11.5px; font-weight: 600; }
.chat-intent {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--brand-strong);
  background: var(--brand-subtle);
  border-radius: var(--radius-chip);
  padding: 1px 6px;
}
.chat-bot-text { margin: 0; font-size: 13px; line-height: 1.55; }
.chat-cursor {
  display: inline-block;
  width: 2px;
  height: 12px;
  background: var(--brand);
  margin-left: 2px;
  vertical-align: middle;
  animation: online-pulse 1s ease-in-out infinite;
}
.chat-bot-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); display: grid; gap: 4px; }
.chat-source { margin: 0; font-size: 11.5px; color: var(--text-2); }
.chat-source::before { content: "📖 "; font-size: 10px; }
.chat-escalation { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--brand-strong); }
.chat-escalation::before { content: "↗ "; }

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 10px 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: fit-content;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-2);
  animation: typing-dot 1s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-dot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}
.chat-form input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
}
.chat-form input::placeholder { color: #98a2b3; }
.chat-form button {
  width: 36px;
  height: 36px;
  flex: none;
  border: none;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background .15s ease;
}
.chat-form button:hover { background: var(--brand-strong); }
.chat-form button svg { width: 15px; height: 15px; }

.chat-foot {
  margin: 0;
  padding: 8px 14px 10px;
  font-size: 10.5px;
  color: var(--text-2);
  border-top: 1px solid var(--border);
  background: var(--app-bg);
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .chat-panel { transition: none; }
  .hero-copy > *, .hero-stack > * { animation: none !important; }
}
