/* ============================================================
   SMART IT LINK — agency interface
   Light, bright, animated. Charcoal ink + brand yellow #FFC800.
   ============================================================ */

@property --n { syntax: '<integer>'; initial-value: 0; inherits: true; }

:root {
  --bg:        #FFFFFF;
  --surface:   #FFFFFF;
  --surface-2: #FAFBFD;
  --tint:      #F1F4F9;
  --wash:      #EEF3FA;
  --line:      #E2E7EF;
  --line-soft: #EDF1F6;

  --ink:     #16181D;
  --ink-2:   #545C69;
  --ink-3:   #838C9A;

  --signal:      #FFC800;
  --signal-hi:   #FFDA4D;
  --signal-ink:  #8A6700;
  --signal-chart:#B88A00;
  --signal-wash: #FFF7DC;
  --signal-edge: #FFE694;

  --dark:    #15171C;
  --dark-2:  #1E2128;
  --dark-3:  #2A2E37;

  --ok: #10855A;   --ok-bg: #E4F6EE;   --ok-edge: #A9E2C9;
  --warn: #9A6400; --warn-bg: #FFF2DA; --warn-edge: #F2D08A;
  --crit: #C2262B; --crit-bg: #FDE9E9; --crit-edge: #F4B6B7;
  --info: #1F63C0; --info-bg: #E8F0FD; --info-edge: #B6CFF3;

  --cat-1: #2A6FD6; --cat-2: #C2452C; --cat-3: #0C9C93; --cat-4: #8447C4; --cat-5: #2C8434; --cat-6: #B8590B;

  --sh-1: 0 1px 2px rgba(20,28,44,.05), 0 2px 8px rgba(20,28,44,.05);
  --sh-2: 0 3px 8px rgba(20,28,44,.07), 0 14px 30px -16px rgba(20,28,44,.2);
  --sh-3: 0 8px 18px rgba(20,28,44,.09), 0 30px 60px -26px rgba(20,28,44,.3);
  --sh-gold: 0 10px 28px -10px rgba(255,200,0,.6);

  --display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hand: "Caveat", "Segoe Script", cursive;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gut: clamp(1rem, 4vw, 2.25rem);
  --max: 1240px;
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0; background: var(--bg); color: var(--ink-2);
  font-family: var(--body); font-size: 15.5px; line-height: 1.68;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal-ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--signal); color: #16181D; }

* { scrollbar-width: thin; scrollbar-color: #C8CFDA transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #CDD4DF; border-radius: 20px; border: 3px solid var(--bg); }

/* ============================================================
   ANIMATION LIBRARY
   ============================================================ */
@keyframes rise      { from { opacity: 0; transform: translateY(26px) } to { opacity: 1; transform: none } }
@keyframes riseIn3d  { from { opacity: 0; transform: perspective(900px) rotateX(14deg) translateY(34px) } to { opacity: 1; transform: none } }
@keyframes slideL    { from { opacity: 0; transform: translateX(-26px) } to { opacity: 1; transform: none } }
@keyframes slideR    { from { opacity: 0; transform: translateX(26px) } to { opacity: 1; transform: none } }
@keyframes popIn     { from { opacity: 0; transform: scale(.86) } to { opacity: 1; transform: none } }
@keyframes float     { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }
@keyframes floatSlow { 0%,100% { transform: translateY(0) rotate(0) } 50% { transform: translateY(-22px) rotate(4deg) } }
@keyframes spinFlat  { from { transform: rotate(0) } to { transform: rotate(360deg) } }
@keyframes blob      { 0%,100% { border-radius: 58% 42% 47% 53% / 46% 52% 48% 54% } 33% { border-radius: 42% 58% 62% 38% / 58% 40% 60% 42% } 66% { border-radius: 50% 50% 38% 62% / 40% 60% 40% 60% } }
@keyframes meshDrift { 0%,100% { transform: translate3d(0,0,0) scale(1) } 50% { transform: translate3d(3%,-4%,0) scale(1.08) } }
@keyframes shine     { 0% { transform: translateX(-130%) skewX(-18deg) } 60%,100% { transform: translateX(330%) skewX(-18deg) } }
@keyframes shimmer   { from { background-position: -200% 0 } to { background-position: 200% 0 } }
@keyframes marquee   { from { transform: translateX(0) } to { transform: translateX(-50%) } }
@keyframes ping      { 0% { box-shadow: 0 0 0 0 rgba(255,200,0,.75) } 70% { box-shadow: 0 0 0 11px rgba(255,200,0,0) } 100% { box-shadow: 0 0 0 0 rgba(255,200,0,0) } }
@keyframes pulseSoft { 0%,100% { opacity: 1 } 50% { opacity: .45 } }
@keyframes badgeBeat { 0%,100% { transform: scale(1) } 50% { transform: scale(1.07) } }
@keyframes drawUnder { from { transform: scaleX(0) } to { transform: scaleX(1) } }
@keyframes stripes   { from { background-position: 0 0 } to { background-position: 28px 0 } }
@keyframes ringGrow  { 0% { transform: scale(.55); opacity: .5 } 100% { transform: scale(1.85); opacity: 0 } }
@keyframes bob       { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-5px) } }
@keyframes fadeUpSm  { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
@keyframes blink     { 0%,92%,100% { transform: scaleY(1) } 95% { transform: scaleY(.08) } }
@keyframes wave      { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-11deg) } 75% { transform: rotate(6deg) } }
@keyframes dashMove  { to { stroke-dashoffset: -60 } }
@keyframes drawPath  { to { stroke-dashoffset: 0 } }
@keyframes barGrow   { from { transform: scaleX(0) } to { transform: scaleX(1) } }
@keyframes barUp     { from { transform: scaleY(0) } to { transform: scaleY(1) } }
@keyframes chipIn    { from { opacity: 0; transform: translateX(26px) scale(.9) } to { opacity: 1; transform: none } }

@keyframes c5   { from { --n: 0 } to { --n: 5 } }
@keyframes c10  { from { --n: 0 } to { --n: 10 } }
@keyframes c14  { from { --n: 0 } to { --n: 14 } }
@keyframes c30  { from { --n: 0 } to { --n: 30 } }
@keyframes c48  { from { --n: 0 } to { --n: 48 } }
@keyframes c98  { from { --n: 0 } to { --n: 98 } }
@keyframes c100 { from { --n: 0 } to { --n: 100 } }

.count { font-variant-numeric: tabular-nums; animation-duration: 1.6s; animation-delay: .25s; animation-timing-function: cubic-bezier(.15,.85,.25,1); animation-fill-mode: both; }
.count::after { content: counter(n); counter-reset: n var(--n); }
.count.c5 { animation-name: c5; --n: 5 } .count.c10 { animation-name: c10; --n: 10 }
.count.c14 { animation-name: c14; --n: 14 } .count.c30 { animation-name: c30; --n: 30 }
.count.c48 { animation-name: c48; --n: 48 } .count.c98 { animation-name: c98; --n: 98 }
.count.c100 { animation-name: c100; --n: 100 }

.seq > * { animation: rise .6s cubic-bezier(.2,.8,.25,1) both; }
.seq > *:nth-child(1) { animation-delay: .04s } .seq > *:nth-child(2) { animation-delay: .12s }
.seq > *:nth-child(3) { animation-delay: .2s }  .seq > *:nth-child(4) { animation-delay: .28s }
.seq > *:nth-child(5) { animation-delay: .36s } .seq > *:nth-child(6) { animation-delay: .44s }

/* ---------- type ---------- */
h1, h2, h3, h4 {
  font-family: var(--display); color: var(--ink); text-wrap: balance; margin: 0;
  letter-spacing: -0.02em; line-height: 1.14; overflow-wrap: break-word; font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.55rem, 2.9vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; }
h4 { font-size: .98rem; font-weight: 700; letter-spacing: 0; }
p { margin: 0; }
.gold { color: var(--signal-ink); }

.lede { font-size: clamp(.96rem, 1.25vw, 1.05rem); color: var(--ink-2); max-width: 62ch; }
.prose { max-width: 68ch; display: flex; flex-direction: column; gap: 1.1rem; }
.prose h3 { margin-top: .8rem; }
.prose ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .5rem; }
.prose strong { color: var(--ink); font-weight: 700; }

/* section eyebrow — yellow dot + caps label, as on the reference */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; align-self: flex-start;
  font-family: var(--body); font-size: .7rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-2);
  background: var(--signal-wash); border: 1px solid var(--signal-edge);
  border-radius: 100px; padding: .3rem .8rem .3rem .55rem;
}
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); flex: none; }
.muted { color: var(--ink-3); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.sec { padding-block: clamp(2.6rem, 5.5vw, 4.4rem); position: relative; }
.sec--tight { padding-block: clamp(1.8rem, 3.5vw, 2.8rem); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-l { display: flex; flex-direction: column; gap: 1.6rem; }
.grid { display: grid; gap: 1.1rem; }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.g-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }

/* section head: title left, button right */
.sechead { display: flex; align-items: flex-end; gap: 1.2rem; flex-wrap: wrap; }
.sechead__t { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: .55rem; }
.sechead p { font-size: .92rem; color: var(--ink-3); }

.chev-rule { display: flex; align-items: center; gap: .9rem; color: var(--line); }
.chev-rule::before, .chev-rule::after { content: ""; height: 1px; background: currentColor; flex: 1; }
.chev-rule span { font-family: var(--mono); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- animated background ---------- */
#fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--bg); overflow: hidden; }
#fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: .55; }
#fx .mesh { position: absolute; border-radius: 50%; filter: blur(100px); will-change: transform; }
#fx .mesh.m1 { width: 42vw; height: 42vw; right: -12vw; top: -18vw; background: rgba(255,200,0,.16); animation: meshDrift 18s ease-in-out infinite; }
#fx .mesh.m2 { width: 38vw; height: 38vw; left: -14vw; top: 30vh; background: rgba(42,111,214,.08); animation: meshDrift 24s ease-in-out infinite reverse; }
#fx .mesh.m3 { width: 32vw; height: 32vw; right: 4vw; bottom: -14vw; background: rgba(12,156,147,.06); animation: meshDrift 30s ease-in-out infinite; }
#fx .grain { display: none; }

#shell { position: relative; z-index: 1; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  /* The bar is empty until the app renders it. Without a height held here it
     was 1px tall at first paint and 75px a moment later, and <main> dropped
     74px with it — the whole of the site's layout shift, in one jump. */
  min-height: 75px; box-sizing: border-box;
  position: sticky; top: 0; z-index: 70;
  background: var(--nav-bg, rgba(255,255,255,.92));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  animation: fadeUpSm .45s both;
}
.nav__in { display: flex; align-items: center; gap: 1rem; min-height: 74px; }

.brand { display: flex; align-items: center; flex: none; transition: transform .25s cubic-bezier(.2,.8,.25,1); }
.brand:hover { transform: scale(1.04); }
.brand img { height: 40px; width: auto; }
.nav__links { display: flex; align-items: center; gap: .1rem; margin-inline: auto; }
.nav__item { position: relative; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: .3rem;
  padding: .55rem .8rem; border-radius: var(--r-s);
  font-size: .9rem; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  transition: color .18s ease, background .18s ease; cursor: pointer;
}
.nav__link .caret { width: 11px; height: 11px; transition: transform .22s ease; opacity: .7; }
.nav__link::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .1rem; height: 2.5px; border-radius: 3px;
  background: var(--signal); transform: scaleX(0); transform-origin: left;
  transition: transform .26s cubic-bezier(.2,.8,.25,1);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-on { color: var(--ink); font-weight: 700; }
.nav__link.is-on::after { transform: scaleX(1); }
.nav__item:hover .nav__link .caret { transform: rotate(180deg); }

/* Nine menu items, a call-to-action, search and the language pill do not fit
   across a 13-inch laptop at full size — the bar quietly ran past the edge of
   the page and gave the whole site a sideways scrollbar. Below the burger
   breakpoint the menu collapses; above it, everything tightens instead. */
@media (min-width: 1241px) {
  .nav__in { gap: .65rem; }
  .nav__link { padding-inline: .5rem; font-size: .87rem; }
  .nav__tools { gap: .4rem; }
  .nav__tools .nav__quote { font-size: .78rem; padding-inline: .75rem; }
}

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(10px);
  min-width: 260px; background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-m); box-shadow: var(--sh-3); padding: .5rem;
  opacity: 0; visibility: hidden; transition: opacity .22s ease, transform .22s cubic-bezier(.2,.8,.25,1), visibility .22s;
  z-index: 5;
}
.nav__item:hover .dropdown, .nav__item:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown a {
  display: flex; gap: .7rem; align-items: flex-start; padding: .58rem .65rem; border-radius: var(--r-s);
  transition: background .18s ease, transform .18s ease;
}
.dropdown a:hover { background: var(--signal-wash); transform: translateX(3px); }
.dropdown .dd-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--tint); flex: none; }
.dropdown .dd-ic svg { width: 15px; height: 15px; }
.dropdown .dd-t { font-size: .86rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.dropdown .dd-s { font-size: .74rem; color: var(--ink-3); line-height: 1.35; }

.nav__tools { display: flex; align-items: center; gap: .6rem; flex: none; }
.nav__links .nav__quote { display: none; }
.nav__search {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink);
  transition: background .2s ease, transform .2s cubic-bezier(.2,.8,.25,1), box-shadow .2s ease;
}
.nav__search:hover { background: var(--signal-wash); transform: scale(1.08); box-shadow: var(--sh-1); }
.nav__search svg { width: 17px; height: 17px; }
.nav__burger {
  display: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
  border-radius: var(--r-s); width: 44px; height: 42px; cursor: pointer;
  align-items: center; justify-content: center; color: var(--ink);
}

@media (max-width: 1240px) {
  .nav__links {
    position: fixed; inset: 74px 0 auto 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); box-shadow: var(--sh-2); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gut) 1.2rem; max-height: calc(100dvh - 74px); overflow-y: auto;
    animation: rise .28s cubic-bezier(.2,.8,.25,1) both;
  }
  .nav__links[hidden] { display: none; }
  .nav__link { padding: .85rem .3rem; border-radius: 0; justify-content: space-between; }
  .nav__link::after { display: none; }
  .nav__item { border-bottom: 1px solid var(--line-soft); }
  .dropdown {
    position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none;
    border: 0; border-left: 2px solid var(--signal-edge); border-radius: 0;
    margin: 0 0 .6rem .3rem; padding: 0 0 0 .5rem; min-width: 0;
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav__item.is-open .dropdown { max-height: 520px; }
  .nav__item:hover .dropdown { transform: none; }
  .nav__burger { display: flex; }
  /* the links are position:fixed at this width, so nothing is left in the flow
     to push the tools across — without this they sit against the logo */
  /* logical, not "left": in Arabic the row runs the other way and a literal
     margin-left pushed the tools back against the logo and the header off
     the side of the page */
  .nav__tools { margin-inline-start: auto; }
  .nav__tools .nav__quote { display: none; }
  .nav__links .nav__quote { display: inline-flex; margin-top: 1rem; justify-content: center; }
}

/* search overlay */
.search-scrim {
  position: fixed; inset: 0; z-index: 200; background: rgba(20,26,38,.4);
  backdrop-filter: blur(6px); padding: 12vh 1rem 1rem; animation: fadeUpSm .2s both;
}
.search-box {
  width: min(620px, 100%); margin-inline: auto; background: var(--surface);
  border-radius: var(--r-l); box-shadow: var(--sh-3); overflow: hidden;
  animation: riseIn3d .3s cubic-bezier(.2,.8,.25,1) both;
}
.search-box__in { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line-soft); }
.search-box__in svg { width: 19px; height: 19px; color: var(--ink-3); flex: none; }
.search-box input { border: 0; outline: 0; flex: 1; font-size: 1.02rem; color: var(--ink); background: transparent; }
.search-res { max-height: 52vh; overflow-y: auto; padding: .5rem; }
.search-res a { display: flex; flex-direction: column; gap: .15rem; padding: .65rem .8rem; border-radius: var(--r-s); }
.search-res a:hover, .search-res a.is-sel { background: var(--signal-wash); }
.search-res .sr-t { font-size: .9rem; font-weight: 700; color: var(--ink); }
.search-res .sr-s { font-size: .76rem; color: var(--ink-3); }
.search-res .sr-k { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--signal-ink); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .78rem 1.3rem; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: .88rem; font-weight: 700; cursor: pointer; white-space: nowrap; box-shadow: var(--sh-1);
  transition: transform .18s cubic-bezier(.2,.8,.25,1), box-shadow .22s ease, background .18s ease, border-color .18s ease;
}
.btn::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  transform: translateX(-130%) skewX(-18deg); pointer-events: none;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.btn:hover::before { animation: shine .85s ease; }
.btn:active { transform: translateY(-1px); }
.btn--signal { background: linear-gradient(135deg, var(--signal-hi), var(--signal)); color: #16181D; border-color: transparent; box-shadow: var(--sh-gold); }
.btn--signal:hover { box-shadow: 0 16px 38px -12px rgba(255,200,0,.72); }
.btn--ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.btn--dark { background: var(--dark); color: #fff; border-color: var(--dark); }
.btn--dark:hover { background: var(--dark-2); }
.btn--sm { padding: .48rem .85rem; font-size: .8rem; }
.btn--danger { color: var(--crit); border-color: var(--crit-edge); }
.btn--danger:hover { background: var(--crit-bg); }
.btn .chev { transition: transform .2s cubic-bezier(.2,.8,.25,1); }
.btn:hover .chev { transform: translateX(4px); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* outline pill button used for "View All …" */
.btn--pill { border-radius: 100px; border-color: var(--signal-edge); background: var(--signal-wash); color: var(--ink); }
.btn--pill:hover { background: var(--signal); }

/* play button */
.btn--play { padding-left: .5rem; }
.btn--play .pl {
  width: 34px; height: 34px; border-radius: 50%; background: var(--dark); color: #fff;
  display: grid; place-items: center; flex: none;
}
.btn--play .pl svg { width: 12px; height: 12px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 82% 14%, color-mix(in srgb, var(--signal) 17%, transparent), transparent 62%),
    linear-gradient(170deg, var(--hero-1, #FFFDF4) 0%, var(--hero-2, #F6F9FE) 48%, var(--bg, #FFFFFF) 100%);
  border-bottom: 1px solid var(--line-soft);
}
.hero__in {
  display: grid; gap: clamp(1.6rem, 4vw, 2.6rem);
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.12fr);
  align-items: center; padding-block: clamp(2.2rem, 4.5vw, 3.4rem);
}
@media (max-width: 980px) { .hero__in { grid-template-columns: 1fr; } }

.hero__kicker {
  display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start;
  font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); background: var(--signal-wash); border: 1px solid var(--signal-edge);
  border-radius: 100px; padding: .36rem .9rem .36rem .6rem;
}
.hero__kicker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); animation: ping 2.4s ease-out infinite; flex: none; }
.hero h1 { font-size: clamp(2.1rem, 4.3vw, 3.35rem); }
.hero h1 .hl {
  background: linear-gradient(100deg, var(--signal-ink), var(--signal) 40%, var(--signal-ink) 78%, var(--signal));
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite;
}

/* four trust points under the hero copy */
.hero__pts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem .6rem; padding-top: .4rem; }
@media (max-width: 700px) { .hero__pts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hero__pt { display: flex; align-items: center; gap: .5rem; }
.hero__pt { min-width: 0; }
.hero__pt .ic {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--signal-wash); color: var(--signal-ink); border: 1px solid var(--signal-edge);
}
.hero__pt .ic svg { width: 16px; height: 16px; }
.hero__pt b { display: block; font-size: .78rem; white-space: nowrap; color: var(--ink); font-weight: 800; line-height: 1.2; }
.hero__pt > span:last-child { min-width: 0; }
.hero__pt > span:last-child > span { font-size: .74rem; color: var(--ink-3); display: block; line-height: 1.3; }

/* right-hand stage */
.hero__stage { position: relative; min-height: 300px; }
.hero__art { position: relative; width: 100%; display: block; }
.hero__art svg { width: 100%; height: auto; display: block; overflow: visible; }

.hero__chips { position: absolute; top: 2%; right: 0; display: flex; flex-direction: column; gap: .5rem; z-index: 4; }
.hchip {
  display: flex; align-items: center; gap: .55rem;
  background: var(--dark); color: #fff; border-radius: 10px;
  padding: .5rem .85rem .5rem .55rem; box-shadow: var(--sh-2);
  font-size: .82rem; font-weight: 700; white-space: nowrap;
  animation: chipIn .55s cubic-bezier(.2,.8,.25,1) both;
}
.hchip:nth-child(1) { animation-delay: .35s } .hchip:nth-child(2) { animation-delay: .5s }
.hchip:nth-child(3) { animation-delay: .65s } .hchip:nth-child(4) { animation-delay: .8s }
.hchip .ic { width: 26px; height: 26px; border-radius: 7px; background: var(--signal); color: #16181D; display: grid; place-items: center; flex: none; }
.hchip .ic svg { width: 14px; height: 14px; }
.hchip:hover { transform: translateX(-4px); transition: transform .2s ease; }
@media (max-width: 620px) { .hero__chips { position: static; flex-direction: row; flex-wrap: wrap; margin-top: 1rem; } }

/* handwritten annotations, as on the reference */
.scribble { position: absolute; font-family: var(--hand); color: var(--ink); z-index: 3; pointer-events: none; line-height: 1.15; }
.scribble--a { top: 0; left: 20%; font-size: clamp(.95rem, 1.7vw, 1.4rem); transform: rotate(-6deg); font-weight: 700; }
.scribble--b { bottom: 16%; right: -1%; font-size: clamp(.95rem, 1.7vw, 1.35rem); transform: rotate(-7deg); text-align: right; font-weight: 700; }
.scribble svg { position: absolute; overflow: visible; }
.scribble path { stroke: var(--signal); stroke-width: 3.4; fill: none; stroke-linecap: round; stroke-dasharray: 300; stroke-dashoffset: 300; animation: drawPath 1.3s .7s ease forwards; }
@media (max-width: 780px) { .scribble { display: none; } }

/* hero artwork animation */
.rb-float { animation: float 6.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.rb-eyes  { animation: blink 5.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.rb-arm   { animation: wave 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 30% 92%; }
.rb-ant   { animation: pulseSoft 1.9s ease-in-out infinite; }
.rb-spark { animation: pulseSoft 2.6s ease-in-out infinite; }
.rb-lap   { animation: bob 7.5s ease-in-out infinite .4s; transform-box: fill-box; transform-origin: center; }

/* ============================================================
   SERVICE CARDS  (4 cards + dark AI promo, as on the reference)
   ============================================================ */
.svc-row { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.18fr); align-items: stretch; }
@media (max-width: 1180px) { .svc-row { grid-template-columns: repeat(2, minmax(0,1fr)); } .svc-row .ai-promo { grid-column: 1 / -1; } }
@media (max-width: 620px) { .svc-row { grid-template-columns: 1fr; } }

.svc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 1.25rem 1.2rem; display: flex; flex-direction: column; gap: .7rem;
  box-shadow: var(--sh-1); position: relative; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.25,1), box-shadow .3s ease, border-color .25s ease;
}
.svc::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--signal);
  transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2,.8,.25,1);
}
.svc:hover { transform: translateY(-6px); box-shadow: var(--sh-3); border-color: var(--signal-edge); }
.svc:hover::after { transform: scaleX(1); }
.svc__glyph {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--signal-wash); color: var(--ink); border: 1px solid var(--signal-edge);
  transition: transform .3s cubic-bezier(.2,.8,.25,1);
}
.svc:hover .svc__glyph { animation: bob 1.2s ease-in-out infinite; }
.svc__glyph svg { width: 24px; height: 24px; }
.svc h3 { font-size: 1.02rem; }
.svc h3 small { font-size: .68rem; font-weight: 600; color: var(--ink-3); display: block; letter-spacing: 0; }
.svc__d { font-size: .84rem; color: var(--ink-2); line-height: 1.55; }
.svc__ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.svc__ul li { display: grid; grid-template-columns: 16px 1fr; gap: .5rem; align-items: start; font-size: .81rem; color: var(--ink-2); }
.svc__ul svg { width: 13px; height: 13px; margin-top: .3rem; color: var(--signal-ink); }
.svc__more {
  margin-top: auto; padding-top: .6rem; display: inline-flex; align-items: center; gap: .4rem;
  font-size: .83rem; font-weight: 800; color: var(--ink);
}
.svc__more .chev { transition: transform .22s cubic-bezier(.2,.8,.25,1); color: var(--signal-ink); }
.svc:hover .svc__more .chev { transform: translateX(5px); }

.ai-promo {
  background: linear-gradient(150deg, var(--dark) 0%, #1B2430 58%, #101820 100%);
  border-radius: var(--r-m); padding: 1.4rem 1.3rem; color: #E8ECF3;
  display: flex; flex-direction: column; gap: .9rem; position: relative; overflow: hidden;
  box-shadow: var(--sh-2);
}
.ai-promo::before {
  content: ""; position: absolute; right: -10%; top: -12%; width: 62%; aspect-ratio: 1;
  background: radial-gradient(circle at 40% 40%, rgba(255,200,0,.30), transparent 66%);
  animation: meshDrift 16s ease-in-out infinite;
}
.ai-promo__face { position: absolute; right: -6%; top: 4%; width: 46%; opacity: .5; }
.ai-promo h3 { color: #fff; font-size: 1.35rem; line-height: 1.2; position: relative; }
.ai-promo h3 em { font-style: normal; color: var(--signal); display: block; }
.ai-promo ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; position: relative; }
.ai-promo li { display: grid; grid-template-columns: 18px 1fr; gap: .55rem; align-items: start; font-size: .84rem; color: #C9D1DD; }
.ai-promo li svg { width: 14px; height: 14px; margin-top: .3rem; color: var(--signal); }
.ai-promo .btn { margin-top: auto; position: relative; align-self: flex-start; }

/* ============================================================
   STATS BAND
   ============================================================ */
.statband {
  background: linear-gradient(180deg, var(--wash), var(--surface-2));
  border-block: 1px solid var(--line-soft);
}
.statband__in { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr)); }
.stat {
  padding: 1.5rem 1rem; display: flex; align-items: center; gap: .85rem; justify-content: center;
  border-right: 1px solid var(--line-soft); position: relative;
  transition: background .25s ease;
}
.stat:last-child { border-right: 0; }
.stat:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.stat__ic { width: 44px; height: 44px; display: grid; place-items: center; color: var(--signal-ink); flex: none; }
.stat__ic svg { width: 34px; height: 34px; }
.stat:hover .stat__ic { animation: bob 1.1s ease-in-out infinite; }
.stat__k { font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--ink); line-height: 1; }
.stat__v { font-size: .79rem; color: var(--ink-3); line-height: 1.35; display: block; }
.stat > span:last-child { min-width: 0; }

/* ============================================================
   PORTFOLIO
   ============================================================ */
.works { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr)); }
.wcard { display: flex; flex-direction: column; gap: .6rem; }
.wcard__shot {
  border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--sh-1); background: var(--surface); position: relative;
  transition: transform .32s cubic-bezier(.2,.8,.25,1), box-shadow .32s ease;
}
.wcard:hover .wcard__shot { transform: translateY(-6px) scale(1.015); box-shadow: var(--sh-3); }
.wcard__shot svg { width: 100%; height: auto; display: block; }
.wcard__shot::after {
  content: "View project"; position: absolute; inset: auto 0 0 0; padding: .55rem;
  background: linear-gradient(0deg, rgba(21,23,28,.88), transparent);
  color: #fff; font-size: .78rem; font-weight: 700; text-align: center;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.25,1);
}
.wcard:hover .wcard__shot::after { transform: none; }
.wcard__t { font-size: .95rem; font-weight: 700; color: var(--ink); }
.wcard__c { font-size: .8rem; color: var(--ink-3); }

/* ---- flip card: front is the screenshot, back is the case detail ---- */
.wcard--flip { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; }
.wcard--flip:hover .wcard__shot { transform: none; box-shadow: none; }
.wcard--flip .wcard__shot::after { content: none; }

.wcard__flip {
  display: block; position: relative; aspect-ratio: 8 / 5;
  perspective: 1100px; perspective-origin: var(--mx) var(--my);
}
.wcard__faces {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .62s cubic-bezier(.2,.78,.2,1);
}
.wcard__face {
  position: absolute; inset: 0; overflow: hidden; border-radius: var(--r-m);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: box-shadow .34s ease;
}
.wcard--flip:hover .wcard__face { box-shadow: var(--sh-3); }
.wcard--flip .wcard__shot {
  position: absolute; inset: 0; border: 0; border-radius: 0; box-shadow: none; background: none;
}
.wcard--flip .wcard__shot svg { width: 100%; height: 100%; }

/* the flip — only where there is a real pointer to hover with */
@media (hover: hover) and (pointer: fine) {
  .wcard--flip:hover .wcard__faces { will-change: transform; }
  .wcard--flip:hover .wcard__faces,
  .wcard--flip:focus-visible .wcard__faces {
    transform: rotateX(var(--rx)) rotateY(calc(var(--ry) + 180deg));
  }
}
@media (hover: none), (pointer: coarse) {
  .wcard--flip .wcard__shot::after { content: "View project"; transform: none; }
  .wcard__back { display: none; }
}

/* back face */
.wcard__back {
  transform: rotateY(180deg);
  display: flex; flex-direction: column; gap: .3rem;
  padding: .8rem .85rem; text-align: left; color: #fff;
  border-color: transparent; background: var(--dark);
  background-image:
    radial-gradient(120% 100% at 6% -12%, rgba(255,255,255,.16), transparent 58%),
    linear-gradient(158deg, rgba(255,255,255,.05), rgba(0,0,0,.3));
}
.wcard__back::before {
  content: ""; position: absolute; left: -16%; top: -38%; width: 66%; aspect-ratio: 1;
  border-radius: 50%; background: var(--accent); opacity: .3; filter: blur(36px); pointer-events: none;
}
.wcard__back::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .55s .24s cubic-bezier(.2,.8,.25,1);
}
.wcard--flip:hover .wcard__back::after { transform: none; }

.wcard__back > *:not(.wcard__glare) {
  position: relative; opacity: 0; transform: translateY(10px);
  transition: opacity .42s ease, transform .42s cubic-bezier(.2,.8,.25,1);
}
.wcard--flip:hover .wcard__back > *:not(.wcard__glare) { opacity: 1; transform: none; }
.wcard--flip:hover .wcard__back > :nth-child(1) { transition-delay: .3s; }
.wcard--flip:hover .wcard__back > :nth-child(2) { transition-delay: .36s; }
.wcard--flip:hover .wcard__back > :nth-child(3) { transition-delay: .42s; }
.wcard--flip:hover .wcard__back > :nth-child(4) { transition-delay: .48s; }
.wcard--flip:hover .wcard__back > :nth-child(5) { transition-delay: .54s; }

.wcard__bhead {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .62rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.74);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wcard__bhead .d { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.wcard__btitle {
  font-family: var(--font-display); font-size: .92rem; line-height: 1.2; color: #fff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wcard__bsum {
  font-size: .71rem; line-height: 1.45; color: rgba(255,255,255,.68);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wcard__bm { display: flex; gap: .85rem; margin-top: auto; padding-top: .15rem; }
.wcard__bm span {
  display: flex; flex-direction: column; font-size: .56rem; letter-spacing: .05em; line-height: 1.35;
  text-transform: uppercase; color: rgba(255,255,255,.55); white-space: nowrap;
}
.wcard__bm b {
  font-family: var(--font-display); font-size: .95rem; line-height: 1.15;
  color: var(--accent); letter-spacing: 0; text-transform: none;
}
.wcard__bcta { display: inline-flex; align-items: center; gap: .35rem; font-size: .73rem; font-weight: 700; color: #fff; }
.wcard__bcta .chev { transition: transform .3s ease; }
.wcard--flip:hover .wcard__bcta .chev { transform: translateX(4px); }

/* cursor-tracked specular sheen */
.wcard__glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(220px circle at var(--mx) var(--my), rgba(255,255,255,.4), transparent 62%);
}
.wcard__back .wcard__glare {
  background: radial-gradient(220px circle at calc(100% - var(--mx)) var(--my), rgba(255,255,255,.5), transparent 62%);
}
.wcard--flip:hover .wcard__glare { opacity: 1; }

/* Appearance → Motion & effects can switch the flip off site-wide */
html.fx-no-flip .wcard__faces,
html.fx-no-flip .wcard--flip:hover .wcard__faces { will-change: transform; }
  .wcard--flip:hover .wcard__faces,
html.fx-no-flip .wcard--flip:focus-visible .wcard__faces { transform: none !important; }
html.fx-no-flip .wcard__back, html.fx-no-flip .wcard__glare { display: none !important; }
html.fx-no-flip .wcard--flip .wcard__shot::after { content: "View project" !important; }
html.fx-no-flip .wcard--flip:hover .wcard__shot::after { transform: none !important; }

/* detailed case-study row (Work page) */
.work {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.6rem;
  grid-template-areas: "txt met";
  padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--surface); align-items: center; box-shadow: var(--sh-1);
  transition: box-shadow .3s ease, transform .3s cubic-bezier(.2,.8,.25,1); position: relative; overflow: hidden;
}
.work__body { grid-area: txt; min-width: 0; }
.work__metrics { grid-area: met; }
.work > .pbanner { grid-area: pic; align-self: center; }
/* with a project photo: words on the left, picture in a column of its own.
   The picture's track is a share of the row, never the file's own width. */
.work--pic {
  grid-template-columns: minmax(0, 1fr) minmax(0, 34%);
  grid-template-areas: "txt pic" "met pic";
  align-items: start;
}
.work::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--signal); transform: scaleY(0); transform-origin: bottom; transition: transform .32s cubic-bezier(.2,.8,.25,1); }
.work:hover { box-shadow: var(--sh-2); transform: translateY(-3px); }
.work:hover::before { transform: scaleY(1); }
.work__metrics { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.work__m { display: flex; flex-direction: column; }
.work__mv { font-family: var(--display); font-size: 1.35rem; color: var(--signal-ink); font-weight: 800; line-height: 1.1; }
.work__ml { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 720px) {
  .work { grid-template-columns: 1fr; grid-template-areas: "txt" "met"; }
  .work--pic { grid-template-columns: 1fr; grid-template-areas: "pic" "txt" "met"; }
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.revs { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.rev {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 1.3rem; display: flex; flex-direction: column; gap: .9rem;
  box-shadow: var(--sh-1); position: relative; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.25,1), box-shadow .3s ease;
}
.rev:hover { transform: translateY(-5px); box-shadow: var(--sh-2); }
.rev__q { position: absolute; top: .9rem; right: 1.1rem; font-family: Georgia, serif; font-size: 3.2rem; line-height: 1; color: var(--line); }
.rev__top { display: flex; align-items: center; gap: .75rem; }
.rev__av {
  width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: .92rem;
  background: color-mix(in srgb, var(--hue, #2A6FD6) 14%, #fff);
  color: var(--hue, #2A6FD6);
  border: 1px solid color-mix(in srgb, var(--hue, #2A6FD6) 30%, #fff);
}
.rev__n { font-size: .92rem; font-weight: 700; color: var(--ink); line-height: 1.25; }
.rev__r { font-size: .78rem; color: var(--ink-3); }
.stars { display: inline-flex; gap: 1px; color: var(--signal); }
.stars svg { width: 13px; height: 13px; }
.rev__t { font-size: .88rem; color: var(--ink-2); line-height: 1.6; }

/* ============================================================
   PRICING / BLOG / CAREERS / FAQ
   ============================================================ */
.price { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: var(--sh-1); transition: transform .3s cubic-bezier(.2,.8,.25,1), box-shadow .3s ease; }
.price:hover { transform: translateY(-6px); box-shadow: var(--sh-3); }
.price--hot { border-color: var(--signal-edge); background: linear-gradient(180deg, var(--signal-wash), var(--surface) 55%); box-shadow: var(--sh-2); }
.price__amt { font-family: var(--display); font-size: 2rem; color: var(--ink); font-weight: 800; line-height: 1; }
.price__per { font-size: .8rem; color: var(--ink-3); }
.price ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; font-size: .88rem; }
.price li { display: grid; grid-template-columns: 18px 1fr; gap: .55rem; align-items: start; }
.price li svg { width: 14px; height: 14px; margin-top: .35rem; color: var(--ok); }
.toggle { display: inline-flex; background: var(--tint); border: 1px solid var(--line); border-radius: 100px; padding: 3px; }
.toggle button { border: 0; background: transparent; color: var(--ink-3); padding: .38rem .95rem; border-radius: 100px; cursor: pointer; font-size: .8rem; font-weight: 700; transition: background .22s ease, color .22s ease; }
.toggle button.is-on { background: var(--signal); color: #16181D; box-shadow: var(--sh-1); }

.post { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; box-shadow: var(--sh-1); transition: box-shadow .3s ease, transform .3s cubic-bezier(.2,.8,.25,1); }
.post:hover { box-shadow: var(--sh-2); transform: translateY(-4px); }
.post__meta { display: flex; gap: .7rem; flex-wrap: wrap; font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.role { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1.25rem 1.45rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); box-shadow: var(--sh-1); transition: transform .28s cubic-bezier(.2,.8,.25,1), box-shadow .28s ease; }
.role:hover { transform: translateX(6px); box-shadow: var(--sh-2); }
@media (max-width: 640px) { .role { grid-template-columns: 1fr; } }

details.faq { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); padding: 0 1.25rem; box-shadow: var(--sh-1); transition: box-shadow .25s ease; }
details.faq[open] { box-shadow: var(--sh-2); }
details.faq summary { cursor: pointer; padding: 1.05rem 0; font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--signal-ink); font-family: var(--mono); font-size: 1.2rem; transition: transform .28s cubic-bezier(.2,.8,.25,1); }
details.faq[open] summary::after { transform: rotate(135deg); }
details.faq p { padding-bottom: 1.1rem; font-size: .92rem; animation: fadeUpSm .35s both; }

/* generic cards used on inner pages */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.4rem; display: flex; flex-direction: column; gap: .8rem; position: relative; box-shadow: var(--sh-1); transition: box-shadow .3s ease, border-color .25s ease, transform .3s cubic-bezier(.2,.8,.25,1); }
.card--flat { box-shadow: none; background: var(--surface-2); }
.card--plain { background: transparent; box-shadow: none; }
.card--plain:hover { background: var(--surface); box-shadow: var(--sh-1); transform: translateY(-3px); }
.chip { font-family: var(--mono); font-size: .66rem; padding: .24rem .52rem; border-radius: 5px; background: var(--tint); border: 1px solid var(--line-soft); color: var(--ink-2); transition: background .2s ease, transform .2s ease; }
.chip:hover { background: var(--signal-wash); transform: translateY(-2px); }
.svc__list { display: flex; flex-wrap: wrap; gap: .4rem; }

.steps { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--sh-1); }
.step { background: var(--surface); padding: 1.3rem 1.4rem; display: grid; grid-template-columns: 3.4rem 1fr; gap: 1rem; align-items: start; transition: background .25s ease; }
.step:hover { background: var(--signal-wash); }
.step__n { font-family: var(--mono); font-size: .95rem; color: var(--signal-ink); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--signal-wash); border: 1px solid var(--signal-edge); }
.step:hover .step__n { animation: badgeBeat .9s ease-in-out infinite; }
.step__b { display: flex; flex-direction: column; gap: .35rem; }

.inds { display: flex; flex-wrap: wrap; gap: .6rem; }
.ind { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border-radius: 100px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); font-size: .86rem; font-weight: 600; color: var(--ink-2); transition: transform .24s cubic-bezier(.2,.8,.25,1), box-shadow .24s ease, color .2s ease; }
.ind::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--signal); transform: rotate(45deg); flex: none; }
.ind:hover { transform: translateY(-4px); box-shadow: var(--sh-2); color: var(--ink); }

.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 780px) { .vs { grid-template-columns: 1fr; } }
.vs__col { border-radius: var(--r-m); padding: 1.3rem; display: flex; flex-direction: column; gap: .9rem; }
.vs__col--old { background: var(--tint); border: 1px solid var(--line); }
.vs__col--new { background: linear-gradient(180deg, var(--signal-wash), var(--surface) 60%); border: 1px solid var(--signal-edge); box-shadow: var(--sh-2); }
.vs__h { display: flex; align-items: center; gap: .6rem; }
.vs__row { display: grid; grid-template-columns: 20px 1fr; gap: .6rem; align-items: start; font-size: .89rem; padding-bottom: .7rem; border-bottom: 1px dashed var(--line); }
.vs__row:last-child { border-bottom: 0; padding-bottom: 0; }
.vs__row svg { width: 15px; height: 15px; margin-top: .28rem; flex: none; }
.vs__col--old .vs__row { color: var(--ink-3); }
.vs__col--old svg { color: var(--crit); }
.vs__col--new .vs__row { color: var(--ink); }
.vs__col--new svg { color: var(--ok); }

.ticker { overflow: hidden; border-block: 1px solid var(--line-soft); background: linear-gradient(90deg, var(--signal-wash), var(--surface) 45%, var(--signal-wash)); padding-block: .8rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker__track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track > span { display: inline-flex; align-items: center; gap: .9rem; padding-inline: 1.4rem; font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--ink); white-space: nowrap; }
.ticker__track > span::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--signal); transform: rotate(45deg); }

/* ============================================================
   FORMS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label, .lbl { font-family: var(--mono); font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }
.inp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: .72rem .85rem; color: var(--ink); width: 100%; font-size: .92rem; transition: border-color .18s ease, box-shadow .18s ease; }
.inp::placeholder { color: #A3ABB8; }
.inp:focus { border-color: var(--signal); box-shadow: 0 0 0 4px rgba(255,200,0,.22); outline: none; }
textarea.inp { min-height: 120px; resize: vertical; }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
.form-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form-note { font-size: .8rem; color: var(--ink-3); }

.flash { border-radius: var(--r-s); padding: .85rem 1rem; font-size: .88rem; display: block; animation: popIn .35s cubic-bezier(.2,.8,.25,1) both; }
.flash--ok { background: var(--ok-bg); border: 1px solid var(--ok-edge); color: #0B6B48; }
.flash--err { background: var(--crit-bg); border: 1px solid var(--crit-edge); color: #9E1F23; }
.flash--info { background: var(--info-bg); border: 1px solid var(--info-edge); color: #14539F; }
.flash a { font-weight: 700; text-decoration: underline; }

/* ============================================================
   DARK CTA BAND
   ============================================================ */
.cta {
  background: linear-gradient(120deg, #101318 0%, #191D25 52%, #0D1014 100%);
  position: relative; overflow: hidden; color: #E9EDF4;
}
.cta__waves { position: absolute; inset: 0; opacity: .5; }
.cta__waves path { fill: none; stroke: rgba(255,200,0,.28); stroke-width: 1.4; }
.cta__in {
  position: relative; display: grid; gap: 1.4rem;
  grid-template-columns: minmax(0, 1.2fr) auto auto; align-items: center;
  padding-block: clamp(1.8rem, 3.4vw, 2.6rem);
}
@media (max-width: 940px) { .cta__in { grid-template-columns: 1fr; text-align: left; } }
.cta h2 { color: #fff; font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.cta p { color: #A7B0BF; font-size: .92rem; }
.cta__help { display: flex; align-items: center; gap: .85rem; }
.cta__help .ic { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--signal); color: var(--signal); display: grid; place-items: center; flex: none; animation: bob 2.6s ease-in-out infinite; }
.cta__help .ic svg { width: 21px; height: 21px; }
.cta__help b { display: block; color: #fff; font-size: .92rem; font-weight: 700; line-height: 1.3; }
.cta__links { display: flex; gap: .5rem; font-size: .82rem; color: #8E97A6; margin-top: .2rem; }
.cta__links a { transition: color .18s ease; }
.cta__links a:hover { color: var(--signal); }
.cta__links span { opacity: .4; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { background: var(--dark); color: #A9B2C0; border-top: 0; }
.foot__in { display: grid; gap: 2rem; grid-template-columns: 1.5fr 1fr 1.15fr 1.25fr 1.25fr; padding-block: clamp(2.4rem, 4vw, 3.4rem) 1.6rem; }
@media (max-width: 1040px) { .foot__in { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 640px) { .foot__in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .foot__in { grid-template-columns: 1fr; } }
.foot h4 { color: #fff; font-size: .98rem; margin-bottom: .2rem; }
/* A grid column is as wide as its widest word unless it is told otherwise,
   and the address line is long enough to push the footer past the edge of a
   narrow phone. */
.foot__col { display: flex; flex-direction: column; gap: .55rem; align-items: flex-start; min-width: 0; }
.foot__col > *, .foot__ct > span { min-width: 0; overflow-wrap: break-word; }
.foot__col a, .foot__col span { font-size: .86rem; color: #A9B2C0; }
.foot__col a { transition: color .18s ease, transform .18s ease; }
.foot__col a:hover { color: var(--signal); transform: translateX(3px); }
.foot__brand img { height: 40px; margin-bottom: .3rem; }
.foot__desc { font-size: .86rem; color: #98A1B0; max-width: 34ch; }
.foot__soc { display: flex; gap: .5rem; margin-top: .4rem; }
.foot__soc a {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--dark-3); color: #C7CEDA;
  transition: background .2s ease, color .2s ease, transform .2s cubic-bezier(.2,.8,.25,1);
}
.foot__soc a:hover { background: var(--signal); color: #16181D; transform: translateY(-3px); }
.foot__soc svg { width: 16px; height: 16px; }
.foot__ct { display: grid; grid-template-columns: 18px 1fr; gap: .55rem; align-items: start; font-size: .86rem; }
.foot__ct svg { width: 14px; height: 14px; margin-top: .32rem; color: var(--signal); flex: none; }
.news { display: flex; gap: .4rem; width: 100%; margin-top: .3rem; }
.news input {
  flex: 1; min-width: 0; background: var(--dark-3); border: 1px solid #363B45; border-radius: var(--r-s);
  padding: .62rem .8rem; color: #fff; font-size: .85rem;
}
.news input::placeholder { color: #767F8D; }
.news input:focus { outline: none; border-color: var(--signal); }
.news button {
  width: 44px; flex: none; border: 0; border-radius: var(--r-s); background: var(--signal); color: #16181D;
  display: grid; place-items: center; cursor: pointer; transition: transform .2s cubic-bezier(.2,.8,.25,1);
}
.news button:hover { transform: translateY(-2px) scale(1.04); }
.news button svg { width: 16px; height: 16px; }
.foot__bar {
  border-top: 1px solid #262A33; padding-block: 1.05rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .8rem; color: #7E8794;
}

/* scroll to top */
.totop {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--signal); color: #16181D; display: grid; place-items: center;
  box-shadow: var(--sh-2); opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .28s ease, transform .28s cubic-bezier(.2,.8,.25,1);
}
.totop.is-on { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { transform: translateY(-3px) scale(1.06); }
.totop svg { width: 18px; height: 18px; }

/* ============================================================
   PARALLAX LAYERS + FLOATING DECORATION
   ============================================================ */
#fx .layer {
  position: absolute; inset: -10% -5% auto -5%; height: 130%;
  background-repeat: no-repeat; will-change: transform;
}
#fx .layer.l1 {
  background-image:
    radial-gradient(closest-side, rgba(255,200,0,.16), transparent),
    radial-gradient(closest-side, rgba(255,200,0,.10), transparent);
  background-size: 46vw 46vw, 30vw 30vw;
  background-position: 88% 6%, 6% 52%;
}
#fx .layer.l2 {
  background-image:
    radial-gradient(closest-side, rgba(42,111,214,.10), transparent),
    radial-gradient(closest-side, rgba(12,156,147,.08), transparent);
  background-size: 38vw 38vw, 28vw 28vw;
  background-position: 12% 18%, 80% 72%;
}
#fx .layer.l3 {
  background-image:
    linear-gradient(rgba(25,29,36,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25,29,36,.05) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000, transparent 70%);
  mask-image: radial-gradient(circle at 50% 18%, #000, transparent 70%);
}

/* scattered brand confetti — signal dots, chevrons, arcs, sparkles */
.deco { position: absolute; pointer-events: none; z-index: 0; opacity: .6; will-change: transform; }
.deco svg { display: block; overflow: visible; }
.deco--float  { animation: float 7s ease-in-out infinite; }
.deco--float2 { animation: floatSlow 11s ease-in-out infinite; }
.deco--spin   { animation: spinFlat 26s linear infinite; }
.sec, .hero, .statband { position: relative; }
.sec > .wrap, .hero > .wrap, .statband > .wrap { position: relative; z-index: 1; }
@media (max-width: 760px) { .deco { display: none; } }

/* ============================================================
   CAROUSEL
   ============================================================ */
.caro { position: relative; }
.caro__track {
  display: grid; grid-auto-flow: column; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: .35rem .3rem 1rem;
  scrollbar-width: none; -ms-overflow-style: none;
}
.caro__track::-webkit-scrollbar { display: none; }
.caro__track > * { scroll-snap-align: start; }
/* dedicated tracks — never mixed with the static grid classes */
.caro__track.t-svc,
.caro__track.t-work { grid-template-columns: none; }
.caro__track.t-svc  { grid-auto-columns: calc((100% - 3rem) / 4); }
.caro__track.t-work { grid-auto-columns: calc((100% - 3rem) / 4); }
@media (max-width: 1180px) {
  .caro__track.t-svc, .caro__track.t-work { grid-auto-columns: calc((100% - 2rem) / 3); }
}
@media (max-width: 900px) {
  .caro__track.t-svc, .caro__track.t-work { grid-auto-columns: calc((100% - 1rem) / 2); }
}
@media (max-width: 620px) {
  .caro__track.t-svc, .caro__track.t-work { grid-auto-columns: 84%; }
}
.caro__track.t-svc > .ai-promo { min-width: 0; }

/* ---- 3D coverflow: the centre card faces you, the rest angle away ---- */
html:not(.fx-flat-caro) .caro__track {
  perspective: 1500px; perspective-origin: 50% 48%;
  padding-block: 1.4rem 1.7rem;
}
html:not(.fx-flat-caro) .caro__track > * {
  transform-origin: 50% 50%;
  transform: translateZ(var(--cf-tz, 0px)) rotateY(var(--cf-ry, 0deg)) scale(var(--cf-sc, 1));
  opacity: var(--cf-op, 1);
}
html:not(.fx-flat-caro) .caro__track > .is-lead { z-index: 2; }
.caro__track > * { transition: opacity .2s linear; }

.caro__nav { display: flex; gap: .45rem; }
.caro__btn {
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; box-shadow: var(--sh-1);
  transition: background .2s ease, transform .2s cubic-bezier(.2,.8,.25,1), opacity .2s ease, color .2s ease;
}
.caro__btn:hover { background: var(--signal); transform: scale(1.08); }
.caro__btn[disabled] { opacity: .35; cursor: default; transform: none; background: var(--surface); }
.caro__btn svg { width: 17px; height: 17px; }
.caro__dots { display: flex; gap: .35rem; align-items: center; justify-content: center; margin-top: .2rem; }
.caro__dots button {
  width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--line); transition: width .25s ease, background .25s ease;
}
.caro__dots button.is-on { width: 26px; border-radius: 5px; background: var(--signal); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal[data-dir="left"]  { transform: translateX(-30px); }
.reveal[data-dir="right"] { transform: translateX(30px); }
.reveal[data-dir="zoom"]  { transform: scale(.94); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .65s ease, transform .7s cubic-bezier(.2,.8,.25,1); }

/* ============================================================
   CRM DASHBOARD
   ============================================================ */
body.mode-app { overflow: hidden; }
body.mode-app .nav, body.mode-app .foot { display: none; }

.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); height: 100dvh; background: var(--bg); }
.app__side {
  background: var(--surface); border-right: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: .2rem; padding: 1rem .8rem; overflow-y: auto;
}
.app__brand { display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem 1rem; }
.app__brand img { height: 30px; transition: transform .25s ease; }
.app__brand:hover img { transform: scale(1.05); }
.side-lbl { font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); padding: 1rem .6rem .35rem; }
.side-link {
  display: flex; align-items: center; gap: .65rem; padding: .6rem .62rem; border-radius: var(--r-s);
  font-size: .875rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
  border: 1px solid transparent; position: relative;
  transition: background .2s ease, color .2s ease, transform .2s cubic-bezier(.2,.8,.25,1);
}
.side-link svg { width: 16px; height: 16px; flex: none; opacity: .75; transition: transform .25s cubic-bezier(.2,.8,.25,1); }
.side-link:hover { background: var(--tint); color: var(--ink); transform: translateX(3px); }
.side-link:hover svg { transform: scale(1.14); }
.side-link.is-on { background: var(--signal-wash); border-color: var(--signal-edge); color: var(--signal-ink); }
.side-link.is-on svg { opacity: 1; }
.side-link .badge { margin-left: auto; }
.app__side .btn { margin-top: auto; }

.app__main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.app__top {
  display: flex; align-items: center; gap: 1rem; padding: .9rem 1.4rem;
  border-bottom: 1px solid var(--line-soft); background: var(--surface); flex: none; flex-wrap: wrap;
}
.app__top h2 { font-family: var(--body); font-size: 1.08rem; font-weight: 800; letter-spacing: 0; }
.app__top .sp { flex: 1; }
.app__body { overflow-y: auto; padding: 1.4rem; display: flex; flex-direction: column; gap: 1.4rem; }
/* The panels slide in when you arrive at a section — and only then.
   A background refresh redraws the same section, and replaying this on
   every refresh is what made the dashboard look like it was blinking. */
.app__body.is-fresh > * { animation: rise .45s cubic-bezier(.2,.8,.25,1) both; }
.app__body.is-fresh > *:nth-child(1) { animation-delay: .02s }
.app__body.is-fresh > *:nth-child(2) { animation-delay: .08s }
.app__body.is-fresh > *:nth-child(3) { animation-delay: .14s }
.app__body.is-fresh > *:nth-child(4) { animation-delay: .2s }
.app__body.is-fresh > *:nth-child(5) { animation-delay: .26s }

.app__burger { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .app__side {
    position: fixed; inset: 0 auto 0 0; width: 252px; z-index: 80;
    transform: translateX(-100%); transition: transform .3s cubic-bezier(.2,.8,.25,1);
    box-shadow: var(--sh-3);
  }
  .app.is-open .app__side { transform: none; }
  .app__burger { display: inline-flex; }
  .app__scrim { position: fixed; inset: 0; background: rgba(20,26,38,.42); z-index: 79; animation: fadeUpSm .2s both; }
}

/* ---------- admin login gate ---------- */
.gate {
  min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem;
  position: relative;
}
.gate__card {
  width: min(430px, 100%); background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--r-l);
  box-shadow: var(--sh-3); padding: 2rem 1.8rem;
  display: flex; flex-direction: column; gap: 1.1rem;
  animation: riseIn3d .5s cubic-bezier(.2,.8,.25,1) both;
  position: relative; overflow: hidden;
}
.gate__card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--signal), var(--signal-edge), var(--signal));
  background-size: 200% 100%; animation: shimmer 3.5s linear infinite;
}
.gate__logo { display: grid; place-items: center; gap: .9rem; }
.gate__logo img { height: 42px; }
.gate__lock {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--signal-wash); border: 1px solid var(--signal-edge); color: var(--signal-ink);
  animation: bob 3s ease-in-out infinite;
}
.gate__lock svg { width: 22px; height: 22px; }
.gate h3 { text-align: center; font-family: var(--display); font-size: 1.25rem; }
.gate__sub { text-align: center; font-size: .88rem; color: var(--ink-3); }
.gate form { display: flex; flex-direction: column; gap: .85rem; }
.gate .btn { justify-content: center; }
.gate__foot { text-align: center; font-size: .78rem; color: var(--ink-3); }
.gate__foot a { color: var(--signal-ink); font-weight: 700; }
.remember { display: flex; align-items: center; gap: .5rem; font-size: .84rem; color: var(--ink-2); cursor: pointer; }
.remember input { width: 16px; height: 16px; accent-color: var(--signal); }

/* ---------- the genie brings the sign-in form ----------
   The stage carries the .gn class so it inherits the genie's colour tokens
   and its resting state; only the corner-bubble positioning is undone here.
   The timings below are slower than the corner genie's on purpose — there
   the point is to be quick, here it is a small piece of theatre: the lamp
   lands, smoke climbs out of the spout, and only then does he unfurl and
   hand the form over. */
.gate__stage.gn {
  position: relative; inset: auto; z-index: 1;
  display: block; width: min(280px, 62vw);
  margin: 0 auto -74px; pointer-events: none;
}
.gate__genie { width: 100%; }

/* 0 → .42s   the lamp lands */
.gate__stage.gn.is-in .gn-lamp {
  animation: gnLamp .42s cubic-bezier(.16,1.3,.4,1) both, gnWobble 1.1s .42s ease-in-out 2;
}
/* .42 → 1.2s  smoke out of the spout */
.gate__stage.gn.is-in .gn-smoke .p1 { animation: gnPuff .70s .42s ease-out both; }
.gate__stage.gn.is-in .gn-smoke .p2 { animation: gnPuff .75s .52s ease-out both; }
.gate__stage.gn.is-in .gn-smoke .p3 { animation: gnPuff .80s .62s ease-out both; }
.gate__stage.gn.is-in .gn-smoke .p4 { animation: gnPuff .85s .72s ease-out both; }
/* .78 → 1.33s  the genie unfurls out of it */
.gate__stage.gn.is-in .gn-aura { animation: gnAura .7s .80s cubic-bezier(.2,.8,.25,1) both; }
.gate__stage.gn.is-in .gn-body {
  animation: gnRise .55s .78s cubic-bezier(.18,1.25,.35,1) both, gnFloat 3.6s 1.4s ease-in-out infinite;
}
.gate__stage.gn.is-in .gn-head { animation: gnNod 3.6s 1.45s ease-in-out infinite; }
.gate__stage.gn.is-in .gn-arms { animation: gnBow 2.2s 1.30s ease-in-out 2; }
.gate__stage.gn.is-in .gn-eyes { animation: gnBlink 4.4s 1.65s steps(1, end) infinite; }
.gate__stage.gn.is-in .gn-sparks .s1 { animation: gnSpark 2.2s 1.15s ease-in-out infinite; }
.gate__stage.gn.is-in .gn-sparks .s2 { animation: gnSpark 2.6s 1.30s ease-in-out infinite; }
.gate__stage.gn.is-in .gn-sparks .s3 { animation: gnSpark 2.4s 1.45s ease-in-out infinite; }
.gate__stage.gn.is-in .gn-sparks .s4 { animation: gnSpark 2.8s 1.60s ease-in-out infinite; }

/* 1.28 → 1.78s  and hands the form over */
.gate--summon .gate__card {
  position: relative; z-index: 2;
  animation: gateHandOver .52s 1.28s cubic-bezier(.16,1.2,.4,1) both;
}
@keyframes gateHandOver {
  0%   { opacity: 0; transform: translateY(30px) scale(.9); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  .gate__stage.gn { width: min(210px, 56vw); margin-bottom: -56px; }
}
/* Someone who has asked for less motion gets the card, and only the card. */
@media (prefers-reduced-motion: reduce) {
  .gate__stage.gn { display: none; }
  .gate--summon .gate__card { animation: none; }
}

/* KPI tiles */
.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 212px), 1fr)); }
.kpi {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-m);
  padding: 1.05rem 1.15rem; display: flex; flex-direction: column; gap: .45rem;
  position: relative; overflow: hidden; box-shadow: var(--sh-1);
  transition: transform .28s cubic-bezier(.2,.8,.25,1), box-shadow .28s ease;
}
.kpi::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, var(--signal), var(--signal-edge));
  transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2,.8,.25,1);
}
.kpi:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.kpi:hover::after { transform: scaleX(1); }
.kpi__l { font-family: var(--mono); font-size: .63rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.kpi__v { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi__d { font-size: .76rem; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }

/* panels */
.panel {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-m);
  display: flex; flex-direction: column; min-width: 0; box-shadow: var(--sh-1);
}
.panel__h { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .95rem 1.15rem; border-bottom: 1px solid var(--line-soft); }
.panel__h h3 { font-size: .95rem; }
.panel__h .sp { flex: 1; }
.panel__b { padding: 1.15rem; min-width: 0; }
.panel__b--flush { padding: 0; }
.two-col { display: grid; gap: 1.4rem; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 640px; }
table.tbl th {
  text-align: left; font-family: var(--mono); font-weight: 500;
  font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  padding: .7rem 1.15rem; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--surface-2);
}
table.tbl td { padding: .74rem 1.15rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.tbl tbody tr { transition: background .18s ease; }
table.tbl tbody tr:hover { background: var(--signal-wash); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl .r { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.t-name { color: var(--ink); font-weight: 700; }
.t-sub { font-size: .76rem; color: var(--ink-3); }
.row-act { display: flex; gap: .3rem; justify-content: flex-end; }
.icon-btn {
  background: transparent; border: 1px solid transparent; border-radius: var(--r-s);
  width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; color: var(--ink-3);
  transition: background .18s ease, color .18s ease, transform .18s cubic-bezier(.2,.8,.25,1);
}
.icon-btn:hover { background: var(--tint); color: var(--ink); border-color: var(--line); transform: scale(1.1); }
.icon-btn svg { width: 15px; height: 15px; }

/* badges / pills */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .24rem .55rem; border-radius: 100px; border: 1px solid; white-space: nowrap;
}
.badge .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.b-ok   { color: var(--ok);   border-color: var(--ok-edge);   background: var(--ok-bg); }
.b-warn { color: var(--warn); border-color: var(--warn-edge); background: var(--warn-bg); }
.b-crit { color: var(--crit); border-color: var(--crit-edge); background: var(--crit-bg); }
.b-crit .d { animation: pulseSoft 1.5s ease-in-out infinite; }
.b-info { color: var(--info); border-color: var(--info-edge); background: var(--info-bg); }
.b-mute { color: var(--ink-3); border-color: var(--line); background: var(--tint); }
.b-sig  { color: var(--signal-ink); border-color: var(--signal-edge); background: var(--signal-wash); }

/* severity stripe */
.stripe { border-left: 3px solid transparent; }
.stripe--crit { border-left-color: var(--crit); }
.stripe--warn { border-left-color: var(--warn); }

/* avatar — tinted, so it reads on a white surface */
.av {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: .64rem; font-weight: 700;
  background: color-mix(in srgb, var(--hue, #2A6FD6) 15%, #FFFFFF);
  color: var(--hue, #2A6FD6);
  border: 1px solid color-mix(in srgb, var(--hue, #2A6FD6) 32%, #FFFFFF);
  transition: transform .2s cubic-bezier(.2,.8,.25,1);
}
.av:hover { transform: scale(1.12) rotate(-4deg); }
.av--lg { width: 42px; height: 42px; font-size: .8rem; }

/* kanban pipeline */
.kanban { display: grid; gap: .9rem; grid-auto-flow: column; grid-auto-columns: minmax(258px, 1fr); overflow-x: auto; padding: .2rem .2rem .5rem; align-items: start; }
.col {
  background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-m);
  display: flex; flex-direction: column; min-height: 130px;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.col.is-over { border-color: var(--signal); background: var(--signal-wash); box-shadow: var(--sh-2); }
.col__h { display: flex; align-items: center; gap: .5rem; padding: .78rem .9rem; border-bottom: 1px solid var(--line-soft); }
.col__h .nm { font-size: .78rem; font-weight: 800; color: var(--ink); }
.col__h .ct { margin-left: auto; font-family: var(--mono); font-size: .68rem; color: var(--ink-3); }
.col__dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.col__b { padding: .6rem; display: flex; flex-direction: column; gap: .55rem; }
.col__sum { padding: .58rem .9rem; border-top: 1px solid var(--line-soft); font-family: var(--mono); font-size: .68rem; color: var(--ink-3); display: flex; justify-content: space-between; }

.lead-card {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-s);
  padding: .72rem .82rem; display: flex; flex-direction: column; gap: .45rem;
  cursor: grab; box-shadow: var(--sh-1);
  transition: box-shadow .22s ease, transform .22s cubic-bezier(.2,.8,.25,1), border-color .22s ease;
  animation: popIn .32s cubic-bezier(.2,.8,.25,1) both;
}
.lead-card:hover { border-color: var(--signal-edge); transform: translateY(-3px) scale(1.015); box-shadow: var(--sh-2); }
.lead-card.is-drag { opacity: .35; transform: rotate(2deg); }
.lead-card__t { display: flex; gap: .5rem; align-items: center; }
.lead-card__n { font-size: .85rem; font-weight: 700; color: var(--ink); line-height: 1.25; }
.lead-card__c { font-size: .74rem; color: var(--ink-3); }
.lead-card__f { display: flex; align-items: center; gap: .5rem; justify-content: space-between; }
.lead-card__v { font-family: var(--mono); font-size: .8rem; color: var(--signal-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.svc-tag { display: inline-flex; align-items: center; gap: .35rem; font-size: .7rem; color: var(--ink-3); }
.svc-tag .d { width: 7px; height: 7px; border-radius: 2px; flex: none; }

/* charts */
.chart-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .7rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; color: var(--ink-2); }
.chart-legend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.chart-tip {
  position: fixed; z-index: 200; pointer-events: none;
  background: var(--ink); border-radius: var(--r-s); padding: .5rem .68rem;
  font-size: .78rem; color: #FFFFFF; box-shadow: var(--sh-3); min-width: 120px;
  animation: popIn .14s ease both;
}
.bar-row { display: grid; grid-template-columns: 142px minmax(0,1fr) 88px; gap: .8rem; align-items: center; padding: .4rem 0; }
.bar-row .bl { font-size: .82rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { display: block; background: var(--tint); border-radius: 0 5px 5px 0; height: 15px; position: relative; overflow: hidden; }
.bar-fill {
  display: block; height: 100%; border-radius: 0 5px 5px 0;
  transform-origin: left; animation: barGrow .8s cubic-bezier(.2,.8,.25,1) both;
}
@keyframes barGrow { from { transform: scaleX(0) } to { transform: scaleX(1) } }
.bar-row:nth-child(2) .bar-fill { animation-delay: .06s }
.bar-row:nth-child(3) .bar-fill { animation-delay: .12s }
.bar-row:nth-child(4) .bar-fill { animation-delay: .18s }
.bar-row:nth-child(5) .bar-fill { animation-delay: .24s }
.bar-row .bv { font-family: var(--mono); font-size: .8rem; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 94px minmax(0,1fr) 72px; gap: .5rem; } }

.spark-line { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: dash 1.5s .15s cubic-bezier(.3,.8,.3,1) forwards; }
@keyframes dash { to { stroke-dashoffset: 0 } }

/* modal */
.modal-scrim {
  position: fixed; inset: 0; z-index: 150; background: rgba(20,26,38,.4);
  backdrop-filter: blur(5px); display: grid; place-items: center; padding: 1rem; overflow-y: auto;
  animation: fadeUpSm .2s both;
}
.modal {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-l);
  width: min(640px, 100%); max-height: calc(100dvh - 2rem); display: flex; flex-direction: column;
  box-shadow: var(--sh-3); animation: riseIn3d .34s cubic-bezier(.2,.8,.25,1) both;
}
.modal__h { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line-soft); }
.modal__h h3 { flex: 1; }
.modal__b { padding: 1.3rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.modal__f { padding: 1rem 1.3rem; border-top: 1px solid var(--line-soft); display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 var(--r-l) var(--r-l); }

/* toast */
#toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 300; display: flex; flex-direction: column; gap: .5rem; max-width: min(360px, calc(100vw - 2rem)); }
.toast {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--signal);
  border-radius: var(--r-s); padding: .75rem .95rem; font-size: .85rem; color: var(--ink);
  box-shadow: var(--sh-3); animation: slidein .3s cubic-bezier(.2,.8,.25,1);
}
.toast--ok { border-left-color: var(--ok); }
.toast--err { border-left-color: var(--crit); }
@keyframes slidein { from { opacity: 0; transform: translateX(26px) } }

/* ============================================================
   DASHBOARD — page builder, theme picker, SEO panel
   ============================================================ */
.blk-list { display: flex; flex-direction: column; gap: .7rem; }
.blk { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2); overflow: hidden; }
.blk__h { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.blk__n { width: 22px; height: 22px; border-radius: 50%; background: var(--signal-wash); border: 1px solid var(--signal-edge);
          color: var(--signal-ink); display: grid; place-items: center; font-family: var(--mono); font-size: .64rem; flex: none; }
.blk__t { font-size: .86rem; font-weight: 700; color: var(--ink); }
.blk__b { padding: .85rem .8rem; }
.blk-add { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.blk-add__b {
  text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-s); padding: .6rem .7rem; display: flex; flex-direction: column; gap: .12rem;
  transition: border-color .18s ease, transform .18s cubic-bezier(.2,.8,.25,1), background .18s ease;
}
.blk-add__b:hover { border-color: var(--signal); background: var(--signal-wash); transform: translateY(-2px); }
.blk-add__t { font-size: .84rem; font-weight: 700; color: var(--ink); }
.blk-add__s { font-size: .73rem; color: var(--ink-3); line-height: 1.35; }

.menu-row { border: 1px solid var(--line-soft); border-radius: var(--r-s); padding: .8rem; background: var(--surface-2); }

/* ---------- picture picker ---------- */
.imgpick { display: grid; grid-template-columns: 190px 1fr; gap: .85rem; align-items: start; }
.imgpick__prev {
  position: relative; display: grid; place-items: center;
  width: 100%; aspect-ratio: 16 / 10; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px dashed var(--line); border-radius: var(--r-m);
  background: var(--tint); color: var(--ink-3);
  transition: border-color .2s ease, background .2s ease;
}
.imgpick__prev:hover,
.imgpick__prev.is-over { border-color: var(--signal); background: var(--signal-wash, var(--tint)); color: var(--ink-2); }
.imgpick__prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* a class that sets display beats the hidden attribute — say it once, here,
   so a picture and the "choose a picture" placeholder never stack up */
[hidden] { display: none !important; }
.imgpick__empty {
  display: grid; justify-items: center; gap: .35rem; padding: .5rem;
  font-size: .72rem; font-weight: 600; line-height: 1.3; text-align: center;
}
.imgpick__empty svg { width: 26px; height: 26px; }
.imgpick__side { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.imgpick.is-busy { opacity: .55; pointer-events: none; }
.imgpick .form-note { word-break: break-word; }
.imgpick .form-note.is-err { color: var(--crit); font-weight: 600; }
@media (max-width: 620px) { .imgpick { grid-template-columns: 1fr; } }

/* one click puts a real page into the menu */
.pagechip {
  display: inline-flex; align-items: center; gap: .3rem;
  font: inherit; font-size: .78rem; font-weight: 600; line-height: 1;
  padding: .42rem .7rem; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--signal-edge, var(--line));
  background: var(--surface); color: var(--ink);
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.pagechip svg { width: 13px; height: 13px; }
.pagechip:hover { background: var(--signal-wash, var(--tint)); transform: translateY(-1px); }
.pagechip.is-on {
  cursor: default; border-style: dashed; border-color: var(--line);
  background: transparent; color: var(--ink-3); font-weight: 500;
}
.pagechip.is-on:hover { transform: none; background: transparent; }

.col-in { display: flex; gap: .5rem; align-items: center; }
.col-in input[type="color"] {
  width: 46px; height: 42px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); cursor: pointer; flex: none;
}
.preset-row { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 158px), 1fr)); }
.preset {
  display: flex; align-items: center; gap: .5rem; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-s);
  padding: .55rem .7rem; font-size: .84rem; font-weight: 600; color: var(--ink);
  transition: border-color .18s ease, transform .18s cubic-bezier(.2,.8,.25,1);
}
.preset:hover { border-color: var(--signal); transform: translateY(-2px); }
.preset__sw { width: 16px; height: 16px; border-radius: 5px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.theme-prev { border: 1px dashed var(--line); border-radius: var(--r-m); padding: 1.2rem; display: flex; flex-direction: column; gap: .7rem; align-items: flex-start; }

.seo-prev {
  border: 1px solid var(--line); border-radius: var(--r-s); padding: .85rem 1rem;
  display: flex; flex-direction: column; gap: .15rem; background: var(--surface);
}
.seo-prev__u { font-size: .78rem; color: #0B7A2E; word-break: break-all; }
.seo-prev__t { font-size: 1.05rem; color: #1A0DAB; font-family: var(--body); line-height: 1.3; }
.seo-prev__d { font-size: .84rem; color: #4D5156; line-height: 1.5; }

.seo-checks { display: flex; flex-direction: column; gap: .1rem; }
.seo-check { display: grid; grid-template-columns: 14px 1fr; gap: .55rem; align-items: start; padding: .4rem 0; border-bottom: 1px solid var(--line-soft); }
.seo-check:last-child { border-bottom: 0; }
.seo-check .dotc { width: 9px; height: 9px; border-radius: 50%; margin-top: .42rem; }
.seo-check--ok   .dotc { background: var(--ok); }
.seo-check--warn .dotc { background: var(--warn); }
.seo-check--bad  .dotc { background: var(--crit); }
.ck-l { display: block; font-size: .85rem; color: var(--ink); font-weight: 600; }
.ck-h { display: block; font-size: .78rem; color: var(--ink-3); line-height: 1.4; }

/* the ?fx=test panel */
.fxrep {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 90; width: min(430px, calc(100% - 2rem));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--sh-3); padding: .9rem 1rem; font-size: .8rem; color: var(--ink-2);
}
.fxrep__h { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.fxrep__h strong { font-size: .92rem; color: var(--ink); }
.fxrep__h button { margin-left: auto; border: 0; background: transparent; cursor: pointer; font-size: 1rem; color: var(--ink-3); }
.fxrep table { width: 100%; border-collapse: collapse; }
.fxrep td { padding: .3rem 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.fxrep td:nth-child(2) { width: 4.5rem; text-align: right; padding-right: .6rem; }
.fxrep td:nth-child(3) { font-size: .74rem; color: var(--ink-3); }
.fxrep p { margin: .6rem 0 0; font-size: .76rem; color: var(--ink-3); }

/* ============================================================
   VISITORS — the little column chart
   ============================================================ */
.vgrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); }
/* these tables are narrow on purpose — two or three short columns, no scroll */
.vgrid table.tbl { min-width: 0; font-size: .84rem; }
.vgrid table.tbl th, .vgrid table.tbl td { padding: .55rem .9rem; }
.vcols { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding-top: .3rem; }
.vcol { flex: 1 1 0; max-width: 42px; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.vcol i {
  display: block; width: 100%; border-radius: 3px 3px 0 0;
  background: var(--signal-chart, #FFC800);
  transition: background .18s ease, transform .18s ease;
  animation: barGrow .5s cubic-bezier(.2,.8,.25,1) both;
}
.vcol:hover i { background: var(--signal-ink, #B88A00); }
@keyframes barGrow { from { transform: scaleY(0); transform-origin: bottom; } to { transform: none; } }

/* a small picture in a dashboard list */
.thumb { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line-soft); display: block; background: var(--tint); }
.thumb--none { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 36px;
  border-radius: 6px; border: 1px dashed var(--line); color: var(--ink-3); font-size: .68rem; font-family: var(--mono); }

/* ============================================================
   WRITING AN ARTICLE — the little toolbar and the link picker
   ============================================================ */
.mdbar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-bottom: .4rem; }
.mdbar button {
  font: inherit; font-size: .78rem; font-weight: 600; line-height: 1;
  padding: .38rem .6rem; border-radius: var(--r-s); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: .25rem;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.mdbar button:hover { border-color: var(--signal); background: var(--signal-wash); color: var(--ink); }
.mdbar button.is-key { border-color: var(--signal); color: var(--ink); font-weight: 700; }
.mdbar button svg { width: 12px; height: 12px; }
.mdbar .sp { flex: 1; }
.mdbar__gap { width: .5rem; }
.mdbar__hl { background: var(--signal-wash, #FFF3C4); padding: 0 .18rem; border-radius: 3px; }

.lnkpick { position: fixed; inset: 0; z-index: 10100;   /* above the editor it was opened from */ display: grid; place-items: center; padding: 1rem;
  background: rgba(12,14,18,.45); backdrop-filter: blur(2px); }
.lnkpick__card { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-l); box-shadow: var(--sh-3); padding: 1.1rem 1.2rem 1.2rem; }
.lnkpick__h { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.lnkpick__h h3 { margin: 0; font-size: 1.05rem; }
.lnkpick__h .icon-btn { margin-left: auto; }
.lnk-list { max-height: 46vh; overflow: auto; margin-top: .7rem; display: grid; gap: .8rem; }
.lnk-g { display: grid; gap: .2rem; }
.lnk-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center;
  width: 100%; text-align: left; font: inherit; cursor: pointer; color: var(--ink);
  padding: .45rem .6rem; border-radius: var(--r-s); border: 1px solid var(--line-soft); background: transparent;
}
.lnk-row:hover { border-color: var(--signal); background: var(--signal-wash); }
.lnk-row__t { font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lnk-row__p { font-size: .72rem; color: var(--ink-3); white-space: nowrap; }
.lnk-row[hidden], .lnk-g[hidden] { display: none !important; }

/* pictures, quotes and lists written into an article */
.prose-fig { margin: 1.3rem 0; }
.prose-fig img { width: 100%; height: auto; display: block; border-radius: var(--r-m); border: 1px solid var(--line-soft); }
.prose-fig figcaption { margin-top: .45rem; font-size: .8rem; color: var(--ink-3); text-align: center; }
.prose h2 { margin: 1.7rem 0 .6rem; font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
.prose h3 { margin: 1.3rem 0 .5rem; font-size: 1.08rem; }
.prose h4 { margin: 1.1rem 0 .4rem; font-size: .98rem; }
.prose ul, .prose ol { margin: .7rem 0 .9rem 1.2rem; display: grid; gap: .35rem; }
.prose li { font-size: .95rem; line-height: 1.65; }
.prose blockquote {
  margin: 1.1rem 0; padding: .8rem 1.05rem; border-left: 3px solid var(--signal);
  background: var(--tint); border-radius: 0 var(--r-s) var(--r-s) 0; font-size: .96rem; color: var(--ink-2);
}
.prose code { font-family: var(--mono); font-size: .86em; background: var(--tint); padding: .1rem .35rem; border-radius: 4px; }
.prose h1.prose-h { margin: 1.9rem 0 .7rem; font-size: clamp(1.5rem, 3vw, 2.05rem); line-height: 1.15; }
.prose .prose-big { font-size: 1.1rem; line-height: 1.6; color: var(--ink); }
.prose .prose-small { font-size: .84rem; color: var(--ink-3); }
.prose mark { background: var(--signal-wash, #FFF3C4); color: inherit; padding: .05rem .2rem; border-radius: 3px; }
.prose s { color: var(--ink-3); }
.prose-hr { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0; }
.prose a { color: var(--signal-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   FREE SEO CHECK — /seo-audit
   ============================================================ */
.audit-form { display: flex; flex-wrap: wrap; gap: .6rem; max-width: 640px; }
.audit-form .inp { flex: 1 1 18rem; font-size: 1rem; }
.audit-card { padding: 1.3rem 1.4rem; }
.audit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; margin-bottom: 1rem; }
.audit-ring {
  --p: 0; flex: none; width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; position: relative; color: var(--ink);
  background: conic-gradient(var(--rc) calc(var(--p) * 1%), var(--line-soft) 0);
}
.audit-ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.audit-ring span { position: relative; z-index: 1; font-size: 1.5rem; font-weight: 800; line-height: 1; }
.audit-ring small { position: relative; z-index: 1; font-size: .66rem; color: var(--ink-3); font-family: var(--mono); }
.audit-ring--ok { --rc: var(--ok); }
.audit-ring--warn { --rc: var(--warn); }
.audit-ring--crit { --rc: var(--crit); }
.audit-list { display: grid; }
.audit-row { display: grid; grid-template-columns: 14px 1fr; gap: .55rem; align-items: start;
  padding: .55rem 0; border-bottom: 1px solid var(--line-soft); }
.audit-row:last-child { border-bottom: 0; }
.audit-row .dotc { width: 9px; height: 9px; border-radius: 50%; margin-top: .42rem; }
.audit-row--ok .dotc { background: var(--ok); }
.audit-row--warn .dotc { background: var(--warn); }
.audit-row--bad .dotc { background: var(--crit); }
.audit-gate {
  margin-top: 1rem; padding: 1rem 1.1rem; border-radius: var(--r-m);
  background: var(--signal-wash, var(--tint)); border: 1px solid var(--line);
}
.audit-gate h4 { margin: 0 0 .25rem; font-size: 1rem; }
.audit-gate p { margin: 0; font-size: .85rem; color: var(--ink-2); }

.auditband {
  display: grid; gap: 1.1rem; grid-template-columns: 1.1fr 1fr; align-items: center;
  padding: 1.5rem 1.6rem; border-radius: var(--r-l);
  border: 1px solid var(--line); background: var(--signal-wash, var(--tint)); box-shadow: var(--sh-1);
}
.auditband h2 { margin: .25rem 0 .3rem; font-size: clamp(1.25rem, 2.2vw, 1.7rem); }
.auditband p { margin: 0; font-size: .9rem; color: var(--ink-2); max-width: 46ch; }
.auditband__f { display: flex; flex-wrap: wrap; gap: .55rem; }
.auditband__f .inp { flex: 1 1 13rem; }
@media (max-width: 800px) { .auditband { grid-template-columns: 1fr; } }
.sidecard--audit { background: var(--signal-wash, var(--tint)); }

/* ============================================================
   LEAD CAPTURE — quote button, article box, exit notice
   ============================================================ */
.lead-fab {
  /* sits directly above the lamp in the corner, never on top of it */
  position: fixed; left: clamp(.8rem, 2.5vw, 1.6rem);
  bottom: calc(clamp(.8rem, 2.5vh, 1.6rem) + 3.6rem); z-index: 60;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.05rem; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 700; color: var(--ink);
  background: var(--signal, #FFC800); box-shadow: var(--sh-2);
  transition: transform .2s cubic-bezier(.2,.8,.25,1), box-shadow .2s ease;
}
.lead-fab:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.lead-fab__i { display: inline-flex; }
.lead-fab__i svg { width: 15px; height: 15px; }
@media (max-width: 560px) { .lead-fab { padding: .62rem .85rem; font-size: .8rem; } }
/* with the lamp switched off it drops back into the corner */
.lead-fab--low { bottom: clamp(.8rem, 2.5vh, 1.6rem) !important; }

.leadmodal {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center;
  padding: 1rem; background: rgba(12,14,18,.45); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .24s ease;
}
.leadmodal.is-in { opacity: 1; }
.leadmodal__card {
  position: relative; width: min(520px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--sh-3);
  padding: 1.4rem 1.4rem 1.2rem; transform: translateY(14px); transition: transform .28s cubic-bezier(.2,.8,.25,1);
}
.leadmodal.is-in .leadmodal__card { transform: none; }
.leadmodal__card h3 { margin: 0 0 .2rem; font-size: 1.15rem; }
.leadmodal__p { margin: .1rem 0 .7rem; font-size: .88rem; color: var(--ink-2); }
.leadmodal__x {
  position: absolute; right: .7rem; top: .7rem; border: 0; background: transparent;
  font-size: 1.05rem; color: var(--ink-3); cursor: pointer; line-height: 1;
}

.leadform { display: grid; gap: .55rem; margin-top: .8rem; }
.leadform__row { display: grid; gap: .55rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .leadform__row { grid-template-columns: 1fr; } }
.leadform textarea.inp { min-height: 68px; resize: vertical; }
.leadform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.leadform__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; margin-top: .15rem; }
.leadform__foot .form-note { margin: 0; flex: 1 1 12rem; }
.leadform__foot .form-note.is-err { color: var(--crit); font-weight: 600; }

.leadbox {
  display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; align-items: start;
  margin: 1.6rem 0; padding: 1.25rem 1.3rem;
  border: 1px solid var(--line); border-radius: var(--r-l);
  background: var(--signal-wash, var(--tint)); box-shadow: var(--sh-1);
}
.leadbox h3 { margin: .3rem 0 .35rem; font-size: 1.12rem; }
.leadbox p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.leadbox .leadform { margin-top: 0; }
@media (max-width: 860px) { .leadbox { grid-template-columns: 1fr; } }

/* ============================================================
   COOKIE NOTICE
   ============================================================ */
.ckbar {
  position: fixed; left: 50%; bottom: 1rem; transform: translate(-50%, 140%);
  z-index: 70; width: min(760px, calc(100% - 1.6rem));
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem;
  padding: .9rem 1.1rem; border-radius: var(--r-m);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-3);
  opacity: 0; transition: transform .38s cubic-bezier(.2,.8,.25,1), opacity .3s ease;
}
.ckbar.is-in { transform: translate(-50%, 0); opacity: 1; }
.ckbar__t { margin: 0; flex: 1 1 18rem; font-size: .84rem; line-height: 1.45; color: var(--ink-2); }
.ckbar__t a { color: var(--signal-ink); font-weight: 700; }
.ckbar__b { display: flex; gap: .5rem; margin-left: auto; }
@media (max-width: 560px) {
  .ckbar { bottom: .6rem; padding: .85rem .9rem; }
  .ckbar__b { width: 100%; margin-left: 0; }
  .ckbar__b .btn { flex: 1; justify-content: center; }
}

/* ============================================================
   ARTICLE PAGE — text column plus the column beside it
   ============================================================ */
.postwrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 320px); gap: 2rem; align-items: start; margin-top: 1rem; }
.postmain { min-width: 0; }
.postside { display: grid; gap: 1rem; position: sticky; top: 92px; }
.sidecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.05rem 1.1rem; box-shadow: var(--sh-1); }
.sidecard__h { font-size: .95rem; margin: 0 0 .6rem; }
.sidecard--cta { background: var(--signal-wash, var(--tint)); }
.sidelist { display: grid; }
.sidelist a { display: grid; gap: .2rem; padding: .55rem 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); }
.sidelist a:last-child { border-bottom: 0; }
.sidelist a:hover .sidelist__t { color: var(--signal-ink); }
.sidelist__t { font-size: .87rem; font-weight: 600; line-height: 1.35; }
@media (max-width: 1000px) {
  .postwrap { grid-template-columns: 1fr; gap: 1.4rem; }
  .postside { position: static; }
}

/* ============================================================
   SEO HEALTH
   ============================================================ */
.flash--warn { background: var(--warn-bg); border: 1px solid var(--warn-edge); color: #7A4F00; }

.health-top { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .health-top { grid-template-columns: 1fr; } }
.kpis--stack { grid-template-columns: 1fr; }
.health-hero__b { display: flex; gap: 1.3rem; align-items: center; flex-wrap: wrap; }

/* score ring — conic gradient, animated on entry */
.ring {
  --p: 0; --rc: var(--signal);
  width: 124px; height: 124px; flex: none; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--rc) calc(var(--p) * 1%), var(--line) 0);
  animation: ringIn .9s cubic-bezier(.2,.8,.25,1) both;
}
.ring--sm { width: 84px; height: 84px; }
.ring::after {
  content: ""; position: absolute; inset: 9px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 1px 3px rgba(20,28,44,.07);
}
.ring--sm::after { inset: 7px; }
.ring__n {
  position: relative; z-index: 1; font-family: var(--display);
  font-size: 2rem; font-weight: 800; line-height: 1; color: var(--ink);
}
.ring--sm .ring__n { font-size: 1.4rem; }
.ring__u { position: relative; z-index: 1; font-size: .66rem; color: var(--ink-3); letter-spacing: .06em; }
@keyframes ringIn { from { transform: rotate(-90deg) scale(.82); opacity: 0; } to { transform: none; opacity: 1; } }

.health-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; margin-top: .35rem; max-width: 320px; }
.health-bar i { display: block; border-radius: 2px; animation: barGrowX .7s .15s cubic-bezier(.2,.8,.25,1) both; }
@keyframes barGrowX { from { transform: scaleX(0); } to { transform: none; } }

.health-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }

a.seo-check--go {
  grid-template-columns: 14px 1fr auto; text-decoration: none; align-items: center;
  border-radius: var(--r-s); padding: .45rem .5rem; margin: 0 -.5rem;
  transition: background .18s ease;
}
a.seo-check--go:hover { background: var(--signal-wash); }
.ck-go {
  display: inline-flex; align-items: center; gap: .25rem; font-size: .74rem; font-weight: 700;
  color: var(--signal-ink); opacity: 0; transition: opacity .18s ease; white-space: nowrap;
}
a.seo-check--go:hover .ck-go { opacity: 1; }
a.seo-check--bad .ck-go { opacity: .8; }

/* every problem shows its Fix link without hovering */
.ck-go--on { opacity: 1; }
.seo-check-d { border-bottom: 1px solid var(--line-soft); }
.seo-check-d:last-child { border-bottom: 0; }
.seo-check-d > summary { list-style: none; cursor: pointer; border-bottom: 0; grid-template-columns: 14px 1fr auto;
  align-items: center; border-radius: var(--r-s); padding: .45rem .5rem; margin: 0 -.5rem; transition: background .18s ease; }
.seo-check-d > summary::-webkit-details-marker { display: none; }
.seo-check-d > summary:hover { background: var(--signal-wash); }
.seo-check-d > summary .ck-go svg { transition: transform .18s ease; }
.seo-check-d[open] > summary .ck-go svg { transform: rotate(90deg); }
.ck-items { display: grid; gap: .3rem; padding: .2rem 0 .7rem 1.4rem; }
.ck-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .6rem; align-items: center; width: 100%; text-align: left;
  font: inherit; background: transparent; border: 1px solid var(--line-soft); border-radius: var(--r-s);
  padding: .45rem .6rem; cursor: pointer; color: var(--ink); transition: border-color .15s ease, background .15s ease; }
.ck-item:hover { border-color: var(--signal); background: var(--signal-wash); }
.ck-item__t { font-size: .82rem; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ck-item__m { grid-column: 1; grid-row: 2; }
.ck-item__go { grid-column: 2; grid-row: 1 / span 2; }
.ck-item__m { font-size: .74rem; color: var(--ink-3); white-space: nowrap; }
.ck-item__go { display: inline-flex; align-items: center; gap: .2rem; font-size: .74rem; font-weight: 700; color: var(--signal-ink); white-space: nowrap; }
@media (max-width: 520px) { .ck-items { padding-left: .4rem; } }
/* SEO health: the counts are filters */
.health-bar i[data-hfilter] { cursor: pointer; }
.health-bar i[data-hfilter]:hover { filter: brightness(1.15); }
.hf-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.hf { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .78rem; font-weight: 700;
  padding: .32rem .7rem; border-radius: 999px; cursor: pointer; border: 1px solid var(--line-soft); background: transparent; color: var(--ink);
  transition: background .15s ease, border-color .15s ease; }
.hf .d { width: 8px; height: 8px; border-radius: 50%; }
.hf--bad .d { background: var(--crit); } .hf--warn .d { background: var(--warn); } .hf--ok .d { background: var(--ok); }
.hf--bad { border-color: var(--crit); color: var(--crit); }
.hf--warn { border-color: var(--warn); color: #7A4F00; }
.hf:hover:not([disabled]), .hf.is-on { background: var(--signal-wash); border-color: var(--signal); }
.hf[disabled] { opacity: .45; cursor: default; }
.hf--all { color: var(--ink-3); }
.hf-note { margin: 0; padding: .6rem .9rem; border-radius: var(--r-s); background: var(--signal-wash); font-size: .85rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; scroll-margin-top: 80px; }
.hf-note[hidden], .health-grid .panel[hidden], .health-grid [data-st][hidden] { display: none !important; }
.flash--warn { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.field.is-flash { border-radius: var(--r-s); box-shadow: 0 0 0 3px var(--signal); }

.issues { display: flex; flex-wrap: wrap; gap: .3rem; max-width: 46ch; }
.issue {
  font-size: .7rem; font-weight: 600; padding: .16rem .45rem; border-radius: 99px;
  border: 1px solid var(--warn-edge); background: var(--warn-bg); color: #7A4F00;
}
.issue--bad { border-color: var(--crit-edge); background: var(--crit-bg); color: var(--crit); }

/* overview widget */
.seo-mini { display: flex; gap: 1rem; align-items: center; }
.seo-mini__t { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }

/* empty state */
.empty { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 2.8rem 1rem; text-align: center; color: var(--ink-3); }
.empty h4 { color: var(--ink); }

/* notes / timeline */
.note { display: grid; grid-template-columns: 26px 1fr; gap: .7rem; padding: .62rem 0; border-bottom: 1px solid var(--line-soft); transition: background .18s ease; }
.note:last-child { border-bottom: 0; }
a.note:hover { background: var(--signal-wash); }
.note__d { font-family: var(--mono); font-size: .64rem; color: var(--ink-3); }

/* progress */
.prog { height: 8px; background: var(--tint); border-radius: 100px; overflow: hidden; min-width: 80px; }
.prog i {
  display: block; height: 100%; border-radius: 100px;
  background-image: linear-gradient(90deg, var(--signal), var(--signal-hi)),
    repeating-linear-gradient(115deg, rgba(255,255,255,.45) 0 8px, transparent 8px 16px);
  background-blend-mode: overlay;
  animation: stripes 1.1s linear infinite, barGrow .9s cubic-bezier(.2,.8,.25,1) both;
  transform-origin: left;
}

/* ---------- utilities ---------- */
.row { display: flex; align-items: center; gap: .6rem; }
.row-wrap { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sp { flex: 1; }
.tr { text-align: right; }
@media (max-width: 700px) { .hide-sm { display: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
code.num { background: var(--tint); padding: .1rem .35rem; border-radius: 4px; font-size: .85em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .seq > *, .app__body > * { opacity: 1 !important; transform: none !important; }
  .bar-fill, .prog i { transform: none !important; }
  /* no flip, no tilt, no sheen — the screenshot simply stays put */
  .wcard__faces, .wcard--flip:hover .wcard__faces { will-change: transform; }
  .wcard--flip:hover .wcard__faces,
  .wcard--flip:focus-visible .wcard__faces { transform: none !important; }
  .wcard__back, .wcard__glare { display: none !important; }
  .wcard--flip .wcard__shot::after { content: "View project" !important; transform: none !important; }
  .scribble path { stroke-dashoffset: 0 !important; }
  .hchip, .rev, .svc, .wcard__shot { opacity: 1 !important; transform: none !important; }
  .deco, #fx .layer { transform: none !important; }
  .caro__track { scroll-behavior: auto; }
  .spark-line { stroke-dashoffset: 0 !important; }
}

/* ============================================================
   CURSOR & MOTION LAYER
   Everything here is opt-in: it only exists once fx.js has put
   .fx-live on <html>, which it refuses to do on a touch device
   or when the visitor has asked for reduced motion.
   ============================================================ */

/* ---------- the cursor itself ---------- */
.fxc {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0; transition: opacity .3s ease;
}
.fxc.is-on { opacity: 1; }
html.fx-no-cursor .fxc { display: none; }

.fxc__dot, .fxc__ring {
  position: absolute; top: 0; left: 0; border-radius: 50%;
  will-change: transform;
}
.fxc__dot {
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  background: var(--signal); box-shadow: 0 0 10px 2px rgba(255,200,0,.55);
  transform: translate3d(var(--dx, 0), var(--dy, 0), 0);
  transition: width .25s cubic-bezier(.2,.8,.25,1), height .25s cubic-bezier(.2,.8,.25,1),
              margin .25s cubic-bezier(.2,.8,.25,1), opacity .25s ease;
}
.fxc__ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1.5px solid var(--signal-edge);
  background: radial-gradient(circle at 50% 50%, rgba(255,200,0,.1), transparent 70%);
  transform: translate3d(var(--rx, 0), var(--ry, 0), 0) rotate(var(--ang, 0deg)) scale(var(--stretch, 1), var(--squash, 1));
  transition: width .3s cubic-bezier(.2,.8,.25,1), height .3s cubic-bezier(.2,.8,.25,1),
              margin .3s cubic-bezier(.2,.8,.25,1), border-color .3s ease, background .3s ease, opacity .3s ease;
}
/* over something clickable — the ring opens up and the dot shrinks away */
.fxc.is-link .fxc__ring {
  width: 60px; height: 60px; margin: -30px 0 0 -30px;
  border-color: var(--signal); background: radial-gradient(circle at 50% 50%, rgba(255,200,0,.2), transparent 72%);
}
.fxc.is-link .fxc__dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; opacity: .7; }
/* over a card — a soft filled disc instead of a ring */
.fxc.is-card .fxc__ring {
  width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-color: transparent; background: radial-gradient(circle at 50% 50%, rgba(255,200,0,.22), rgba(255,200,0,.05) 60%, transparent 74%);
}
.fxc.is-card .fxc__dot { opacity: 0; }
/* over a text field — an I-beam, so the cursor still tells the truth */
.fxc.is-type .fxc__ring { width: 3px; height: 30px; margin: -15px 0 0 -1.5px; border-radius: 2px; background: var(--ink); border-color: transparent; }
.fxc.is-type .fxc__dot { opacity: 0; }
.fxc.is-down .fxc__ring { transform: translate3d(var(--rx,0), var(--ry,0), 0) scale(.78); }

/* ---------- the spotlight that follows the pointer ---------- */
.fxspot {
  position: fixed; top: 0; left: 0; width: 820px; height: 820px; margin: -410px 0 0 -410px;
  z-index: 9996; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--signal) 15%, transparent) 0%, transparent 62%);
  transform: translate3d(var(--spx, 50vw), var(--spy, 50vh), 0);
  transition: opacity .5s ease; will-change: transform;
}
.fxspot.is-on { opacity: 1; }
html.fx-no-spot .fxspot { display: none; }

/* the real arrow steps aside while ours is on duty */
html.fx-live:not(.fx-no-cursor) body,
html.fx-live:not(.fx-no-cursor) body * { cursor: none; }

/* ---------- the particle trail ---------- */
.fxtrail { position: fixed; inset: 0; z-index: 9998; pointer-events: none; }
html.fx-no-trail .fxtrail { display: none; }

/* ---------- magnetic controls ---------- */
html.fx-live .btn,
html.fx-live .nav__search,
html.fx-live .caro__btn,
html.fx-live .totop,
html.fx-live .icon-btn,
html.fx-live .nav__burger { translate: var(--mgx, 0) var(--mgy, 0); }

/* ---------- cards: lean toward the cursor, catch the light ---------- */
/* the tilt waits until a scroll-reveal has finished, so it never
   overwrites the transform the reveal is animating */
html.fx-live:not(.fx-no-tilt) .tiltable:not(.reveal),
html.fx-live:not(.fx-no-tilt) .tiltable.reveal.is-in {
  transform: perspective(1000px) rotateX(var(--tlx, 0deg)) rotateY(var(--tly, 0deg)) translate3d(0, var(--lift, 0px), 0);
  transform-style: preserve-3d;
}
html.fx-live:not(.fx-no-tilt) .tiltable:hover { --lift: -7px; }
.fx-glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(240px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.55), transparent 62%);
}
html.fx-live .tiltable { position: relative; }
html.fx-live:not(.fx-no-tilt) .tiltable:hover .fx-glare { opacity: 1; }
html.fx-no-tilt .fx-glare { display: none; }

/* ---------- headings and hero art drift with the pointer ----------
   These use the standalone `translate` property, never `transform`,
   so they compose with the rotations, reveals and scroll parallax
   the same elements already carry. */
html.fx-live .hero h1,
html.fx-live .sechead h2 {
  translate: calc(var(--mxn, 0) * 7px) calc(var(--myn, 0) * 4px);
  transition: translate .35s cubic-bezier(.16,.8,.3,1);
}
html.fx-live .hero__art {
  translate: calc(var(--mxn, 0) * -14px) calc(var(--myn, 0) * -9px);
  transition: translate .4s cubic-bezier(.16,.8,.3,1);
}
html.fx-live .hero__chips {
  translate: calc(var(--mxn, 0) * 18px) calc(var(--myn, 0) * 11px);
  transition: translate .45s cubic-bezier(.16,.8,.3,1);
}
html.fx-live .scribble {
  translate: calc(var(--mxn, 0) * 10px) calc(var(--myn, 0) * 6px);
  transition: translate .42s cubic-bezier(.16,.8,.3,1);
}
html.fx-live #fx .mesh {
  transition: transform 1.1s cubic-bezier(.16,.8,.3,1);
}

.hero__in { position: relative; z-index: 1; }

/* ---------- images settle to size as they scroll in ---------- */
[data-grow] { scale: var(--grow, 1); transform-origin: 50% 60%; will-change: scale; }

/* ---------- a slow liquid sheen for premium surfaces ---------- */
html.fx-live .btn--signal { position: relative; overflow: hidden; }
html.fx-live .btn--signal::after {
  content: ""; position: absolute; inset: -40% -10%;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.55) 50%, transparent 62%);
  transform: translateX(-120%); pointer-events: none;
}
html.fx-live .btn--signal:hover::after { animation: liquidSheen .95s cubic-bezier(.3,.7,.3,1); }
@keyframes liquidSheen { to { transform: translateX(120%); } }

/* the pointer layers must never sit above a modal or the search overlay */
.search-scrim, .modal-scrim, .app__scrim { z-index: 10050; }

@media (prefers-reduced-motion: reduce) {
  .fxc, .fxspot, .fxtrail { display: none !important; }
  html .hero h1, html .sechead h2, html .hero__art, html .hero__chips, html .scribble { translate: none !important; }
  [data-grow] { scale: none !important; }
}

/* ---------- dark pages: the pointer layers invert ---------- */
html.is-night .fxspot {
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--signal) 20%, transparent) 0%, transparent 64%);
}
html.is-night .fx-glare { background: radial-gradient(240px circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,.1), transparent 62%); }

html.is-night .fxc__dot { box-shadow: 0 0 14px 3px color-mix(in srgb, var(--signal) 60%, transparent); }
html.is-night .hero { border-bottom-color: var(--line); }
html.is-night .nav { border-bottom-color: var(--line); }
html.is-night .thumb-chrome, html.is-night .wcard__face { border-color: var(--line); }

/* the wordmark has a dark-ground version; the theme picks one */
.brand__d { display: none; }
html.is-night .brand__l { display: none; }
html.is-night .brand__d { display: block; }


/* ---------- the dashboard is a work surface: no pointer theatre ---------- */
html.fx-halt .fxc,
html.fx-halt .fxspot,
html.fx-halt .fxtrail { display: none !important; }
html.fx-halt body, html.fx-halt body * { cursor: auto !important; }
html.fx-halt a, html.fx-halt button, html.fx-halt .side-link, html.fx-halt [role="button"],
html.fx-halt label, html.fx-halt summary { cursor: pointer !important; }
html.fx-halt input, html.fx-halt textarea { cursor: text !important; }
html.fx-halt .tiltable { transform: none !important; }
html.fx-halt .fx-glare { display: none !important; }
html.fx-halt .hero h1, html.fx-halt .sechead h2,
html.fx-halt .hero__art, html.fx-halt .hero__chips, html.fx-halt .scribble { translate: none !important; }

/* ============================================================
   THE GENIE
   A lamp lands, smoke curls out of the spout and the genie
   unfurls with a message. Everything below is CSS keyframes on
   transform and opacity — no JavaScript runs while it plays.
   ============================================================ */
.gn {
  --gn-hi:  #6E6BD8;
  --gn-mid: #4A46A8;
  --gn-low: #2C2870;
  --gn-cloth: var(--dark);
  --gn-gold: var(--signal);
  --gn-gold-hi: var(--signal-hi, #FFE07A);
  position: fixed; right: clamp(.75rem, 3vw, 2.2rem); bottom: clamp(.75rem, 3vh, 1.8rem);
  z-index: 9990; display: flex; align-items: flex-end; gap: .6rem;
  pointer-events: none;
}
html.is-night .gn { --gn-hi: #8C89F0; --gn-mid: #5E5AC4; --gn-low: #35307F; }
.gn[hidden] { display: none; }
.gn__art { width: clamp(148px, 17vw, 214px); flex: none; pointer-events: auto; cursor: pointer; }
.gn__svg { width: 100%; height: auto; display: block; overflow: visible; }

/* ---------- the card ---------- */
.gn__card {
  pointer-events: auto; position: relative;
  max-width: min(310px, 62vw); margin-bottom: clamp(2.4rem, 7vh, 4.4rem);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--sh-3), 0 0 0 6px color-mix(in srgb, var(--signal) 9%, transparent);
  padding: 1rem 1.1rem 1.05rem;
  display: flex; flex-direction: column; gap: .4rem;
  opacity: 0; transform: translateY(14px) scale(.94);
  transform-origin: 90% 100%;
}
.gn__card::after {                       /* the little tail pointing at him */
  content: ""; position: absolute; right: -7px; bottom: 26px; width: 14px; height: 14px;
  background: inherit; border-right: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg); backdrop-filter: inherit;
}
.gn__eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--signal-ink);
}
.gn__eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); flex: none; }
.gn__h { font-family: var(--display); font-size: 1.06rem; line-height: 1.2; color: var(--ink); }
.gn__p { font-size: .84rem; line-height: 1.5; color: var(--ink-2); }
.gn__cta {
  align-self: flex-start; margin-top: .3rem;
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8rem; font-weight: 700; color: var(--ink);
  background: var(--signal); border-radius: 99px; padding: .45rem .85rem;
  box-shadow: var(--sh-gold); transition: transform .2s cubic-bezier(.2,.8,.25,1);
}
.gn__cta:hover { transform: translateX(3px); }
.gn__acts { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; }
.gn__alt {
  font-size: .74rem; font-weight: 600; color: var(--ink-3);
  border-bottom: 1px solid var(--line); padding-bottom: 1px;
  transition: color .2s ease, border-color .2s ease;
}
.gn__alt:hover { color: var(--ink); border-color: var(--signal); }
.gn__alt[hidden] { display: none; }
.gn__x {
  position: absolute; top: .45rem; right: .5rem; width: 24px; height: 24px;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  color: var(--ink-3); font-size: 1.1rem; line-height: 1; display: grid; place-items: center;
  transition: background .2s ease, color .2s ease;
}
.gn__x:hover { background: var(--tint); color: var(--ink); }

/* ---------- the parts, at rest ---------- */
.gn .gn-lamp   { opacity: 0; transform-box: fill-box; transform-origin: 50% 90%; }
.gn .gn-body   { opacity: 0; transform-box: fill-box; transform-origin: 78% 100%; }
.gn .gn-smoke circle { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
.gn .gn-sparks path  { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
.gn .gn-aura   { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }

/* ---------- the summoning ---------- */
.gn.is-in .gn-lamp  { animation: gnLamp .34s cubic-bezier(.16,1.3,.4,1) both, gnWobble 1.2s .34s ease-in-out 2; }
.gn.is-in .gn-aura  { animation: gnAura .7s .14s cubic-bezier(.2,.8,.25,1) both; }
.gn.is-in .gn-smoke .p1 { animation: gnPuff .62s .1s ease-out both; }
.gn.is-in .gn-smoke .p2 { animation: gnPuff .68s .15s ease-out both; }
.gn.is-in .gn-smoke .p3 { animation: gnPuff .74s .2s ease-out both; }
.gn.is-in .gn-smoke .p4 { animation: gnPuff .8s .25s ease-out both; }
.gn.is-in .gn-body  { animation: gnRise .46s .16s cubic-bezier(.18,1.25,.35,1) both, gnFloat 3.6s .66s ease-in-out infinite; }
.gn.is-in .gn-head  { animation: gnNod 3.6s .7s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.gn.is-in .gn-arms  { animation: gnBow 2.2s .6s ease-in-out 2; transform-box: fill-box; transform-origin: 50% 20%; }
.gn.is-in .gn-eyes  { animation: gnBlink 4.4s .9s steps(1, end) infinite; transform-box: fill-box; transform-origin: 50% 50%; }
.gn.is-in .gn-sparks .s1 { animation: gnSpark 2.2s .35s ease-in-out infinite; }
.gn.is-in .gn-sparks .s2 { animation: gnSpark 2.6s .5s ease-in-out infinite; }
.gn.is-in .gn-sparks .s3 { animation: gnSpark 2.4s .65s ease-in-out infinite; }
.gn.is-in .gn-sparks .s4 { animation: gnSpark 2.8s .8s ease-in-out infinite; }
.gn.is-in .gn__card { animation: gnCard .38s .36s cubic-bezier(.16,1.2,.4,1) both; }

/* ---------- back into the lamp ---------- */
.gn.is-out .gn__card { animation: gnCardOut .28s ease-in both; }
.gn.is-out .gn-body  { animation: gnSuck .38s .06s cubic-bezier(.6,0,.8,.3) both; }
.gn.is-out .gn-lamp  { animation: gnLampOut .24s .3s ease-in both; }
.gn.is-out .gn-smoke circle,
.gn.is-out .gn-sparks path,
.gn.is-out .gn-aura { animation: gnFade .3s ease-in both; }

@keyframes gnLamp {
  0%   { opacity: 0; transform: translateY(46px) scale(.4) rotate(-22deg); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes gnLampOut { to { opacity: 0; transform: translateY(20px) scale(.7); } }
@keyframes gnWobble {
  0%, 100% { rotate: 0deg; }
  25% { rotate: -5deg; }
  60% { rotate: 4deg; }
}
@keyframes gnAura {
  0%   { opacity: 0; transform: scale(.4); }
  55%  { opacity: 1; }
  100% { opacity: .75; transform: scale(1); }
}
@keyframes gnPuff {
  0%   { opacity: 0; transform: translate(0, 26px) scale(.25); }
  35%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-14px, -28px) scale(1.45); }
}
@keyframes gnRise {
  0%   { opacity: 0; transform: translate(34px, 96px) scale(.12) rotate(26deg); }
  45%  { opacity: 1; }
  72%  { transform: translate(-4px, -10px) scale(1.06) rotate(-4deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes gnSuck {
  0%   { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translate(34px, 96px) scale(.1) rotate(30deg); }
}
@keyframes gnFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -9px; }
}
@keyframes gnNod {
  0%, 100% { rotate: -1.6deg; }
  50%      { rotate: 1.6deg; }
}
@keyframes gnBow {
  0%, 100% { transform: none; }
  30%      { transform: translateY(6px) scale(.97); }
  55%      { transform: translateY(0) scale(1); }
}
@keyframes gnBlink {
  0%, 94%  { transform: scaleY(1); }
  95%, 98% { transform: scaleY(.1); }
  99%,100% { transform: scaleY(1); }
}
@keyframes gnSpark {
  0%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); }
  45%      { opacity: .9; transform: scale(1.1) rotate(70deg); }
}
@keyframes gnCard {
  0%   { opacity: 0; transform: translateY(14px) scale(.94); }
  100% { opacity: 1; transform: none; }
}
@keyframes gnCardOut { to { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes gnFade { to { opacity: 0; } }

/* ---------- splash cursor (WebGL fluid) ----------
   Full screen, never in the way of a click, and under the corner genie and
   the WhatsApp button so nothing the visitor needs is tinted over. */
.splash-fluid {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  display: block; pointer-events: none; z-index: 60;
}
@media (prefers-reduced-motion: reduce) { .splash-fluid { display: none; } }

/* ---------- True Focus headings ----------
   Ported from the React Bits component. The original leans on Motion for
   the frame; one transition on translate/width/height does the same thing
   and costs nothing. Class names are namespaced because .corner and
   .active are far too common to claim in a global stylesheet. */
.tf { position: relative; }
.tf-word {
  /* Deliberately not inline-block. Wrapping each word in an inline-block
     gives every word its own line box, which made the heading a little
     taller the moment the effect started — a visible jump, and a layout
     shift Lighthouse counts against the page. A blur applies to a plain
     inline span just as well. */
  filter: blur(var(--tf-blur, 5px));
  transition: filter var(--tf-dur, .6s) ease;
}
.tf-word.is-on { filter: blur(0); }
.tf--still .tf-word { filter: none; }
.tf--still .tf-frame { display: none; }

.tf-frame {
  position: absolute; top: 0; left: 0; width: 0; height: 0;
  pointer-events: none; box-sizing: content-box; opacity: 0;
  transition:
    translate var(--tf-dur, .6s) cubic-bezier(.2,.8,.25,1),
    width     var(--tf-dur, .6s) cubic-bezier(.2,.8,.25,1),
    height    var(--tf-dur, .6s) cubic-bezier(.2,.8,.25,1),
    opacity   .3s ease;
}
.tf-corner {
  position: absolute; width: .7rem; height: .7rem;
  border: 3px solid var(--tf-border, var(--signal));
  border-radius: 3px;
  filter: drop-shadow(0 0 4px var(--tf-glow, var(--signal)));
}
.tf-tl { top: -9px; left: -9px;  border-right: none; border-bottom: none; }
.tf-tr { top: -9px; right: -9px; border-left: none;  border-bottom: none; }
.tf-bl { bottom: -9px; left: -9px;  border-right: none; border-top: none; }
.tf-br { bottom: -9px; right: -9px; border-left: none;  border-top: none; }

@media (max-width: 560px) {
  .tf-corner { width: .55rem; height: .55rem; border-width: 2.5px; }
  .tf-tl, .tf-tr { top: -7px; }
  .tf-bl, .tf-br { bottom: -7px; }
  .tf-tl, .tf-bl { left: -7px; }
  .tf-tr, .tf-br { right: -7px; }
}
@media (prefers-reduced-motion: reduce) {
  .tf-word { filter: none; }
  .tf-frame { display: none; }
}

/* ---------- the page photo ----------
   One picture per page, the full width of the content column. The box
   holds its own shape before the file arrives, so nothing on the page
   jumps when it loads. */
.pbanner {
  margin: 0; width: 100%; overflow: hidden;
  border-radius: var(--r-l); border: 1px solid var(--line);
  background: var(--tint); box-shadow: var(--sh-1);
  aspect-ratio: var(--pb, 16 / 7);
}
.pbanner img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* a picture whose shape is far from the page's: show all of it rather than cut it */
.pbanner--whole img { object-fit: contain; background: var(--tint); }
@media (max-width: 640px) { .pbanner { border-radius: var(--r-m); } }

/* a real photograph on a case-study card, where the drawn plate would be */
.wcard__img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; display: block; }

/* a photograph inside a round avatar, review or staff */
.rev__av img, .av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.rev__av, .av { overflow: hidden; }

/* ---------- ad slots ----------
   Labelled, boxed and clearly separated from the article, so a reader
   never mistakes an ad for something the studio wrote. Nothing renders
   at all unless a publisher ID and a slot ID are both filled in. */
.adbox {
  display: block; width: 100%;
  padding: .5rem .75rem .7rem;
  border: 1px dashed var(--line); border-radius: var(--r-m);
  background: var(--tint); overflow: hidden;
}
.adbox__l {
  display: block; font-size: .58rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .45rem;
}
.adbox ins { display: block; min-height: 90px; }

/* ---------- smoke off a hovered card, just before he arrives ----------
   A fixed layer positioned over the card rather than a child of it:
   cards clip their overflow and a child would be sliced off at the edge. */
.gn-puff {
  position: fixed; z-index: 9986; width: 0; height: 0;
  pointer-events: none; contain: layout style;
}
.gn-puff i {
  position: absolute; left: 0; top: 0; display: block;
  width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: radial-gradient(circle at 40% 36%,
    color-mix(in srgb, var(--signal-hi, #FFE07A) 80%, transparent) 0%,
    color-mix(in srgb, var(--signal) 38%, transparent) 38%,
    color-mix(in srgb, var(--signal) 12%, transparent) 62%,
    transparent 78%);
  filter: blur(3px);
  opacity: 0; will-change: transform, opacity;
  animation: gnRub 1.25s cubic-bezier(.24,.68,.3,1) both;
  animation-delay: calc(var(--i, 0) * 78ms);
}
@keyframes gnRub {
  0%   { opacity: 0; transform: translate(0, 14px) scale(.18); }
  16%  { opacity: .95; }
  45%  { transform: translate(calc(var(--x, 0px) * .35), -62px) scale(calc(var(--s, 1.6) * .62)); }
  72%  { opacity: .5; }
  100% { opacity: 0; transform: translate(var(--x, 0), -172px) scale(var(--s, 1.6)); }
}
/* the card itself gives a small shiver as the smoke leaves it.
   Standalone rotate: so it composes with whatever transform the card
   is already carrying from its own hover or tilt. */
.is-smoking { animation: gnShiver .9s ease-in-out both; }
@keyframes gnShiver {
  0%, 100% { rotate: 0deg; }
  22%      { rotate: -.55deg; }
  62%      { rotate: .45deg; }
}
@media (prefers-reduced-motion: reduce) {
  .gn-puff i { animation-duration: .9s; }
  .is-smoking { animation: none; }
}

/* ---------- the lamp in the corner ---------- */
.gn-lamp-btn {
  position: fixed; left: clamp(.8rem, 2.5vw, 1.6rem); bottom: clamp(.8rem, 2.5vh, 1.6rem);
  z-index: 9980; display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid var(--signal-edge); border-radius: 99px; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--signal-ink); padding: .5rem .8rem .5rem .65rem;
  box-shadow: var(--sh-2);
  transition: transform .25s cubic-bezier(.2,.8,.25,1), box-shadow .25s ease, background .25s ease, opacity .3s ease;
  translate: var(--mgx, 0) var(--mgy, 0);
}
.gn-lamp-btn svg { width: 28px; height: 20px; flex: none; }
.gn-lamp-btn__t { font-size: .78rem; font-weight: 700; white-space: nowrap; }
.gn-lamp-btn:hover { transform: translateY(-3px) rotate(-4deg); box-shadow: var(--sh-3); background: var(--signal-wash); }
.gn-lamp-btn:active { transform: translateY(-1px) scale(.97); }
.gn-lamp-btn::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 55%, transparent);
  animation: gnPulse 3.4s ease-out infinite;
}
@keyframes gnPulse {
  0%, 70%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 0%, transparent); }
  76%  { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 45%, transparent); }
  100% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--signal) 0%, transparent); }
}
/* ---------- phone: a sheet across the bottom, genie standing on it ---------- */
@media (max-width: 720px) {
  .gn-lamp-btn__t { display: none; }
  .gn-lamp-btn { padding: .55rem .6rem; left: .7rem; bottom: calc(.7rem + env(safe-area-inset-bottom, 0px)); }


  .gn {
    left: .6rem; right: .6rem; bottom: calc(.6rem + env(safe-area-inset-bottom, 0px));
    display: block; gap: 0;
  }
  .gn__art {
    width: 112px; position: absolute; right: .2rem; bottom: 100%;
    margin-bottom: -14px; z-index: 1;
  }
  .gn__card {
    margin-bottom: 0; max-width: none; width: 100%;
    padding: .95rem 1rem 1rem; padding-right: 3.2rem;
    transform-origin: 85% 100%;
  }
  .gn__card::after { display: none; }
  .gn__h { font-size: 1rem; }
  .gn__p { font-size: .82rem; }
  .gn__x { top: .4rem; right: .4rem; }
}
@media (max-width: 360px) {
  .gn__art { width: 94px; margin-bottom: -10px; }
  .gn__card { padding-right: 2.7rem; }
}

/* never on the dashboard, never when the visitor asked for calm */
html.fx-halt .gn, html.fx-halt .gn-lamp-btn { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .gn .gn-lamp, .gn .gn-body, .gn .gn-aura,
  .gn .gn-smoke circle, .gn .gn-sparks path { opacity: 1; }
  .gn.is-in *, .gn.is-out * { animation: none !important; }
  .gn__card { opacity: 1; transform: none; }
  .gn-lamp-btn::after { animation: none; }
}

/* ============================================================
   CURSOR STYLES
   One dropdown in Appearance swaps these. Every variant reuses
   the same two elements and the same particle pool, so none of
   them costs more than another.
   ============================================================ */

/* ---------- Galaxy: a star with three satellites in orbit ---------- */
.fxc__ring i { display: none; }
html.fxs-galaxy .fxc__dot {
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: #FFFFFF; box-shadow: 0 0 12px 3px rgba(180,200,255,.9), 0 0 26px 8px rgba(140,110,255,.45);
}
html.fxs-galaxy .fxc__ring {
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border: 1px solid rgba(178,196,255,.55);
  background: radial-gradient(circle at 50% 50%, rgba(150,120,255,.16), transparent 68%);
}
html.fxs-galaxy .fxc__ring i {
  display: block; position: absolute; inset: 0; border-radius: 50%;
  animation: fxOrbit 3.4s linear infinite;
}
html.fxs-galaxy .fxc__ring i::after {
  content: ""; position: absolute; top: -2.5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 7px 2px rgba(180,200,255,.85);
}
html.fxs-galaxy .fxc__ring i:nth-child(2) { animation-duration: 5.2s; animation-direction: reverse; }
html.fxs-galaxy .fxc__ring i:nth-child(2)::after { width: 3.5px; height: 3.5px; margin-left: -1.75px; background: #C9B6FF; }
html.fxs-galaxy .fxc__ring i:nth-child(3) { animation-duration: 7s; animation-delay: -2s; }
html.fxs-galaxy .fxc__ring i:nth-child(3)::after { width: 3px; height: 3px; margin-left: -1.5px; background: #FFD98C; }
@keyframes fxOrbit { to { rotate: 360deg; } }
html.fxs-galaxy .fxc.is-link .fxc__ring { width: 68px; height: 68px; margin: -34px 0 0 -34px; border-color: rgba(200,214,255,.8); }
html.fxs-galaxy .fxc.is-card .fxc__ring { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
/* the spotlight becomes a nebula */
html.fxs-galaxy .fxspot {
  background:
    radial-gradient(circle at 50% 50%, rgba(124,86,255,.16) 0%, transparent 58%),
    radial-gradient(circle at 62% 42%, rgba(70,140,255,.12) 0%, transparent 48%);
}
html.fxs-galaxy.is-night .fxspot {
  background:
    radial-gradient(circle at 50% 50%, rgba(150,110,255,.26) 0%, transparent 60%),
    radial-gradient(circle at 60% 40%, rgba(80,160,255,.18) 0%, transparent 50%);
}

/* ---------- Multi-colour: everything runs on one moving hue ---------- */
html.fxs-rainbow .fxc { --fxhue: 0; }
html.fxs-rainbow .fxc__dot {
  background: hsl(var(--fxhue) 95% 58%);
  box-shadow: 0 0 12px 3px hsl(var(--fxhue) 95% 58% / .6);
}
html.fxs-rainbow .fxc__ring {
  border-color: hsl(var(--fxhue) 95% 58% / .85);
  background: radial-gradient(circle at 50% 50%, hsl(var(--fxhue) 95% 58% / .14), transparent 70%);
}
html.fxs-rainbow .fxc.is-card .fxc__ring {
  border-color: transparent;
  background: radial-gradient(circle at 50% 50%,
    hsl(var(--fxhue) 95% 60% / .26), hsl(calc(var(--fxhue) + 60) 95% 60% / .08) 58%, transparent 74%);
}
html.fxs-rainbow .fxspot {
  background: radial-gradient(circle at 50% 50%,
    hsl(var(--fxhue) 90% 60% / .13) 0%, hsl(calc(var(--fxhue) + 90) 90% 60% / .07) 42%, transparent 64%);
}

/* ---------- Minimal: a dot and a hairline, nothing else ---------- */
html.fxs-minimal .fxc__dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; box-shadow: none; }
html.fxs-minimal .fxc__ring {
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border-color: var(--ink-3); background: none;
}
html.fxs-minimal .fxc.is-link .fxc__ring { width: 48px; height: 48px; margin: -24px 0 0 -24px; border-color: var(--signal); }
html.fxs-minimal .fxc.is-card .fxc__ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-color: var(--line); background: none; }
html.fxs-minimal .fxtrail { display: none; }

@media (prefers-reduced-motion: reduce) {
  .fxc__ring i { animation: none !important; }
}


/* ============================================================
   HEADER EXTRAS — announcement bar, optional sticky
   ============================================================ */
.topbar {
  background: var(--dark); color: #FFFFFF;
  font-size: .8rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar__in {
  display: flex; align-items: center; gap: .6rem; justify-content: center;
  padding: .5rem 0; text-align: center; flex-wrap: wrap;
}
.topbar__d {
  width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: none;
  animation: pulseSoft 1.8s ease-in-out infinite;
}
.topbar a {
  display: inline-flex; align-items: center; gap: .25rem;
  color: var(--signal); font-weight: 700; text-decoration: none;
}
.topbar a:hover { text-decoration: underline; }
.topbar a .chev { transition: transform .2s ease; }
.topbar a:hover .chev { transform: translateX(3px); }
html.nav-loose .nav { position: static; }
.brand img { height: var(--logo-h, 40px); }

/* nothing should sit underneath the two fixed corner buttons on a phone */
@media (max-width: 720px) {
  .foot__bar { padding-bottom: 3.6rem; }
  .topbar__in { font-size: .76rem; padding: .45rem 0; }
}

/* on a phone the lamp becomes a round brand button, a pair with back-to-top */
@media (max-width: 720px) {
  .gn-lamp-btn {
    width: 46px; height: 46px; padding: 0; justify-content: center;
    border-radius: 50%; border-color: transparent;
    background: var(--signal); color: var(--ink); box-shadow: var(--sh-gold);
  }
  .gn-lamp-btn svg { width: 25px; height: 18px; }
}

/* ============================================================
   WHATSAPP
   ============================================================ */
.wa-float {
  position: fixed; right: clamp(.8rem, 2.5vw, 1.6rem);
  bottom: calc(clamp(.8rem, 2.5vh, 1.6rem) + 62px + env(safe-area-inset-bottom, 0px));
  z-index: 9975; display: inline-flex; align-items: center; gap: .5rem;
  height: 52px; padding: 0 1rem 0 .85rem; border-radius: 99px;
  background: #25D366; color: #FFFFFF; text-decoration: none;
  box-shadow: 0 10px 26px -10px rgba(37,211,102,.75), var(--sh-2);
  transition: transform .25s cubic-bezier(.2,.8,.25,1), box-shadow .25s ease;
  translate: var(--mgx, 0) var(--mgy, 0);
}
.wa-float svg { width: 26px; height: 26px; flex: none; }
.wa-float__t { font-size: .84rem; font-weight: 700; white-space: nowrap; }
.wa-float:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 34px -12px rgba(37,211,102,.85), var(--sh-3); }
.wa-float::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  animation: waPulse 2.8s ease-out infinite;
}
@keyframes waPulse {
  0%, 65%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
  70% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); }
  100% { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
}
.foot__wa { color: #25D366 !important; }
.foot__wa:hover { background: rgba(37,211,102,.16) !important; }

@media (max-width: 720px) {
  .wa-float { height: 48px; width: 48px; padding: 0; justify-content: center; }
  .wa-float__t { display: none; }
  .wa-float { bottom: calc(.8rem + 58px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .wa-float::after { animation: none; } }


/* the corner buttons step aside while the genie is out — he needs the space,
   and they are back four seconds later */
html.gn-out .gn-lamp-btn,
html.gn-out .wa-float,
html.gn-out .totop { opacity: 0; pointer-events: none; }
.totop { transition: opacity .3s ease, transform .25s cubic-bezier(.2,.8,.25,1), visibility .3s; }

/* ============================================================
   ARTICLE CARDS — cover, date, title, excerpt
   ============================================================ */
.blog-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 248px), 1fr)); }
.post--cover { padding: 0; overflow: hidden; gap: 0; }
.post__pic {
  /* the same shape a cover photo is cut to on upload (1600 × 700), so the
     card shows the whole picture instead of slicing its sides off */
  display: block; aspect-ratio: 16 / 7; overflow: hidden; background: var(--tint);
  border-bottom: 1px solid var(--line-soft);
}
.post__pic img, .post__pic svg {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.2,.8,.25,1);
}
.post--cover:hover .post__pic img, .post--cover:hover .post__pic svg { transform: scale(1.05); }
.post__b { display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem 1.15rem 1.2rem; flex: 1; }
.post--cover h3 { font-size: 1.02rem; line-height: 1.3; }
.post--cover p {
  color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post__pic { position: relative; }
.post__cat {
  position: absolute; left: .7rem; bottom: .7rem;
  font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: .28rem .55rem; border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--signal-ink);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.post__date {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
}

/* the moment between clicking into the dashboard and its code arriving */
.boot-wait {
  min-height: 60vh; display: flex; align-items: center; justify-content: center;
  gap: .7rem; color: var(--ink-3); font-size: .9rem;
}
.boot-wait__s {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--signal);
  animation: spin .8s linear infinite;
}

/* index.php paints the hero into the HTML so there is something on screen
   before any JavaScript runs. When the app takes over it must not fade the
   same words in again — so the entry animation is skipped once. */
html.prepainted .hero .seq > *,
html.prepainted .hero .stack-l > * { animation: none !important; opacity: 1; transform: none; }

/* ============================================================
   LANGUAGE SWITCHER
   Two words in a pill, in the header beside the search button.
   ============================================================ */
.langsw {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--tint);
}
.langsw__b {
  border: 0; cursor: pointer; background: transparent; color: var(--ink-2);
  font-family: var(--body); font-weight: 700; font-size: .74rem;
  line-height: 1; padding: .38rem .55rem; border-radius: 99px;
  min-width: 30px; transition: background .2s ease, color .2s ease;
}
.langsw__b:hover { color: var(--ink); }
.langsw__b.is-on { background: var(--signal); color: #16181D; }
.langsw__b[lang="ar"] { font-size: .9rem; font-weight: 800; }
@media (max-width: 420px) { .langsw__b { padding: .34rem .45rem; min-width: 26px; } }

/* ============================================================
   ARABIC — RIGHT TO LEFT

   The page direction is set on <html>, so flexbox, grid and text
   flow mirror themselves. What is listed below is the remainder:
   anything pinned with left/right, anything that assumed Latin
   letters, and the two horizontal scrollers whose script counts
   pixels from the left edge.
   ============================================================ */

/* Poppins and Manrope have no Arabic glyphs at all — without a face that
   does, the browser falls back to whatever the device happens to have and
   the page looks like a different site. Cairo is fetched by i18n.js, and
   only when Arabic is actually on screen. */
html[dir="rtl"] {
  --display: "Cairo", "Noto Kufi Arabic", "Segoe UI", system-ui, sans-serif;
  --body: "Cairo", "Noto Naskh Arabic", "Segoe UI", system-ui, sans-serif;
  --hand: "Cairo", "Segoe UI", system-ui, sans-serif;
}

/* Arabic letters join. Tracking pulls them apart and the word stops being
   a word, so every letter-spaced label loses its spacing here. */
html[dir="rtl"] body,
html[dir="rtl"] body * { letter-spacing: normal; }
html[dir="rtl"] .num,
html[dir="rtl"] .stat__k,
html[dir="rtl"] .work__mv,
html[dir="rtl"] .price__amt { font-family: var(--mono); }

html[dir="rtl"] .foot__col a:hover { transform: translateX(-3px); }

/* Arabic words are wider than their English equivalents, and nine of them
   plus a button do not fit across a laptop header. The menu tightens a
   little further here rather than the bar running off the page. */
@media (min-width: 1241px) {
  html[dir="rtl"] .nav__link { padding-inline: .42rem; font-size: .84rem; }
}

/* lists and quotes */
html[dir="rtl"] .prose ul { padding-left: 0; padding-right: 1.1rem; }
html[dir="rtl"] .prose blockquote { border-left: 0; border-right: 3px solid var(--signal); padding-left: 0; padding-right: 1rem; }

/* arrows that point somewhere */
html[dir="rtl"] svg.chev { transform: scaleX(-1); }
html[dir="rtl"] .btn--play { padding-left: .9rem; padding-right: .5rem; }

/* hero */
html[dir="rtl"] .hero__chips { right: auto; left: 0; }
html[dir="rtl"] .scribble--a { left: auto; right: 20%; }
html[dir="rtl"] .scribble--b { right: auto; left: -1%; text-align: left; }

/* the numbers strip */
html[dir="rtl"] .stat { border-right: 0; border-left: 1px solid var(--line-soft); }
html[dir="rtl"] .stat:last-child { border-left: 0; }

/* cards */
html[dir="rtl"] .wcard__back { text-align: right; }
html[dir="rtl"] .wcard__back::after { transform-origin: right; }
html[dir="rtl"] .work::before { left: auto; right: 0; }
html[dir="rtl"] .rev__q { right: auto; left: 1.1rem; }
html[dir="rtl"] .ai-promo::before,
html[dir="rtl"] .ai-promo__face { right: auto; left: -6%; }

/* forms — the select arrow is drawn with a background gradient */
html[dir="rtl"] select.inp {
  background-position: 18px 55%, 13px 55%;
  padding-right: .9rem; padding-left: 2.2rem;
}
html[dir="rtl"] .inp,
html[dir="rtl"] textarea.inp { text-align: right; }

@media (max-width: 940px) {
  html[dir="rtl"] .cta__in { text-align: right; }
}

/* ---- the two horizontal scrollers ----
   Their script measures scrollLeft from zero upwards. In a right-to-left
   box the browser counts the other way, in negative numbers, and every
   one of those measurements comes out wrong — the arrows grey out at the
   wrong end and the 3-D tilt lands on the wrong card. So the track keeps
   its left-to-right axis and only the card contents turn around. */
html[dir="rtl"] .caro__track { direction: ltr; }
html[dir="rtl"] .caro__track > * { direction: rtl; }
html[dir="rtl"] .caro__nav { direction: ltr; }
html[dir="rtl"] .caro__nav svg.chev { transform: none; }
html[dir="rtl"] .ticker__track { direction: ltr; }
html[dir="rtl"] .ticker__track > span { direction: rtl; }

/* floating buttons: the WhatsApp pill and the lamp swap corners so they
   do not end up stacked on top of each other */
html[dir="rtl"] .wa-float {
  right: auto; left: clamp(.8rem, 2.5vw, 1.6rem);
  padding: 0 .85rem 0 1rem;
}
html[dir="rtl"] .totop { right: auto; left: 1.1rem; }
html[dir="rtl"] .gn-lamp-btn { left: auto; right: clamp(.8rem, 2.5vw, 1.6rem); }
html[dir="rtl"] .gn__card { padding-right: 1rem; padding-left: 3.2rem; }
html[dir="rtl"] .gn__x { right: auto; left: .4rem; }
html[dir="rtl"] .gn__bubble::after { right: auto; left: -7px; }
@media (max-width: 560px) {
  html[dir="rtl"] .gn-lamp-btn { left: auto; right: .7rem; }
  html[dir="rtl"] .gn__card { padding-right: 1rem; padding-left: 2.7rem; }
  html[dir="rtl"] .gn__x { right: auto; left: .4rem; }
}

/* the mobile menu's edge rule */
@media (max-width: 1240px) {
  html[dir="rtl"] .nav__links .nav__item .dropdown {
    border-left: 0; border-right: 2px solid var(--signal-edge);
  }
}

/* the dashboard is English only — never let it inherit the page direction */
html[dir="rtl"] .app,
html[dir="rtl"] #app-body,
html[dir="rtl"] .gate { direction: ltr; text-align: left; }

/* the English original, shown above each Arabic box in the translation editor */
.tr-en {
  font-size: .82rem; line-height: 1.5; color: var(--ink-2);
  background: var(--tint); border: 1px solid var(--line-soft);
  border-radius: var(--r-s); padding: .5rem .6rem; margin-bottom: .4rem;
  max-height: 9rem; overflow: auto; white-space: pre-wrap;
}

/* the jump-to row and the group headings on the Page text screen */
.pt-jump { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.pt-h {
  margin: 1.4rem 0 .6rem; padding-bottom: .4rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: .92rem; color: var(--ink);
}
.pt-h:first-child { margin-top: 0; }
.pt-save { position: sticky; bottom: 0; padding: .7rem 0; background: var(--surface); }

/* the Redirects screen's "is this actually running" strip — a list inside,
   so it must not inherit the one-line flex layout the warning flash uses */
#rd-status .flash { display: block; }
#rd-status .flash ul { margin: .5rem 0 0; padding-left: 1.1rem; }
#rd-status .flash li + li { margin-top: .3rem; }

/* number ka mulk, enquiry ke saath. Mel na khaye to zard — laal nahi:
   mukhtalif mulk ka number ghalat hone ka saboot nahi, sirf dekhne
   ki baat hai. */
.ph-cc {
  display: inline-block; margin-left: .45rem; padding: .08rem .4rem;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .04em;
  border-radius: 4px; background: var(--tint); color: var(--ink-3);
  vertical-align: middle; white-space: nowrap;
}
.ph-cc--odd { background: var(--warn-bg); color: #7A4F00; }

/* ---------- seedha jawab (AEO) ----------
   Safhay ke sab se upar wo chand satrein jo sawal ka jawab deti
   hain. AI engine yahin se uthata hai, aur parhne wale ko bhi
   jawab scroll kiye baghair mil jata hai. */
.ansbox {
  border-left: 3px solid var(--signal);
  background: var(--tint);
  padding: .9rem 1.1rem;
  border-radius: 0 var(--r-s) var(--r-s) 0;
  max-width: 68ch;
}
.ansbox__l {
  display: block; font-family: var(--mono); font-size: .64rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .3rem;
}
.ansbox__t { margin: 0; font-size: 1rem; line-height: 1.65; color: var(--ink); }

/* ---------- article ka naqsha ----------
   Pehle halka sa dabba, click par asal naqsha. Google ka iframe
   lagbhag ek MB ka hota hai aur apni cookies laata hai — us ka
   intezar har parhne wale se karwana theek nahi. */
.prose-map {
  margin: 1.6rem 0; border: 1px solid var(--line); border-radius: var(--r-m);
  overflow: hidden; background: var(--tint);
}
.prose-map__go {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .45rem; width: 100%; aspect-ratio: 16 / 9; max-height: 320px;
  border: 0; cursor: pointer; padding: 1.2rem;
  background:
    radial-gradient(circle at 30% 30%, rgba(42,111,214,.10), transparent 55%),
    repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 46px),
    var(--surface);
  color: var(--ink-2); transition: background-color .2s ease;
}
.prose-map__go:hover { color: var(--ink); }
.prose-map__go svg { width: 30px; height: 30px; color: var(--signal-ink); }
.prose-map__t { font-weight: 600; font-size: 1rem; color: var(--ink); text-align: center; }
.prose-map__h {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.prose-map iframe { display: block; width: 100%; height: 340px; border: 0; }
.prose-map figcaption {
  padding: .6rem .9rem; font-size: .8rem; color: var(--ink-3);
  border-top: 1px solid var(--line); background: var(--surface);
}
.prose-map figcaption a { color: var(--info); }
@media (max-width: 600px) { .prose-map iframe { height: 260px; } }

/* tasveer: kaat kar fit, ya poori — faisla upload se PEHLE, kyunke
   kataai usi waqt hoti hai aur asli file hi kat jati hai */
.imgfit { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.imgfit button {
  border: 0; background: var(--surface); color: var(--ink-3); cursor: pointer;
  font: inherit; font-size: .76rem; padding: .4rem .7rem; white-space: nowrap;
}
.imgfit button + button { border-left: 1px solid var(--line); }
.imgfit button:hover { color: var(--ink); }
.imgfit button.is-on { background: var(--signal); color: var(--dark); font-weight: 600; }
