/* ============================================================
   WAYRASIMI — estilos personalizados
   Complementan a Tailwind: efectos que las utilidades no cubren.
   ============================================================ */

/* ---------- Tipografías locales (subconjunto latino de Google Fonts) ----------
   Cada archivo es variable: un bloque por peso, igual que los sirve Google,
   para que el render no cambie respecto al CDN. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/sora-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/sora-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/sora-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 800; font-display: swap; src: url('../assets/fonts/sora-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/jetbrains-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/jetbrains-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --night: #0b0f19;
  --abyss: #060912;
  --wind: #22d3ee;
  --bolt: #3b82f6;
  --violet: #8b5cf6;
  --line: rgba(148, 163, 184, 0.12);
}

html {
  scroll-padding-top: 6rem;
  background: var(--night);
}

::selection {
  background: rgba(34, 211, 238, 0.28);
  color: #fff;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--abyss); }
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 8px;
  border: 2px solid var(--abyss);
}
::-webkit-scrollbar-thumb:hover { background: #334155; }

:focus-visible {
  outline: 2px solid var(--wind);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--wind);
  color: #06202a;
  font-weight: 600;
  border-radius: 0 0 0.5rem 0.5rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ---------- Fondos decorativos ---------- */

.bg-grid {
  background-image: radial-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 40%, black 30%, transparent 75%);
}

.glow {
  width: 34rem;
  height: 34rem;
  border-radius: 9999px;
  filter: blur(90px);
}
.glow-cyan { background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 65%); }
.glow-blue { background: radial-gradient(circle, rgba(59, 130, 246, 0.14), transparent 65%); }

.section-divider {
  height: 1px;
  max-width: 76rem;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--line) 20%, rgba(34, 211, 238, 0.25) 50%, var(--line) 80%, transparent);
}

/* ---------- Tipografía y detalles ---------- */

.text-gradient {
  background: linear-gradient(100deg, #67e8f9 0%, var(--wind) 35%, var(--bolt) 75%, var(--violet) 105%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.06);
  color: var(--wind);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: 'Sora', sans-serif;
}

.pulse-dot {
  position: relative;
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: #34d399;
  flex-shrink: 0;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: rgba(52, 211, 153, 0.4);
  animation: pulse-ring 2.2s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}
.pulse-dot-sm { width: 6px; height: 6px; background: var(--wind); }
.pulse-dot-sm::after { background: rgba(34, 211, 238, 0.35); }

@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 1; }
  80%, 100% { transform: scale(1.8); opacity: 0; }
}

/* ---------- Glassmorphism ---------- */

.glass {
  background: linear-gradient(160deg, rgba(148, 163, 184, 0.07), rgba(148, 163, 184, 0.02));
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.68rem 1.3rem;
  border-radius: 0.85rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  will-change: transform;
}
.btn-lg { padding: 0.85rem 1.7rem; font-size: 0.95rem; }

.btn-primary {
  position: relative;
  overflow: hidden;
  color: #041016;
  background: linear-gradient(115deg, #67e8f9, var(--wind) 45%, var(--bolt));
  box-shadow: 0 8px 30px -10px rgba(34, 211, 238, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -10px rgba(34, 211, 238, 0.75);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary svg { transition: transform 0.25s ease; }
.btn-primary:hover svg { transform: translateX(3px); }

/* Brillo animado que recorre el botón */
.btn-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine {
  0% { left: -80%; }
  55%, 100% { left: 130%; }
}

.btn-ghost {
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.05);
}
.btn-ghost:hover {
  border-color: rgba(34, 211, 238, 0.5);
  color: #fff;
  background: rgba(34, 211, 238, 0.08);
  transform: translateY(-2px);
}

/* ---------- Selector de idioma ---------- */

.lang-toggle {
  font-family: 'Sora', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.55rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.05);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.lang-toggle:hover {
  border-color: rgba(34, 211, 238, 0.5);
  color: #fff;
  background: rgba(34, 211, 238, 0.08);
}

/* ---------- Proceso de trabajo ---------- */

.proc-track {
  position: absolute;
  top: 1.4rem;
  left: 3rem;
  right: 3rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.35) 12%, rgba(59, 130, 246, 0.35) 88%, transparent);
}
.proc-step { position: relative; }
.proc-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 9999px;
  background: var(--night);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--wind);
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.proc-step:hover .proc-node {
  border-color: var(--wind);
  box-shadow: 0 0 26px -4px rgba(34, 211, 238, 0.6);
  transform: scale(1.08);
}
.proc-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 1.1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #7dd3fc;
}

/* ---------- Tarjetas ---------- */

.card {
  position: relative;
  padding: 2rem;
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 20px 50px -20px rgba(34, 211, 238, 0.3);
}

/* Reflector que sigue al cursor (JS fija --mx / --my) */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, 0.09), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card:hover::after { opacity: 1; }

.card-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.9rem;
  color: var(--wind);
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: linear-gradient(150deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.06));
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card-icon svg { width: 1.5rem; height: 1.5rem; }
.card:hover .card-icon {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 0 28px -6px rgba(34, 211, 238, 0.55);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}
.card-tags li {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.28rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #94a3b8;
  transition: border-color 0.25s ease, color 0.25s ease;
}
/* Las que llevan icono respiran menos por la izquierda */
.card-tags li[data-tech] { padding-left: 0.5rem; }
.card-tags li[data-tech]:hover {
  border-color: rgba(34, 211, 238, 0.32);
  color: #cbd5e1;
}

/* ---------- Iconos de tecnología ---------- */

/* El sprite vive al inicio del <body>; solo se referencia con <use>. */
.icon-sprite { display: none; }

.tag-i {
  width: 0.88rem;
  height: 0.88rem;
  flex: none;
  fill: currentColor;
  color: var(--i, #64748b);
  opacity: 0.85;
  transition: opacity 0.25s ease;
}
.card-tags li:hover .tag-i { opacity: 1; }

/* Color de marca por tecnología, ajustado para fondo oscuro */
.card-tags li[data-tech='kotlin']     { --i: #7f52ff; }
.card-tags li[data-tech='compose']    { --i: #4285f4; }
.card-tags li[data-tech='nestjs']     { --i: #e0234e; }
.card-tags li[data-tech='angular']    { --i: #e23237; }
.card-tags li[data-tech='react']      { --i: #61dafb; }
.card-tags li[data-tech='typescript'] { --i: #3178c6; }
.card-tags li[data-tech='prisma']     { --i: #e2e8f0; }
.card-tags li[data-tech='postgresql'] { --i: #6ba5d9; }
.card-tags li[data-tech='postgis']    { --i: #4fb0c6; }
.card-tags li[data-tech='mongodb']    { --i: #47a248; }
.card-tags li[data-tech='redis']      { --i: #ff4438; }
.card-tags li[data-tech='python']     { --i: #ffd343; }
.card-tags li[data-tech='fastapi']    { --i: #14b8a6; }
.card-tags li[data-tech='express']    { --i: #9ca3af; }
.card-tags li[data-tech='socketio']   { --i: #e2e8f0; }
.card-tags li[data-tech='firebase']   { --i: #ffca28; }
.card-tags li[data-tech='maplibre']   { --i: #5b8def; }
.card-tags li[data-tech='osrm']       { --i: #7dd3fc; }
.card-tags li[data-tech='docker']     { --i: #2496ed; }
.card-tags li[data-tech='nginx']      { --i: #2fbf71; }
.card-tags li[data-tech='dokploy']    { --i: #a78bfa; }
.card-tags li[data-tech='n8n']        { --i: #ea4b71; }
.card-tags li[data-tech='ycloud']     { --i: #e2e8f0; }
.card-tags li[data-tech='webhooks']   { --i: #c084fc; }
.card-tags li[data-tech='ast']        { --i: #a78bfa; }
.card-tags li[data-tech='compiler']   { --i: #22d3ee; }

/* ---------- Pilares (Factor Sillar) ---------- */

.pillar {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.pillar-num {
  font-family: 'Sora', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(34, 211, 238, 0.45);
  flex-shrink: 0;
  transition: -webkit-text-stroke-color 0.35s ease;
}
.pillar:hover .pillar-num { -webkit-text-stroke-color: var(--wind); }

.misti { opacity: 0.9; will-change: transform; }

/* Ráfagas del Misti: los guiones fluyen como viento */
.misti-dash { animation: dash-flow 5s linear infinite; }
.misti-dash-slow { animation-duration: 8s; }
@keyframes dash-flow {
  to { stroke-dashoffset: -40; }
}

/* ---------- Ventana de código ---------- */

.code-window {
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(2, 6, 16, 0.9), 0 0 60px -30px rgba(34, 211, 238, 0.35);
  animation: hover-float 7s ease-in-out infinite;
}

/* En móvil el código cabe entero bajando cuerpo y márgenes */
@media (max-width: 640px) {
  .code-window pre {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
    font-size: 11px;
  }
}

.tok-c { color: #64748b; }
.tok-k { color: #22d3ee; }
.tok-s { color: #86efac; }
.tok-f { color: #93c5fd; }
.tok-v { color: #fbbf24; }
.tok-n { color: #c4b5fd; }

html.js .code-line {
  opacity: 0;
  transform: translateX(10px);
  display: inline-block;
  min-width: 1px;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
html.js .code-line.on {
  opacity: 1;
  transform: translateX(0);
}

.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 4px;
  vertical-align: text-bottom;
  background: var(--wind);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.float-badge {
  position: absolute;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-radius: 0.9rem;
  font-size: 0.8rem;
  color: #cbd5e1;
  box-shadow: 0 16px 40px -18px rgba(2, 6, 16, 0.9);
  animation: hover-float 6s ease-in-out infinite;
}
.animation-delay-2 { animation-delay: -3s; }

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

/* ---------- Navbar ---------- */

#navbar.nav-scrolled {
  background: rgba(11, 15, 25, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
#navbar.nav-scrolled nav { height: 4.25rem; }
#navbar nav { transition: height 0.3s ease; }

.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
  transition: color 0.25s ease;
  padding: 0.25rem 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--wind), var(--bolt));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.mobile-menu {
  background: rgba(7, 9, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.mobile-link {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  color: #e2e8f0;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.mobile-link:hover { background: rgba(34, 211, 238, 0.08); color: var(--wind); }

.scroll-hint {
  color: #64748b;
  animation: bounce-soft 2.4s ease-in-out infinite;
  transition: color 0.25s ease;
}
.scroll-hint:hover { color: var(--wind); }
@keyframes bounce-soft {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Marquee (stack tecnológico) ---------- */

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee-track.marquee-reverse { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-group {
  display: flex;
  gap: 1rem;
  padding-right: 1rem;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1.5rem;
  border-radius: 9999px;
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.tech-chip:hover {
  border-color: rgba(34, 211, 238, 0.45);
  color: #fff;
  transform: translateY(-3px);
}
.tech-chip .dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: var(--c, var(--wind));
  box-shadow: 0 0 12px var(--c, var(--wind));
}

/* ---------- Mascota / equipo ---------- */

.mascot-card {
  padding: 1.1rem;
  border-radius: 1.5rem;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.mascot-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 30px 70px -30px rgba(34, 211, 238, 0.35);
}

/* ---------- Contacto ---------- */

.contact-ico {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.06);
  color: var(--wind);
  flex-shrink: 0;
}
.contact-ico svg { width: 1.1rem; height: 1.1rem; }

.made-in {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  border-radius: 1rem;
  border-color: rgba(34, 211, 238, 0.22);
  max-width: 26rem;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(6, 9, 18, 0.6);
  color: #e2e8f0;
  font-size: 0.92rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: #475569; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
.field textarea { resize: vertical; min-height: 7rem; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.field select { appearance: none; cursor: pointer; }
.field select option { background: var(--abyss); }

.form-success {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 24rem;
  gap: 0;
}

/* ---------- WhatsApp flotante ---------- */

.wsp-float {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 9999px;
  background: linear-gradient(140deg, #2be065, #128c7e);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(37, 211, 102, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: wsp-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.4s both;
}
.wsp-float svg { width: 1.75rem; height: 1.75rem; }
.wsp-float:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 16px 44px -10px rgba(37, 211, 102, 0.75);
}
.wsp-float::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(37, 211, 102, 0.55);
  animation: wsp-ring 2.6s ease-out 2.2s infinite;
}
@keyframes wsp-ring {
  0% { transform: scale(1); opacity: 0.9; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}
@keyframes wsp-in {
  from { transform: translateY(90px) scale(0.4); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---------- Easter egg: Wayra asomándose ---------- */

.peek-wrap {
  position: absolute;
  top: 1px;
  right: clamp(1.5rem, 10vw, 9rem);
  transform: translateY(-100%);
  z-index: 5;
  pointer-events: none;
}
.peek-clip {
  height: 5.5rem;
  width: 7.5rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
#wayra-peek {
  pointer-events: auto;
  width: 6rem;
  height: 6rem;
  border-radius: 9999px;
  border: 2px solid rgba(34, 211, 238, 0.5);
  overflow: hidden;
  background: var(--night);
  cursor: pointer;
  transform: translateY(103%);
  transition: transform 0.8s cubic-bezier(0.34, 1.3, 0.5, 1);
  box-shadow: 0 -8px 28px -8px rgba(34, 211, 238, 0.4);
}
#wayra-peek img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.peek-wrap.peeking #wayra-peek { transform: translateY(16%); }
.peek-wrap.peeking #wayra-peek:hover {
  transform: translateY(6%);
  animation: wiggle 0.7s ease;
}
@keyframes wiggle {
  0%, 100% { rotate: 0deg; }
  25% { rotate: -7deg; }
  70% { rotate: 6deg; }
}

.peek-bubble {
  position: absolute;
  bottom: calc(100% + 0.6rem);
  right: 0;
  width: max-content;
  max-width: 15rem;
  padding: 0.7rem 0.95rem;
  border-radius: 0.9rem 0.9rem 0.2rem 0.9rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #e2e8f0;
  pointer-events: none;
  background: rgba(11, 15, 25, 0.92);
  animation: bubble-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes bubble-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Footer ---------- */

.footer-link { transition: color 0.25s ease; }
.footer-link:hover { color: var(--wind); }

.social-btn {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.8rem;
  border: 1px solid var(--line);
  color: #94a3b8;
  transition: all 0.25s ease;
}
.social-btn:hover {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.08);
  transform: translateY(-2px);
}

/* ---------- Proyectos: carrusel ---------- */

.proj-nav {
  display: flex;
  gap: 0.5rem;
}
.proj-arrow {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 0.8rem;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.05);
  color: #cbd5e1;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}
.proj-arrow svg { width: 1.15rem; height: 1.15rem; }
.proj-arrow:hover:not(:disabled) {
  border-color: rgba(34, 211, 238, 0.5);
  color: #fff;
  background: rgba(34, 211, 238, 0.08);
  transform: translateY(-2px);
}
.proj-arrow:disabled { opacity: 0.3; cursor: default; }

.proj-viewport {
  margin-top: 3.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Aire lateral y vertical: si no, el translateY(-5px) y la sombra
     de .card:hover se recortan contra el overflow del carril. */
  margin-inline: -0.5rem;
  padding: 0.75rem 0.5rem 1.75rem;
}
.proj-viewport::-webkit-scrollbar { display: none; }

.proj-track {
  display: flex;
  gap: 1.25rem;
}

.proj-slide {
  flex: 0 0 86%;
  scroll-snap-align: start;
}
@media (min-width: 640px) { .proj-slide { flex-basis: 52%; } }
@media (min-width: 1024px) { .proj-slide { flex-basis: 38%; } }

/* Anula el padding de .card: la tarjeta del carrusel es más compacta */
.proj-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.1rem 1.1rem 1.5rem;
}

.proj-shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.8rem;
  border: 1px solid var(--line);
  background: var(--abyss);
}
.proj-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Los archivos ya vienen recortados a 16:10 sobre la zona informativa
     de cada captura; el anclaje solo cubre diferencias de redondeo. */
  object-position: left top;
  filter: saturate(0.9);
  transition: filter 0.4s ease;
}
.card:hover .proj-shot img { filter: saturate(1); }

.proj-sector {
  margin-top: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wind);
  opacity: 0.85;
}
.proj-title {
  margin-top: 0.6rem;
  font-family: 'Sora', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}
.proj-lead {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #94a3b8;
}
.proj-stat {
  align-self: flex-start;
  margin-top: 1rem;
}
.proj-card .card-tags { margin-top: 0.9rem; }

.proj-open {
  /* Empuja el enlace al pie: todas las tarjetas lo alinean a la misma altura */
  margin-top: auto;
  padding-top: 1.3rem;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wind);
  transition: color 0.25s ease;
}
.proj-open svg { width: 1rem; height: 1rem; transition: transform 0.25s ease; }
.proj-open:hover { color: #67e8f9; }
.proj-open:hover svg { transform: translateX(4px); }

/* ---------- El quipu: un nudo por proyecto ----------
   Wayra registra cada proyecto en su quipu (ver sección El Equipo);
   aquí ese registro es el control del carrusel. */

/* El cordel va exactamente de nudo a nudo: se lee como una cuerda
   tendida, no como una línea que cruza la sección */
.quipu {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 24rem;
  margin: 0.5rem auto 0;
}
.quipu-cord {
  position: absolute;
  top: 50%;
  left: 1.35rem;
  right: 1.35rem;
  height: 1px;
  background: rgba(148, 163, 184, 0.3);
}
/* Tramo recorrido: el ancho lo fija el JS en --done */
.quipu-cord-done {
  right: auto;
  width: var(--done, 0%);
  background: rgba(34, 211, 238, 0.7);
  transition: width 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.quipu-knot {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 0.6rem;
}
/* El nudo: radios asimétricos para que se lea como nudo, no como punto */
.quipu-knot::after {
  content: '';
  width: 15px;
  height: 15px;
  border-radius: 58% 42% 45% 55% / 52% 56% 44% 48%;
  background: #1e293b;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.4);
  transform: rotate(-8deg);
  transition: width 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), background 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
.quipu-knot:hover::after {
  background: #334155;
  transform: rotate(-8deg) scale(1.2);
}
/* Los proyectos que están a la vista en el carril */
.quipu-knot.a-la-vista::after {
  background: rgba(34, 211, 238, 0.45);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.7);
}
/* El primero de ellos: el nudo apretado sobre el cordel */
.quipu-knot[aria-current='true']::after {
  width: 27px;
  background: linear-gradient(115deg, #67e8f9, var(--wind));
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.5), 0 0 22px -2px rgba(34, 211, 238, 0.75);
}

/* ---------- Proyectos: exploración técnica ---------- */

.proj-lab {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.proj-lab-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
}
.proj-lab-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cbd5e1;
}
/* Apagado, pero con contraste AA (4,96:1 sobre --night) */
.proj-lab-sub { font-size: 0.85rem; color: #748398; }

.proj-lab-grid {
  margin-top: 1.75rem;
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .proj-lab-grid { grid-template-columns: repeat(3, 1fr); }
}
/* Deliberadamente más apagadas que las del carrusel: son secundarias */
.proj-lab-card {
  padding: 1.35rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.025);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.proj-lab-card:hover {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.05);
}
.proj-lab-card h4 {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}
.proj-lab-card p {
  margin-top: 0.55rem;
  font-size: 0.87rem;
  line-height: 1.6;
  color: #94a3b8;
}
.proj-lab-card .card-tags { margin-top: 1rem; }

/* ---------- Proyectos: caso en detalle ---------- */

.proj-modal {
  position: relative;
  width: min(58rem, calc(100vw - 2rem));
  max-height: 88vh;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 1.25rem;
  background: #0d1220;
  color: #cbd5e1;
  box-shadow: 0 40px 90px -30px rgba(2, 6, 16, 0.95);
}
.proj-modal::backdrop {
  background: rgba(3, 6, 14, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.proj-modal[open] { animation: modal-in 0.32s cubic-bezier(0.2, 0.6, 0.2, 1); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
/* Bloquea el scroll del fondo mientras el caso está abierto */
html:has(dialog[open]) { overflow: hidden; }

/* height:0 → el botón flota sobre la imagen sin ocupar espacio, y sigue
   visible al desplazar el contenido del caso */
.proj-modal > form {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 0;
  display: flex;
  justify-content: flex-end;
}
.proj-modal-x {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin: 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #e2e8f0;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.proj-modal-x svg { width: 1.05rem; height: 1.05rem; }
.proj-modal-x:hover {
  border-color: rgba(34, 211, 238, 0.55);
  color: #fff;
  transform: rotate(90deg);
}

.proj-modal-shot {
  display: grid;
  place-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.08), transparent 70%), var(--abyss);
}
/* max-height acomoda tanto las capturas apaisadas como la vertical */
.proj-modal-shot img {
  max-height: 40vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
}

.proj-modal-body { padding: 1.75rem; }
.proj-modal-title {
  margin-top: 0.5rem;
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}
.proj-bullets {
  margin-top: 1.35rem;
  display: grid;
  gap: 0.7rem;
}
@media (min-width: 768px) {
  .proj-bullets { grid-template-columns: 1fr 1fr; gap: 0.75rem 1.75rem; }
}
.proj-bullets li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #94a3b8;
}
.proj-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  background: rgba(34, 211, 238, 0.65);
}
.proj-modal-body .card-tags { margin-top: 1.6rem; }
/* "Quiero algo así" y "Ver caso completo", lado a lado */
.proj-modal-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* ---------- Enlaces de tarjeta a su página ----------
   Mismo aspecto que .proj-open, pero son <a> a otra URL */

.card-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin-top: 1.5rem; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wind);
  transition: color 0.25s ease;
}
.card-link svg { width: 1rem; height: 1rem; transition: transform 0.25s ease; }
.card-link:hover { color: #67e8f9; }
.card-link:hover svg { transform: translateX(4px); }
/* En una tarjeta de proyecto el enlace va al pie, como .proj-open */
.proj-card .card-link { margin-top: auto; padding-top: 1.3rem; align-self: flex-start; }
/* Toda la tarjeta clicable cuando lleva un único enlace (casos) */
.card-stretch .card-link::after { content: ''; position: absolute; inset: 0; }

/* ---------- Páginas interiores (servicios y casos) ---------- */

.migas ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: #94a3b8; }
.migas li + li::before { content: '/'; margin-right: 0.4rem; color: #475569; }
.migas a { transition: color 0.25s ease; }
.migas a:hover { color: #fff; }
.migas [aria-current='page'] { color: #cbd5e1; }

/* Lista con marca de verificación */
.lista-check { display: grid; gap: 0.85rem; }
.lista-check li { position: relative; padding-left: 1.9rem; line-height: 1.65; color: #94a3b8; }
.lista-check li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 9999px;
  background: rgba(34, 211, 238, 0.12)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322d3ee' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 0.65rem no-repeat;
}
.lista-check strong { color: #e2e8f0; font-weight: 600; }

/* Preguntas frecuentes con <details> nativo */
.faq details { border-radius: 1rem; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  color: #fff;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--wind);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 1.5rem 1.4rem; line-height: 1.7; color: #94a3b8; }

/* Dato destacado de un caso: <dt> descripción, <dd> cifra (se ve primero) */
.dato-caso {
  display: flex;
  flex-direction: column;
  border-left: 2px solid rgba(34, 211, 238, 0.5);
  padding-left: 1rem;
}

/* ---------- Animaciones de entrada ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
html.js .reveal[data-delay='1'] { transition-delay: 0.1s; }
html.js .reveal[data-delay='2'] { transition-delay: 0.2s; }
html.js .reveal[data-delay='3'] { transition-delay: 0.3s; }
html.js .reveal[data-delay='4'] { transition-delay: 0.4s; }
html.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  html.js .reveal, html.js .code-line { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  #wind-canvas { display: none; }
  .proj-viewport { scroll-behavior: auto; }
  .proj-modal[open] { animation: none; }
}
