/* Fuentes propias (self-hosted): Instrument Serif para titulares, Inter para el texto */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-400.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-var.woff2) format("woff2"); }

/* emesoto — portafolio. Sin dependencias externas. */
:root {
  --bg: #07070d;
  --bg-2: #0e0e19;
  --ink: #f4f2fb;
  --muted: #a9a6c2;
  --line: rgba(255, 255, 255, 0.1);
  --brand: linear-gradient(100deg, #ffb48a, #ff7eb3 38%, #8b6bff 72%, #5ee0d0);
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --gutter: clamp(18px, 5vw, 56px);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; touch-action: pan-x pan-y; --hdr: calc(72px + env(safe-area-inset-top)); }
html { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid #ffb48a; outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: #fff; color: #000; padding: 10px 16px; border-radius: 10px; text-decoration: none; transition: top 0.2s; }
.skip:focus { top: 12px; }

/* Fondo aurora */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: 0.32; will-change: transform; }
@property --g1 { syntax: "<color>"; inherits: true; initial-value: #6d4aff; }
@property --g2 { syntax: "<color>"; inherits: true; initial-value: #ff5d8f; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
:root { --g1: #6d4aff; --g2: #ff5d8f; transition: --g1 1.2s ease, --g2 1.2s ease; }
.aurora i:nth-child(1) { background: var(--g1); top: -25vmax; left: -15vmax; animation: drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: var(--g2); bottom: -30vmax; right: -20vmax; opacity: 0.2; animation: drift 32s ease-in-out infinite alternate-reverse; }
.aurora i:nth-child(3) { background: #2dd4bf; top: 35%; left: 40%; width: 40vmax; height: 40vmax; opacity: 0.1; animation: drift 38s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.12); } }

/* Cabecera */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 14px max(var(--gutter), env(safe-area-inset-left));
  background: rgba(7, 7, 13, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.brand-logo { height: 26px; width: auto; max-width: none; flex: none; transition: filter 0.3s, transform 0.3s; }
.brand:hover .brand-logo { filter: drop-shadow(0 0 10px rgba(255, 126, 179, 0.7)); transform: scale(1.06); }
.top nav { display: flex; align-items: center; gap: clamp(10px, 3vw, 28px); }
.top nav a { white-space: nowrap; text-decoration: none; color: var(--muted); font-size: 0.95rem; padding: 6px 2px; transition: color 0.2s; }
.top nav a:hover { color: var(--ink); }
.top nav .nav-cta { color: var(--ink); padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.05); }
.top nav .nav-cta:hover { background: rgba(255,255,255,0.12); }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
/* Al saltar a una sección, el contenido queda justo debajo de la cabecera (sin espacio muerto) */
section[id] { scroll-margin-top: max(0px, calc(var(--hdr) + 12px - var(--pt, 0px))); }
#inicio { scroll-margin-top: 0; }
#proyectos, #sobre-mi { --pt: clamp(40px, 8vw, 90px); }
#contacto { --pt: clamp(30px, 6vw, 70px); }

/* Tipografía común */
.eyebrow { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; }
h1 em, h2 em { font-style: italic; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em; }
h2 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.section-sub { color: var(--muted); margin-top: 14px; max-width: 52ch; }

/* Botones */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta-row.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 24px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 0.97rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #14101f; background: linear-gradient(100deg, #ffd2b5, #ffb3d1 55%, #c9bbff); box-shadow: 0 8px 30px -8px rgba(255, 126, 179, 0.6); }
.btn-primary:hover { box-shadow: 0 12px 36px -6px rgba(255, 126, 179, 0.8); }
.btn-ghost { color: var(--ink); background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.18); }
.btn-ghost:hover { background: rgba(255,255,255,0.11); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: clamp(24px, 5vw, 64px); min-height: calc(100svh - 64px); padding: clamp(40px, 8vw, 90px) 0; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #cfcce2; margin-top: 26px; max-width: 46ch; }

.hero-visual { position: relative; height: clamp(380px, 52vw, 560px); --mx: 0; --my: 0; }
.hero-mark {
  position: absolute; left: -14%; top: 4%; width: 128%; z-index: 0; overflow: visible; pointer-events: none;
  filter: drop-shadow(0 0 50px rgba(255, 126, 179, 0.35));
  translate: calc(var(--mx) * -16px) calc(var(--my) * -12px); transition: translate 0.35s ease-out;
}
.hero-mark path {
  fill: url(#hg); fill-opacity: 0; stroke: url(#hg); stroke-width: 2.5; stroke-opacity: 0.9;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: markDraw 2.6s cubic-bezier(.5,0,.2,1) 0.2s forwards, markFill 1.8s ease 1.7s forwards;
}
@keyframes markDraw { to { stroke-dashoffset: 0; } }
@keyframes markFill { to { fill-opacity: 0.2; stroke-opacity: 0.45; } }
.hero-visual .hp {
  position: absolute; z-index: 1; width: 38%; border-radius: 9% / 4.2%; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18); box-shadow: 0 30px 70px -20px rgba(0,0,0,0.8);
  background: #111; will-change: transform;
  translate: calc(var(--mx) * var(--dx, 10) * 1px) calc(var(--my) * var(--dy, 8) * 1px);
  transition: translate 0.3s ease-out;
}
.hero-visual .hp img { width: 100%; height: auto; }
.hero-visual .hp:nth-of-type(1) { left: 2%; top: 16%; rotate: -8deg; --dx: 22; --dy: 14; animation: float 7s ease-in-out infinite; }
.hero-visual .hp:nth-of-type(2) { left: 31%; top: 2%; z-index: 2; width: 41%; --dx: 10; --dy: 7; animation: float 8s ease-in-out -2s infinite; }
.hero-visual .hp:nth-of-type(3) { right: 2%; top: 20%; rotate: 8deg; --dx: -22; --dy: 14; animation: float 9s ease-in-out -4s infinite; }
@keyframes float { 50% { transform: translateY(-14px); } }

/* Proyectos */
.projects { padding: clamp(40px, 8vw, 90px) 0; }
.section-head { margin-bottom: clamp(36px, 6vw, 70px); }
.project {
  --a1: #8b6bff; --a2: #4fd1c5;
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px, 5vw, 64px);
  padding: clamp(24px, 4vw, 48px); margin-bottom: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 10px);
  background:
    radial-gradient(60% 80% at 80% 20%, color-mix(in srgb, var(--a1) 22%, transparent), transparent 70%),
    radial-gradient(50% 70% at 10% 90%, color-mix(in srgb, var(--a2) 14%, transparent), transparent 70%),
    var(--bg-2);
  overflow: hidden;
}
.project:nth-of-type(even) .proj-visual { order: -1; }
.proj-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.proj-icon { width: 56px; height: 56px; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--a1) 70%, transparent); }
.proj-kind { display: inline-block; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.proj-name { font-family: var(--serif); font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1; }
.proj-tag { font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2.4vw, 1.65rem); margin-bottom: 16px; background: linear-gradient(100deg, var(--a1), var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: brightness(1.35); }
.proj-desc { color: #cfcce2; max-width: 52ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0 0; }
.tags li { font-size: 0.8rem; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: #d9d6ec; }

.proj-visual { position: relative; perspective: 1100px; }
.shots {
  position: relative; width: min(100%, 440px); margin: 0 auto; height: 0;
  padding-bottom: calc(var(--r, 2) * 56% + 3%);
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--rx, 0deg) + var(--gy, 0) * -9deg)) rotateY(calc(var(--ry, 0deg) + var(--gx, 0) * 14deg));
  touch-action: pan-y;
  translate: 0 calc(var(--sp, 0) * -26px);
  transition: transform 0.35s ease-out;
}
.shot {
  position: absolute; display: block; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer;
  border-radius: 9% / 4.2%; overflow: hidden; border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 30px 60px -22px rgba(0,0,0,0.85); background: #111;
  transform: translateZ(var(--z, 0px));
  transition: left 0.7s cubic-bezier(.2,.8,.2,1), top 0.7s cubic-bezier(.2,.8,.2,1), width 0.7s cubic-bezier(.2,.8,.2,1), rotate 0.7s cubic-bezier(.2,.8,.2,1), translate 0.5s ease, filter 0.5s;
}
.shot img { width: 100%; height: auto; display: block; pointer-events: none; }
.shot.s-main { left: 22%; top: 0; width: 56%; rotate: 0deg; z-index: 3; --z: 60px; cursor: default; }
.shot.s-left { left: 0; top: 7%; width: 46%; rotate: -7deg; z-index: 1; filter: brightness(0.8); }
.shot.s-right { left: 54%; top: 7%; width: 46%; rotate: 7deg; z-index: 2; filter: brightness(0.8); }
.shot.s-left:hover, .shot.s-right:hover { filter: brightness(1); translate: 0 -8px; }
.project:hover .s-left { rotate: -10deg; }
.project:hover .s-right { rotate: 10deg; }
.shot.s-main { box-shadow: 0 40px 80px -24px rgba(0,0,0,0.9), 0 0 60px -10px color-mix(in srgb, var(--a1) 55%, transparent); }
.project:hover .s-main { transform: translateY(-8px); }

/* mySynt: logotipo animado */
.synt-visual {
  display: grid; place-items: center; aspect-ratio: 4 / 4.4; width: min(100%, 440px); margin: 0 auto;
  border-radius: 9% / 8%; border: 1px solid rgba(255,255,255,0.14);
  background: radial-gradient(70% 55% at 50% 45%, rgba(125, 211, 252, 0.12), transparent 70%), #070810;
  box-shadow: 0 30px 60px -22px rgba(0,0,0,0.85); padding: 6%;
}
.synt-inner { text-align: center; width: 100%; }
.synt-word { font-family: var(--serif); font-size: clamp(3.4rem, 11vw, 5.6rem); line-height: 1; background: linear-gradient(90deg, #ff9e80, #e6d27a 28%, #7ee8cf 52%, #8ab8ff 74%, #c79bff); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 0.08em 0.1em; animation: shimmer 6s ease-in-out infinite alternate; filter: drop-shadow(0 0 18px rgba(138, 184, 255, 0.35)); }
@keyframes shimmer { to { filter: drop-shadow(0 0 26px rgba(255, 158, 128, 0.5)) hue-rotate(25deg); } }
.synt-pulse { width: 92%; height: 44px; margin: 0 auto; display: block; overflow: visible; }
.synt-pulse path { fill: none; stroke: url(#syntGrad); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; stroke-dashoffset: 520; animation: draw 3.4s ease-in-out infinite; }
@keyframes draw { 0% { stroke-dashoffset: 520; } 60%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -520; } }
.synt-by { margin-top: 12px; letter-spacing: 0.4em; font-size: 0.78rem; color: #8d8fb0; }

/* Tarjeta "próximamente" */
.soon { border: 1px dashed rgba(255,255,255,0.22); border-radius: calc(var(--radius) + 10px); padding: clamp(28px, 5vw, 54px); text-align: center; color: var(--muted); }
.soon h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; color: var(--ink); margin-bottom: 8px; }

/* Sobre mí */
.about { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 6vw, 80px); padding: clamp(40px, 8vw, 90px) 0; align-items: start; }
.about-copy p { color: #cfcce2; margin-top: 18px; max-width: 54ch; }
.about-copy h2 { margin-bottom: 4px; }
.badge-prov { display: inline-block; font-size: 0.78rem; margin-top: 12px !important; padding: 4px 12px; border-radius: 999px; border: 1px dashed #ffb48a; color: #ffcfae !important; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.principles li { display: flex; gap: 18px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,0.03); transition: border-color 0.25s, transform 0.25s; }
.principles li:hover { border-color: rgba(255, 180, 138, 0.5); transform: translateX(4px); }
.p-num { font-family: var(--serif); font-style: italic; font-size: 1.6rem; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.principles h3 { font-size: 1.05rem; margin-bottom: 2px; }
.principles p { color: var(--muted); font-size: 0.95rem; }

/* Contacto */
.contact { padding: clamp(30px, 6vw, 70px) 0 clamp(60px, 9vw, 110px); }
.contact-card { text-align: center; padding: clamp(36px, 7vw, 80px) clamp(20px, 5vw, 60px); border-radius: calc(var(--radius) + 14px); border: 1px solid var(--line); background: radial-gradient(70% 90% at 50% 0%, rgba(255, 126, 179, 0.18), transparent 70%), radial-gradient(60% 80% at 90% 100%, rgba(94, 224, 208, 0.12), transparent 70%), var(--bg-2); }
.contact-card h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.contact-card .section-sub { margin-left: auto; margin-right: auto; }
.mail-line { margin-top: 20px; color: var(--muted); font-size: 0.95rem; overflow-wrap: anywhere; }
.socials { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 24px 0 0; padding: 0; }
.socials:empty { display: none; }
.socials a { display: inline-block; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: rgba(255,255,255,0.04); transition: background 0.2s; }
.socials a:hover { background: rgba(255,255,255,0.12); }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; max-width: var(--max); margin: 0 auto; padding: 26px var(--gutter) 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.foot-logo { width: 96px; height: auto; opacity: 0.85; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.noscript { color: var(--muted); }

/* Aparición al hacer scroll */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* Tablet / móvil */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; min-height: 0; text-align: left; }
  .hero-visual { height: clamp(340px, 88vw, 480px); order: 2; }
  .project { grid-template-columns: 1fr; }
  .proj-visual { order: -1; }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .top nav a:not(.nav-cta) { font-size: 0.88rem; }
  .brand-logo { height: 22px; }
  .btn { width: 100%; }
  .cta-row.center .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .synt-pulse path { stroke-dashoffset: 0; }
}

/* ===== v2: efectos ===== */
.stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; z-index: -1;
  border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 0.6s;
  background: radial-gradient(circle, color-mix(in srgb, var(--g2) 20%, transparent), transparent 65%);
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: var(--brand); box-shadow: 0 0 12px rgba(255, 126, 179, 0.7); pointer-events: none; }

/* Titular por palabras */
.js .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.05em 0.16em; margin: 0 -0.05em -0.16em; }
.js .split .wi { display: inline-block; transform: translateY(108%); transition: transform 1s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i) * 75ms + 0.2s); }
.js .split.in .wi { transform: none; }
.wi.grad { font-style: italic; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.08em; }

/* Rótulo en movimiento */
.marquee { width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; padding: clamp(14px, 3vw, 30px) 0; border-block: 1px solid var(--line); background: rgba(255,255,255,0.02); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-family: var(--serif); font-size: clamp(2.4rem, 8vw, 6rem); line-height: 1.1; white-space: nowrap; padding: 0 0.35em; }
.marquee span:nth-child(4n+1) { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.55); }
.marquee i { font-style: normal; align-self: center; font-size: clamp(1.2rem, 3vw, 2rem); background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Tarjetas de proyecto */
.project > * { position: relative; z-index: 1; }
.project::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s; background: radial-gradient(480px circle at var(--px, 50%) var(--py, 0%), color-mix(in srgb, var(--a1) 24%, transparent), transparent 65%); }
.project:hover::after { opacity: 1; }
.project { transition: border-color 0.4s, box-shadow 0.4s; }
.project:hover { border-color: color-mix(in srgb, var(--a1) 55%, transparent); box-shadow: 0 30px 80px -40px color-mix(in srgb, var(--a1) 70%, transparent); }
.proj-num { position: absolute !important; top: clamp(10px, 1.6vw, 20px); right: clamp(14px, 2vw, 26px); z-index: 5 !important; font-family: var(--serif); font-size: clamp(3rem, 6.5vw, 5rem); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.3); pointer-events: none; user-select: none; }
.hint { margin-top: 10px; text-align: center; font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; }

/* Contacto */
.contact-card { position: relative; }
.contact-card::before {
  content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 55%, #ffb48a, #ff7eb3, #8b6bff, #5ee0d0, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin 7s linear infinite;
}
@keyframes spin { to { --ang: 360deg; } }
.contact-card h2 { background: linear-gradient(100deg, #fff 30%, #ffb48a, #ff7eb3, #8b6bff, #fff 70%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 8s linear infinite; }
@keyframes sheen { to { background-position: -250% 0; } }

@media (prefers-reduced-motion: reduce) {
  .js .split .wi { transform: none; }
  .hero-mark path { stroke-dashoffset: 0; fill-opacity: 0.2; stroke-opacity: 0.45; }
  .marquee-track { animation: none; }
  .cursor-glow, .stars { display: none; }
}

/* ===== Contacto con formulario ===== */
.contact-card { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 64px); text-align: left; align-items: start; }
.contact-card .section-sub { margin-left: 0; margin-right: 0; }
.contact-card h2 { font-size: clamp(2.4rem, 5.4vw, 3.8rem); display: inline-block; padding-bottom: 0.08em; }
.contact-intro .cta-row { flex-direction: column; align-items: stretch; max-width: 340px; }
.contact-intro .mail-line { line-height: 1.9; }
.btn-wa { color: #04230f; background: linear-gradient(100deg, #5cf08e, #25d366); box-shadow: 0 8px 28px -8px rgba(37, 211, 102, 0.55); }
.btn-wa:hover { box-shadow: 0 12px 34px -6px rgba(37, 211, 102, 0.75); }
.link-btn { font: inherit; color: var(--ink); background: none; border: 0; padding: 0 2px; margin-left: 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.4); }
.link-btn:hover { text-decoration-color: #ff7eb3; }
.socials { justify-content: flex-start; }

.contact-form { padding: clamp(18px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7, 7, 13, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.contact-form h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.85rem; color: #d9d6ec; margin-bottom: 6px; }
.field .opt { color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); color-scheme: dark;
  padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.05);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #7f7c99; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #ff9ec7; background: rgba(255,255,255,0.08); box-shadow: 0 0 0 3px rgba(255, 126, 179, 0.22); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #ff6b6b; }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.form-actions .btn { width: 100%; padding: 0 14px; }
.form-note { margin-top: 14px; font-size: 0.8rem; color: var(--muted); }
.form-status { margin-top: 10px; min-height: 1.4em; font-size: 0.9rem; color: #ffd2b5; }
.form-status a { color: inherit; text-decoration: underline; }

@media (max-width: 880px) {
  .contact-card { grid-template-columns: 1fr; }
  .contact-intro .cta-row { max-width: none; }
}
@media (max-width: 520px) { .form-actions { grid-template-columns: 1fr; } }

/* ===== Móvil ===== */
html { -webkit-tap-highlight-color: transparent; }
.btn:active, .dock a:active { transform: scale(0.97); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--ink); cursor: pointer; }
.icon-btn[hidden] { display: none !important; }
.share-top { display: none; }
.dock { display: none; }
.tilt-chip { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font: inherit; font-size: 0.85rem; color: var(--ink); background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.2); cursor: pointer; transition: opacity 0.6s, transform 0.6s; }
.tilt-chip[hidden] { display: none; }
.tilt-chip:disabled { cursor: default; }
.tilt-chip.fade { opacity: 0; transform: translateY(6px); pointer-events: none; }
.tilt-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px #ff7eb3; }
.gyro .project::after { opacity: 0.9; }
.gyro .shots { transition-duration: 0.12s; transition-timing-function: linear; }
@media (pointer: coarse) {
  .cursor-glow { width: 320px; height: 320px; margin: -160px 0 0 -160px; }
}

@media (max-width: 720px) {
  .aurora i { filter: blur(60px); }
  .top nav { display: none; }
  .share-top:not([hidden]) { display: inline-flex; }
  body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }

  .dock {
    display: flex; position: fixed; z-index: 70; gap: 2px; padding: 6px;
    left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom));
    border-radius: 26px; background: rgba(14, 14, 25, 0.78); border: 1px solid rgba(255,255,255,0.14);
    -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 14px 40px -8px rgba(0,0,0,0.75);
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), opacity 0.3s;
  }
  .dock a { flex: 1; min-width: 0; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 2px; border-radius: 20px; font-size: 0.66rem; letter-spacing: 0.01em; text-decoration: none; color: var(--muted); transition: background 0.25s, color 0.25s, transform 0.15s; white-space: nowrap; }
  .dock a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .dock a.on { color: var(--ink); background: rgba(255,255,255,0.11); }
  .dock a.wa { color: #04230f; background: linear-gradient(100deg, #5cf08e, #25d366); margin-left: 2px; }
  .dock a.wa[hidden] { display: none; }
  .dock-hide .dock { transform: translateY(160%); opacity: 0; pointer-events: none; }

  main { padding: 0 max(18px, env(safe-area-inset-left)); }
  .hero { padding-top: 28px; gap: 8px; }
  .hero-visual { height: clamp(340px, 98vw, 470px); }
  .project { padding: 20px 18px 26px; border-radius: 28px; gap: 22px; }
  .shots { width: min(100%, 330px); }
  .proj-num { font-size: 3rem !important; }
  .proj-head { margin-bottom: 14px; }
  .proj-desc { font-size: 0.97rem; }
  .cta-row .btn { width: 100%; }
  .contact-card { padding: 26px 18px; }
  .foot { flex-direction: column; align-items: flex-start; }
}

/* ===== Ajustes móvil (sin desbordes) ===== */
@media (max-width: 720px) {
  .hero-mark { left: -4%; width: 108%; }
  .dock a { flex: 1 1 0; padding: 6px 0; font-size: 0.64rem; overflow: hidden; text-overflow: ellipsis; }
  .dock a.wa { margin-left: 0; }
}

.about-copy .eyebrow { margin-top: 0; }

/* ===== Ajuste de tamaños para Instrument Serif (más estrecha que la serif del sistema) ===== */
h1 { font-size: clamp(3rem, 7.4vw, 5.8rem); line-height: 1; }
h2 { font-size: clamp(2.4rem, 5.6vw, 3.9rem); }
.proj-name { font-size: clamp(2.3rem, 5vw, 3.7rem); }
.proj-tag { font-size: clamp(1.4rem, 2.7vw, 1.9rem); }
.brand, .marquee span { letter-spacing: 0; }
.contact-card h2 { font-size: clamp(2.8rem, 6vw, 4.4rem); }
.principles h3 { font-weight: 600; }
body { font-feature-settings: "cv11", "ss01"; }
@media (max-width: 720px) { h1 { font-size: clamp(2.9rem, 13vw, 3.8rem); } }

/* ===== Puntos clave, cifras, pila tecnológica y flecha de scroll ===== */
.hl { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; }
.hl li { position: relative; padding-left: 24px; color: #d9d6ec; font-size: 0.97rem; line-height: 1.45; }
.hl li::before { content: "✦"; position: absolute; left: 0; top: 0; font-size: 0.85rem; background: linear-gradient(135deg, var(--a1), var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: brightness(1.4); }
.proj-desc { font-size: 1.05rem; }

.about-extra { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding-top: clamp(10px, 3vw, 30px); border-top: 1px solid var(--line); margin-top: 6px; }
.stats { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(24px, 5vw, 56px); }
.stats li { display: grid; }
.stat-n { font-family: var(--serif); font-size: clamp(3.4rem, 8vw, 5rem); line-height: 1; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat-l { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.stack h3 { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.stack .tags { margin-top: 0; }
.stack .tags li { transition: border-color 0.25s, background 0.25s, transform 0.25s; }
.stack .tags li:hover { border-color: rgba(255, 180, 138, 0.6); background: rgba(255,255,255,0.09); transform: translateY(-2px); }

.hero { position: relative; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; transition: color 0.2s; }
.scroll-cue:hover { color: var(--ink); }
.scroll-cue i { width: 1px; height: 44px; background: linear-gradient(var(--ink), transparent); transform-origin: top; animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 40% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 880px) { .about-extra { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .scroll-cue { display: none; }
  .hl li { font-size: 0.94rem; }
  .stats { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .scroll-cue i { animation: none; } }

/* ===== Sobre mí (versión de venta) ===== */
.about-copy h2 { margin-bottom: 6px; }
.about-ask { color: var(--ink) !important; font-size: 1.1rem; }
.about-ask strong { font-weight: 600; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-services { margin-top: 22px; }
.about-copy .cta-row { margin-top: 24px; }

/* ===== Insignia "Próximamente en App Store" ===== */
.soon-badge { display: inline-flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 20px 6px 16px; border-radius: 999px; border: 1px dashed rgba(255, 205, 140, 0.55); background: rgba(255, 190, 110, 0.07); color: #ffe6c4; cursor: default; }
.soon-text { display: grid; line-height: 1.2; text-align: left; }
.soon-text strong { font-size: 0.93rem; font-weight: 600; }
.soon-text small { font-size: 0.72rem; color: rgba(255, 226, 190, 0.7); }
.soon-dot { width: 9px; height: 9px; border-radius: 50%; background: #ffb454; box-shadow: 0 0 0 0 rgba(255, 180, 84, 0.6); animation: soonPulse 2s ease-out infinite; flex: none; }
@keyframes soonPulse { 70% { box-shadow: 0 0 0 10px rgba(255, 180, 84, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 180, 84, 0); } }
@media (max-width: 720px) { .soon-badge { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .soon-dot { animation: none; } }

.foot-note { font-size: 0.78rem; opacity: 0.75; }
