/* =========================================================================
   Turing ERP — Turing Innovation S.A
   Design system: "Modern Dark" (glassmorphism, ambient light, indigo glow)
   Tokens derived via ui-ux-pro-max skill (see design-system/turing-erp/MASTER.md)
   ========================================================================= */

/* ---------- Animated property for gradient border ---------- */
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* ---------- Tokens ---------- */
:root {
  --bg-deep: #05070e;
  --bg: #080b14;
  --bg-elev: #0d1120;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .065);

  --fg: #eceef5;
  --fg-muted: #97a0b5;
  --fg-dim: #5d6577;

  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .14);

  --accent: #6366f1;
  --cyan: #22d3ee;
  --violet: #a855f7;
  --teal: #2dd4bf;
  --accent-glow: rgba(99, 102, 241, .35);

  --grad: linear-gradient(120deg, #22d3ee, #6366f1 50%, #a855f7);
  --grad-soft: linear-gradient(120deg, rgba(34, 211, 238, .15), rgba(168, 85, 247, .15));
  --grad-ai: linear-gradient(120deg, #2dd4bf, #22d3ee);

  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --container: 1200px;
  --gutter: clamp(1.1rem, 4vw, 2rem);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --header-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* radial atmosphere behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 40rem at 80% -10%, rgba(99, 102, 241, .14), transparent 60%),
    radial-gradient(50rem 40rem at 0% 10%, rgba(34, 211, 238, .10), transparent 55%),
    radial-gradient(60rem 50rem at 50% 110%, rgba(168, 85, 247, .10), transparent 60%),
    var(--bg-deep);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sprite { position: absolute; }

::selection { background: rgba(99, 102, 241, .35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 10px;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: 820px; }

.section { padding: clamp(4.5rem, 10vw, 8rem) 0; position: relative; }

.section-head { max-width: 720px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--cyan);
  padding: .35rem .8rem;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 1.1rem;
}
.kicker .ico { width: 1rem; height: 1rem; }

.section-title {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
}
.section-lead {
  margin-top: 1rem;
  color: var(--fg-muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: .8rem; --pad-x: 1.3rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .3s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  touch-action: manipulation;
  will-change: transform;
}
.btn .ico { width: 1.15em; height: 1.15em; }
.btn-sm { --pad-y: .6rem; --pad-x: 1rem; font-size: .9rem; }
.btn-lg { --pad-y: 1rem; --pad-x: 1.7rem; font-size: 1.05rem; }
.w-full { width: 100%; }

.btn-primary {
  position: relative;
  color: #fff;
  background: linear-gradient(120deg, #4f46e5, #6366f1 45%, #7c3aed);
  box-shadow: 0 10px 30px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--grad); opacity: 0; transition: opacity .3s var(--ease); z-index: -1;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: translateY(0) scale(.985); }

.btn-outline {
  color: var(--fg);
  border: 1px solid var(--border-2);
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.btn-outline:hover { transform: translateY(-2px); border-color: rgba(99, 102, 241, .6); background: var(--surface-2); box-shadow: 0 12px 30px -16px var(--accent-glow); }
.btn-outline:active { transform: translateY(0) scale(.985); }

.btn-ghost { color: var(--fg-muted); }
.btn-ghost:hover { color: var(--fg); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8, 11, 20, .72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: 100%; }

.brand { display: inline-flex; align-items: center; gap: .7rem; }
.brand-mark { width: 40px; height: 42px; filter: drop-shadow(0 4px 12px rgba(99, 102, 241, .35)); }
.brand-mark .mark-svg, .brand-mark img { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.brand-tag { font-size: .58rem; letter-spacing: .22em; text-transform: uppercase; color: var(--fg-muted); margin-top: 3px; }
.brand-mark .wifi path { transform-origin: 48px 50px; }

.nav-links { display: flex; align-items: center; gap: .3rem; }
.nav-links a {
  padding: .5rem .85rem; border-radius: 10px; color: var(--fg-muted); font-weight: 500; font-size: .95rem;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); background: var(--surface); }

.nav-cta { display: flex; align-items: center; gap: .6rem; }
.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.nav-toggle .ico { width: 1.5rem; height: 1.5rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + clamp(2rem, 6vw, 4.5rem)) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .9; }
.grid-overlay {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 75%);
}
.aurora { position: absolute; inset: -20%; z-index: 0; pointer-events: none; filter: blur(60px); }
.blob { position: absolute; border-radius: 50%; opacity: .5; mix-blend-mode: screen; }
.blob-1 { width: 38rem; height: 38rem; left: -8rem; top: -10rem; background: radial-gradient(circle, rgba(99, 102, 241, .55), transparent 65%); animation: drift1 22s var(--ease) infinite alternate; }
.blob-2 { width: 32rem; height: 32rem; right: -6rem; top: 2rem; background: radial-gradient(circle, rgba(34, 211, 238, .42), transparent 65%); animation: drift2 26s var(--ease) infinite alternate; }
.blob-3 { width: 30rem; height: 30rem; left: 30%; bottom: -14rem; background: radial-gradient(circle, rgba(168, 85, 247, .42), transparent 65%); animation: drift3 30s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate(6rem, 4rem) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-5rem, 6rem) scale(1.1); } }
@keyframes drift3 { to { transform: translate(4rem, -5rem) scale(1.2); } }

.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero-copy { max-width: 600px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .85rem; font-weight: 600; color: var(--fg-muted);
  padding: .45rem .9rem; border: 1px solid var(--border-2); border-radius: 999px; background: var(--surface);
  backdrop-filter: blur(8px); margin-bottom: 1.5rem;
}
.eyebrow .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); animation: pulse 2s infinite; }
.hero-title { font-size: clamp(2.4rem, 6.2vw, 4.6rem); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; }
.hero-sub { margin-top: 1.4rem; font-size: clamp(1.05rem, 1.9vw, 1.3rem); color: var(--fg-muted); max-width: 36ch; }
.hero-sub strong { color: var(--fg); font-weight: 600; }
.hero-actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-trust { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 1.4rem; }
.hero-trust li { display: inline-flex; align-items: center; gap: .5rem; color: var(--fg-muted); font-size: .92rem; }
.hero-trust .ico { width: 1.1rem; height: 1.1rem; color: var(--cyan); }

/* ---------- Glass ---------- */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  border: 1px solid var(--border);
  backdrop-filter: blur(14px) saturate(130%);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .07);
}

/* ---------- Dashboard mockup ---------- */
.hero-visual { position: relative; perspective: 1400px; }
.dash {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: rotateY(-9deg) rotateX(6deg);
  transition: transform .5s var(--ease);
}
.dash-top { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .02); }
.dots { display: inline-flex; gap: .4rem; }
.dots i { width: .7rem; height: .7rem; border-radius: 50%; background: var(--fg-dim); opacity: .6; }
.dots i:nth-child(1) { background: #ff5f57; } .dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.dash-title { font-size: .82rem; color: var(--fg-muted); font-weight: 500; }
.dash-live { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; color: var(--teal); font-weight: 600; }
.dash-live .pulse { width: .5rem; height: .5rem; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: pulse 1.8s infinite; }
.dash-body { display: grid; grid-template-columns: 56px 1fr; min-height: 320px; }
.dash-side { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem .5rem; border-right: 1px solid var(--border); }
.side-item { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--fg-dim); }
.side-item .ico { width: 1.2rem; height: 1.2rem; }
.side-item.active { color: #fff; background: var(--grad); box-shadow: 0 8px 20px -8px var(--accent-glow); }
.dash-main { padding: 1.1rem; display: flex; flex-direction: column; gap: 1rem; }
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.kpi { padding: .8rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.kpi-label { font-size: .68rem; color: var(--fg-muted); display: block; }
.kpi-value { font-family: var(--mono); font-weight: 600; font-size: 1.15rem; display: block; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.kpi-up { display: inline-flex; align-items: center; gap: .25rem; font-size: .68rem; color: var(--teal); margin-top: .3rem; }
.kpi-up .ico { width: .85rem; height: .85rem; }
.chart { position: relative; flex: 1; display: flex; flex-direction: column; gap: .6rem; min-height: 130px; }
.area-chart { width: 100%; height: 110px; }
.area-chart .line { stroke-dasharray: 460; stroke-dashoffset: 460; }
.in-view .area-chart .line { animation: draw 1.8s var(--ease) forwards; }
.area-chart .area { opacity: 0; }
.in-view .area-chart .area { animation: fadein .8s .9s var(--ease) forwards; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; align-items: end; height: 46px; }
.bars span { height: 0; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--cyan), var(--accent)); opacity: .85; }
.in-view .bars span { animation: grow .9s var(--ease) forwards; }
.in-view .bars span:nth-child(1) { animation-delay: .1s } .in-view .bars span:nth-child(2) { animation-delay: .16s } .in-view .bars span:nth-child(3) { animation-delay: .22s } .in-view .bars span:nth-child(4) { animation-delay: .28s } .in-view .bars span:nth-child(5) { animation-delay: .34s } .in-view .bars span:nth-child(6) { animation-delay: .4s } .in-view .bars span:nth-child(7) { animation-delay: .46s }
.ai-chip { display: flex; align-items: center; gap: .6rem; padding: .7rem .85rem; border-radius: 12px; background: linear-gradient(120deg, rgba(45, 212, 191, .12), rgba(34, 211, 238, .1)); border: 1px solid rgba(45, 212, 191, .25); font-size: .8rem; color: var(--fg); }
.ai-chip .ico { color: var(--teal); width: 1.1rem; height: 1.1rem; }

.float-badge { position: absolute; display: inline-flex; align-items: center; gap: .45rem; padding: .6rem .85rem; border-radius: 12px; font-size: .78rem; font-weight: 600; }
.float-badge .ico { width: 1rem; height: 1rem; color: var(--cyan); }
.fb-1 { top: 8%; left: -3.5rem; animation: float 6s ease-in-out infinite; }
.fb-2 { bottom: 9%; right: -2.5rem; animation: float 7s ease-in-out infinite reverse; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes grow { to { height: var(--h); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .5; } }

/* ---------- Marquee ---------- */
.marquee-section { padding: 2.5rem 0; border-block: 1px solid var(--border); background: rgba(255, 255, 255, .012); }
.marquee-label { text-align: center; color: var(--fg-dim); font-size: .85rem; letter-spacing: .04em; margin-bottom: 1.4rem; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 3.5rem; width: max-content; animation: scroll 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-size: 1.35rem; font-weight: 700; color: var(--fg-dim); letter-spacing: -.01em; white-space: nowrap; transition: color .3s; }
.marquee-track span:hover { color: var(--fg-muted); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat { text-align: center; padding: 1.5rem 1rem; border-radius: var(--radius); position: relative; }
.stat::after { content: ""; position: absolute; right: 0; top: 22%; height: 56%; width: 1px; background: var(--border); }
.stat:last-child::after { display: none; }
.stat-num { font-size: clamp(2.2rem, 4.5vw, 3.2rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: .6rem; color: var(--fg-muted); font-size: .92rem; }

/* ---------- Bento / cards ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.card {
  position: relative; padding: 1.6rem; border-radius: var(--radius);
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(20rem 20rem at var(--mx, 50%) var(--my, 0%), rgba(99, 102, 241, .14), transparent 60%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.card:hover { border-color: var(--border-2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(99, 102, 241, .15); }
.card:hover::before { opacity: 1; }
.bento-feature { grid-column: span 1; grid-row: span 2; display: flex; flex-direction: column; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--cyan); margin-bottom: 1.1rem;
}
.card-icon .ico { width: 1.5rem; height: 1.5rem; }
.card-icon.sm { width: 38px; height: 38px; border-radius: 11px; margin: 0; }
.card-icon.sm .ico { width: 1.2rem; height: 1.2rem; }
.grad-icon { background: var(--grad); color: #fff; border: none; box-shadow: 0 12px 26px -12px var(--accent-glow); }
.card h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
.bento-feature h3 { font-size: 1.5rem; }
.card p { margin-top: .6rem; color: var(--fg-muted); font-size: .96rem; }
.mini-list { margin-top: 1.1rem; display: grid; gap: .55rem; }
.mini-list li { display: flex; align-items: center; gap: .6rem; font-size: .92rem; color: var(--fg); }
.mini-list .ico { width: 1.05rem; height: 1.05rem; color: var(--teal); }
.card-link { margin-top: auto; padding-top: 1.2rem; display: inline-flex; align-items: center; gap: .4rem; color: var(--cyan); font-weight: 600; font-size: .95rem; }
.card-link .ico { transition: transform .25s var(--ease); }
.card-link:hover .ico { transform: translateX(4px); }

/* ---------- Split sections ---------- */
.split { overflow: hidden; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.reverse .split-visual { order: -1; }
.section-glow { position: absolute; width: 40rem; height: 40rem; top: 50%; left: 70%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(99, 102, 241, .16), transparent 60%); filter: blur(40px); pointer-events: none; z-index: 0; }
.section-glow.center { left: 50%; }
.split-grid, .cta-grid { position: relative; z-index: 1; }
.split-copy .kicker .ico { width: 1rem; height: 1rem; }
.split-copy .section-title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.feature-list { margin: 1.8rem 0 2rem; display: grid; gap: 1.2rem; }
.feature-list li { display: flex; gap: 1rem; }
.fi { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--cyan); }
.fi .ico { width: 1.3rem; height: 1.3rem; }
.feature-list strong { font-weight: 700; }
.feature-list p { color: var(--fg-muted); font-size: .94rem; margin-top: .2rem; }

/* AI chat panel */
.ai-panel { border-radius: var(--radius-lg); padding: 1.4rem; }
.ai-head { display: flex; align-items: center; gap: .7rem; font-weight: 700; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.chat { display: flex; flex-direction: column; gap: .8rem; padding-top: 1.1rem; }
.msg { max-width: 85%; padding: .8rem 1rem; border-radius: 16px; font-size: .92rem; line-height: 1.5; }
.msg-user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.msg-ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg-ai strong { color: var(--cyan); }
.msg-actions { display: flex; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }
.msg-actions span { font-size: .76rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--border-2); color: var(--fg-muted); }
.msg.typing { display: inline-flex; gap: .3rem; align-self: flex-start; padding: .9rem 1rem; }
.msg.typing span { width: .5rem; height: .5rem; border-radius: 50%; background: var(--fg-muted); animation: typing 1.4s infinite; }
.msg.typing span:nth-child(2) { animation-delay: .2s; } .msg.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Personalización grid */
.custom-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.custom-card { padding: 1.4rem 1.2rem; border-radius: var(--radius); display: flex; flex-direction: column; gap: .8rem; transition: transform .4s var(--ease), border-color .3s; }
.custom-card .ico { width: 1.6rem; height: 1.6rem; color: var(--cyan); }
.custom-card span { font-weight: 600; }
.custom-card.center { background: var(--grad); color: #fff; border: none; box-shadow: 0 20px 40px -20px var(--accent-glow); }
.custom-card.center .ico { color: #fff; }
.custom-card:hover { transform: translateY(-4px); border-color: var(--border-2); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; counter-reset: step; }
.step { position: relative; padding: 1.6rem 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .4s var(--ease), border-color .3s; }
.step:hover { transform: translateY(-5px); border-color: var(--border-2); }
.step-num { font-family: var(--mono); font-size: .85rem; color: var(--fg-dim); font-weight: 600; }
.step-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--border); color: var(--cyan); margin: .8rem 0 1.1rem; }
.step-icon .ico { width: 1.45rem; height: 1.45rem; }
.step h3 { font-size: 1.12rem; font-weight: 700; }
.step p { margin-top: .5rem; color: var(--fg-muted); font-size: .92rem; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 2.9rem; right: -.7rem; width: 1.4rem; height: 1px; background: linear-gradient(90deg, var(--border-2), transparent); }

/* ---------- Industries ---------- */
.industries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.ind-card { padding: 1.6rem; border-radius: var(--radius); transition: transform .4s var(--ease), border-color .3s; }
.ind-card .ico { width: 2rem; height: 2rem; color: var(--cyan); margin-bottom: 1rem; }
.ind-card h3 { font-size: 1.15rem; font-weight: 700; }
.ind-card p { color: var(--fg-muted); font-size: .92rem; margin-top: .4rem; }
.ind-card:hover { transform: translateY(-5px); border-color: var(--border-2); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .9); }

/* ---------- Testimonials ---------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.quote-card { position: relative; padding: 1.8rem; border-radius: var(--radius); display: flex; flex-direction: column; }
.q-mark { color: var(--accent); opacity: .6; margin-bottom: .6rem; }
.q-mark .ico { width: 2rem; height: 2rem; fill: currentColor; stroke: none; }
.quote-card blockquote { font-size: 1rem; line-height: 1.65; color: var(--fg); }
.quote-card figcaption { display: flex; align-items: center; gap: .8rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; background: var(--grad); flex: none; }
.quote-card figcaption strong { display: block; font-size: .95rem; }
.quote-card figcaption small { color: var(--fg-muted); font-size: .82rem; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
.price-card { position: relative; padding: 2rem 1.7rem; border-radius: var(--radius-lg); display: flex; flex-direction: column; transition: transform .4s var(--ease), border-color .3s; }
.price-card:hover { transform: translateY(-6px); }
.price-card.featured { background: linear-gradient(180deg, rgba(99, 102, 241, .12), rgba(255, 255, 255, .02)); }
.badge-pop { position: absolute; top: -.85rem; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .35rem .9rem; border-radius: 999px; box-shadow: 0 10px 24px -10px var(--accent-glow); }
.price-name { font-size: 1.25rem; font-weight: 700; }
.price-desc { color: var(--fg-muted); font-size: .9rem; margin-top: .4rem; min-height: 2.6em; }
.price { display: flex; align-items: baseline; gap: .15rem; margin: 1.2rem 0 1.4rem; }
.price .cur { font-size: 1.4rem; font-weight: 700; color: var(--fg-muted); }
.price .amt { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.price .amt-text { font-size: 2rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price .per { color: var(--fg-muted); font-size: .95rem; }
.price-list { display: grid; gap: .7rem; margin-bottom: 1.8rem; }
.price-list li { display: flex; align-items: center; gap: .6rem; font-size: .93rem; color: var(--fg); }
.price-list .ico { width: 1.1rem; height: 1.1rem; color: var(--teal); flex: none; }
.price-card .btn { margin-top: auto; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .8rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: border-color .3s, background .3s; }
.faq-item[open] { border-color: var(--border-2); background: var(--surface-2); }
.faq-item summary { list-style: none; cursor: pointer; padding: 1.2rem 1.4rem; font-weight: 600; font-size: 1.02rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .chev { transition: transform .3s var(--ease); color: var(--fg-muted); flex: none; }
.faq-item[open] .chev { transform: rotate(180deg); color: var(--cyan); }
.faq-body { padding: 0 1.4rem 1.3rem; color: var(--fg-muted); }
.faq-item[open] .faq-body { animation: fadeUp .4s var(--ease); }

/* ---------- CTA + Contact ---------- */
.cta-section { background: linear-gradient(180deg, transparent, rgba(99, 102, 241, .04)); }
.cta-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.cta-copy .section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.contact-list { margin: 1.8rem 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; align-items: center; gap: .8rem; }
.ci { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--cyan); flex: none; }
.ci .ico { width: 1.2rem; height: 1.2rem; }
.contact-list a:hover { color: var(--cyan); }
.assurances { display: flex; flex-wrap: wrap; gap: 1.2rem; color: var(--fg-muted); font-size: .9rem; }
.assurances li { display: inline-flex; align-items: center; gap: .5rem; }
.assurances .ico { width: 1.1rem; height: 1.1rem; color: var(--teal); }

.contact-form { padding: clamp(1.5rem, 3vw, 2.2rem); border-radius: var(--radius-lg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .45rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--fg); }
.req { color: var(--cyan); }
.field input, .field textarea, .field select {
  width: 100%; padding: .85rem 1rem; border-radius: 12px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--border);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  font-size: .98rem;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-dim); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, .05); box-shadow: 0 0 0 3px rgba(99, 102, 241, .18); }
.field.invalid input, .field.invalid textarea { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, .15); }
.error { font-size: .8rem; color: #f87171; min-height: 1em; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.6rem; }
.select-wrap .chev { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--fg-muted); width: 1.2rem; height: 1.2rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin-top: 1rem; font-size: .92rem; text-align: center; min-height: 1.2em; }
.form-status.ok { color: var(--teal); }
.form-status.err { color: #f87171; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; background: rgba(255, 255, 255, .012); margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand .brand { margin-bottom: 1.1rem; }
.footer-about { color: var(--fg-muted); font-size: .92rem; max-width: 34ch; }
.socials { display: flex; gap: .6rem; margin-top: 1.3rem; }
.socials a { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--fg-muted); transition: color .25s, border-color .25s, transform .25s var(--ease); }
.socials a:hover { color: var(--fg); border-color: var(--border-2); transform: translateY(-3px); }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-dim); margin-bottom: 1rem; }
.footer-col a { display: block; padding: .35rem 0; color: var(--fg-muted); font-size: .94rem; transition: color .2s; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--border); color: var(--fg-dim); font-size: .86rem; }
.footer-legal a:hover { color: var(--fg-muted); }

/* ---------- Floating UI ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 150; background: transparent; }
.scroll-progress span { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 12px var(--accent-glow); }
.cursor-glow { position: fixed; top: 0; left: 0; width: 28rem; height: 28rem; border-radius: 50%; pointer-events: none; z-index: 1; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(99, 102, 241, .1), transparent 60%); opacity: 0; transition: opacity .4s; mix-blend-mode: screen; }
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.to-top { position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 12px 30px -10px var(--accent-glow); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s; }
.to-top .ico { transform: rotate(180deg); }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-3px); }

/* ---------- Animated gradient border ---------- */
.grad-border { position: relative; }
.grad-border::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--ang), rgba(34, 211, 238, .9), rgba(99, 102, 241, .9), rgba(168, 85, 247, .9), rgba(34, 211, 238, .9));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 6s linear infinite;
}
@keyframes spin { to { --ang: 360deg; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: 640px; margin-inline: auto; }
  .hero-sub { max-width: 52ch; margin-inline: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .hero-visual { margin-top: 1rem; max-width: 560px; margin-inline: auto; }
  .dash { transform: none; }
  .fb-1 { left: -1rem; } .fb-2 { right: -.5rem; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-feature { grid-row: span 1; grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .industries, .testimonials, .pricing { grid-template-columns: repeat(2, 1fr); }
  .price-card.featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .nav-links { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 1rem var(--gutter) 1.6rem; background: rgba(8, 11, 20, .96); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); transform: translateY(-120%); transition: transform .4s var(--ease); }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: .9rem .4rem; border-radius: 10px; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-toggle { display: grid; }
  .nav-cta .login-link { display: none; }
  .split-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .split.reverse .split-visual { order: 0; }
  .cta-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2)::after { display: none; }
}

@media (max-width: 560px) {
  .bento, .industries, .testimonials, .pricing, .steps { grid-template-columns: 1fr; }
  .bento-feature { grid-column: span 1; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .fb-1, .fb-2 { display: none; }
  .float-badge { font-size: .72rem; }
  .stat::after { display: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .blob { animation: none; }
  .marquee-track { animation: none; }
  .dash { transform: none; }
  .area-chart .line { stroke-dashoffset: 0; }
  .area-chart .area { opacity: 1; }
  .bars span { height: var(--h); }
}
