/* ==========================================================================
   SphereAxis Lab — design tokens
   ========================================================================== */
:root {
  --bg: #07070B;
  --surface: #0E0F16;
  --surface-2: #14151F;
  --line: #1C1E29;
  --line-soft: #15161F;

  --indigo: #4B3CF5;
  --blue: #3D6BFF;
  --cyan: #42E8E0;

  --text: #F4F5F8;
  --text-dim: #9799A8;
  --text-faint: #5B5D6B;

  --gradient: linear-gradient(135deg, var(--indigo), var(--blue) 55%, var(--cyan));
  --gradient-soft: linear-gradient(135deg, rgba(75,60,245,.16), rgba(66,232,224,.10));

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22,1,.36,1);
  --ease-soft: cubic-bezier(.16,.84,.44,1);

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 64px);

  color-scheme: dark;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.no-webgl {
  background:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(75,60,245,.16), transparent 60%),
    radial-gradient(ellipse 60% 45% at 85% 30%, rgba(66,232,224,.12), transparent 60%),
    var(--bg);
}

html.preloading, html.preloading body { overflow: hidden; height: 100%; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
input, textarea { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

::selection { background: var(--indigo); color: #fff; }

/* Focus states — one cohesive treatment everywhere */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 1000;
  background: var(--cyan);
  color: #04141F;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ==========================================================================
   Preloader
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
  /* Safety net: force-hide even if JS never runs (blocked/broken script) */
  animation: preloaderForceHide 0s linear 4s forwards;
}
.preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes preloaderForceHide {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

.preloader-mark { color: var(--cyan); }
.preloader-ring--track { stroke: var(--line); }
.preloader-ring--draw {
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-dasharray: 251;
  stroke-dashoffset: 251;
  transform-origin: 60px 60px;
  animation: preloaderDraw 1.1s var(--ease-soft) infinite;
}
@keyframes preloaderDraw {
  0% { stroke-dashoffset: 251; transform: rotate(0deg); }
  50% { stroke-dashoffset: 40; }
  100% { stroke-dashoffset: 251; transform: rotate(360deg); }
}

/* ==========================================================================
   Persistent 3D scene
   ========================================================================== */
.webgl-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  display: block;
}
body.no-webgl .webgl-scene { display: none; }

/* ==========================================================================
   Texture — grain
   ========================================================================== */
.grain {
  position: fixed;
  inset: 0;
  z-index: 998;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Custom cursor
   ========================================================================== */
.cursor-dot, .cursor-ring { display: none; }

@media (hover: hover) and (pointer: fine) {
  body.has-cursor { cursor: none; }
  body.has-cursor a, body.has-cursor button { cursor: none; }

  .cursor-dot, .cursor-ring {
    display: block;
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999;
    transform: translate3d(-50%, -50%, 0);
    will-change: transform;
  }
  .cursor-dot {
    width: 6px; height: 6px;
    background: var(--cyan);
  }
  .cursor-ring {
    width: 34px; height: 34px;
    border: 1px solid rgba(244,245,248,.35);
    transition: width .25s var(--ease), height .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
  }
  .cursor-ring.is-active {
    width: 56px; height: 56px;
    border-color: var(--cyan);
    background: rgba(66,232,224,.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring { display: none !important; }
  body.has-cursor { cursor: auto; }
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.section-head {
  max-width: 620px;
  margin: 0 0 clamp(32px, 5vw, 56px);
  padding: 0 var(--gutter);
}
.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 12px;
}
.section-head p {
  color: var(--text-dim);
  font-size: 1.0625rem;
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(7,7,11,.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 13px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand-mark { border-radius: 8px; flex: none; filter: drop-shadow(0 0 14px rgba(66,232,224,.25)); }
.footer-brand .brand-mark { filter: none; }
.brand-lab {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  font-size: .95rem;
}
.nav-links a:not(.nav-cta) {
  position: relative;
  color: var(--text-dim);
  transition: color .2s var(--ease);
}
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 1px;
  background: var(--cyan);
  transition: right .3s var(--ease);
}
.nav-links a:not(.nav-cta):hover { color: var(--text); }
.nav-links a:not(.nav-cta):hover::after { right: 0; }

.nav-cta {
  padding: 9px 18px;
  border-radius: 100px;
  background: var(--gradient);
  color: #05070C;
  font-weight: 600;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin: -8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 8px var(--gutter) 24px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.mobile-nav a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.mobile-nav.is-open { display: flex; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: .95rem;
  font-family: var(--font-body);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
  will-change: transform;
}
.btn-primary {
  background: var(--gradient);
  color: #05070C;
  box-shadow: 0 0 0 0 rgba(66,232,224,0);
}
.btn-primary:hover {
  box-shadow: 0 8px 30px -6px rgba(61,107,255,.55);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--text-dim);
  background: rgba(244,245,248,.04);
}
.btn:active { transform: scale(.97); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, transparent 0%, rgba(7,7,11,.55) 75%, var(--bg) 100%),
    linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr min(400px, 36%);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

.hero-title {
  font-size: clamp(2.4rem, 5.4vw, 4.9rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 15ch;
}
.hero-title .line { display: block; }
.hero-title em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 28px;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-dim);
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.js .hero-title .line { clip-path: inset(0 0 100% 0); }
.js .hero-sub, .js .hero-actions { opacity: 0; transform: translateY(18px); }

.hero-visual {
  position: relative;
  height: 460px;
}
.hero-visual #heroMockup {
  position: absolute;
  top: 50%; left: 50%;
  width: 300px;
  transform: translate(-50%, -50%);
}
.hero-visual #heroCard {
  position: absolute;
  bottom: 18%;
  left: -34px;
}
.js .hero-visual { opacity: 0; transform: scale(.94); transition: opacity 1.1s var(--ease-soft) .5s, transform 1.1s var(--ease-soft) .5s; }
.js .hero-visual.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .hero-visual { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Mockup panels — decorative "product" visuals
   ========================================================================== */
.mockup-panel {
  background: linear-gradient(160deg, rgba(20,21,31,.92), rgba(12,13,19,.88));
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02) inset;
  overflow: hidden;
}

.mockup-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.mockup-chrome span:not(.mockup-chrome-label) {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex: none;
}
.mockup-chrome span:nth-child(1) { background: var(--indigo); opacity: .7; }
.mockup-chrome span:nth-child(2) { background: var(--blue); opacity: .7; }
.mockup-chrome span:nth-child(3) { background: var(--cyan); opacity: .7; }
.mockup-chrome-label {
  margin-left: auto;
  font-size: .68rem;
  color: var(--text-faint);
  font-family: var(--font-body);
}

.mockup-body { padding: 18px; }
.mockup-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mockup-avatar { width: 30px; height: 30px; border-radius: 9px; background: var(--gradient); flex: none; }
.mockup-lines { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mockup-line { display: block; height: 6px; border-radius: 4px; background: var(--line); }
.mockup-pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); flex: none;
  animation: mockupPulse 2.2s ease-out infinite;
}
@keyframes mockupPulse {
  0% { box-shadow: 0 0 0 0 rgba(66,232,224,.5); }
  70% { box-shadow: 0 0 0 9px rgba(66,232,224,0); }
  100% { box-shadow: 0 0 0 0 rgba(66,232,224,0); }
}
.mockup-chart { margin: 2px 0 16px; }
.mockup-chart svg { width: 100%; height: 58px; display: block; }
.mockup-chart-line { stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mockup-stats { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; }
.mockup-stat { display: flex; flex-direction: column; gap: 2px; }
.mockup-stat b { font-family: var(--font-display); font-size: .98rem; }
.mockup-stat span { font-size: .68rem; color: var(--text-faint); }

.mockup-panel--card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  width: 220px;
}
.mockup-card-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-soft);
  color: var(--cyan);
  flex: none;
}
.mockup-card-icon svg { width: 17px; height: 17px; }
.mockup-panel--card b { display: block; font-size: .88rem; }
.mockup-panel--card span { display: block; font-size: .72rem; color: var(--text-faint); margin-top: 2px; }

.mockup-panel--code { width: 100%; max-width: 380px; }
.mockup-code {
  padding: 16px 18px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .78rem;
  line-height: 1.7;
  color: var(--text-dim);
  overflow-x: auto;
}
.mockup-code div { white-space: pre; }
.mockup-code .tok-kw { color: #8FA0FF; }
.mockup-code .tok-str { color: var(--cyan); }
.mockup-code .tok-fn { color: #B79CFF; }
.mockup-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--cyan);
  animation: caretBlink 1s step-end infinite;
  vertical-align: -2px;
}
@keyframes caretBlink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .mockup-pulse { animation: none; }
  .mockup-cursor { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .hero-title .line { clip-path: none; }
  .js .hero-sub, .js .hero-actions { opacity: 1; transform: none; }
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 1px;
  height: 56px;
  background: var(--line);
  overflow: hidden;
}
.scroll-cue span {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(var(--cyan), transparent);
  animation: scrollcue 2.2s var(--ease-soft) infinite;
}
@keyframes scrollcue {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue span { animation: none; top: 0; }
}
@media (max-width: 640px) { .scroll-cue { display: none; } }

/* reveal-up (progressive enhancement; JS adds .is-visible) */
.reveal-up {
  opacity: 1;
  transform: none;
}
.js .reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
.js .reveal-up.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal-up { opacity: 1; transform: none; transition: none; }
}

/* section heading wipe-in (JS: GSAP clip-path; CSS just guards pre-JS flash) */
.js .section-head h2 { clip-path: inset(0 0 100% 0); }
@media (prefers-reduced-motion: reduce) {
  .js .section-head h2 { clip-path: none; }
}

/* Cursor-reactive 3D tilt (JS sets/clears inline transform) */
.tilt-card {
  will-change: transform;
}

/* Capabilities marquee */
.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: marqueeScroll 36s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-faint);
  white-space: nowrap;
  padding: 0 clamp(20px, 3vw, 34px);
  position: relative;
}
.marquee-track span::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-faint);
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* ==========================================================================
   Services
   ========================================================================== */
.services {
  position: relative;
  padding: clamp(64px, 10vw, 120px) 0 clamp(40px, 8vw, 90px);
}

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

.service-list {
  border-top: 1px solid var(--line);
}

.service-preview { display: none; }

@media (min-width: 1024px) {
  .services-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 56px;
    align-items: start;
  }
  .service-preview {
    display: block;
    position: sticky;
    top: 110px;
  }
}

.service-preview-card {
  background: linear-gradient(160deg, rgba(20,21,31,.85), rgba(12,13,19,.7));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.preview-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-soft);
  color: var(--cyan);
  margin-bottom: 24px;
  transition: opacity .3s var(--ease);
}
.preview-icon svg { width: 28px; height: 28px; }
.preview-name { font-size: 1.5rem; margin-bottom: 12px; transition: opacity .3s var(--ease); }
.preview-desc { color: var(--text-dim); font-size: .98rem; margin-bottom: 28px; min-height: 4.4em; transition: opacity .3s var(--ease); }
.preview-bars { display: flex; align-items: flex-end; gap: 6px; height: 60px; }
.preview-bars span {
  flex: 1;
  background: var(--gradient);
  opacity: .55;
  border-radius: 3px 3px 0 0;
  height: var(--h);
  transition: height .6s var(--ease-soft);
}
.service-preview-card.is-fading .preview-icon,
.service-preview-card.is-fading .preview-name,
.service-preview-card.is-fading .preview-desc {
  opacity: 0;
}

.service-row {
  display: grid;
  grid-template-columns: 60px 52px 1fr;
  align-items: start;
  gap: clamp(12px, 3vw, 32px);
  padding: clamp(28px, 4vw, 40px) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left .4s var(--ease);
}

.service-index {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-faint);
  transition: color .4s var(--ease);
  padding-top: 4px;
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease-soft);
}
.service-icon svg { width: 20px; height: 20px; }

.service-name {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  margin-bottom: 10px;
  transition: color .3s var(--ease);
}

.service-desc {
  color: var(--text-dim);
  max-width: 56ch;
  font-size: 1.02rem;
}

@media (hover: hover) and (pointer: fine) {
  .service-row:hover { padding-left: 18px; }
  .service-row:hover .service-index {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .service-row:hover .service-icon {
    color: var(--cyan);
    border-color: var(--cyan);
    transform: scale(1.06) rotate(-4deg);
  }
}

.service-row.is-preview-active .service-index {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.service-row.is-preview-active .service-icon {
  color: var(--cyan);
  border-color: var(--cyan);
}

@media (max-width: 640px) {
  .service-row { grid-template-columns: 40px 1fr; gap: 10px 14px; }
  .service-index { grid-row: 1; }
  .service-icon { grid-row: 1; }
  .service-body { grid-column: 1 / -1; }
}

/* ==========================================================================
   Process
   ========================================================================== */
.process {
  padding: clamp(52px, 8vw, 90px) 0 clamp(70px, 10vw, 120px);
  border-top: 1px solid var(--line);
}

.process-track {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

.process-connector {
  position: absolute;
  top: 19px;
  left: var(--gutter);
  right: var(--gutter);
  width: calc(100% - 2 * var(--gutter));
  height: 2px;
  overflow: visible;
}
.process-connector-track { stroke: var(--line); stroke-width: 1; }
.process-connector-draw {
  stroke: var(--cyan);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 4vw, 40px);
  position: relative;
}

.process-step { position: relative; padding-top: 52px; }
.process-dot {
  position: absolute;
  top: 14px;
  left: 0;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--blue);
}
.process-icon {
  position: absolute;
  top: -2px;
  right: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease-soft);
}
.process-icon svg { width: 18px; height: 18px; }
.process-step:hover .process-icon {
  color: var(--cyan);
  border-color: var(--cyan);
  transform: scale(1.08) rotate(4deg);
}
.process-num {
  display: block;
  font-family: var(--font-display);
  color: var(--text-faint);
  font-size: .85rem;
  margin-bottom: 10px;
}
.process-step h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.process-step p {
  color: var(--text-dim);
  font-size: .98rem;
  max-width: 32ch;
}

@media (max-width: 860px) {
  .process-connector { display: none; }
  .process-steps { grid-template-columns: 1fr; gap: 32px; }
  .process-step { padding-left: 24px; padding-top: 0; border-left: 1px solid var(--line); }
  .process-dot { top: 4px; left: -6px; }
  .process-icon { top: -6px; right: 0; }
}

/* ==========================================================================
   About
   ========================================================================== */
.about {
  padding: clamp(52px, 8vw, 90px) 0;
  border-top: 1px solid var(--line);
}
.about-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.about-copy h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  margin-bottom: 24px;
  max-width: 14ch;
}
.about-copy p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 56ch;
  margin-bottom: 18px;
}

.about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  margin-top: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--text-dim); font-size: .95rem; }

.about-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
}
.orbit-graphic--bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--text-dim);
  opacity: .8;
  pointer-events: none;
}
.orbit-ring { transform-origin: 160px 160px; animation: orbitSpin 16s linear infinite; }
.orbit-ring--slow { animation-duration: 30s; animation-direction: reverse; }
.orbit-node { transform-origin: 160px 160px; animation: orbitSpin 9s linear infinite; }
.orbit-node--b { transform-origin: 160px 160px; animation: orbitSpin 21s linear infinite reverse; }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

#aboutMockup {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
}

@media (prefers-reduced-motion: reduce) {
  .orbit-ring, .orbit-node, .orbit-node--b { animation: none; }
}

@media (max-width: 780px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { order: -1; min-height: 0; margin-bottom: 8px; }
  .orbit-graphic--bg { max-width: 320px; margin: 0 auto; position: relative; inset: auto; }
  #aboutMockup { position: absolute; max-width: 280px; }
  .stat { min-width: 45%; }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  padding: clamp(60px, 9vw, 110px) 0;
  border-top: 1px solid var(--line);
}
.contact-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(40px, 6vw, 90px);
}
.contact-intro h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 18px;
}
.contact-intro p {
  color: var(--text-dim);
  max-width: 42ch;
  margin-bottom: 28px;
}
.contact-email {
  font-family: var(--font-display);
  font-size: 1.15rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  display: inline-block;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.contact-email:hover { border-color: var(--cyan); color: var(--cyan); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-row label {
  font-size: .88rem;
  color: var(--text-dim);
}
.form-row .optional { color: var(--text-faint); }
.form-row input,
.form-row textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--text);
  transition: border-color .25s var(--ease), background .25s var(--ease);
  resize: vertical;
}
.form-row input:hover, .form-row textarea:hover { border-color: #2A2C3A; }
.form-row input:focus, .form-row textarea:focus {
  border-color: var(--cyan);
  background: var(--surface-2);
  outline: none;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .btn { align-self: flex-start; margin-top: 4px; }

.form-status {
  font-size: .92rem;
  min-height: 1.2em;
  color: var(--text-dim);
}
.form-status.is-success { color: var(--cyan); }
.form-status.is-error { color: #FF6B6B; }

@media (max-width: 780px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-links {
  display: flex;
  gap: 28px;
  font-size: .92rem;
  color: var(--text-dim);
}
.footer-links a:hover { color: var(--text); }
.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: .85rem;
  color: var(--text-faint);
}
.footer-meta a { color: var(--text-dim); }
.footer-meta a:hover { color: var(--cyan); }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { align-items: flex-start; }
}

/* ==========================================================================
   404
   ========================================================================== */
.error-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 11rem);
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 2;
}
.error-page h1 {
  font-size: 1.4rem;
  margin: 16px 0 8px;
  position: relative;
  z-index: 2;
}
.error-page p {
  color: var(--text-dim);
  margin-bottom: 28px;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Magnetic elements — JS toggles transform via inline style
   ========================================================================== */
.magnetic { will-change: transform; }
