:root {
  --bg: #040a12;
  --bg-soft: #0b1624;
  --surface: rgba(8, 18, 30, 0.72);
  --surface-soft: rgba(255, 255, 255, 0.06);
  --stroke: rgba(126, 213, 255, 0.16);
  --stroke-strong: rgba(126, 213, 255, 0.3);
  --text: #eef7ff;
  --muted: #91a7bd;
  --aqua: #7ce5ff;
  --cyan: #2da9ff;
  --mint: #87ffd8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

html[data-theme="light"] {
  --bg: #ebf6ff;
  --bg-soft: #d6ebff;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-soft: rgba(255, 255, 255, 0.84);
  --stroke: rgba(30, 93, 141, 0.14);
  --stroke-strong: rgba(30, 93, 141, 0.24);
  --text: #122338;
  --muted: #566d84;
  --aqua: #1895cf;
  --cyan: #205aff;
  --mint: #1cb693;
  --shadow: 0 24px 55px rgba(79, 117, 150, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 18%, rgba(43, 140, 212, 0.18), transparent 28%),
    radial-gradient(circle at 84% 0%, rgba(127, 255, 222, 0.08), transparent 24%),
    linear-gradient(145deg, var(--bg) 0%, #02060a 68%);
}

body {
  overflow-x: hidden;
}

section[id] {
  scroll-margin-top: 6rem;
}

.scene-shell {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#webglCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.scene-vignette,
.scene-scan,
.scene-glow {
  position: absolute;
  inset: 0;
}

.scene-vignette {
  background:
    radial-gradient(circle at 50% 38%, transparent 0%, rgba(4, 8, 14, 0.14) 46%, rgba(2, 5, 9, 0.62) 100%),
    linear-gradient(180deg, rgba(4, 9, 15, 0.08), rgba(4, 9, 15, 0.38));
}

.scene-scan {
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.8), transparent 85%);
}

.scene-glow {
  filter: blur(80px);
  opacity: 0.16;
}

.glow-a {
  background: radial-gradient(circle at 22% 22%, rgba(80, 196, 255, 0.9), transparent 36%);
}

.glow-b {
  background: radial-gradient(circle at 78% 18%, rgba(118, 255, 215, 0.75), transparent 32%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.34) 1px, transparent 0);
  background-size: 18px 18px;
}

.site-header,
main,
footer {
  position: relative;
  z-index: 2;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 5vw;
  backdrop-filter: blur(18px);
  background: rgba(4, 9, 14, 0.34);
  border-bottom: 1px solid var(--stroke);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
  text-decoration: none;
  font-family: "Sora", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  transition: transform 240ms ease, opacity 240ms ease;
}

.brand-mark-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter:
    drop-shadow(0 0 10px rgba(77, 215, 255, 0.38))
    drop-shadow(0 0 22px rgba(36, 95, 255, 0.22));
}

.brand-mark.disintegrating {
  opacity: 0;
  transform: scale(0.2);
}

.nano-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.2rem;
  height: 0.2rem;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(130deg, var(--aqua), var(--mint));
  box-shadow: 0 0 10px rgba(124, 229, 255, 0.7);
  transform: translate(-50%, -50%);
}

nav,
.site-nav {
  display: flex;
  gap: 1.2rem;
}

nav a,
.site-nav a,
footer a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.94rem;
}

.site-nav a.active,
.site-nav a[aria-current="page"],
nav a[aria-current="page"] {
  color: var(--mint);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sound-toggle,
.theme-toggle,
.btn {
  border: 0;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.sound-toggle,
.theme-toggle {
  min-height: 2.6rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--stroke);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  background: linear-gradient(130deg, var(--aqua), var(--cyan));
  color: #05111c;
  box-shadow: 0 16px 30px rgba(38, 131, 215, 0.22);
}

.link-arrow {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.link-arrow::after {
  content: " ->";
}

main {
  padding: 7rem 5vw 4rem;
}

.section {
  max-width: 1320px;
  margin-inline: auto;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 24rem);
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--mint);
  font-family: "Sora", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2,
.page-hero h1 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.7rem, 5.6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.subtext,
.hud-card p,
.service-card p,
.swipe-card p,
.about-panel p,
.process-card span,
.contact-panel p,
.contact-form label,
.service p,
.step p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy {
  max-width: 42rem;
  position: relative;
}

.cta-row {
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-side {
  display: grid;
  gap: 1rem;
  perspective: 1500px;
  position: relative;
}

.hud-card,
.service-card,
.swipe-card,
.about-panel,
.process-card,
.contact-panel,
.service,
.step {
  position: relative;
  border-radius: 1.35rem;
  background: linear-gradient(180deg, rgba(14, 28, 43, 0.62), rgba(6, 15, 24, 0.34));
  border: 1px solid rgba(126, 213, 255, 0.18);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -12px 24px rgba(8, 23, 40, 0.18),
    0 0 34px rgba(31, 124, 217, 0.08);
  backdrop-filter: blur(22px) saturate(140%);
}

.tilt-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  will-change: transform;
}

.tilt-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 40%), rgba(124, 229, 255, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 48%);
  pointer-events: none;
}

.tilt-card > * {
  position: relative;
  transform: translateZ(18px);
}

.tilt-card [data-depth] {
  transform:
    translate3d(var(--px, 0px), var(--py, 0px), var(--pz, 18px))
    var(--layer-transform, none);
  will-change: transform;
}

.hud-card,
.about-panel,
.contact-panel {
  padding: 1.2rem;
}

.hud-card-accent {
  background:
    radial-gradient(circle at 80% 0%, rgba(124, 229, 255, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
}

.hud-label,
.service-index,
.swipe-label,
.about-kicker {
  margin: 0 0 0.7rem;
  color: var(--mint);
  font-family: "Sora", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-strip {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-chip {
  padding: 1rem 1.1rem;
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.metric-chip strong,
.service-card h3,
.swipe-card h3,
.about-panel h3,
.process-card strong,
.contact-panel h3,
.service h3,
.step h3,
.hud-card h3 {
  display: block;
  font-family: "Sora", sans-serif;
}

.metric-chip span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
}

.section-shell {
  margin-top: 5rem;
  padding: 1.7rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 1.8rem;
  background:
    radial-gradient(circle at 12% 18%, rgba(124, 229, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(6, 15, 24, 0.68), rgba(6, 15, 24, 0.34));
  border: 1px solid var(--stroke);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 42px rgba(22, 103, 191, 0.08);
  backdrop-filter: blur(22px);
}

.section-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(130, 228, 255, 0.12), transparent 22%),
    radial-gradient(circle at 80% 25%, rgba(37, 90, 255, 0.08), transparent 28%);
  pointer-events: none;
  z-index: 0;
}

#home,
#services,
#contact {
  position: relative;
  overflow: hidden;
}

#home::before,
#services::before,
#contact::before {
  content: "";
  position: absolute;
  inset: -18% -8%;
  background:
    linear-gradient(115deg, transparent 0%, rgba(116, 220, 255, 0.08) 24%, transparent 44%),
    linear-gradient(155deg, transparent 12%, rgba(24, 102, 255, 0.08) 42%, transparent 68%);
  opacity: 0.7;
  filter: blur(26px);
  pointer-events: none;
  z-index: 0;
}

#home::after,
#services::after,
#contact::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -7.5rem;
  height: 19rem;
  border-radius: 2rem;
  background-image:
    linear-gradient(rgba(128, 229, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 229, 255, 0.16) 1px, transparent 1px);
  background-size: 3rem 3rem;
  opacity: 0.22;
  transform: perspective(1100px) rotateX(78deg);
  transform-origin: top center;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 92%);
  pointer-events: none;
  z-index: 0;
}

#home .hero-grid,
#home .hero-strip,
#services .section-head,
#services .service-grid,
#contact .section-head,
#contact .contact-layout {
  position: relative;
  z-index: 1;
}

#home .hero-copy::before {
  content: "";
  position: absolute;
  width: min(34rem, 78vw);
  height: min(34rem, 78vw);
  left: -12%;
  top: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 213, 255, 0.22), transparent 62%);
  filter: blur(26px);
  pointer-events: none;
  z-index: -1;
}

#home .hero-copy h1,
#services .section-head h2,
#contact .section-head h2 {
  text-shadow:
    0 0 16px rgba(120, 220, 255, 0.18),
    0 0 48px rgba(38, 103, 255, 0.12);
}

#home .hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 35rem);
  align-items: end;
  min-height: min(86vh, 54rem);
}

#home .hero-side {
  justify-self: end;
  align-self: end;
  width: min(100%, 35rem);
  min-height: 33rem;
  display: block;
  padding: 1rem 0 0.75rem;
  perspective: 2100px;
  transform-style: preserve-3d;
}

#home .hero-side::before {
  content: "";
  position: absolute;
  inset: 4% 2% 6% 8%;
  background:
    radial-gradient(circle at 55% 36%, rgba(121, 232, 255, 0.16), transparent 38%),
    radial-gradient(circle at 48% 80%, rgba(39, 105, 255, 0.16), transparent 34%);
  filter: blur(30px);
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
}

#home .hero-side-scaffold {
  position: absolute;
  inset: -1rem -1.3rem -1rem -1.1rem;
  pointer-events: none;
  z-index: 0;
}

#home .hero-side-scaffold::before {
  content: "";
  position: absolute;
  inset: 10% 5% 4% 14%;
  background:
    radial-gradient(circle at 48% 28%, rgba(138, 237, 255, 0.18), transparent 26%),
    radial-gradient(circle at 72% 54%, rgba(51, 127, 255, 0.12), transparent 22%);
  filter: blur(28px);
  opacity: 0.9;
}

#home .hero-side-beam,
#home .hero-side-floor,
#home .hero-side-link,
#home .hero-side-node {
  position: absolute;
}

#home .hero-side-beam {
  width: 12rem;
  height: 24rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(146, 239, 255, 0.18), rgba(52, 116, 255, 0.02) 62%, transparent);
  filter: blur(24px);
  opacity: 0.62;
  transform-origin: top center;
}

#home .hero-side-beam-a {
  top: -6%;
  right: 13%;
  transform: rotate(19deg);
}

#home .hero-side-beam-b {
  top: 8%;
  left: 10%;
  opacity: 0.42;
  transform: rotate(-16deg);
}

#home .hero-side-floor {
  inset: auto -2rem -0.8rem -1.5rem;
  height: 16rem;
  border-radius: 50%;
  background-image:
    linear-gradient(rgba(128, 229, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 229, 255, 0.16) 1px, transparent 1px);
  background-size: 2.45rem 2.45rem;
  opacity: 0.42;
  transform: perspective(1300px) rotateX(79deg);
  transform-origin: center top;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.96), transparent 78%);
}

#home .hero-side-link {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(151, 239, 255, 0.72), transparent);
  opacity: 0.46;
  filter: drop-shadow(0 0 6px rgba(124, 229, 255, 0.34));
}

#home .hero-side-link-a {
  top: 27%;
  right: 8%;
  width: 11.4rem;
  transform: rotate(154deg);
}

#home .hero-side-link-b {
  top: 58%;
  left: 18%;
  width: 10.8rem;
  transform: rotate(22deg);
}

#home .hero-side-link-c {
  bottom: 16%;
  right: 18%;
  width: 9.2rem;
  transform: rotate(160deg);
}

#home .hero-side-node {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: rgba(214, 248, 255, 0.96);
  box-shadow:
    0 0 12px rgba(124, 229, 255, 0.9),
    0 0 26px rgba(45, 169, 255, 0.42);
  animation: nodePulse 4.2s ease-in-out infinite;
}

#home .hero-side-node-a {
  top: 20%;
  right: 14%;
}

#home .hero-side-node-b {
  top: 46%;
  left: 19%;
  animation-delay: -1.4s;
}

#home .hero-side-node-c {
  bottom: 18%;
  right: 26%;
  animation-delay: -2.8s;
}

#home .hero-side-node-d {
  bottom: 9%;
  left: 27%;
  animation-delay: -0.8s;
}

#home .hud-card-frame {
  position: absolute;
  z-index: 1;
  width: min(22.4rem, calc(100% - 2.4rem));
  transform-style: preserve-3d;
  will-change: transform;
}

#home .hud-card-frame::after {
  content: "";
  position: absolute;
  inset: auto 10% -14%;
  height: 34%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 215, 255, 0.26), transparent 72%);
  filter: blur(22px);
  opacity: 0.62;
  pointer-events: none;
}

#home .hud-card-frame-live {
  top: 5rem;
  left: 0;
  transform: translate3d(0, 0, 90px) rotateX(8deg) rotateY(-16deg) rotateZ(-2deg);
  animation: heroHudFloatA 11s ease-in-out infinite;
}

#home .hud-card-frame-interaction {
  top: 14.25rem;
  right: 0;
  transform: translate3d(0, 0, 36px) rotateX(5deg) rotateY(12deg) rotateZ(1.4deg);
  animation: heroHudFloatB 12.5s ease-in-out infinite -3.4s;
}

#home .hero-side .hud-card {
  --shadow-offset-x: 0px;
  --shadow-offset-y: 30px;
  --tilt-glow-size: 38px;
  --tilt-glow-opacity: 0.74;
  position: relative;
  min-height: 11.9rem;
  padding: 1.3rem;
  overflow: hidden;
  isolation: isolate;
  pointer-events: auto;
  border-radius: 1.6rem;
  background:
    linear-gradient(180deg, rgba(11, 28, 45, 0.82), rgba(6, 14, 24, 0.42)),
    radial-gradient(circle at 82% 8%, rgba(146, 239, 255, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(91, 195, 255, 0.08), rgba(36, 95, 255, 0.05));
  border: 1px solid rgba(132, 231, 255, 0.24);
  box-shadow:
    var(--shadow-offset-x) var(--shadow-offset-y) 44px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -26px 42px rgba(8, 24, 42, 0.26),
    0 0 0 1px rgba(124, 229, 255, 0.06),
    0 0 var(--tilt-glow-size) rgba(31, 133, 255, 0.18);
  backdrop-filter: blur(30px) saturate(165%);
  animation: none;
}

#home .hero-side .hud-card::before {
  background:
    radial-gradient(circle at var(--mx, 52%) var(--my, 30%), rgba(124, 229, 255, 0.28), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(180deg, transparent 68%, rgba(24, 92, 180, 0.16));
  opacity: var(--tilt-glow-opacity);
}

#home .hero-side .hud-card:hover {
  transform: none;
}

#home .hero-side .hud-card-live {
  background:
    linear-gradient(180deg, rgba(15, 36, 58, 0.82), rgba(6, 16, 28, 0.42)),
    radial-gradient(circle at 84% 10%, rgba(151, 240, 255, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(91, 195, 255, 0.11), rgba(36, 95, 255, 0.06));
}

#home .hero-side .hud-card-interaction {
  background:
    linear-gradient(180deg, rgba(10, 25, 42, 0.8), rgba(4, 12, 23, 0.4)),
    radial-gradient(circle at 14% 10%, rgba(127, 229, 255, 0.14), transparent 24%),
    linear-gradient(145deg, rgba(80, 186, 255, 0.08), rgba(27, 76, 222, 0.06));
}

#home .hero-side .hud-card-copy {
  display: grid;
  gap: 0.82rem;
}

#home .hero-side .hud-label {
  margin: 0;
  color: rgba(188, 239, 255, 0.78);
  text-shadow: 0 0 14px rgba(124, 229, 255, 0.3);
}

#home .hero-side .hud-card h3 {
  margin: 0;
  font-size: clamp(1.28rem, 1.5vw + 0.8rem, 1.82rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-shadow:
    0 0 20px rgba(147, 238, 255, 0.16),
    0 0 36px rgba(41, 103, 255, 0.1);
}

#home .hero-side .hud-card p:last-child {
  margin: 0;
  max-width: 29ch;
  color: rgba(222, 237, 248, 0.82);
}

#home .hero-side .hud-card-rim,
#home .hero-side .hud-card-sheen,
#home .hero-side .hud-card-orb,
#home .hero-side .hud-card-scan {
  position: absolute;
  pointer-events: none;
}

#home .hero-side .hud-card-rim {
  inset: 0.65rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(170, 240, 255, 0.18);
  box-shadow:
    inset 0 0 20px rgba(124, 229, 255, 0.08),
    0 0 24px rgba(45, 169, 255, 0.12);
}

#home .hero-side .hud-card-sheen {
  inset: -22% auto 10% -24%;
  width: 70%;
  background: linear-gradient(96deg, transparent 12%, rgba(255, 255, 255, 0.05) 38%, rgba(184, 241, 255, 0.24) 49%, rgba(255, 255, 255, 0.05) 59%, transparent 74%);
  filter: blur(4px);
  mix-blend-mode: screen;
  opacity: 0.92;
  --layer-transform: rotate(8deg);
}

#home .hero-side .hud-card-orb {
  right: -0.8rem;
  top: -0.8rem;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 242, 255, 0.6), rgba(69, 155, 255, 0.14) 36%, transparent 72%);
  filter: blur(14px);
  opacity: 0.7;
}

#home .hero-side .hud-card-scan {
  inset: auto -32% 18% -34%;
  height: 2.6rem;
  background: linear-gradient(90deg, transparent, rgba(173, 239, 255, 0.16), rgba(255, 255, 255, 0.46), rgba(173, 239, 255, 0.16), transparent);
  filter: blur(10px);
  opacity: 0.78;
  animation: cardScan 8.8s linear infinite;
}

#home .hero-side .hud-card-interaction .hud-card-scan {
  animation-delay: -4.3s;
}

#home .hero-side .hud-card-sheen,
#home .hero-side .hud-card-orb {
  transition: opacity 220ms ease;
}

#home .metric-chip,
#services .service-card,
#contact .contact-panel,
#contact .contact-form {
  --float-rx-start: 6deg;
  --float-ry-start: -6deg;
  --float-rx-mid: 2deg;
  --float-ry-mid: 4deg;
  --float-lift: -18px;
  animation: panelFloat 9s ease-in-out infinite;
}

#home .metric-chip:nth-child(2),
#services .service-card:nth-child(2),
#contact .contact-form {
  animation-delay: -2.1s;
}

#home .metric-chip:nth-child(3),
#services .service-card:nth-child(3),
#contact .contact-panel {
  animation-delay: -4.4s;
}

#services {
  padding-top: 2rem;
  padding-bottom: 2.7rem;
}

#services .section-head h2 {
  max-width: 14ch;
}

#services .service-grid {
  perspective: 1800px;
  transform-style: preserve-3d;
}

#services .service-grid::before,
#contact .contact-layout::before {
  content: "";
  position: absolute;
  width: 24rem;
  height: 24rem;
  right: -3rem;
  top: -2rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(147, 243, 255, 0.18) 0 22%, transparent 22% 35%, rgba(147, 243, 255, 0.22) 35% 39%, transparent 39% 52%, rgba(45, 169, 255, 0.18) 52% 56%, transparent 56%),
    conic-gradient(from 0deg, rgba(135, 255, 216, 0.22), rgba(45, 169, 255, 0.05), rgba(135, 255, 216, 0.22));
  opacity: 0.86;
  filter: blur(10px);
  animation: orbitalSpin 18s linear infinite;
  pointer-events: none;
  z-index: 0;
}

#services .service-grid::after,
#contact .contact-layout::after {
  content: "";
  position: absolute;
  left: 34%;
  bottom: 5%;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(109, 217, 255, 0.3), rgba(54, 126, 255, 0.12) 38%, transparent 68%);
  filter: blur(28px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

#services .service-card {
  min-height: 18.5rem;
  padding: 1.35rem;
  background:
    linear-gradient(180deg, rgba(10, 24, 38, 0.82), rgba(8, 17, 28, 0.4)),
    radial-gradient(circle at 50% 0%, rgba(137, 236, 255, 0.1), transparent 55%);
  border: 1px solid rgba(128, 225, 255, 0.22);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -22px 40px rgba(7, 25, 46, 0.22),
    0 0 0 1px rgba(112, 222, 255, 0.06),
    0 0 46px rgba(32, 141, 255, 0.14);
  backdrop-filter: blur(28px) saturate(150%);
}

#services .service-card::before,
#contact .contact-panel::before,
#contact .contact-form::before,
#home .hero-side .hud-card::before {
  background:
    radial-gradient(circle at var(--mx, 48%) var(--my, 30%), rgba(124, 229, 255, 0.22), transparent 42%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.1), transparent 38%),
    linear-gradient(180deg, transparent 68%, rgba(24, 92, 180, 0.12));
}

#services .service-card::after,
#contact .contact-panel::after,
#contact .contact-form::after {
  content: "";
  position: absolute;
  inset: auto 12% -14%;
  height: 32%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 214, 255, 0.22), transparent 72%);
  filter: blur(20px);
  pointer-events: none;
}

#services .service-card:nth-child(1) {
  --float-rx-start: 8deg;
  --float-ry-start: -8deg;
  --float-rx-mid: 4deg;
  --float-ry-mid: 4deg;
}

#services .service-card:nth-child(2) {
  --float-rx-start: 6deg;
  --float-ry-start: 7deg;
  --float-rx-mid: 2deg;
  --float-ry-mid: -3deg;
}

#services .service-card:nth-child(3) {
  --float-rx-start: 7deg;
  --float-ry-start: -4deg;
  --float-rx-mid: 3deg;
  --float-ry-mid: 6deg;
}

#services .service-card:nth-child(4) {
  --float-rx-start: 5deg;
  --float-ry-start: 8deg;
  --float-rx-mid: 1deg;
  --float-ry-mid: -4deg;
}

#services .service-index {
  color: var(--aqua);
  text-shadow: 0 0 14px rgba(124, 229, 255, 0.4);
}

#contact {
  padding-top: 2rem;
  padding-bottom: 2.8rem;
}

#contact .contact-layout {
  position: relative;
  align-items: stretch;
  perspective: 1800px;
  transform-style: preserve-3d;
}

#contact .contact-layout::before {
  right: 2%;
  top: 12%;
  width: 20rem;
  height: 20rem;
}

#contact .contact-layout::after {
  left: 48%;
  bottom: 8%;
  width: 14rem;
  height: 14rem;
}

#contact .contact-panel,
#contact .contact-form {
  border-radius: 1.35rem;
  background:
    linear-gradient(180deg, rgba(9, 23, 37, 0.82), rgba(8, 18, 28, 0.42)),
    radial-gradient(circle at 70% 0%, rgba(121, 231, 255, 0.12), transparent 42%);
  border: 1px solid rgba(128, 225, 255, 0.22);
  box-shadow:
    0 26px 52px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -24px 42px rgba(10, 24, 45, 0.18),
    0 0 52px rgba(26, 142, 255, 0.12);
  backdrop-filter: blur(30px) saturate(145%);
}

#contact .contact-panel {
  padding: 1.35rem;
}

#contact .contact-form {
  padding: 1.4rem;
  align-content: start;
}

#contact .contact-form label {
  color: rgba(231, 245, 255, 0.88);
  letter-spacing: 0.01em;
}

#contact input,
#contact select,
#contact textarea {
  border: 1px solid rgba(127, 223, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(7, 17, 28, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 18px rgba(18, 60, 98, 0.12),
    0 0 0 1px rgba(127, 223, 255, 0.04);
}

#contact input:focus,
#contact select:focus,
#contact textarea:focus {
  outline: none;
  border-color: rgba(127, 223, 255, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 22px rgba(18, 73, 120, 0.16),
    0 0 0 1px rgba(127, 223, 255, 0.12),
    0 0 24px rgba(45, 169, 255, 0.16);
}

#contact textarea {
  resize: vertical;
  min-height: 8.2rem;
}

#contact .btn {
  min-width: 13rem;
  box-shadow:
    0 16px 28px rgba(32, 116, 201, 0.32),
    0 0 36px rgba(45, 169, 255, 0.22);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.8rem;
}

.section-head h2 {
  max-width: 13ch;
  font-size: clamp(2rem, 4vw, 4rem);
}

.section-head-tight h2 {
  max-width: 15ch;
}

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

.service-card {
  padding: 1.2rem;
  min-height: 17rem;
  transition: transform 220ms ease, border-color 220ms ease;
}

.service-card:hover,
.swipe-card:hover,
.about-panel:hover,
.process-card:hover,
.contact-panel:hover,
.metric-chip:hover,
.hud-card:hover,
.service:hover,
.step:hover {
  transform: translateY(-4px);
  border-color: var(--stroke-strong);
}

.swipe-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 34%);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  cursor: grab;
}

.swipe-track::-webkit-scrollbar {
  height: 0.55rem;
}

.swipe-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.swipe-card {
  scroll-snap-align: start;
  min-height: 24rem;
  padding: 1.2rem;
  transition: transform 220ms ease, border-color 220ms ease;
}

.swipe-visual {
  position: relative;
  margin-top: 1.4rem;
  min-height: 12rem;
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.swipe-visual span {
  position: absolute;
  display: block;
}

.visual-browser span {
  left: 10%;
  right: 10%;
  height: 2.8rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.visual-browser span:nth-child(1) {
  top: 15%;
  transform: rotate(-9deg);
}

.visual-browser span:nth-child(2) {
  top: 39%;
  transform: rotate(8deg);
}

.visual-browser span:nth-child(3) {
  top: 63%;
  transform: rotate(-4deg);
}

.visual-panels span {
  width: 42%;
  height: 38%;
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(124, 229, 255, 0.24), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.visual-panels span:nth-child(1) {
  left: 10%;
  top: 16%;
  transform: rotate(-14deg);
}

.visual-panels span:nth-child(2) {
  right: 12%;
  top: 22%;
  transform: rotate(12deg);
}

.visual-panels span:nth-child(3) {
  left: 28%;
  bottom: 12%;
  transform: rotate(7deg);
}

.visual-grid span {
  width: 36%;
  height: 28%;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.visual-grid span:nth-child(1) {
  left: 10%;
  top: 12%;
}

.visual-grid span:nth-child(2) {
  right: 10%;
  top: 12%;
}

.visual-grid span:nth-child(3) {
  left: 10%;
  bottom: 12%;
}

.visual-grid span:nth-child(4) {
  right: 10%;
  bottom: 12%;
}

.visual-rings span {
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(124, 229, 255, 0.26);
}

.visual-rings span:nth-child(1) {
  width: 8rem;
  height: 8rem;
}

.visual-rings span:nth-child(2) {
  width: 13rem;
  height: 13rem;
}

.about-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

.process-list {
  display: grid;
  gap: 0.8rem;
}

.process-card {
  padding: 1rem;
}

.process-card span {
  display: block;
  margin-top: 0.35rem;
}

.contact-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1fr);
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.38rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
}

footer {
  padding: 2rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--stroke);
}

.mobile-dock {
  display: none;
}

.page-main {
  max-width: 1320px;
  min-height: 80vh;
  margin-inline: auto;
}

.page-hero {
  margin-top: 1rem;
}

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

.timeline {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.services,
.work,
.timeline,
.contact-grid,
.contact-form-wrap {
  margin-top: 4rem;
}

.service,
.step {
  padding: 1rem;
}

@keyframes panelFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotateX(var(--float-rx-start, 6deg)) rotateY(var(--float-ry-start, -6deg));
  }

  50% {
    transform: translate3d(0, var(--float-lift, -18px), 34px) rotateX(var(--float-rx-mid, 2deg)) rotateY(var(--float-ry-mid, 4deg));
  }
}

@keyframes orbitalSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes heroHudFloatA {
  0%,
  100% {
    transform: translate3d(0, 0, 90px) rotateX(8deg) rotateY(-16deg) rotateZ(-2deg);
  }

  50% {
    transform: translate3d(10px, -18px, 122px) rotateX(5deg) rotateY(-11deg) rotateZ(-0.8deg);
  }
}

@keyframes heroHudFloatB {
  0%,
  100% {
    transform: translate3d(0, 0, 36px) rotateX(5deg) rotateY(12deg) rotateZ(1.4deg);
  }

  50% {
    transform: translate3d(-9px, -16px, 70px) rotateX(3deg) rotateY(8deg) rotateZ(0.2deg);
  }
}

@keyframes cardScan {
  0% {
    transform: translate3d(-38%, 0, 24px);
  }

  100% {
    transform: translate3d(54%, -2px, 24px);
  }
}

@keyframes nodePulse {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.28);
  }
}

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

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

@media (max-width: 1180px) {
  .hero-grid,
  .about-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

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

  .swipe-track {
    grid-auto-columns: minmax(300px, 58%);
  }
}

@media (max-width: 950px) {
  nav,
  .site-nav {
    display: none;
  }

  #home .hero-grid {
    min-height: auto;
  }

  #home::after,
  #services::after,
  #contact::after {
    left: -4%;
    right: -4%;
    bottom: -5.2rem;
    height: 14rem;
  }

  #services .service-grid::before,
  #contact .contact-layout::before {
    width: 16rem;
    height: 16rem;
    right: -4rem;
    top: -1rem;
  }

  #services .service-grid::after,
  #contact .contact-layout::after {
    width: 11rem;
    height: 11rem;
    left: auto;
    right: 5%;
    bottom: 8%;
  }

  main {
    padding-bottom: 7rem;
  }

  .hero-strip,
  .grid,
  .contact-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .section-head,
  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head h2 {
    max-width: none;
  }

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

  #home .hero-side {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 86%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    min-height: auto;
    padding-bottom: 0.3rem;
  }

  #home .hero-side::before,
  #home .hero-side-scaffold {
    display: none;
  }

  #home .hud-card-frame {
    position: static;
    width: auto;
    transform: none;
    animation: none;
    scroll-snap-align: start;
  }

  #home .hud-card-frame::after {
    inset: auto 12% -12%;
    opacity: 0.48;
  }

  #home .hero-side .hud-card {
    scroll-snap-align: start;
    min-height: 15rem;
  }

  #home .hero-side::-webkit-scrollbar {
    height: 0.4rem;
  }

  #home .hero-side::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
  }

  .swipe-track {
    grid-auto-columns: minmax(280px, 80%);
  }

  .mobile-dock {
    position: fixed;
    left: 50%;
    bottom: 0.9rem;
    z-index: 12;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
    width: min(calc(100vw - 1.2rem), 34rem);
    padding: 0.5rem;
    transform: translateX(-50%);
    border-radius: 1.2rem;
    background: rgba(6, 14, 24, 0.78);
    border: 1px solid var(--stroke);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
  }

  .mobile-dock a {
    min-height: 3.2rem;
    display: grid;
    place-items: center;
    border-radius: 0.95rem;
    color: var(--muted);
    text-decoration: none;
    font-family: "Sora", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
  }

  .mobile-dock a.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(124, 229, 255, 0.2), rgba(37, 87, 255, 0.16));
    border-color: var(--stroke-strong);
  }
}

@media (max-width: 680px) {
  .site-header {
    padding-inline: 1rem;
  }

  #home::after,
  #services::after,
  #contact::after {
    bottom: -4.4rem;
    height: 11rem;
  }

  #home .hero-copy::before {
    left: -28%;
    top: -12%;
    width: 20rem;
    height: 20rem;
  }

  main {
    padding: 6.5rem 1rem 3rem;
  }

  footer {
    padding-inline: 1rem;
  }

  .header-tools {
    gap: 0.45rem;
  }

  .sound-toggle,
  .theme-toggle {
    padding-inline: 0.75rem;
    font-size: 0.82rem;
  }

  .site-header {
    gap: 0.6rem;
  }

  .hero h1,
  .section-head h2,
  .page-hero h1 {
    font-size: 2.35rem;
  }

  .hero-grid {
    gap: 1.2rem;
  }

  #home .hero-side {
    grid-auto-columns: 92%;
  }

  #home .hero-side .hud-card {
    padding: 1.15rem;
  }

  #services,
  #contact {
    padding-top: 1.35rem;
    padding-bottom: 2rem;
  }

  #services .service-card,
  #contact .contact-panel,
  #contact .contact-form {
    animation-duration: 11.5s;
  }

  .section-shell {
    padding: 1.15rem;
  }

  .swipe-track {
    grid-auto-columns: minmax(260px, 88%);
  }
}
