/* =========================================================
   Portafolio — Juan David Escobar Suárez
   Estilo: "Papel y tinta" — claro, cuadrícula bento,
   acento azul eléctrico y toques lima
   ========================================================= */

/* ---------- Fuentes (alojadas localmente) ---------- */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/inter.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --bg: #f3f1ec;            /* papel cálido */
  --surface: #ffffff;
  --surface-2: #ebe8e1;
  --ink: #111110;           /* tinta */
  --ink-2: #4f4c46;
  --ink-3: #8b877e;
  --line: rgba(17, 17, 16, 0.1);
  --line-strong: rgba(17, 17, 16, 0.2);

  --accent: #3b34ff;        /* azul eléctrico */
  --accent-2: #2a23e0;
  --accent-soft: rgba(59, 52, 255, 0.08);
  --lime: #d7f36a;          /* resaltador */

  --dark: #131312;
  --dark-2: #1d1d1b;
  --on-dark: #f3f1ec;
  --on-dark-2: rgba(243, 241, 236, 0.62);
  --line-dark: rgba(243, 241, 236, 0.12);

  --wa: #25d366;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --radius: 26px;
  --radius-sm: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 2px rgba(17, 17, 16, 0.04), 0 12px 32px -12px rgba(17, 17, 16, 0.12);
  --shadow-lg: 0 2px 4px rgba(17, 17, 16, 0.04), 0 30px 60px -20px rgba(17, 17, 16, 0.22);

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
strong { font-weight: 600; }

::selection { background: var(--lime); color: var(--ink); }

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

.container { width: min(1240px, 100% - 40px); margin-inline: auto; }
.text-muted { color: var(--ink-3); }

/* Fondo: cuadrícula suave de papel */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
}

/* Resplandor azul que sigue al cursor */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 52, 255, 0.07), transparent 65%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.6s;
}
body.has-pointer .cursor-glow { opacity: 1; }

/* ---------- Tipografía compartida ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section__title,
.about__statement,
.contact__title {
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.section__title em,
.about__statement em,
.contact__title em,
.hero__title em {
  letter-spacing: -0.02em;
  padding-right: 0.06em;
}
.section__title {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  margin-top: 1.25rem;
}
.section__title em { color: var(--accent); }

.section__lead {
  color: var(--ink-2);
  max-width: 34rem;
  font-size: 1.0625rem;
}

/* ---------- Botones ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 52px;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.98rem;
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ease);
}
.btn:hover svg { transform: translate(2px, -2px); }

.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--accent); box-shadow: 0 14px 30px -12px rgba(59, 52, 255, 0.7); }

.btn--order {
  height: 58px;
  padding: 0 1.8rem;
  background: var(--accent);
  color: #fff;
  font-size: 1.02rem;
  box-shadow: 0 16px 34px -14px rgba(59, 52, 255, 0.75);
}
.btn--order svg { fill: var(--lime); stroke: none; }
.btn--order:hover { background: var(--accent-2); box-shadow: 0 20px 40px -14px rgba(59, 52, 255, 0.9); }
.btn--order:hover svg { transform: rotate(90deg) scale(1.1); }

.btn--ghost {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink); }

/* ---------- Navegación ---------- */
.nav {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
}
.nav__inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
  padding: 0 0.6rem 0 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  transition: box-shadow 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.is-scrolled .nav__inner { background: rgba(255, 255, 255, 0.9); box-shadow: var(--shadow); }

.nav__logo { display: flex; align-items: center; gap: 0.65rem; font-weight: 600; letter-spacing: -0.02em; }
.nav__logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}
.nav__logo:hover .nav__logo-mark { transform: rotate(-8deg); background: var(--accent); }
.nav__logo-text { font-size: 1.05rem; }

.nav__links { display: flex; align-items: center; gap: 0.25rem; }
.nav__links a {
  font-size: 0.92rem;
  color: var(--ink-2);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.25s, background 0.25s;
}
.nav__links a:hover { color: var(--ink); background: var(--surface-2); }

.nav__links .nav__lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.25rem;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.nav__lang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.nav__cta {
  margin-left: 0.4rem;
  height: 46px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.3s var(--ease);
}
.nav__cta:hover { background: var(--accent); }

.nav__toggle { display: none; }

/* ---------- Historia cinemática (inicio) ----------
   Sin JS o con "reducir movimiento": capítulos uno debajo del otro.
   Con JS (.is-live): escenario fijo + partículas 3D que cambian de forma al bajar. */
.story {
  position: relative;
  background: #0b0b12;
  color: var(--on-dark);
}
.story__canvas { display: none; }

.story__chapter {
  width: min(1240px, 100% - 40px);
  margin-inline: auto;
  padding: 3.5rem 0;
}
.story__chapter--intro {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding-top: 130px;
}

.story .hero__meta { background: rgba(255, 255, 255, 0.07); color: var(--on-dark-2); }
.story .hero__meta-sep { color: rgba(243, 241, 236, 0.35); }
.hero__title {
  font-size: clamp(3.2rem, 9vw, 8.5rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.055em;
}
.hero__line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__word {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease);
}
.hero__line:nth-child(2) .hero__word { transition-delay: 0.1s; }
.is-loaded .hero__word { transform: none; }
.hero__title em { color: #8f8aff; font-size: 1.08em; letter-spacing: -0.02em; padding-right: 0.06em; }

.hero__role { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--on-dark-2); max-width: 34rem; line-height: 1.5; }
.hero__role strong { color: var(--on-dark); }
.story .text-muted { color: rgba(243, 241, 236, 0.45); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.story .btn--ghost { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.2); color: var(--on-dark); }
.story .btn--ghost:hover { border-color: var(--on-dark); background: rgba(255, 255, 255, 0.12); }
.hero__quick { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.story .social { background: transparent; border-color: rgba(255, 255, 255, 0.18); color: var(--on-dark); }
.story .social:hover { background: var(--on-dark); color: var(--ink); }

.hero__meta {
  display: inline-flex;
  align-self: flex-start;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}
.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1fbf5b;
  flex: none;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #1fbf5b;
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.story__kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}
.story__title {
  margin: 1rem 0 1.25rem;
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.story__title em { display: block; color: #8f8aff; letter-spacing: -0.02em; padding-right: 0.06em; }
.story__text { max-width: 30rem; font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--on-dark-2); }

.story__hint, .story__hud { display: none; }

/* --- Modo cinemático --- */
.story.is-live { height: 820vh; }
.story.is-live .story__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.story.is-live .story__canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.story.is-live .story__chapter {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  padding: 0;
  pointer-events: none;
  opacity: var(--o, 0);
  transform: translateY(calc(-50% + (1 - var(--o, 0)) * 40px));
  filter: blur(calc((1 - var(--o, 0)) * 8px));
  will-change: opacity, transform;
}
.story.is-live .story__chapter > * { max-width: 34rem; }
.story.is-live .story__chapter--intro > * { max-width: none; }
.story.is-live .story__chapter.is-active { pointer-events: auto; }
.story.is-live .story__chapter--intro { padding-top: 0; transform: translateY(calc(-46% - (1 - var(--o, 0)) * 60px)); }
.story.is-live .story__chapter:not(.story__chapter--final) {
  text-shadow: 0 2px 30px rgba(11, 11, 18, 0.9);
}
.story__chapter--final .btn { margin-top: 1.75rem; }
.story.is-live .story__chapter--final { color: var(--ink); }
.story.is-live .story__chapter--final .story__kicker { color: var(--accent); }
.story.is-live .story__chapter--final .story__title em { color: var(--accent); }
.story.is-live .story__chapter--final .story__text { color: var(--ink-2); }

.story.is-live .story__hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 1.1rem 0.55rem 0.6rem;
  border: 1px solid rgba(215, 243, 106, 0.35);
  border-radius: 999px;
  background: rgba(11, 11, 18, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 0 rgba(215, 243, 106, 0.35);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark);
  opacity: var(--o, 1);
  transform: translateX(-50%);
  pointer-events: none;
  animation: hintIn 0.9s var(--ease) 1.2s both, hintPulse 2.4s ease-out 2.1s infinite;
}
/* Ratón / dedo: cápsula con un punto lima que baja */
.story__hint-icon {
  position: relative;
  flex: none;
  width: 22px;
  height: 34px;
  border: 1.5px solid var(--on-dark-2);
  border-radius: 12px;
}
.story__hint-icon i {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 4px;
  height: 7px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--lime);
  animation: hintWheel 1.6s var(--ease) infinite;
}
/* Dos flechas que caen en cascada */
.story__hint-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 0.1rem;
}
.story__hint-arrows i {
  width: 8px;
  height: 8px;
  margin-top: -3px;
  border-right: 2px solid var(--lime);
  border-bottom: 2px solid var(--lime);
  transform: rotate(45deg);
  animation: hintArrow 1.6s ease-in-out infinite;
}
.story__hint-arrows i:nth-child(2) { animation-delay: 0.2s; }
@keyframes hintIn { from { filter: opacity(0); translate: 0 16px; } to { filter: opacity(1); translate: 0 0; } }
@keyframes hintWheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(11px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
@keyframes hintArrow {
  0%, 100% { opacity: 0.2; translate: 0 -2px; }
  50% { opacity: 1; translate: 0 3px; }
}
@keyframes hintPulse {
  0% { box-shadow: 0 0 0 0 rgba(215, 243, 106, 0.35); }
  70%, 100% { box-shadow: 0 0 0 14px rgba(215, 243, 106, 0); }
}

.story.is-live .story__hud {
  position: absolute;
  left: max(20px, (100% - 1240px) / 2);
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--on-dark-2);
  opacity: var(--hud, 1);
}
.story__rail { display: flex; gap: 6px; }
.story__rail i {
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.4s, width 0.4s var(--ease);
}
.story__rail i.is-on { background: var(--lime); width: 32px; }

/* ---------- Sobre mí: palabras que se encienden al bajar ---------- */
.about__statement .w { opacity: 0.14; transition: opacity 0.35s var(--ease); }
.about__statement .w.is-on { opacity: 1; }
.about__photo {
  position: relative;
  margin-top: 2.25rem;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.about__photo:hover img { transform: scale(1.05); }
.about__photo figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-family: var(--mono);
  font-size: 0.74rem;
}

/* ---------- Tarjeta final de servicios ---------- */
.project--cta { background: var(--accent); border-color: var(--accent); color: #fff; }
.project--cta .project__desc { color: rgba(255, 255, 255, 0.82); }
.project--cta .project__title { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.project--cta .btn--order { background: var(--lime); color: var(--ink); box-shadow: none; }
.project--cta .btn--order:hover { background: #fff; }
.project--cta .btn--order svg { fill: none; stroke: currentColor; }
.project--cta::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.18), transparent 45%); }
.project__cta-mark svg { width: 44px; height: 44px; fill: var(--lime); margin-bottom: 2rem; }
.projects__grid > .project--cta { grid-column: 1 / -1; }

/* ---------- Servicios: riel horizontal al bajar ---------- */
.hscroll.is-live { padding: 0; height: var(--h, 300vh); }
.hscroll.is-live .hscroll__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
  overflow: hidden;
  padding-top: 70px;
}
.hscroll.is-live .section__head { margin-bottom: 0; }
.hscroll.is-live .section__title { font-size: clamp(2.5rem, 5vw, 4.25rem); }
.hscroll.is-live .hscroll__track {
  display: flex;
  gap: 18px;
  width: max-content;
  padding-inline: max(20px, (100vw - 1240px) / 2);
  transform: translate3d(var(--x, 0px), 0, 0);
  will-change: transform;
}
.hscroll.is-live .hscroll__track > .project {
  flex: 0 0 min(500px, 40vw);
  display: flex;
  flex-direction: column;
}
.hscroll.is-live .hscroll__track > .project:first-child .project__visual { margin: 10px 10px 0; min-height: 0; aspect-ratio: 16 / 9; }
.hscroll.is-live .hscroll__track > .project:first-child .project__body { padding: 1.5rem 2rem 2rem; justify-content: flex-start; }
.hscroll.is-live .hscroll__track > .project:first-child .project__title { font-size: 1.75rem; }
.hscroll.is-live .project__visual { aspect-ratio: 16 / 9; }
.hscroll.is-live .project__body { padding: 1.5rem 2rem 2rem; }
.hscroll.is-live .project--cta .project__body { justify-content: center; }
.hscroll.is-live .project__photo { transform: scale(1.15) translateX(var(--px, 0px)); }
.hscroll.is-live .project:hover .project__photo { transform: scale(1.2) translateX(var(--px, 0px)); }

@media (max-width: 860px) {
  .story.is-live { height: 760vh; }
  .story.is-live .story__chapter:not(.story__chapter--intro) { top: auto; bottom: 90px; transform: translateY(calc((1 - var(--o, 0)) * 40px)); }
  .story.is-live .story__chapter--intro { top: auto; bottom: 70px; transform: translateY(calc((1 - var(--o, 0)) * -40px)); gap: 1.1rem; }
  .story.is-live .story__hint { top: 96px; bottom: auto; font-size: 0.68rem; white-space: nowrap; }
  .story.is-live .story__hud { left: 20px; bottom: 34px; }
  .story__title { font-size: clamp(2.3rem, 11vw, 3.4rem); }
  .story__text { font-size: 0.98rem; }
  .story .hero__actions .btn { flex: 1 1 auto; }
  .story.is-live .hero__quick { display: none; }
}

/* ---------- Cinta animada ---------- */
.marquee {
  overflow: hidden;
  padding: 1.15rem 0;
  margin: 48px 0 0;
  background: var(--ink);
  color: var(--on-dark);
  transform: rotate(-1.2deg) scale(1.02) skewX(var(--skew, 0deg));
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee span {
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.marquee span:nth-of-type(odd) { font-family: var(--serif); font-style: italic; font-weight: 400; }
.marquee i { font-style: normal; color: var(--lime); font-size: 1.1rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; }

.section__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 4rem;
  flex-wrap: wrap;
}
.section__head--row .section__lead { padding-bottom: 0.5rem; }
.skills__lead, .faq__lead { margin-top: 1.25rem; }

/* ---------- Tarjetas ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
  isolation: isolate;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: -1;
}
.card:hover::before { opacity: 1; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }

/* ---------- Sobre mí ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.about__statement { font-size: clamp(2.2rem, 4.6vw, 4rem); }
.about__statement em {
  color: var(--ink);
  background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%);
  padding: 0 0.12em;
}

.about__body p { color: var(--ink-2); margin-bottom: 1.25rem; font-size: 1.08rem; }
.about__body strong { color: var(--ink); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 2.25rem;
}
.stat {
  padding: 1.25rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.stat:first-child { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.stat:first-child .stat__label { color: var(--on-dark-2); }
.stat__value {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}
.stat:nth-child(2) .stat__value { color: var(--accent); }
.stat__label { display: block; margin-top: 0.6rem; font-size: 0.85rem; line-height: 1.35; color: var(--ink-3); }

/* ---------- Habilidades ---------- */
.skills__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skill-card { padding: 2rem; display: flex; flex-direction: column; }
.skill-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3rem; }
.skill-card__index { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3); }
.skill-card__icon {
  width: 52px;
  height: 52px;
  padding: 13px;
  border-radius: 16px;
  background: var(--bg);
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s var(--ease), background 0.4s, stroke 0.4s;
}
.skill-card:hover .skill-card__icon { transform: rotate(-10deg); background: var(--lime); }
.skill-card__title { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.035em; }
.skill-card__desc { color: var(--ink-2); margin: 0.5rem 0 1.5rem; font-size: 0.98rem; }

.skill-card--accent { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.skill-card--accent .skill-card__desc,
.skill-card--accent .skill-card__index { color: var(--on-dark-2); }
.skill-card--accent .skill-card__icon { background: var(--accent); stroke: #fff; }
.skill-card--accent:hover .skill-card__icon { background: var(--lime); stroke: var(--ink); }
.skill-card--accent .tags li { background: rgba(255, 255, 255, 0.07); border-color: var(--line-dark); color: var(--on-dark); }
.skill-card--accent::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(59, 52, 255, 0.35), transparent 45%); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }
.tags li {
  font-size: 0.8rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  transition: border-color 0.25s, color 0.25s;
}
.tags li:hover { border-color: var(--accent); color: var(--accent); }
.tags--sm li { font-size: 0.76rem; }

/* ---------- Servicios ---------- */
.projects__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.project { overflow: hidden; display: flex; flex-direction: column; }

/* El primero ocupa todo el ancho, con la foto a la izquierda */
.projects__grid > .project:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}
.projects__grid > .project:first-child .project__visual { aspect-ratio: auto; min-height: 380px; }
.projects__grid > .project:first-child .project__body { padding: clamp(2rem, 4vw, 3rem); justify-content: center; }
.projects__grid > .project:first-child .project__title { font-size: clamp(2rem, 3.6vw, 2.8rem); }

.project__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin: 10px 10px 0;
  border-radius: calc(var(--radius) - 8px);
  background: var(--surface-2);
}
.projects__grid > .project:first-child .project__visual { margin: 10px 0 10px 10px; }
.project__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.project:hover .project__photo { transform: scale(1.06); }

.project__body { padding: 1.75rem 2rem 2rem; display: flex; flex-direction: column; flex: 1; }
.project__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.project__meta span:first-child { color: var(--accent); }
.project__meta span + span::before { content: "·"; margin-right: 0.4rem; color: var(--ink-3); }
.project__title { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; margin: 0.6rem 0 0.75rem; }
.project__desc { color: var(--ink-2); font-size: 0.98rem; margin-bottom: 1.25rem; }
.project .tags { margin-top: 0; }

.project__links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.5rem;
}
.project__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.3s var(--ease);
}
.project__link span { transition: transform 0.35s var(--ease); }
.project__link:hover { background: var(--accent); }
.project__link:hover span { transform: translate(2px, -2px); }

.project__live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}
.project__live i { width: 7px; height: 7px; border-radius: 50%; background: #1fbf5b; }

/* ---------- Factores / pasos ---------- */
.factors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.factors--steps { grid-template-columns: repeat(4, 1fr); margin-bottom: 0; counter-reset: step; }

.factor { padding: 1.9rem; display: flex; flex-direction: column; }
.factor__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2.25rem; }
.factor__num {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--ink-3);
}
.factor:hover .factor__num { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.factor__icon {
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: 14px;
  background: var(--bg);
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: background 0.4s, transform 0.5s var(--ease);
}
.factor:hover .factor__icon { background: var(--lime); transform: rotate(-10deg); }
.factor__title { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.factor__desc { color: var(--ink-2); font-size: 0.95rem; }

/* Pasos: la tarjeta final resaltada */
.factors--steps .factor:last-child { background: var(--lime); border-color: var(--lime); }
.factors--steps .factor:last-child .factor__num { -webkit-text-stroke-color: var(--ink); }
.factors--steps .factor:last-child .factor__icon { background: var(--ink); stroke: var(--lime); }
.factors--steps .factor:last-child .factor__desc { color: var(--ink); }

.factor__scale {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
}
.factor__scale::before,
.factor__scale::after {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: 0;
  height: 4px;
  border-radius: 4px;
}
.factor__scale::before { right: 0; background: var(--surface-2); }
.factor__scale::after {
  width: 0;
  background: linear-gradient(90deg, var(--lime), var(--accent));
  transition: width 1.4s var(--ease) 0.3s;
}
.factor.is-visible .factor__scale::after { width: 100%; }

/* ---------- Calculadora ---------- */
.estimator {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
  padding: 10px;
  background: var(--dark);
  border-color: var(--dark);
  color: var(--on-dark);
}
.estimator:hover { transform: none; }
.estimator::before { display: none; }

.estimator__controls { padding: clamp(1.5rem, 3.5vw, 2.5rem); }
.estimator__title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; }
.estimator__title em { color: var(--lime); }
.estimator__hint { color: var(--on-dark-2); margin: 0.5rem 0 1.75rem; font-size: 0.95rem; }

.price-range {
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.75rem;
  border-radius: var(--radius-sm);
  background: var(--dark-2);
  border: 1px solid var(--line-dark);
}
.price-range__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}
.price-range__value {
  display: block;
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  color: var(--lime);
  transition: opacity 0.18s, transform 0.18s;
}
.price-range__value.is-changing { opacity: 0; transform: translateY(6px); }
.price-range__note { font-size: 0.82rem; color: var(--on-dark-2); line-height: 1.5; }

.seg { border: 0; margin-bottom: 1.4rem; }
.seg:last-child { margin-bottom: 0; }
.seg legend {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  margin-bottom: 0.65rem;
}
.seg__options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--dark-2);
  border: 1px solid var(--line-dark);
}
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span {
  display: grid;
  place-items: center;
  height: 44px;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  text-align: center;
  color: var(--on-dark-2);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.seg label:hover span { color: var(--on-dark); }
.seg input:checked + span { background: var(--on-dark); color: var(--ink); font-weight: 500; }
.seg input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }

.estimator__result {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: calc(var(--radius) - 8px);
  background: var(--accent);
  color: #fff;
}
.estimator__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.estimator__level {
  display: block;
  margin: 0.5rem 0 1.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  transition: opacity 0.18s, transform 0.18s;
}
.estimator__level.is-changing { opacity: 0; transform: translateY(8px); }

.meter { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.meter__fill {
  display: block;
  height: 100%;
  width: 12%;
  border-radius: inherit;
  background: var(--lime);
  transition: width 0.7s var(--ease);
}
.meter__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.65);
}
.estimator__desc { margin: 1.5rem 0 2rem; color: rgba(255, 255, 255, 0.88); font-size: 0.98rem; }
.estimator__btn { margin-top: auto; background: #fff; color: var(--ink); }
.estimator__btn:hover { background: var(--lime); color: var(--ink); box-shadow: none; }
.estimator__note { margin-top: 0.85rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); text-align: center; }

/* ---------- Métodos de pago ---------- */
.payments { margin-top: clamp(3.5rem, 7vw, 5rem); }
.payments__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  margin-bottom: 1.75rem;
}
.payments__title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 600; letter-spacing: -0.045em; }
.payments__title em { color: var(--accent); }
.payments__lead { color: var(--ink-2); max-width: 30rem; font-size: 0.95rem; }

.payments__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pay { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: var(--radius-sm); }
.pay--wide { grid-column: 1 / -1; }

.pay__badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
  transition: transform 0.4s var(--ease);
}
.pay:hover .pay__badge { transform: rotate(-8deg) scale(1.05); }
.pay__badge--nequi       { background: #210049; color: #ff4fa3; }
.pay__badge--bancolombia { background: #fdda24; color: #111; }
.pay__badge--paypal      { background: #003087; }
.pay__badge--crypto      { background: #0052ff; }

.pay__info { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 0.1rem; }
.pay__info strong { font-weight: 600; letter-spacing: -0.01em; }
.pay__info strong small { font-weight: 400; font-size: 0.78rem; color: var(--ink-3); margin-left: 0.3rem; }
.pay__info span { font-size: 0.88rem; color: var(--ink-3); }
.pay__info .pay__data { font-family: var(--mono); color: var(--ink); font-size: 0.9rem; }
.pay__info .pay__data--addr { word-break: break-all; font-size: 0.85rem; }
.pay__info .pay__warn { margin-top: 0.4rem; font-size: 0.8rem; color: #a35a00; }
.pay__info .pay__warn b { color: var(--ink); }

.pay__copy {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  transition: background 0.3s, border-color 0.3s;
}
.pay__copy svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pay__copy:hover { background: var(--ink); border-color: var(--ink); }
.pay__copy:hover svg { stroke: var(--bg); }
.pay__copy.is-copied { background: var(--lime); border-color: var(--lime); }
.pay__copy.is-copied svg { stroke: var(--ink); }

.payments__safe {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 10px;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 0.88rem;
  color: var(--ink-2);
}
.payments__safe svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.payments__safe strong, .payments__safe b { color: var(--ink); }

/* ---------- Preguntas frecuentes ---------- */
.faq__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.faq__grid .section__head { position: sticky; top: 110px; margin-bottom: 0; }
.faq__list { display: flex; flex-direction: column; gap: 8px; }
.faq__item {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.faq__item[open] { border-color: var(--line-strong); box-shadow: var(--shadow); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform 0.4s var(--ease), background 0.3s, color 0.3s;
}
.faq__item summary:hover::after { background: var(--lime); }
.faq__item[open] summary::after { transform: rotate(45deg); background: var(--accent); color: #fff; }
.faq__item p {
  padding: 0 1.4rem 1.3rem;
  color: var(--ink-2);
  font-size: 0.98rem;
  max-width: 44rem;
  animation: faqIn 0.5s var(--ease);
}
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Contacto (bloque oscuro) ---------- */
.contact { padding-top: 0; }
.contact .container {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 7vw, 6rem) clamp(1.5rem, 6vw, 5rem);
  border-radius: calc(var(--radius) + 8px);
  background: var(--dark);
  color: var(--on-dark);
}
.contact .container::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -40%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 52, 255, 0.55), transparent 65%);
  pointer-events: none;
}
.contact .container > * { position: relative; }
.contact .eyebrow { background: transparent; border-color: var(--line-dark); color: var(--on-dark-2); }
.contact .eyebrow::before { background: var(--lime); }

.contact__title { font-size: clamp(2.8rem, 8vw, 6.5rem); margin-top: 1.5rem; }
.contact__title em { color: var(--lime); }
.contact__lead { margin-top: 1.25rem; color: var(--on-dark-2); max-width: 30rem; font-size: 1.08rem; }

.contact__actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.contact-btn {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.35rem 1rem;
  padding: 1.5rem 1.6rem;
  text-align: left;
  background: var(--dark-2);
  border-color: var(--line-dark);
  color: var(--on-dark);
}
.contact-btn:hover { border-color: rgba(243, 241, 236, 0.3); box-shadow: none; }
.contact-btn::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(215, 243, 106, 0.1), transparent 45%); }
.contact-btn__label {
  grid-column: 1;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  transition: color 0.3s;
}
.contact-btn__value {
  grid-column: 1;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.contact-btn__icon {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--on-dark);
  transition: background 0.3s, transform 0.4s var(--ease);
}
.contact-btn__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-btn:hover .contact-btn__icon { background: var(--lime); transform: rotate(-12deg); }
.contact-btn:hover .contact-btn__label { color: var(--on-dark); }
.contact-btn.is-copied .contact-btn__label { color: var(--lime); }

.socials { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.social {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 46px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 0.92rem;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.social:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.social--sm { height: 40px; padding: 0 0.95rem; font-size: 0.86rem; }
.social--sm svg { width: 16px; height: 16px; }

.contact .social { background: transparent; border-color: var(--line-dark); color: var(--on-dark); }
.contact .social:hover { background: var(--on-dark); color: var(--ink); }

/* ---------- Footer ---------- */
.footer { padding: 2rem 0 2.5rem; font-size: 0.88rem; color: var(--ink-3); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer__links { display: flex; gap: 1.25rem; }
.footer__links a, .footer__top { transition: color 0.25s; }
.footer__links a:hover, .footer__top:hover { color: var(--accent); }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 56px;
  padding: 0 1.3rem 0 1.05rem;
  border-radius: 999px;
  background: var(--wa);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 14px 36px -10px rgba(37, 211, 102, 0.65);
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s var(--ease), opacity 0.4s, box-shadow 0.3s;
}
.wa-float.is-visible { transform: none; opacity: 1; pointer-events: auto; }
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -10px rgba(37, 211, 102, 0.8); }
.wa-float svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Aviso de idioma ---------- */
.lang-hint {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100% - 40px);
  padding: 0.6rem 0.6rem 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-dark);
  font-size: 0.86rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.5s;
}
.lang-hint.is-visible { transform: none; opacity: 1; }
.lang-hint__go {
  flex: none;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.25s;
}
.lang-hint__go:hover { background: #fff; }
.lang-hint__close {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--on-dark-2);
  transition: background 0.25s, color 0.25s;
}
.lang-hint__close:hover { color: var(--on-dark); background: rgba(255, 255, 255, 0.1); }

/* ---------- Notificación ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-dark);
  font-size: 0.92rem;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s var(--ease), opacity 0.4s;
}
.toast svg { width: 18px; height: 18px; fill: none; stroke: var(--lime); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Modal: Haz tu pedido ---------- */
.order {
  width: min(680px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 100px -20px rgba(17, 17, 16, 0.45);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.order[open] { animation: orderIn 0.5s var(--ease); }
.order::backdrop { background: rgba(17, 17, 16, 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes orderIn { from { opacity: 0; transform: translateY(24px) scale(0.98); } }

.order__form { padding: clamp(1.5rem, 4vw, 2.5rem); }
.order__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.order__title { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; margin-top: 0.9rem; }
.order__title em { color: var(--accent); }
.order__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  transition: background 0.25s, transform 0.4s var(--ease);
}
.order__close svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.order__close:hover { background: var(--lime); transform: rotate(90deg); }

.order__progress { height: 6px; margin-top: 1.75rem; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.order__progress span {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #7a74ff);
  transition: width 0.6s var(--ease);
}
.order__stepinfo { margin: 0.6rem 0 1.5rem; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3); }

.order__step { animation: stepIn 0.45s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(14px); } }

.chips { border: 0; margin-bottom: 1.5rem; }
.chips legend, .field__label {
  display: block;
  margin-bottom: 0.7rem;
  font-weight: 500;
  font-size: 0.98rem;
}
.chips legend small, .field__label small { font-weight: 400; color: var(--ink-3); }
.chips__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chips__grid--list { grid-template-columns: 1fr; }
.chips__grid--four { grid-template-columns: repeat(4, 1fr); }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label span {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 0.6rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 0.92rem;
  text-align: center;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.chips__grid--list label span { place-items: center start; padding: 0.6rem 1.1rem; }
.chips label:hover span { border-color: var(--ink); }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.field { display: block; position: relative; margin-bottom: 1.25rem; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field__count { position: absolute; right: 12px; bottom: 10px; font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.budget { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.budget input, .budget select {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
.budget input:focus, .budget select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.budget input:disabled { opacity: 0.45; }
.budget select option { color: var(--ink); background: var(--surface); }

.check { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.75rem; font-size: 0.95rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0.5rem 0 1.25rem;
}
.summary div { padding: 0.9rem 1rem; border-radius: 14px; background: var(--bg); }
.summary dt { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.summary dd { margin-top: 0.2rem; font-weight: 500; }

.order__notice {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 0.9rem;
  color: var(--ink-2);
}
.order__notice svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; }
.order__notice b { color: var(--ink); }

.order__error { min-height: 1.4em; margin-top: 0.75rem; font-size: 0.9rem; color: #d43a2f; }

.order__nav { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 0.75rem; }
.order__nav .btn { flex: 1; }
.order__nav .btn[hidden] { display: none; }
#orderNext { flex: 2; }

.order__done { text-align: center; padding: 1rem 0; }
.order__done p { color: var(--ink-2); margin-top: 0.5rem; }
.order__done b { color: var(--ink); }
.order__done-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--lime);
  animation: popIn 0.6s var(--ease);
}
.order__done-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes popIn { from { transform: scale(0.4); opacity: 0; } }
.order__done-title { font-size: 2rem; font-weight: 600; letter-spacing: -0.04em; }
.order__done-title em { color: var(--accent); }
.order__fallback { display: inline-block; margin-top: 1.25rem; font-size: 0.9rem; color: var(--accent); border-bottom: 1px solid currentColor; }
.order__fallback:hover { color: var(--ink); }

/* ---------- Aparición al hacer scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease) var(--delay, 0s), transform 0.9s var(--ease) var(--delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }
.card.reveal.is-visible:hover { transform: translateY(-4px); }
.estimator.reveal.is-visible:hover { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {

  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .skills__grid > :last-child { grid-column: 1 / -1; }
  .projects__grid > .project:first-child { grid-template-columns: 1fr; }
  .projects__grid > .project:first-child .project__visual { margin: 10px 10px 0; min-height: 0; aspect-ratio: 16 / 9; }
  .about__grid { grid-template-columns: 1fr; }
  .factors, .factors--steps { grid-template-columns: repeat(2, 1fr); }
  .factors:not(.factors--steps) > :last-child { grid-column: 1 / -1; }
  .estimator { grid-template-columns: 1fr; }
  .faq__grid { grid-template-columns: 1fr; }
  .faq__grid .section__head { position: static; }
}

@media (max-width: 860px) {
  /* backdrop-filter haría que el menú "fixed" quede atrapado dentro de la barra */
  .nav__inner,
  .nav.is-scrolled .nav__inner {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.96);
  }
  .nav__toggle {
    position: relative;
    display: grid;
    place-items: center;
    gap: 6px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--ink);
    z-index: 2;
  }
  .nav__toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--bg);
    transition: transform 0.4s var(--ease);
  }
  .nav__toggle { align-content: center; }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child  { transform: translateY(-4px) rotate(-45deg); }

  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.25rem;
    padding: 100px 24px 40px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; }
  .nav__links > * { opacity: 0; transform: translateY(16px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
  .nav__links.is-open > * { opacity: 1; transform: none; }
  .nav__links.is-open > :nth-child(2) { transition-delay: 0.04s; }
  .nav__links.is-open > :nth-child(3) { transition-delay: 0.08s; }
  .nav__links.is-open > :nth-child(4) { transition-delay: 0.12s; }
  .nav__links.is-open > :nth-child(5) { transition-delay: 0.16s; }
  .nav__links.is-open > :nth-child(6) { transition-delay: 0.2s; }
  .nav__links.is-open > :nth-child(7) { transition-delay: 0.24s; }
  .nav__links > a:not(.nav__lang) {
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    color: var(--ink);
    padding: 0.35rem 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav__links > a:not(.nav__lang):hover { background: none; color: var(--accent); }
  .nav__links .nav__lang { align-self: flex-start; margin: 1.25rem 0 0; }
  .nav__links .nav__cta { margin: 1rem 0 0; height: 58px; font-size: 1.05rem; background: var(--accent); color: #fff; }

  .payments__list { grid-template-columns: 1fr; }
  .chips__grid { grid-template-columns: repeat(2, 1fr); }
  .chips__grid--list { grid-template-columns: 1fr; }
  .chips__grid--four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }

  .skills__grid, .projects__grid, .factors, .factors--steps, .contact__actions { grid-template-columns: 1fr; }
  .skills__grid > :last-child, .factors > :last-child { grid-column: auto; }
  .skill-card, .factor { padding: 1.5rem; }
  .skill-card__top { margin-bottom: 2rem; }
  .project__body { padding: 1.5rem; }
  .project__links { flex-wrap: wrap; }

  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: 1 / -1; }

  .seg label span { font-size: 0.82rem; }
  .estimator__btn { width: 100%; }

  .field-row, .summary { grid-template-columns: 1fr; }
  .contact-btn { padding: 1.25rem; }
  .contact-btn__icon { width: 44px; height: 44px; }
  .contact .container { width: calc(100% - 16px); border-radius: var(--radius); }

  .footer__inner { flex-direction: column; align-items: flex-start; }
  .cursor-glow { display: none; }
  .card:hover { transform: none; }

  .wa-float { width: 56px; padding: 0; justify-content: center; right: 16px; bottom: 16px; }
  .wa-float__label { display: none; }
  .lang-hint { left: 16px; bottom: 84px; max-width: calc(100% - 32px); border-radius: 20px; }
  .lang-hint > span { flex: 1; }
}

@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; }
  .reveal { opacity: 1; transform: none; }
  .hero__word { transform: none; }
}
