/* =========================================================
   Neta Software — Design System
   White / Black / Light gray + single accent
   ========================================================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f8;
  --bg-alt-2: #fafafa;
  --bg-alt-3: #f3f4f6;
  --ink: #0a0a0a;
  --ink-2: #666666;
  --ink-3: #999999;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --accent: #0057ff;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nav-h: 68px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

::selection {
  background: var(--ink);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

/* ============ Scroll progress ============ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--ink);
  z-index: 1200;
}

/* ============ Buttons ============ */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    border-color 0.35s var(--ease), box-shadow 0.35s var(--ease),
    color 0.35s var(--ease);
  white-space: nowrap;
}

/* Light sweep that crosses the pill on hover */
.btn::before {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 0;
  z-index: -1;
  width: 42%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-130%) skewX(-16deg);
  pointer-events: none;
}

.btn:hover::before {
  animation: btn-sheen 0.7s cubic-bezier(0.4, 0.05, 0.2, 1);
}

@keyframes btn-sheen {
  from {
    transform: translateX(-130%) skewX(-16deg);
  }

  to {
    transform: translateX(340%) skewX(-16deg);
  }
}

.btn svg {
  transition: transform 0.35s var(--ease);
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn:active {
  transform: translateY(0) scale(0.975);
  transition-duration: 0.1s;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.015);
  background: #000;
  box-shadow: 0 12px 26px -8px rgba(0, 0, 0, 0.42),
    0 2px 6px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border-strong);
}

.btn-secondary::before {
  background: linear-gradient(100deg, transparent, rgba(0, 0, 0, 0.06), transparent);
}

.btn-secondary:hover {
  transform: translateY(-2px) scale(1.015);
  background: var(--bg-alt-3);
  border-color: var(--ink);
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.4);
}

.btn-ghost {
  color: var(--ink-2);
  padding-inline: 14px;
}

.btn-ghost::before {
  background: linear-gradient(100deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

.btn-ghost:hover {
  color: var(--ink);
  background: var(--bg-alt-3);
}

.btn-light {
  background: #fff;
  color: var(--ink);
}

.btn-light::before {
  background: linear-gradient(100deg, transparent, rgba(0, 0, 0, 0.08), transparent);
}

.btn-light:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.38);
}

.btn-sm {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover::before {
    animation: none;
  }

  .btn:hover,
  .btn:active {
    transform: none;
  }
}

/* ============ Navbar ============ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--nav-h);
  background: transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease),
    backdrop-filter 0.4s var(--ease), transform 0.55s var(--ease), opacity 0.45s var(--ease);
  border-bottom: 1px solid transparent;
}

/* The maze owns the whole screen, so the header steps aside */
body.maze-mode:not(.menu-open) .navbar {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  display: inline-flex;
  align-items: baseline;
}

.logo em {
  font-style: normal;
  color: var(--ink-3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-alt-3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  place-items: center;
}

.nav-burger span {
  position: relative;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.nav-burger span::before {
  top: -6px;
}

.nav-burger span::after {
  top: 6px;
}

.nav-burger.open span {
  transform: rotate(45deg);
}

.nav-burger.open span::before {
  top: 0;
  transform: rotate(-90deg);
}

.nav-burger.open span::after {
  top: 0;
  opacity: 0;
}

/* Mobile menu panel */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(380px, 88vw);
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 1100;
  padding: 96px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(102%);
  transition: transform 0.5s var(--ease);
  overflow-y: auto;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu a {
  padding: 14px 0;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border);
}

.mobile-menu .menu-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
  border: 0;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
  z-index: 1050;
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

body.menu-open {
  overflow: hidden;
}

/* ============ Sections ============ */
.section {
  padding: clamp(72px, 9vw, 128px) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 20px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-head p {
  color: var(--ink-2);
  font-size: clamp(15px, 1.4vw, 17px);
}

/* ============ Reveal animation ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* ============ Hero ============ */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 64px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.16fr 0.84fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

/* --- Hero decorative geometry: coloured dots, full and half circles --- */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg .hb {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w, 12px);
  height: var(--h, var(--w, 12px));
  color: var(--c, var(--accent));
  border-radius: 50%;
  opacity: 0;
  transform: rotate(var(--r, 0deg));
  animation: hb-pop var(--t, 9s) var(--d, 0s) cubic-bezier(0.34, 1.2, 0.64, 1) infinite both;
  will-change: opacity, transform;
}

/* Shapes appear within the first second, hold most of the cycle, then drift out. */
@keyframes hb-pop {
  0% {
    opacity: 0;
    transform: rotate(var(--r, 0deg)) translate3d(0, 10px, 0) scale(0.7);
  }

  8%,
  72% {
    opacity: var(--o, 0.5);
    transform: rotate(var(--r, 0deg)) translate3d(0, 0, 0) scale(1);
  }

  92%,
  100% {
    opacity: 0;
    transform: rotate(var(--r, 0deg)) translate3d(0, -14px, 0) scale(1.08);
  }
}

.hb-dot {
  background: currentColor;
}

.hb-ring {
  border: 1px solid currentColor;
}

/* Bottom half of a filled disc */
.hb-half {
  background: currentColor;
  clip-path: inset(48% 0 0 0);
}

/* Left half of an outlined circle */
.hb-half-r {
  border: 1px solid currentColor;
  clip-path: inset(0 48% 0 0);
}

.hb-dots {
  border-radius: 50%;
  background-image: radial-gradient(currentColor 1.6px, transparent 1.7px);
  background-size: 17px 17px;
}

@media (max-width: 900px) {
  .hero-bg .hb {
    display: none;
  }

  .hero-bg .hb:nth-child(1),
  .hero-bg .hb:nth-child(2),
  .hero-bg .hb:nth-child(5),
  .hero-bg .hb:nth-child(8),
  .hero-bg .hb:nth-child(11),
  .hero-bg .hb:nth-child(13) {
    display: block;
  }
}

@media (max-width: 600px) {
  .hero-bg .hb {
    display: none;
  }

  .hero-bg .hb:nth-child(1),
  .hero-bg .hb:nth-child(8),
  .hero-bg .hb:nth-child(11) {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg .hb {
    animation: none;
    opacity: var(--o, 0.5);
    transform: rotate(var(--r, 0deg));
  }
}

.hero-title {
  font-size: clamp(40px, 4.9vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin-bottom: 24px;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line > span {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease);
}

body.is-loaded .hero-title .line > span {
  transform: translateY(0);
}

.hero-title .line:nth-child(2) > span {
  transition-delay: 90ms;
}

.hero-title .line:nth-child(3) > span {
  transition-delay: 180ms;
}

.hero-desc {
  color: var(--ink-2);
  font-size: clamp(15px, 1.5vw, 18px);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-trust svg {
  color: var(--ink);
}

/* Hero entrance (badge / desc / cta) */
.hero .fade-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.hero .fade-item.scale {
  transform: scale(0.96);
}

body.is-loaded .hero .fade-item {
  opacity: 1;
  transform: none;
}

body.is-loaded .hero .fade-item:nth-of-type(1) {
  transition-delay: 0ms;
}

.hero .fade-item.d1 {
  transition-delay: 60ms;
}

.hero .fade-item.d2 {
  transition-delay: 320ms;
}

.hero .fade-item.d3 {
  transition-delay: 420ms;
}

.hero .fade-item.d4 {
  transition-delay: 520ms;
}

/* ---- Hero artwork ---- */
.scene {
  position: relative;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 1s var(--ease) 0.35s, transform 1s var(--ease) 0.35s;
}

body.is-loaded .scene {
  opacity: 1;
  transform: none;
}

/* Parallax uses transform, the idle float uses translate — they stack cleanly. */
.scene-stage {
  --px: 0;
  --py: 0;
  transform: translate3d(calc(var(--px) * 18px), calc(var(--py) * 14px), 0);
  transition: transform 0.6s var(--ease);
  animation: floaty 9s ease-in-out infinite;
}

/* ---- Hero city: flat pastel blocks drop in and stack into a small skyline ---- */
.city {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  margin-inline: auto;
  overflow: visible;
  transition: transform 0.7s var(--ease);
}

.scene:hover .city {
  transform: translateY(-9px);
}

.city .ct-b {
  transform-box: fill-box;
  transform-origin: center;
  animation: ct-drop 0.95s var(--d, 0s) both;
}

.city .ct-fuse {
  animation: ct-fuse 0.6s var(--d, 0s) var(--ease) both;
}

.city .ct-b,
.city .ct-fuse {
  animation-play-state: paused;
}

body.is-loaded .city .ct-b,
body.is-loaded .city .ct-fuse {
  animation-play-state: running;
}

.ct-face {
  fill: var(--c, #dbeafe);
  stroke: rgba(15, 23, 42, 0.06);
  stroke-width: 1;
}

.ct-win {
  fill: #ffffff;
  opacity: 0.85;
}

.ct-line {
  fill: none;
  stroke: #cbd5e1;
  stroke-width: 3;
  stroke-linecap: round;
}

.ct-ground {
  fill: rgba(10, 26, 60, 0.09);
}

@keyframes ct-fuse {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes ct-drop {
  0% {
    opacity: 0;
    transform: translateY(var(--fy, -430px)) scale(0.94);
    animation-timing-function: cubic-bezier(0.5, 0, 0.85, 0.4);
  }

  40% {
    opacity: 1;
  }

  76% {
    transform: translateY(0) scale(1.06, 0.92);
    animation-timing-function: cubic-bezier(0.2, 0.75, 0.3, 1);
  }

  88% {
    transform: translateY(-7px) scale(0.98, 1.04);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floaty {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

/* ============ Metrics ============ */
.metrics {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(40px, 5vw, 64px) 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.metric b {
  display: block;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}

.metric span {
  color: var(--ink-2);
  font-size: 0.9rem;
}

/* ============ Services ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.service-card > * {
  position: relative;
  z-index: 1;
}

/* Slanted colour wash — covers the upper part of the card on hover.
   120px is tuned to sit between the card title (bottom ~110px) and its
   description (top ~124px) so no text ever lands on the coloured band. */
.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 120px;
  z-index: 0;
  background: var(--acc, var(--accent));
  clip-path: polygon(0 0, 100% 0, 100% 93%, 0 100%);
  transform: translateY(-102%);
  transition: transform 0.55s var(--ease);
}

.service-card:nth-child(1) { --acc: #2563eb; --acc-rgb: 37 99 235 }
.service-card:nth-child(2) { --acc: #7c3aed; --acc-rgb: 124 58 237 }
.service-card:nth-child(3) { --acc: #ea580c; --acc-rgb: 234 88 12 }
.service-card:nth-child(4) { --acc: #0d9488; --acc-rgb: 13 148 136 }
.service-card:nth-child(5) { --acc: #dc2626; --acc-rgb: 220 38 38 }
.service-card:nth-child(6) { --acc: #db2777; --acc-rgb: 219 39 119 }
.service-card:nth-child(7) { --acc: #0891b2; --acc-rgb: 8 145 178 }
.service-card:nth-child(8) { --acc: #b45309; --acc-rgb: 180 83 9 }
.service-card:nth-child(9) { --acc: #16a34a; --acc-rgb: 22 163 74 }

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-4px);
  border-color: rgb(var(--acc-rgb, 0 87 255) / 0.35);
  box-shadow: 0 18px 34px -18px rgb(var(--acc-rgb, 0 87 255) / 0.45);
}

.service-card:hover::before,
.service-card:focus-within::before {
  transform: translateY(0);
}

.service-card::after {
  content: "";
  position: absolute;
  top: -34px;
  right: -26px;
  width: 104px;
  height: 104px;
  z-index: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: scale(0.4);
  opacity: 0;
  transition: transform 0.6s var(--ease) 0.08s, opacity 0.4s var(--ease) 0.08s;
}

.service-card:hover::after,
.service-card:focus-within::after {
  transform: scale(1);
  opacity: 1;
}

.service-card .icon {
  width: 44px;
  height: 44px;
  color: var(--ink);
  transition: transform 0.4s var(--ease), color 0.35s var(--ease);
}

.service-card:hover .icon,
.service-card:focus-within .icon {
  transform: translateY(-2px);
  color: #fff;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  transition: color 0.35s var(--ease);
}

.service-card:hover h3,
.service-card:focus-within h3 {
  color: #fff;
}

.service-card p {
  color: var(--ink-2);
  font-size: 0.92rem;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.35s var(--ease);
}

.service-card:hover .card-link,
.service-card:focus-within .card-link {
  color: var(--acc, var(--accent));
}

.card-link svg {
  transition: transform 0.3s var(--ease);
}

.card-link:hover svg {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .service-card::before,
  .service-card::after {
    transition: none;
  }
}

/* ============ Check list ============ */
.check-list {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 500;
}

.check-list .tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex: none;
}
/* ============ Panel Dashboard ============ */

.demo-split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}

.demo-copy h2 {
  margin-bottom: 14px;
}

.demo-copy > p {
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 420px;
}

.demo-copy .check-list {
  margin-bottom: 28px;
}

.demo-visual {
  min-width: 0;
}

.panel-browser {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #f5f5f7;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 8px 32px rgba(0,0,0,0.08),
    0 32px 64px rgba(0,0,0,0.04);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}

.panel-browser:hover {
  transform: translateY(-4px);
  box-shadow:
    0 1px 3px rgba(0,0,0,0.04),
    0 12px 40px rgba(0,0,0,0.10),
    0 40px 80px rgba(0,0,0,0.06);
}

.panel-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  background: #e8e8ec;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.panel-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.panel-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.panel-dots i:nth-child(1) { background: #ff5f57; }
.panel-dots i:nth-child(2) { background: #ffbd2e; }
.panel-dots i:nth-child(3) { background: #28c840; }

.panel-url-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #fff;
  border-radius: 7px;
  border: 1px solid rgba(0,0,0,0.06);
  font-size: 0.66rem;
  color: var(--ink-3);
  max-width: 280px;
  margin: 0 auto;
}

.panel-url-bar svg { color: #28c840; flex-shrink: 0; }

.panel-topbar-actions {
  flex-shrink: 0;
  color: var(--ink-3);
}

.panel-app {
  display: grid;
  grid-template-columns: 48px 1fr;
  min-height: 360px;
  max-height: 440px;
}

/* --- Sidebar (icon rail) --- */

.panel-sidebar {
  background: #0a0a0a;
  color: #fff;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.panel-logo {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.panel-logo-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #fff;
  color: #0a0a0a;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.75rem;
}

.panel-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.panel-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: all 0.2s var(--ease);
  cursor: default;
}

.panel-nav-item:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.07);
}

.panel-nav-item.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.panel-sidebar-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 10px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.panel-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Main Content --- */

.panel-main {
  background: #f5f5f7;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.panel-subtitle {
  font-size: 0.64rem;
  color: var(--ink-3);
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-notif-btn {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  flex-shrink: 0;
}

.panel-notif-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid #fff;
}

.panel-tabs {
  display: flex;
  gap: 0;
  background: #e8e8ec;
  border-radius: 7px;
  padding: 2px;
}

.panel-tabs span {
  padding: 4px 9px;
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--ink-3);
  border-radius: 5px;
  cursor: default;
  white-space: nowrap;
  transition: all 0.2s var(--ease);
}

.panel-tabs span.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* --- KPI strip --- */

.panel-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.panel-kpi {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.panel-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.panel-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.panel-kpi-top small {
  font-size: 0.6rem;
  color: var(--ink-3);
  font-weight: 500;
}

.panel-kpi-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--bg-alt-3);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  flex-shrink: 0;
}

.panel-kpi-icon.green { background: #dcfce7; color: #16a34a; }
.panel-kpi-icon.blue { background: #dbeafe; color: #2563eb; }
.panel-kpi-icon.orange { background: #ffedd5; color: #ea580c; }

.panel-kpi b {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.panel-kpi-delta {
  font-size: 0.56rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-kpi-delta.positive { color: #16a34a; }
.panel-kpi-delta.warn { color: #ea580c; }

/* --- Panel Cards --- */

.panel-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.panel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.panel-card-head b {
  font-size: 0.74rem;
  font-weight: 700;
}

.panel-card-head small {
  display: block;
  font-size: 0.58rem;
  color: var(--ink-3);
  font-weight: 400;
  margin-top: 1px;
}

.panel-head-pill {
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--bg-alt-3);
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

/* --- Chart + Activity row --- */

.panel-grid-2 {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.panel-chart-area {
  display: flex;
  flex: 1;
  padding: 10px 14px 8px 0;
  min-height: 0;
}

.panel-chart-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 8px 18px 12px;
}

.panel-chart-y span {
  font-size: 0.52rem;
  color: var(--ink-3);
  white-space: nowrap;
}

.panel-chart-body {
  flex: 1;
  position: relative;
  min-width: 0;
}

.panel-chart-body svg {
  width: 100%;
  height: 110px;
  display: block;
}

.panel-area-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawLine 2s var(--ease) forwards 0.5s;
}

.panel-area-fill {
  opacity: 0;
  animation: fadeIn 1s ease forwards 1.5s;
}

.panel-chart-dot {
  opacity: 0;
  animation: fadeIn 0.4s ease forwards 2s;
}

.panel-chart-tooltip {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  background: #0a0a0a;
  color: #fff;
  padding: 4px 9px;
  border-radius: 7px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards 2s;
}

.panel-chart-tooltip b {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
}

.panel-chart-tooltip small {
  font-size: 0.54rem;
  color: rgba(255,255,255,0.6);
}

.panel-chart-tooltip::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #0a0a0a;
}

.panel-chart-x {
  display: flex;
  justify-content: space-between;
  padding-top: 5px;
  border-top: 1px solid rgba(0,0,0,0.05);
  margin-top: 2px;
}

.panel-chart-x span {
  font-size: 0.52rem;
  color: var(--ink-3);
}

/* --- Activity list --- */

.panel-activity-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.panel-activity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.2s var(--ease);
}

.panel-activity-item:last-child { border-bottom: 0; }

.panel-activity-item:hover { background: rgba(0,0,0,0.015); }

.panel-act-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--bg-alt-3);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--ink-3);
}

.panel-act-icon.green { background: #dcfce7; color: #16a34a; }
.panel-act-icon.blue { background: #dbeafe; color: #2563eb; }
.panel-act-icon.orange { background: #ffedd5; color: #ea580c; }

.panel-act-info {
  flex: 1;
  min-width: 0;
}

.panel-act-info b {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-act-info small {
  font-size: 0.55rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.panel-act-meta {
  text-align: right;
  flex-shrink: 0;
}

.panel-act-meta b {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
}

.panel-act-meta small {
  font-size: 0.52rem;
  color: var(--ink-3);
}

/* --- Bottom row: orders + donut --- */

.panel-bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.panel-orders {
  display: flex;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
}

.panel-order-chip {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 0;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.panel-order-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.panel-order-id {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--bg-alt-3);
  padding: 2px 6px;
  border-radius: 5px;
  flex-shrink: 0;
}

.panel-order-chip b {
  font-size: 0.64rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-status {
  display: inline-flex;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.56rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.panel-status.preparing { background: #fff7ed; color: #ea580c; }
.panel-status.ready { background: #dcfce7; color: #16a34a; }
.panel-status.delivered { background: #dbeafe; color: #2563eb; }

.panel-donut-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 8px 16px;
}

.panel-donut {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.panel-donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
}

.donut-seg {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 1s;
}

.donut-seg + .donut-seg { animation-delay: 1.3s; }

.panel-donut b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 800;
}

.panel-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.panel-donut-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.56rem;
  color: var(--ink-2);
  white-space: nowrap;
}

.panel-donut-legend .sw {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
}

.sw.dark { background: #0a0a0a; }
.sw.gray { background: #a1a1aa; }
.sw.light { background: #e4e4e7; }

/* --- Panel Responsive --- */

@media (max-width: 1024px) {
  .demo-split {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .demo-copy > p,
  .demo-copy .check-list {
    max-width: 560px;
  }
}

@media (max-width: 900px) {
  .panel-app {
    grid-template-columns: 1fr;
    min-height: auto;
    max-height: none;
  }

  .panel-sidebar {
    display: none;
  }

  .panel-grid-2 {
    grid-template-columns: 1fr;
  }

  .panel-bottom {
    grid-template-columns: 1fr;
  }

  .panel-orders {
    flex-wrap: wrap;
  }

  .panel-order-chip {
    flex: 1 1 45%;
  }
}

@media (max-width: 560px) {
  .panel-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .panel-order-chip {
    flex: 1 1 100%;
  }
}

@media (max-width: 400px) {
  .panel-kpis {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel-browser {
    transform: none !important;
    transition: none !important;
  }

  .panel-area-line {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }

  .panel-area-fill,
  .panel-chart-dot,
  .panel-chart-tooltip,
  .donut-seg {
    opacity: 1 !important;
    animation: none !important;
  }
}

/* ============ Bento (Why Neta) ============ */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 20px;
}

.bento-item {
  --acc: var(--accent);
  --acc-rgb: 0 87 255;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 28px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.bento-item > :not(.bento-bg) {
  position: relative;
  z-index: 2;
}

.bento-item:nth-child(1) { --acc: #2563eb; --acc-rgb: 37 99 235 }
.bento-item:nth-child(2) { --acc: #7c3aed; --acc-rgb: 124 58 237 }
.bento-item:nth-child(3) { --acc: #0d9488; --acc-rgb: 13 148 136 }
.bento-item:nth-child(4) { --acc: #ea580c; --acc-rgb: 234 88 12 }
.bento-item:nth-child(5) { --acc: #db2777; --acc-rgb: 219 39 119 }
.bento-item:nth-child(6) { --acc: #0891b2; --acc-rgb: 8 145 178 }

/* Geometric pattern layer — quiet at rest, sharpens on hover */
.bento-bg {
  position: absolute;
  inset: -1px;
  z-index: 0;
  opacity: 0.42;
  background-repeat: repeat;
  transition: opacity 0.5s var(--ease), transform 0.9s var(--ease);
}

.pat-diag {
  background-image: repeating-linear-gradient(135deg,
      rgb(var(--acc-rgb) / 0.16) 0 1px, transparent 1px 15px);
}

.pat-rings {
  background-image: repeating-radial-gradient(circle at 92% 6%,
      rgb(var(--acc-rgb) / 0.18) 0 1px, transparent 1px 17px);
}

.pat-dots {
  background-image: radial-gradient(rgb(var(--acc-rgb) / 0.3) 1.5px, transparent 1.6px);
  background-size: 17px 17px;
}

.pat-mesh {
  background-image:
    repeating-linear-gradient(0deg, rgb(var(--acc-rgb) / 0.1) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgb(var(--acc-rgb) / 0.1) 0 1px, transparent 1px 28px);
}

.pat-scallop {
  background-image: radial-gradient(circle at 0 100%,
      rgb(var(--acc-rgb) / 0.16) 9px, transparent 10px);
  background-size: 22px 22px;
}

.pat-hatch {
  background-image:
    repeating-linear-gradient(45deg, rgb(var(--acc-rgb) / 0.13) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(-45deg, rgb(var(--acc-rgb) / 0.13) 0 1px, transparent 1px 13px);
}

/* Corner disc that rotates open on hover */
.bento-item::before {
  content: "";
  position: absolute;
  top: -58px;
  right: -52px;
  z-index: 1;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 1px solid rgb(var(--acc-rgb) / 0.45);
  background: radial-gradient(circle at 50% 50%,
      rgb(var(--acc-rgb) / 0.14), transparent 66%);
  clip-path: inset(0 0 50% 0);
  opacity: 0.6;
  transform: rotate(-18deg);
  transition: transform 0.75s var(--ease), opacity 0.45s var(--ease);
}

/* Accent wash rising from the bottom edge */
.bento-item::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--acc), rgb(var(--acc-rgb) / 0.1));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.bento-item:hover,
.bento-item:focus-within {
  transform: translateY(-4px);
  border-color: rgb(var(--acc-rgb) / 0.35);
  box-shadow: 0 20px 40px -22px rgb(var(--acc-rgb) / 0.55);
}

.bento-item:hover .bento-bg,
.bento-item:focus-within .bento-bg {
  opacity: 0.75;
  transform: scale(1.05);
}

.bento-item:hover::before,
.bento-item:focus-within::before {
  opacity: 1;
  transform: rotate(16deg) translateY(6px);
}

.bento-item:hover::after,
.bento-item:focus-within::after {
  transform: scaleX(1);
}

.bento-item.wide {
  grid-column: span 2;
}

.bento-item h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.1rem;
  font-weight: 600;
}

.bento-item h3::before {
  content: "";
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 2px;
  background: var(--acc);
  transform: rotate(45deg) scale(0.9);
  transition: transform 0.45s var(--ease);
}

.bento-item:hover h3::before {
  transform: rotate(225deg) scale(1.25);
}

.bento-item p {
  color: var(--ink-2);
  font-size: 0.92rem;
  max-width: 420px;
}

.bento-visual {
  margin-top: auto;
  min-height: 72px;
  display: flex;
  align-items: flex-end;
}

/* micro animations inside bento */
.speed-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
}

.speed-bars i {
  width: 10px;
  border-radius: 4px 4px 0 0;
  background: rgb(var(--acc-rgb) / 0.16);
  animation: pulse-bar 2.6s var(--ease) infinite;
}

.speed-bars i:nth-child(1) { height: 30%; animation-delay: 0s; }
.speed-bars i:nth-child(2) { height: 52%; animation-delay: 0.15s; }
.speed-bars i:nth-child(3) { height: 40%; animation-delay: 0.3s; }
.speed-bars i:nth-child(4) { height: 74%; animation-delay: 0.45s; }
.speed-bars i:nth-child(5) { height: 60%; animation-delay: 0.6s; }
.speed-bars i:nth-child(6) { height: 92%; background: var(--acc); animation-delay: 0.75s; }

@keyframes pulse-bar {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.shield-anim svg {
  width: 56px;
  height: 56px;
}

.shield-anim .shield-path {
  stroke: var(--acc);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: draw 3s var(--ease) infinite alternate;
}

.nodes svg {
  width: 100%;
  height: 72px;
}

.nodes circle {
  fill: rgb(var(--acc-rgb) / 0.14);
  stroke: rgb(var(--acc-rgb) / 0.5);
}

.nodes circle.core {
  fill: var(--acc);
  stroke: none;
}

.nodes line {
  stroke: rgb(var(--acc-rgb) / 0.45);
  stroke-dasharray: 4 4;
  animation: dash-move 6s linear infinite;
}

@keyframes dash-move {
  to {
    stroke-dashoffset: -80;
  }
}

/* Release rail + support heartbeat */
.releases svg,
.pulse-line svg {
  width: 100%;
  height: 40px;
  overflow: visible;
}

.releases line.rail {
  stroke: rgb(var(--acc-rgb) / 0.35);
  stroke-width: 1.5;
}

.releases circle {
  fill: rgb(var(--acc-rgb) / 0.18);
  stroke: rgb(var(--acc-rgb) / 0.55);
}

.releases circle.live {
  fill: var(--acc);
  stroke: none;
  transform-origin: 152px 20px;
  animation: trk-pulse 2.4s var(--ease) infinite;
}

.pulse-line .beat {
  fill: none;
  stroke: var(--acc);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: draw 3.4s var(--ease) infinite alternate;
}

@keyframes trk-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .bento-item,
  .bento-item::before,
  .bento-item::after,
  .bento-bg {
    transition: none;
  }

  .bento-item:hover {
    transform: none;
  }

  .releases circle.live {
    animation: none;
  }
}

/* ============ Projects ============ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  transform-style: preserve-3d;
}

.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.project-media {
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.project-media .pm-inner {
  position: absolute;
  inset: 6% 8%;
  transition: transform 0.6s var(--ease);
}

.project-card:hover .pm-inner {
  transform: scale(1.025);
}

.pm-window {
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pm-window .pm-bar {
  height: 26px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
}

.pm-window .pm-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg-alt-3);
}

.pm-window .pm-body {
  flex: 1;
  padding: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  align-content: start;
}

.pm-block {
  border-radius: 8px;
  background: var(--bg-alt-2);
  border: 1px solid var(--border);
}

.pm-block.tall {
  grid-row: span 2;
}

.pm-block.dark {
  background: var(--ink);
  border-color: var(--ink);
}

.project-body {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--bg-alt-2);
}

.tag.placeholder {
  color: var(--ink-3);
  border-style: dashed;
}

.project-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.project-body p {
  color: var(--ink-2);
  font-size: 0.92rem;
}

/* ============ Testimonials ============ */
.testimonial-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-xs);
}

.stars {
  display: flex;
  gap: 3px;
  color: var(--ink);
}

.testimonial-card blockquote {
  font-size: 0.95rem;
  color: var(--ink-2);
  flex: 1;
}

.testimonial-foot {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-foot .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-alt-3);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-2);
  flex: none;
}

.testimonial-foot b {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.testimonial-foot small {
  color: var(--ink-3);
  font-size: 0.78rem;
}

/* ============ CTA ============ */
.cta-panel {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(56px, 8vw, 104px) clamp(28px, 6vw, 88px);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-panel h2 {
  font-size: clamp(30px, 4.4vw, 54px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}

.cta-panel p {
  color: rgba(255, 255, 255, 0.65);
  max-width: 480px;
  margin: 0 auto 36px;
}

.cta-sphere {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  right: -120px;
  top: -140px;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.05) 45%, transparent 70%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: floaty 9s ease-in-out infinite;
  pointer-events: none;
}

.cta-sphere.s2 {
  width: 200px;
  height: 200px;
  right: auto;
  left: -80px;
  top: auto;
  bottom: -90px;
  animation-delay: 1.6s;
}

/* ============ FAQ ============ */
.faq-list {
  max-width: 760px;
  margin-inline: auto;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 4px;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.faq-q .chev {
  flex: none;
  transition: transform 0.4s var(--ease);
}

.faq-item.open .chev {
  transform: rotate(45deg);
}

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease), opacity 0.45s var(--ease);
  opacity: 0;
}

.faq-item.open .faq-a {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-a > div {
  overflow: hidden;
}

.faq-a p {
  color: var(--ink-2);
  font-size: 0.95rem;
  padding: 0 4px 24px;
  max-width: 640px;
}

/* ============ Footer ============ */
.footer {
  background: var(--ink);
  color: #fff;
  padding: clamp(56px, 7vw, 88px) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 48px;
  padding-bottom: 56px;
}

.footer .logo {
  color: #fff;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
  margin-top: 16px;
  max-width: 300px;
}

.footer h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
  transition: color 0.25s var(--ease);
}

.footer-col a:hover {
  color: #fff;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.newsletter-form {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  padding: 14px 20px;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.newsletter-form input:focus {
  outline: none;
}

.newsletter-form:focus-within {
  border-color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
  width: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  transition: background 0.3s var(--ease);
}

.newsletter-form button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.form-note {
  margin-top: 10px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}

.footer-bottom nav {
  display: flex;
  gap: 24px;
}

.footer-bottom a:hover {
  color: #fff;
}

/* ============ Page hero (subpages) ============ */
.page-hero {
  padding: calc(var(--nav-h) + clamp(48px, 7vw, 96px)) 0 clamp(40px, 5vw, 72px);
  background: var(--bg-alt-2);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  max-width: 720px;
}

.page-hero p {
  color: var(--ink-2);
  font-size: clamp(15px, 1.5vw, 18px);
  max-width: 560px;
}

.page-hero .crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink-3);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.page-hero .crumbs a:hover {
  color: var(--ink);
}

/* ============ Forms (contact / login) ============ */
.form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--shadow-xs);
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 13px 16px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.form-msg {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--ink-2);
  min-height: 1.4em;
}

/* ============ Misc content blocks ============ */
.prose {
  max-width: 720px;
}

.prose p {
  color: var(--ink-2);
  margin-bottom: 18px;
}

.prose h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  margin: 40px 0 16px;
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 28px 0 10px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.blog-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-size: 0.8rem;
}

.blog-card .blog-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.blog-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.blog-card p {
  color: var(--ink-2);
  font-size: 0.9rem;
  flex: 1;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.contact-info li {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-info small {
  color: var(--ink-3);
  font-size: 0.8rem;
}

.contact-info b {
  font-weight: 500;
  font-size: 0.98rem;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .services-grid,
  .blog-grid,
  .value-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-item.wide {
    grid-column: span 2;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .scene {
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-actions .btn-ghost,
  .nav-actions .btn-secondary {
    display: none;
  }

  .nav-burger {
    display: grid;
  }

  .showcase,
  .showcase.reverse {
    grid-template-columns: 1fr;
  }

  .showcase.reverse .showcase-media {
    order: 0;
  }

  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .dash {
    grid-template-columns: 1fr 1fr;
  }

  .dash-wide {
    grid-column: span 2;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .phones-comp {
    height: 360px;
  }

  .phones-comp .phone.p-back-l,
  .phones-comp .phone.p-back-r {
    display: none;
  }
}

@media (max-width: 560px) {
  .services-grid,
  .blog-grid,
  .value-grid,
  .bento,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .bento-item.wide {
    grid-column: span 1;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .dash {
    grid-template-columns: 1fr;
  }

  .dash-wide {
    grid-column: span 1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-cta .btn {
    width: 100%;
  }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal],
  .hero .fade-item,
  .hero-title .line > span,
  .scene,
  .showcase-media .tilt-in {
    opacity: 1 !important;
    transform: none !important;
  }

  .bar {
    transform: scaleY(1);
  }
}

/* ============ Contact list ============ */
.contact-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-list li:first-child {
  padding-top: 0;
}

.contact-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.contact-list a {
  font-weight: 500;
  transition: color 0.3s var(--ease);
}

.contact-list a:hover {
  color: var(--ink-2);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============ Auth ============ */
.auth-section {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 0;
  background: radial-gradient(92% 72% at 50% 42%, #ffffff 0%, var(--bg-alt) 72%);
  overflow: hidden;
}

.auth-section .container {
  position: relative;
  z-index: 1;
}

/* ---- Endless maze backdrop: Pac-Man plays itself behind the panel ---- */
.pm-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s var(--ease);
}

body.is-loaded .pm-bg {
  opacity: 1;
}

.pm-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* wash the middle out so the form never sits on a busy corridor */
.pm-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(54% 46% at 50% 50%,
      rgba(255, 255, 255, 0.97) 0%,
      rgba(255, 255, 255, 0.82) 42%,
      rgba(255, 255, 255, 0) 76%);
}

.pm-bg .mz-wall {
  fill: none;
  stroke: rgba(0, 87, 255, 0.3);
  stroke-width: 1.4;
}

.pm-bg .mz-dot {
  fill: rgba(15, 35, 80, 0.17);
}

.pm-bg .mz-pel-ring {
  opacity: 0.4;
}

.pm-bg .mz-pac {
  fill: #f6b83f;
  filter: none;
}

.pm-bg .mz-ghost {
  filter: none;
  opacity: 0.45;
}

/* caught: Pac-Man burns out, then the board resets around him */
.pm-bg g.burn .mz-pac {
  animation: pm-burn 1.7s var(--ease) both;
}

@keyframes pm-burn {
  0% {
    scale: 1;
    fill: #f6b83f;
    filter: drop-shadow(0 0 0 rgba(255, 106, 61, 0));
  }

  22% {
    scale: 1.42;
    fill: #ff6a3d;
    filter: drop-shadow(0 0 14px rgba(255, 106, 61, 0.85));
  }

  55% {
    scale: 1.1;
    fill: #e11d48;
    opacity: 0.92;
  }

  100% {
    scale: 0.1;
    fill: #fde68a;
    opacity: 0;
  }
}

/* board cleared: the walls flash once before the dots come back */
.pm-svg.pm-clear .mz-wall {
  animation: pm-clear 0.9s var(--ease);
}

@keyframes pm-clear {

  0%,
  30% {
    stroke: rgba(246, 184, 63, 0.8);
  }

  100% {
    stroke: rgba(0, 87, 255, 0.17);
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding: 32px 24px;
  }
}

.auth-logo {
  display: inline-block;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 22px;
}

.auth-logo em {
  color: var(--accent);
  font-style: normal;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  background: var(--bg);
  border: 0;
  box-shadow: none;
  border-radius: var(--radius-lg);
  padding: 44px 40px;
}

.auth-card h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-card > p {
  color: var(--ink-2);
  font-size: 0.92rem;
  margin-bottom: 28px;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.auth-row a {
  color: var(--ink-2);
  transition: color 0.3s var(--ease);
}

.auth-row a:hover {
  color: var(--ink);
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  cursor: pointer;
}

.check-line input {
  width: 16px;
  height: 16px;
  accent-color: var(--ink);
}

.auth-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--ink-3);
  font-size: 0.85rem;
}

.auth-note a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 32px 24px;
  }
}

/* =================== HORIZONTAL PROJECT RAIL =================== */
/* Default = native horizontal scroller (works without JS).
   JS adds .hs-active to switch on the pinned, scroll-driven version. */
.hscroll {
  position: relative;
  background: var(--bg-alt);
}

.hs-pin { position: relative; }

.hs-stage {
  position: relative;
  padding: clamp(72px, 9vw, 128px) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hs-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hs-ambient .hb {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h, var(--w));
  color: var(--c);
  opacity: var(--o, 0.5);
  border-radius: 50%;
}

.hs-track {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 32px);
  padding-inline: clamp(24px, 5vw, 72px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.hs-track::-webkit-scrollbar { display: none; }

.hs-track > * { scroll-snap-align: center; flex: 0 0 auto; }

/* --- Intro panel --- */
.hs-head,
.hs-outro { width: min(440px, 78vw); }

.hs-head h2 {
  font-size: clamp(34px, 4.2vw, 58px);
  letter-spacing: -0.04em;
  line-height: 1.06;
  margin: 18px 0 16px;
}

.hs-head p,
.hs-outro p {
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 38ch;
}

.hs-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}

.hs-hint svg { animation: hs-nudge 1.9s var(--ease) infinite; }

@keyframes hs-nudge {
  0%, 100% { transform: translateX(0); opacity: 0.6; }
  50% { transform: translateX(6px); opacity: 1; }
}

/* --- Project cards --- */
.hs-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(380px, 80vw);
  height: min(540px, 68vh);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.55s var(--ease), border-color 0.55s var(--ease),
    box-shadow 0.55s var(--ease);
}

.hs-card:hover {
  transform: translateY(-8px);
  border-color: rgb(var(--acc-rgb) / 0.42);
  box-shadow: 0 34px 60px -32px rgb(var(--acc-rgb) / 0.6);
}

.hs-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 30px 26px;
  background-color: rgb(var(--acc-rgb) / 0.04);
  transition: background-color 0.55s var(--ease);
}

.hs-card:hover .hs-media { background-color: rgb(var(--acc-rgb) / 0.08); }

.hs-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, var(--bg) 100%);
  pointer-events: none;
}

.hs-num {
  position: absolute;
  top: 14px;
  left: 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--acc);
}

.hs-window {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform 0.6s var(--ease);
}

.hs-card:hover .hs-window { transform: translateY(-6px) scale(1.02); }

.hw-bar {
  display: flex;
  gap: 5px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
}

.hw-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bg-alt-3);
}

.hw-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}

.hw-body b {
  display: block;
  height: 28px;
  border-radius: 6px;
  background: rgb(var(--acc-rgb) / 0.16);
}

.hw-body b.dark { background: var(--acc); }
.hw-body b.tall { grid-row: span 2; align-self: stretch; height: auto; }

.hs-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 24px;
  border-top: 1px solid var(--border);
}

.hs-info h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.35; }
.hs-info p { color: var(--ink-2); font-size: 0.88rem; flex: 1; }

/* --- Closing panel --- */
.hs-outro {
  width: min(360px, 78vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  padding: 30px 28px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.hs-outro h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; }

/* --- HUD --- */
.hs-hud {
  position: absolute;
  left: clamp(24px, 5vw, 72px);
  right: clamp(24px, 5vw, 72px);
  bottom: 28px;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 18px;
}

.hs-rail {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: var(--border-strong);
  overflow: hidden;
}

.hs-rail i {
  display: block;
  height: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

.hs-count {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.hs-count b { color: var(--ink); font-weight: 600; }
.hs-count i { font-style: normal; }

/* --- Pinned, scroll-driven mode --- */
.hscroll.hs-active .hs-pin {
  height: calc(100vh + var(--hs-dist, 0px));
  height: calc(100dvh + var(--hs-dist, 0px));
}

.hscroll.hs-active .hs-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 600px;
  padding: 0;
  display: flex;
  align-items: center;
}

.hscroll.hs-active.hs-fixed .hs-stage { position: fixed; }

.hscroll.hs-active .hs-track {
  height: 100%;
  align-items: center;
  overflow: visible;
  scroll-snap-type: none;
  will-change: transform;
}

.hscroll.hs-active .hs-hud { display: flex; }

.hscroll.hs-active .hs-card { height: min(560px, 66vh); }

/* --- Phone: same pinned rail, tighter cards and no 600px floor --- */
.hscroll.hs-active.hs-narrow .hs-stage { min-height: 0; }

.hscroll.hs-active.hs-narrow .hs-track {
  padding-inline: 20px;
  gap: 16px;
}

.hscroll.hs-active.hs-narrow .hs-card,
.hscroll.hs-active.hs-narrow .hs-head,
.hscroll.hs-active.hs-narrow .hs-outro {
  width: min(300px, 74vw);
}

.hscroll.hs-active.hs-narrow .hs-card {
  height: min(62vh, 460px);
  min-height: 0;
}

.hscroll.hs-active.hs-narrow.hscroll--process .hs-card.hs-step {
  height: min(66vh, 470px);
}

.hscroll.hs-active.hs-narrow .hs-hud {
  left: 20px;
  right: 20px;
  bottom: 16px;
}

.hscroll.hs-active.hs-narrow .hs-head h2 { font-size: clamp(28px, 8vw, 40px); }

/* ============ Process rail (same rail, step cards) ============ */
.hscroll + .hscroll .hs-stage { border-top: none; }

.hscroll--process .hs-card.hs-step {
  width: min(420px, 82vw);
  height: auto;
  min-height: 0;
  justify-content: flex-start;
  padding-right: 30px;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.hscroll--process .hs-card.hs-step:hover {
  transform: translateY(-3px);
  box-shadow: none;
}

/* Hairline on the left of every step column — the only thing marking each area */
.hscroll--process .hs-step::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(-1 * clamp(10px, 1.2vw, 16px));
  width: 1px;
  background: var(--border-strong);
}

.hscroll.hs-active.hscroll--process .hs-card.hs-step { height: clamp(300px, 46vh, 312px); }

/* Segmented step progress, full bleed across the card top */
.hs-step .hs-seg {
  display: flex;
  gap: 2px;
  flex: 0 0 auto;
}

.hs-step .hs-seg i {
  flex: 1;
  height: 4px;
  background: var(--border-strong);
  transition: background 0.5s var(--ease), transform 0.5s var(--ease);
  transform-origin: bottom;
}

.hs-step .hs-seg i.on { background: var(--acc); }

.hs-step:hover .hs-seg i.on { transform: scaleY(1.8); }

.hs-step-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 20px 0 0;
}

.hs-step-top {
  display: flex;
  align-items: baseline;
  gap: 13px;
}

.hs-step-top .hs-num {
  position: static;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
  color: var(--acc);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}

.hs-step:hover .hs-num { transform: translateY(-2px); }

.hs-step-top h3 {
  position: relative;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hs-step-top h3::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: 32px;
  height: 2px;
  border-radius: 2px;
  background: var(--acc);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.hs-step:hover .hs-step-top h3::after { transform: scaleX(1); }

.hs-step-body p {
  color: var(--ink-2);
  font-size: 0.87rem;
  line-height: 1.65;
}

.hs-feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.hs-feats li {
  position: relative;
  padding-left: 19px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.hs-feats li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.34em;
  width: 6px;
  height: 10px;
  border-right: 1.6px solid var(--acc);
  border-bottom: 1.6px solid var(--acc);
  transform: rotate(42deg);
}

.hs-out {
  align-self: stretch;
  display: flex;
  gap: 7px;
  margin-top: auto;
  padding: 15px 0 0;
  border-top: 1px solid var(--border-strong);
  color: var(--ink-2);
  font-size: 0.78rem;
  transition: border-color 0.45s var(--ease);
}

.hs-step:hover .hs-out { border-top-color: var(--acc); }

.hs-out b { font-weight: 600; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .hs-step:hover .hs-seg i.on { transform: none; }
  .hs-step:hover .hs-num { transform: none; }
}

/* ============ Colour-cycling cursor ============ */
html.has-cursor,
html.has-cursor * {
  cursor: none !important;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  translate: -50% -50%;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  will-change: transform;
}

body.cursor-live .cursor-dot,
body.cursor-live .cursor-ring {
  opacity: 1;
}

.cursor-dot {
  width: 11px;
  height: 11px;
  animation: cur-dot 7s linear infinite;
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid transparent;
  animation: cur-ring 7s linear infinite;
  animation-delay: -1.75s;
}

@keyframes cur-dot {
  0%,
  100% {
    background: #2563eb;
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.6);
  }
  25% {
    background: #7c3aed;
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.6);
  }
  50% {
    background: #0d9488;
    box-shadow: 0 0 16px rgba(13, 148, 136, 0.6);
  }
  75% {
    background: #db2777;
    box-shadow: 0 0 16px rgba(219, 39, 119, 0.6);
  }
}

@keyframes cur-ring {
  0%,
  100% {
    border-color: rgba(37, 99, 235, 0.55);
  }
  25% {
    border-color: rgba(124, 58, 237, 0.55);
  }
  50% {
    border-color: rgba(13, 148, 136, 0.55);
  }
  75% {
    border-color: rgba(219, 39, 119, 0.55);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ============ Support chat widget ============ */
.cs {
  position: fixed;
  right: clamp(16px, 2.4vw, 28px);
  bottom: clamp(16px, 2.4vw, 28px);
  z-index: 1300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

body.menu-open .cs {
  display: none;
}

/* The maze owns the whole screen while pinned, so nothing floats over it */
body.maze-mode .cs,
body.dt-mode .cs {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
}

/* --- Launcher card --- */
.cs-launch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 34px 11px 11px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
  box-shadow: var(--shadow-md);
  text-align: left;
  transition: transform 0.45s var(--ease), opacity 0.35s var(--ease),
    box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
}

.cs-launch:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.42);
}

.cs-launch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cs-ava {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
}

.cs-ava svg {
  width: 20px;
  height: 20px;
}

.cs-launch-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cs-launch-txt b {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.cs-launch-txt small {
  font-size: 0.74rem;
  color: var(--ink-3);
}

.cs-flag {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  animation: cs-flag-cycle 7s linear infinite;
}

.cs-flag::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  animation: cs-ping 2.4s var(--ease) infinite;
}

.cs-launch.seen .cs-flag {
  display: none;
}

body.cs-open .cs-launch {
  opacity: 0;
  transform: translateY(14px) scale(0.94);
  pointer-events: none;
}

/* --- Chat panel --- */
.cs-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(372px, calc(100vw - 32px));
  max-height: min(580px, calc(100vh - 96px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg);
  box-shadow: 0 38px 80px -26px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease),
    visibility 0.5s;
  visibility: hidden;
}

body.cs-open .cs-panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}

.cs-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 16px 18px;
  background: var(--ink);
  color: #fff;
  position: relative;
}

.cs-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  animation: cs-flag-cycle 7s linear infinite;
}

.cs-head .cs-ava {
  background: rgba(255, 255, 255, 0.14);
}

.cs-head-txt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-right: auto;
}

.cs-head-txt b {
  font-size: 0.92rem;
  font-weight: 600;
}

.cs-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.62);
}

.cs-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: cs-ping 2.4s var(--ease) infinite;
}

.cs-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.cs-close:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(90deg);
}

.cs-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.cs-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px;
  background: var(--bg-alt-2);
  scrollbar-width: thin;
}

.cs-msg {
  max-width: 84%;
  padding: 11px 13px;
  font-size: 0.84rem;
  line-height: 1.55;
  animation: cs-in 0.45s var(--ease) both;
}

.cs-msg.bot {
  align-self: flex-start;
  border-radius: 14px 14px 14px 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-2);
}

.cs-msg.me {
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
  background: var(--ink);
  color: #fff;
}

.cs-msg a {
  color: var(--accent);
  text-decoration: underline;
}

.cs-msg.me a {
  color: #fff;
}

.cs-msg time {
  display: block;
  margin-top: 5px;
  font-size: 0.66rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.cs-msg.me time {
  color: rgba(255, 255, 255, 0.5);
}

.cs-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 13px;
}

.cs-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: cs-bounce 1.1s var(--ease) infinite;
}

.cs-typing i:nth-child(2) { animation-delay: 0.14s; }
.cs-typing i:nth-child(3) { animation-delay: 0.28s; }

.cs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 16px 12px;
  background: var(--bg-alt-2);
}

.cs-chip {
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.76rem;
  color: var(--ink-2);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    color 0.3s var(--ease), background 0.3s var(--ease);
}

.cs-chip:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  color: var(--ink);
}

.cs-form {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 12px 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.cs-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  color: var(--ink);
}

.cs-input::placeholder {
  color: var(--ink-3);
}

.cs-input:focus {
  outline: none;
}

.cs-send {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.cs-send:hover:not(:disabled) {
  transform: translateX(2px) scale(1.06);
  box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.5);
}

.cs-send:disabled {
  opacity: 0.32;
}

@keyframes cs-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes cs-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@keyframes cs-ping {
  0% {
    box-shadow: 0 0 0 0 currentColor;
    opacity: 0.6;
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px transparent;
    opacity: 0;
  }
}

@keyframes cs-flag-cycle {
  0%,
  100% {
    background: #2563eb;
    color: #2563eb;
  }
  25% {
    background: #7c3aed;
    color: #7c3aed;
  }
  50% {
    background: #0d9488;
    color: #0d9488;
  }
  75% {
    background: #db2777;
    color: #db2777;
  }
}

@media (max-width: 480px) {
  .cs-launch-txt small {
    display: none;
  }

  .cs-panel {
    max-height: calc(100vh - 72px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-msg,
  .cs-typing i,
  .cs-flag,
  .cs-flag::after,
  .cs-status i,
  .cs-head::after {
    animation: none;
  }
}

/* ============ Maze showcase (scroll-driven Pac-Man, full screen) ============ */
.maze-sec {
  --m-bg: #ffffff;
  --m-ink: var(--ink);
  --m-ink-2: var(--ink-2);
  --m-line: rgba(0, 87, 255, 0.14);
  --m-neon: var(--accent);
  position: relative;
  z-index: 1;
  overflow: hidden;
  isolation: isolate;
  min-height: 100vh;
  padding: calc(var(--nav-h) + 34px) clamp(18px, 4vw, 56px) 72px;
  background: var(--m-bg);
  color: var(--m-ink);
}

.maze-sec::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(120% 85% at 50% 45%, #eaeffb 0%, transparent 65%),
    linear-gradient(180deg, #f7f8fb, var(--m-bg) 55%);
}

/* Faint grid paper under the maze */
.maze-sec::after {
  content: "";
  position: absolute;
  inset: -20% -10%;
  z-index: -2;
  background-image: linear-gradient(var(--m-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--m-line) 1px, transparent 1px);
  background-size: 58px 58px;
  opacity: 0.5;
  mask-image: radial-gradient(72% 62% at 50% 48%, #000 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(72% 62% at 50% 48%, #000 0%, transparent 80%);
}

.maze-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: min(1100px, 110%);
  height: 62%;
  translate: -50% -50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 87, 255, 0.14), transparent 70%);
  filter: blur(46px);
  animation: maze-breathe 11s ease-in-out infinite;
}

@keyframes maze-breathe {

  0%,
  100% {
    opacity: 0.5;
    scale: 0.94;
  }

  50% {
    opacity: 0.95;
    scale: 1.06;
  }
}

.maze-pin {
  position: relative;
  width: 100%;
}

.maze-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.maze-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  margin-inline: auto;
  overflow: visible;
}

/* ---- HUD ---- */
.maze-hud {
  display: flex;
  align-items: center;
  gap: 9px;
  align-self: flex-end;
  padding: 7px 14px;
  border: 1px solid var(--m-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(9px);
  color: var(--m-ink-2);
  box-shadow: 0 10px 30px -18px rgba(10, 25, 60, 0.45);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.maze-hud b {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.maze-hud b.flash {
  animation: hud-pop 0.55s var(--ease);
}

@keyframes hud-pop {
  0% {
    scale: 1;
    color: var(--accent);
  }

  35% {
    scale: 1.35;
    color: var(--ink);
  }

  100% {
    scale: 1;
    color: var(--accent);
  }
}

.hud-sep {
  width: 1px;
  height: 13px;
  background: var(--m-line);
}

/* ---- Stage messages ---- */
.maze-msgs {
  display: grid;
  justify-items: center;
  gap: 26px;
  text-align: center;
}

.mm {
  max-width: min(700px, 88vw);
  padding: 22px 32px;
  border: 1px solid var(--m-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 26px 62px -30px rgba(10, 25, 60, 0.35);
}

.mm-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--acc);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.mm-q {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  font-weight: 620;
  line-height: 1.24;
  letter-spacing: -0.022em;
}

.mm-q b {
  color: var(--acc);
  font-weight: 700;
}

.mm-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--m-ink-2);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.mm-hint svg {
  animation: cue-nudge 1.9s var(--ease) infinite;
}

@keyframes cue-nudge {

  0%,
  100% {
    translate: 0 -2px;
    opacity: 0.5;
  }

  50% {
    translate: 0 3px;
    opacity: 1;
  }
}

/* ---- Maze pieces ---- */
.mz-wall {
  fill: rgba(0, 87, 255, 0.055);
  stroke: rgba(0, 87, 255, 0.46);
  stroke-width: 1.2;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 14ms);
}

.mz-dot {
  fill: rgba(15, 35, 80, 0.42);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.26s var(--ease), opacity 0.26s var(--ease);
}

.mz-dot.eaten {
  transform: scale(0);
  opacity: 0;
}

.mz-pel {
  fill: var(--acc);
  transform-box: fill-box;
  transform-origin: center;
  animation: pel-pulse 1.5s ease-in-out infinite;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}

.mz-pel-ring {
  fill: none;
  stroke: var(--acc);
  stroke-width: 1.5;
  opacity: 0.55;
  transform-box: fill-box;
  transform-origin: center;
  animation: pel-ring 1.9s ease-out infinite;
  transition: opacity 0.35s ease;
}

@keyframes pel-pulse {

  0%,
  100% {
    scale: 1;
  }

  50% {
    scale: 0.64;
  }
}

@keyframes pel-ring {
  0% {
    scale: 0.5;
    opacity: 0.7;
  }

  100% {
    scale: 1.85;
    opacity: 0;
  }
}

.mz-pel.taken,
.mz-pel-ring.taken {
  transform: scale(2.6);
  opacity: 0;
}

.mz-pac {
  fill: #f5a623;
  filter: drop-shadow(0 3px 10px rgba(245, 166, 35, 0.45));
}

.mz-ghost {
  color: #e11d48;
  filter: drop-shadow(0 6px 12px rgba(10, 25, 60, 0.2));
}

.mz-ghost-b {
  color: #0ea5e9;
}

.mz-ghost-c {
  color: #ea580c;
}

.ghull {
  fill: currentColor;
}

.mz-eye {
  fill: #fff;
}

.mz-pupil {
  fill: #0a0e1c;
}

.mz-ghost.scared {
  color: var(--accent);
}

/* Escape: walls peel away outward from the exit */
.maze-svg.escaped .mz-wall {
  opacity: 0;
  transform: translateY(-16px) scale(0.68);
}

.maze-svg.escaped .mz-dot:not(.eaten) {
  opacity: 0.14;
}

/* ---- Live (pinned, full-bleed) mode ---- */
.maze-live {
  padding: 0;
}

.maze-live .maze-pin {
  height: calc(100vh + var(--m-dist, 2600px));
  height: calc(100dvh + var(--m-dist, 2600px));
}

.maze-live .maze-stage {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
}

.maze-live.maze-fixed .maze-stage {
  position: fixed;
}

.maze-live .maze-svg {
  position: absolute;
  top: 100px;
  left: 0;
  right: 0;
  width: 100%;
  height: calc(100% - 200px);
  max-height: none;
}

.maze-live .maze-hud {
  position: absolute;
  top: calc(var(--nav-h) + 12px);
  right: clamp(14px, 2.4vw, 30px);
}

.maze-live .maze-msgs {
  position: absolute;
  inset: 0;
  display: block;
}

/* Darkens the board behind the question so the dialog reads */
.maze-live .maze-msgs::before {
  content: "";
  position: absolute;
  inset: -10% 0;
  background: radial-gradient(42% 34% at 50% 50%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 74%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s var(--ease);
}

.maze-live .maze-msgs.lit::before {
  opacity: 1;
}

.maze-live .mm {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  max-width: min(660px, 88vw);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.maze-live .mm.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.maze-live .mm-q {
  font-size: clamp(1.25rem, 3.1vw, 2.35rem);
  text-wrap: balance;
}

.maze-live .mm-kicker {
  font-size: 0.66rem;
}

/* ---- Phone live mode: camera follows Pac-Man, dialog sits under the board ---- */
.maze-live.maze-narrow .maze-stage {
  min-height: 0;
  padding: 0;
}

.maze-live.maze-narrow .maze-svg {
  position: absolute;
  inset: auto;
  left: 50%;
  top: calc(var(--nav-h) + 44px);
  translate: -50% 0;
  /* leave room underneath for the dialog card */
  width: min(94vw, calc(100vh - var(--nav-h) - 300px));
  width: min(94vw, calc(100dvh - var(--nav-h) - 300px));
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: none;
}

.maze-live.maze-narrow .maze-hud {
  top: calc(var(--nav-h) + 10px);
  right: 14px;
}

.maze-live.maze-narrow .maze-msgs::before {
  inset: 52% 0 0;
  background: radial-gradient(86% 66% at 50% 100%, rgba(255, 255, 255, 0.96), transparent 72%);
}

.maze-live.maze-narrow .mm {
  top: auto;
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  translate: -50% 0;
  max-width: min(520px, 92vw);
  padding: 18px 20px;
}

.maze-live.maze-narrow .mm-q {
  font-size: clamp(1.12rem, 5.4vw, 1.7rem);
}

/* Static fallback: no pinning, no live score, every message stacked */
.maze-sec:not(.maze-live) .maze-hud,
.maze-sec:not(.maze-live) .mm-intro {
  display: none;
}

@media (prefers-reduced-motion: reduce) {

  .maze-glow,
  .mz-pel,
  .mz-pel-ring,
  .mm-hint svg {
    animation: none;
  }
}

/* ============ Neden Neta · scroll-driven Tetris scene ============ */
.dt-sec {
  position: relative;
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.dt-pin {
  position: relative;
}

.dt-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--nav-h) + 20px) 0 24px;
}

.dt-inner {
  width: min(1280px, 100% - 48px);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* --- heading stays on stage, recedes slightly --- */
.dt-head {
  flex: none;
  margin-bottom: clamp(10px, 1.7vh, 22px);
}

.dt-title {
  font-size: clamp(36px, 5vw, 76px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.04;
  color: var(--ink);
}

.dt-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(108px, 9.5vw, 148px) minmax(0, 1fr);
  gap: clamp(14px, 2.2vw, 38px);
}

/* --- left timeline --- */
.dt-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(7px, 1.2vh, 14px);
  padding-left: 16px;
}

.dt-rail::before,
.dt-rail::after {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 1px;
}

.dt-rail::before {
  background: rgba(0, 0, 0, 0.08);
}

.dt-rail::after {
  background: var(--ink);
  transform-origin: top center;
  transform: scaleY(var(--p, 0));
}

.dt-rail-i {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0.14;
  transition: opacity 0.55s var(--ease), color 0.55s var(--ease);
}

.dt-rail-i i {
  font-style: normal;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.dt-rail-i span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dt-rail-i.dt-on {
  opacity: 0.52;
}

.dt-rail-i.dt-cur {
  opacity: 1;
  color: var(--ink);
}

.dt-rail-i.dt-cur::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 0.4em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- the field --- */
.dt-scene {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.dt-board {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  margin-bottom: clamp(10px, 1.5vh, 20px);
}

.dt-w {
  position: relative;
  flex: none;
  overflow: hidden;
}

.dt-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: var(--cell, 64px) var(--cell, 64px);
  background-position: bottom left;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), #000 60%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), #000 60%);
}

.dt-lines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.14);
}

.dt-full {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--cell, 64px);
  background: linear-gradient(90deg, rgba(0, 87, 255, 0.03), rgba(0, 87, 255, 0.13) 50%, rgba(0, 87, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(0, 87, 255, 0.3), inset 0 -1px 0 rgba(0, 87, 255, 0.3);
  opacity: 0;
  pointer-events: none;
}

.dt-pieces,
.dt-parts {
  position: absolute;
  inset: 0;
}

.dt-c {
  position: absolute;
  border-radius: 4px;
  background: var(--g, #eeeeee);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  outline: 1px solid rgba(0, 0, 0, 0.06);
  outline-offset: -1px;
}

.dt-c.dt-key::after {
  content: "";
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.6;
}

.dt-pt {
  position: absolute;
  border-radius: 2px;
  background: var(--g, #eeeeee);
  opacity: 0;
}

.dt-live .dt-c,
.dt-live .dt-pt {
  will-change: transform, opacity;
}

/* --- the revealed feature --- */
.dt-slot {
  position: relative;
  flex: none;
  height: clamp(124px, 20vh, 176px);
}

.dt-f {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: clamp(30px, 3vw, 46px) minmax(0, 1fr);
  gap: clamp(10px, 1.4vw, 18px);
  align-items: start;
  opacity: 0;
  transform-origin: left center;
}

.dt-f-n {
  padding-top: 0.7em;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.dt-f-t {
  font-size: clamp(24px, 3.2vw, 46px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.16;
  padding-bottom: 0.06em;
  color: var(--ink);
}

.dt-f-d {
  margin-top: 7px;
  max-width: 64ch;
  font-size: clamp(13.5px, 1.02vw, 16px);
  line-height: 1.62;
  color: var(--ink-2);
}

/* --- pinned, scroll-driven --- */
.dt-live .dt-pin {
  height: calc(100vh + var(--dt-dist, 5200px));
  height: calc(100dvh + var(--dt-dist, 5200px));
}

.dt-live .dt-stage {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  padding: calc(var(--nav-h) + 14px) 0 18px;
}

.dt-live.dt-fixed .dt-stage {
  position: fixed;
}

/* --- static fallback: reduced motion or too short a viewport --- */
.dt-sec:not(.dt-live) {
  padding: clamp(58px, 8vw, 104px) 0;
}

.dt-sec:not(.dt-live) .dt-stage {
  min-height: 0;
  padding: 0;
}

.dt-sec:not(.dt-live) .dt-rail,
.dt-sec:not(.dt-live) .dt-board {
  display: none;
}

.dt-sec:not(.dt-live) .dt-body {
  grid-template-columns: minmax(0, 1fr);
}

.dt-sec:not(.dt-live) .dt-slot {
  height: auto;
  display: grid;
}

.dt-sec:not(.dt-live) .dt-f {
  position: static;
  inset: auto;
  opacity: 1;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.dt-sec:not(.dt-live) .dt-f-n,
.dt-sec:not(.dt-live) .dt-f-t,
.dt-sec:not(.dt-live) .dt-f-d {
  opacity: 1;
  transform: none;
  -webkit-clip-path: none;
  clip-path: none;
}

@media (max-width: 899px) {
  .dt-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
  }

  .dt-rail {
    order: -1;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    padding-left: 0;
    padding-bottom: 10px;
  }

  .dt-rail::before,
  .dt-rail::after {
    display: none;
  }

  .dt-rail-i {
    grid-template-columns: none;
    justify-items: center;
    gap: 0;
  }

  .dt-rail-i span {
    display: none;
  }

  .dt-rail-i.dt-cur::before {
    left: 50%;
    top: auto;
    bottom: -9px;
    transform: translateX(-50%);
  }

  .dt-board {
    margin-bottom: 8px;
  }
}

@media (max-width: 639px) {
  .dt-inner {
    width: min(1280px, 100% - 36px);
  }

  .dt-title {
    font-size: clamp(30px, 8.4vw, 44px);
  }

  .dt-f {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
  }

  .dt-f-t {
    font-size: clamp(24px, 6.4vw, 34px);
  }

  .dt-f-d {
    font-size: 15.5px;
  }

  .dt-slot {
    height: clamp(136px, 24vh, 190px);
  }
}

/* ============ Auto-flowing review and brand strips ============ */
.tst-rows {
  display: grid;
  gap: 20px;
  margin-top: 8px;
}

.marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.mq-track {
  display: flex;
  width: max-content;
  animation: mq-flow var(--sp, 60s) linear infinite;
}

.mq-track > * {
  flex: none;
  margin-right: var(--g, 20px);
}

.marquee:hover .mq-track {
  animation-play-state: paused;
}

@keyframes mq-flow {
  from {
    transform: translate3d(-50%, 0, 0);
  }

  to {
    transform: translate3d(0, 0, 0);
  }
}

.tst-rows .testimonial-card {
  width: clamp(290px, 30vw, 368px);
}

.tst-rows .stars {
  color: #e8a20c;
  font-size: 0.95rem;
  letter-spacing: 3px;
  line-height: 1;
}

.tst-rows .testimonial-card:hover {
  border-color: rgba(0, 87, 255, 0.28);
  box-shadow: var(--shadow-sm);
}

.tst-rows .testimonial-card {
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.brand-strip {
  --g: 14px;
  padding-block: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-3);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-xs);
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.brand:hover {
  color: var(--c, var(--accent));
  border-color: var(--c, var(--accent));
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.brand svg {
  transition: transform 0.45s var(--ease);
}

.brand:hover svg {
  transform: rotate(-10deg) scale(1.1);
}

@media (max-width: 600px) {
  .tst-rows .testimonial-card {
    width: 272px;
    padding: 22px;
  }

  .brand {
    padding: 11px 16px;
    font-size: 0.85rem;
  }
}

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