/* ============================================================
   AI Speedforce — Components
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1;
  padding: .8rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--c-brand-600); color: #fff; box-shadow: var(--shadow-brand); }
.btn--primary:hover { background: var(--c-brand-700); color: #fff; }
.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-brand-400); color: var(--c-brand-700); }
.btn--light { background: #fff; color: var(--c-ink); }
.btn--light:hover { color: var(--c-brand-700); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--outline-light:hover { border-color: #fff; color: #fff; }
.btn--lg { font-size: var(--fs-base); padding: 1rem 1.6rem; }
.btn--block { width: 100%; }

/* ---------- Pills / tags ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--fs-xs); font-weight: 600;
  padding: .3rem .7rem; border-radius: var(--radius-pill);
  background: var(--c-brand-50); color: var(--c-brand-700);
}
.pill--accent { background: #e0fbff; color: var(--c-accent-600); }
.section--night .pill { background: rgba(255,255,255,.08); color: #d7ddff; }

/* ---------- Cards ---------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  height: 100%;
}
.card--link:hover, a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--c-brand-200); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--c-body); font-size: var(--fs-sm); }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: var(--sp-4);
  background: var(--c-brand-50); color: var(--c-brand-600);
}
.card__icon svg { width: 24px; height: 24px; }
.card__link { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); color: var(--c-brand-700); }
.card__link::after { content: " \2192"; }

/* Feature list with checks */
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 1.9rem; margin-bottom: .6rem; color: var(--c-body); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .15rem;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--c-brand-50);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 14px; background-repeat: no-repeat; background-position: center;
}
.section--night .checks li { color: #c7cff0; }
.section--night .checks li::before { background-color: rgba(255,255,255,.1); }

/* Numbered steps */
.steps { list-style: none; counter-reset: step; padding: 0; }
.steps > li { position: relative; padding-left: 3.2rem; margin-bottom: var(--sp-5); }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -.1rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700;
  color: #fff; background: var(--c-brand-600);
}

/* Stat block */
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-3xl); color: var(--c-ink); line-height: 1; }
.section--night .stat__num { color: #fff; }
.stat__label { font-size: var(--fs-sm); color: var(--c-muted); }
.section--night .stat__label { color: #aab4dc; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--sp-7); align-items: center; }
@media (max-width: 940px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__art {
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  padding: 2px;
  box-shadow: var(--shadow-lg);
}
.hero__art-inner {
  border-radius: calc(var(--radius-lg) - 2px);
  background: linear-gradient(180deg, var(--c-night-2), var(--c-night));
  padding: var(--sp-6);
  color: #dfe4fb;
}

/* Logo cloud */
.logo-row { display: flex; flex-wrap: wrap; gap: var(--sp-5) var(--sp-6); align-items: center; }
.logo-row span { font-family: var(--font-display); font-weight: 700; color: var(--c-muted); font-size: var(--fs-lg); opacity: .8; }

/* CTA band */
.cta-band {
  border-radius: var(--radius-lg);
  background: radial-gradient(120% 140% at 10% 0%, var(--c-brand-700), var(--c-night) 70%);
  color: #fff; padding: clamp(2rem,5vw,var(--sp-8));
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #cdd4ee; }

/* Breadcrumb */
.breadcrumb { font-size: var(--fs-sm); color: var(--c-muted); padding-top: var(--sp-5); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; }
.breadcrumb li::after { content: "/"; margin-left: .4rem; color: var(--c-line); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-brand-700); }

/* Prose helper for copy-heavy sections */
.prose h2 { margin-top: var(--sp-6); }
.prose h3 { margin-top: var(--sp-5); }
.prose p, .prose ul { margin-top: var(--sp-3); }
.prose ul { padding-left: 1.2em; }

/* ============================================================
   Header + Mega menu
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-5); height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--c-ink); letter-spacing: -.02em; }
.brand:hover { color: var(--c-ink); }
.brand__mark { width: 34px; height: 34px; border-radius: 9px; background: var(--gradient-brand); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-brand); }
.brand__mark svg { width: 20px; height: 20px; }

/* Primary nav (desktop) */
.nav { display: flex; align-items: center; gap: .25rem; }
.nav__item { position: relative; }
.nav__link, .nav__trigger {
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm);
  color: var(--c-ink); background: transparent; border: 0; cursor: pointer;
  padding: .6rem .8rem; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: .35rem; line-height: 1;
}
.nav__link:hover, .nav__trigger:hover { background: var(--c-surface-2); color: var(--c-brand-700); }
.nav__link[aria-current="page"] { color: var(--c-brand-700); }
.nav__trigger .caret { width: 14px; height: 14px; transition: transform .18s ease; }
.nav__trigger[aria-expanded="true"] .caret { transform: rotate(180deg); }
.nav__trigger[aria-expanded="true"] { background: var(--c-surface-2); color: var(--c-brand-700); }

.header-actions { display: flex; align-items: center; gap: .6rem; }

/* Mega panel */
.mega {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(8px);
  top: 100%; margin-top: 10px;
  width: min(920px, calc(100vw - 2rem));
  background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: var(--sp-5);
  z-index: var(--z-menu);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav__item--open .mega,
.mega:hover { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.mega[hidden] { display: none; }
.mega__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-5); }
.mega__grid--wide { grid-template-columns: 1fr 1fr 1fr .9fr; }
.mega__col-title {
  font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted);
  margin-bottom: var(--sp-3);
}
.mega__list { list-style: none; padding: 0; margin: 0; }
.mega__list li { margin: 0; }
.mega-link {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .55rem .6rem; border-radius: var(--radius-sm); color: var(--c-ink);
}
.mega-link:hover, .mega-link:focus-visible { background: var(--c-surface-2); color: var(--c-brand-700); }
.mega-link__ic { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; background: var(--c-brand-50); color: var(--c-brand-600); display: grid; place-items: center; }
.mega-link__ic svg { width: 18px; height: 18px; }
.mega-link__t { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); line-height: 1.2; }
.mega-link__d { display: block; font-size: var(--fs-xs); color: var(--c-muted); font-weight: 400; margin-top: 2px; }
.mega-link:hover .mega-link__d { color: var(--c-muted); }
.mega__feature {
  background: radial-gradient(120% 120% at 100% 0%, var(--c-brand-700), var(--c-night) 75%);
  color: #fff; border-radius: var(--radius); padding: var(--sp-5);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-4);
}
.mega__feature h4 { color: #fff; }
.mega__feature p { color: #cdd4ee; font-size: var(--fs-sm); }

/* ---------- Mobile drawer ---------- */
.nav-toggle {
  display: none;
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  border: 1px solid var(--c-line); background: #fff; cursor: pointer;
  align-items: center; justify-content: center; color: var(--c-ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(11,16,32,.45);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s;
  z-index: var(--z-drawer);
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(400px, 88vw);
  background: #fff; z-index: calc(var(--z-drawer) + 1);
  transform: translateX(100%); transition: transform .24s ease;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--c-line); }
.drawer__body { overflow-y: auto; padding: var(--sp-4) var(--sp-5) var(--sp-6); flex: 1; }
.drawer__foot { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--c-line); display: grid; gap: .6rem; }
.drawer-close { width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--c-line); background: #fff; cursor: pointer; display: grid; place-items: center; }
.drawer-close svg { width: 20px; height: 20px; }

.acc { border-bottom: 1px solid var(--c-line); }
.acc__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .95rem .2rem; background: transparent; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 650; font-size: var(--fs-base); color: var(--c-ink);
}
.acc__btn .caret { width: 16px; height: 16px; transition: transform .2s ease; color: var(--c-muted); }
.acc__btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.acc__panel { display: none; padding: 0 0 .6rem; }
.acc__panel.is-open { display: block; }
.acc__panel a { display: block; padding: .5rem .2rem .5rem .1rem; color: var(--c-body); font-size: var(--fs-sm); }
.acc__panel a:hover { color: var(--c-brand-700); }
.drawer__link { display: block; padding: .95rem .2rem; font-family: var(--font-display); font-weight: 650; color: var(--c-ink); border-bottom: 1px solid var(--c-line); }

@media (max-width: 1024px) {
  .nav, .header-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--c-night); color: #aeb7dc; padding-block: var(--sp-8) var(--sp-6); margin-top: var(--sp-8); }
.site-footer a { color: #cdd4ee; }
.site-footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-6); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand .brand { color: #fff; }
.footer__brand p { color: #97a1cc; font-size: var(--fs-sm); margin-top: var(--sp-3); max-width: 32ch; }
.footer__col h4 { color: #fff; font-size: var(--fs-sm); letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--sp-3); }
.footer__col ul { list-style: none; padding: 0; }
.footer__col li { margin-bottom: .5rem; }
.footer__col a { font-size: var(--fs-sm); }
.footer__bottom { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.1); margin-top: var(--sp-6); padding-top: var(--sp-5); font-size: var(--fs-sm); color: #8b96c4; }

/* ---------- Forms ---------- */
.field { display: grid; gap: .4rem; margin-bottom: var(--sp-4); }
.field label { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); color: var(--c-ink); }
.field .req { color: var(--c-danger); }
.field input, .field select, .field textarea {
  font: inherit; font-size: var(--fs-sm); color: var(--c-ink);
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  padding: .75rem .85rem; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--c-focus); outline-offset: 1px; border-color: var(--c-brand-400); }
.field textarea { min-height: 140px; resize: vertical; }
.field__hint { font-size: var(--fs-xs); color: var(--c-muted); }
.field__error { font-size: var(--fs-xs); color: var(--c-danger); display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--c-danger); }
.field.has-error .field__error { display: block; }
.form-note { font-size: var(--fs-xs); color: var(--c-muted); }
.form-status { padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: var(--fs-sm); display: none; }
.form-status.is-visible { display: block; }
.form-status--ok { background: #ecfdf3; color: #15803d; border: 1px solid #bbf7d0; }
