/* ==========================================================================
   Keystone Apps — Design System
   ========================================================================== */

:root {
  --bg: #06070d;
  --bg-alt: #0a0c16;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.075);
  --surface-solid: #10121c;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text: #f5f6fb;
  --text-dim: #a6adc4;
  --text-faint: #6b7288;

  --violet: #7c3aed;
  --violet-soft: #a78bfa;
  --indigo: #4f46e5;
  --cyan: #22d3ee;
  --pink: #ec4899;
  --amber: #fbbf24;
  --green: #34d399;

  --grad-primary: linear-gradient(135deg, var(--violet) 0%, var(--indigo) 55%, var(--cyan) 100%);
  --grad-accent: linear-gradient(135deg, var(--pink), var(--violet));
  --grad-text: linear-gradient(135deg, #c4b5fd, #818cf8 45%, #22d3ee);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --shadow-glow: 0 20px 60px -20px rgba(79, 70, 229, 0.55);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.6);

  --ease: cubic-bezier(0.16, 0.84, 0.44, 1);
  --container: 1240px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

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

input, textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

section { position: relative; }

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

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-soft);
}

.section-head {
  max-width: 620px;
  margin: 0 0 56px;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 540px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  backdrop-filter: blur(12px);
}

.pill-status .pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse-dot 2s infinite;
}

.pill-status svg { width: 15px; height: 15px; color: var(--violet-soft); }

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
  will-change: transform;
}

.btn svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }

.btn-gradient {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-gradient:hover {
  box-shadow: 0 24px 70px -18px rgba(124, 58, 237, 0.75);
}

.btn-gradient:hover svg { transform: translateX(3px); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* ==========================================================================
   Background effects
   ========================================================================== */

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  will-change: transform;
}

.aurora-1 {
  top: -10%;
  left: -10%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle at 30% 30%, var(--violet), transparent 70%);
  animation: drift-1 22s ease-in-out infinite alternate;
}

.aurora-2 {
  top: 10%;
  right: -15%;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle at 60% 40%, var(--cyan), transparent 70%);
  animation: drift-2 26s ease-in-out infinite alternate;
}

.aurora-3 {
  top: 50%;
  left: 50%;
  width: 700px;
  height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--indigo), transparent 70%);
  opacity: 0.35;
}

.aurora-4 {
  bottom: -20%;
  left: 50%;
  width: 800px;
  height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--pink), transparent 70%);
  opacity: 0.3;
}

@keyframes drift-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.1); }
}

@keyframes drift-2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, 60px) scale(1.05); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 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: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 10%, transparent 75%);
}

/* ==========================================================================
   Cursor
   ========================================================================== */

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.cursor-ring.is-active {
  width: 54px;
  height: 54px;
  border-color: var(--violet-soft);
  background: rgba(124, 58, 237, 0.12);
}

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

/* ==========================================================================
   Preloader
   ========================================================================== */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: var(--bg);
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-mark { width: 56px; height: 56px; animation: spin-slow 2.4s linear infinite; }
.preloader-mark svg { width: 100%; height: 100%; }

.preloader-bar {
  width: 140px;
  height: 3px;
  border-radius: 3px;
  background: var(--surface);
  overflow: hidden;
}

.preloader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--grad-primary);
  animation: bar-slide 1.1s ease-in-out infinite;
}

@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes bar-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(360%); }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 22px 0;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  padding: 14px 0;
  background: rgba(6, 7, 13, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  z-index: 20;
}

.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }

.brand-text em { font-style: normal; font-weight: 500; color: var(--text-dim); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav ul { display: flex; align-items: center; gap: 30px; }

.nav-link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 4px 0;
  transition: color 0.25s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: var(--grad-primary);
  transition: width 0.3s var(--ease);
}

.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-cta { display: none; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  z-index: 20;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin-inline: auto;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

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

.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 10, 0.6);
  backdrop-filter: blur(2px);
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.nav-scrim.is-visible { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: clamp(140px, 22vw, 200px) 0 100px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
}

.hero-title {
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  margin-bottom: 22px;
}

.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text-dim);
  max-width: 500px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.hero-trust-item { display: flex; flex-direction: column; }
.hero-trust-item strong { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; }
.hero-trust-item span { font-size: 0.8rem; color: var(--text-faint); }
.hero-trust-divider { width: 1px; height: 30px; background: var(--border); }

.hero-visual {
  position: relative;
  height: clamp(380px, 46vw, 560px);
}

#hero-canvas {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
}

.hero-visual.no-3d::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--violet), var(--indigo), var(--cyan), var(--pink), var(--violet));
  filter: blur(70px);
  opacity: 0.45;
  animation: spin-slow 16s linear infinite;
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(16, 18, 28, 0.65);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  animation: float-card 6s ease-in-out infinite;
}

.floating-card strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 0.95rem; }
.floating-card small { color: var(--text-faint); font-size: 0.72rem; }

.fc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--violet-soft);
}
.fc-icon svg { width: 17px; height: 17px; }
.fc-icon-amber { color: var(--amber); }
.fc-icon-green { color: var(--green); }

.fc-1 { top: 8%; left: -4%; animation-delay: 0s; }
.fc-2 { top: 44%; right: -6%; animation-delay: 1.4s; }
.fc-3 { bottom: 6%; left: 6%; animation-delay: 2.8s; }

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--border-strong);
  border-radius: 20px;
  z-index: 1;
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  border-radius: 3px;
  background: var(--violet-soft);
  transform: translateX(-50%);
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}

@keyframes scroll-cue-move {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 22px; }
  100% { opacity: 0; top: 22px; }
}

/* ==========================================================================
   Marquee
   ========================================================================== */

.marquee-section {
  padding: 50px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.marquee-label {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: marquee-scroll 28s linear infinite;
}

.marquee-track span {
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  color: var(--text-dim);
  white-space: nowrap;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   About
   ========================================================================== */

.about { padding: 140px 0; }

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: center;
}

.about-card-stack {
  position: relative;
  height: 440px;
}

.stack-card {
  position: absolute;
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 26px;
  transition: transform 0.4s var(--ease);
}

.stack-card-1 {
  top: 0;
  left: 0;
  width: 88%;
  height: 320px;
  z-index: 1;
  background: linear-gradient(160deg, #14162340, #0a0c16);
}

.stack-card-glow {
  position: absolute;
  inset: -30% -30% auto auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.45), transparent 70%);
  filter: blur(30px);
  z-index: -1;
}

.stack-card-2 {
  bottom: -10px;
  right: -6%;
  width: 210px;
  padding: 22px;
  z-index: 2;
  text-align: left;
  color: var(--violet-soft);
}

.stack-card-2 svg { width: 26px; height: 26px; margin-bottom: 14px; }
.stack-card-2 strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; color: var(--text); }
.stack-card-2 small { color: var(--text-faint); font-size: 0.8rem; }

.code-window { display: flex; flex-direction: column; gap: 12px; }

.code-dots { display: flex; gap: 6px; margin-bottom: 8px; }
.code-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-strong); }
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-line {
  height: 9px;
  width: var(--w, 60%);
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.5), rgba(34, 211, 238, 0.35));
}

.about-copy p { color: var(--text-dim); margin-bottom: 18px; }
.about-copy h2 { font-size: clamp(2rem, 3.6vw, 2.7rem); margin-bottom: 20px; }

.check-list { margin: 28px 0; display: flex; flex-direction: column; gap: 14px; }

.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.96rem;
  color: var(--text);
}

.check-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--green);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.mini-stats strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mini-stats span { font-size: 0.78rem; color: var(--text-faint); }

/* ==========================================================================
   Services
   ========================================================================== */

.services { padding: 100px 0 140px; }

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

.service-card {
  position: relative;
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.15s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
  transform-style: preserve-3d;
  perspective: 900px;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 58, 237, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.service-card:hover::before { opacity: 1; }
.service-card:hover { border-color: var(--border-strong); background: var(--surface-strong); }

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--grad-primary);
  color: #fff;
  margin-bottom: 22px;
}

.service-icon svg { width: 24px; height: 24px; }

.service-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.service-card p { color: var(--text-dim); font-size: 0.94rem; }

/* ==========================================================================
   Process
   ========================================================================== */

.process { padding: 100px 0 140px; background: var(--bg-alt); }

.process-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.process-line {
  position: absolute;
  top: 27px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.process-line span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--grad-primary);
  transition: width 1.4s var(--ease);
}

.process-step { position: relative; z-index: 1; }

.process-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--violet-soft);
  margin-bottom: 22px;
}

.process-step h3 { font-size: 1.15rem; margin-bottom: 10px; }
.process-step p { color: var(--text-dim); font-size: 0.92rem; max-width: 260px; }

/* ==========================================================================
   Work
   ========================================================================== */

.work { padding: 100px 0 140px; }

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

.work-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.15s var(--ease), border-color 0.35s var(--ease);
}

.work-card:hover { border-color: var(--border-strong); }

.phone-mock {
  --theme-a: var(--violet);
  --theme-b: var(--cyan);
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: 16px;
  background: linear-gradient(155deg, var(--theme-a), var(--theme-b));
  padding: 14px;
  margin-bottom: 22px;
  overflow: hidden;
}

.theme-violet { --theme-a: #7c3aed; --theme-b: #4f46e5; }
.theme-cyan { --theme-a: #0ea5e9; --theme-b: #22d3ee; }
.theme-pink { --theme-a: #ec4899; --theme-b: #7c3aed; }
.theme-amber { --theme-a: #f59e0b; --theme-b: #ec4899; }
.theme-indigo { --theme-a: #4f46e5; --theme-b: #a78bfa; }
.theme-teal { --theme-a: #0d9488; --theme-b: #22d3ee; }

.phone-notch {
  width: 60px;
  height: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
  margin: 0 auto 10px;
}

.phone-screen {
  height: calc(100% - 18px);
  border-radius: 10px;
  background: rgba(6, 7, 13, 0.28);
  backdrop-filter: blur(6px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ui-bar { height: 10px; width: var(--w, 60%); border-radius: 5px; background: rgba(255, 255, 255, 0.55); }
.ui-card { flex: 1; border-radius: 10px; background: rgba(255, 255, 255, 0.18); min-height: 40px; }
.ui-card-tall { min-height: 70px; }

.ui-row { display: flex; gap: 8px; }
.ui-row span { flex: 1; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, 0.22); }

.ui-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1; }
.ui-grid2 span { border-radius: 8px; background: rgba(255, 255, 255, 0.22); }

.ui-ring {
  width: 70px;
  height: 70px;
  margin: 6px auto;
  border-radius: 50%;
  border: 7px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.85);
}

.ui-chart { display: flex; align-items: flex-end; gap: 6px; flex: 1; padding-bottom: 4px; }
.ui-chart i { flex: 1; border-radius: 4px 4px 0 0; background: rgba(255, 255, 255, 0.5); }
.ui-chart i:nth-child(1) { height: 40%; }
.ui-chart i:nth-child(2) { height: 65%; }
.ui-chart i:nth-child(3) { height: 45%; }
.ui-chart i:nth-child(4) { height: 85%; }
.ui-chart i:nth-child(5) { height: 60%; }

.ui-dock {
  display: flex;
  justify-content: space-around;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.ui-dock i { width: 16px; height: 16px; border-radius: 5px; background: rgba(255, 255, 255, 0.4); }

.work-tags { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.work-tags span {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-strong);
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.work-info h3 { font-size: 1.15rem; margin-bottom: 8px; }
.work-info p { color: var(--text-dim); font-size: 0.92rem; }

/* ==========================================================================
   Stats band
   ========================================================================== */

.stats-band {
  padding: 90px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.stats-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}

.stat-item span { color: var(--text-dim); font-size: 0.9rem; }

/* ==========================================================================
   Testimonials
   ========================================================================== */

.testimonials { padding: 140px 0; }

.testi-slider { max-width: 720px; margin: 0 auto; }

.testi-track {
  position: relative;
  min-height: 260px;
}

.testi-card {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 40px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}

.testi-card.is-active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
  pointer-events: auto;
}

.testi-stars { color: var(--amber); letter-spacing: 3px; margin-bottom: 18px; }

.testi-card blockquote {
  margin: 0 0 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.5;
}

.testi-card figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a), var(--b));
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.testi-card figcaption div { text-align: left; }
.testi-card figcaption strong { display: block; font-size: 0.92rem; }
.testi-card figcaption small { color: var(--text-faint); font-size: 0.8rem; }

.testi-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 30px;
}

.testi-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.testi-btn:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.testi-btn svg { width: 17px; height: 17px; }

.testi-dots { display: flex; gap: 8px; }

.testi-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.testi-dots button.is-active {
  background: var(--grad-primary);
  transform: scale(1.3);
}

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  padding: 120px 0;
  text-align: center;
  overflow: hidden;
}

.cta-inner { position: relative; z-index: 1; }

.cta-band h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  margin-bottom: 40px;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact { padding: 40px 0 160px; }

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
}

.contact-info h2 { font-size: clamp(2rem, 3.6vw, 2.7rem); margin-bottom: 16px; }
.contact-info .section-sub { margin-bottom: 26px; }
.pill-static { margin-bottom: 32px; }

.contact-details { display: flex; flex-direction: column; gap: 18px; margin-bottom: 30px; }

.contact-details li { display: flex; align-items: center; gap: 14px; }

.ci-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--violet-soft);
  flex-shrink: 0;
}

.ci-icon svg { width: 19px; height: 19px; }

.contact-details strong { display: block; font-size: 0.82rem; color: var(--text-faint); font-weight: 500; }
.contact-details a, .contact-details span { font-size: 0.98rem; }
.contact-details a:hover { color: var(--violet-soft); }

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

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.social-pill svg { width: 13px; height: 13px; opacity: 0.6; }
.social-pill:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.contact-form {
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

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

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: var(--text);
  resize: vertical;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-faint); }

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--violet-soft);
  background: rgba(124, 58, 237, 0.06);
}

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(236, 72, 153, 0.6);
}

.form-submit { width: 100%; margin-top: 6px; position: relative; }

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin-slow 0.7s linear infinite;
}

.form-submit.is-loading .btn-label { opacity: 0.6; }
.form-submit.is-loading .btn-spinner { display: inline-block; }
.form-submit.is-loading { pointer-events: none; }

.form-status {
  margin-top: 16px;
  font-size: 0.88rem;
  text-align: center;
  min-height: 20px;
}

.form-status.is-success { color: var(--green); }
.form-status.is-error { color: #f87171; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 80px 0 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
}

.footer-brand p { color: var(--text-dim); margin-top: 14px; max-width: 260px; font-size: 0.92rem; }

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--text-dim); font-size: 0.94rem; transition: color 0.25s var(--ease); }
.footer-col a:hover { color: var(--text); }
.footer-text { color: var(--text-faint); font-size: 0.88rem; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

.footer-bottom p { color: var(--text-faint); font-size: 0.85rem; }

.back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.back-to-top:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.back-to-top svg { width: 16px; height: 16px; }

/* ==========================================================================
   Legal pages (privacy policy / terms of use)
   ========================================================================== */

.legal-header {
  padding: clamp(120px, 16vw, 160px) 0 56px;
  border-bottom: 1px solid var(--border);
}

.legal-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }

.legal-app-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  flex-shrink: 0;
}

.legal-app-icon svg { width: 22px; height: 22px; }

.app-cleaner { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.app-docwise { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.app-pillar { background: linear-gradient(135deg, #2e5e4e, #3a7a63); }
.app-printer { background: linear-gradient(135deg, #1157bc, #3b82f6); }
.app-devicecontroller { background: linear-gradient(135deg, #6447ce, #7f62e8); }

.legal-app-label { color: var(--violet-soft); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; }

.legal-header h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 14px; }

.legal-updated { color: var(--text-faint); font-size: 0.85rem; }

.legal-main { padding: 60px 0 130px; }

.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-toc a {
  font-size: 0.85rem;
  color: var(--text-faint);
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--border);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.legal-toc a:hover { color: var(--text); border-color: var(--border-strong); }

.legal-body {
  max-width: 720px;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.75;
}

.legal-summary {
  padding: 26px 28px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 48px;
}

.legal-summary h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet-soft);
  margin: 0 0 18px !important;
}

.legal-summary ul { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }

.legal-summary li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); font-size: 0.95rem; }
.legal-summary li svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; margin-top: 2px; }

.legal-body h2 {
  font-size: 1.3rem;
  color: var(--text);
  margin: 46px 0 16px;
  scroll-margin-top: 100px;
}

.legal-body h2:first-of-type { margin-top: 0; }

.legal-body h3 { font-size: 1.02rem; color: var(--text); margin: 24px 0 10px; }

.legal-body p { margin: 0 0 16px; }
.legal-body ul, .legal-body ol { margin: 0 0 16px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal-body strong { color: var(--text); }
.legal-body a { color: var(--violet-soft); text-decoration: underline; text-underline-offset: 3px; }
.legal-body a:hover { color: var(--cyan); }

.legal-table-wrap {
  overflow-x: auto;
  margin: 8px 0 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.legal-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 480px; }
.legal-table th, .legal-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal-table th { color: var(--text); font-family: 'Space Grotesk', sans-serif; font-weight: 600; background: var(--surface); white-space: nowrap; }
.legal-table tr:last-child td { border-bottom: none; }

.legal-contact-box {
  margin-top: 52px;
  padding: 30px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.legal-contact-box h2 { margin-top: 0 !important; }
.legal-contact-box p { margin-bottom: 20px; }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }

  .legal-toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
  }

  .legal-toc a {
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 7px 14px;
  }
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .services-grid, .work-grid { grid-template-columns: repeat(2, 1fr); }
  .process-track { grid-template-columns: repeat(2, 1fr); row-gap: 50px; }
  .process-line { display: none; }
}

@media (max-width: 980px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(360px, 82vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    padding: 40px;
    background: rgba(9, 10, 18, 0.85);
    backdrop-filter: blur(22px);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    z-index: 18;
  }

  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 22px; }
  .nav-link { font-size: 1.1rem; }
  .nav-cta { display: inline-flex; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; height: 340px; }
  .hero-copy { text-align: left; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-visual { order: 2; }
  .about-card-stack { height: 360px; max-width: 420px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .services-grid, .work-grid { grid-template-columns: 1fr; }
  .process-track { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .footer-inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-trust { gap: 16px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .testi-card { padding: 28px 22px; }
  .testi-card blockquote { font-size: 1.08rem; }
}

@media (max-width: 480px) {
  .floating-card { padding: 10px 12px; }
  .floating-card strong { font-size: 0.85rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
