/* ============================================================
   BackTheme — Mockups
   Load order: 1 tokens > 2 base > 3 components > [4 mockups] > 5 sections

   Every product visual on the site is built here in CSS. There are no
   screenshots and no image assets, which is why the visuals re-theme
   with the colour mode, stay sharp at any pixel density and cost no
   extra requests.

   Contents
     1. App window        .backtheme-mock
     2. Skeleton bars     .backtheme-skeleton
     3. Floating chips    .backtheme-float-card
     4. Code window       .backtheme-code
     5. Phone             .backtheme-phone
     6. Technology wall   .backtheme-tech-wall
     7. Product screens   .backtheme-screen   (CricoScore / BongoKhata)
     8. Storefront        .backtheme-store, .backtheme-thumb
     9. Entrance animations  .backtheme-animate-*
    10. Portfolio previews  .backtheme-web-preview, .backtheme-phone-preview

   The .backtheme-animate-* classes stay idle until `.is-visible` lands
   on the owning .backtheme-reveal ancestor, so a screen plays once when
   its card scrolls in rather than looping off-screen forever.
   ============================================================ */

/* ------------------------------------------------------------
   App window — the dashboard mock that anchors the hero
   ------------------------------------------------------------ */

.backtheme-mock {
  position: relative;
  width: 100%;
  background: var(--backtheme-surface-1);
  border: 1px solid var(--backtheme-line-strong);
  border-radius: var(--backtheme-r-lg);
  box-shadow: var(--backtheme-shadow-xl);
  overflow: hidden;
  user-select: none;
}

.backtheme-mock::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(170deg, light-dark(rgba(255,255,255,.55), rgba(255,255,255,.05)) 0%, transparent 38%);
}

/* Title bar */
.backtheme-mock__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding-inline: 13px;
  background: var(--backtheme-surface-2);
  border-bottom: 1px solid var(--backtheme-line);
}

.backtheme-mock__dots { display: flex; gap: 6px; flex: none; }

.backtheme-mock__dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--backtheme-surface-4);
}

.backtheme-mock__pill {
  height: 18px;
  flex: 1;
  max-width: 190px;
  margin-inline: auto;
  border-radius: var(--backtheme-r-full);
  background: var(--backtheme-surface-3);
}

.backtheme-mock__body { display: grid; grid-template-columns: 132px 1fr; min-height: 300px; }

@media (max-width: 560px) {
  .backtheme-mock__body { grid-template-columns: 74px 1fr; min-height: 250px; }
}

/* Sidebar */
.backtheme-mock__side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 13px 11px;
  border-right: 1px solid var(--backtheme-line);
  background: var(--backtheme-surface-2);
}

.backtheme-mock__brand { display: flex; align-items: center; gap: 7px; }
.backtheme-mock__brand i { width: 16px; height: 16px; border-radius: 5px; background: var(--backtheme-grad-brand); flex: none; }
.backtheme-mock__nav { display: flex; flex-direction: column; gap: 4px; }

.backtheme-mock__nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border-radius: 7px;
}

.backtheme-mock__nav-item i { width: 11px; height: 11px; border-radius: 3px; background: var(--backtheme-surface-4); flex: none; }
.backtheme-mock__nav-item.is-active { background: light-dark(rgba(0,113,189,.09), rgba(0,163,255,.11)); }
.backtheme-mock__nav-item.is-active i { background: var(--backtheme-brand-500); }
.backtheme-mock__nav-item.is-active b { background: var(--backtheme-brand-ink); opacity: .55; }

/* Generic skeleton bar */
.backtheme-skeleton {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: var(--backtheme-surface-4);
  width: var(--w, 100%);
}

.backtheme-skeleton--small { height: 5px; }
.backtheme-skeleton--large { height: 10px; }
.backtheme-skeleton--brand { background: var(--backtheme-grad-brand); }
.backtheme-skeleton--soft { background: var(--backtheme-surface-3); }

/* Main panel */
.backtheme-mock__main { display: flex; flex-direction: column; gap: 11px; padding: 14px; }
.backtheme-mock__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.backtheme-mock__cta { height: 22px; width: 62px; border-radius: var(--backtheme-r-full); background: var(--backtheme-grad-brand); flex: none; }
.backtheme-mock__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.backtheme-mock__stat {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid var(--backtheme-line);
  background: var(--backtheme-surface-2);
}

.backtheme-mock__stat:first-child {
  border-color: var(--backtheme-line-brand);
  background: light-dark(rgba(0,113,189,.05), rgba(0,163,255,.06));
}

@media (max-width: 560px) { .backtheme-mock__stats { grid-template-columns: repeat(2, 1fr); } .backtheme-mock__stat:last-child { display: none; } }

/* Chart panel */
.backtheme-mock__chart {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 9px;
  border: 1px solid var(--backtheme-line);
  background: var(--backtheme-surface-2);
  min-height: 112px;
}

.backtheme-mock__bars { flex: 1; display: flex; align-items: flex-end; gap: 6px; min-height: 66px; }

.backtheme-mock__column {
  flex: 1;
  height: var(--h, 50%);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(to top, light-dark(rgba(0,113,189,.18), rgba(0,163,255,.16)), light-dark(rgba(0,113,189,.5), rgba(0,163,255,.55)));
  transform-origin: bottom;
  animation: mock-grow 900ms var(--backtheme-ease-out) backwards;
  animation-delay: calc(var(--n, 0) * 55ms + 250ms);
}

.backtheme-mock__column:nth-last-child(-n+2) {
  background: var(--backtheme-grad-brand);
  box-shadow: 0 0 18px -4px light-dark(rgba(0,113,189,.5), rgba(0,163,255,.55));
}

@keyframes mock-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) { .backtheme-mock__column { animation: none; } }

/* ------------------------------------------------------------
   Floating chips that overlap the window edge
   ------------------------------------------------------------ */

.backtheme-float-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  background: var(--backtheme-glass-strong);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid var(--backtheme-line-strong);
  border-radius: var(--backtheme-r-md);
  box-shadow: var(--backtheme-shadow-lg);
  font-size: var(--backtheme-step--2);
  font-weight: 600;
  color: var(--backtheme-fg);
  white-space: nowrap;
  animation: float-y 5s ease-in-out infinite;
}

.backtheme-float-card svg { width: 15px; height: 15px; flex: none; color: var(--backtheme-brand-ink); }
.backtheme-float-card em { font-style: normal; color: var(--backtheme-fg-subtle); font-weight: 500; }

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) { .backtheme-float-card { animation: none; } }

/* ------------------------------------------------------------
   Code window — used beside the custom-software card
   ------------------------------------------------------------ */

/* It sits inside a card, so it uses the same surfaces as the card
   rather than a hard-coded editor black that reads as a foreign slab
   in light mode. Height fills the card so it lines up with the list. */
.backtheme-code {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--backtheme-surface-2);
  border: 1px solid var(--backtheme-line);
  border-radius: var(--backtheme-r-md);
  overflow: hidden;
  font-family: var(--backtheme-font-mono);
  font-size: 11.5px;
  line-height: 1.95;
}

.backtheme-code__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  flex: none;
  padding-inline: 11px;
  background: var(--backtheme-surface-3);
  border-bottom: 1px solid var(--backtheme-line);
}

.backtheme-code__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--backtheme-surface-4); }
.backtheme-code__bar span { margin-left: 5px; font-size: 10px; color: var(--backtheme-fg-subtle); letter-spacing: .02em; }

.backtheme-code__body { flex: 1; padding: 11px 13px; display: grid; gap: 1px; align-content: start; }
.backtheme-code__line { display: flex; gap: 11px; white-space: nowrap; }
.backtheme-code__number { color: var(--backtheme-fg-subtle); flex: none; width: 12px; text-align: right; opacity: .7; }
.backtheme-code__content { color: var(--backtheme-fg); }

/* Syntax colours, drawn from the same tokens as the rest of the page. */
.backtheme-code__keyword { color: light-dark(#7A3FD6, var(--backtheme-accent-300)); }  /* keyword */
.backtheme-code__function { color: var(--backtheme-brand-ink); }                        /* function */
.backtheme-code__string { color: var(--backtheme-success); }                          /* string   */
.backtheme-code__comment { color: var(--backtheme-fg-subtle); }                        /* comment  */

/* ------------------------------------------------------------
   Phone mockup — the two Android products
   ------------------------------------------------------------ */

.backtheme-phone {
  position: relative;
  width: min(212px, 62vw);
  margin-inline: auto;
  aspect-ratio: 9 / 18.2;
  padding: 7px;
  border-radius: 30px;
  background: linear-gradient(160deg,
    light-dark(#D7DEE9, var(--backtheme-surface-4)),
    light-dark(#AEB9C9, var(--backtheme-surface-2)));
  box-shadow: var(--backtheme-shadow-xl), inset 0 0 0 1px light-dark(rgba(255,255,255,.7), rgba(255,255,255,.08));
  user-select: none;
}

.backtheme-phone__screen {
  position: relative;
  height: 100%;
  border-radius: 24px;
  background: var(--backtheme-surface-1);
  border: 1px solid var(--backtheme-line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 11px 11px;
}

.backtheme-phone__notch {
  position: absolute;
  top: 7px; left: 50%;
  transform: translateX(-50%);
  width: 46px; height: 5px;
  border-radius: var(--backtheme-r-full);
  background: var(--backtheme-surface-4);
}

.backtheme-phone__hero {
  border-radius: 10px;
  padding: 10px;
  background: var(--backtheme-grad-brand);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.backtheme-phone__hero .backtheme-skeleton { background: light-dark(rgba(255,255,255,.55), rgba(7,8,10,.35)); }
.backtheme-phone__hero .backtheme-skeleton--large { background: light-dark(rgba(255,255,255,.9), rgba(7,8,10,.62)); }

.backtheme-phone__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: var(--backtheme-surface-2);
  border: 1px solid var(--backtheme-line);
}

.backtheme-phone__row i { width: 18px; height: 18px; border-radius: 6px; background: var(--backtheme-surface-4); flex: none; }
.backtheme-phone__row div { flex: 1; display: grid; gap: 4px; }
.backtheme-phone__tabs { margin-top: auto; display: flex; gap: 6px; padding-top: 7px; border-top: 1px solid var(--backtheme-line); }
.backtheme-phone__tabs i { flex: 1; height: 5px; border-radius: 3px; background: var(--backtheme-surface-4); }
.backtheme-phone__tabs i:first-child { background: var(--backtheme-brand-500); }

/* ------------------------------------------------------------
   Technology wall
   A capability strip that fills the slot a customer logo wall
   would occupy. BackTheme has no client logos to show, so this
   says what the team builds with instead of faking social proof.
   ------------------------------------------------------------ */

.backtheme-tech-wall { display: flex; flex-direction: column; gap: var(--backtheme-space-m); align-items: center; }

.backtheme-tech-wall__label {
  font-family: var(--backtheme-font-mono);
  font-size: var(--backtheme-step--2);
  letter-spacing: var(--backtheme-tracking-widest);
  text-transform: uppercase;
  color: var(--backtheme-fg-subtle);
}

.backtheme-tech-wall__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--backtheme-space-s) var(--backtheme-space-xl);
}

.backtheme-tech {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: var(--backtheme-step-1);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--backtheme-fg-subtle);
  transition: color var(--backtheme-dur-base) var(--backtheme-ease-out), transform var(--backtheme-dur-base) var(--backtheme-ease-out);
}

.backtheme-tech svg { width: 20px; height: 20px; flex: none; }
.backtheme-tech:hover { color: var(--backtheme-fg); transform: translateY(-2px); }

/* ============================================================
   Product-specific screens

   Generic skeleton bars said "an app" but not "this app". These
   screens show what each product actually does. They animate once,
   when their card scrolls into view (.backtheme-reveal -> .is-visible), so
   nothing runs perpetually off-screen.
   ============================================================ */

.backtheme-screen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  font-family: var(--backtheme-font-sans);
  letter-spacing: -0.01em;
}

.backtheme-screen__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.backtheme-screen__key { font-size: 8px; font-weight: 500; color: var(--backtheme-fg-subtle); text-transform: uppercase; letter-spacing: .1em; }
.backtheme-screen__value { font-size: 9px; font-weight: 600; color: var(--backtheme-fg); }

/* Live pill with a slow pulse — the one thing that loops. */
.backtheme-screen__live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--backtheme-r-full);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .09em;
  color: var(--backtheme-danger);
  background: light-dark(rgba(196,52,74,.1), rgba(255,90,90,.12));
}

.backtheme-screen__live i { width: 5px; height: 5px; border-radius: 50%; background: var(--backtheme-danger); animation: blink 1.8s ease-in-out infinite; }

@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* Hero panel inside a product screen */
.backtheme-screen__panel {
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--backtheme-grad-brand);
  color: var(--backtheme-on-brand);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.backtheme-screen__panel-key { font-size: 7.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .72; }
.backtheme-screen__figure { font-size: 21px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; }
.backtheme-screen__subtext { font-size: 8px; font-weight: 500; opacity: .8; }

/* Ball-by-ball strip */
.backtheme-screen__balls { display: flex; gap: 4px; }

.backtheme-screen__ball {
  width: 19px; height: 19px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 700;
  color: var(--backtheme-fg-muted);
  background: var(--backtheme-surface-3);
}

.backtheme-screen__ball--run { color: var(--backtheme-brand-ink); background: light-dark(rgba(0,113,189,.12), rgba(0,163,255,.16)); }
.backtheme-screen__ball--six { color: var(--backtheme-on-brand); background: var(--backtheme-grad-brand); }
.backtheme-screen__ball--out { color: var(--backtheme-danger); background: light-dark(rgba(196,52,74,.12), rgba(255,90,90,.15)); }

/* Line items — batters, transactions */
.backtheme-screen__item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border-radius: 7px;
  background: var(--backtheme-surface-2);
  border: 1px solid var(--backtheme-line);
}

.backtheme-screen__avatar { width: 16px; height: 16px; flex: none; border-radius: 50%; background: var(--backtheme-surface-4); }

.backtheme-screen__io {
  width: 16px; height: 16px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.backtheme-screen__io--in  { color: var(--backtheme-success); background: var(--backtheme-success-bg); }
.backtheme-screen__io--out { color: var(--backtheme-danger);  background: light-dark(rgba(196,52,74,.1), rgba(255,90,90,.12)); }

.backtheme-screen__name { flex: 1; font-size: 8.5px; font-weight: 600; color: var(--backtheme-fg); }
.backtheme-screen__amount  { font-size: 8.5px; font-weight: 700; color: var(--backtheme-fg); }
.backtheme-screen__amount--in  { color: var(--backtheme-success); }
.backtheme-screen__amount--out { color: var(--backtheme-danger); }

/* Mini bar chart inside a product screen */
.backtheme-screen__bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: auto; }

.backtheme-screen__bar {
  flex: 1;
  height: var(--h, 40%);
  border-radius: 2px;
  background: light-dark(rgba(0,113,189,.28), rgba(0,163,255,.3));
  transform-origin: bottom;
}

.backtheme-screen__bar--on { background: var(--backtheme-grad-brand); }

/* ---- Marketplace storefront ----
   A listing, not a tile wall. At this scale a row carries a
   thumbnail, a real product name, its category and its price
   legibly — a 3-up grid of tiles could only fit a price, which is
   what made the earlier version unreadable. */

.backtheme-store { display: flex; flex-direction: column; gap: 7px; height: 100%; }

.backtheme-store__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.backtheme-store__title { font-size: 10px; font-weight: 700; color: var(--backtheme-fg); letter-spacing: -.025em; }
.backtheme-store__count { font-size: 7.5px; font-weight: 500; color: var(--backtheme-fg-subtle); letter-spacing: .01em; }

/* Panels are stacked in one grid cell so the window never changes
   height as the category cycles. Every panel carries four rows for
   the same reason. */
.backtheme-store__list { position: relative; display: grid; align-content: start; }

.backtheme-store__panel {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--backtheme-dur-base) var(--backtheme-ease-out), visibility 0s linear var(--backtheme-dur-base);
}

.backtheme-store__panel.is-active {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* Rows deal themselves in each time a category becomes active. */
.backtheme-store__panel.is-active .backtheme-store__row {
  animation: store-row-in 440ms var(--backtheme-ease-out) backwards;
  animation-delay: calc(var(--n, 0) * 70ms + 60ms);
}

@keyframes store-row-in {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: none; }
}

/* The sidebar item for the live category. */
.backtheme-mock__nav-item { transition: background-color var(--backtheme-dur-base) var(--backtheme-ease-out); }

.backtheme-mock__nav-item.is-active i {
  background: var(--backtheme-brand-500);
  box-shadow: 0 0 0 3px light-dark(rgba(0,113,189,.14), rgba(0,163,255,.16));
}

@media (prefers-reduced-motion: reduce) {
  .backtheme-store__panel.is-active .backtheme-store__row { animation: none; }
  .backtheme-store__panel { transition: none; }
}

.backtheme-store__row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 9px 7px 7px;
  border-radius: 7px;
  background: var(--backtheme-surface-2);
  border: 1px solid var(--backtheme-line);
}

.backtheme-store__row:first-child {
  border-color: var(--backtheme-line-brand);
  background: light-dark(rgba(0,113,189,.05), rgba(0,163,255,.06));
}

.backtheme-store__meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.backtheme-store__name { font-size: 9px; font-weight: 700; color: var(--backtheme-fg); letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.backtheme-store__category { font-size: 7.5px; font-weight: 500; color: var(--backtheme-fg-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.backtheme-store__right { display: flex; align-items: center; justify-content: flex-end; }

/* The technology, not the price: every theme costs the same, so a
   price column repeated the same figure five times and said nothing.
   The stack is the interesting part. */
.backtheme-store__tech {
  padding: 2.5px 7px;
  border-radius: var(--backtheme-r-full);
  font-size: 6.5px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--backtheme-brand-ink);
  background: light-dark(rgba(0,113,189,.09), rgba(0,163,255,.11));
  box-shadow: inset 0 0 0 1px var(--backtheme-line-brand);
}

/* ---- Thumbnails ----
   Each is a miniature of the layout that product actually is, so a
   magazine theme does not look like an admin dashboard. */

/* data-tn names the layout each thumbnail imitates (mag, port, edu,
   corp, admin, shop). It is documentation, not a styling hook — the
   look comes entirely from the child elements. */
.backtheme-thumb {
  height: 32px;
  padding: 2.5px;
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  border-radius: 4px;
  overflow: hidden;
  background: light-dark(#E6EDF7, #0B0F16);
  box-shadow: inset 0 0 0 1px var(--backtheme-line);
}

.backtheme-thumb i, .backtheme-thumb span { display: block; border-radius: 1px; background: light-dark(rgba(10,15,26,.16), rgba(255,255,255,.13)); }
.backtheme-thumb__bar { height: 3px; flex: none; background: var(--backtheme-grad-brand) !important; opacity: .9; }

.backtheme-thumb__hero {
  flex: 1;
  background: linear-gradient(135deg,
    light-dark(rgba(0,113,189,.3), rgba(0,163,255,.32)),
    light-dark(rgba(110,92,255,.18), rgba(110,92,255,.22))) !important;
}

.backtheme-thumb__columns { display: flex; gap: 1.5px; height: 5px; flex: none; background: none !important; }
.backtheme-thumb__columns i { flex: 1; }
.backtheme-thumb__tiles { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; background: none !important; }
.backtheme-thumb__split { flex: 1; display: flex; gap: 1.5px; background: none !important; }
.backtheme-thumb__side { width: 5px; flex: none; }
.backtheme-thumb__chart { flex: 1; display: flex; align-items: flex-end; gap: 1px; background: none !important; }
.backtheme-thumb__chart i { flex: 1; border-radius: .5px .5px 0 0; height: var(--h, 50%); background: light-dark(rgba(0,113,189,.4), rgba(0,163,255,.42)); }
.backtheme-thumb__rows { flex: 1; display: grid; gap: 1.5px; align-content: start; background: none !important; }
.backtheme-thumb__rows i { height: 2.5px; }

/* Storefront chrome */
.backtheme-mock__label { font-size: 8px; font-weight: 600; color: var(--backtheme-fg-muted); letter-spacing: -.01em; }
.backtheme-mock__nav-item.is-active .backtheme-mock__label { color: var(--backtheme-brand-ink); }

.backtheme-mock__search {
  flex: 1;
  max-width: 190px;
  height: 18px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--backtheme-r-full);
  background: var(--backtheme-surface-3);
  font-size: 7.5px;
  color: var(--backtheme-fg-subtle);
}

/* ============================================================
   Entrance animations
   Driven by .is-visible on the owning .backtheme-reveal element, so each
   screen plays once as its card arrives, then stays put.
   ============================================================ */

.backtheme-animate-pop { opacity: 0; }

.is-visible .backtheme-animate-pop {
  animation: pop-in 520ms var(--backtheme-ease-spring) backwards;
  animation-delay: calc(var(--n, 0) * 80ms + 240ms);
  animation-fill-mode: both;
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(.55); }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: scale(1); }
}

.backtheme-animate-slide { opacity: 0; }

.is-visible .backtheme-animate-slide {
  animation: slide-in 520ms var(--backtheme-ease-out) backwards;
  animation-delay: calc(var(--n, 0) * 90ms + 300ms);
  animation-fill-mode: both;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: none; }
}

.backtheme-animate-grow { transform: scaleY(0); }

.is-visible .backtheme-animate-grow {
  animation: grow-up 640ms var(--backtheme-ease-out) backwards;
  animation-delay: calc(var(--n, 0) * 65ms + 320ms);
  animation-fill-mode: both;
}

@keyframes grow-up {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* Count-up feel without JS: the figure settles into place. */
.is-visible .backtheme-animate-rise {
  animation: rise-in 620ms var(--backtheme-ease-spring) backwards;
  animation-delay: 200ms;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Nothing moves, nothing is hidden. */
@media (prefers-reduced-motion: reduce) {
  .backtheme-animate-pop, .backtheme-animate-slide, .backtheme-animate-grow { opacity: 1; transform: none; animation: none !important; }
  .backtheme-screen__live i { animation: none; }
}

.no-js .backtheme-animate-pop, .no-js .backtheme-animate-slide { opacity: 1; }
.no-js .backtheme-animate-grow { transform: none; }

/* ============================================================
   Portfolio previews
   Small, cheap window and device mocks that sit at the top of a
   project card. They bleed off the bottom of their stage so the
   card reads as a screenshot, not a boxed illustration.
   ============================================================ */

.backtheme-web-preview {
  width: 100%;
  max-width: 300px;
  border: 1px solid var(--backtheme-line-strong);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: var(--backtheme-surface-1);
  overflow: hidden;
  box-shadow: var(--backtheme-shadow-lg);
}

.backtheme-web-preview__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 21px;
  padding-inline: 8px;
  background: var(--backtheme-surface-2);
  border-bottom: 1px solid var(--backtheme-line);
}

.backtheme-web-preview__dots { display: flex; gap: 4px; }
.backtheme-web-preview__dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--backtheme-surface-4); }
.backtheme-web-preview__url { flex: 1; height: 8px; max-width: 110px; margin-inline: auto; border-radius: var(--backtheme-r-full); background: var(--backtheme-surface-3); }

.backtheme-web-preview__body { display: grid; grid-template-columns: 40px 1fr; min-height: 118px; }

.backtheme-web-preview__side {
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 8px 6px;
  background: var(--backtheme-surface-2);
  border-right: 1px solid var(--backtheme-line);
}

.backtheme-web-preview__side i { display: block; height: 4px; border-radius: 2px; background: var(--backtheme-surface-4); }
.backtheme-web-preview__side i:first-child { background: var(--backtheme-brand-500); width: 70%; }

.backtheme-web-preview__main { display: flex; flex-direction: column; gap: 7px; padding: 9px; }
.backtheme-web-preview__head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.backtheme-web-preview__head i { display: block; height: 6px; width: 46px; border-radius: 3px; background: var(--backtheme-surface-4); }
.backtheme-web-preview__head b { display: block; height: 13px; width: 34px; border-radius: var(--backtheme-r-full); background: var(--backtheme-grad-brand); }

.backtheme-web-preview__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }

.backtheme-web-preview__tile {
  height: 23px;
  border-radius: 4px;
  background: var(--backtheme-surface-2);
  border: 1px solid var(--backtheme-line);
}

.backtheme-web-preview__tile--on {
  background: light-dark(rgba(0,113,189,.14), rgba(0,163,255,.16));
  border-color: var(--backtheme-line-brand);
}

.backtheme-web-preview__chart { display: flex; align-items: flex-end; gap: 3px; height: 38px; }

.backtheme-web-preview__chart i {
  flex: 1;
  height: var(--h, 50%);
  border-radius: 2px 2px 0 0;
  background: light-dark(rgba(0,113,189,.28), rgba(0,163,255,.3));
}

.backtheme-web-preview__chart i:last-child { background: var(--backtheme-grad-brand); }

.backtheme-web-preview__rows { display: grid; gap: 5px; }
.backtheme-web-preview__rows i { display: block; height: 9px; border-radius: 3px; background: var(--backtheme-surface-2); border: 1px solid var(--backtheme-line); }

/* Phone preview for the Android projects. */
.backtheme-phone-preview {
  width: 96px;
  padding: 5px 5px 0;
  border: 1px solid var(--backtheme-line-strong);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: light-dark(#D7DEE9, var(--backtheme-surface-4));
  box-shadow: var(--backtheme-shadow-lg);
}

.backtheme-phone-preview__screen {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 124px;
  padding: 9px 6px 0;
  border-radius: 12px 12px 0 0;
  background: var(--backtheme-surface-1);
}

.backtheme-phone-preview__hero { height: 34px; border-radius: 6px; background: var(--backtheme-grad-brand); }
.backtheme-phone-preview__row { height: 13px; border-radius: 4px; background: var(--backtheme-surface-2); border: 1px solid var(--backtheme-line); }

/* The whole preview lifts a little with its card. */
.backtheme-work-card .backtheme-web-preview,
.backtheme-work-card .backtheme-phone-preview { transition: transform var(--backtheme-dur-slow) var(--backtheme-ease-out); }
.backtheme-work-card:hover .backtheme-web-preview,
.backtheme-work-card:hover .backtheme-phone-preview { transform: translateY(-6px); }

/* ============================================================
   Portfolio preview internals

   One preview per project, showing what that project actually is:
   a scorecard, a ledger, a storefront, a stock dashboard, course
   progress, a clinic calendar. Parts are shared where the shape is
   genuinely the same, never to save a few lines.
   ============================================================ */

/* ---- Phone internals ---- */
.backtheme-phone-preview__score {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 6px;
  border-radius: 5px;
  background: var(--backtheme-grad-brand);
  color: var(--backtheme-on-brand);
}

.backtheme-phone-preview__score b { font-size: 13px; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.backtheme-phone-preview__score span { font-size: 6px; font-weight: 600; opacity: .82; }

.backtheme-phone-preview__chips { display: flex; gap: 3px; }

.backtheme-phone-preview__chips i {
  width: 11px; height: 11px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 6px;
  font-weight: 700;
  font-style: normal;
  color: var(--backtheme-fg-muted);
  background: var(--backtheme-surface-3);
}

.backtheme-phone-preview__chips i.is-on  { background: var(--backtheme-grad-brand); color: var(--backtheme-on-brand); }
.backtheme-phone-preview__chips i.is-out { background: light-dark(rgba(196,52,74,.14), rgba(255,90,90,.16)); color: var(--backtheme-danger); }

.backtheme-phone-preview__transaction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 3px 5px;
  border-radius: 4px;
  background: var(--backtheme-surface-2);
  border: 1px solid var(--backtheme-line);
  font-size: 6.5px;
  font-weight: 700;
}

.backtheme-phone-preview__transaction em { font-style: normal; font-weight: 600; color: var(--backtheme-fg-muted); }
.backtheme-phone-preview__transaction b.is-in  { color: var(--backtheme-success); }
.backtheme-phone-preview__transaction b.is-out { color: var(--backtheme-danger); }

/* ---- Window internals ---- */
.backtheme-web-preview__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }

.backtheme-web-preview__stat {
  display: grid;
  gap: 3px;
  padding: 4px;
  border-radius: 4px;
  background: var(--backtheme-surface-2);
  border: 1px solid var(--backtheme-line);
}

.backtheme-web-preview__stat b { display: block; height: 3px; width: 62%; border-radius: 2px; background: var(--backtheme-surface-4); }
.backtheme-web-preview__stat i { display: block; height: 6px; width: 78%; border-radius: 2px; background: var(--backtheme-surface-4); }
.backtheme-web-preview__stat:first-child i { background: var(--backtheme-grad-brand); }

.backtheme-web-preview__progress { display: grid; gap: 5px; }
.backtheme-web-preview__progress > span { display: grid; gap: 3px; }
.backtheme-web-preview__progress b { display: block; height: 4px; width: var(--w, 60%); border-radius: 2px; background: var(--backtheme-surface-4); }

.backtheme-web-preview__progress i {
  position: relative;
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--backtheme-surface-3);
  overflow: hidden;
}

.backtheme-web-preview__progress i::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 50%);
  border-radius: 2px;
  background: var(--backtheme-grad-brand);
}

.backtheme-web-preview__calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2.5px; }

.backtheme-web-preview__calendar i {
  aspect-ratio: 1;
  border-radius: 1.5px;
  background: var(--backtheme-surface-2);
  border: 1px solid var(--backtheme-line);
}

.backtheme-web-preview__calendar i.is-soft { background: light-dark(rgba(0,113,189,.14), rgba(0,163,255,.16)); border-color: var(--backtheme-line-brand); }
.backtheme-web-preview__calendar i.is-on   { background: var(--backtheme-grad-brand); border-color: transparent; }

.backtheme-web-preview__store-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 4px;
  border-radius: 4px;
  background: var(--backtheme-surface-2);
  border: 1px solid var(--backtheme-line);
}

.backtheme-web-preview__store-row i { width: 15px; height: 11px; flex: none; border-radius: 2px; background: var(--backtheme-grad-brand); opacity: .88; }
.backtheme-web-preview__store-row b { flex: 1; height: 4px; border-radius: 2px; background: var(--backtheme-surface-4); }
.backtheme-web-preview__store-row span { font-size: 6.5px; font-weight: 700; color: var(--backtheme-brand-ink); }

/* ============================================================
   About board — the About page hero visual

   The About page's whole argument is "we are not only an agency,
   we build and maintain our own products". A generic skeleton
   chart said none of that, so this shows the three products
   BackTheme actually ships, each with a running status.
   ============================================================ */

/* No sidebar: this board is a list, not an application shell.
   Declared here, after the responsive .backtheme-mock__body rule
   earlier in this file, so it wins at every width.

   min-height is released too. The 300px floor is there to stop a
   dashboard mock collapsing, but this board sizes to its own rows —
   keeping the floor left ~50px of dead space between the last row and
   the footer line. */
.backtheme-mock__body--single { grid-template-columns: 1fr; min-height: 0; }

.backtheme-about-board { display: flex; flex-direction: column; gap: 11px; height: 100%; }

.backtheme-about-board__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.backtheme-about-board__title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--backtheme-fg);
}

.backtheme-about-board__count {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--backtheme-brand-ink);
}

.backtheme-about-board__list { display: flex; flex-direction: column; gap: 8px; }

.backtheme-about-board__row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--backtheme-surface-2);
  border: 1px solid var(--backtheme-line);
}

/* The flagship reads first, the same way it does on the products page. */
.backtheme-about-board__row:first-child {
  border-color: var(--backtheme-line-brand);
  background: light-dark(rgba(0,113,189,.05), rgba(0,163,255,.06));
}

.backtheme-about-board__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--backtheme-brand-ink);
  background: linear-gradient(150deg,
    light-dark(#EAF6FF, rgba(0,163,255,.16)) 0%,
    light-dark(#F4FAFF, rgba(0,163,255,.05)) 100%);
  box-shadow: inset 0 0 0 1px var(--backtheme-line-brand);
}

.backtheme-about-board__icon svg { width: 18px; height: 18px; }

.backtheme-about-board__meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.backtheme-about-board__name {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--backtheme-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backtheme-about-board__kind {
  font-size: 8px;
  font-weight: 500;
  color: var(--backtheme-fg-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backtheme-about-board__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--backtheme-r-full);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--backtheme-success);
  background: var(--backtheme-success-bg);
  border: 1px solid var(--backtheme-success-line);
}

/* The only perpetual motion here: a slow pulse that says these products
   are running right now rather than being a screenshot. Reuses the
   `blink` keyframe declared with the product screens above. */
.backtheme-about-board__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 2.6s ease-in-out infinite;
}

.backtheme-about-board__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--backtheme-line);
  font-size: 8.5px;
  font-weight: 600;
  color: var(--backtheme-fg-muted);
}

.backtheme-about-board__foot svg { width: 13px; height: 13px; flex: none; color: var(--backtheme-brand-ink); }

@media (prefers-reduced-motion: reduce) {
  .backtheme-about-board__dot { animation: none; }
}
