:root {
  /* Paleta azul / blanco */
  --bg: #f5f8ff;
  --bg-2: #eaf1ff;
  --white: #ffffff;
  --text: #0a1733;
  --muted: rgba(10, 23, 51, 0.66);
  --faint: rgba(10, 23, 51, 0.42);
  --line: rgba(10, 23, 51, 0.1);
  --navy: #0b1f4d;
  --blue: #1d4ed8;
  --blue-2: #2563eb;
  --cyan: #06b6d4;
  --accent: var(--blue-2);
  --tint: var(--blue-2);
  --grad: linear-gradient(120deg, #1e3a8a 0%, #2563eb 45%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(6, 182, 212, 0.12));

  /* Glasmorfismo */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-edge: rgba(37, 99, 235, 0.12);
  --glass-blur: 18px;
  --glass-shadow: 0 10px 40px -12px rgba(15, 40, 100, 0.18), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  --glass-shadow-hover: 0 24px 60px -18px rgba(29, 78, 216, 0.35), 0 1px 0 rgba(255, 255, 255, 0.9) inset;

  /* Tipografía */
  --f-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --f-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: clamp(19px, 1.6vw, 22px);
  --fs-xl: clamp(22px, 2.2vw, 28px);
  --fs-2xl: clamp(28px, 3.4vw, 42px);
  --fs-3xl: clamp(34px, 4.8vw, 60px);

  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.77, 0, 0.18, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked, body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
em { font-style: normal; }
::selection { background: var(--blue-2); color: #fff; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 4px; border-radius: 6px; }

.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus { position: fixed; top: 12px; left: 12px; z-index: 100; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; }

.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* ---------- Fondo ---------- */
.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42vw 42vw at 88% 6%, rgba(37, 99, 235, 0.22), transparent 70%),
    radial-gradient(36vw 36vw at 4% 38%, rgba(6, 182, 212, 0.18), transparent 70%),
    radial-gradient(40vw 40vw at 70% 96%, rgba(30, 58, 138, 0.14), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(rgba(29, 78, 216, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- Glass ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), 0 0 0 1px var(--glass-edge);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-bg-strong); }
}

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 80;
  background: var(--bg);
  display: grid; place-items: center;
}
.intro-word {
  display: flex; overflow: hidden;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -0.04em;
  font-size: clamp(72px, 14vw, 168px); line-height: 1;
  padding: 0 0.04em 0.1em;
}
.intro-word span {
  display: block; transform: translateY(105%);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.intro-meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--gutter);
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.intro.is-gone { display: none; }

/* ---------- Navbar ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  padding: 14px var(--gutter) 0;
}
.nav-glass {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  height: 58px; padding: 0 8px 0 22px; border-radius: 999px;
}
.brand { display: inline-flex; align-items: baseline; gap: 8px; justify-self: start; }
.brand-mark {
  font-family: var(--f-display); font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: -0.04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.brand-sub { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.header-nav { display: flex; gap: 6px; font-size: var(--fs-sm); font-weight: 500; }
.header-nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); transition: color 0.3s, background 0.3s; }
.header-nav a:hover { color: var(--blue); background: rgba(37, 99, 235, 0.08); }
.nav-glass .btn-cta { justify-self: end; }

/* ---------- Botones (CTA) ---------- */
.btn-cta, .btn-ghost {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font-family: var(--f-display); font-size: 15px; font-weight: 700; letter-spacing: -0.005em; white-space: nowrap;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background-position 0.6s var(--ease-out), color 0.3s, border-color 0.3s;
}
.btn-cta {
  color: #fff; isolation: isolate; overflow: hidden;
  background: linear-gradient(110deg, #1e3a8a 0%, #2563eb 40%, #06b6d4 80%, #2563eb 100%);
  background-size: 220% 100%; background-position: 0% 50%;
  box-shadow: 0 10px 24px -10px rgba(37, 99, 235, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-cta::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.8s var(--ease-out);
}
.btn-cta > span { display: inline-block; transition: transform 0.35s var(--ease-out); }
.btn-cta:hover {
  transform: translateY(-2px); background-position: 100% 50%;
  box-shadow: 0 18px 36px -12px rgba(37, 99, 235, 0.75), 0 0 0 4px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-cta:hover::after { transform: translateX(120%); }
.btn-cta:hover > span { transform: translateX(4px); }
.btn-cta:active, .btn-ghost:active { transform: translateY(0) scale(0.98); }
.btn-ghost {
  color: var(--blue); background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(37, 99, 235, 0.25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--blue-2); box-shadow: 0 12px 28px -14px rgba(37, 99, 235, 0.5); background: #fff; }
.btn-sm { height: 42px; padding: 0 18px; font-size: var(--fs-sm); }

/* ---------- Animaciones de entrada ---------- */
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease-out); }
.is-in .line > span, .line.is-in > span { transform: none; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.home { position: relative; z-index: 1; }
.home > section, .contact { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 72px);
  padding: calc(var(--header-h) + 48px) var(--gutter) clamp(48px, 8vh, 96px);
}
.hero-title {
  margin: 20px 0 22px;
  font-family: var(--f-display); font-weight: 800;
  font-size: var(--fs-3xl); line-height: 1.06; letter-spacing: -0.035em; color: var(--navy);
}
.hero-title .line:nth-child(2) > span { transition-delay: 0.1s; }
.hero-lead { max-width: 540px; color: var(--muted); font-size: var(--fs-md); line-height: 1.65; transition-delay: 0.15s; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; transition-delay: 0.25s; }
.hero-audience {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 32px 0 0; padding: 0; transition-delay: 0.35s;
}
.hero-audience li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--navy);
  background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(37, 99, 235, 0.14);
}
.hero-audience li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }

.hero-visual { position: relative; transition-delay: 0.2s; padding: 32px 0 40px; }
.hero-shot {
  position: relative; border-radius: var(--radius); padding: 10px;
  background: rgba(255, 255, 255, 0.45); border: 1px solid var(--glass-border);
  box-shadow: 0 40px 80px -30px rgba(15, 40, 100, 0.35);
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
  transition: transform 1s var(--ease-out);
}
.hero-visual:hover .hero-shot { transform: perspective(1400px) rotateY(0) rotateX(0); }
.hero-shot .browser { box-shadow: none; }
.float-card {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 16px; color: var(--navy);
  animation: float 7s ease-in-out infinite;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.float-card b { display: block; font-family: var(--f-display); font-size: var(--fs-sm); font-weight: 700; line-height: 1.25; }
.float-card small { display: block; font-size: var(--fs-xs); color: var(--muted); }
.float-ico {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad); color: #fff; font-size: 16px; font-weight: 700;
}
.hero-count { left: -24px; bottom: 0; gap: 12px; animation-delay: -2s; }
.hero-count-num {
  font-family: var(--f-display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.hero-count-label { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
.float-speed { right: -12px; top: 0; animation-delay: -4s; }
.float-seo { right: 8%; bottom: -8px; animation-delay: -1s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- Secciones ---------- */
.services, .work, .craft { padding: clamp(72px, 12vh, 128px) var(--gutter) 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; margin-bottom: clamp(32px, 5vh, 48px); }
.section-head .eyebrow { margin-bottom: 14px; }
.section-title { font-family: var(--f-display); font-weight: 800; font-size: var(--fs-2xl); line-height: 1.12; letter-spacing: -0.03em; color: var(--navy); max-width: 18ch; }
.section-lead { max-width: 440px; color: var(--muted); font-size: var(--fs-base); }

/* Tarjetas de servicio */
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service, .craft-list li {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 28px;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.4s, background 0.4s, opacity 0.9s var(--ease-out);
}
.service::before, .craft-list li::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.55), rgba(6, 182, 212, 0.4), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.5s;
}
.service:nth-child(2) { transition-delay: 0.08s; } .service:nth-child(3) { transition-delay: 0.16s; }
.service.is-in:hover, .craft-list li.is-in:hover { transform: translateY(-6px); box-shadow: var(--glass-shadow-hover); background: rgba(255, 255, 255, 0.72); transition-delay: 0s; }
.service:hover::before, .craft-list li:hover::before { opacity: 1; }
.service-ico {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 22px;
  color: #fff; background: var(--grad); box-shadow: 0 10px 20px -8px rgba(37, 99, 235, 0.6);
  transition: transform 0.5s var(--ease-out);
}
.service:hover .service-ico { transform: rotate(-6deg) scale(1.06); }
.service h3, .craft-list h3 { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-lg); line-height: 1.25; letter-spacing: -0.015em; color: var(--navy); margin-bottom: 10px; }
.service > p { color: var(--muted); font-size: 15px; }
.service-list { list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: var(--fs-sm); font-weight: 500; }
.service-list li { display: flex; gap: 10px; align-items: baseline; }
.service-list li::before { content: '✓'; color: var(--blue-2); font-weight: 700; font-size: 13px; }

/* ---------- Portafolio ---------- */
.view-toggle { display: inline-flex; padding: 4px; border-radius: 999px; position: relative; flex: none; }
.view-toggle button {
  position: relative; z-index: 1; padding: 8px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted); transition: color 0.3s, background 0.3s, box-shadow 0.3s;
}
.view-toggle button:hover { color: var(--blue); }
.view-toggle button[aria-pressed="true"] { color: #fff; background: var(--grad); box-shadow: 0 6px 16px -8px rgba(37, 99, 235, 0.7); }

.work-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.work-list[hidden] { display: none; }
.row { border-bottom: 1px solid var(--line); }
.row-link {
  position: relative;
  display: grid; grid-template-columns: 56px 1fr auto 40px; align-items: center; gap: 24px;
  padding: clamp(20px, 2.6vw, 30px) 0;
}
.row-n { font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--blue); }
.row-name {
  font-family: var(--f-display); font-weight: 700; font-size: var(--fs-2xl); line-height: 1.1; letter-spacing: -0.03em; color: var(--navy);
  transition: transform 0.6s var(--ease-out), color 0.3s;
}
.row-meta { text-align: right; font-size: var(--fs-sm); color: var(--muted); }
.row-meta span { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.row-arrow { font-size: 22px; color: var(--blue); justify-self: end; transform: translateX(-10px); opacity: 0; transition: transform 0.5s var(--ease-out), opacity 0.4s; }
.row-thumb { display: none; }

@media (hover: hover) and (pointer: fine) {
  .work-list:hover .row-link { opacity: 0.45; }
  .work-list .row-link { transition: opacity 0.4s; }
  .work-list .row-link:hover { opacity: 1; }
  .row-link:hover .row-name { transform: translateX(16px); color: var(--blue); }
  .row-link:hover .row-arrow { transform: none; opacity: 1; }
}

.row { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.row.is-in { opacity: 1; transform: none; }

.preview {
  position: fixed; top: 0; left: 0; z-index: 30; pointer-events: none;
  width: clamp(280px, 26vw, 400px); aspect-ratio: 16 / 10;
  margin: calc(clamp(280px, 26vw, 400px) * -0.3125) 0 0 calc(clamp(280px, 26vw, 400px) * -0.5);
  will-change: transform;
}
.preview-inner {
  position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 14px;
  clip-path: inset(50% 50% 50% 50% round 14px);
  transition: clip-path 0.7s var(--ease);
  box-shadow: 0 40px 80px -20px rgba(15, 40, 100, 0.45);
}
.preview.is-on .preview-inner { clip-path: inset(0 0 0 0 round 14px); }
.preview img, .preview .ph {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top;
  opacity: 0; transform: scale(1.12); transition: opacity 0.5s, transform 1s var(--ease-out);
}
.preview .is-active { opacity: 1; transform: scale(1); }

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.work-grid[hidden] { display: none; }
.card {
  display: flex; flex-direction: column; border-radius: var(--radius); padding: 10px; overflow: hidden;
  opacity: 0; transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 0.6s var(--ease-out), box-shadow 0.5s var(--ease-out), background 0.4s;
}
.card.is-in { opacity: 1; transform: none; }
.card.is-in:hover { transform: translateY(-6px); box-shadow: var(--glass-shadow-hover); background: rgba(255, 255, 255, 0.75); }
.card-media {
  position: relative; padding: clamp(20px, 3.6vw, 44px) clamp(20px, 3.6vw, 44px) 0; border-radius: 14px; overflow: hidden;
  background: var(--card-bg);
}
.card-media .browser { border-radius: 10px 10px 0 0; transform: translateY(6px); transition: transform 0.9s var(--ease-out); }
.card:hover .card-media .browser { transform: translateY(-2px) scale(1.015); }
.card-body { display: grid; gap: 12px; padding: 20px 14px 14px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.card-name { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-xl); line-height: 1.15; letter-spacing: -0.025em; color: var(--navy); }
.card-cat { font-size: 13px; color: var(--muted); text-align: right; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.card-tags li { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--blue); background: var(--grad-soft); border: 1px solid rgba(37, 99, 235, 0.14); }
.card-more { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-display); font-size: var(--fs-sm); font-weight: 700; color: var(--blue); }
.card-more span { transition: transform 0.4s var(--ease-out); }
.card:hover .card-more span { transform: translateX(5px); }

.browser {
  position: relative; border-radius: 10px; overflow: hidden; background: #fff;
  box-shadow: 0 30px 60px -25px rgba(10, 23, 51, 0.5), 0 0 0 1px rgba(10, 23, 51, 0.06);
}
.browser-bar {
  display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #eef2f9;
}
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #cfd7e6; }
.browser-bar i:first-child { background: #ec6a5e; } .browser-bar i:nth-child(2) { background: #f4be4f; } .browser-bar i:nth-child(3) { background: #61c554; }
.browser-url {
  flex: 1; margin: 0 8px 0 10px; height: 17px; border-radius: 5px; background: #fff;
  font-family: var(--f-mono); font-size: 9.5px; line-height: 17px; color: #6b7a96; text-align: center;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.browser-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #f3f6fb; }
.browser-view img { width: 100%; height: auto; transform: translateY(0); transition: transform var(--dur, 6s) cubic-bezier(0.45, 0, 0.25, 1); }
.browser:hover .browser-view img, .card:hover .browser-view img { transform: translateY(var(--shift, 0)); }
.browser-view iframe {
  position: absolute; top: 0; left: 0; border: 0; width: 1280px; height: 800px;
  transform-origin: 0 0; transform: scale(var(--scale, 0.5)); pointer-events: none;
}
.ph { display: grid; place-items: center; background: var(--ph-bg, #1e3a8a); color: var(--ph-fg, #fff); font-family: var(--f-display); font-weight: 700; font-size: 32px; }

.work-note { margin-top: 28px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

/* ---------- Proceso ---------- */
.craft-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.craft-list li:nth-child(2) { transition-delay: 0.08s; } .craft-list li:nth-child(3) { transition-delay: 0.16s; } .craft-list li:nth-child(4) { transition-delay: 0.24s; }
.craft-n {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 20px;
  font-family: var(--f-mono); font-size: 13px; font-weight: 500; color: var(--blue); background: var(--grad-soft); border: 1px solid rgba(37, 99, 235, 0.16);
}
.craft-list p { color: var(--muted); font-size: 15px; }

/* ---------- Contacto ---------- */
.contact { padding: clamp(72px, 12vh, 128px) var(--gutter) 28px; }
.contact-box {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.4fr) auto; align-items: center; gap: 32px 48px;
  padding: clamp(32px, 5vw, 64px); border-radius: 28px;
  transition: box-shadow 0.5s var(--ease-out), opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.contact-box::before {
  content: ''; position: absolute; z-index: -1; right: -10%; top: -60%; width: 60%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.28), transparent 65%);
}
.contact-box:hover { box-shadow: var(--glass-shadow-hover); }
.contact-title { margin: 14px 0 12px; font-family: var(--f-display); font-weight: 800; font-size: var(--fs-2xl); line-height: 1.12; letter-spacing: -0.03em; color: var(--navy); max-width: 20ch; }
.contact-lead { color: var(--muted); max-width: 480px; }
.contact-actions { display: flex; flex-direction: column; gap: 12px; }
.contact-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; justify-content: space-between;
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted);
}
.contact-foot .brand-mark { font-size: 20px; }
.contact-foot a:hover { color: var(--blue); }

/* ---------- Ficha de proyecto ---------- */
.project {
  position: fixed; inset: 0; z-index: 50;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--p-bg); color: var(--p-fg);
  --p-muted: color-mix(in srgb, var(--p-fg) 62%, transparent);
  --p-line: color-mix(in srgb, var(--p-fg) 16%, transparent);
}
.project[hidden] { display: none; }
.p-bar {
  position: sticky; top: 0; z-index: 2;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 72px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--p-bg) 55%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--p-line);
}
.p-close { justify-self: start; display: inline-flex; align-items: center; gap: 12px; font-size: var(--fs-sm); font-weight: 500; }
.p-close-x { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--p-line); transition: transform 0.6s var(--ease-out), background 0.3s; }
.p-close:hover .p-close-x { transform: rotate(90deg); background: var(--p-fg); color: var(--p-bg); }
.p-counter { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: 0.14em; }
.p-counter b { font-weight: 500; }
.p-arrows { justify-self: end; display: flex; gap: 8px; }
.p-arrows button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--p-line); transition: background 0.3s, color 0.3s, transform 0.3s var(--ease-out); }
.p-arrows button:hover { background: var(--p-fg); color: var(--p-bg); transform: translateY(-2px); }

.p-hero { padding: clamp(32px, 7vh, 80px) var(--gutter) clamp(28px, 5vh, 56px); }
.p-kicker { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--p-muted); }
.p-title {
  margin: 14px 0 16px;
  font-family: var(--p-font, var(--f-display)); font-weight: 700;
  font-size: clamp(40px, 7vw, 96px); line-height: 1; letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.p-title:focus { outline: none; }
.p-tagline { line-height: 1.3; font-family: var(--f-display); font-weight: 600; font-size: var(--fs-xl); color: var(--p-accent); max-width: 28ch; }

.p-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(170px, 18vw, 260px); gap: clamp(20px, 3vw, 48px); align-items: end;
  padding: 0 var(--gutter);
}
.p-stage .browser-view { aspect-ratio: 16 / 10; }
.p-stage .browser-view img { animation: autoscroll var(--adur, 24s) cubic-bezier(0.45, 0, 0.55, 1) 1.2s infinite alternate; transition: none; }
.p-stage .browser:hover .browser-view img { animation-play-state: paused; }
@keyframes autoscroll { 0%, 12% { transform: translateY(0); } 88%, 100% { transform: translateY(var(--shift, 0)); } }

.phone {
  position: relative; border-radius: 30px; padding: 8px; background: #111;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55);
}
.phone::before { content: ''; position: absolute; top: 14px; left: 50%; width: 30%; height: 14px; border-radius: 10px; background: #111; transform: translateX(-50%); z-index: 1; }
.phone img { border-radius: 23px; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; width: 100%; }

.p-body {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px);
  padding: clamp(56px, 10vh, 112px) var(--gutter);
}
.p-desc { font-family: var(--f-sans); font-size: var(--fs-lg); line-height: 1.6; }
.p-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px; font-family: var(--f-display); font-size: 15px; font-weight: 700;
  border: 1px solid var(--p-fg); isolation: isolate;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), color 0.3s;
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--p-fg);
  transform: translateY(101%); border-radius: 50% 50% 0 0; transition: transform 0.6s var(--ease), border-radius 0.6s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.5); }
.btn:hover::before { transform: none; border-radius: 0; }
.btn:hover { color: var(--p-bg); }
.btn-solid { background: var(--p-fg); color: var(--p-bg); }
.btn-solid::before { background: var(--p-accent); }
.btn-solid:hover { color: var(--p-bg); border-color: var(--p-accent); }

.p-facts { display: grid; gap: 0; align-content: start; }
.fact { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--p-line); }
.fact:last-child { border-bottom: 1px solid var(--p-line); }
.fact dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--p-muted); padding-top: 3px; }
.fact dd { margin: 0; }
.fact ul { list-style: none; margin: 0; padding: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: grid; gap: 6px; justify-items: center; font-family: var(--f-mono); font-size: 10px; color: var(--p-muted); }
.swatch i { width: 36px; height: 36px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px var(--p-line); transition: transform 0.4s var(--ease-out); }
.swatch:hover i { transform: scale(1.15); }
.fonts li { font-size: 20px; line-height: 1.5; }

.p-next {
  display: block; position: relative; overflow: hidden;
  padding: clamp(48px, 9vh, 104px) var(--gutter);
  border-top: 1px solid var(--p-line);
}
.p-next-label { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--p-muted); }
.p-next-name {
  display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12px;
  font-family: var(--next-font, var(--f-display)); font-weight: 700; font-size: clamp(36px, 6vw, 80px); line-height: 1; letter-spacing: -0.02em;
  transition: transform 0.8s var(--ease-out);
}
.p-next-name span:last-child { font-family: var(--f-sans); font-weight: 300; font-size: 0.5em; transition: transform 0.8s var(--ease-out); }
.p-next::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--next-bg);
  clip-path: inset(100% 0 0 0); transition: clip-path 0.8s var(--ease);
}
.p-next { isolation: isolate; transition: color 0.5s; }
.p-next:hover { color: var(--next-fg); }
.p-next:hover::before { clip-path: inset(0 0 0 0); }
.p-next:hover .p-next-name span:last-child { transform: translateX(12px); }

.p-anim { opacity: 0; transform: translateY(40px); }
.project.is-in .p-anim { opacity: 1; transform: none; transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.project .line > span { transition-delay: calc(var(--i, 0) * 70ms); }
.project.is-out .p-anim, .project.is-out .line > span { transition: opacity 0.35s, transform 0.5s var(--ease); transition-delay: 0s; }
.project.is-out .p-anim { opacity: 0; transform: translateX(calc(var(--out, -1) * 40px)); }

.curtain { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.curtain > div { position: absolute; inset: 0; clip-path: inset(0 0 0 100%); }
.curtain.is-active { pointer-events: auto; }

/* ---------- Cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: grid; place-items: center;
    position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none;
    width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
    background: var(--blue-2); mix-blend-mode: multiply;
    transition: width 0.5s var(--ease-out), height 0.5s var(--ease-out), margin 0.5s var(--ease-out), opacity 0.3s, background 0.3s;
  }
  .cursor.is-big {
    width: 84px; height: 84px; margin: -42px 0 0 -42px; mix-blend-mode: normal;
    background: rgba(29, 78, 216, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px -8px rgba(29, 78, 216, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  }
  .cursor-label { font-family: var(--f-display); font-size: 12px; font-weight: 700; color: #fff; opacity: 0; transition: opacity 0.3s; white-space: nowrap; }
  .cursor.is-big .cursor-label { opacity: 1; }
  .cursor.is-hidden { opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .craft-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-nav { display: none; }
  .nav-glass { grid-template-columns: 1fr auto; }
}
@media (max-width: 900px) {
  :root { --header-h: 76px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: calc(var(--header-h) + 40px); }
  .hero-visual { max-width: 560px; width: 100%; margin: 0 auto; }
  .hero-count { left: -8px; }
  .float-speed { right: -6px; }
  .service-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .contact-box { grid-template-columns: 1fr; }
  .contact-actions { flex-direction: row; flex-wrap: wrap; }
  .p-body { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .preview { display: none; }
}
@media (max-width: 640px) {
  .nav-glass { padding: 0 6px 0 18px; height: 54px; }
  .hero-actions .btn-cta, .hero-actions .btn-ghost, .contact-actions a { width: 100%; }
  .float-seo { display: none; }
  .hero-shot { transform: none; }
  .craft-list { grid-template-columns: 1fr; }
  .service, .craft-list li { padding: 24px; }
  .row-link { grid-template-columns: 1fr auto; grid-template-areas: "thumb thumb" "name arrow" "meta meta"; gap: 8px 16px; }
  .row-n { display: none; }
  .row-thumb { grid-area: thumb; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 10px; background: var(--row-bg); }
  .row-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
  .row-name { grid-area: name; }
  .row-arrow { grid-area: arrow; opacity: 1; transform: none; }
  .row-meta { grid-area: meta; text-align: left; }
  .card-head { flex-direction: column; gap: 4px; }
  .card-cat { text-align: left; }
  .p-bar { grid-template-columns: 1fr auto; }
  .p-counter { display: none; }
  .p-close-label { display: none; }
  .p-stage { grid-template-columns: 1fr; }
  .p-stage .phone { width: 62%; margin: -28% 0 0 auto; position: relative; }
  .fact { grid-template-columns: 1fr; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}
