/* ==========================================================================
   Model Softwares — Premium Design System
   Palette: Tech Navy / Electric Cyan / Carbon Grey / Pure White
   Fonts: Inter (body) + JetBrains Mono (accents)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ---------- custom properties ---------- */
:root {
  /* Brand palette */
  --tech-navy:      #0d2146;
  --electric-cyan:  #36cff0;
  --carbon-grey:    #1e2535;
  --pure-white:     #ffffff;

  /* Extended palette */
  --navy-deep:      #070f1f;
  --navy-mid:       #0a1a36;
  --navy-soft:      #122c5a;
  --navy-glass:     rgba(13, 33, 70, 0.72);
  --cyan-dim:       rgba(54, 207, 240, 0.18);
  --cyan-glow:      rgba(54, 207, 240, 0.35);
  --cyan-bright:    #5ddaf4;
  --grey-line:      rgba(255, 255, 255, 0.08);
  --grey-line-mid:  rgba(255, 255, 255, 0.14);
  --text-muted:     rgba(255, 255, 255, 0.60);
  --text-faint:     rgba(255, 255, 255, 0.38);
  --error:          #ff6b6b;

  /* Typography */
  --font:      'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Layout */
  --wrap:       1200px;
  --section-y:  120px;
  --radius:     8px;
  --radius-lg:  14px;
  --radius-xl:  20px;

  /* Shadows */
  --shadow-sm:  0 4px 16px rgba(0, 0, 0, 0.24);
  --shadow:     0 16px 40px rgba(0, 0, 0, 0.36);
  --shadow-lg:  0 32px 64px rgba(0, 0, 0, 0.48);
  --shadow-cyan: 0 0 32px rgba(54, 207, 240, 0.20);

  /* Transitions */
  --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--pure-white);
  background: var(--tech-navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a {
  color: var(--electric-cyan);
  text-decoration: none;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}
a:hover { color: var(--cyan-bright); }

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.25rem); }
h4 { font-size: 0.9rem; }

p { margin: 0 0 1.1em; color: var(--text-muted); }

ul { margin: 0; padding: 0; list-style: none; }

/* ---------- scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  z-index: 200;
  transform-origin: left;
  transform: scaleX(0);
}

.scroll-progress::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--electric-cyan), var(--cyan-bright));
  box-shadow: 0 0 12px var(--electric-cyan);
}

/* ---------- layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: var(--section-y) 0;
  position: relative;
  overflow: hidden;
}

.section--dark    { background: var(--navy-mid); }
.section--deeper  { background: var(--navy-deep); }
.section--carbon  { background: var(--carbon-grey); }

.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}

.section-head--center {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- eyebrow / labels ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--electric-cyan);
}

.eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--electric-cyan);
  opacity: 0.7;
}

.lead {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ---------- grid system ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- decorative backgrounds ---------- */
.grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grey-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grey-line) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.6;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 72%);
}

.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease-spring),
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97) !important; }

.btn--primary {
  background: var(--electric-cyan);
  color: var(--tech-navy);
  box-shadow: 0 0 0 0 var(--cyan-glow);
}

.btn--primary:hover {
  background: var(--cyan-bright);
  color: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-cyan);
}

.btn--ghost {
  border-color: var(--grey-line-mid);
  color: var(--pure-white);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(4px);
}

.btn--ghost:hover {
  border-color: var(--electric-cyan);
  color: var(--electric-cyan);
  transform: translateY(-2px);
  background: var(--cyan-dim);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 0.84rem;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--electric-cyan);
  letter-spacing: 0.01em;
  transition: gap 0.2s var(--ease), color 0.2s var(--ease);
}

.link-more:hover {
  gap: 14px;
  color: var(--cyan-bright);
}

/* ---------- header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 15, 31, 0.75);
  border-bottom: 1px solid var(--grey-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header.scrolled {
  background: rgba(7, 15, 31, 0.92);
  border-bottom-color: var(--grey-line-mid);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--pure-white);
  font-weight: 700;
  letter-spacing: -0.015em;
  flex-shrink: 0;
}

.brand:hover { color: var(--pure-white); }

.brand img {
  width: 80px;
  height: auto;
  object-fit: contain;
}

.brand span small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--pure-white);
  background: rgba(255,255,255,0.06);
}

.nav-links a.is-active {
  color: var(--electric-cyan);
  background: var(--cyan-dim);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-actions .login {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-actions .login:hover {
  color: var(--pure-white);
  background: rgba(255,255,255,0.06);
}

.nav-actions .btn { padding: 9px 20px; font-size: 0.86rem; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 36px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--grey-line-mid);
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--pure-white);
  border-radius: 2px;
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  display: none;
  overflow: hidden;
  max-height: 0;
  border-top: 1px solid transparent;
  background: rgba(7, 15, 31, 0.97);
  transition: max-height 0.4s var(--ease-out), border-color 0.3s var(--ease);
  backdrop-filter: blur(16px);
}

.mobile-menu.is-open {
  max-height: 500px;
  border-top-color: var(--grey-line);
}

.mobile-menu ul { padding: 16px 24px 24px; }

.mobile-menu li + li { border-top: 1px solid var(--grey-line); }

.mobile-menu a {
  display: block;
  padding: 14px 0;
  color: var(--text-muted);
  font-size: 0.96rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.mobile-menu a:hover,
.mobile-menu a.is-active { color: var(--electric-cyan); }

.mobile-menu .wrap { padding-bottom: 24px; }

.mobile-menu .btn {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--navy-deep);
  overflow: hidden;
}

.hero__canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Static fallback gradient (shown when 3D not loaded or not supported) */
.hero__fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(54, 207, 240, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(18, 44, 90, 0.6) 0%, transparent 60%);
  z-index: 0;
}

.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 40%, var(--navy-deep) 100%),
    linear-gradient(to bottom, transparent 60%, var(--navy-deep) 100%);
}

.hero .grid-lines {
  z-index: 1;
  opacity: 0.3;
}

.hero .wrap {
  position: relative;
  z-index: 2;
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero__inner {
  max-width: 820px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--electric-cyan);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.hero__eyebrow.is-visible { opacity: 1; transform: none; }

.hero__eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--electric-cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.6); }
}

.hero__cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--electric-cyan);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero h1 {
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out) 0.1s, transform 0.7s var(--ease-out) 0.1s;
}

.hero h1.is-visible { opacity: 1; transform: none; }

.hero h1 .accent { color: var(--electric-cyan); }

.hero__sub {
  max-width: 560px;
  font-size: 1.12rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out) 0.2s, transform 0.7s var(--ease-out) 0.2s;
}

.hero__sub.is-visible { opacity: 1; transform: none; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 64px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out) 0.32s, transform 0.6s var(--ease-out) 0.32s;
}

.hero__cta.is-visible { opacity: 1; transform: none; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding-top: 32px;
  border-top: 1px solid var(--grey-line);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease-out) 0.44s, transform 0.6s var(--ease-out) 0.44s;
}

.hero__meta.is-visible { opacity: 1; transform: none; }

.hero__meta-item {
  padding: 0 32px 0 0;
}

.hero__meta-item + .hero__meta-item {
  padding-left: 32px;
  border-left: 1px solid var(--grey-line-mid);
}

.hero__meta-item strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pure-white);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}

.hero__meta-item span {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  padding: 100px 0 80px;
  background: var(--navy-deep);
  border-bottom: 1px solid var(--grey-line);
  overflow: hidden;
}

.page-hero .grid-lines { opacity: 0.4; }

.page-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 740px;
}

.page-hero__inner .eyebrow { margin-bottom: 16px; }

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 20px;
}

.page-hero p {
  font-size: 1.08rem;
  font-weight: 300;
  max-width: 560px;
}

/* ---------- cards ---------- */
.card {
  position: relative;
  padding: 32px 28px;
  background: var(--carbon-grey);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-lg);
  transition:
    transform 0.3s var(--ease-spring),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--electric-cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(54, 207, 240, 0.25);
  box-shadow: var(--shadow), 0 0 40px rgba(54, 207, 240, 0.06);
}

.card:hover::before { opacity: 1; }

.card p { font-size: 0.94rem; }

/* Card sweep effect */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(54,207,240,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.card:hover::after { opacity: 1; }

/* Service card specifics */
.card__num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border: 1px solid var(--cyan-glow);
  border-radius: var(--radius);
  color: var(--electric-cyan);
  background: var(--cyan-dim);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card:hover .card__icon {
  background: rgba(54, 207, 240, 0.22);
  border-color: var(--electric-cyan);
  box-shadow: 0 0 20px rgba(54, 207, 240, 0.2);
}

.card__icon svg { width: 20px; height: 20px; }

/* ---------- philosophy ---------- */
.philosophy__quote {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  max-width: 780px;
}

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

.principle {
  padding: 28px 0 28px 28px;
  border-left: 2px solid var(--cyan-dim);
  transition: border-color 0.3s var(--ease);
}

.principle:hover { border-left-color: var(--electric-cyan); }

.principle h3 { margin-bottom: 10px; font-size: 1.05rem; }
.principle p { margin: 0; font-size: 0.92rem; }

/* ---------- process ---------- */
.process {
  position: relative;
  border-top: 1px solid var(--grey-line);
}

/* Animated line between steps */
.process__line {
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--grey-line);
  pointer-events: none;
}

.process__line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to bottom, var(--electric-cyan), transparent);
  height: 0%;
  transition: height 1.2s var(--ease-out);
}

.process__item {
  position: relative;
  padding: 36px 0 36px 52px;
  border-bottom: 1px solid var(--grey-line);
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: start;
  gap: 24px;
  transition: background 0.3s var(--ease);
}

.process__item:hover { background: rgba(255,255,255,0.015); }

.process__dot {
  position: absolute;
  left: 10px;
  top: 40px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--electric-cyan);
  background: var(--navy-deep);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.process__item:hover .process__dot {
  background: var(--electric-cyan);
  box-shadow: 0 0 16px var(--electric-cyan);
}

.process__label {
  padding-top: 4px;
}

.process__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--electric-cyan);
  margin-bottom: 8px;
}

.process__item h3 { margin: 0 0 6px; font-size: 1.1rem; }
.process__item p { margin: 0; font-size: 0.92rem; }

/* ---------- work / projects ---------- */
.project {
  overflow: hidden;
  padding: 0;
  background: var(--carbon-grey);
  cursor: pointer;
}

.project__thumb {
  aspect-ratio: 16 / 10;
  background: var(--navy-mid);
  border-bottom: 1px solid var(--grey-line);
  overflow: hidden;
  position: relative;
}

.project__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

/* Hover overlay */
.project__overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 15, 31, 0.82);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.project__overlay span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--electric-cyan);
  border: 1px solid var(--cyan-glow);
  padding: 8px 18px;
  border-radius: var(--radius);
  transform: translateY(8px);
  transition: transform 0.35s var(--ease-spring);
}

.project:hover .project__thumb img { transform: scale(1.06); }
.project:hover .project__overlay { opacity: 1; }
.project:hover .project__overlay span { transform: none; }

.project__body { padding: 26px 26px 30px; }

.project__cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--electric-cyan);
}

.project__body h3 { margin: 10px 0 8px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}

.filter {
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--grey-line);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.filter:hover {
  border-color: var(--electric-cyan);
  color: var(--electric-cyan);
  background: var(--cyan-dim);
}

.filter.is-active {
  background: var(--electric-cyan);
  border-color: var(--electric-cyan);
  color: var(--tech-navy);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(54, 207, 240, 0.3);
}

.project[hidden] { display: none; }

/* Project detail panel */
.project-detail {
  display: none;
  margin-top: 40px;
  padding: 40px;
  background: var(--carbon-grey);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-xl);
  animation: slide-down 0.4s var(--ease-out);
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: none; }
}

.project-detail.is-open { display: block; }

.project-detail__close {
  float: right;
  padding: 7px 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.project-detail__close:hover {
  color: var(--pure-white);
  border-color: var(--grey-line-mid);
}

.project-detail h3 {
  margin-bottom: 4px;
  font-size: 1.4rem;
}

.project-detail__cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--electric-cyan);
  display: block;
  margin-bottom: 20px;
}

.project-detail__scope-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
  margin: 20px 0 10px;
}

.project-detail__scope li {
  padding: 5px 0 5px 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  position: relative;
}

.project-detail__scope li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--electric-cyan);
  transform: rotate(45deg);
}

/* ---------- technologies ---------- */
.tech-col h3 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--electric-cyan);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--grey-line);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  display: inline-block;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--grey-line);
  border-radius: 4px;
  transition: all 0.2s var(--ease);
  cursor: default;
}

.tech-tag:hover {
  color: var(--electric-cyan);
  border-color: var(--cyan-glow);
  background: var(--cyan-dim);
}

/* ---------- service blocks (services page) ---------- */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 64px 0;
  border-top: 1px solid var(--grey-line);
  align-items: start;
}

.service-block:last-of-type { border-bottom: 1px solid var(--grey-line); }

.service-block__head {}

.service-block h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-bottom: 16px;
}

.checklist { margin-top: 24px; }

.checklist li {
  position: relative;
  padding: 7px 0 7px 26px;
  font-size: 0.92rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--grey-line);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.checklist li:first-child { border-top: 1px solid var(--grey-line); }

.checklist li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 16px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--electric-cyan);
  transform: rotate(45deg);
  transition: background 0.2s var(--ease);
}

.checklist li.is-visible::before { background: var(--cyan-dim); }

.value-note {
  margin-top: 28px;
  padding: 20px 22px;
  background: rgba(54, 207, 240, 0.05);
  border-left: 2px solid var(--electric-cyan);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.value-note p { margin: 0; font-size: 0.92rem; }

/* ---------- CTA section ---------- */
.cta {
  position: relative;
  padding: 120px 0;
  background: var(--navy-deep);
  overflow: hidden;
  text-align: center;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(54, 207, 240, 0.06) 0%, transparent 70%);
  animation: aurora-pulse 8s ease-in-out infinite;
}

@keyframes aurora-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.1); }
}

.cta .grid-lines { opacity: 0.3; }

.cta__inner {
  position: relative;
  z-index: 2;
  max-width: 660px;
  margin: 0 auto;
}

.cta__inner h2 { margin-bottom: 16px; }
.cta__inner p { margin-bottom: 36px; font-size: 1.06rem; }

/* ---------- contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.form {
  padding: 40px;
  background: var(--carbon-grey);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-xl);
}

.field {
  margin-bottom: 22px;
  position: relative;
}

.field label {
  display: block;
  margin-bottom: 9px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color 0.2s var(--ease);
}

.field:focus-within label { color: var(--electric-cyan); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font);
  font-size: 0.94rem;
  color: var(--pure-white);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--grey-line-mid);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  -webkit-appearance: none;
}

.field textarea { min-height: 150px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--electric-cyan);
  box-shadow: 0 0 0 3px rgba(54, 207, 240, 0.12);
}

.field select option { background: #1e2535; color: var(--pure-white); }

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--error); }

.error-msg {
  display: none;
  margin-top: 6px;
  font-size: 0.78rem;
  color: #ff8f8f;
  font-family: var(--font-mono);
}

.field.has-error .error-msg { display: block; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-status {
  display: none;
  margin-top: 20px;
  padding: 16px 18px;
  background: rgba(54, 207, 240, 0.08);
  border-left: 2px solid var(--electric-cyan);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-status.is-visible { display: block; }

.contact-info li {
  padding: 18px 0;
  border-bottom: 1px solid var(--grey-line);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-info__icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--grey-line-mid);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--electric-cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-info__icon svg { width: 15px; height: 15px; }

.contact-info__text strong {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.contact-info__text span {
  font-size: 0.94rem;
  color: var(--text-muted);
}

/* ---------- about page specifics ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--grey-line);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 64px;
}

.stat-item {
  padding: 36px 28px;
  background: var(--carbon-grey);
  text-align: center;
}

.stat-item__value {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--pure-white);
  line-height: 1;
  letter-spacing: -0.04em;
  display: block;
  margin-bottom: 8px;
}

.stat-item__value .accent { color: var(--electric-cyan); }

.stat-item__label {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.team-placeholder {
  padding: 56px 40px;
  background: var(--carbon-grey);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius-xl);
  text-align: center;
}

.team-placeholder p { max-width: 480px; margin: 0 auto 28px; }

/* ---------- footer ---------- */
.site-footer {
  padding: 80px 0 36px;
  background: var(--navy-deep);
  border-top: 1px solid var(--grey-line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--grey-line);
}

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.footer-grid li { padding: 4px 0; }

.footer-grid li a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

.footer-grid li a:hover { color: var(--electric-cyan); }

.footer-about .brand { margin-bottom: 18px; }
.footer-about p { font-size: 0.92rem; font-weight: 300; max-width: 300px; }

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  color: var(--text-faint);
  transition: all 0.2s var(--ease);
}

.footer-social a:hover {
  border-color: var(--electric-cyan);
  color: var(--electric-cyan);
  background: var(--cyan-dim);
}

.footer-social svg { width: 15px; height: 15px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 28px;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.footer-bottom .mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  :root { --section-y: 88px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --section-y: 72px; }
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: block; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; gap: 36px; }
  .service-block { grid-template-columns: 1fr; gap: 32px; }
  .process__item { grid-template-columns: 1fr; gap: 6px; padding-left: 44px; }
  .hero__meta-item + .hero__meta-item { padding-left: 24px; border-left-color: var(--grey-line); }
  .hero__meta-item { padding-right: 24px; }
}

@media (max-width: 640px) {
  :root { --section-y: 60px; --wrap: 100%; }
  .wrap { padding: 0 20px; }
  .hero { min-height: 100dvh; }
  .hero .wrap { padding-top: 60px; padding-bottom: 60px; }
  .grid--2, .grid--3, .grid--4, .form-row { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .hero__meta { flex-direction: column; gap: 16px; }
  .hero__meta-item { padding: 0 !important; border-left: none !important; }
  .hero__meta-item + .hero__meta-item { border-top: 1px solid var(--grey-line-mid); padding-top: 16px !important; }
  .form { padding: 24px 20px; }
  .project-detail { padding: 24px 20px; }
  .page-hero { padding: 72px 0 56px; }
  .process__item { padding-left: 36px; }
  .brand img { width: 56px; }
}

/* ---------- 3D card tilt ---------- */
/*
 * The tilt transform is applied directly to .card via JS inline style.
 * We only need CSS to:
 *   1. Set perspective on the parent container (done via JS wrapper class)
 *   2. Define the shine pseudo-element that slides with the tilt
 *   3. Ensure will-change is set for GPU promotion during hover
 */

.card {
  /* already defined above — add tilt-specific properties */
  will-change: transform;
  transform-style: preserve-3d;
}

/* Shine layer — shifts position via JS custom properties */
.card .card-shine {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  pointer-events: none;
  background: radial-gradient(
    circle at var(--shine-x, 50%) var(--shine-y, 0%),
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.04) 40%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: 3;
}

.card.is-tilting .card-shine { opacity: 1; }

/* Reset transition only while actively tilting (JS adds/removes is-tilting) */
.card.is-tilting {
  transition:
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
    /* NO transform transition while tilting — must follow mouse instantly */
}

/* Suppress CSS hover lift while JS tilt is controlling transform */
.card.is-tilting,
.card.tilt-return {
  /* transform handled entirely by JS inline style */
}

/* Spring-back when mouse leaves */
.card.tilt-return {
  transition:
    transform 0.6s var(--ease-spring),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

/* ---------- CTA canvas ---------- */
.cta__canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.cta__canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}

/* When loaded, JS sets opacity:1 */
.cta__canvas-wrap canvas.is-loaded {
  opacity: 1;
}

/* CTA aurora pulse — shown when canvas not loaded (fallback) */
.cta.canvas-active::before {
  /* Suppress CSS aurora once real canvas is showing */
  animation: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* ---------- responsive: disable tilt on touch / small screens ---------- */
@media (hover: none) {
  .card { will-change: auto; }
  .card .card-shine { display: none; }
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .hero__eyebrow, .hero h1, .hero__sub, .hero__cta, .hero__meta {
    opacity: 1 !important;
    transform: none !important;
  }
  .cta::before { animation: none; }
  @keyframes aurora-pulse { from, to { opacity: 0.6; transform: scale(1); } }
  .card.is-tilting, .card.tilt-return { transform: none !important; }
  .card .card-shine { display: none; }
}
