/* ============================================================
   Cbrian — Web corporativa. Sistema de estilos (vanilla, sin build).
   Tema: oscuro navy + degradado azul→cian→púrpura. Inter / Poppins.
   Los tokens de diseño viven en :root — edita ahí antes que hardcodear.
   ============================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Paleta */
  --bg: #0a1628;
  --bg-darker: #050d1a;
  --bg-alt: #0b1a30;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text: #c7d2e0;
  --text-bright: #ffffff;
  --text-dim: #8194ac;

  --blue: #2563eb;
  --cyan: #06b6d4;
  --purple: #a855f7;
  --grad: linear-gradient(135deg, #2563eb 0%, #06b6d4 50%, #a855f7 100%);
  --grad-soft: linear-gradient(135deg, rgba(37,99,235,.14), rgba(168,85,247,.14));
  --glow: 0 0 40px rgba(37, 99, 235, 0.35);

  /* Tipografía */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Poppins', 'Inter', sans-serif;

  /* Métricas */
  --max: 1180px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --section-pad: 96px;
  --transition: 220ms cubic-bezier(.4, 0, .2, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

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

a { color: inherit; text-decoration: none; transition: color var(--transition); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text-bright); line-height: 1.2; font-weight: 700; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: rgba(6, 182, 212, .3); color: var(--text-bright); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ===== BACKGROUND DECOR ===== */
.bg-gradient {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(37, 99, 235, .18), transparent 60%),
    radial-gradient(50% 45% at 90% 10%, rgba(168, 85, 247, .16), transparent 60%),
    radial-gradient(60% 60% at 50% 100%, rgba(6, 182, 212, .10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-darker) 100%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 28px; font-size: .95rem; font-weight: 600;
  border-radius: var(--radius-full); transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}
.btn .ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 55px rgba(37, 99, 235, .55); }
.btn-ghost { background: rgba(255, 255, 255, .04); color: var(--text-bright); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); border-color: var(--cyan); }
.btn-full { width: 100%; }

/* ===== NAV ===== */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(5, 13, 26, .8);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: var(--text-bright); }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad); color: #fff; font-weight: 800; box-shadow: var(--glow);
}
.nav-links { list-style: none; display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: .92rem; font-weight: 500; color: var(--text-dim); position: relative; }
.nav-links a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--grad); transition: width var(--transition);
}
.nav-links a:not(.nav-cta):hover, .nav-links a.active { color: var(--text-bright); }
.nav-links a.active::after { width: 100%; }
.nav-cta { padding: 9px 20px; border-radius: var(--radius-full); background: var(--grad); color: #fff !important; font-weight: 600; }
.nav-cta:hover { transform: translateY(-1px); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text-bright); border-radius: 2px; transition: var(--transition); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero { position: relative; z-index: 0; overflow: hidden; min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; }
.hero-inner { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; }

/* Red neuronal (canvas) sobre la aurora */
.hero-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }

/* Aurora / malla de degradado atenuada: ambiente de color detrás de la red */
.hero-aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero-aurora span {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: .4;
  mix-blend-mode: screen; will-change: transform;
}
.hero-aurora span:nth-child(1) { width: 620px; height: 620px; top: -180px; left: -80px;
  background: radial-gradient(circle, rgba(37,99,235,.8), transparent 70%); animation: aurora1 26s ease-in-out infinite; }
.hero-aurora span:nth-child(2) { width: 540px; height: 540px; top: -120px; right: -90px;
  background: radial-gradient(circle, rgba(168,85,247,.7), transparent 70%); animation: aurora2 30s ease-in-out infinite; }
.hero-aurora span:nth-child(3) { width: 700px; height: 700px; bottom: -320px; left: 28%;
  background: radial-gradient(circle, rgba(6,182,212,.6), transparent 70%); animation: aurora3 34s ease-in-out infinite; }
.hero-aurora span:nth-child(4) { width: 480px; height: 480px; top: 20%; left: 38%;
  background: radial-gradient(circle, rgba(59,130,246,.55), transparent 70%); animation: aurora4 22s ease-in-out infinite; }
.hero-aurora span:nth-child(5) { width: 420px; height: 420px; bottom: 5%; right: 8%;
  background: radial-gradient(circle, rgba(139,92,246,.5), transparent 70%); animation: aurora5 28s ease-in-out infinite; }
@keyframes aurora1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(120px,80px) scale(1.2); } }
@keyframes aurora2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-90px,110px) scale(1.15); } }
@keyframes aurora3 { 0%,100% { transform: translate(0,0) scale(1.1); } 50% { transform: translate(80px,-70px) scale(1.3); } }
@keyframes aurora4 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(-110px,60px) scale(1.25); } 66% { transform: translate(90px,90px) scale(.9); } }
@keyframes aurora5 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-70px,-90px) scale(1.2); } }


/* Entrada escalonada de los elementos del hero */
.hero-badge, .hero-title, .hero-subtitle, .hero-actions, .hero-trust {
  opacity: 0; animation: heroIn .9s cubic-bezier(.22,.61,.36,1) forwards;
}
.hero-badge { animation-delay: .10s; }
.hero-title { animation-delay: .24s; }
.hero-subtitle { animation-delay: .42s; }
.hero-actions { animation-delay: .58s; }
.hero-trust { animation-delay: .72s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(20px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 16px; margin-bottom: 28px;
  border: 1px solid var(--border); border-radius: var(--radius-full); background: rgba(255, 255, 255, .03);
  font-size: .82rem; color: var(--text-dim); font-family: var(--font);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(6, 182, 212, .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, .6); } 70% { box-shadow: 0 0 0 10px rgba(6, 182, 212, 0); } 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); } }
.hero-title { font-size: clamp(2.1rem, 6vw, 4rem); font-weight: 800; max-width: 15ch; margin-bottom: 22px; }
/* Shimmer sutil sobre el degradado del texto animado del titular */
.hero-title .grad-text { background-size: 220% auto; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 220% center; } }
.type-cursor { color: var(--cyan); font-weight: 300; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-subtitle { max-width: 620px; font-size: clamp(1rem, 2.2vw, 1.15rem); color: var(--text); margin-bottom: 36px; }
.hero-subtitle strong { color: var(--text-bright); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 56px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: center; }
.trust-item { display: flex; flex-direction: column; align-items: center; }
.trust-value { display: flex; align-items: baseline; gap: 3px; }
.trust-num { font-family: var(--font-head); font-size: 2rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.trust-suffix { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--cyan); }
.trust-label { font-size: .8rem; color: var(--text-dim); margin-top: 4px; }

.scroll-hint { position: absolute; z-index: 2; bottom: 28px; left: 50%; transform: translateX(-50%); opacity: .6; }
.mouse { display: block; width: 24px; height: 38px; border: 2px solid var(--text-dim); border-radius: 12px; position: relative; }
.wheel { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 3px; height: 7px; background: var(--cyan); border-radius: 2px; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 1; top: 7px; } 100% { opacity: 0; top: 18px; } }

/* ===== SECTIONS ===== */
.section { padding: var(--section-pad) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,.015), transparent); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-tag {
  display: inline-block; font-family: var(--font); font-size: .78rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cyan); padding-bottom: 10px; margin-bottom: 14px; position: relative;
}
.section-tag::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 42px; height: 2px; background: var(--grad); border-radius: 2px; }
.section-title { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 14px; }
.section-subtitle { font-size: 1.05rem; color: var(--text-dim); }

/* ===== CARDS GRID (servicios) — 3x3 ===== */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 28px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform var(--transition); }
.card:hover { transform: translateY(-5px); background: var(--bg-card-hover); border-color: rgba(37, 99, 235, .35); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.card:hover::before { transform: scaleX(1); }
.card-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 16px; background: var(--grad-soft); border: 1px solid var(--border); margin-bottom: 22px; }
.card-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { font-size: .93rem; color: var(--text-dim); }
.card em { color: var(--text); font-style: italic; }

/* ===== TEAM (filas a todo el ancho, avatar y texto alternando lado) ===== */
.team-list { display: flex; flex-direction: column; gap: 24px; max-width: 900px; margin: 0 auto; }
.team-card {
  display: flex; align-items: center; gap: 34px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 36px; transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.team-card:hover { transform: translateY(-3px); border-color: rgba(168, 85, 247, .35); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
/* Filas pares: avatar a la derecha, texto a la izquierda */
.team-card:nth-child(even) { flex-direction: row-reverse; }
.team-card:nth-child(even) .team-content { text-align: right; }
.team-card:nth-child(even) .team-tags { justify-content: flex-end; }

.team-media { flex-shrink: 0; }
.team-avatar {
  width: 116px; height: 116px; border-radius: 50%;
  display: grid; place-items: center; background: var(--grad-soft); border: 2px solid var(--border-strong);
  position: relative;
}
.team-avatar::after {
  content: attr(data-initials); font-family: var(--font-head); font-weight: 800; font-size: 2.1rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* Foto real: cubre el avatar (las iniciales quedan de fallback si la imagen falta) */
.team-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.team-content { flex: 1; min-width: 0; }
.team-name { font-size: 1.3rem; margin-bottom: 4px; }
.team-role { font-size: .92rem; color: var(--cyan); font-weight: 600; margin-bottom: 12px; }
.team-bio { font-size: .92rem; color: var(--text-dim); margin-bottom: 16px; line-height: 1.6; }
.team-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.team-tags span { font-size: .74rem; padding: 4px 11px; border-radius: var(--radius-full); background: rgba(255, 255, 255, .05); border: 1px solid var(--border); color: var(--text); }
.team-link { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 600; color: var(--text-dim); }
.team-link svg { width: 16px; height: 16px; }
.team-link:hover { color: var(--cyan); }

/* ===== TIMELINE ===== */
.timeline { list-style: none; max-width: 760px; margin: 0 auto; position: relative; }
.timeline::before { content: ''; position: absolute; left: 23px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--blue), var(--purple)); opacity: .4; }
.timeline-item { display: flex; gap: 24px; padding-bottom: 34px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-num {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-alt); border: 2px solid transparent; background-clip: padding-box;
  font-family: var(--font-head); font-weight: 700; color: var(--text-bright); position: relative; z-index: 1;
  box-shadow: 0 0 0 4px var(--bg);
}
.timeline-num { background: var(--grad); color: #fff; }
.timeline-body { padding-top: 4px; }
.timeline-body h3 { font-size: 1.25rem; margin-bottom: 8px; }
.timeline-body p { font-size: .95rem; color: var(--text-dim); }

/* ===== CASES ===== */
.cases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.case-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 26px; transition: transform var(--transition), border-color var(--transition); }
.case-card:hover { transform: translateY(-5px); border-color: rgba(6, 182, 212, .35); }
.case-sector { display: inline-block; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); margin-bottom: 12px; }
.case-card h3 { font-size: 1.15rem; margin-bottom: 16px; }
.case-field { font-size: .9rem; color: var(--text-dim); margin-bottom: 10px; }
.case-label { display: inline-block; font-weight: 700; color: var(--text-bright); font-family: var(--font-head); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; margin-right: 6px; }
.case-metric { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.metric-value { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; }
.metric-label { font-size: .8rem; color: var(--text-dim); }
.metric-label em { font-style: italic; opacity: .7; }

/* ===== STACK ===== */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.stack-cat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; }
.stack-cat h3 { font-size: 1.05rem; margin-bottom: 18px; color: var(--text-bright); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-size: .82rem; font-weight: 500; padding: 6px 13px; border-radius: 8px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border); color: var(--text);
  transition: border-color var(--transition), color var(--transition);
}
.chips span:hover { border-color: var(--cyan); color: var(--text-bright); }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.contact-info .section-head { text-align: left; margin: 0; }
.contact-info .section-tag::after { left: 0; transform: none; }
.contact-info .section-title { text-align: left; }
.contact-lead { text-align: left; margin-bottom: 28px; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-ico { flex-shrink: 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; background: var(--grad-soft); border: 1px solid var(--border); }
.contact-ico svg { width: 20px; height: 20px; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-label { display: block; font-size: .75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.contact-list a, .contact-list div > span:last-child { color: var(--text-bright); font-weight: 500; }
.contact-list a:hover { color: var(--cyan); }

.contact-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; display: flex; flex-direction: column; }
.form-group label { font-size: .85rem; font-weight: 500; color: var(--text); margin-bottom: 7px; }
.form-group input, .form-group select, .form-group textarea {
  font-family: inherit; font-size: .93rem; color: var(--text-bright);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group select { appearance: none; -webkit-appearance: none; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(6, 182, 212, .15);
}
.form-group textarea { resize: vertical; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-dim); }
.form-status { margin-top: 14px; font-size: .86rem; min-height: 1.2em; color: var(--text-dim); text-align: center; }
.form-status-ok { color: #34d399; }
.form-status-error { color: #f87171; }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--border); background: var(--bg-darker); margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: center; padding-top: 48px; padding-bottom: 32px; }
.footer-brand { max-width: 360px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: .9rem; color: var(--text-dim); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-nav a { font-size: .9rem; color: var(--text-dim); }
.footer-nav a:hover { color: var(--text-bright); }
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.footer-bottom p { font-size: .82rem; color: var(--text-dim); }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 90; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--grad); box-shadow: var(--glow);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== REVEAL ANIMATION ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  :root { --section-pad: 72px; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(5, 13, 26, .98); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border); padding: 12px 0;
    max-height: 0; overflow: hidden; transition: max-height var(--transition);
  }
  .nav-links.open { max-height: 460px; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 14px; }
  .nav-links .nav-cta { display: inline-block; margin: 8px auto; }
  .nav-toggle { display: flex; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  /* Las filas se apilan: avatar arriba y contenido centrado (sin alternar) */
  .team-card, .team-card:nth-child(even) { flex-direction: column; text-align: center; gap: 18px; padding: 28px 24px; }
  .team-content, .team-card:nth-child(even) .team-content { text-align: center; }
  .team-tags, .team-card:nth-child(even) .team-tags { justify-content: center; }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .hero-trust { gap: 26px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* Respeta prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  /* Sin animación de entrada, el hero debe ser visible igualmente */
  .hero-badge, .hero-title, .hero-subtitle, .hero-actions, .hero-trust { opacity: 1 !important; }
  /* La aurora se mantiene visible pero estática (sin deriva ni luz de cursor) */
}
