﻿:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #5f5f5f;
  --line: #ebebeb;
  --soft: #f5f5f4;
  --dark: #0a0a0a;
  --accent: #d4ff3a;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
  height: auto;
  scroll-behavior: auto;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

::selection {
  background: var(--accent);
  color: var(--dark);
}

.display {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  color: #fff;
  overflow: hidden;
}

.no-js .preloader {
  display: none;
}

.preloader__panels {
  position: absolute;
  inset: 0;
  display: flex;
}

.preloader__panels i {
  flex: 1;
  margin-right: -1px;
  background: var(--dark);
}

.preloader__top,
.preloader__bottom {
  position: absolute;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.preloader__top {
  top: 36px;
  align-items: center;
}

.preloader__bottom {
  bottom: 44px;
  align-items: flex-end;
}

.preloader__name {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 34px);
}

.preloader__name span {
  color: var(--accent);
}

.preloader__role {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.preloader__count {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(64px, 11vw, 170px);
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
}

.preloader__log {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 130px;
  justify-content: flex-end;
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.pl-line {
  animation: logIn 0.4s var(--ease) both;
}

.pl-line b {
  color: var(--accent);
  font-weight: 500;
}

.pl-line--final {
  color: var(--accent);
}

@keyframes logIn {
  from { opacity: 0; transform: translateY(8px); }
}

.pl-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.pl-bar span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}

/* 3D cube */
.pl-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.cube {
  --d: 60px;
  position: relative;
  width: 120px;
  height: 120px;
  transform-style: preserve-3d;
  animation: cubeSpin 7s linear infinite;
}

@keyframes cubeSpin {
  from { transform: rotateX(-25deg) rotateY(0deg); }
  to { transform: rotateX(-25deg) rotateY(360deg); }
}

.cube__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  background: rgba(212, 255, 58, 0.08);
  box-shadow: inset 0 0 30px rgba(212, 255, 58, 0.2), 0 0 16px rgba(212, 255, 58, 0.1);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  /* All faces visible (glass look) so every side shows while spinning */
  transform-style: preserve-3d;
}

/* Symbols only show on faces pointing at the viewer, so they never appear mirrored */
.cube__glyph {
  display: block;
  font-weight: 500;
  backface-visibility: hidden;
}

.cube__face--front { transform: translateZ(var(--d)); }
.cube__face--back { transform: rotateY(180deg) translateZ(var(--d)); }
.cube__face--right { transform: rotateY(90deg) translateZ(var(--d)); }
.cube__face--left { transform: rotateY(-90deg) translateZ(var(--d)); }
.cube__face--top { transform: rotateX(90deg) translateZ(var(--d)); }
.cube__face--bottom { transform: rotateX(-90deg) translateZ(var(--d)); }

.pl-ring {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px dashed rgba(212, 255, 58, 0.45);
  animation: ringSpin 9s linear infinite;
}

.pl-ring--2 {
  inset: 0;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.12);
  animation-duration: 14s;
  animation-direction: reverse;
  --tilt: 60deg;
}

@keyframes ringSpin {
  from { transform: rotateX(var(--tilt, 72deg)) rotateZ(0deg); }
  to { transform: rotateX(var(--tilt, 72deg)) rotateZ(360deg); }
}

.pl-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 255, 58, 0.25), transparent 65%);
  filter: blur(20px);
  z-index: -1;
}

/* Idle 3D sway of the whole cube scene */
.cube-float {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: sway 7s ease-in-out infinite;
}

@keyframes sway {
  0%, 100% { transform: rotateX(8deg) rotateY(-14deg) translateY(0); }
  50% { transform: rotateX(-6deg) rotateY(14deg) translateY(-10px); }
}

/* Orbiting tool logos */
.pl-sats {
  --r: 175px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  animation: satSpin 9s linear infinite;
}

@keyframes satSpin {
  from { transform: rotateX(-14deg) rotateY(0deg); }
  to { transform: rotateX(-14deg) rotateY(360deg); }
}

.sat {
  position: absolute;
  left: -19px;
  top: -19px;
  width: 38px;
  height: 38px;
  transform-style: preserve-3d;
  transform: rotateY(var(--a)) translateZ(var(--r));
}

/* Counter-rotate so each logo keeps facing the camera */
.sat__in {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(212, 255, 58, 0.5), 0 0 24px rgba(212, 255, 58, 0.35);
  opacity: 0;
  scale: 0.2;
  transition: opacity 0.4s ease, scale 0.6s cubic-bezier(0.2, 1.6, 0.4, 1);
  animation: satFace 9s linear infinite;
}

@keyframes satFace {
  from { transform: rotateY(calc(var(--a) * -1)) rotateX(14deg); }
  to { transform: rotateY(calc(var(--a) * -1 - 360deg)) rotateX(14deg); }
}

.sat.is-on .sat__in {
  opacity: 1;
  scale: 1;
}

.sat__in img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  pointer-events: none;
}

/* Rolling odometer counter */
.odo {
  display: inline-flex;
}

.odo__col {
  display: inline-block;
  height: 0.82em;
  overflow: hidden;
  transition: opacity 0.4s ease;
}

.odo__col.is-lead {
  opacity: 0.16;
}

.odo__strip {
  display: flex;
  flex-direction: column;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.odo__strip span {
  display: block;
  height: 0.82em;
  line-height: 0.82;
}

/* Glitch flicker on the name */
.preloader__name {
  position: relative;
}

.preloader__name::before,
.preloader__name::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.preloader__name::before {
  color: var(--accent);
  animation: glitchA 3.4s steps(1) infinite 1.2s;
}

.preloader__name::after {
  color: #39c5ff;
  animation: glitchB 3.4s steps(1) infinite 1.2s;
}

@keyframes glitchA {
  0%, 86%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  88% { opacity: 0.9; transform: translate(-4px, 1px); clip-path: inset(15% 0 55% 0); }
  91% { opacity: 0.9; transform: translate(3px, -1px); clip-path: inset(60% 0 10% 0); }
  94% { opacity: 0; }
}

@keyframes glitchB {
  0%, 87%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  89% { opacity: 0.8; transform: translate(4px, -1px); clip-path: inset(40% 0 30% 0); }
  92% { opacity: 0.8; transform: translate(-3px, 2px); clip-path: inset(5% 0 70% 0); }
  95% { opacity: 0; }
}

/* Faint moving scan lines */
.pl-scan {
  position: absolute;
  inset: -120px 0 0 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px);
  animation: scanMove 6s linear infinite;
}

@keyframes scanMove {
  to { transform: translateY(120px); }
}

/* Warp-speed starfield + neon grid floor */
.pl-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pl-floor {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: 0;
  height: 60%;
  background-image:
    linear-gradient(rgba(212, 255, 58, 0.38) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 255, 58, 0.38) 1px, transparent 1px);
  background-size: 52px 52px;
  transform: perspective(600px) rotateX(64deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 25%, transparent 90%);
  mask-image: linear-gradient(to top, #000 25%, transparent 90%);
  animation: floorMove 1.4s linear infinite;
}

/* Shared 3D space for cube + rings, tilted by the mouse */
.cube-tilt {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform 0.6s var(--ease);
}

.cube-tilt > * {
  grid-area: 1 / 1;
}

.cube-tilt .pl-ring {
  position: relative;
  inset: auto;
  width: 260px;
  height: 260px;
}

.cube-tilt .pl-ring--2 {
  width: 300px;
  height: 300px;
}

/* Solid lime core spinning inside the glass cube */
.core {
  --c: 26px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  transform-style: preserve-3d;
  animation: coreSpin 3.2s linear infinite;
}

@keyframes coreSpin {
  from { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  to { transform: rotateX(-360deg) rotateY(-720deg) rotateZ(360deg); }
}

.core__face {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(212, 255, 58, 0.55);
  border: 1px solid var(--accent);
  box-shadow: 0 0 18px rgba(212, 255, 58, 0.6);
}

.core__face--front { transform: translateZ(var(--c)); }
.core__face--back { transform: rotateY(180deg) translateZ(var(--c)); }
.core__face--right { transform: rotateY(90deg) translateZ(var(--c)); }
.core__face--left { transform: rotateY(-90deg) translateZ(var(--c)); }
.core__face--top { transform: rotateX(90deg) translateZ(var(--c)); }
.core__face--bottom { transform: rotateX(-90deg) translateZ(var(--c)); }

.preloader__name .plc {
  display: inline-block;
}

@media (max-width: 640px) {
  .preloader__top,
  .preloader__bottom {
    left: 20px;
    right: 20px;
  }

  .preloader__role {
    display: none;
  }

  .preloader__log {
    font-size: 11px;
    min-height: 110px;
  }

  .pl-stage {
    transform: scale(0.75);
  }
}

/* ---------- Cursor ---------- */
.cursor,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cursor {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--text);
}

.cursor-ring {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 1px solid rgba(10, 10, 10, 0.35);
  display: grid;
  place-items: center;
  transition: opacity 0.3s ease, width 0.35s var(--ease), height 0.35s var(--ease),
    margin 0.35s var(--ease), background 0.35s ease, border-color 0.35s ease;
}

.cursor-ring__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.cursor-ring.is-hover {
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  background: rgba(212, 255, 58, 0.25);
  border-color: transparent;
}

.cursor-ring.is-label {
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  background: var(--accent);
  border-color: transparent;
}

.cursor-ring.is-label .cursor-ring__label {
  opacity: 1;
}

.cursor.is-hidden {
  opacity: 0 !important;
}

@media (hover: none), (pointer: coarse) {
  .cursor,
  .cursor-ring {
    display: none;
  }
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--text);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 200;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 2px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.5s var(--ease), box-shadow 0.3s ease;
}

.nav.is-hidden {
  transform: translate(-50%, -140%);
}

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav__link:hover,
.nav__link.is-active {
  background: var(--soft);
}

.nav__brand {
  font-weight: 600;
}

.nav__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 255, 58, 0.35);
}

.nav__cta {
  background: var(--dark);
  color: #fff;
}

.nav__cta:hover {
  background: #2a2a2a;
}

/* ---------- Mobile menu ---------- */
.nav__toggle {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--soft);
}

.nav__toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}

.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child { top: 24px; }

.menu-open .nav__toggle span:first-child { top: 20px; transform: rotate(45deg); }
.menu-open .nav__toggle span:last-child { top: 20px; transform: rotate(-45deg); }

.mnav {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 120px 28px 40px;
  background: var(--dark);
  color: #fff;
  clip-path: circle(0% at calc(100% - 40px) 36px);
  transition: clip-path 0.7s cubic-bezier(0.7, 0, 0.2, 1);
  pointer-events: none;
}

.menu-open .mnav {
  clip-path: circle(150% at calc(100% - 40px) 36px);
  pointer-events: auto;
}

.mnav__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mnav__links a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(40px, 12vw, 64px);
  line-height: 1.1;
  opacity: 0;
  transform: translateY(40px) rotateX(-40deg);
  transform-origin: 50% 100%;
  transition: opacity 0.5s ease, transform 0.6s var(--ease), color 0.3s ease;
}

.mnav__links a:active {
  color: var(--accent);
}

.mnav__links small {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--accent);
}

.menu-open .mnav__links a {
  opacity: 1;
  transform: none;
}

.menu-open .mnav__links a:nth-child(1) { transition-delay: 0.2s; }
.menu-open .mnav__links a:nth-child(2) { transition-delay: 0.27s; }
.menu-open .mnav__links a:nth-child(3) { transition-delay: 0.34s; }
.menu-open .mnav__links a:nth-child(4) { transition-delay: 0.41s; }

.mnav__foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  opacity: 0;
  transition: opacity 0.5s ease 0.45s;
}

.mnav__foot div {
  display: flex;
  gap: 20px;
}

.menu-open .mnav__foot {
  opacity: 1;
}

.menu-open {
  overflow: hidden;
}

/* ---------- Common ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 160px 24px 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  margin-bottom: 20px;
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.55);
}

.section__title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(36px, 5.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-align: center;
  margin-bottom: 72px;
}

.section__title--left {
  text-align: left;
  margin-bottom: 28px;
}

/* split-word masks */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.w > span {
  display: inline-block;
}

.hl {
  font-style: normal;
  position: relative;
  display: inline-block;
  z-index: 0;
}

.hl::after {
  content: "";
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  bottom: 0.08em;
  height: 0.36em;
  background: var(--accent);
  z-index: -1;
  transform-origin: left;
  transform: scaleX(var(--hl, 1));
}

.hl--dark::after {
  height: 0.3em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  to {
    transform: scale(3);
    opacity: 0;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.3s ease;
}

.button--dark {
  background: var(--dark);
  color: #fff;
}

.button--dark:hover {
  background: #262626;
}

.button__arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.button:hover .button__arrow {
  transform: translateX(5px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 150px 24px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
}

.hero__spot {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 30%),
    rgba(212, 255, 58, 0.22),
    transparent 70%
  );
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: float 14s ease-in-out infinite alternate;
}

.blob--1 {
  width: 420px;
  height: 420px;
  left: -120px;
  top: 120px;
  background: #e7ffa1;
}

.blob--2 {
  width: 380px;
  height: 380px;
  right: -100px;
  top: 360px;
  background: #e3e3ff;
  animation-delay: -6s;
}

@keyframes float {
  to {
    transform: translate(60px, -40px) scale(1.1);
  }
}

.hero__status {
  margin-bottom: 32px;
}

.hero__title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(38px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.line__inner {
  display: inline-block;
}

.hero__subtitle {
  position: relative;
  z-index: 2;
  margin-top: 32px;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 500;
  line-height: 1.6;
  color: #3a3a3a;
}

.hero__subtitle strong {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 760px) {
  .br-desktop {
    display: none;
  }
}

/* Rotating word in the headline: scrambles like code, highlight resizes to fit */
.flip {
  display: inline-block;
  vertical-align: bottom;
  white-space: nowrap;
  padding: 0 0.1em;
  transition: width 0.6s var(--ease);
}

.flip__text {
  display: inline-block;
}

.flip__text .scr {
  color: rgba(10, 10, 10, 0.35);
}

/* Headline characters (for intro + mouse proximity effect) */
.word {
  display: inline-block;
  white-space: nowrap;
}

.ch {
  display: inline-block;
  transition: font-variation-settings 0.35s ease, color 0.35s ease;
}

/* Glow + orbit rings behind the portrait */
.hero__photo {
  position: relative;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Photo can't be dragged, selected or long-pressed to save
   (hover colour still works because the wrapper handles hover) */
.hero__photo > img {
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.hero__photo > img {
  position: relative;
  z-index: 1;
}

/* Centred on the head (about 28% down the photo) and always under the image */
.hero__halo {
  position: absolute;
  left: 50%;
  top: 28%;
  width: 80%;
  aspect-ratio: 1;
  margin: -40% 0 0 -40%;
  z-index: 0;
  pointer-events: none;
}

.halo__glow {
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 255, 58, 1) 0%, rgba(212, 255, 58, 0.75) 35%, rgba(212, 255, 58, 0.25) 55%, transparent 70%);
  filter: blur(6px);
  animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    transform: scale(1.08);
    opacity: 0.8;
  }
}

.halo__ring {
  position: absolute;
  transition: translate 0.9s var(--ease);
  border-radius: 50%;
  border: 1px dashed rgba(10, 10, 10, 0.22);
  animation: orbit 30s linear infinite;
}

/* Non-rotating wrappers: set each ring's size and fade the bottom
   so logos disappear as they pass behind the shoulders */
.halo__orbit {
  position: absolute;
  transition: translate 0.9s var(--ease);
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 86%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 86%);
}

/* Wrapper boxes are 24px larger than the ring so logos on the edge aren't clipped by the mask */
.halo__orbit--1 { inset: calc(5% - 24px); }
.halo__orbit--2 { inset: calc(-8% - 24px); }
.halo__orbit--3 { inset: calc(-14% - 24px); }

.halo__ring--1,
.halo__ring--2,
.halo__ring--3 {
  inset: 24px;
}

.halo__ring--2 {
  border-style: solid;
  border-color: rgba(10, 10, 10, 0.08);
  animation-duration: 45s;
  animation-direction: reverse;
}

/* Real tool logos riding the orbit rings */
.tool-slot {
  position: absolute;
  inset: 0;
  transform: rotate(var(--a));
}

.tool {
  position: absolute;
  left: 50%;
  top: 0;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  transform: rotate(calc(var(--a) * -1));
}

/* Counter-rotates against the ring so logos stay upright */
.tool__in {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(10, 10, 10, 0.06);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  animation: orbit 30s linear infinite reverse;
}

.tool__in img {
  width: 58%;
  height: 58%;
  object-fit: contain;
}

.halo__ring--2 .tool {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
}

.halo__ring--2 .tool__in {
  animation-duration: 45s;
  animation-direction: normal;
}

/* Third, outermost ring: languages & frameworks */
.halo__ring--3 {
  border: 1px dashed rgba(10, 10, 10, 0.1);
  animation-duration: 70s;
}

.halo__ring--3 .tool {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
}

.halo__ring--3 .tool__in {
  animation-duration: 70s;
}

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

/* Spinning "open to work" badge */
.spin-badge {
  position: absolute;
  left: -6%;
  bottom: 6%;
  z-index: 3;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.spin-badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: orbit 14s linear infinite;
}

.spin-badge:hover svg {
  animation-duration: 4s;
}

.spin-badge text {
  fill: #fff;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.spin-badge__arrow {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--dark);
  font-size: 22px;
  font-weight: 700;
  transition: transform 0.5s var(--ease);
}

.spin-badge:hover .spin-badge__arrow {
  transform: rotate(45deg) scale(1.1);
}

.typed {
  font-weight: 700;
  color: var(--text);
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.18em;
  background: var(--text);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero__visual {
  position: relative;
  isolation: isolate;
  margin-top: 110px;
  width: min(500px, 100%);
}

.hero__photo > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 100%;
  /* Fade the left, right and bottom edges so the cut-out has no hard box edges */
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 22%, #000 78%, transparent 100%),
    linear-gradient(to bottom, #000 55%, transparent 98%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 22%, #000 78%, transparent 100%),
    linear-gradient(to bottom, #000 55%, transparent 98%);
  mask-composite: intersect;
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.8s ease;
}

.hero__photo:hover > img {
  filter: grayscale(0%) contrast(1);
}

.hero__placeholder {
  aspect-ratio: 1 / 0.9;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f4f4f4, #d9d9d9);
  border-radius: 50% 50% 0 0 / 42% 42% 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}

.hero__placeholder small {
  font-family: var(--font-mono);
  font-size: 12px;
}

.chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.chip__icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--accent);
  font-size: 12px;
}

.chip--1 { top: 10%; left: -22%; }
.chip--2 { top: 4%; right: -16%; }
.chip--3 { top: 42%; right: -26%; }
.chip--4 { top: 56%; left: -30%; }
.chip--5 { top: 76%; right: -12%; }

.chip > * {
  pointer-events: none;
}

.chip {
  animation: bob 5s ease-in-out infinite;
}
.chip--2 { animation-delay: -1s; }
.chip--3 { animation-delay: -2s; }
.chip--4 { animation-delay: -3s; }
.chip--5 { animation-delay: -4s; }

@keyframes bob {
  50% {
    translate: 0 -10px;
  }
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  writing-mode: vertical-rl;
}

.scroll-hint__line {
  position: relative;
  width: 1px;
  height: 60px;
  background: var(--line);
  overflow: hidden;
}

.scroll-hint__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  animation: drip 2s var(--ease) infinite;
}

@keyframes drip {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

/* ---------- Marquee ---------- */
.marquee-band {
  background: var(--dark);
  color: #fff;
  padding: 28px 0;
  transform: rotate(-2deg) scale(1.04);
  margin-top: -20px;
  position: relative;
  z-index: 2;
}

.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
}

.marquee + .marquee {
  margin-top: 10px;
}

.marquee__track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 36px;
  padding-right: 36px;
  animation: marquee 30s linear infinite;
}

.marquee--reverse .marquee__track {
  animation-direction: reverse;
}

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

.marquee span {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 60px);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.marquee--reverse span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.6);
}

.marquee span:hover {
  color: var(--accent);
  -webkit-text-stroke-color: transparent;
}

.marquee i {
  font-style: normal;
  color: var(--accent);
  font-size: 24px;
}

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

/* ---------- About ---------- */
.about__text {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 112;
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.about__text .sw {
  transition: none;
}

.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 100px;
}

/* Lines are pseudo-elements so they can "draw" in */
.stats::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
  transform-origin: left;
  transform: scaleX(var(--line-x, 1));
}

.stat {
  position: relative;
  padding: 36px 16px 0;
  text-align: center;
  perspective: 600px;
  cursor: default;
}

.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  transform-origin: top;
  transform: scaleY(var(--line-y, 1));
}

/* Number turns toward the cursor and pops forward on hover */
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(var(--z, 0px));
  transition: transform 0.5s var(--ease), text-shadow 0.4s ease;
  will-change: transform;
}

.stat:hover .stat__num {
  --z: 40px;
  /* Stacked lime shadows = 3D extruded block */
  text-shadow:
    1px 1px 0 #c2f02c,
    2px 2px 0 #b5e320,
    3px 3px 0 #a8d618,
    4px 4px 0 #9ccf00,
    5px 5px 0 #8fbf00,
    6px 6px 0 #82ae00,
    10px 14px 24px rgba(0, 0, 0, 0.18);
}

.stat__label {
  position: relative;
  display: inline-block;
  margin-top: 12px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 15px;
  transition: color 0.3s ease;
}

.stat__label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.5s var(--ease);
}

.stat:hover .stat__label {
  color: var(--text);
}

.stat:hover .stat__label::after {
  transform: scaleX(1);
}

/* ---------- Services (bento) ---------- */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

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

.bcard {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.6s var(--ease), box-shadow 0.6s ease;
}

.bcard:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.1);
}

/* Spotlight that follows the mouse */
.bcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(212, 255, 58, 0.35), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Glowing border that runs around the card */
.bcard::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), transparent 0 65%, var(--accent) 80%, #9ccf00 88%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.bcard:hover::before,
.bcard:hover::after {
  opacity: 1;
}

.bcard:hover::after {
  animation: borderSpin 3.5s linear infinite;
}

@keyframes borderSpin {
  to {
    --angle: 360deg;
  }
}

.bcard__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 20px;
}

.bcard__title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 112;
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
}

.bcard p {
  color: var(--muted);
  line-height: 1.65;
  max-width: 400px;
}

/* 01 dark dev card */
.bcard--dev {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 36px;
  background: var(--dark);
  color: #fff;
  border-color: transparent;
}

.bcard--dev p,
.bcard--dev .bcard__num {
  color: rgba(255, 255, 255, 0.6);
}

.bcard--dev .service__tags li {
  background: rgba(255, 255, 255, 0.08);
}

.bcard--dev::before {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(212, 255, 58, 0.14), transparent 65%);
}

.devdemo {
  position: relative;
  padding-bottom: 48px;
}

.editor {
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
}

.editor__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #1c1c1c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.editor__bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3a3a;
}

.editor__bar span {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #8a8a8a;
}

.editor__code {
  margin: 0;
  padding: 16px 18px 20px;
  min-height: 230px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: #d4d4d4;
  white-space: pre;
  overflow: hidden;
}

.editor__code b {
  font-weight: 400;
}

.editor__code .k { color: #c792ea; }
.editor__code .f { color: var(--accent); }
.editor__code .s { color: #a5e075; }
.editor__code .t { color: #7dd3fc; }

.cl {
  display: block;
  min-height: 1.75em;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.45s steps(22);
}

.cl.on {
  clip-path: inset(0 0 0 0);
}

.devdemo.is-reset .cl,
.devdemo.is-reset .pv,
.devdemo.is-reset polyline {
  transition: none !important;
}

.preview {
  position: absolute;
  right: -14px;
  bottom: 0;
  width: 46%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
  transform: rotate(-3deg);
}

.pv {
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  transition: opacity 0.5s ease, transform 0.6s var(--ease);
}

.pv.on {
  opacity: 1;
  transform: none;
}

.preview__nav {
  display: flex;
  gap: 5px;
}

.preview__nav i {
  height: 8px;
  flex: 1;
  border-radius: 4px;
  background: #ececec;
}

.preview__nav i:first-child {
  flex: 0 0 22px;
  background: var(--dark);
}

.preview__chart {
  height: 58px;
  padding: 8px;
  border-radius: 8px;
  background: var(--dark);
}

.preview__chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.preview__chart polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 1.4s var(--ease) 0.2s;
}

.preview__chart.on polyline {
  stroke-dashoffset: 0;
}

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

.preview__cards i {
  height: 28px;
  border-radius: 6px;
  background: #efefef;
}

.preview__cards i:first-child {
  background: var(--accent);
}

/* 02 AI flow card */
.bcard--ai {
  grid-column: 3;
  grid-row: 1 / 3;
}

.flow {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 18px;
  min-height: 330px;
  margin: 36px 0 28px;
}

.flow__line {
  position: absolute;
  left: 28px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  margin-left: -1px;
  background: repeating-linear-gradient(to bottom, #d6d6d6 0 5px, transparent 5px 10px);
}

.flow__pulse {
  position: absolute;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--dark);
  box-shadow: 0 0 0 4px var(--accent), 0 0 20px 4px rgba(212, 255, 58, 0.8);
  animation: pulseDown 6s linear infinite;
}

@keyframes pulseDown {
  0% { top: 0; opacity: 1; }
  75% { top: 100%; opacity: 1; }
  82%, 100% { top: 100%; opacity: 0; }
}

.flow__node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px 9px 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  animation: nodeOn 6s infinite;
  animation-delay: calc(var(--i) * 1.5s);
}

.flow__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--soft);
  font-size: 16px;
  font-weight: 700;
  animation: iconOn 6s infinite;
  animation-delay: inherit;
}

.flow__node b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.flow__node small {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.flow__ok {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--accent);
  font-style: normal;
  font-size: 11px;
  opacity: 0;
  transform: scale(0.4);
  animation: okOn 6s infinite;
  animation-delay: inherit;
}

@keyframes nodeOn {
  0%, 26%, 100% { border-color: var(--line); box-shadow: none; transform: none; }
  4%, 20% { border-color: var(--dark); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1); transform: translateX(8px); }
}

@keyframes iconOn {
  0%, 26%, 100% { background: var(--soft); color: var(--text); }
  4%, 20% { background: var(--accent); color: var(--dark); }
}

@keyframes okOn {
  0%, 6% { opacity: 0; transform: scale(0.4); }
  12%, 90% { opacity: 1; transform: scale(1); }
  96%, 100% { opacity: 0; transform: scale(0.4); }
}

.bcard--ai .service__tags {
  margin-top: auto;
}

/* 03 software layers */
.bcard--soft {
  background: var(--soft);
  border-color: transparent;
}

.layers {
  position: relative;
  height: 240px;
  margin-top: auto;
  display: grid;
  place-items: center;
  perspective: 900px;
  transform-style: preserve-3d;
}

.layer {
  position: absolute;
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  border-radius: 24px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  transform: rotateX(58deg) rotateZ(-45deg) translateZ(var(--z));
  transition: transform 0.8s var(--ease);
  animation: layerFloat 4s ease-in-out infinite;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.08);
}

.layer--db {
  --z: -48px;
  background: var(--dark);
  color: var(--accent);
}

.layer--api {
  --z: 0px;
  background: #fff;
  border: 1px solid #e2e2e2;
  animation-delay: -0.3s;
}

.layer--ui {
  --z: 48px;
  background: rgba(212, 255, 58, 0.92);
  animation-delay: -0.6s;
}

.bcard--soft:hover .layer--db { --z: -90px; }
.bcard--soft:hover .layer--ui { --z: 90px; }

@keyframes layerFloat {
  50% {
    translate: 0 -8px;
  }
}

/* 04 CTA card */
.bcard--cta {
  justify-content: space-between;
  min-height: 300px;
  background: var(--accent);
  border-color: transparent;
  color: var(--dark);
}

.bcard--cta .bcard__num {
  color: rgba(10, 10, 10, 0.6);
}

.bcard--cta::before {
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.6), transparent 65%);
}

.bcard--cta::after {
  background: conic-gradient(from var(--angle), transparent 0 65%, var(--dark) 80%, transparent 95%);
}

.bcard--cta h3 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.cta-arrow {
  align-self: flex-end;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-top: 24px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--accent);
  font-size: 28px;
  transition: transform 0.6s var(--ease);
}

.bcard--cta:hover .cta-arrow {
  transform: rotate(-45deg) scale(1.12);
}

.service__tags,
.project__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.service__tags li,
.project__tags li {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--soft);
}

/* ---------- Automation / Terminal ---------- */
.automate {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.automate .eyebrow {
  text-align: left;
}

.automate__text {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.terminal {
  background: #0d0d0d;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: #171717;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal__bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3a3a3a;
}

.terminal__bar span:nth-child(1) { background: #ff5f57; }
.terminal__bar span:nth-child(2) { background: #febc2e; }
.terminal__bar span:nth-child(3) { background: #28c840; }

.terminal__bar p {
  margin-left: auto;
  margin-right: auto;
  padding-right: 52px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8a8a8a;
}

.terminal__body {
  min-height: 340px;
  padding: 24px 24px 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.9;
  color: #d6d6d6;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal__body .t-prompt { color: var(--accent); }
.terminal__body .t-ok { color: #4ade80; }
.terminal__body .t-dim { color: #7a7a7a; }
.terminal__body .t-hl { color: #0a0a0a; background: var(--accent); padding: 1px 6px; border-radius: 4px; }

.terminal__caret {
  display: inline-block;
  width: 9px;
  height: 18px;
  vertical-align: -3px;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

/* ---------- Automation 3D scene ---------- */
.zzz {
  position: relative;
  display: inline-block;
  width: 0.7em;
  height: 0.9em;
  vertical-align: top;
}

.zzz i {
  position: absolute;
  left: 0.1em;
  bottom: 0.2em;
  font-style: normal;
  font-size: 0.32em;
  color: #8fbf00;
  opacity: 0;
  animation: zFloat 3.6s ease-in-out infinite;
}

.zzz i:nth-child(2) { animation-delay: 1.2s; }
.zzz i:nth-child(3) { animation-delay: 2.4s; }

@keyframes zFloat {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6) rotate(-10deg); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(0.9em, -2.2em) scale(1.4) rotate(12deg); }
}

.auto-stage {
  position: relative;
  perspective: 1200px;
  padding: 40px 20px;
}

.auto-floor {
  position: absolute;
  left: -40%;
  right: -40%;
  bottom: -18%;
  height: 80%;
  background-image:
    linear-gradient(rgba(10, 10, 10, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 10, 10, 0.09) 1px, transparent 1px);
  background-size: 52px 52px;
  transform: perspective(700px) rotateX(72deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 60%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 60%, #000 20%, transparent 75%);
  animation: floorMove 2.4s linear infinite;
  pointer-events: none;
}

@keyframes floorMove {
  to {
    background-position: 0 52px, 0 0;
  }
}

.auto-scene,
.auto-tilt {
  position: relative;
  transform-style: preserve-3d;
}

.auto-tilt {
  transform: rotateX(var(--rx, 4deg)) rotateY(var(--ry, -8deg));
  transition: transform 0.7s var(--ease);
}

.auto-tilt .terminal {
  transform: translateZ(0);
}

.app {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14);
  transform: translateZ(var(--z));
  animation: bob 5s ease-in-out infinite;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.app__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--dark);
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Pulse ring when the terminal uses this app */
.app__icon::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 14px;
  border: 2px solid var(--accent);
  opacity: 0;
}

.app.is-active {
  border-color: var(--dark);
  box-shadow: 0 0 0 4px rgba(212, 255, 58, 0.6), 0 24px 50px rgba(0, 0, 0, 0.2);
}

.app.is-active .app__icon {
  background: var(--accent);
  color: var(--dark);
}

.app.is-active .app__icon::after {
  animation: ping 1s ease-out 2;
}

@keyframes ping {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.8); }
}

.app--mail { top: -6%; left: -7%; }
.app--sheets { top: 40%; left: -12%; animation-delay: -1s; }
.app--wa { bottom: 2%; left: -6%; animation-delay: -2s; }
.app--slack { top: -8%; right: 10%; animation-delay: -3s; }
.app--crm { top: 30%; right: -9%; animation-delay: -4s; }

.result {
  position: absolute;
  z-index: 4;
  right: -5%;
  bottom: -12%;
  width: 280px;
  padding: 18px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--dark);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateZ(160px) translateY(30px) scale(0.85);
  transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.2, 1.4, 0.4, 1);
  pointer-events: none;
}

.result.is-visible {
  opacity: 1;
  transform: translateZ(160px);
}

.result__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.result__bolt {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--accent);
  font-size: 14px;
}

.result__bar {
  height: 6px;
  margin: 14px 0 10px;
  border-radius: 6px;
  background: rgba(10, 10, 10, 0.15);
  overflow: hidden;
}

.result__bar span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease) 0.2s;
}

.result.is-visible .result__bar span {
  transform: scaleX(1);
}

.result__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ---------- Work (sticky 3D stack) ---------- */
.stack {
  position: relative;
  padding-bottom: 40px;
}

.pcard {
  position: sticky;
  top: calc(96px + var(--n) * 22px);
  height: min(78vh, 640px);
  min-height: 520px;
  margin-bottom: 48px;
  border-radius: 36px;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  color: #fff;
  overflow: hidden;
  transform-origin: 50% 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.12);
  will-change: transform;
}

.pcard:last-child {
  margin-bottom: 0;
}

.pcard--light {
  color: var(--dark);
}

/* Subtle moving sheen across the card */
.pcard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 70%) var(--my, 30%), rgba(255, 255, 255, 0.14), transparent 60%);
  pointer-events: none;
}

.pcard__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  height: 100%;
  padding: 44px 48px;
  align-items: center;
}

.pcard__info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.pcard__index {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(80px, 10vw, 150px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.4);
}

.pcard--light .pcard__index {
  -webkit-text-stroke-color: rgba(10, 10, 10, 0.35);
}

.pcard__type {
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: 0.65;
}

.pcard__title {
  margin: 12px 0 14px;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 118;
  font-size: clamp(30px, 3.4vw, 50px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.pcard__desc {
  max-width: 440px;
  line-height: 1.6;
  opacity: 0.72;
}

.pcard .project__tags li {
  background: rgba(255, 255, 255, 0.1);
}

.pcard--light .project__tags li {
  background: rgba(10, 10, 10, 0.08);
}

.pcard__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 14px 24px;
  border-radius: 999px;
  background: #fff;
  color: var(--dark);
  font-weight: 600;
  font-size: 15px;
}

.pcard--light .pcard__link {
  background: var(--dark);
  color: #fff;
}

.pcard__link span {
  display: inline-block;
  transition: transform 0.4s var(--ease);
}

.pcard__link:hover span {
  transform: rotate(45deg);
}

/* 3D stage: outer layer rotates on scroll, inner layer follows the mouse */
.pcard__stage {
  height: 100%;
  display: grid;
  place-items: center;
  perspective: 1100px;
}

.stage3d,
.stage3d__tilt {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
}

.stage3d {
  max-width: 500px;
}

.stage3d__tilt {
  aspect-ratio: 4 / 3.2;
  display: grid;
  place-items: center;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease);
}

/* Glow sitting behind the mock */
.stage3d__tilt::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 255, 58, 0.55), transparent 70%);
  filter: blur(30px);
  transform: translateZ(-80px);
}

.pcard--light .stage3d__tilt::before {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), transparent 70%);
}

.stage3d .mock {
  width: 86%;
}

.float {
  position: absolute;
  z-index: 2;
  padding: 11px 16px;
  border-radius: 14px;
  background: #fff;
  color: var(--dark);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
  transform: translateZ(110px);
  animation: bob 5s ease-in-out infinite;
}

.float--a {
  top: 2%;
  right: -4%;
}

.float--b {
  bottom: 4%;
  left: -6%;
  background: var(--dark);
  color: var(--accent);
  animation-delay: -2.5s;
}

.pcard--light .float--b {
  background: var(--dark);
}

/* Mock UIs inside project covers */
.mock {
  position: relative;
  width: 72%;
  aspect-ratio: 16 / 11;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  padding: 36px 18px 18px;
  transform: translateZ(40px);
  transition: transform 0.6s var(--ease);
}

.pcard:hover .mock {
  transform: translateZ(40px) translateY(-8px) scale(1.03);
}

.mock__bar {
  position: absolute;
  top: 12px;
  left: 14px;
  display: flex;
  gap: 6px;
}

.mock__bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
}

.mock--chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  height: 26px;
  width: 55%;
  border-radius: 14px 14px 14px 4px;
  background: #eee;
}

.bubble--out {
  align-self: flex-end;
  width: 48%;
  border-radius: 14px 14px 4px 14px;
  background: var(--dark);
}

.bubble--short { width: 35%; }
.bubble--long { width: 62%; background: var(--accent); }

.pcard:hover .bubble {
  animation: pop 0.6s var(--ease) both;
}
.pcard:hover .bubble:nth-child(3) { animation-delay: 0.08s; }
.pcard:hover .bubble:nth-child(4) { animation-delay: 0.16s; }
.pcard:hover .bubble:nth-child(5) { animation-delay: 0.24s; }

@keyframes pop {
  from { transform: scale(0.6); opacity: 0; }
}

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

.mock--dash .kpis b {
  height: 30px;
  border-radius: 8px;
  background: #f0f0f0;
}

.mock--dash .kpis b:first-child {
  background: var(--dark);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: calc(100% - 42px);
  margin-top: 12px;
}

.bars s {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: var(--dark);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease);
}

.bars s:nth-child(even) {
  background: #c9c9c9;
}

.pcard:hover .bars s {
  animation: grow 0.8s var(--ease) both;
}
.pcard:hover .bars s:nth-child(2) { animation-delay: 0.05s; }
.pcard:hover .bars s:nth-child(3) { animation-delay: 0.1s; }
.pcard:hover .bars s:nth-child(4) { animation-delay: 0.15s; }
.pcard:hover .bars s:nth-child(5) { animation-delay: 0.2s; }
.pcard:hover .bars s:nth-child(6) { animation-delay: 0.25s; }
.pcard:hover .bars s:nth-child(7) { animation-delay: 0.3s; }

@keyframes grow {
  from { transform: scaleY(0.1); }
}

.mock--table .rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock--table .rows b {
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(90deg, #0a0a0a 0 18%, transparent 18% 22%, #eee 22% 70%, transparent 70% 76%, #d4ff3a 76% 100%);
  transition: transform 0.5s var(--ease);
}

.pcard:hover .mock--table .rows b:nth-child(odd) {
  transform: translateX(6px);
}

.mock--flow {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.node {
  position: absolute;
  z-index: 1;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--dark);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
}

.node--a { left: 16%; top: 25%; }
.node--b { left: 50%; top: 50%; background: var(--accent); }
.node--c { left: 84%; top: 25%; }
.node--d { left: 84%; top: 75%; }

.wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wires path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  animation: dash 1.2s linear infinite;
  vector-effect: non-scaling-stroke;
}

@keyframes dash {
  to { stroke-dashoffset: -24; }
}

/* ---------- Process (3D ring) ---------- */
.process-sec {
  position: relative;
  padding-top: 160px;
}

.process-pin {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Default (mobile / no JS): simple grid of cards */
.ring {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pstep {
  --pad: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--pad);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.06);
  transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.pstep__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pstep__num {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: 44px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(10, 10, 10, 0.35);
  transition: -webkit-text-stroke-color 0.5s ease, color 0.5s ease;
}

.pstep__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--soft);
  transition: background 0.5s ease, color 0.5s ease;
}

.pstep__art {
  height: 120px;
  margin: 22px 0 18px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--soft);
  overflow: hidden;
  transition: background 0.5s ease;
}

.pstep h3 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 112;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.pstep p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
  transition: color 0.5s ease;
}

.pstep__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 18px;
}

.pstep__list li {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: border-color 0.5s ease;
}

/* Active (front) card flips to dark */
.pstep.is-active {
  background: var(--dark);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
}

.pstep.is-active .pstep__num {
  color: var(--accent);
  -webkit-text-stroke-color: transparent;
}

.pstep.is-active .pstep__tag {
  background: var(--accent);
  color: var(--dark);
}

.pstep.is-active .pstep__art {
  background: #1b1b1b;
}

.pstep.is-active p {
  color: rgba(255, 255, 255, 0.65);
}

.pstep.is-active .pstep__list li {
  border-color: rgba(255, 255, 255, 0.18);
}

/* --- Step illustrations --- */
.radar {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid rgba(10, 10, 10, 0.2);
  background:
    radial-gradient(circle, transparent 30%, rgba(10, 10, 10, 0.12) 31%, transparent 32%),
    radial-gradient(circle, transparent 62%, rgba(10, 10, 10, 0.12) 63%, transparent 64%);
  overflow: hidden;
}

.pstep.is-active .radar {
  border-color: rgba(212, 255, 58, 0.4);
  background:
    radial-gradient(circle, transparent 30%, rgba(212, 255, 58, 0.25) 31%, transparent 32%),
    radial-gradient(circle, transparent 62%, rgba(212, 255, 58, 0.25) 63%, transparent 64%);
}

.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(212, 255, 58, 0.85), transparent 25%);
  animation: orbit 2.4s linear infinite;
}

.radar b {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dark);
  animation: blip 2.4s ease-in-out infinite;
}

.pstep.is-active .radar b {
  background: var(--accent);
}

.radar b:nth-of-type(2) { animation-delay: 0.8s; }
.radar b:nth-of-type(3) { animation-delay: 1.6s; }

@keyframes blip {
  0%, 100% { transform: scale(0.4); opacity: 0.3; }
  30% { transform: scale(1.3); opacity: 1; }
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 60%;
}

.checklist i {
  position: relative;
  height: 14px;
  padding-left: 24px;
  border-radius: 7px;
  background: linear-gradient(90deg, transparent 22px, rgba(10, 10, 10, 0.12) 22px) no-repeat;
}

.checklist i::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -2px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  border: 1.5px solid rgba(10, 10, 10, 0.3);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  color: transparent;
  animation: tick 3.6s ease infinite;
  animation-delay: var(--d);
}

.pstep.is-active .checklist i {
  background: linear-gradient(90deg, transparent 22px, rgba(255, 255, 255, 0.15) 22px) no-repeat;
}

.pstep.is-active .checklist i::before {
  border-color: rgba(255, 255, 255, 0.3);
}

@keyframes tick {
  0%, 15% { background: transparent; color: transparent; transform: scale(1); }
  22% { transform: scale(1.25); }
  28%, 85% { background: var(--accent); border-color: var(--accent); color: var(--dark); transform: scale(1); }
  100% { background: transparent; color: transparent; }
}

.codebars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 70%;
}

.codebars i {
  height: 9px;
  width: var(--w);
  margin-left: var(--x, 0);
  border-radius: 5px;
  background: rgba(10, 10, 10, 0.18);
  transform-origin: left;
  animation: typeBar 3s var(--ease) infinite;
  animation-delay: var(--d);
}

.codebars i:nth-child(odd) {
  background: var(--dark);
}

.pstep.is-active .codebars i { background: rgba(255, 255, 255, 0.25); }
.pstep.is-active .codebars i:nth-child(odd) { background: var(--accent); }

@keyframes typeBar {
  0% { transform: scaleX(0); }
  25%, 80% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

.rocket {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 90px;
}

.rocket__svg {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  overflow: visible;
  animation: rocketFly 1.6s ease-in-out infinite;
}

.rk-body {
  fill: #fff;
  stroke: var(--dark);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.rk-window {
  fill: var(--accent);
  stroke: var(--dark);
  stroke-width: 2.5;
}

.rk-fin {
  fill: var(--dark);
}

.rk-flame {
  fill: var(--accent);
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: flame 0.18s ease-in-out infinite alternate;
}

.rk-flame--core {
  fill: #fff;
  animation-duration: 0.12s;
}

@keyframes flame {
  from { transform: scaleY(0.75) scaleX(0.9); }
  to { transform: scaleY(1.15) scaleX(1.05); }
}

.pstep.is-active .rk-fin {
  fill: var(--accent);
}

.pstep.is-active .rk-body {
  stroke: #fff;
}

.rocket i {
  position: absolute;
  left: 20px;
  top: 58px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.2);
  animation: puff 1.2s ease-out infinite;
}

.pstep.is-active .rocket i {
  background: rgba(212, 255, 58, 0.7);
}

.rocket i:nth-of-type(2) { animation-delay: 0.4s; }
.rocket i:nth-of-type(3) { animation-delay: 0.8s; }

@keyframes rocketFly {
  0%, 100% { transform: rotate(40deg) translate(0, 0); }
  50% { transform: rotate(40deg) translate(0, -7px); }
}

@keyframes puff {
  from { transform: translate(0, 0) scale(0.4); opacity: 1; }
  to { transform: translate(-20px, 24px) scale(2.2); opacity: 0; }
}

/* Progress rail (only used in 3D mode) */
.prail {
  display: none;
}

/* ---------- 3D mode (desktop with GSAP) ---------- */
.process-sec.is-3d {
  padding-top: 0;
}

.is-3d .process-pin {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.is-3d .section__title {
  margin-bottom: 20px;
}

.is-3d .ring-stage {
  position: relative;
  height: min(470px, 56vh);
  perspective: 1600px;
}

.is-3d .ring-tilt {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--tx, -4deg)) rotateY(var(--ty, 0deg));
  transition: transform 0.8s var(--ease);
}

.is-3d .ring {
  --r: 640px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 380px;
  height: 100%;
  max-height: 440px;
  margin-left: -190px;
  display: block;
  transform-style: preserve-3d;
  transform: translateY(-50%) translateZ(calc(var(--r) * -1));
}

.is-3d .pstep {
  position: absolute;
  inset: 0;
  transform: rotateY(calc(var(--i) * 40deg)) translateZ(var(--r));
  backface-visibility: hidden;
}

.is-3d .prail {
  display: block;
  width: min(620px, 100%);
  margin: 28px auto 0;
}

.prail__track {
  position: relative;
  height: 2px;
  margin: 0 40px;
  background: var(--line);
}

.prail__fill {
  position: absolute;
  inset: 0;
  background: var(--dark);
  transform-origin: left;
  transform: scaleX(0);
}

.prail__steps {
  display: flex;
  justify-content: space-between;
  margin-top: -7px;
}

.prail__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 80px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.3s ease;
}

.prail__btn span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #cfcfcf;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}

.prail__btn.is-active {
  color: var(--text);
}

.prail__btn.is-active span,
.prail__btn.is-done span {
  background: var(--accent);
  border-color: var(--dark);
}

.prail__btn.is-active span {
  transform: scale(1.4);
}

/* ---------- Contact ---------- */
.contact {
  margin-top: 180px;
  background: var(--dark);
  color: #fff;
  border-radius: 48px 48px 0 0;
  overflow: hidden;
  position: relative;
}

.contact::before {
  content: "";
  position: absolute;
  width: 700px;
  height: 700px;
  left: 50%;
  top: -300px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(212, 255, 58, 0.18), transparent 65%);
  pointer-events: none;
}

.contact__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 140px 24px 120px;
  text-align: center;
}

.contact__title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(44px, 8vw, 116px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 1100px;
  margin: 0 auto;
}

.hl--dark {
  color: var(--dark);
}

.hl--dark::after {
  bottom: 0.02em;
  height: 0.9em;
}

.contact__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  margin-top: 80px;
  flex-wrap: wrap;
}

.orb {
  display: grid;
  place-items: center;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--dark);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  transition: background 0.3s ease;
}

.orb:hover {
  background: #fff;
}

.orb span {
  display: block;
  pointer-events: none;
}

.contact__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.copy {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.copy__text {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 112;
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 34px);
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0% 2px no-repeat;
  padding-bottom: 4px;
  transition: background-size 0.5s var(--ease);
}

.copy:hover .copy__text {
  background-size: 100% 2px;
}

.copy__hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.socials a {
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.socials a:hover {
  background: #fff;
  color: var(--dark);
  border-color: #fff;
}

.footer {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
}

.footer__top:hover {
  color: var(--accent);
}

/* ---------- Contact extras ---------- */
.contact__globe {
  position: absolute;
  left: 50%;
  top: 420px;
  width: min(820px, 120vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  opacity: 0.75;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle, #000 45%, transparent 72%);
  mask-image: radial-gradient(circle, #000 45%, transparent 72%);
}

.contact__title .word {
  display: inline-block;
  white-space: nowrap;
}

.ch3 {
  display: inline-block;
}

.orb {
  position: relative;
}

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

.orb__wave,
.orb__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.orb__wave {
  border: 1.5px solid var(--accent);
  animation: wave 2.8s ease-out infinite;
}

.orb__wave + .orb__wave {
  animation-delay: 1.4s;
}

@keyframes wave {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(1.9); opacity: 0; }
}

.orb__ring {
  inset: -16px;
  border: 1.5px dashed rgba(212, 255, 58, 0.45);
  animation: orbit 18s linear infinite;
}

.orb:hover .orb__ring {
  animation-duration: 4s;
}

.roll {
  display: block;
  height: 1.3em;
  line-height: 1.3em;
  overflow: hidden;
}

.roll span {
  display: block;
  transition: transform 0.45s var(--ease);
}

.roll span + span {
  color: var(--accent);
}

.socials a:hover .roll span {
  transform: translateY(-100%);
}

.socials a:hover {
  background: transparent;
  color: #fff;
  border-color: var(--accent);
}

.bigname {
  display: flex;
  overflow: hidden;
  padding: 0 0 40px;
  user-select: none;
}

.bigname__track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 36px;
  padding-right: 36px;
  animation: marquee 32s linear infinite;
}

.bigname span {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: clamp(44px, 7.5vw, 120px);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.28);
  transition: color 0.4s ease, -webkit-text-stroke-color 0.4s ease;
}

.bigname span:hover {
  color: var(--accent);
  -webkit-text-stroke-color: var(--accent);
}

.bigname i {
  font-style: normal;
  font-size: clamp(22px, 2.6vw, 40px);
  color: var(--accent);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 300;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--dark);
  font-weight: 600;
  font-size: 14px;
  transform: translate(-50%, calc(100% + 60px));
  transition: transform 0.5s var(--ease);
}

.toast.is-visible {
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .chip--1 { left: -8%; }
  .chip--2 { right: -4%; }
  .chip--3 { right: -10%; }
  .chip--4 { left: -12%; }
  .chip--5 { right: -2%; }

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

  .bcard--dev {
    grid-column: 1 / -1;
  }

  .bcard--ai {
    grid-column: auto;
    grid-row: auto;
  }

  .bcard--dev > * {
    min-width: 0;
  }

  .editor__code {
    font-size: 11px;
  }

  /* CTA spans the full row so there's no empty gap */
  .bcard--cta {
    grid-column: 1 / -1;
    min-height: 220px;
  }

  /* Keep the floating app icons on screen */
  .auto-stage {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }

  .automate {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

@media (max-width: 760px) {
  .section {
    padding-top: 110px;
  }

  .section__title {
    margin-bottom: 48px;
  }

  .work {
    grid-template-columns: 1fr;
    gap: 56px;
  }

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

  .bcard {
    padding: 28px;
  }

  .bcard--dev {
    grid-template-columns: 1fr;
  }

  /* Let grid children shrink so long code lines don't push the card wider */
  .bcard--dev > * {
    min-width: 0;
  }

  .bcard__title {
    font-size: 24px;
  }

  .editor__code {
    font-size: 10.5px;
    padding: 14px 14px 18px;
    min-height: 200px;
  }

  .preview {
    right: -6px;
    width: 52%;
  }

  .auto-stage {
    padding: 30px 0;
  }

  .app {
    font-size: 12px;
    padding: 6px 12px 6px 6px;
  }

  .app__icon {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .app--mail { left: 2%; top: -9%; }
  .app--slack { right: 4%; top: -11%; }
  .app--sheets,
  .app--wa { display: none; }
  .app--crm { right: 2%; top: auto; bottom: 18%; }

  .result {
    right: 0;
    width: 230px;
  }

  .pcard {
    top: calc(80px + var(--n) * 14px);
    height: auto;
    min-height: 0;
    border-radius: 28px;
  }

  .pcard__inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 24px 32px;
  }

  .pcard__index {
    font-size: 64px;
    margin-bottom: 20px;
  }

  .pcard__stage {
    height: 260px;
  }

  .stage3d {
    max-width: 320px;
  }

  .float {
    font-size: 12px;
    padding: 8px 12px;
  }

  .float--a { right: 0; }
  .float--b { left: 0; }

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

  .stat:nth-child(3)::before {
    display: none;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
    margin-top: 36px;
  }


  .scroll-hint {
    display: none;
  }

  .contact {
    border-radius: 32px 32px 0 0;
  }

  .contact__links {
    align-items: center;
  }

  .copy {
    text-align: center;
    align-items: center;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .nav {
    top: 10px;
    width: calc(100% - 20px);
    justify-content: space-between;
    align-items: center;
  }

  .nav__link:not(.nav__brand):not(.nav__cta) {
    display: none;
  }

  .nav__cta {
    margin-left: auto;
  }

  .nav__toggle {
    display: block;
    margin-left: 6px;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav__link {
    padding: 10px 12px;
    font-size: 13px;
  }

  .hero {
    padding-top: 120px;
  }

  .chip {
    font-size: 12px;
    padding: 7px 12px 7px 8px;
  }

  .chip__icon {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .halo__orbit--3 {
    display: none;
  }

  .tool,
  .halo__ring--2 .tool {
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
  }

  .chip--1 { left: -2%; top: 4%; }
  .chip--2 { right: -2%; top: 18%; }
  .chip--3 { display: none; }
  .chip--4 { left: -2%; top: 60%; }
  .chip--5 { right: -2%; top: 80%; }

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

  .process-sec {
    padding-top: 110px;
  }

  .terminal__body {
    font-size: 12px;
    min-height: 300px;
  }

  .spin-badge {
    width: 96px;
    height: 96px;
    left: 0;
  }

  .spin-badge__arrow {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .orb {
    width: 160px;
    height: 160px;
    font-size: 18px;
  }
}

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

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


/* ==========================================================
   Performance mode for phones / touch devices
   Turns off effects that force the browser to repaint every frame.
   ========================================================== */
@media (max-width: 760px), (hover: none), (pointer: coarse) {
  /* Native scroll without CSS smooth-scrolling (JS handles anchor scrolls);
     avoids fights with ScrollTrigger on mobile */
  html {
    scroll-behavior: auto;
  }

  /* Frosted-glass blur is very expensive while scrolling */
  .nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.97);
  }

  /* Big blurred blobs: keep them, but stop animating */
  .blob {
    animation: none;
    filter: blur(50px);
  }

  .halo__glow {
    animation: none;
  }

  /* Masks on rotating content re-rasterise every frame */
  .halo__orbit {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .halo__ring--1 { animation-duration: 40s; }
  .halo__ring--2 { animation-duration: 60s; }

  /* Background-position animations repaint large areas */
  .auto-floor,
  .pl-floor {
    animation: none;
  }

  .pl-scan {
    display: none;
  }

  .contact__globe {
    opacity: 0.6;
  }

  .pcard {
    will-change: auto;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
  }

  .pcard::before,
  .bcard::before,
  .bcard::after {
    display: none;
  }
}
