:root {
  color-scheme: light;
  --bg: #f7fbff;
  --ink: #121621;
  --muted: #536271;
  --line: rgba(18, 22, 33, 0.13);
  --panel: rgba(255, 255, 255, 0.74);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --cyan: #00b8d9;
  --lime: #44d62c;
  --coral: #ff4d2e;
  --gold: #f6a600;
  --violet: #725cff;
  --shadow: 0 24px 70px rgba(35, 52, 70, 0.14);
  --radius: 8px;
  --max: 1180px;
  --grid-line: rgba(18, 22, 33, 0.07);
}

/* Android-native typography for the dedicated mobile experience. */
@media (max-width: 680px) {
  body,
  button,
  input,
  textarea,
  select {
    font-family: Roboto, "Noto Sans", "Helvetica Neue", sans-serif;
    letter-spacing: 0;
  }

  .nav,
  .mobile-bottom-nav,
  .button,
  .hero .eyebrow,
  .page-hero .eyebrow,
  .tag,
  .nav-links a,
  .products-menu summary {
    font-family: inherit;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(30px, 8.2vw, 36px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
  }

  .hero-copy,
  .page-copy {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
  }

  .section-head h2 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.012em;
  }

  .section-copy,
  .service-card p,
  .work-card p,
  .insight-card p,
  .step p,
  .stack-panel p {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
  }

  .service-card h3,
  .work-card h3,
  .insight-card h3,
  .step h3,
  .stack-panel h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
  }

  .nav-links a,
  .products-menu summary,
  .button {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
  }

  .mobile-bottom-nav a {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
  }

  .hero .eyebrow,
  .page-hero .eyebrow,
  .tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 184, 217, 0.24), transparent 32%),
    radial-gradient(circle at 86% 16%, rgba(255, 77, 46, 0.18), transparent 29%),
    radial-gradient(circle at 70% 88%, rgba(68, 214, 44, 0.2), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #eefdff 34%, #e9fff8 64%, #fff8e8 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 260ms ease, color 260ms ease;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070807;
  --ink: #f5f7ef;
  --muted: #aeb8aa;
  --line: rgba(245, 247, 239, 0.15);
  --panel: rgba(16, 19, 15, 0.76);
  --panel-strong: rgba(22, 27, 22, 0.92);
  --cyan: #3ff6e8;
  --lime: #b9ff66;
  --coral: #ff7a59;
  --gold: #ffd166;
  --violet: #a78bfa;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --grid-line: rgba(245, 247, 239, 0.055);
  background:
    linear-gradient(115deg, rgba(63, 246, 232, 0.1), transparent 28%),
    linear-gradient(245deg, rgba(255, 122, 89, 0.1), transparent 31%),
    linear-gradient(180deg, #070807 0%, #10130f 48%, #070807 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 88%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.66), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.66)),
    repeating-linear-gradient(0deg, rgba(18, 22, 33, 0.035) 0 1px, transparent 1px 5px);
  opacity: 0.32;
}

body[data-theme="dark"]::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 20%, transparent 80%, rgba(255, 255, 255, 0.04)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px);
  opacity: 0.22;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.48;
  mix-blend-mode: multiply;
}

body[data-theme="dark"] .ambient-canvas {
  opacity: 0.86;
  mix-blend-mode: normal;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(18, 22, 33, 0.12);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 50px rgba(35, 52, 70, 0.08);
  backdrop-filter: blur(20px);
}

body[data-theme="dark"] .nav {
  border-bottom-color: rgba(245, 247, 239, 0.1);
  background: rgba(7, 8, 7, 0.74);
  box-shadow: none;
}

.nav-inner {
  width: min(var(--max), calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 166px;
  height: auto;
  filter: drop-shadow(0 5px 14px rgba(18, 22, 33, 0.14));
}

body[data-theme="dark"] .brand-logo,
body[data-theme="dark"] .footer-logo {
  filter: brightness(0) invert(1) drop-shadow(0 5px 16px rgba(63, 246, 232, 0.16));
}

.brand-mark {
  position: relative;
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(18, 22, 33, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 184, 217, 0.32), transparent 42%),
    linear-gradient(315deg, rgba(255, 77, 46, 0.3), transparent 46%),
    rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(0, 184, 217, 0.16);
  overflow: hidden;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 90deg, transparent, rgba(185, 255, 102, 0.74), transparent, rgba(63, 246, 232, 0.74), transparent);
  animation: rotate-slow 8s linear infinite;
}

.brand-mark span {
  position: relative;
  width: 28px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #ffffff;
  color: #121621;
  font-weight: 950;
}

body[data-theme="dark"] .brand-mark {
  border-color: rgba(245, 247, 239, 0.22);
  background:
    linear-gradient(135deg, rgba(63, 246, 232, 0.28), transparent 42%),
    linear-gradient(315deg, rgba(255, 122, 89, 0.28), transparent 46%),
    rgba(245, 247, 239, 0.08);
  box-shadow: none;
}

body[data-theme="dark"] .brand-mark span {
  background: #070807;
  color: #f5f7ef;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(18, 22, 33, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .nav-links {
  border-color: rgba(245, 247, 239, 0.1);
  background: rgba(245, 247, 239, 0.045);
  box-shadow: none;
}

.nav-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.products-menu {
  position: relative;
}

.products-menu summary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  list-style: none;
  cursor: pointer;
}

.products-menu summary::-webkit-details-marker {
  display: none;
}

.products-menu summary::after {
  content: "⌄";
  font-size: 12px;
}

.products-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: min(430px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 70px rgba(35, 52, 70, 0.16);
  backdrop-filter: blur(20px);
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

body[data-theme="dark"] .products-panel {
  background: rgba(16, 19, 15, 0.94);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

.products-menu[open] .products-panel,
.products-menu:hover .products-panel,
.products-menu:focus-within .products-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.products-panel a {
  display: grid;
  gap: 6px;
  min-height: auto;
  padding: 14px;
  border-radius: var(--radius);
  text-align: left;
  white-space: normal;
}

.products-panel a:hover,
.products-panel a:focus-visible {
  background:
    linear-gradient(135deg, rgba(0, 184, 217, 0.12), transparent 44%),
    rgba(68, 214, 44, 0.08);
}

.products-panel strong {
  color: var(--ink);
  font-size: 15px;
}

.products-panel span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"],
.products-menu summary:hover,
.products-menu summary:focus-visible {
  color: var(--ink);
  background: rgba(0, 184, 217, 0.1);
  outline: none;
}

body[data-theme="dark"] .nav-links a:hover,
body[data-theme="dark"] .nav-links a:focus-visible,
body[data-theme="dark"] .nav-links a[aria-current="page"],
body[data-theme="dark"] .products-menu summary:hover,
body[data-theme="dark"] .products-menu summary:focus-visible {
  background: rgba(245, 247, 239, 0.08);
}

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

.mobile-menu-toggle {
  position: relative;
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(18, 22, 33, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
}

.mobile-project-link {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-menu-toggle span,
.mobile-menu-toggle::before,
.mobile-menu-toggle::after {
  content: "";
  position: absolute;
  left: 12px;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.mobile-menu-toggle::before {
  transform: translateY(-6px);
}

.mobile-menu-toggle::after {
  transform: translateY(6px);
}

.nav.menu-open .mobile-menu-toggle span {
  opacity: 0;
}

.nav.menu-open .mobile-menu-toggle::before {
  transform: translateY(0) rotate(45deg);
}

.nav.menu-open .mobile-menu-toggle::after {
  transform: rotate(-45deg);
}

body[data-theme="dark"] .mobile-menu-toggle {
  border-color: rgba(245, 247, 239, 0.16);
  background: rgba(245, 247, 239, 0.055);
  color: var(--ink);
}

.theme-toggle {
  position: relative;
  width: 84px;
  height: 42px;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 4px;
  border: 1px solid rgba(18, 22, 33, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  transform: translateX(40px);
  transition: transform 220ms ease, background 220ms ease;
}

.theme-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 900;
}

.theme-icon.light {
  color: #ffffff;
}

.theme-icon.dark {
  color: var(--muted);
}

body[data-theme="dark"] .theme-toggle {
  border-color: rgba(245, 247, 239, 0.16);
  background: rgba(245, 247, 239, 0.055);
}

body[data-theme="dark"] .theme-toggle::before {
  transform: translateX(0);
}

body[data-theme="dark"] .theme-icon.light {
  color: var(--muted);
}

body[data-theme="dark"] .theme-icon.dark {
  color: #070807;
}

.nav-cta,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid rgba(18, 22, 33, 0.12);
  border-radius: 999px;
  background: linear-gradient(135deg, #121621, #25304a);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 18px 48px rgba(0, 184, 217, 0.2);
}

body[data-theme="dark"] .nav-cta,
body[data-theme="dark"] .button {
  border-color: rgba(245, 247, 239, 0.2);
  background: var(--ink);
  color: #070807;
}

.button {
  min-height: 52px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(68, 214, 44, 0.18);
  outline: none;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border-color: rgba(18, 22, 33, 0.12);
  box-shadow: 0 12px 34px rgba(35, 52, 70, 0.08);
}

body[data-theme="dark"] .button.secondary {
  background: rgba(245, 247, 239, 0.05);
  color: var(--ink);
  box-shadow: none;
}

.button .arrow {
  width: 22px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

body[data-theme="dark"] .button .arrow {
  background: rgba(7, 8, 7, 0.1);
}

.page-main {
  min-height: calc(100vh - 160px);
}

.hero,
.page-hero,
section,
.cta,
footer {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.hero {
  min-height: calc(100svh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.78fr);
  align-items: center;
  gap: clamp(44px, 7vw, 84px);
  padding: 58px 0 70px;
}

.hero-content {
  max-width: 650px;
}

.page-hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.42fr);
  align-items: end;
  gap: 36px;
  padding: 84px 0 56px;
}

.eyebrow,
.page-kicker,
.section-kicker,
.case-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(18, 22, 33, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 50px rgba(35, 52, 70, 0.08);
}

body[data-theme="dark"] .eyebrow {
  border-color: rgba(245, 247, 239, 0.14);
  background: rgba(245, 247, 239, 0.05);
  box-shadow: none;
}

.eyebrow::before {
  content: "";
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 18px rgba(68, 214, 44, 0.9);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 24px;
  font-size: clamp(44px, 5.45vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.page-hero h1 {
  max-width: 780px;
  font-size: clamp(42px, 5vw, 72px);
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  letter-spacing: 0;
}

.text-gradient {
  color: transparent;
  background: linear-gradient(92deg, var(--ink) 0%, var(--cyan) 34%, var(--lime) 66%, var(--coral) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy,
.page-copy,
.section-copy {
  color: var(--muted);
  line-height: 1.68;
}

.hero-copy {
  max-width: 640px;
  margin-bottom: 34px;
  font-size: clamp(17px, 1.5vw, 20px);
}

.page-copy {
  max-width: 700px;
  font-size: clamp(18px, 1.7vw, 22px);
}

.section-copy {
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 32px 0 40px;
}

.hero-proof,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.proof-item,
.stat-card,
.service-card,
.work-card,
.step,
.stack-panel,
.insight-card,
.contact-panel,
.mini-panel {
  border: 1px solid rgba(18, 22, 33, 0.12);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

body[data-theme="dark"] .proof-item,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .service-card,
body[data-theme="dark"] .work-card,
body[data-theme="dark"] .step,
body[data-theme="dark"] .stack-panel,
body[data-theme="dark"] .insight-card,
body[data-theme="dark"] .contact-panel,
body[data-theme="dark"] .mini-panel {
  border-color: rgba(245, 247, 239, 0.12);
  box-shadow: none;
}

.proof-item,
.stat-card {
  min-height: 116px;
  padding: 18px;
}

.proof-item strong,
.stat-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.proof-item span,
.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.4;
}

.hero-visual {
  position: relative;
  min-height: 580px;
  perspective: 1200px;
}

.workbench {
  position: absolute;
  inset: 34px 0 auto 0;
  min-height: 520px;
  border: 1px solid rgba(18, 22, 33, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(0, 184, 217, 0.16), transparent 38%),
    linear-gradient(315deg, rgba(255, 77, 46, 0.14), transparent 46%),
    rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotateX(7deg) rotateY(-11deg) rotateZ(1deg);
  transform-style: preserve-3d;
  animation: workbench-float 7s ease-in-out infinite;
}

body[data-theme="dark"] .workbench {
  border-color: rgba(245, 247, 239, 0.16);
  background:
    linear-gradient(135deg, rgba(245, 247, 239, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(63, 246, 232, 0.12), transparent 46%),
    rgba(10, 12, 10, 0.86);
}

.workbench::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(185, 255, 102, 0.16) 49% 50%, transparent 52% 100%),
    linear-gradient(rgba(245, 247, 239, 0.08) 1px, transparent 1px);
  background-size: 160px 100%, 100% 42px;
  animation: scan 6s linear infinite;
  opacity: 0.56;
}

.window-top {
  position: relative;
  z-index: 2;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(18, 22, 33, 0.1);
  background: rgba(255, 255, 255, 0.54);
}

body[data-theme="dark"] .window-top {
  border-bottom-color: rgba(245, 247, 239, 0.12);
  background: rgba(245, 247, 239, 0.045);
}

.traffic {
  display: flex;
  gap: 8px;
}

.traffic span {
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral);
}

.traffic span:nth-child(2) {
  background: var(--gold);
}

.traffic span:nth-child(3) {
  background: var(--lime);
}

.window-title,
.ops-header,
.signal-header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.workbench-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: 18px;
  padding: 18px;
}

.terminal,
.ops-panel,
.signal-panel {
  border: 1px solid rgba(18, 22, 33, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

body[data-theme="dark"] .terminal,
body[data-theme="dark"] .ops-panel,
body[data-theme="dark"] .signal-panel {
  border-color: rgba(245, 247, 239, 0.12);
  background: rgba(7, 8, 7, 0.68);
}

.terminal {
  min-height: 262px;
  padding: 18px;
  overflow: hidden;
}

.line {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 28px;
  color: #273142;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  white-space: nowrap;
  transform: translateX(-12px);
  opacity: 0;
  animation: terminal-in 700ms ease forwards;
}

body[data-theme="dark"] .line {
  color: #d8dfd1;
}

.line:nth-child(2) { animation-delay: 320ms; }
.line:nth-child(3) { animation-delay: 620ms; }
.line:nth-child(4) { animation-delay: 920ms; }
.line:nth-child(5) { animation-delay: 1220ms; }
.line:nth-child(6) { animation-delay: 1520ms; }

.prompt {
  color: var(--lime);
  font-weight: 800;
}

.code-accent {
  color: var(--cyan);
}

.ops-panel {
  min-height: 262px;
  padding: 18px;
}

.ops-header,
.signal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.chip-list {
  display: grid;
  gap: 10px;
}

.chip-item {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid rgba(18, 22, 33, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
}

body[data-theme="dark"] .chip-item {
  border-color: rgba(245, 247, 239, 0.1);
  background: rgba(245, 247, 239, 0.05);
}

.chip-item::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--fill);
  background: linear-gradient(90deg, rgba(0, 184, 217, 0.16), rgba(68, 214, 44, 0.16));
  animation: fill-in 1.8s ease forwards;
  transform-origin: left;
  transform: scaleX(0);
}

.chip-item span,
.chip-item strong {
  position: relative;
  z-index: 1;
  font-size: 13px;
}

.chip-item strong {
  color: var(--lime);
}

.signal-panel {
  grid-column: 1 / -1;
  min-height: 150px;
  padding: 18px;
}

.signal-bars {
  height: 82px;
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  align-items: end;
  gap: 7px;
}

.signal-bars span {
  min-height: 16px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--lime), var(--cyan));
  transform-origin: bottom;
  animation: pulse-bar 1.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 82ms);
  opacity: 0.86;
}

.float-card {
  position: absolute;
  z-index: 4;
  width: 210px;
  padding: 16px;
  border: 1px solid rgba(18, 22, 33, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 54px rgba(35, 52, 70, 0.16);
  backdrop-filter: blur(16px);
}

body[data-theme="dark"] .float-card {
  border-color: rgba(245, 247, 239, 0.16);
  background: rgba(16, 19, 15, 0.86);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.36);
}

.float-card.one {
  top: 10px;
  right: 8px;
  animation: float-one 5s ease-in-out infinite;
}

.float-card.two {
  left: -18px;
  bottom: 76px;
  animation: float-two 6s ease-in-out infinite;
}

.float-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.float-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 26px;
  line-height: 1;
}

.float-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.marquee {
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.34);
  overflow: hidden;
}

body[data-theme="dark"] .marquee {
  background: rgba(245, 247, 239, 0.035);
}

.marquee-track {
  width: max-content;
  display: flex;
  gap: 18px;
  padding: 18px 0;
  animation: marquee 28s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.marquee-track span::after {
  content: "";
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral);
}

section {
  padding: 88px 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(280px, 0.48fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 34px;
}

.section-kicker,
.case-label {
  margin-bottom: 14px;
  color: var(--coral);
}

.grid-3,
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.grid-2,
.stack-wall,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.service-card,
.work-card,
.step,
.stack-panel,
.insight-card,
.mini-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.service-card {
  min-height: 294px;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.service-card::before,
.work-card::before,
.insight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0, 184, 217, 0.14), transparent 36%),
    linear-gradient(315deg, rgba(255, 209, 102, 0.12), transparent 42%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.service-card:hover,
.work-card:hover,
.insight-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 184, 217, 0.34);
  background: var(--panel-strong);
}

.service-card:hover::before,
.work-card:hover::before,
.insight-card:hover::before {
  opacity: 1;
}

.card-number,
.service-card h3,
.service-card p,
.work-card h3,
.work-card p,
.insight-card h3,
.insight-card p,
.tag-row,
.case-result {
  position: relative;
  z-index: 1;
}

.card-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  margin-bottom: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--lime);
  font-weight: 900;
}

.service-card h3,
.work-card h3,
.insight-card h3 {
  margin-bottom: 14px;
  font-size: 24px;
}

.service-card p,
.work-card p,
.insight-card p,
.step p,
.stack-panel p,
.mini-panel p,
.contact-panel p {
  color: var(--muted);
  line-height: 1.64;
}

.tag-row,
.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row {
  margin-top: 22px;
}

.tag-row span,
.stack-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

body[data-theme="dark"] .tag-row span,
body[data-theme="dark"] .stack-tags span {
  background: rgba(245, 247, 239, 0.045);
}

.showcase {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.feature-panel {
  min-height: 520px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-panel h3 {
  max-width: 500px;
  margin-bottom: 18px;
  font-size: clamp(30px, 3.4vw, 50px);
  line-height: 1;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 220ms ease, border-color 220ms ease;
}

.case-result {
  color: var(--lime);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.radar {
  position: relative;
  width: min(340px, 100%);
  aspect-ratio: 1;
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, rgba(18, 22, 33, 0.08) 0 1px, transparent 1px 54px),
    conic-gradient(from 0deg, rgba(0, 184, 217, 0.28), transparent 22%, rgba(68, 214, 44, 0.18), transparent 52%, rgba(255, 77, 46, 0.18), transparent 82%, rgba(0, 184, 217, 0.28));
  overflow: hidden;
}

body[data-theme="dark"] .radar {
  background:
    repeating-radial-gradient(circle, rgba(245, 247, 239, 0.08) 0 1px, transparent 1px 54px),
    conic-gradient(from 0deg, rgba(63, 246, 232, 0.28), transparent 22%, rgba(185, 255, 102, 0.18), transparent 52%, rgba(255, 122, 89, 0.18), transparent 82%, rgba(63, 246, 232, 0.28));
}

.radar::before {
  content: "";
  position: absolute;
  inset: 50% 0 0 50%;
  background: linear-gradient(45deg, rgba(68, 214, 44, 0.48), transparent 64%);
  transform-origin: 0 0;
  animation: radar 4s linear infinite;
}

.radar span {
  position: absolute;
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 18px rgba(68, 214, 44, 0.8);
  animation: blink 1.4s ease-in-out infinite;
}

.radar span:nth-child(1) { top: 26%; left: 63%; }
.radar span:nth-child(2) { top: 58%; left: 32%; animation-delay: 300ms; background: var(--cyan); }
.radar span:nth-child(3) { top: 69%; left: 72%; animation-delay: 600ms; background: var(--coral); }

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  counter-reset: step;
}

.step {
  min-height: 270px;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: inline-grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  margin-bottom: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--cyan);
  font-weight: 950;
}

.step::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 94px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 700ms ease;
}

.step.is-visible::after {
  transform: scaleX(1);
}

.step h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.stack-panel {
  min-height: 420px;
}

.stack-panel h3,
.mini-panel h3,
.contact-panel h3 {
  margin-bottom: 18px;
  font-size: 30px;
}

.stack-tags {
  margin-top: 30px;
}

.stack-tags span {
  min-height: 40px;
  padding: 0 13px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.automation-map {
  position: relative;
  height: 280px;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(18, 22, 33, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(18, 22, 33, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  overflow: hidden;
}

body[data-theme="dark"] .automation-map {
  background:
    linear-gradient(90deg, rgba(245, 247, 239, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(245, 247, 239, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
}

.node {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 96px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  animation: node-hover 4s ease-in-out infinite;
}

body[data-theme="dark"] .node {
  background: rgba(7, 8, 7, 0.82);
}

.node:nth-child(1) { top: 28px; left: 22px; }
.node:nth-child(2) { top: 106px; left: 42%; animation-delay: 300ms; }
.node:nth-child(3) { right: 24px; top: 42px; animation-delay: 600ms; }
.node:nth-child(4) { left: 24%; bottom: 30px; animation-delay: 900ms; }
.node:nth-child(5) { right: 52px; bottom: 28px; animation-delay: 1200ms; }

.automation-map::before,
.automation-map::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(28deg, transparent 0 34%, rgba(0, 184, 217, 0.24) 35% 36%, transparent 37% 100%),
    linear-gradient(151deg, transparent 0 43%, rgba(255, 77, 46, 0.2) 44% 45%, transparent 46% 100%);
  background-size: 280px 180px;
  animation: circuit 6s linear infinite;
  opacity: 0.78;
}

.automation-map::after {
  animation-duration: 9s;
  animation-direction: reverse;
  opacity: 0.38;
}

.page-visual {
  min-height: 240px;
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 12px;
}

.stats-showcase {
  padding-top: 0;
}

.page-visual-line {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--lime), var(--coral));
  transform-origin: left;
  animation: fill-in 1.5s ease forwards;
}

.page-visual-line:nth-child(2) { width: 82%; animation-delay: 180ms; }
.page-visual-line:nth-child(3) { width: 66%; animation-delay: 360ms; }
.page-visual-line:nth-child(4) { width: 91%; animation-delay: 540ms; }
.page-visual-line:nth-child(5) { width: 54%; animation-delay: 720ms; }

.cta {
  margin-bottom: 24px;
  padding: clamp(34px, 7vw, 72px);
  border: 1px solid rgba(18, 22, 33, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(68, 214, 44, 0.2), transparent 34%),
    linear-gradient(315deg, rgba(255, 77, 46, 0.2), transparent 42%),
    linear-gradient(90deg, rgba(0, 184, 217, 0.14), transparent 48%),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 26px 80px rgba(35, 52, 70, 0.12);
  overflow: hidden;
}

body[data-theme="dark"] .cta {
  border-color: rgba(245, 247, 239, 0.14);
  background:
    linear-gradient(135deg, rgba(185, 255, 102, 0.14), transparent 34%),
    linear-gradient(315deg, rgba(255, 122, 89, 0.16), transparent 40%),
    rgba(16, 19, 15, 0.88);
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: center;
}

.cta h2 {
  margin-bottom: 22px;
}

.cta p {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.contact-panel {
  padding: 22px;
}

.contact-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.contact-line {
  display: block;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  padding: 14px 15px;
  font: inherit;
}

body[data-theme="dark"] .form-grid input,
body[data-theme="dark"] .form-grid textarea {
  background: rgba(7, 8, 7, 0.62);
}

.form-grid textarea {
  min-height: 136px;
  resize: vertical;
}

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 34px auto 0;
  padding: 38px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, 0.7fr));
  gap: 24px;
  align-items: start;
}

.footer-grid h3,
.footer-grid h4 {
  margin: 0 0 12px;
  color: var(--ink);
}

.footer-grid p {
  max-width: 360px;
  color: var(--muted);
  line-height: 1.6;
}

.footer-brand {
  display: inline-block;
  line-height: 0;
}

.footer-logo {
  display: block;
  width: 210px;
  height: auto;
  filter: drop-shadow(0 7px 18px rgba(18, 22, 33, 0.12));
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a,
.footer-links span {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ink);
  outline: none;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

footer:not(.site-footer) {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rotate-slow {
  to { transform: rotate(360deg); }
}

@keyframes workbench-float {
  0%, 100% { transform: rotateX(7deg) rotateY(-11deg) rotateZ(1deg) translateY(0); }
  50% { transform: rotateX(9deg) rotateY(-7deg) rotateZ(-1deg) translateY(-14px); }
}

@keyframes scan {
  to { background-position: 160px 0, 0 42px; }
}

@keyframes terminal-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fill-in {
  to { transform: scaleX(1); }
}

@keyframes pulse-bar {
  0%, 100% { transform: scaleY(0.46); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes float-one {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-16px) rotate(-2deg); }
}

@keyframes float-two {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(14px) rotate(1deg); }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes radar {
  to { transform: rotate(360deg); }
}

@keyframes blink {
  0%, 100% { opacity: 0.45; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1.25); }
}

@keyframes node-hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes circuit {
  to { background-position: 280px 0, -280px 0; }
}

@media (max-width: 980px) {
  .nav-inner {
    position: relative;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .nav.menu-open .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 60;
    display: flex;
    width: min(360px, calc(100vw - 32px));
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(18, 22, 33, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 22px 60px rgba(21, 36, 58, 0.2);
    backdrop-filter: blur(20px);
  }

  body[data-theme="dark"] .nav.menu-open .nav-links {
    border-color: rgba(245, 247, 239, 0.12);
    background: rgba(12, 14, 14, 0.96);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
  }

  .nav.menu-open .nav-links > a,
  .nav.menu-open .products-menu summary {
    justify-content: flex-start;
    padding: 0 14px;
    border: 1px solid rgba(18, 22, 33, 0.08);
  }

  .nav.menu-open .nav-links > a:nth-child(1) {
    background: linear-gradient(135deg, #d9f6ff, #e9f4ff);
  }

  .nav.menu-open .nav-links > a:nth-child(2) {
    background: linear-gradient(135deg, #d9fff2, #e9fff8);
  }

  .nav.menu-open .nav-links > a:nth-child(3) {
    background: linear-gradient(135deg, #eee5ff, #f7efff);
  }

  .nav.menu-open .products-menu summary {
    background: linear-gradient(135deg, #fff0d5, #fff8eb);
  }

  .nav.menu-open .nav-links > a:nth-child(5) {
    background: linear-gradient(135deg, #ffe7dc, #fff3ed);
  }

  .nav.menu-open .nav-links > a:nth-child(6) {
    background: linear-gradient(135deg, #e2f3cf, #f2f9e8);
  }

  .nav.menu-open .products-menu {
    width: 100%;
  }

  .nav.menu-open .products-panel {
    position: static;
    width: 100%;
    margin: 4px 0 0;
    box-shadow: none;
  }

  .nav.menu-open .mobile-project-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #121621, #25304a);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
  }

  body[data-theme="dark"] .nav.menu-open .nav-links > a:nth-child(1),
  body[data-theme="dark"] .nav.menu-open .nav-links > a:nth-child(2),
  body[data-theme="dark"] .nav.menu-open .nav-links > a:nth-child(3),
  body[data-theme="dark"] .nav.menu-open .products-menu summary,
  body[data-theme="dark"] .nav.menu-open .nav-links > a:nth-child(5),
  body[data-theme="dark"] .nav.menu-open .nav-links > a:nth-child(6) {
    background: rgba(245, 247, 239, 0.08);
  }

  .hero,
  .page-hero,
  .section-head,
  .showcase,
  .stack-wall,
  .contact-grid,
  .cta-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 560px;
  }

  .grid-3,
  .service-grid,
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-panel {
    min-height: 420px;
  }
}

@media (max-width: 680px) {
  .nav-inner,
  .hero,
  .page-hero,
  section,
  .cta,
  footer {
    width: min(100% - 24px, var(--max));
  }

  .nav-inner {
    min-height: 66px;
    gap: 10px;
  }

  .brand > span:last-child {
    display: none;
  }

  .brand-logo {
    width: 116px;
  }

  .theme-toggle {
    display: none;
  }

  .nav-cta {
    min-height: 38px;
    padding: 0 13px;
  }

  .nav-actions {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .nav.menu-open .nav-links {
    width: min(340px, calc(100vw - 24px));
  }

  .nav.menu-open .nav-links > a,
  .nav.menu-open .products-menu summary {
    border-color: rgba(18, 22, 33, 0.09);
    background: rgba(18, 22, 33, 0.035) !important;
  }

  .nav.menu-open .products-menu[open] .products-panel {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(18, 22, 33, 0.08);
    border-radius: 12px;
    background: rgba(18, 22, 33, 0.035);
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav.menu-open .products-panel a {
    display: grid;
    gap: 3px;
    padding: 10px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.72);
  }

  .nav.menu-open .products-panel strong {
    color: var(--ink);
  }

  body[data-theme="dark"] .nav.menu-open .nav-links > a,
  body[data-theme="dark"] .nav.menu-open .products-menu summary,
  body[data-theme="dark"] .nav.menu-open .products-menu[open] .products-panel {
    border-color: rgba(245, 247, 239, 0.12);
    background: rgba(245, 247, 239, 0.075) !important;
  }

  body[data-theme="dark"] .nav.menu-open .products-panel a {
    background: rgba(7, 8, 7, 0.45);
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 10px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(18, 22, 33, 0.1);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -12px 36px rgba(35, 52, 70, 0.12);
    backdrop-filter: blur(18px);
  }

  body[data-theme="dark"] .mobile-bottom-nav {
    border-top-color: rgba(245, 247, 239, 0.12);
    background: rgba(8, 10, 10, 0.95);
    box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.3);
  }

  .mobile-bottom-nav a {
    display: flex;
    min-width: 0;
    min-height: 52px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
  }

  .mobile-bottom-nav a[aria-current="page"] {
    background: rgba(0, 184, 217, 0.09);
    color: var(--ink);
  }

  .mobile-bottom-nav .menu-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 8px;
    font-size: 18px;
    line-height: 1;
  }

  .mobile-bottom-nav a:nth-child(1) .menu-icon { background: #d8f5ff; }
  .mobile-bottom-nav a:nth-child(2) .menu-icon { background: #d9fff1; }
  .mobile-bottom-nav a:nth-child(3) .menu-icon { background: #eee3ff; }
  .mobile-bottom-nav a:nth-child(4) .menu-icon { background: #ffe9d8; }
  .mobile-bottom-nav a:nth-child(5) .menu-icon { background: #e5f5d3; }

  body[data-theme="dark"] .mobile-bottom-nav a[aria-current="page"] {
    background: rgba(245, 247, 239, 0.1);
  }

  body[data-theme="dark"] .mobile-bottom-nav .menu-icon {
    filter: saturate(0.85) brightness(0.94);
  }

  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .hero {
    padding-top: 34px;
  }

  h1,
  .page-hero h1 {
    font-size: clamp(42px, 13vw, 58px);
    line-height: 0.94;
  }

  .hero-proof,
  .stats-grid,
  .grid-3,
  .grid-2,
  .service-grid,
  .case-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 430px;
    overflow: hidden;
  }

  .workbench {
    inset: 24px -22px auto 18px;
    min-height: 390px;
    transform: rotateX(4deg) rotateY(-7deg) rotateZ(1deg) scale(0.88);
    transform-origin: left top;
  }

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

  .ops-panel,
  .signal-panel {
    display: none;
  }

  .float-card {
    width: 178px;
  }

  .float-card.one {
    top: 0;
    right: -4px;
  }

  .float-card.two {
    left: 0;
    bottom: 44px;
  }

  .stack-panel,
  .feature-panel {
    min-height: auto;
  }

  .radar {
    width: min(260px, 100%);
  }

  .automation-map {
    height: 250px;
  }

  footer {
    padding: 24px 0;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

/* Dedicated m.ematics.uk mobile app shell. Desktop ematics.uk is unaffected. */
@media (max-width: 680px) {
  body {
    min-width: 320px;
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
    background: #f4f7fb;
    color: #142033;
  }

  .ambient-canvas {
    position: fixed;
    opacity: 0.14;
  }

  .nav {
    position: fixed;
    right: 0;
    left: 0;
    border-bottom-color: rgba(17, 34, 58, 0.08);
    background: rgba(248, 251, 255, 0.92);
    box-shadow: 0 8px 26px rgba(37, 60, 94, 0.08);
  }

  .nav-inner {
    min-height: 64px;
  }

  .brand-logo {
    width: 122px;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
    border-color: rgba(17, 34, 58, 0.09);
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(35, 55, 88, 0.1);
  }

  .nav.menu-open .nav-links {
    top: calc(100% + 8px);
    right: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100svh - 166px);
    overflow-y: auto;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 50px rgba(25, 44, 73, 0.2);
  }

  .nav.menu-open .nav-links > a,
  .nav.menu-open .products-menu summary {
    min-height: 48px;
    border-radius: 13px;
    background: #f5f8fc !important;
  }

  .nav.menu-open .products-menu[open] .products-panel {
    background: #edf4ff;
  }

  .mobile-bottom-nav {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    min-height: 66px;
    padding: 6px;
    border: 1px solid rgba(38, 60, 95, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 36px rgba(30, 50, 82, 0.2);
  }

  .mobile-bottom-nav a {
    min-height: 54px;
    color: #66748a;
    font-size: 9px;
  }

  .mobile-bottom-nav a[aria-current="page"] {
    color: #10213b;
    background: #eaf3ff;
  }

  .mobile-bottom-nav .menu-icon {
    width: 25px;
    height: 25px;
    border-radius: 9px;
  }

  .page-main {
    padding-top: 76px;
  }

  .hero,
  .page-hero,
  section,
  .cta,
  footer {
    width: min(100% - 24px, 540px);
  }

  .hero,
  .page-hero {
    display: block;
    margin-bottom: 26px;
    padding: 24px 20px;
    border: 1px solid rgba(32, 61, 98, 0.08);
    border-radius: 26px;
    box-shadow: 0 16px 38px rgba(31, 55, 90, 0.1);
  }

  .hero {
    margin-top: 0;
  }

  .hero .eyebrow,
  .page-hero .eyebrow {
    width: fit-content;
    margin-bottom: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    color: #1f4d8e;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .hero h1,
  .page-hero h1 {
    margin: 0;
    color: #10203a;
    font-size: clamp(31px, 8.8vw, 39px);
    line-height: 1.01;
    letter-spacing: -0.055em;
  }

  .hero-copy,
  .page-copy {
    margin-top: 13px;
    color: #4e6078;
    font-size: 14px;
    line-height: 1.55;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 18px;
  }

  .hero-actions .button,
  .hero-actions .button.secondary {
    min-height: 50px;
    flex: 1;
    padding: 0 12px;
    border-radius: 15px;
    font-size: 13px;
  }

  .hero-proof,
  .stats-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-top: 22px;
    padding-bottom: 2px;
    scroll-snap-type: x mandatory;
  }

  .proof-item,
  .stat-card {
    min-width: 136px;
    padding: 13px;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 20px rgba(35, 55, 88, 0.08);
    scroll-snap-align: start;
  }

  .proof-item strong,
  .stat-card strong {
    color: #143d7c;
    font-size: 23px;
  }

  .proof-item span,
  .stat-card span {
    color: #61718a;
    font-size: 11px;
    line-height: 1.42;
  }

  .hero-visual,
  .page-visual {
    display: none;
  }

  section {
    margin-top: 18px;
  }

  .hero + section,
  .page-hero + section {
    margin-top: 16px;
  }

  .section-head {
    display: block;
    margin-bottom: 14px;
  }

  .section-head h2 {
    color: #162640;
    font-size: 24px;
    line-height: 1.05;
  }

  .section-copy {
    margin-top: 12px;
    color: #63728a;
    font-size: 14px;
    line-height: 1.58;
  }

  .service-grid,
  .case-grid,
  .process-grid,
  .grid-2,
  .grid-3,
  .contact-grid,
  .stack-wall {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .service-card,
  .work-card,
  .insight-card,
  .step,
  .stack-panel,
  .contact-panel {
    min-height: auto;
    padding: 18px;
    border: 1px solid rgba(33, 58, 92, 0.08);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 26px rgba(31, 56, 89, 0.08);
  }

  .service-card h3,
  .work-card h3,
  .insight-card h3,
  .step h3,
  .stack-panel h3,
  .contact-panel h3 {
    color: #13233c;
    font-size: 18px;
  }

  .service-card p,
  .work-card p,
  .insight-card p,
  .step p,
  .stack-panel p,
  .contact-panel p {
    color: #61718a;
    font-size: 14px;
    line-height: 1.58;
  }

  .card-number,
  .case-label,
  .section-kicker {
    color: #2b63b2;
  }

  .tag-row span,
  .stack-tags span {
    border: 0;
    border-radius: 999px;
    background: #edf4ff;
    color: #365e9c;
  }

  .site-footer {
    display: none;
  }

  /* Home: blue product-launch dashboard. */
  body[data-page="home"] .hero {
    background:
      radial-gradient(circle at 100% 0%, rgba(53, 126, 255, 0.28), transparent 43%),
      linear-gradient(145deg, #edf7ff, #f8fbff);
  }

  body[data-page="home"] .text-gradient {
    background: linear-gradient(110deg, #0575e6, #6f3cff 55%, #ff5c47);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  body[data-page="home"] .service-card:nth-child(3n + 1) { border-left: 5px solid #1493ff; }
  body[data-page="home"] .service-card:nth-child(3n + 2) { border-left: 5px solid #7557f5; }
  body[data-page="home"] .service-card:nth-child(3n) { border-left: 5px solid #16b780; }

  /* Services: green solution catalogue. */
  body[data-page="services"] .page-hero {
    background: linear-gradient(145deg, #e6fbf1, #f8fffb);
  }

  body[data-page="services"] .service-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    column-gap: 13px;
  }

  body[data-page="services"] .service-card .card-number {
    grid-row: span 3;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: #d8f7e8;
    color: #137a52;
    font-size: 14px;
    font-weight: 900;
  }

  body[data-page="services"] .service-card h3,
  body[data-page="services"] .service-card p,
  body[data-page="services"] .service-card .tag-row {
    grid-column: 2;
    margin-top: 0;
  }

  /* Work: dark violet case-study feed. */
  body[data-page="work"] .page-hero,
  body[data-page="work"] .case-grid .work-card:nth-child(odd) {
    background: linear-gradient(145deg, #ece9ff, #faf9ff);
  }

  body[data-page="work"] .work-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 5px solid #7660e8;
  }

  body[data-page="work"] .case-result {
    width: fit-content;
    border-radius: 999px;
    background: #e9e4ff;
    color: #5a42bc;
    font-size: 12px;
  }

  /* Process: warm vertical delivery timeline. */
  body[data-page="process"] .page-hero {
    background: linear-gradient(145deg, #fff1df, #fffaf3);
  }

  body[data-page="process"] .process-grid {
    position: relative;
    gap: 0;
  }

  body[data-page="process"] .step {
    position: relative;
    margin-left: 18px;
    border-left: 4px solid #ffab52;
    border-radius: 0 20px 20px 0;
  }

  body[data-page="process"] .step::before {
    content: "";
    position: absolute;
    top: 24px;
    left: -13px;
    width: 18px;
    height: 18px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #ff8b39;
    box-shadow: 0 0 0 1px #ffc487;
  }

  /* Contact: clear communication workspace. */
  body[data-page="contact"] .page-hero {
    background: linear-gradient(145deg, #e6f1ff, #f8fbff);
  }

  body[data-page="contact"] .contact-panel {
    border-color: rgba(39, 117, 218, 0.15);
  }

  body[data-page="contact"] .form-grid input,
  body[data-page="contact"] .form-grid textarea {
    border: 1px solid #d7e3f2;
    border-radius: 14px;
    background: #f8fbff;
    color: #162640;
  }

  body[data-page="contact"] .form-grid .button {
    min-height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a70e8, #315cf3);
  }
}

/* Final Android-native typography override for m.ematics.uk. */
@media (max-width: 680px) {
  body, button, input, textarea, select { font-family: Roboto, "Noto Sans", "Helvetica Neue", sans-serif; letter-spacing: 0; }
  .hero h1, .page-hero h1 { font-size: clamp(30px, 8.2vw, 36px); font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; }
  .hero-copy, .page-copy { font-size: 14px; font-weight: 400; line-height: 1.5; }
  .section-head h2 { font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.012em; }
  .section-copy, .service-card p, .work-card p, .insight-card p, .step p, .stack-panel p { font-size: 13px; font-weight: 400; line-height: 1.5; }
  .service-card h3, .work-card h3, .insight-card h3, .step h3, .stack-panel h3 { font-size: 18px; font-weight: 700; line-height: 1.25; letter-spacing: 0; }
  .nav-links a, .products-menu summary, .button { font-size: 14px; font-weight: 600; letter-spacing: 0; }
  .mobile-bottom-nav a { font-size: 10px; font-weight: 500; letter-spacing: 0; }
  .hero .eyebrow, .page-hero .eyebrow, .tag { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; }
}
