/* ==========================================================================
   Maktabi — components (docs/TECHNICAL_REFERENCE.md §6)
   ========================================================================== */

/* ---------- buttons ---------- */

/* Reference geometry (grid-fitted against 5 reference buttons, max error 2.2px):
   height 42, padding-inline 22, label 12.5px/600, icon box 20 (ink 15), gap 8. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: 600 12.5px/1 var(--ff-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--t), color var(--t), transform var(--t), box-shadow var(--t), border-color var(--t);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--grad { background: var(--grad); color: #fff; }
.btn--grad:hover { box-shadow: 0 8px 22px rgba(109, 40, 217, .28); }

.btn--soft { background: var(--neutral-btn); color: var(--text); border-color: var(--border); }
.btn--soft:hover { background: var(--surface); border-color: var(--border-strong); }

.btn--ghost { background: transparent; color: var(--text-2); border-color: var(--border); }

/* borderless text+icon action (404 secondary, download secondary) */
.btn--bare { background: transparent; color: var(--text-2); border-color: transparent; padding-inline: 14px; }
.btn--bare:hover { color: var(--text); }

/* mock toolbar pill in the hero: box 1002..1127 × 1369..1403 → 126 × 35 */
.btn--sm { height: 35px; padding: 0 14px; font-size: 12.5px; gap: 7px; }
.btn--block { width: 100%; height: 44px; border-radius: var(--r-md); }

.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- pill / badge / chip ---------- */

/* Reference pills are a borderless --surface fill (interior samples #f7f7f7 on a
   #ffffff page, no darker outline) 36px tall; the header language pill measures
   749..831 × 14..49 ⇒ 83 × 36. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid transparent;
  color: var(--text);
  font: 500 12.5px/1 var(--ff-body);
  white-space: nowrap;
}
button.pill { cursor: pointer; transition: border-color var(--t), background var(--t); }
button.pill:hover { border-color: var(--border-strong); }
/* label-only pills (the "built for every level" row): reference boxes
   121..265 / 276..494 / … fit 13.5px with a 10px gutter, rms 2.0px, gap 10 */
.pill--lg { height: 38px; padding: 0 10px; font-size: 13.5px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font: 500 13px/1 var(--ff-body);
  white-space: nowrap;
}
.badge--ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.badge--lg { height: 34px; padding: 0 15px; font-size: 13.5px; }

/* reference chip: white fill on the card's --surface, box 71..223 (153px) =
   border + 9 + icon 14 + 5 + label + 9 + border, green check icon then label
   (see _crops/chip-row.png) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text-2);
  font: 400 var(--fs-xs) / 1 var(--ff-body);
  white-space: nowrap;
}
.chip svg { color: var(--ok); }
/* small screens: let multi-word (esp. Arabic) chip labels wrap inside the pill */
@media (max-width: 640px) {
  .chip {
    white-space: normal;
    height: auto;
    min-height: 30px;
    padding-block: 5px;
    line-height: 1.35;
  }
}

/* ---------- card / icon tile ---------- */

/* card border x40 → first ink x68 ⇒ 28px padding */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card--md { border-radius: var(--r-md); padding: 24px; }
.card--solid { background: var(--surface-solid); box-shadow: var(--sh-card); }

/* icon tile: probe at x90 gives rows 2474..2517 ⇒ 44 × 44 with a 24px glyph */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.num-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font: 600 12px/1 var(--ff-body); flex: none;
}

/* ---------- section head (shared: home, features, pricing, about, faq…) ---------- */

.sec-head { text-align: center; margin-bottom: 52px; }
.sec-head h2 { max-width: 700px; margin: 16px auto 0; }
.sec-head .lead { max-width: 740px; margin: 18px auto 0; }
.sec-head--steps h2 { font: 400 26px/1.35 var(--ff-head); letter-spacing: -.01em; max-width: 640px; }
.sec-head--steps .lead { max-width: 720px; }

/* display-scale section head (features cycles/formats, download heads, ink ≈52px @ pitch ≈62) */
.sec-head--display h2 { font-size: 56px; line-height: 1.12; letter-spacing: -.02em; max-width: 760px; }
@media (max-width: 1023px) {
  .sec-head--display h2 { font-size: 40px; }
}

/* ---------- testimonial quotes (home §11, testimonials) ---------- */

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.quotes__col { display: flex; flex-direction: column; gap: 20px; }
.quotes__col:nth-child(2) { margin-top: 26px; }
.quote { padding: 22px; }
.quote__mark { font: 800 22px/1 var(--ff-head); color: var(--accent); }
.quote p { margin-top: 10px; font-size: var(--fs-sm); line-height: 1.7; color: var(--text-2); }
.quote__who { display: flex; align-items: center; gap: 11px; margin-top: 18px; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--grad-135); color: #fff;
  font: 600 11.5px/1 var(--ff-body); letter-spacing: .02em;
}
.quote__who b { display: block; font: 600 13.5px/1.3 var(--ff-body); }
.quote__who span { display: block; font-size: 13px; color: var(--muted); }
@media (max-width: 1023px) { .quotes { grid-template-columns: 1fr 1fr; } .quotes__col:nth-child(2) { margin-top: 0; } }
@media (max-width: 700px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- trust pill bar (home hero/plans, download) ---------- */

.trust {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px;
  max-width: fit-content; margin: 40px auto 0; min-height: 47px; padding: 10px 22px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 24px;
  font-size: var(--fs-sm); color: var(--text-2);
}
.trust li { display: flex; align-items: center; gap: 9px; }
.trust svg { color: var(--accent); }

/* ---------- boxed CTA (features, pricing, download, about, faq, testimonials, legal) ---------- */

.cta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 56px 40px;
  text-align: center;
  max-width: 860px;
  margin-inline: auto;
  box-shadow: var(--sh-card);
}
.cta-box .h2 { margin-bottom: 16px; }
.cta-box p {
  max-width: 580px;
  margin-inline: auto;
  margin-bottom: 28px;
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
}
.cta-box__btns {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
}
@media (max-width: 767px) {
  .cta-box { padding: 36px 20px; }
}

/* ---------- form field ---------- */

.field { display: block; }
.field + .field { margin-top: 16px; }
.field > label { display: block; font: 600 13px/1.4 var(--ff-body); margin-bottom: 7px; }

.field input,
.field select {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border-radius: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font: 400 14px/1 var(--ff-body);
  transition: border-color var(--t), box-shadow var(--t);
}
.field select {
  appearance: none;
  padding-inline-end: 34px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 17px, calc(100% - 13px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.field input::placeholder { color: var(--muted); }
.field input:focus-visible,
.field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--danger); }

.field-err {
  display: none;
  margin-top: 6px;
  color: var(--danger);
  font: 500 var(--fs-xs) / 1.4 var(--ff-body);
}
.field-err.is-on { display: block; }

.check-line { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; }
.check-line input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check-line label { font: 400 13.5px/1.5 var(--ff-body); color: var(--text-2); }
.check-line a { color: var(--accent); text-decoration: underline; }
/* ---------- check row (pricing) ---------- */

.check-row { display: flex; align-items: flex-start; gap: 10px; font: 400 14px/1.5 var(--ff-body); }
.check-list { display: flex; flex-direction: column; gap: 13px; }
.check-row .tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); flex: none; margin-top: 2px;
}

/* ---------- accordion ---------- */

.accordion { display: flex; flex-direction: column; gap: 10px; }
.accordion__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.accordion__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  width: 100%; padding: 22px 24px;
  font: 500 15px/1.45 var(--ff-body); text-align: start; color: var(--text);
}
.accordion__sign {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); flex: none;
  transition: transform var(--t);
}
.accordion__btn[aria-expanded="true"] .accordion__sign { transform: rotate(45deg); }
.accordion__panel { padding: 0 24px 22px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.68; max-width: 700px; }
.accordion__panel[hidden] { display: none; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
/* brand tile ink 32..63 × rows 16..47 ⇒ 32px tile at x32; wordmark ink 66px ⇒ 18px;
   brand ends 143 and the nav box starts ≈170 ⇒ 27px gap */
.site-header__in {
  display: flex; align-items: center; gap: 27px;
  height: 100%; padding-inline: 32px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 18px/1 var(--ff-head); letter-spacing: -.02em; }
.brand__tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--grad-135); color: #fff; flex: none;
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { font: 500 12.6px/1 var(--ff-body); color: var(--text-2); transition: color var(--t); }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }

/* theme toggle */
/* theme toggle: track 843..904 × 16..48 ⇒ 62 × 32 on the --surface fill, with a
   white round thumb behind the active icon (left half samples #ffffff, right #f8f8f8) */
.theme-toggle { display: inline-flex; align-items: center; gap: 2px; width: 62px; height: 32px; padding: 0 3px; justify-content: center; }
.theme-toggle__i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  color: var(--muted); transition: color var(--t), background var(--t);
}
.theme-toggle__i.is-on { background: var(--surface-solid); color: var(--text); box-shadow: var(--sh-card); }

/* language menu */
.lang { position: relative; }
.lang__menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  min-width: 168px; padding: 6px;
  background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: 0 14px 40px rgba(0, 0, 0, .14);
  z-index: 80;
}
.lang__menu[hidden] { display: none; }
.lang__menu button {
  display: block; width: 100%; padding: 9px 12px; border-radius: var(--r-sm);
  font: 500 13.5px/1 var(--ff-body); color: var(--text); text-align: start;
}
.lang__menu button:hover { background: var(--surface); }
.lang__menu button[aria-current="true"] { background: var(--accent-soft); color: var(--accent); }

/* burger + mobile sheet */
.burger { display: none; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; align-items: center; justify-content: center; color: var(--text); }
.nav-sheet {
  position: fixed; inset: var(--nav-h) 0 0; z-index: 55;
  background: var(--bg); padding: 22px var(--pad) 40px; overflow-y: auto;
}
.nav-sheet[hidden] { display: none; }
.nav-sheet a.sheet-link { display: block; padding: 14px 0; font: 500 17px/1 var(--ff-body); border-bottom: 1px solid var(--border); }
.nav-sheet__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }

@media (max-width: 1023px) {
  .site-header__in { padding-inline: 20px; gap: 12px; }
  .nav, .header-actions .lang, .header-actions .theme-toggle, .header-actions .btn--login { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 520px) {
  .header-actions .btn--dl span { display: none; }
  .header-actions .btn--dl { padding: 0 12px; }
}
/* ---------- footer (sleek pitch-black footer) ---------- */

.site-footer {
  background: #000000;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
/* The footer runs on a wider column than the sections: reference ink spans
   x32..1167 in a 1200px shot ⇒ 32px gutter, 1136px content. */
.site-footer > .container {
  max-width: calc(var(--container) + 80px);
  padding-inline: 32px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr .7fr .7fr .8fr;
  gap: 32px;
  padding-block: 80px 56px;
}
.site-footer .brand {
  color: #ffffff;
}
.site-footer__about {
  max-width: 330px;
  margin-top: 16px;
  color: #8c8c9a;
  font-size: var(--fs-sm);
  line-height: var(--lh-sm);
}
.site-footer__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.site-footer .theme-toggle,
.site-footer .lang > button.pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.site-footer h3 {
  font: 600 13.5px/1 var(--ff-body);
  letter-spacing: 0;
  margin-bottom: 16px;
  color: #ffffff;
}
.site-footer li + li {
  margin-top: 13px;
}
.site-footer li a {
  font-size: var(--fs-sm);
  color: #8c8c9a;
  transition: color var(--t);
}
.site-footer li a:hover {
  color: #ffffff;
}
.site-footer .hr {
  border-color: rgba(255, 255, 255, 0.08);
}
.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 24px 32px;
  font-size: var(--fs-sm);
  color: #6b6b76;
}
.site-footer__bottom .muted {
  color: #6b6b76;
}
.site-footer__socials {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.site-footer__socials a {
  color: #8c8c9a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--t), transform var(--t);
}
.site-footer__socials a:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

@media (max-width: 1023px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-block: 48px 20px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- gradient section above footer (Image 04) ---------- */
.section--cta-gradient {
  position: relative;
  isolation: isolate;
  padding-block: 96px 110px;
  background: radial-gradient(circle 800px at 50% 100%, rgba(139, 92, 246, 0.18) 0%, rgba(59, 130, 246, 0.10) 45%, transparent 75%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  overflow: hidden;
}
[data-theme="dark"] .section--cta-gradient {
  background: radial-gradient(circle 800px at 50% 100%, rgba(139, 92, 246, 0.28) 0%, rgba(59, 130, 246, 0.14) 45%, transparent 75%),
              linear-gradient(180deg, var(--bg) 0%, #07070a 100%);
}
.section--cta-gradient .cta {
  position: relative;
  z-index: 2;
  text-align: center;
}
.section--cta-gradient .cta h2 {
  max-width: 680px;
  margin: 16px auto 0;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}
.section--cta-gradient .cta .lead {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--text-2);
}
.section--cta-gradient .cta__btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.btn--dark {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}
.btn--dark:hover {
  background: #1f1f23;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 13.5px/1 var(--ff-body);
  color: var(--text);
  transition: gap var(--t), color var(--t);
}
.btn-link:hover {
  color: var(--accent);
  gap: 9px;
}

/* ---------- testimonial fade effect (Image 02) ---------- */
.quotes-fade-wrap {
  position: relative;
  overflow: hidden;
  padding-block: 24px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, transparent 100%);
}

/* ---------- black card for Most Popular pricing (Image 03) ---------- */
.plan--dark {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35) !important;
  transform: translateY(-8px);
}
.plan--dark .plan__top h3 { color: #ffffff !important; }
.plan--dark .plan__tag {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(168, 85, 247, 0.5) !important;
  color: #d8b4fe !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.2);
}
.plan--dark .plan__price b { color: #ffffff !important; }
.plan--dark .plan__price div span { color: #f1f5f9 !important; }
.plan--dark .plan__price div small { color: #94a3b8 !important; }
.plan--dark .plan__blurb { color: #94a3b8 !important; }
.plan--dark .btn--white {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
  font-weight: 600 !important;
}
.plan--dark .btn--white:hover {
  background: #f1f5f9 !important;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.24) !important;
}
.plan--dark .hr { border-color: rgba(255, 255, 255, 0.12) !important; }
.plan--dark .check-row { color: #e2e8f0 !important; }
.plan--dark .check-row .tick {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

/* ---------- 4-item feature row under hero mock (Image 01) ---------- */
.hero-feat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 48px;
  text-align: start;
}
.hero-feat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-feat-item .icon-tile-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  margin-bottom: 14px;
}
.hero-feat-item h3 {
  font: 600 15px/1.35 var(--ff-head);
  color: var(--text);
  margin-bottom: 8px;
}
.hero-feat-item p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 12px;
  flex: 1;
}
.hero-feat-item .feat-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 500 12.5px/1 var(--ff-body);
  color: var(--text);
  transition: gap var(--t), color var(--t);
}
.hero-feat-item .feat-link:hover {
  color: var(--accent);
  gap: 8px;
}
@media (max-width: 1023px) {
  .hero-feat-row { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
}
@media (max-width: 600px) {
  .hero-feat-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Motion layer — scroll reveals, hover lift, gradient sweep, active nav.
   Pure enhancement: hidden states only exist under html.motion-ok, which
   ui.js sets, so visitors without JS always see the full page. Users with
   prefers-reduced-motion get everything instantly (ui.js skips observing).
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- scroll reveal (targets applied programmatically by ui.js) ---------- */

html.motion-ok [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .65s var(--ease-out),
    transform .65s var(--ease-out);
  transition-delay: var(--rd, 0ms);
}
html.motion-ok [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- card lift on hover ---------- */

.card, .plan, .dl-card, .skill, .step-card, .req-card,
.rule-card, .teacher-card, .promise-box {
  transition:
    transform .3s var(--ease-out),
    box-shadow .3s var(--ease-out),
    border-color .3s var(--ease-out);
}
.card:hover, .plan:hover, .dl-card:hover, .skill:hover, .step-card:hover,
.req-card:hover, .rule-card:hover, .teacher-card:hover, .promise-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lift);
  border-color: var(--border-strong);
}
/* icon tile answers the lift */
.card :is(.icon-tile), .plan :is(.icon-tile), .dl-card :is(.icon-tile),
.skill :is(.icon-tile), .step-card :is(.icon-tile), .req-card :is(.icon-tile),
.rule-card :is(.icon-tile), .teacher-card :is(.icon-tile) {
  transition: transform .3s var(--ease-out);
}
.card:hover :is(.icon-tile), .plan:hover :is(.icon-tile), .dl-card:hover :is(.icon-tile),
.skill:hover :is(.icon-tile), .step-card:hover :is(.icon-tile), .req-card:hover :is(.icon-tile),
.rule-card:hover :is(.icon-tile), .teacher-card:hover :is(.icon-tile) {
  transform: translateY(-2px) scale(1.05);
}
/* popular plan keeps its accent glow and gains a touch more height */
.plan--pop:hover { box-shadow: var(--sh-pop); }

/* ---------- buttons: gradient sweep + press feedback ---------- */

.btn--grad {
  background-size: 170% 100%;
  background-position: 0% 50%;
  transition: background-position .5s var(--ease-out), box-shadow var(--t),
              color var(--t), transform var(--t);
}
.btn--grad:hover { background-position: 92% 50%; }
.btn--grad svg { transition: transform .25s var(--ease-out); }
.btn--grad:hover svg { transform: translateX(2px); }

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: 80ms; }

/* ---------- nav: animated underline + current page marker ---------- */

.nav a {
  position: relative;
  padding-block: 6px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .28s var(--ease-out);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---------- header elevation once the page scrolls ---------- */

.site-header {
  transition: box-shadow .3s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(17, 17, 26, .07);
}

/* ---------- hero entrance (children rise in on first paint) ---------- */

@keyframes mk-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
html.motion-ok .mk-enter > * {
  animation: mk-rise .7s var(--ease-out) backwards;
}
html.motion-ok .mk-enter > :nth-child(1) { animation-delay: .05s; }
html.motion-ok .mk-enter > :nth-child(2) { animation-delay: .14s; }
html.motion-ok .mk-enter > :nth-child(3) { animation-delay: .23s; }
html.motion-ok .mk-enter > :nth-child(4) { animation-delay: .32s; }
html.motion-ok .mk-enter > :nth-child(5) { animation-delay: .41s; }
html.motion-ok .mk-enter > :nth-child(n+6) { animation-delay: .5s; }


/* ==========================================================================
   Floating app window (moved from the home hero to /features) + its live
   status pill, proof chips and shimmer sweep. Animations gated behind
   html.motion-ok; without JS or with reduced motion everything is static.
   ==========================================================================
   */

.mock-zone { position: relative; }

.mock {
  position: relative;
  margin-top: 52px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-mock);
  overflow: hidden;
  text-align: start;
}

.mock__ribbon {
  position: absolute; z-index: 0; pointer-events: none;
  width: 460px; height: 190px; border-radius: 50%;
  background: linear-gradient(120deg, #0271cd, #8b5cf6);
  filter: blur(38px); opacity: .34;
}
.mock__ribbon--a { inset-inline-start: -140px; bottom: -110px; transform: rotate(-14deg); }
.mock__ribbon--b { inset-inline-end: -150px; top: -120px; transform: rotate(16deg); }
.mock__bar {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  height: 42px; padding-inline: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #18181c;
  color: #a1a1aa;
}
.mock__dots { display: flex; gap: 7px; }
.mock__dots i { width: 10px; height: 10px; border-radius: 50%; }
.mock__search {
  display: flex; align-items: center; gap: 8px;
  height: 26px; padding: 0 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 11.5px; color: #a1a1aa;
  width: 140px;
}

.mock__body {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 52px 210px 1fr;
}

/* Far Left Icon Rail */
.mock__rail {
  background: #09090d;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
}
.mock__rail-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.mock__rail-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: #71717a;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--t);
}
.mock__rail-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.06); }
.mock__rail-btn.is-active { background: rgba(255, 255, 255, 0.14); color: #ffffff; }
.mock__rail-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #27272a;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

/* Secondary Nested Sidebar */
.mock__side {
  background: var(--surface-solid);
  border-inline-end: 1px solid var(--border);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}
.mock__nav-group { display: flex; flex-direction: column; gap: 2px; }
.mock__group-title {
  display: flex; align-items: center; gap: 8px;
  font: 700 13px/1 var(--ff-body); color: var(--text);
  padding: 6px 8px; margin-bottom: 4px;
}
.mock__group-icon { display: flex; align-items: center; color: var(--accent); }
.mock__nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  font-size: 12.5px; color: var(--text-2);
  cursor: pointer; transition: background var(--t);
}
.mock__nav-item:hover { background: var(--surface); color: var(--text); }
.mock__nav-item.is-active { background: var(--surface); color: var(--text); font-weight: 600; }

.mock__nav-bottom-tree {
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.mock__tree-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  font-size: 12.5px; color: var(--text-2);
  cursor: pointer;
}
.mock__tree-item:hover { background: var(--surface); color: var(--text); }

/* Main Content Workspace */
.mock__main {
  background: var(--bg);
  padding: 22px 28px 28px;
  min-width: 0;
}
.mock__crumb-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--muted);
  margin-bottom: 12px;
}
.mock__crumb b { color: var(--text); font-weight: 600; }
.mock__panel-btn, .mock__icon-btn {
  background: transparent; border: 0;
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--t);
}
.mock__panel-btn:hover, .mock__icon-btn:hover { color: var(--text); }

.mock__main-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.mock__main-head h2 {
  font: 800 24px/1.2 var(--ff-head);
  color: var(--text);
  letter-spacing: -0.02em;
}

.mock__group { margin-top: 18px; }
.mock__group-label {
  font: 700 11.5px/1 var(--ff-body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}
.mock__task-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.mock__task-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mock__check { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex-shrink: 0; }
.mock__task-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock__task-name--done { color: var(--muted); text-decoration: line-through; }
.mock__task-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.mock__task-date { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); }
.mock__badge-status { padding: 2px 8px; border-radius: 4px; font: 600 11px/1.4 var(--ff-body); }
.mock__badge-status--done { background: #dcfce7; color: #15803d; }
[data-theme="dark"] .mock__badge-status--done { background: rgba(34, 197, 94, 0.16); color: #4ade80; }
.mock__badge-status--progress { background: #fef3c7; color: #b45309; }
[data-theme="dark"] .mock__badge-status--progress { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.mock__task-avatar {
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface);
}

@media (max-width: 900px) {
  .mock__body { grid-template-columns: 1fr; }
  .mock__side { display: none; }
  .mock__export { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 767px) {
  .mock { margin-top: 44px; }
  .mock__main { padding: 16px; }
}

/* AI status pill — cycles through generation steps over the mock */
.ai-pill {
  position: absolute; z-index: 6; top: -16px; inset-inline-end: 26px;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 15px; border-radius: 999px;
  background: #18181c; color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 12px 32px rgba(24, 24, 28, .35);
  font: 500 12.5px/1 var(--ff-body);
}
.ai-pill > svg { color: #a78bfa; flex: none; }
.ai-pill__dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .5);
}
html.motion-ok .ai-pill__dot { animation: dotPulse 2s ease-out infinite; }
@keyframes dotPulse { 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.ai-pill__lines { display: grid; text-align: start; min-width: 235px; }
.ai-pill__lines span { grid-area: 1 / 1; white-space: nowrap; opacity: 0; }
.ai-pill__lines span:first-child { opacity: 1; } /* static fallback */
html.motion-ok .ai-pill__lines span { animation: aiLine 10.4s ease-in-out infinite backwards; }
html.motion-ok .ai-pill__lines span:nth-child(1) { animation-delay: 0s; }
html.motion-ok .ai-pill__lines span:nth-child(2) { animation-delay: 2.6s; }
html.motion-ok .ai-pill__lines span:nth-child(3) { animation-delay: 5.2s; }
html.motion-ok .ai-pill__lines span:nth-child(4) { animation-delay: 7.8s; }
@keyframes aiLine { 0% { opacity: 0; } 3% { opacity: 1; } 21% { opacity: 1; } 25% { opacity: 0; } 100% { opacity: 0; } }

/* floating proof chips on the mock corners */
.float-chip {
  position: absolute; z-index: 6;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: 0 14px 34px rgba(24, 24, 28, .16);
  font: 500 13px/1.3 var(--ff-body);
}
.float-chip__ic {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-border);
}
.float-chip--tl { top: -18px; inset-inline-start: 28px; transform: rotate(-2deg); }
.float-chip--br { bottom: -20px; inset-inline-end: 32px; transform: rotate(2deg); }
html.motion-ok .float-chip--tl { animation: chipFloatA 6s ease-in-out infinite alternate; }
html.motion-ok .float-chip--br { animation: chipFloatB 7.5s ease-in-out infinite alternate; }
/* `translate` keeps the base rotate() intact */
@keyframes chipFloatA { from { translate: 0 0; } to { translate: 0 9px; } }
@keyframes chipFloatB { from { translate: 0 0; } to { translate: 0 -8px; } }

/* shimmer sweep travelling down the task list */
.mock__main { position: relative; }
html.motion-ok .mock__main { overflow: hidden; }
html.motion-ok .mock__main::after {
  content: "";
  position: absolute; inset-inline: 0; top: 0; height: 34%;
  background: linear-gradient(180deg, transparent, rgba(139, 92, 246, .09) 55%, transparent);
  animation: mockSweep 7.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes mockSweep { 0% { transform: translateY(-130%); opacity: 0; } 12% { opacity: 1; } 82% { opacity: 1; } 100% { transform: translateY(330%); opacity: 0; } }

@media (max-width: 900px) {
  /* keep phones clean: no corner chips, tighter pill */
  .float-chip { display: none; }
  .ai-pill { inset-inline-end: 14px; min-width: 0; }
  .ai-pill__lines { min-width: 190px; font-size: 11.5px; }
}
@media (max-width: 480px) {
  .ai-pill { max-width: calc(100% - 24px); }
  .ai-pill__lines { min-width: 0; }
  .ai-pill__lines span { white-space: normal; }
}
