/* ==========================================================================
   Max Dev — site styles
   Palette pulled from the logo: navy #11131F, sky #3AB6FF, red #FF0000
   ========================================================================== */

:root {
  --navy-950: #0a0b13;
  --navy-900: #11131f;
  --navy-850: #151827;
  --navy-800: #1a1d2e;
  --navy-700: #252a40;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #eef1f8;
  --muted: #9aa3b8;
  --dim: #6b7389;

  --blue: #3ab6ff;
  --blue-deep: #2f7fac;
  --red: #ff0000;
  --red-soft: #ff4d4d;

  --radius: 18px;
  --radius-sm: 10px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);

  --font-display: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-wide: "Jost", "Poppins", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--navy-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

::selection {
  background: var(--blue);
  color: var(--navy-900);
}

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

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  background: var(--blue);
  color: var(--navy-900);
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}

/* ---------- Typography helpers ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-wide);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 10px;
  background: linear-gradient(105deg, var(--blue) 0 44%, transparent 44% 56%, var(--red) 56%);
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 18px 0 16px;
  text-wrap: balance;
}

.section-lead {
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 19px);
  max-width: 60ch;
  margin: 0;
  text-wrap: pretty;
}

.accent-blue {
  color: var(--blue);
}
.accent-red {
  color: var(--red-soft);
}

/* ---------- Buttons ---------- */

.btn {
  --bg: var(--blue);
  --fg: var(--navy-900);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--fg);
  background: var(--bg);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s var(--ease), translate 0.35s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s;
  box-shadow: 0 10px 30px -12px rgba(58, 182, 255, 0.7);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px rgba(58, 182, 255, 0.85);
}
.btn svg {
  flex: none;
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease);
}
.btn:hover svg {
  transform: translateX(3px);
}

.btn--ghost {
  --bg: transparent;
  --fg: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.btn--red {
  --bg: var(--red);
  --fg: #fff;
  box-shadow: 0 10px 30px -12px rgba(255, 0, 0, 0.7);
}
.btn--red:hover {
  box-shadow: 0 16px 36px -12px rgba(255, 0, 0, 0.85);
}

/* ---------- Header / nav ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s, transform 0.45s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(17, 19, 31, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 44px;
  height: auto;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.nav-links .btn {
  margin-left: 10px;
  padding: 11px 20px;
  color: var(--navy-900);
}
.nav-links .btn:hover {
  background: var(--blue);
  color: var(--navy-900);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  place-items: center;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: background 0.2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease);
}
.nav-toggle span::before {
  top: -6px;
}
.nav-toggle span::after {
  top: 6px;
}
.nav-open .nav-toggle span {
  background: transparent;
}
.nav-open .nav-toggle span::before {
  transform: translateY(6px) rotate(45deg);
}
.nav-open .nav-toggle span::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: grid;
  }
  .nav-links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px var(--gutter) 24px;
    background: rgba(17, 19, 31, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s var(--ease);
  }
  .nav-open .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav-open .site-header {
    background: rgba(17, 19, 31, 0.97);
  }
  .nav-links a {
    padding: 14px 12px;
    font-size: 17px;
  }
  .nav-links .btn {
    margin: 8px 0 0;
    justify-content: center;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 150px 0 90px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  opacity: 0.6;
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}
.glow--blue {
  width: 520px;
  height: 520px;
  background: var(--blue);
  top: 10%;
  right: 18%;
}
.glow--red {
  width: 420px;
  height: 420px;
  background: var(--red);
  top: -8%;
  right: -6%;
  opacity: 0.22;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 7.2vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 22px 0 24px;
}
.hero h1 .max {
  position: relative;
  display: inline-block;
  color: var(--navy-900);
  padding: 0 0.16em 0 0.3em;
  margin-left: 0.02em;
  z-index: 0;
}
.hero h1 .max::before {
  content: "";
  position: absolute;
  inset: 0.08em 0 0.02em;
  background: var(--red);
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 0.14em 0.14em 0;
  z-index: -1;
}

.hero-lead {
  font-size: clamp(18px, 1.8vw, 21px);
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 36px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--dim);
}
.hero-platforms strong {
  flex-basis: 100%;
  font-family: var(--font-wide);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
}
.hero-platforms span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-platforms span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--blue);
}
.hero-platforms span:nth-child(even)::before {
  background: var(--red);
}

/* Hero visual: logo tiles + code card */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  width: 100%;
  justify-self: end;
}
.hero-mark {
  position: absolute;
  inset: 6% 0 auto 4%;
  width: 92%;
  overflow: visible;
}
.hero-mark .tile {
  transform-box: fill-box;
  transform-origin: center;
}
.hero-mark .tile--blue {
  animation: float-a 7s ease-in-out infinite;
}
.hero-mark .tile--red {
  animation: float-b 7s ease-in-out infinite;
}
@keyframes float-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10px, 12px); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -12px); }
}

.code-card {
  position: absolute;
  left: -4%;
  bottom: 2%;
  width: min(360px, 78%);
  background: rgba(21, 24, 39, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow: hidden;
}
.code-card__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
}
.code-card__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--navy-700);
}
.code-card__bar i:first-child {
  background: var(--red);
}
.code-card__bar i:nth-child(2) {
  background: var(--blue);
}
.code-card__bar em {
  font-style: normal;
  margin-left: auto;
}
.code-card pre {
  margin: 0;
  padding: 14px 16px 16px;
  white-space: pre;
  overflow: hidden;
  color: #c9d1e3;
}
.tok-k { color: var(--red-soft); }
.tok-f { color: var(--blue); }
.tok-s { color: #9be29b; }
.tok-c { color: var(--dim); }
.caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--blue);
  vertical-align: -2px;
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

.ship-chip {
  position: absolute;
  right: 2%;
  bottom: 22%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(21, 24, 39, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.7);
  animation: float-b 6s ease-in-out infinite;
}
.ship-chip b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.18);
}

@media (max-width: 480px) {
  .code-card {
    left: -2%;
    width: 96%;
    font-size: clamp(10px, 3vw, 11.5px);
  }
  .ship-chip {
    top: 10%;
    right: auto;
    bottom: auto;
    left: 0;
  }
}

@media (max-width: 960px) {
  .hero {
    padding-top: 124px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    justify-self: center;
    max-width: 440px;
    margin-top: 8px;
  }
}

/* ---------- Marquee ---------- */

.marquee {
  border-block: 1px solid var(--line);
  background: var(--navy-950);
  overflow: hidden;
  padding: 22px 0;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
.marquee__group {
  display: flex;
  align-items: center;
  gap: 48px;
  padding-right: 48px;
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--text);
}
.marquee__item::after {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--blue);
  clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
  border-radius: 2px;
}
.marquee__item:nth-child(even)::after {
  background: var(--red);
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(80px, 11vw, 140px) 0;
  position: relative;
}
.section--alt {
  background: var(--navy-950);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

/* ---------- Work ---------- */

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

.project {
  --accent: var(--blue);
  --accent-2: var(--blue-deep);
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  background: var(--navy-850);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.project:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent) 60%, transparent);
}
.project--wide {
  grid-column: span 3;
}

.project__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%),
    radial-gradient(80% 70% at 0% 100%, color-mix(in srgb, var(--accent-2) 32%, transparent), transparent 65%),
    var(--navy-800);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.project__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%);
  pointer-events: none;
}
.project__art {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template: 100% / 100%;
  place-items: center;
  transition: transform 0.6s var(--ease);
}
.project:hover .project__art {
  transform: scale(1.05);
}

/* App icons (Comms Games, InSightME) */
.project__icon {
  width: 38%;
  max-width: 150px;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.55));
  transition: transform 0.6s var(--ease);
}
.project__icon--round {
  width: 36%;
}
.project:hover .project__icon {
  transform: rotate(-4deg);
}

/* BloopCade: three Bloops on stage */
.art-bloops {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 9%;
}
.art-bloops::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 8%;
  height: 10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.45), transparent);
}
.bloop {
  position: relative;
  width: 30%;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.35));
  transition: transform 0.5s var(--ease);
}
.bloop--c {
  width: 36%;
  z-index: 2;
  margin: 0 -7%;
}
.bloop--l {
  transform: rotate(-6deg);
}
.bloop--r {
  transform: rotate(6deg);
}
.project:hover .bloop--l {
  transform: translateY(-8px) rotate(-10deg);
}
.project:hover .bloop--c {
  transform: translateY(-14px);
}
.project:hover .bloop--r {
  transform: translateY(-8px) rotate(10deg);
}

/* Kelly Print Co: squirmies */
.squirmie {
  position: absolute;
  width: 46%;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.5));
  transition: transform 0.6s var(--ease);
}
.art-squirmies::before {
  content: "";
  position: absolute;
  inset: 10% 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(246, 239, 225, 0.22), transparent);
}
.squirmie--dog {
  left: 1%;
  top: 20%;
  width: 40%;
}
.squirmie--gecko {
  right: -1%;
  top: 20%;
  width: 42%;
}
.squirmie--dolphin {
  left: 31%;
  top: 4%;
  width: 38%;
  z-index: 2;
}
.project:hover .squirmie--dog {
  transform: rotate(-8deg) translateX(-4px);
}
.project:hover .squirmie--gecko {
  transform: rotate(8deg) translateX(4px);
}
.project:hover .squirmie--dolphin {
  transform: translateY(-8px) rotate(-6deg);
}

/* Smart Spool illustration */
.art-spool svg {
  width: 84%;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.45));
}
.spool-waves path {
  animation: wave 2.4s ease-in-out infinite;
}
.spool-waves path:nth-child(2) {
  animation-delay: 0.25s;
}
.spool-waves path:nth-child(3) {
  animation-delay: 0.5s;
}
@keyframes wave {
  0%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}
.spool-led {
  animation: blink 1.6s steps(2) infinite;
}

/* Samsung remote render */
.art-remote img {
  width: auto;
  height: 84%;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.55));
  transform: rotate(-4deg);
  transition: transform 0.6s var(--ease);
}
.project:hover .art-remote img {
  transform: rotate(-8deg) translateY(-4px);
}

.project__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 24px 26px;
}
.project__tag {
  font-family: var(--font-wide);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.project__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 8px 0 10px;
}
.project__desc {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.project__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: auto 0 0;
}
.project__stack li {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
.project__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
}
.project__link svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--accent);
  transition: transform 0.25s var(--ease);
}
.project__link:hover svg {
  transform: translate(2px, -2px);
}
.project__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}
.project__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--dim);
}
.project__status svg {
  flex: none;
  width: 15px;
  height: 15px;
}

@media (max-width: 1020px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project,
  .project--wide {
    grid-column: span 1;
  }
}
@media (max-width: 640px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.service {
  position: relative;
  padding: 34px 30px 36px;
  background: var(--navy-950);
  transition: background 0.3s;
}
.service:hover {
  background: var(--navy-850);
}
.service__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(58, 182, 255, 0.12);
  color: var(--blue);
  margin-bottom: 22px;
}
.service:nth-child(even) .service__icon {
  background: rgba(255, 0, 0, 0.12);
  color: var(--red-soft);
}
.service__icon svg {
  width: 24px;
  height: 24px;
}
.service h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px;
}
.service p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Process ---------- */

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.step {
  position: relative;
  padding: 28px 24px 30px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--navy-850), transparent);
  border: 1px solid var(--line);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 40px;
}
.step:nth-child(even)::before {
  color: var(--red-soft);
}
.step::after {
  content: "";
  position: absolute;
  top: 36px;
  left: 64px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.step h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
}
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

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

/* ---------- About band ---------- */

.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}
.about__badge {
  position: relative;
  max-width: 400px;
  width: 100%;
  justify-self: center;
}
.about__badge img {
  width: 100%;
  animation: float-a 8s ease-in-out infinite;
}
.about__badge::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 182, 255, 0.35), transparent 70%);
  filter: blur(40px);
  z-index: -1;
}
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.stat {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.1;
}
.stat:nth-child(1) b { color: var(--blue); }
.stat:nth-child(2) b { color: var(--red-soft); }
.stat span {
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
  }
  .about__badge {
    max-width: 280px;
  }
}
@media (max-width: 480px) {
  .about__stats {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact ---------- */

.contact {
  position: relative;
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(40px, 7vw, 80px);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(255, 0, 0, 0.28), transparent 55%),
    radial-gradient(80% 120% at 0% 100%, rgba(58, 182, 255, 0.32), transparent 55%),
    var(--navy-850);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}
.contact .section-title {
  font-size: clamp(34px, 5vw, 56px);
}

.contact-form {
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: rgba(10, 11, 19, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 13px 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239aa3b8' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
}
.field select option {
  background: var(--navy-900);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(58, 182, 255, 0.18);
}
.contact-form .btn {
  justify-self: start;
  margin-top: 6px;
}
.form-note {
  font-size: 13px;
  color: var(--dim);
  margin: 0;
}

.contact-points {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 14px;
}
.contact-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
}
.contact-points svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--blue);
  margin-top: 2px;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 12px 18px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s;
}
.contact-email:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
}
.contact-email span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.contact-email svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--red-soft);
}

@media (max-width: 900px) {
  .contact {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .contact {
    padding: 36px 20px;
  }
  .contact-email {
    padding: 12px 16px;
    font-size: 15.5px;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--navy-950);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
}
.footer-tagline {
  margin: 14px 0 0;
  font-family: var(--font-wide);
  font-size: 12.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links a {
  color: var(--muted);
  font-size: 15px;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--text);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--dim);
}

/* ==========================================================================
   Motion layer — intro choreography, cursor effects, scroll effects.
   JS adds .js to <html>; everything degrades to static without it.
   ========================================================================== */

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* Film grain for depth */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), #8a7dff 50%, var(--red));
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  pointer-events: none;
}

/* Header tucks away while scrolling down */
.site-header.is-hidden {
  transform: translateY(-100%);
}
.nav-open .site-header.is-hidden {
  transform: none;
}

/* Sliding indicator under the active nav link */
.nav-indicator {
  display: none;
}
@media (min-width: 861px) {
  .nav-links {
    position: relative;
    isolation: isolate;
  }
  .nav-indicator {
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    z-index: -1;
    width: var(--w, 0);
    height: 38px;
    margin-top: -19px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 0 1px var(--line);
    transform: translateX(var(--x, 0));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s var(--ease), width 0.5s var(--ease), opacity 0.3s;
  }
  .nav-indicator.is-on {
    opacity: 1;
  }
}
.nav-links a.is-active {
  color: var(--text);
}

/* Button shine */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease);
  pointer-events: none;
}
.btn--ghost::after {
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.12) 50%, transparent 65%);
}
.btn:hover::after {
  transform: translateX(120%);
}

/* Split headings: words rise out of a mask */
.reveal[data-split].is-split {
  opacity: 1;
  transform: none;
}
.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.word__inner {
  display: inline-block;
  transform: translateY(108%) rotate(3deg);
  transform-origin: 0 100%;
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--d, 0s) + var(--i, 0) * 45ms);
}
.is-visible[data-split] .word__inner,
.is-visible [data-split] .word__inner {
  transform: none;
}

/* Hero "max." — tile wipes in, then a shine passes over it */
.is-split .max::before {
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.8s var(--ease) calc(var(--d, 0s) + 0.55s);
}
.is-visible.is-split .max::before {
  transform: none;
}
.is-split .max::after {
  content: "";
  position: absolute;
  inset: 0.08em 0 0.02em;
  z-index: -1;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 0.14em 0.14em 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.6) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%;
  background-position: 130% 0;
  pointer-events: none;
}
.is-visible.is-split .max::after {
  animation: shine 1.3s var(--ease) calc(var(--d, 0s) + 1.35s) both;
}
@keyframes shine {
  from { background-position: 130% 0; }
  to { background-position: -30% 0; }
}

/* Eyebrow marker draws in */
.js .eyebrow::before {
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.8s var(--ease) calc(var(--d, 0s) + 0.15s);
}
.js .eyebrow.is-visible::before,
.js .is-visible .eyebrow::before {
  transform: none;
}

/* Hero: logo tiles fly in from opposite sides */
.tile-in {
  transform-box: fill-box;
  transform-origin: center;
}
.tile-in--blue {
  animation: tile-in-blue 1.3s var(--ease) 0.35s both;
}
.tile-in--red {
  animation: tile-in-red 1.3s var(--ease) 0.5s both;
}
@keyframes tile-in-blue {
  from { opacity: 0; transform: translate(-170px, 90px) rotate(-18deg) scale(0.7); }
}
@keyframes tile-in-red {
  from { opacity: 0; transform: translate(170px, -90px) rotate(18deg) scale(0.7); }
}

/* Hero: drifting glows + grid that lights up under the cursor */
.glow--blue {
  animation: drift-a 16s ease-in-out infinite alternate;
}
.glow--red {
  animation: drift-b 20s ease-in-out infinite alternate;
}
@keyframes drift-a {
  to { transform: translate(-70px, 60px) scale(1.15); }
}
@keyframes drift-b {
  to { transform: translate(50px, 70px) scale(0.88); }
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(58, 182, 255, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 182, 255, 0.4) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(260px circle at var(--hx, 50%) var(--hy, 50%), #000, transparent 70%);
  -webkit-mask-image: radial-gradient(260px circle at var(--hx, 50%) var(--hy, 50%), #000, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s;
}
.hero.is-pointer .hero-bg::after {
  opacity: 1;
}

/* Hero: build → deploy status chip */
.ship-chip {
  transition: opacity 0.5s var(--ease), scale 0.5s var(--ease);
}
.ship-chip[data-state="idle"] {
  opacity: 0;
  scale: 0.85;
}
.ship-chip__text {
  transition: opacity 0.2s;
}
.ship-chip.is-swapping .ship-chip__text {
  opacity: 0;
}
.ship-chip[data-state="building"] b {
  background: #ffb627;
  box-shadow: 0 0 0 4px rgba(255, 182, 39, 0.18);
  animation: pulse-dot 0.9s ease-in-out infinite;
}
.ship-chip[data-state="done"] b {
  animation: done-ring 1.1s var(--ease);
}
@keyframes pulse-dot {
  50% { transform: scale(0.55); opacity: 0.6; }
}
@keyframes done-ring {
  from { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.7); }
  to { box-shadow: 0 0 0 14px rgba(61, 220, 132, 0); }
}
.code-card pre.is-typing .caret {
  animation: none;
}

/* Marquee fades out at the edges */
.marquee {
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

/* Project cards: media wipes open, art settles, cursor spotlight + glowing border */
.js .project.reveal .project__media {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease) calc(var(--d, 0s) + 0.1s);
}
.js .project.reveal.is-visible .project__media {
  clip-path: inset(0 0 0 0);
}
.project.is-visible .project__art {
  animation: art-settle 1.6s var(--ease) calc(var(--d, 0s) + 0.1s) backwards;
}
@keyframes art-settle {
  from { transform: scale(1.2); }
}
.project__art {
  transition: transform 0.6s var(--ease), translate 0.5s var(--ease);
}
.project.is-settled {
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.project::before,
.project::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.project::before {
  z-index: 1;
  background: radial-gradient(
    420px circle at var(--px, 50%) var(--py, 50%),
    color-mix(in srgb, var(--accent) 12%, transparent),
    transparent 60%
  );
}
.project::after {
  z-index: 3;
  padding: 1px;
  background: radial-gradient(280px circle at var(--px, 50%) var(--py, 50%), var(--accent), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.project:hover::before,
.project:hover::after {
  opacity: 1;
}

/* Services: cursor spotlight + icon lift */
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(360px circle at var(--px, 50%) var(--py, 50%), rgba(58, 182, 255, 0.11), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
.service:nth-child(even)::before {
  background: radial-gradient(360px circle at var(--px, 50%) var(--py, 50%), rgba(255, 0, 0, 0.1), transparent 60%);
}
.service:hover::before {
  opacity: 1;
}
.service > * {
  position: relative;
}
.service__icon {
  transition: transform 0.5s var(--ease), box-shadow 0.5s;
}
.service:hover .service__icon {
  transform: translateY(-4px) rotate(-6deg);
  box-shadow: 0 12px 24px -10px currentColor;
}

/* Process: connector lines draw in; cards lift on hover */
.js .step::after {
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.2s var(--ease) calc(var(--d, 0s) + 0.35s);
}
.js .step.is-visible::after {
  transform: none;
}
.step:hover {
  border-color: var(--line-strong);
}

/* About badge tilts toward the cursor once revealed */
.about__badge.is-settled {
  transition: transform 0.4s var(--ease);
}

/* Contact: rotating gradient border */
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: conic-gradient(from var(--angle), transparent 0 55%, var(--blue) 72%, var(--red) 88%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin-border 7s linear infinite;
}
@keyframes spin-border {
  to { --angle: 360deg; }
}

/* Footer links: underline grows from the left */
.footer-links a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: color 0.2s, background-size 0.35s var(--ease);
}
.footer-links a:hover {
  background-size: 100% 1px;
}

@media (prefers-reduced-motion: reduce) {
  .word__inner,
  .is-split .max::before,
  .js .eyebrow::before,
  .js .step::after {
    transform: none !important;
  }
  .js .project.reveal .project__media {
    clip-path: none !important;
  }
  .ship-chip[data-state] {
    opacity: 1;
    scale: 1;
  }
  .scroll-progress,
  .contact::before,
  .hero-bg::after {
    display: none;
  }
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
