/* =========================================================
   BluePixel — Design System
   Mobile-first · Responsive (mobile / tablet / desktop / xl)
   ========================================================= */

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #60A5FA;
  --accent: #06B6D4;
  --success: #10B981;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 12px 32px rgba(37, 99, 235, 0.25);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 200ms;

  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --container: 1200px;
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body, h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; }

@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;
  }
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.container--narrow { max-width: 780px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.4rem;
  border: 2px solid transparent;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn i, .btn svg { width: 18px; height: 18px; }
.btn:hover { transform: scale(1.02); }
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover { background: var(--primary-dark); box-shadow: 0 16px 40px rgba(37,99,235,0.32); }

.btn--secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn--secondary:hover { background: rgba(37, 99, 235, 0.06); }

.btn--lg { padding: 0.9rem 1.75rem; font-size: 1rem; }
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* ---------- Eyebrow / section head ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.eyebrow i { width: 14px; height: 14px; }
.eyebrow--muted { background: rgba(100, 116, 139, 0.1); color: var(--muted); }

.section__head { max-width: 640px; margin-bottom: 3rem; }
.section__head--light .eyebrow { color: var(--primary-light); background: rgba(96, 165, 250, 0.14); }
.section__head h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 0.85rem; }
.section__lead { color: var(--muted); font-size: 1.05rem; }

.text-gradient {
  background: linear-gradient(100deg, var(--primary) 10%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section--muted { background: #F1F5F9; }
.section--dark {
  background: linear-gradient(160deg, #0B1220 0%, #0F172A 55%, #111C33 100%);
  color: #E2E8F0;
}
.section--dark h2 { color: #fff; }
.section--dark p { color: #94A3B8; }

/* =========================================================
   SCROLL PROGRESS BAR
   ========================================================= */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 1000;
  transition: width 80ms linear;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), height var(--dur) var(--ease);
}
.navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  height: 68px;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.brand-mark__img {
  position: absolute;
  width: 260%;
  max-width: none;
  top: -18%;
  left: -80%;
}
.brand-word__accent { color: var(--primary); }

.navbar__links {
  display: none;
  align-items: center;
  gap: 1.9rem;
  font-size: 0.94rem;
  font-weight: 500;
}
.navbar__links a {
  position: relative;
  padding-block: 0.25rem;
  color: var(--text);
  transition: color var(--dur) var(--ease);
}
.navbar__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width var(--dur) var(--ease);
}
.navbar__links a:hover,
.navbar__links a.is-active { color: var(--primary); }
.navbar__links a:hover::after,
.navbar__links a.is-active::after { width: 100%; }

.navbar__actions { display: flex; align-items: center; gap: 0.75rem; }
.navbar__actions .btn--primary { display: none; }

.navbar__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  padding: 0;
}
.navbar__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  margin-inline: auto;
}
.navbar__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.navbar__overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  z-index: 850;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.navbar__overlay.is-visible { opacity: 1; pointer-events: auto; }

@media (max-width: 899px) {
  .navbar__links {
    position: fixed;
    top: var(--header-h);
    right: 0;
    height: calc(100dvh - var(--header-h));
    width: min(78vw, 320px);
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 280ms var(--ease);
    z-index: 880;
    overflow-y: auto;
  }
  .navbar__links.is-open { transform: translateX(0); }
  .navbar__links li { width: 100%; border-bottom: 1px solid var(--border); }
  .navbar__links a { display: block; padding: 1rem 0; }
  .navbar__links a::after { display: none; }
}

@media (min-width: 900px) {
  .navbar__links { display: flex; }
  .navbar__toggle { display: none; }
  .navbar__actions .btn--primary { display: inline-flex; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding-block: calc(var(--header-h) + 3.5rem) 4rem;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(37,99,235,0.16) 0%, rgba(6,182,212,0.08) 45%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 14s ease-in-out infinite;
  will-change: transform;
}
@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-4%, 5%) scale(1.08); }
  66% { transform: translate(3%, -4%) scale(0.95); }
}

.hero__spotlight {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms var(--ease);
  background: radial-gradient(420px circle at var(--x, 50%) var(--y, 50%), rgba(37, 99, 235, 0.12), transparent 70%);
}
.hero:hover .hero__spotlight { opacity: 1; }
@media (hover: none) { .hero__spotlight { display: none; } }
.hero__pixels { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__pixels span {
  position: absolute;
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 3px;
  opacity: 0.35;
  animation: floaty 6s ease-in-out infinite;
}
.hero__pixels span:nth-child(1) { top: 18%; left: 6%; animation-delay: 0s; background: var(--accent); }
.hero__pixels span:nth-child(2) { top: 65%; left: 3%; animation-delay: 1.2s; width: 14px; height: 14px; }
.hero__pixels span:nth-child(3) { top: 30%; left: 92%; animation-delay: 0.6s; background: var(--accent); }
.hero__pixels span:nth-child(4) { top: 80%; left: 88%; animation-delay: 1.8s; width: 8px; height: 8px; }
.hero__pixels span:nth-child(5) { top: 8%; left: 45%; animation-delay: 2.4s; width: 8px; height: 8px; }
.hero__pixels span:nth-child(6) { top: 88%; left: 50%; animation-delay: 0.9s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-22px) rotate(12deg); }
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3rem;
}

.hero__title { font-size: clamp(2.25rem, 6vw, 3.6rem); margin-bottom: 1.1rem; }
.hero__subtitle { font-size: 1.08rem; color: var(--muted); max-width: 52ch; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.75rem; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 480px;
}
.hero__stats dt {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--text);
}
.hero__stats dt::after { content: attr(data-suffix); }
.hero__stats dd { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

.hero__visual { position: relative; }

.code-window {
  background: #0F172A;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
  transition: transform 400ms var(--ease);
}
.code-window:hover { transform: perspective(1000px) rotateY(0deg) rotateX(0deg); }

.code-window__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1rem;
  background: #1E293B;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--red { background: #EF4444; }
.dot--yellow { background: #F59E0B; }
.dot--green { background: #10B981; }
.code-window__title {
  margin-inline: auto;
  color: #94A3B8;
  font-size: 0.78rem;
  font-family: var(--font-body);
}

.code-window__body {
  padding: 1.5rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  color: #E2E8F0;
}
.tok-key { color: #C084FC; }
.tok-var { color: #60A5FA; }
.tok-fn { color: #06B6D4; }
.tok-prop { color: #93C5FD; }
.tok-str { color: #34D399; }
.tok-bool { color: #F59E0B; }
.tok-comment { color: #64748B; font-style: italic; }

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-lg);
  animation: floaty 5s ease-in-out infinite;
  font-size: 0.8rem;
}
.floating-card i { color: var(--primary); width: 20px; height: 20px; flex-shrink: 0; }
.floating-card strong { display: block; font-family: var(--font-head); font-size: 1rem; }
.floating-card span { color: var(--muted); }
.floating-card--top { top: -8%; left: -6%; animation-delay: 0.4s; }
.floating-card--bottom { bottom: -8%; right: -6%; animation-delay: 1.1s; }

@media (max-width: 640px) {
  .floating-card { display: none; }
  .code-window { transform: none; }
}

@media (min-width: 992px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
}

/* =========================================================
   TRUST BAR
   ========================================================= */
.trustbar { padding-block: 2.25rem; border-block: 1px solid var(--border); }
.trustbar__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}
.trustbar__label { font-size: 0.85rem; color: var(--muted); font-weight: 500; white-space: nowrap; }

.marquee {
  display: flex;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  flex-wrap: nowrap;
  width: max-content;
  animation: marqueeScroll 22s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

.trustbar__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1rem;
}
.trustbar__list li {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.trustbar__list li:hover { color: var(--primary); border-color: var(--primary); }

@media (min-width: 768px) {
  .trustbar__inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .trustbar__label { flex-shrink: 0; }
  .marquee { flex: 1; }
}

/* =========================================================
   GRID / CARDS
   ========================================================= */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover { transform: scale(1.02); box-shadow: var(--shadow-md); border-color: transparent; }
.card__icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  margin-bottom: 1.1rem;
}
.card__icon i { width: 22px; height: 22px; }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.95rem; }
@media (min-width: 900px) { .card--wide { grid-column: span 3; } }

/* =========================================================
   PROCESS
   ========================================================= */
.process {
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}
@media (min-width: 700px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .process { grid-template-columns: repeat(5, 1fr); } }

.process__step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.process__step:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.process__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--primary);
  opacity: 0.55;
}
.process__icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  margin-block: 0.85rem;
}
.process__icon i { width: 20px; height: 20px; }
.process__step h3 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.process__step p { color: var(--muted); font-size: 0.9rem; }

/* =========================================================
   PORTFOLIO
   ========================================================= */
.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.project:hover { transform: scale(1.015); box-shadow: var(--shadow-md); }
.project__preview {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.project__preview--a { background-image: linear-gradient(135deg, #2563EB, #06B6D4); }
.project__preview--b { background-image: linear-gradient(135deg, #1D4ED8, #10B981); }
.project__preview--c { background-image: linear-gradient(135deg, #0F172A, #2563EB); }
.project__preview--d { background-image: linear-gradient(135deg, #06B6D4, #1D4ED8); }
.project__tag {
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}
.project__body { padding: 1.5rem; }
.project__body h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.project__body p { color: var(--muted); font-size: 0.92rem; margin-bottom: 1rem; }
.project__meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1.1rem; }
.project__meta li { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: var(--primary); font-weight: 600; }
.project__meta i { width: 15px; height: 15px; }

.portfolio__note { margin-top: 2rem; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* =========================================================
   FEATURES (dark section)
   ========================================================= */
.feature {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.feature:hover { transform: scale(1.02); background: rgba(255, 255, 255, 0.07); }
.feature__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  margin-bottom: 1.1rem;
  color: #fff;
}
.feature__icon i { width: 21px; height: 21px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 0.5rem; color: #fff; }
.feature p { font-size: 0.9rem; }

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonials { max-width: 760px; margin-inline: auto; }
.testimonials__track {
  display: flex;
  overflow: hidden;
}
.testimonial {
  min-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: transform 400ms var(--ease);
}
.testimonial p {
  font-size: 1.1rem;
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
.testimonial footer { display: flex; align-items: center; gap: 0.85rem; }
.testimonial__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  flex-shrink: 0;
}
.testimonial footer strong { display: block; font-size: 0.92rem; }
.testimonial footer span { font-size: 0.82rem; color: var(--muted); }

.testimonials__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.testimonials__controls button {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.testimonials__controls button:hover { background: var(--primary); color: #fff; transform: scale(1.06); }
.testimonials__controls button i { width: 18px; height: 18px; }
.testimonials__dots { display: flex; gap: 0.5rem; }
.testimonials__dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  transition: background var(--dur) var(--ease), width var(--dur) var(--ease);
}
.testimonials__dots button.is-active { background: var(--primary); width: 22px; border-radius: 999px; }

/* =========================================================
   FAQ / ACCORDION
   ========================================================= */
.accordion { display: flex; flex-direction: column; gap: 0.85rem; }
.accordion__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  padding: 1.15rem 1.4rem;
  text-align: left;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
}
.accordion__trigger i { width: 18px; height: 18px; color: var(--primary); transition: transform var(--dur) var(--ease); flex-shrink: 0; }
.accordion__trigger[aria-expanded="true"] i { transform: rotate(180deg); }

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 260ms var(--ease);
}
.accordion__panel > p {
  overflow: hidden;
  padding-inline: 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.accordion__item.is-open .accordion__panel { grid-template-rows: 1fr; }
.accordion__item.is-open .accordion__panel > p { padding-bottom: 1.25rem; }

/* =========================================================
   CTA FINAL
   ========================================================= */
.cta-final {
  padding-block: 4.5rem;
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 55%, var(--accent) 130%);
  color: #fff;
  text-align: center;
}
.cta-final__inner { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.cta-final h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); color: #fff; max-width: 32ch; }
.cta-final p { color: rgba(255,255,255,0.85); max-width: 48ch; }
.cta-final .btn--primary { background: #fff; color: var(--primary); box-shadow: var(--shadow-lg); }
.cta-final .btn--primary:hover { background: #F1F5F9; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { display: grid; gap: 2.5rem; }
@media (min-width: 950px) { .contact { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }

.contact__list { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1.75rem; }
.contact__list li { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; }
.contact__list i { width: 19px; height: 19px; color: var(--primary); flex-shrink: 0; }

.contact__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.9rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row label { font-size: 0.85rem; font-weight: 600; }
.form-row input, .form-row select, .form-row textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  background: #fff;
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  resize: vertical;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}
.form-row input:invalid:not(:placeholder-shown) { border-color: #EF4444; }
.form-hint { font-size: 0.78rem; color: var(--muted); }
.form-status { font-size: 0.88rem; min-height: 1.2em; color: var(--success); font-weight: 600; }
.form-status.is-error { color: #EF4444; }
.form-row.has-error input,
.form-row.has-error textarea,
.form-row.has-error select { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: #0B1220;
  color: #94A3B8;
  padding-top: 3.5rem;
}
.footer__inner {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 700px) { .footer__inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

.footer__brand p { margin-block: 0.9rem 1.1rem; font-size: 0.9rem; }
.navbar__brand--footer { color: #fff; }
.footer__social { display: flex; gap: 0.7rem; }
.footer__social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.footer__social a i { width: 16px; height: 16px; }
.footer__social a:hover { background: var(--primary); transform: translateY(-2px); }

.footer__col h4 { color: #fff; font-size: 0.92rem; margin-bottom: 1rem; }
.footer__col ul { display: flex; flex-direction: column; gap: 0.65rem; font-size: 0.9rem; }
.footer__col a { transition: color var(--dur) var(--ease); }
.footer__col a:hover { color: #fff; }

.footer__bottom {
  margin-top: 3rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8rem;
}
@media (min-width: 700px) {
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), background var(--dur) var(--ease);
  z-index: 700;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--primary-dark); }
.back-to-top i { width: 20px; height: 20px; }

/* =========================================================
   CHAT DE IA (ASISTENTE VIRTUAL)
   ========================================================= */
.chat-widget {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.chat-toggle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-glow);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
  position: relative;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.chat-toggle:active { cursor: grabbing; }
.chat-toggle:hover { background: var(--primary-dark); transform: translateY(-2px); }
.chat-toggle i { width: 24px; height: 24px; }
.chat-toggle .icon-close { display: none; }
.chat-widget.is-open .chat-toggle .icon-chat { display: none; }
.chat-widget.is-open .chat-toggle .icon-close { display: flex; }

.chat-toggle__badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--surface);
}

.chat-panel {
  position: fixed;
  /* left/top los fija chat.js según la posición actual del botón (ver positionPanel) */
  width: min(360px, calc(100vw - 2.5rem));
  height: min(520px, calc(100vh - 8rem));
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.chat-widget.is-open .chat-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-panel__header {
  background: var(--primary);
  color: #fff;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.chat-panel__header i { width: 20px; height: 20px; flex-shrink: 0; }
.chat-panel__header strong { display: block; font-family: var(--font-head); font-size: 0.95rem; }
.chat-panel__header span { display: block; font-size: 0.75rem; opacity: 0.85; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--bg);
}

.chat-msg {
  max-width: 85%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg--bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 2px;
}
.chat-msg--user {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 2px;
}
.chat-msg--error {
  align-self: center;
  background: rgba(239, 68, 68, 0.08);
  color: #B91C1C;
  border: 1px solid rgba(239, 68, 68, 0.2);
  font-size: 0.8rem;
  text-align: center;
}
.chat-msg--typing { display: flex; gap: 4px; align-items: center; }
.chat-msg--typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  animation: chat-typing 1.1s infinite ease-in-out;
}
.chat-msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-msg--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.chat-form input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
}
.chat-form input:focus {
  outline: none;
  border-color: var(--primary);
}
.chat-form button {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--dur) var(--ease);
}
.chat-form button:hover { background: var(--primary-dark); }
.chat-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-form button i { width: 18px; height: 18px; }

@media (max-width: 480px) {
  .chat-widget { left: 0.75rem; bottom: 0.75rem; }
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 560ms var(--ease), transform 560ms var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE TYPE SCALE / UTILITIES
   ========================================================= */
@media (max-width: 480px) {
  .section { padding: 3.5rem 0; }
  .hero { padding-block: calc(var(--header-h) + 2rem) 3rem; }
  .hero__stats { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
  .code-window__body { font-size: 0.76rem; }
  .cta-final { padding-block: 3.5rem; }
}

@media (min-width: 1400px) {
  .container { max-width: 1320px; }
}
