/* =========================================================
   NAV (scrolled state, phone menu, progress)
   ========================================================= */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 11, 13, .72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
          backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid rgba(237, 235, 230, .06);
  opacity: 0;
  transition: opacity .4s ease;
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-scrolled .nav-links { background: transparent; border-color: transparent; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-links a.is-active { color: var(--text); background: rgba(47, 107, 255, .16); }

.progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, var(--ion), var(--electric));
  box-shadow: 0 0 10px rgba(47, 107, 255, .8);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}

.menu-btn {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(237, 235, 230, .16);
  background: rgba(22, 24, 29, .6);
  cursor: pointer;
}
.menu-btn span {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.5px;
  background: var(--text);
  transition: transform .45s var(--ease-out);
}
.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 24px; }
.menu-open .menu-btn span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-3px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 110px var(--gutter) max(28px, env(safe-area-inset-bottom));
  background: rgba(10, 11, 13, .96);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--ease-io);
}
.menu[hidden] { display: flex; visibility: hidden; }
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  font-size: clamp(34px, 10vw, 54px);
  font-weight: 500;
  letter-spacing: -.03em;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .7s var(--ease-out);
}
.menu nav a .mono { color: var(--electric); font-size: 11px; }
.menu-open .menu nav a { opacity: 1; transform: none; transition-delay: calc(.15s + var(--i) * 50ms); }
.menu-foot { color: var(--dim); font-size: 10px; margin: 0; }
.menu-open body { overflow: hidden; }

/* =========================================================
   SHARED SECTION BITS
   ========================================================= */
.section {
  position: relative;
  padding: clamp(96px, 16vh, 180px) var(--gutter);
}
.section-head { max-width: 1100px; margin-bottom: clamp(48px, 8vh, 88px); }
.eyebrow .num { color: var(--electric); }
.section-title {
  margin: 20px 0 0;
  font-size: clamp(2.2rem, 5.4vw, 5rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -.035em;
  max-width: 16ch;
}
.section-title em, .contact-title em { color: var(--ion); font-size: 1.08em; letter-spacing: -.01em; }
.section-lede {
  max-width: 46ch;
  margin: 24px 0 0;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--muted);
}

/* reveal on scroll */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s ease, transform 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* split headings: each word slides up */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .06em .1em 0; margin: 0 -.06em -.1em 0; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--i) * 45ms); }
.split.is-in .w > span { transform: none; }

/* =========================================================
   00 PROMISE (words light up as you scroll)
   ========================================================= */
.promise { position: relative; height: 240vh; }
.promise-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px var(--gutter);
}
.promise-text {
  max-width: 24ch;
  margin: 28px 0 0;
  font-size: clamp(1.9rem, 4.6vw, 4.4rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.03em;
}
.promise-text .pw { opacity: .14; transition: opacity .35s ease, color .35s ease; }
.promise-text .pw.on { opacity: 1; }
.promise-text em .pw.on { color: var(--ion); }
.promise-text em { font-size: 1.08em; letter-spacing: -.01em; }

/* =========================================================
   01 SERVICES
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.card {
  --x: 50%; --y: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 440px;
  padding: 28px;
  background: var(--graphite);
  border-radius: 22px;
  isolation: isolate;
  overflow: hidden;
}
.card::before { /* spotlight border */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--x) var(--y), rgba(157, 184, 255, .7), rgba(237, 235, 230, .08) 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.card::after { /* spotlight fill */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(47, 107, 255, .14), transparent 60%);
  opacity: 0;
  transition: opacity .4s ease;
}
.card:hover::after, .card.is-lit::after { opacity: 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-top .num { color: var(--dim); }
.card-icon svg {
  width: 52px; height: 52px;
  fill: none;
  stroke: var(--ion);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-icon .draw { stroke: var(--electric); stroke-width: 2; stroke-dasharray: 60; stroke-dashoffset: 60; transition: stroke-dashoffset 1s var(--ease-out); }
.card.is-in .card-icon .draw { stroke-dashoffset: 0; transition-delay: calc(var(--d, 0) * 90ms + .5s); }
.card:hover .card-icon .draw, .card.is-lit .card-icon .draw { animation: redraw 1.2s var(--ease-out); }
@keyframes redraw { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
.card h3 {
  margin: auto 0 12px;
  padding-top: 48px;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 500;
  letter-spacing: -.02em;
}
.card p { margin: 0 0 24px; color: var(--muted); line-height: 1.55; font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 6px 10px;
  font-size: 9.5px;
  color: var(--muted);
  border: 1px solid rgba(237, 235, 230, .1);
  border-radius: 999px;
}

.services-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 22px 28px;
  border: 1px dashed rgba(157, 184, 255, .28);
  border-radius: 22px;
  color: var(--muted);
  transition: border-color .3s, background-color .3s;
}
.services-cta:hover { border-color: var(--electric); background: rgba(47, 107, 255, .06); }
.services-cta-btn { color: var(--text); font-weight: 500; white-space: nowrap; }

/* =========================================================
   02 WHO WE BUILD FOR: pick a business, see what we'd build
   ========================================================= */
.who-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: stretch;
}
.who-tabs { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.who-tab {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 18px;
  width: 100%;
  padding: clamp(14px, 1.8vw, 22px) 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color .35s ease;
}
.who-tab .num { font-size: 11px; color: var(--dim); transition: color .35s ease; }
.who-tab-name {
  font-size: clamp(24px, 2.6vw, 40px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.1;
  transition: transform .5s var(--ease-out);
}
.who-tab:hover { color: var(--muted); }
.who-tab:hover .who-tab-name { transform: translateX(6px); }
.who-tab[aria-selected="true"] { color: var(--text); }
.who-tab[aria-selected="true"] .num { color: var(--ion); }
.who-tab[aria-selected="true"] .who-tab-name { transform: translateX(10px); }
.who-tab:focus-visible { outline: 2px solid var(--ion); outline-offset: 4px; border-radius: 6px; }
.who-tab-bar { /* fills while the section waits to move to the next business */
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--electric);
  transform: scaleX(0);
  transform-origin: left;
}
.who-tab[aria-selected="true"] .who-tab-bar { transform: scaleX(1); }
.who-wrap.is-auto .who-tab[aria-selected="true"] .who-tab-bar { animation: whoFill var(--who-ms, 6000ms) linear both; }
@keyframes whoFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.who-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: 100%;
  padding: clamp(28px, 3.4vw, 52px);
  background: var(--graphite);
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
}
.who-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(157, 184, 255, .5), rgba(237, 235, 230, .06) 40%, rgba(47, 107, 255, .3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.who-panel-glow {
  position: absolute;
  right: -20%; top: -40%;
  width: 70%; aspect-ratio: 1;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(47, 107, 255, .32), transparent);
  animation: breathe 8s ease-in-out infinite;
  pointer-events: none;
}
.who-panel-inner { transition: opacity .28s ease, transform .28s ease; }
.who-panel-inner.is-out { opacity: 0; transform: translateY(10px); }
.who-label { margin: 0; font-size: 11px; color: var(--ion); letter-spacing: .14em; text-transform: uppercase; }
.who-head {
  margin: 16px 0 28px;
  font-size: clamp(28px, 3vw, 46px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
  max-width: 18ch;
}
.who-points { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.who-points li {
  position: relative;
  padding-left: 32px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}
.who-points li::before { /* a small blue tick */
  content: "";
  position: absolute;
  left: 2px; top: .3em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(47, 107, 255, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='%239DB8FF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.who-first {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.who-first .mono { font-size: 10px; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; }
.who-first p { margin: 8px 0 0; color: var(--text); font-size: 17px; line-height: 1.45; }
.who-cta {
  align-self: flex-start;
  display: inline-flex;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid rgba(157, 184, 255, .3);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  transition: border-color .3s, background-color .3s;
}
.who-cta:hover { border-color: var(--electric); background: rgba(47, 107, 255, .1); }
.who-cta span { transition: transform .3s var(--ease-out); }
.who-cta:hover span { transform: translateX(4px); }
.who-note { margin-top: 32px; color: var(--muted); }
.who-note em { color: var(--ion); }

@media (max-width: 900px) {
  .who-wrap { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  /* the businesses become a row of chips you can swipe sideways */
  .who-tabs {
    flex-direction: row;
    gap: 8px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 2px var(--gutter) 6px;
    border-top: 0;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .who-tabs::-webkit-scrollbar { display: none; }
  .who-tab {
    flex: 0 0 auto;
    gap: 8px;
    width: auto;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    scroll-snap-align: start;
    overflow: hidden;
  }
  .who-tab-name { font-size: 15px; letter-spacing: -.01em; }
  .who-tab:hover .who-tab-name, .who-tab[aria-selected="true"] .who-tab-name { transform: none; }
  .who-tab[aria-selected="true"] { border-color: rgba(157, 184, 255, .5); background: rgba(47, 107, 255, .12); }
  .who-tab .num { display: none; }
  .who-panel { border-radius: 22px; gap: 24px; }
  .who-head { margin-bottom: 22px; }
}

/* =========================================================
   02 WORK
   ========================================================= */
.case {
  position: relative;
  padding: clamp(28px, 4vw, 56px);
  background: linear-gradient(180deg, var(--graphite), rgba(22, 24, 29, .4));
  border: 1px solid rgba(237, 235, 230, .07);
  border-radius: 28px;
}
.case-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--dim); }
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--ion); }
.status .pulse { width: 6px; height: 6px; }
.case-title {
  margin: 28px 0 6px;
  font-size: clamp(2.6rem, 7vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .95;
}
.case-sub { margin: 0; color: var(--muted); font-size: clamp(15px, 1.3vw, 18px); }

.case-body {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr);
  gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(40px, 6vh, 72px);
}
.case-step {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: .25;
  transition: opacity .5s ease;
}
.case-step.is-active { opacity: 1; }
.case-step .num { color: var(--electric); }
.case-step h4 {
  margin: 14px 0 12px;
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.1;
}
.case-step p { margin: 0; max-width: 36ch; color: var(--muted); line-height: 1.6; }
.case-step em { color: var(--text); font-style: normal; }
.case-shot-sm { display: none; }

.case-stage {
  position: sticky;
  top: 14vh;
  align-self: start;
  height: 72vh;
  display: flex;
  align-items: center;
}
.device {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #0f1014;
  border: 1px solid rgba(237, 235, 230, .1);
  box-shadow: 0 40px 120px -30px rgba(47, 107, 255, .45), 0 20px 60px -20px rgba(0, 0, 0, .8);
}
.device-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: #15171c; }
.device-bar > span:not(.device-url) { width: 9px; height: 9px; border-radius: 50%; background: rgba(237, 235, 230, .14); }
.device-url {
  margin-left: auto; margin-right: auto;
  padding: 4px 16px;
  font-size: 9px;
  color: var(--dim);
  background: rgba(237, 235, 230, .05);
  border-radius: 999px;
  transform: translateX(-18px);
}
.device-screen, .phone-screen { position: relative; aspect-ratio: 1600 / 950; background: #fff; }
.device-screen img, .phone-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .7s ease, transform 1.2s var(--ease-out);
}
.device-screen img.is-on, .phone-screen img.is-on { opacity: 1; transform: none; }
.phone {
  position: absolute;
  right: -3%;
  bottom: 4%;
  width: 24%;
  padding: 6px;
  border-radius: 26px;
  background: #0f1014;
  border: 1px solid rgba(237, 235, 230, .14);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9);
  transform: rotate(4deg);
  transition: transform .8s var(--ease-out);
}
.phone-screen { aspect-ratio: 600 / 1230; border-radius: 20px; overflow: hidden; }
.case-dots {
  position: absolute;
  left: 0; bottom: 0;
  display: flex;
  gap: 6px;
}
.case-dots span { width: 18px; height: 2px; background: rgba(237, 235, 230, .15); transition: background .4s, width .4s var(--ease-out); }
.case-dots span.is-on { width: 36px; background: var(--electric); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: clamp(40px, 6vh, 72px) 0 0;
  background: rgba(237, 235, 230, .08);
  border: 1px solid rgba(237, 235, 230, .08);
  border-radius: 18px;
  overflow: hidden;
}
.stats > div { padding: 24px; background: #121318; }
.stats dt { color: var(--dim); font-size: 9.5px; }
.stats dd {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0 0;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.stats small { font-size: 14px; letter-spacing: 0; color: var(--muted); font-weight: 400; }

.next-case {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
  padding: clamp(24px, 3vw, 36px) clamp(28px, 4vw, 56px);
  border: 1px solid rgba(237, 235, 230, .08);
  border-radius: 28px;
  overflow: hidden;
  transition: border-color .3s, background-color .3s;
}
.next-case .mono { color: var(--dim); }
.next-case-title { font-size: clamp(24px, 3vw, 40px); font-weight: 500; letter-spacing: -.03em; }
.next-case-title em { color: var(--ion); }
.next-case-arrow {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--electric);
  color: #fff;
  font-size: 20px;
  transition: transform .5s var(--ease-out);
}
.next-case:hover { border-color: rgba(47, 107, 255, .5); background: rgba(47, 107, 255, .05); }
.next-case:hover .next-case-arrow { transform: translateX(6px) rotate(-45deg); }

/* =========================================================
   03 LAB
   ========================================================= */
.lab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 50% at 50% 60%, rgba(47, 107, 255, .1), transparent 70%);
}
.lab-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  margin-bottom: 20px;
  background: var(--graphite);
  border: 1px solid rgba(237, 235, 230, .07);
  border-radius: 999px;
}
.lab-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  font: 500 14px var(--sans);
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color .25s, background-color .25s;
}
.lab-tabs button .mono { font-size: 10px; color: var(--dim); }
.lab-tabs button:hover { color: var(--text); }
.lab-tabs button[aria-selected="true"] { color: #fff; background: var(--electric); }
.lab-tabs button[aria-selected="true"] .mono { color: rgba(255, 255, 255, .7); }

.lab-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 16px;
}
.lab-chat, .lab-log, .lab-result {
  background: var(--graphite);
  border: 1px solid rgba(237, 235, 230, .07);
  border-radius: 22px;
  overflow: hidden;
}
.lab-chat { display: flex; flex-direction: column; min-height: 520px; }
.lab-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(237, 235, 230, .06);
}
.lab-chat-head strong { display: block; font-weight: 500; font-size: 15px; }
.lab-chat-head .mono { font-size: 9.5px; color: #3ecf8e; }
.lab-avatar {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 70% 25%, var(--electric), #11131a 70%);
  font-weight: 600;
  font-size: 15px;
}
.lab-chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background-image: radial-gradient(rgba(237, 235, 230, .035) 1px, transparent 1px);
  background-size: 18px 18px;
}
.msg {
  max-width: 82%;
  padding: 11px 14px;
  font-size: 14.5px;
  line-height: 1.5;
  border-radius: 16px;
  animation: msgIn .5s var(--ease-out) both;
}
.msg small { display: block; margin-top: 4px; font-size: 10px; opacity: .55; text-align: right; }
.msg--in { align-self: flex-start; background: #23262e; border-bottom-left-radius: 4px; }
.msg--out { align-self: flex-end; background: #1d3f99; border-bottom-right-radius: 4px; }
.msg--file { display: flex; align-items: center; gap: 10px; }
.msg--file .file-ico { display: grid; place-items: center; width: 34px; height: 40px; border-radius: 6px; background: #c4161c; font: 600 9px var(--mono); }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

.lab-side { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; }
.lab-log { display: flex; flex-direction: column; min-height: 260px; background: #0d0e11; }
.lab-log-head, .lab-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  font-size: 9.5px;
  color: var(--dim);
  border-bottom: 1px solid rgba(237, 235, 230, .06);
}
#labClock { font-variant-numeric: tabular-nums; }
.lab-log-body {
  flex: 1;
  margin: 0;
  padding: 16px 20px;
  list-style: none;
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: .02em;
  text-transform: none;
}
.lab-log-body li { display: flex; gap: 10px; color: var(--muted); animation: msgIn .4s var(--ease-out) both; }
.lab-log-body li .t { color: var(--dim); flex: none; }
.lab-log-body li.ok { color: var(--text); }
.lab-log-body li.ok::before { content: "✓"; color: #3ecf8e; }
.lab-log-body li.run::before { content: "›"; color: var(--electric); }
.lab-log-body li.warn::before { content: "!"; color: #f5b14c; }
.lab-log-body li::before { width: 10px; flex: none; }
.lab-log-body .hl { color: var(--ion); }

.lab-result-body { padding: 18px 20px; min-height: 130px; }
.lab-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(237, 235, 230, .06);
  color: var(--dim);
  transition: background-color .3s, color .3s;
}
.lab-badge.is-done { background: rgba(62, 207, 142, .14); color: #3ecf8e; }
.lab-badge.is-run { background: rgba(47, 107, 255, .16); color: var(--ion); }
.sheet { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet th { text-align: left; font: 500 9.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 0 10px 8px 0; }
.sheet td { padding: 9px 10px 9px 0; border-top: 1px solid rgba(237, 235, 230, .06); color: var(--muted); }
.sheet tr.new td { color: var(--text); animation: rowIn .9s var(--ease-out) both; }
@keyframes rowIn { from { background: rgba(47, 107, 255, .35); opacity: 0; } 40% { opacity: 1; } to { background: transparent; } }
.pill-ok { color: #3ecf8e !important; }
.pill-warn { color: #f5b14c !important; }
.result-card { display: flex; align-items: center; gap: 16px; animation: msgIn .6s var(--ease-out) both; }
.result-cal { display: grid; place-items: center; width: 64px; height: 68px; border-radius: 12px; background: var(--bone); color: var(--void); text-align: center; line-height: 1; }
.result-cal b { display: block; font-size: 26px; font-weight: 600; }
.result-cal span { font: 500 9px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #c4161c; }
.result-card strong { display: block; font-weight: 500; margin-bottom: 4px; }
.result-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.lab-empty { margin: 0; color: var(--dim); font-size: 13px; }

.lab-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.lab-foot .btn { min-height: 44px; font-size: 14px; cursor: pointer; background: transparent; font-family: var(--sans); }
.lab-foot p { margin: 0; font-size: 9.5px; }

/* =========================================================
   04 PROCESS
   ========================================================= */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 48px 0 0;
  list-style: none;
}
.steps-line {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: rgba(237, 235, 230, .1);
}
.steps-line span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ion), var(--electric));
  box-shadow: 0 0 14px rgba(47, 107, 255, .9);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}
.step { position: relative; }
.step-dot {
  position: absolute;
  top: -54px; left: 0;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--void);
  border: 1px solid rgba(237, 235, 230, .3);
  transition: background-color .4s, border-color .4s, box-shadow .4s;
}
.step.is-lit .step-dot { background: var(--electric); border-color: var(--electric); box-shadow: 0 0 0 5px rgba(47, 107, 255, .18), 0 0 18px var(--electric); }
.step .num { color: var(--dim); }
.step.is-lit .num { color: var(--electric); }
.step h3 { margin: 16px 0 10px; font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 15px; max-width: 30ch; }

/* =========================================================
   05 ABOUT
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.about-lede { max-width: 44ch; margin: 28px 0 40px; color: var(--muted); font-size: clamp(16px, 1.35vw, 19px); line-height: 1.6; }
.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 32px;
  margin: 0; padding: 0;
  list-style: none;
}
.principles li { display: flex; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.principles .num { color: var(--electric); padding-top: 5px; }
.principles h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; }
.principles p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

.about-card-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; perspective: 1400px; }
.vcard {
  --rx: 0deg; --ry: 0deg;
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1.75;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease-out);
}
.vcard-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 1s var(--ease-io);
}
.vcard.is-flipped .vcard-inner { transform: rotateY(180deg); }
.vcard-face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  overflow: hidden;
  text-align: left;
}
.vcard-front {
  display: block;
  padding: 9% 8%;
  background: var(--bone);
  color: var(--void);
  box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .4) inset;
}
.vcard-front::after { /* sheen */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 62%);
  transform: translateX(var(--sheen, -60%));
  transition: transform .5s var(--ease-out);
  pointer-events: none;
}
.vcard-name { display: block; font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.02em; }
.vcard-role { display: block; margin-top: 2px; font-size: clamp(16px, 1.6vw, 20px); color: var(--electric); }
.vcard-lines {
  position: absolute;
  left: 8%; bottom: 10%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: clamp(8px, .8vw, 10px);
  letter-spacing: .06em;
  text-transform: none;
  color: #4a4d55;
}
.vcard-mark { position: absolute; right: 8%; bottom: 10%; width: 11%; fill: var(--void); }
.vcard-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: radial-gradient(ellipse at 60% 25%, rgba(47, 107, 255, .45), transparent 60%), #0d0e12;
  border: 1px solid rgba(237, 235, 230, .1);
  transform: rotateY(180deg);
  box-shadow: 0 50px 100px -30px rgba(47, 107, 255, .5);
}
.vcard-n { width: 18%; filter: drop-shadow(0 0 18px rgba(47, 107, 255, .8)); }
.vcard-word { font-size: clamp(12px, 1.3vw, 16px); font-weight: 500; letter-spacing: .5em; margin-right: -.5em; }
.vcard-hint { margin: 0; font-size: 9.5px; }

/* =========================================================
   06 CONTACT
   ========================================================= */
.contact {
  position: relative;
  overflow: hidden;
  padding: clamp(110px, 18vh, 200px) var(--gutter) clamp(90px, 14vh, 160px);
  border-top: 1px solid var(--line);
}
.contact-glow {
  position: absolute;
  left: 50%; top: 0;
  width: 120vmax; height: 70vmax;
  transform: translate(-50%, -55%);
  background: radial-gradient(closest-side, rgba(47, 107, 255, .35), rgba(47, 107, 255, .06) 60%, transparent);
  pointer-events: none;
}
.contact-inner { position: relative; max-width: 1100px; margin: 0 auto; }
.contact-title {
  margin: 22px 0 56px;
  font-size: clamp(2.4rem, 6.4vw, 6.2rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.04em;
  max-width: 15ch;
}
.brief {
  padding: clamp(24px, 3.5vw, 44px);
  background: rgba(22, 24, 29, .75);
  border: 1px solid rgba(237, 235, 230, .08);
  border-radius: 28px;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}
.brief fieldset { margin: 0 0 28px; padding: 0; border: 0; }
.brief legend { padding: 0; margin-bottom: 14px; color: var(--dim); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  border: 1px solid rgba(237, 235, 230, .16);
  border-radius: 999px;
  transition: background-color .25s, border-color .25s, color .25s, transform .3s var(--ease-out);
}
.chips label:hover span { border-color: rgba(157, 184, 255, .6); }
.chips input:checked + span { background: var(--electric); border-color: var(--electric); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--ion); outline-offset: 3px; }
.chips input:checked + span::before { content: "✓"; margin-right: 8px; font-size: 13px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--wide { grid-column: 1 / -1; }
.field .mono { color: var(--dim); font-size: 9.5px; }
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  font: 16px/1.5 var(--sans);
  color: var(--text);
  background: rgba(10, 11, 13, .6);
  border: 1px solid rgba(237, 235, 230, .1);
  border-radius: 14px;
  resize: vertical;
  transition: border-color .25s, box-shadow .25s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(237, 235, 230, .28); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--electric); box-shadow: 0 0 0 4px rgba(47, 107, 255, .18); }
.brief-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.brief-actions .btn { border: 0; cursor: pointer; font-family: var(--sans); }
.btn--whatsapp { min-height: 52px; padding: 0 24px; background: #187a42; color: #fff; }
.btn--whatsapp:hover { background: #13633a; }
.copy-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 4px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: none;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}
.copy-email:hover { color: var(--text); }
.copy-label { padding: 4px 9px; border-radius: 999px; background: rgba(237, 235, 230, .08); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; }
.copy-email.is-copied .copy-label { background: rgba(62, 207, 142, .16); color: #3ecf8e; }
.brief-note { margin: 18px 0 0; font-size: 9.5px; }
.brief-error { color: #f5b14c !important; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  position: relative;
  overflow: hidden;
  padding: 56px var(--gutter) max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-logo img { height: 34px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; color: var(--muted); font-size: 14px; }
.footer-links a, .to-top { transition: color .2s; }
.footer-links a:hover, .to-top:hover { color: var(--text); }
.to-top { color: var(--muted); font-size: 10px; }
.footer-word {
  margin: clamp(40px, 8vh, 80px) 0 clamp(20px, 3vh, 32px);
  font-size: clamp(56px, 17.5vw, 300px);
  font-weight: 500;
  line-height: .8;
  letter-spacing: .02em;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  /* filled, not outlined: an outline traces the overlaps inside the letters (N, X, R) */
  background: linear-gradient(180deg, rgba(237, 235, 230, .07) 0%, rgba(157, 184, 255, .10) 40%, rgba(47, 107, 255, .38) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  user-select: none;
}
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 10px; color: var(--dim); }
.footer-tag { text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--muted); }
.footer-tag em { color: var(--ion); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-height: 360px; }
  .steps { grid-template-columns: minmax(0, 1fr); padding: 0 0 0 36px; row-gap: 44px; max-width: 640px; }
  .steps-line { left: 6px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .steps-line span { transform-origin: top; transform: scaleY(var(--p, 0)); }
  .step-dot { top: 4px; left: -36px; }
  .step p { max-width: 44ch; }
}

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav-right .btn--pill { display: none; }

  .promise { height: 200vh; }

  .case-body { display: block; }
  .case-stage { display: none; }
  .case-step { min-height: 0; opacity: 1; padding: 36px 0; border-top: 1px solid var(--line); }
  .case-step:first-child { border-top: 0; padding-top: 0; }
  .case-shot-sm {
    display: block;
    margin: 22px 0 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(237, 235, 230, .1);
  }
  .case-shot-sm img { width: 100%; height: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .lab-stage { grid-template-columns: minmax(0, 1fr); }
  .lab-chat { min-height: 400px; }
  .lab-tabs { display: flex; border-radius: 22px; }
  .lab-tabs button { flex: 1 1 auto; justify-content: center; }

  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-card-wrap { order: -1; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 0; }
  .card h3 { padding-top: 36px; }
  .services-cta { flex-direction: column; align-items: flex-start; }
  .next-case { grid-template-columns: 1fr auto; }
  .next-case .mono { grid-column: 1 / -1; }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .copy-email { margin-left: 0; }
  .brief-actions .btn { flex: 1 1 100%; justify-content: center; }
  .lab-foot { flex-direction: column; align-items: flex-start; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

/* lab scroll areas */
.lab-chat { height: 520px; }
.lab-chat-body { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.lab-chat-body::-webkit-scrollbar { display: none; }
.lab-log-body { max-height: 300px; overflow-y: auto; scrollbar-width: none; }
@media (max-width: 900px) { .lab-chat { height: 440px; } .lab-log-body { max-height: 240px; } }

[hidden] { display: none !important; }
.menu[hidden] { display: flex !important; visibility: hidden; }
