/* NSS Software — premium digital infrastructure */
:root {
  --bg: #08090C;
  --bg-1: #0B0D11;
  --bg-2: #0E1116;
  --panel: #11141A;
  --line: rgba(245, 247, 250, 0.08);
  --line-strong: rgba(245, 247, 250, 0.16);
  --fg: #F5F7FA;
  --fg-2: rgba(245, 247, 250, 0.72);
  --fg-3: rgba(245, 247, 250, 0.48);
  --fg-4: rgba(245, 247, 250, 0.28);
  --accent: #3B82F6;
  --accent-soft: #7DD3FC;
  --radius: 2px;
  --container: 1400px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-pad: clamp(72px, 9vw, 140px);

  --sans: "General Sans", "Inter Tight", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

/* Light mode (Tweaks) */
.theme-light {
  --bg: #F5F7FA;
  --bg-1: #EEF1F5;
  --bg-2: #E6EAF0;
  --panel: #FFFFFF;
  --line: rgba(8, 9, 12, 0.10);
  --line-strong: rgba(8, 9, 12, 0.20);
  --fg: #0A0A0A;
  --fg-2: rgba(8, 9, 12, 0.72);
  --fg-3: rgba(8, 9, 12, 0.50);
  --fg-4: rgba(8, 9, 12, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-feature-settings: "ss01", "ss02", "cv11";
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip en lugar de hidden: previene scroll horizontal global
     sin bloquear overflow-x:auto en contenedores hijos (iOS Safari) */
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- typography utilities ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--fg-3);
  display: inline-block;
}
.eyebrow.no-bar::before { display: none; }

.display {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-size: clamp(36px, 6.5vw, 96px);
  color: var(--fg);
}
/* mask-reveal dentro de .display necesita padding para que overflow:hidden
   no ampute ascendentes ni descenendentes con line-height ajustado */
.display .mask-reveal {
  padding: 0.06em 0 0.1em;
}
.display .thin { font-weight: 300; color: var(--fg-2); font-style: italic; letter-spacing: -0.04em; }

.h2 {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.02;
  font-size: clamp(36px, 5.2vw, 80px);
}
.h3 {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: clamp(22px, 2.2vw, 32px);
}
.lede {
  font-size: clamp(17px, 1.35vw, 22px);
  line-height: 1.45;
  color: var(--fg-2);
  max-width: 56ch;
  letter-spacing: -0.005em;
}
.small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  /* NOTE: backdrop-filter intentionally on ::before, NOT here.
     Any backdrop-filter/filter/transform on a fixed parent makes it
     the containing block for fixed children — breaking the mobile overlay. */
  border-bottom: 1px solid var(--line);
  transition: background 0.4s ease, border-color 0.4s ease;
}
/* Glass blur lives on the pseudo-element so .nav-mobile position:fixed
   is relative to the viewport, not this element. */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(8, 9, 12, 0.78);                       /* fallback */
  background: color-mix(in oklab, var(--bg) 70%, transparent);
}
.theme-light .nav::before {
  background: rgba(245, 247, 250, 0.82);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.brand-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  position: relative;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-suffix { color: var(--fg-3); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; margin-left: 4px; }

.nav-links {
  display: flex;
  gap: 0;
  align-items: center;
}
.nav-link {
  font-size: 13px;
  color: var(--fg-2);
  padding: 8px 16px;
  border-radius: var(--radius);
  position: relative;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--fg); }
.nav-link .idx { font-family: var(--mono); font-size: 10px; color: var(--fg-4); letter-spacing: 0.08em; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg);
  border: 1px solid var(--line-strong);
  padding: 8px 14px 8px 16px;
  border-radius: 999px;
  transition: border-color 0.3s, background 0.3s;
}
.nav-cta:hover { border-color: var(--fg); background: color-mix(in oklab, var(--fg) 6%, transparent); }
.nav-cta .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 12px 1px color-mix(in oklab, var(--accent) 70%, transparent); }

@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 80% 10%, color-mix(in oklab, var(--accent) 14%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 90%, color-mix(in oklab, var(--accent-soft) 8%, transparent) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(8,9,12,0.55) 0%, rgba(8,9,12,0.88) 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 60%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 60%, black 30%, transparent 80%);
}
.hero-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.hero-meta-col { display: flex; flex-direction: column; gap: 6px; }
.hero-meta-col .label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-4); }
.hero-meta-col .value { font-family: var(--mono); font-size: 12px; color: var(--fg-2); letter-spacing: 0.04em; }

.hero h1 { margin: 0; }
.hero-sub {
  margin-top: 32px;
  max-width: 58ch;
}
.hero-actions {
  margin-top: 56px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: -0.005em;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  background: transparent;
  color: var(--fg);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover {
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--fg) 8%, transparent);
}
.btn-ghost { border-color: var(--line-strong); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); background: color-mix(in oklab, var(--fg) 4%, transparent); }
.btn .arrow { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.btn:hover .arrow { transform: translateX(4px); }

.hero-bottom {
  margin-top: 80px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-bottom .scroll-cue {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.scroll-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--fg-3), transparent);
  animation: scrollLine 2.6s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.01% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* hero figure (architectural geometry on the right) */
.hero-figure {
  position: absolute;
  right: var(--gutter);
  top: 100px;
  width: clamp(280px, 38vw, 560px);
  aspect-ratio: 1 / 1.05;
  z-index: -1;
  pointer-events: none;
  opacity: 0.85;
}
.hero-figure svg { width: 100%; height: 100%; display: block; }

@media (max-width: 1024px) {
  .hero-figure { opacity: 0.35; right: -10%; top: 80px; width: 80vw; }
}

/* ---------- section frame ---------- */
.section {
  padding: var(--section-pad) 0;
  position: relative;
}
.section-header {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  margin-bottom: 56px;
  align-items: end;
}
@media (max-width: 880px) {
  .section-header { grid-template-columns: 1fr; gap: 32px; }
}
.section-header h2 { margin: 8px 0 0; }
.section-rule {
  height: 1px;
  background: var(--line);
  margin: 0 calc(var(--gutter) * -1);
  width: auto;
}

/* ---------- trust band ---------- */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0;
}
@media (max-width: 880px) {
  .trust-grid { grid-template-columns: 1fr; }
}
.trust-cell {
  padding: 64px var(--gutter);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.trust-cell:last-child { border-right: none; }
@media (max-width: 880px) {
  .trust-cell { border-right: none; border-bottom: 1px solid var(--line); }
  .trust-cell:last-child { border-bottom: none; }
}
.trust-cell .stat {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.trust-cell .stat .unit { color: var(--fg-3); font-weight: 400; font-size: 0.5em; vertical-align: top; margin-left: 6px; }
.trust-cell .copy { color: var(--fg-2); font-size: 14px; line-height: 1.5; max-width: 36ch; }
.trust-philosophy { padding: 64px var(--gutter); border-right: 1px solid var(--line); }
.trust-philosophy p { font-size: clamp(20px, 1.8vw, 28px); line-height: 1.35; letter-spacing: -0.015em; color: var(--fg); margin: 12px 0 0; max-width: 24ch; }

/* ---------- services ---------- */
.services {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.svc-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.svc-card {
  background: var(--bg-1);
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 380px;
  position: relative;
  transition: background 0.4s;
}
.svc-card:hover { background: var(--bg-2); }
.svc-card .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-4);
}
.svc-card .name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(20px, 1.6vw, 24px);
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.svc-card .price {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
}
.svc-card .desc {
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}
.svc-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.svc-card li {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--fg-2);
  align-items: baseline;
}
.svc-card li::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 999px;
  flex-shrink: 0;
  transform: translateY(6px);
}
.svc-card .footnote {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* span grid */
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
@media (max-width: 1100px) {
  .span-4, .span-6, .span-8 { grid-column: span 6; }
}
@media (max-width: 680px) {
  .span-4, .span-6, .span-8 { grid-column: span 12; }
}

/* ---------- card wireframe (svg accents) ---------- */
.svc-wire {
  height: 80px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(to bottom, color-mix(in oklab, var(--fg) 2%, transparent), transparent);
}
.svc-wire svg { width: 100%; height: 100%; display: block; }
.svc-wire .ln { stroke: var(--fg-4); stroke-width: 1; fill: none; }
.svc-wire .ln-strong { stroke: var(--fg-2); stroke-width: 1; fill: none; }
.svc-wire .accent { stroke: var(--accent); fill: none; stroke-width: 1.2; }
.svc-wire .fillpanel { fill: color-mix(in oklab, var(--fg) 4%, transparent); }

/* ---------- work / case studies ---------- */
.work {
  padding-top: var(--section-pad);
}
.work-list {
  display: flex;
  flex-direction: column;
}
.work-item {
  display: grid;
  grid-template-columns: 0.7fr 1.5fr 0.6fr;
  gap: 48px;
  align-items: end;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.work-item:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 1024px) {
  .work-item { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; }
}
.work-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.work-num .pill { display: inline-block; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg-2); width: max-content; }
.work-title { font-family: var(--sans); font-weight: 500; font-size: clamp(28px, 3.4vw, 52px); letter-spacing: -0.025em; line-height: 1.02; }
.work-title .meta { display: block; font-size: 14px; font-weight: 400; color: var(--fg-3); letter-spacing: 0; margin-top: 14px; line-height: 1.45; max-width: 36ch; }
.work-thumb {
  aspect-ratio: 1 / 0.9;
  border: 1px solid var(--line);
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

/* placeholder slot */
.slot {
  position: relative;
  background:
    repeating-linear-gradient(135deg, color-mix(in oklab, var(--fg) 3%, transparent) 0 1px, transparent 1px 14px),
    var(--bg-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
}
.slot-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 10px 14px;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.slot::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--line-strong);
  pointer-events: none;
}

/* hero work — first case is full-bleed */
.work-feature {
  margin-bottom: 80px;
  border: 1px solid var(--line);
  aspect-ratio: 21 / 9;
  position: relative;
  overflow: hidden;
}

/* ---------- ai / systems ---------- */
.ai {
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 1024px) {
  .ai-grid { grid-template-columns: 1fr; gap: 56px; }
}
.ai-diagram {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in oklab, var(--accent) 5%, transparent) 0%, transparent 60%),
    var(--bg-2);
  border-radius: 4px;
  overflow: hidden;
}
.ai-diagram svg { width: 100%; height: 100%; }
.ai-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 40px;
}
.ai-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.ai-row .idx { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--fg-4); }
.ai-row .name { font-family: var(--sans); font-weight: 500; font-size: 18px; letter-spacing: -0.01em; }
.ai-row .name .d { display: block; font-weight: 400; color: var(--fg-3); font-size: 13px; margin-top: 6px; max-width: 48ch; }
.ai-row .price { font-family: var(--mono); font-size: 12px; color: var(--fg-2); letter-spacing: 0.04em; white-space: nowrap; }

/* ---------- process ---------- */
.process { border-top: 1px solid var(--line); }
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
@media (max-width: 880px) {
  .process-grid { grid-template-columns: 1fr 1fr; }
}
.process-step {
  padding: 48px 32px 56px 0;
  border-left: 1px solid var(--line);
  padding-left: 32px;
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.process-step:first-child { border-left: 1px solid var(--line); }
.process-step .step-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.process-step .step-title { font-family: var(--sans); font-weight: 500; font-size: clamp(22px, 2vw, 30px); letter-spacing: -0.02em; }
.process-step .step-desc { font-size: 14px; color: var(--fg-2); line-height: 1.55; }
.process-step .step-meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-4); margin-top: auto; }

/* ---------- testimonials ---------- */
.testimonials { background: var(--bg-1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 880px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial {
  background: var(--bg-1);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: 320px;
}
.testimonial blockquote {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.015em;
  line-height: 1.32;
  color: var(--fg);
  flex: 1;
}
.testimonial blockquote::before { content: "“"; color: var(--accent); margin-right: 2px; }
.testimonial blockquote::after { content: "”"; color: var(--accent); }
.testimonial .who { display: flex; justify-content: space-between; align-items: end; gap: 24px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.testimonial .who .name { color: var(--fg-2); }

/* ---------- cta ---------- */
.cta {
  padding: clamp(120px, 16vw, 220px) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 50% 50%, color-mix(in oklab, var(--accent) 10%, transparent) 0%, transparent 60%),
    var(--bg);
}
.cta h2 { max-width: 18ch; margin: 0 auto; }
.cta p { margin: 28px auto 0; color: var(--fg-2); max-width: 52ch; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.5; }
.cta .actions { margin-top: 56px; display: inline-flex; gap: 12px; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 80px;
}
@media (max-width: 880px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); font-weight: 400; margin: 0 0 24px; }
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.foot-col li a { font-size: 14px; color: var(--fg-2); transition: color 0.2s; }
.foot-col li a:hover { color: var(--fg); }
.foot-brand { display: flex; flex-direction: column; gap: 24px; }
.foot-brand p { color: var(--fg-2); font-size: 14px; line-height: 1.55; max-width: 30ch; }
.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  flex-wrap: wrap;
}

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }

/* masked headline reveal */
.mask-reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  /* padding vertical para que overflow:hidden no ampute
     ascendentes/descenendentes en tipografías display grandes */
  padding: 0.04em 0 0.08em;
  margin: -0.04em 0 -0.08em;   /* compensa el padding para no alterar el layout */
}
.mask-reveal > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.mask-reveal.in > span { transform: translateY(0); }

/* ---------- ambient hero geometry ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.float-slow { animation: float 8s ease-in-out infinite; }
.float-slower { animation: float 14s ease-in-out infinite; }

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.pulse-dot { animation: pulseDot 2.4s ease-in-out infinite; }

/* progress bar on top */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 100;
  transition: transform 0.05s linear;
}

/* utility */
.row { display: flex; align-items: center; gap: 16px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 24px; }

/* mega menu hover preview */
.mega {
  position: absolute;
  inset: 100% 0 auto 0;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: 56px var(--gutter);
  display: none;
}
.nav-link:hover + .mega, .mega:hover { display: block; }

/* ═══════════════════════════════════════════════════════════════
   NSS ANIMATION SYSTEM v2 — Cursor + Carousel + Motion
═══════════════════════════════════════════════════════════════ */

/* ── Custom Cursor ─────────────────────────────────────────── */
#nss-cursor {
  position: fixed;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, 0.45);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: border-color 0.2s, width 0.25s, height 0.25s;
  mix-blend-mode: difference;
}
#nss-cursor.hovered {
  width: 56px;
  height: 56px;
  border-color: var(--accent);
}
#nss-cursor-dot {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
@media (hover: none) {
  #nss-cursor, #nss-cursor-dot { display: none; }
}

/* ── Service Image Carousel ────────────────────────────────── */
.svc-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-2);
  margin-bottom: 20px;
  border: 1px solid var(--line);
}
.svc-carousel-frame {
  position: relative;
  width: 100%;
  height: 100%;
  transition: opacity 0.28s ease;
}
.svc-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.svc-carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 55%,
    rgba(8, 9, 12, 0.72) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 10px 14px;
  pointer-events: none;
}
.svc-carousel-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 247, 250, 0.55);
}
.svc-carousel-dots {
  position: absolute;
  bottom: 11px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 3;
}
.svc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 247, 250, 0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.22s, transform 0.22s;
}
.svc-dot.on {
  background: var(--accent);
  transform: scale(1.35);
}
.svc-dot:hover {
  background: rgba(245, 247, 250, 0.7);
}

/* ── Nav Active State ──────────────────────────────────────── */
.nav-link.active > span:last-child {
  color: var(--fg);
}
.nav-link.active .idx {
  color: var(--accent);
}

/* ── Scroll Reveal override (GSAP controls opacity) ────────── */
.reveal {
  will-change: transform, opacity;
}

/* ── CTA Pulse ─────────────────────────────────────────────── */
@keyframes nss-pulse {
  0%, 100% { opacity: 0.42; transform: scale(1); }
  50%       { opacity: 0.68; transform: scale(1.04); }
}
.cta-bg {
  animation: nss-pulse 5s ease-in-out infinite;
}

/* ── Process step accent line ──────────────────────────────── */
.process-step {
  position: relative;
}
.process-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.6s ease;
}
.process-step:hover::before {
  width: 100%;
}

/* ── Work thumb hover ──────────────────────────────────────── */
.work-thumb {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
}
.work-item:hover .work-thumb {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.18);
}
.work-thumb img {
  transition: transform 0.5s ease;
}
.work-item:hover .work-thumb img {
  transform: scale(1.06);
}

/* ── Hero figure 3D perspective ────────────────────────────── */
.hero-figure {
  perspective: 800px;
  transform-style: preserve-3d;
}

/* ════════════════════════════════════════════════════════════
   PORTFOLIO SECTION
   ════════════════════════════════════════════════════════════ */
.portfolio { border-top: 1px solid var(--line); }

.portfolio-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 64px 0 40px;
}
.portfolio-divider::before,
.portfolio-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.portfolio-divider::after { display: none; }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 80px;
}

.portfolio-card {
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease;
}
.portfolio-card:hover { background: var(--bg-1); }

/* imagen */
.portfolio-img-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.portfolio-card:hover .portfolio-img { transform: scale(1.04); }

/* badge */
.portfolio-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 2px;
  background: rgba(8, 9, 12, 0.82);
  color: var(--fg-3);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
}
.portfolio-badge.live {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.3);
}

/* cuerpo */
.portfolio-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.portfolio-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.portfolio-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-4);
  letter-spacing: 0.1em;
}
.portfolio-slug {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.portfolio-name {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.portfolio-desc {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.6;
  margin: 0;
}
.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.portfolio-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--fg-3);
}
.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-top: auto;
  padding-top: 8px;
  transition: gap 0.2s ease;
}
.portfolio-link:hover { gap: 10px; }
.portfolio-dev-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-4);
  letter-spacing: 0.08em;
  margin-top: auto;
  padding-top: 8px;
}

@media (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-body { padding: 20px; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   Breakpoints: 480 · 640 · 768 · 880 · 1024 · 1200
   ════════════════════════════════════════════════════════════ */

/* ── Nav mobile ─────────────────────────────────────────────── */
@media (max-width: 880px) {
  .nav-row { height: 56px; }
  .brand-suffix { display: none; }
}
@media (max-width: 480px) {
  .nav-cta span:last-child { display: none; }     /* solo el dot */
  .nav-cta { padding: 8px 14px; gap: 0; }
  .brand > span:not(.brand-mark) { font-size: 13px; }
}

/* ── Hero mobile ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    min-height: 100svh;
    padding: 80px 0 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .hero-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
    padding-top: 24px;
  }
  .hero-meta {
    gap: 12px;
    margin-bottom: 28px;
    flex-direction: column;
  }
  .hero-meta-col:not(:first-child) { display: none; }
  .hero-sub { max-width: 100%; font-size: 15px; margin-top: 20px; }
  .hero-actions { margin-top: 28px; }
  .hero-bottom { margin-top: 32px; flex-direction: column; gap: 8px; }
  .hero-bottom .hero-meta-col { text-align: left; }
  .scroll-cue { display: none; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ── Hero figure ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-figure {
    opacity: 0.12;
    right: -20%;
    top: 60px;
    width: 90vw;
    pointer-events: none;
  }
}

/* ── Trust / stats ──────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Keep stats side-by-side so the section doesn't look empty */
  .trust-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1px;
  }
  .trust-philosophy {
    grid-column: span 2;
    padding-bottom: 40px;
  }
  .trust-cell { padding: 28px 20px; }
}
@media (max-width: 480px) {
  .trust-philosophy p { font-size: 17px; line-height: 1.55; }
  .stat { font-size: clamp(36px, 11vw, 56px); }
}

/* ── Services: desktop = grid original / mobile = carousel ── */
/* Desktop (> 640px): sin cambios — usa el grid de 12 columnas  */

/* Mobile carousel — un solo bloque limpio, sin conflictos */
@media (max-width: 640px) {
  .svc-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 1px;
    background: var(--line);
    border: none;
    padding-bottom: 24px;
    scrollbar-width: none;
    /* Rompe fuera del container para llegar a los bordes */
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
  .svc-grid::-webkit-scrollbar { display: none; }
  /* Cada tarjeta ocupa ~85vw para indicar que hay más */
  .svc-card {
    flex: 0 0 85vw;
    min-width: 260px;
    max-width: 360px;
    scroll-snap-align: start;
    grid-column: unset !important;
    padding: 24px 20px;
  }
  .svc-card .name { font-size: 16px; }
}

/* ── Work / Portfolio images ────────────────────────────────── */
@media (max-width: 768px) {
  .work-feature { height: auto; aspect-ratio: 16 / 9; }
  .work-feature > div[style] { left: 20px !important; top: 20px !important; }
}
@media (max-width: 480px) {
  .work-feature { aspect-ratio: 4 / 3; }
  .work-list { margin-top: 24px; }
  .work-item { padding: 20px 0; gap: 12px; }
  .work-thumb { display: none; }
  .pill { display: none; }
}
@media (max-width: 640px) {
  .portfolio-img-wrap { aspect-ratio: 16 / 9; height: auto; }
  .portfolio-img { width: 100%; height: 100%; object-fit: cover; display: block; }
}

/* ── AI section ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ai-row { flex-direction: column; gap: 4px; padding: 16px 0; }
  .ai-row .price { font-size: 12px; }
}

/* ── Process ────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .process-grid { grid-template-columns: 1fr; }
  .process-step { padding: 24px 0; }
}

/* ── Testimonials ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .testimonial { padding: 32px 20px; }
  .testimonial blockquote { font-size: 16px; line-height: 1.65; }
}

/* ── Footer ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .foot-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
@media (max-width: 880px) and (min-width: 641px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .foot-brand { grid-column: span 2; }
}

/* ── CTA ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .cta .actions { flex-direction: column; align-items: flex-start; }
  .cta .actions .btn { width: 100%; justify-content: center; }
  .cta .display { font-size: clamp(32px, 9vw, 56px); }
}

/* ── General section spacing mobile ────────────────────────── */
@media (max-width: 640px) {
  .section-header { gap: 24px; margin-bottom: 48px; }
  .h2 { font-size: clamp(28px, 8vw, 48px); }
  .lede { font-size: 15px; }
}

/* ════════════════════════════════════════════════════════════
   HAMBURGER MENU + MOBILE OVERLAY NAV
   ════════════════════════════════════════════════════════════ */

/* Burger button — hidden on desktop */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.burger-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1),
              opacity 0.25s ease,
              width 0.25s ease;
  transform-origin: center;
}

/* Open state — X icon */
.nav--open .burger-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav--open .burger-line:nth-child(2) { opacity: 0; width: 0; }
.nav--open .burger-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile overlay panel */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  top: 56px;           /* nav height */
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 200;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.nav--open .nav-mobile {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}
.nav-mobile-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 64px;
}
.nav-mobile-link:active { background: var(--bg-1); }
.nav-mobile-idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-4);
  letter-spacing: 0.1em;
  min-width: 28px;
}
.nav-mobile-arrow {
  margin-left: auto;
  color: var(--fg-3);
  transition: transform 0.2s ease;
}
.nav-mobile-link:hover .nav-mobile-arrow { transform: translateX(4px); }
.nav-mobile-cta {
  display: block;
  margin: 24px var(--gutter);
  padding: 18px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 4px;
  text-align: center;
  transition: filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-mobile-cta:active { filter: brightness(0.9); }

.nav-mobile-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-4);
  letter-spacing: 0.06em;
}

@media (max-width: 880px) {
  .nav-burger { display: flex; }
  .nav-links  { display: none; }
  .nav-mobile { display: flex; }
  .nav--open  { position: fixed; width: 100%; }
}

/* ── Touch targets mínimos (WCAG 2.5.5) ────────────────────── */
@media (hover: none) {
  .btn { min-height: 44px; }
  .svc-dot { width: 10px; height: 10px; padding: 8px; box-sizing: content-box; }
  .portfolio-link { min-height: 44px; }
}

/* ════════════════════════════════════════════════════════════
   SCROLL MARGIN — compensa la nav fija en todos los anchors
   ════════════════════════════════════════════════════════════ */
#top, #services, #portfolio, #ai, #process, #cta, #trust, #work {
  scroll-margin-top: 64px;
}
@media (max-width: 880px) {
  #top, #services, #portfolio, #ai, #process, #cta, #trust {
    scroll-margin-top: 56px;
  }
}

/* ════════════════════════════════════════════════════════════
   TAP FEEDBACK — respuesta visual inmediata al toque
   ════════════════════════════════════════════════════════════ */
.btn,
.nav-cta,
.portfolio-link,
.nav-mobile-link,
.svc-dot {
  -webkit-tap-highlight-color: transparent;
}
.btn:active          { transform: scale(0.97) !important; }
.btn-primary:active  { filter: brightness(0.92) !important; }
.btn-ghost:active    { background: color-mix(in oklab, var(--fg) 10%, transparent) !important; }
.nav-cta:active      { opacity: 0.8; }
.portfolio-card:active .portfolio-img { transform: scale(1.02); }

/* ════════════════════════════════════════════════════════════
   MOBILE PERFORMANCE — desactiva animaciones pesadas en móvil
   ════════════════════════════════════════════════════════════ */
@media (max-width: 880px) {
  /* Flotación del hero figure — consume GPU innecesariamente */
  .float-slower { animation: none; }
  /* Scan line del hiperframe — no se aprecia en pantallas pequeñas */
  .hf-scan, .hf-mid-h { display: none; }
  /* Ticker más lento en mobile */
  .ticker-track { animation-duration: 55s; }
}

/* ════════════════════════════════════════════════════════════
   PREFERS-REDUCED-MOTION — accesibilidad
   ════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .mask-reveal { opacity: 1 !important; transform: none !important; }
  .mask-reveal > span   { transform: none !important; }
}

/* ════════════════════════════════════════════════════════════
   SAFE AREA — iPhone notch / dynamic island
   ════════════════════════════════════════════════════════════ */
.nav {
  padding-left:  env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.nav-mobile {
  padding-bottom: env(safe-area-inset-bottom);
}
.foot {
  padding-bottom: calc(var(--section-pad) + env(safe-area-inset-bottom));
}

/* ════════════════════════════════════════════════════════════
   IMAGE OPTIMIZATION — carga eficiente
   ════════════════════════════════════════════════════════════ */
img {
  max-width: 100%;
  height: auto;
}
/* Contenedor de imagen siempre muestra algo mientras carga */
.portfolio-img-wrap,
.work-thumb,
.svc-carousel {
  background: var(--bg-2);
}

/* ════════════════════════════════════════════════════════════
   MOBILE HERO — ajustes finos para pantallas pequeñas
   ════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* El meta del hero queda solo con el essencial */
  .hero-meta { display: none; }
  /* El sub del hero más compacto */
  .hero-sub {
    font-size: 15px;
    line-height: 1.55;
    margin-top: 20px;
  }
  /* Botones hero en columna */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 28px;
    gap: 10px;
  }
  .hero-actions .btn {
    justify-content: center;
    min-height: 52px;
    font-size: 15px;
  }
  /* HiperFrames más pequeños */
  .hiper-frames { inset: 10px; }
  .hf-corner { width: 28px; height: 28px; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE SERVICE CARDS — más legibles
   ════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .svc-card { padding: 20px 16px; gap: 12px; }
  .svc-card .name { font-size: 16px; }
  .svc-card .price { font-size: 13px; }
  .svc-card ul { gap: 8px; }
  .svc-card li { font-size: 13px; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE PORTFOLIO GRID
   ════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .portfolio-grid { grid-template-columns: 1fr; gap: 0; }
  .portfolio-body { padding: 16px; gap: 10px; }
  .portfolio-name { font-size: 16px; }
  .portfolio-desc { font-size: 13px; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE CTA SECTION
   ════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .cta .display { font-size: clamp(28px, 9vw, 48px) !important; }
  .cta .lede { font-size: 14px; }
  .cta .actions {
    flex-direction: column;
    gap: 10px;
  }
  .cta .actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
  }
}

/* ════════════════════════════════════════════════════════════
   TICKER MOBILE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .ticker-item { font-size: 9.5px; padding: 0 20px; }
}

/* ════════════════════════════════════════════════════════════
   BRANDMARK — LOGO DRAW-IN ANIMATION
   ════════════════════════════════════════════════════════════ */
.bm-rect {
  stroke-dasharray: 82;
  stroke-dashoffset: 82;
  animation: bm-draw 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.15s;
}
.bm-n {
  stroke-dasharray: 55;
  stroke-dashoffset: 55;
  animation: bm-draw 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.6s;
}
.bm-dot {
  opacity: 0;
  animation: bm-dot-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 1.1s;
}
@keyframes bm-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes bm-dot-in {
  from { opacity: 0; transform: scale(0); transform-origin: 12px 12px; }
  to   { opacity: 1; transform: scale(1); transform-origin: 12px 12px; }
}
/* subtle glow pulse on the dot after it appears */
@keyframes bm-glow {
  0%, 100% { filter: drop-shadow(0 0 2px var(--accent)); }
  50%       { filter: drop-shadow(0 0 6px var(--accent)); }
}
.brand-mark-svg .bm-dot {
  animation:
    bm-dot-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 1.1s,
    bm-glow 2.4s ease-in-out infinite 2s;
}

/* ════════════════════════════════════════════════════════════
   HIPER FRAMES — Animated corner brackets in hero
   ════════════════════════════════════════════════════════════ */
.hiper-frames {
  position: absolute;
  inset: 24px;
  pointer-events: none;
  z-index: 4;
}
/* corner svgs */
.hf-corner {
  position: absolute;
  width: 48px;
  height: 48px;
}
.hf-tl { top: 0; left: 0; }
.hf-tr { top: 0; right: 0; }
.hf-bl { bottom: 0; left: 0; }
.hf-br { bottom: 0; right: 0; }

/* draw-in path animation */
.hf-path {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: hf-draw 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.hf-tl .hf-path { animation-delay: 0.35s; }
.hf-tr .hf-path { animation-delay: 0.50s; }
.hf-bl .hf-path { animation-delay: 0.65s; }
.hf-br .hf-path { animation-delay: 0.80s; }

@keyframes hf-draw {
  to { stroke-dashoffset: 0; }
}

/* horizontal scan line — sweeps hero every 6s */
.hf-scan {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    color-mix(in oklab, var(--accent) 60%, transparent) 30%,
    color-mix(in oklab, var(--accent) 80%, transparent) 50%,
    color-mix(in oklab, var(--accent) 60%, transparent) 70%,
    transparent 100%
  );
  opacity: 0;
  animation: hf-scan-move 6s ease-in-out infinite 2s;
}
@keyframes hf-scan-move {
  0%   { top: 0%;   opacity: 0; }
  3%   { opacity: 0.5; }
  97%  { opacity: 0.5; }
  100% { top: 100%; opacity: 0; }
}

/* mid-line subtle horizontal rule */
.hf-mid-h {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--line-strong) 20%,
    var(--line-strong) 80%,
    transparent
  );
  opacity: 0;
  animation: hf-fade-in 1s ease forwards 1.2s;
}
@keyframes hf-fade-in {
  to { opacity: 1; }
}

/* on mobile reduce frames size */
@media (max-width: 640px) {
  .hiper-frames { inset: 12px; }
  .hf-corner { width: 32px; height: 32px; }
  .hf-mid-h { display: none; }
}

/* ════════════════════════════════════════════════════════════
   TICKER — Urgency scrolling strip
   ════════════════════════════════════════════════════════════ */
.ticker {
  overflow: hidden;
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  user-select: none;
  position: relative;
  z-index: 10;
}
.ticker::before,
.ticker::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.ticker::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-1), transparent);
}
.ticker::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-1), transparent);
}
.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-roll 40s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-roll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 0 32px;
  transition: color 0.2s;
}
.ticker-item:hover { color: var(--fg-2); }
.ticker-diamond {
  color: var(--accent);
  font-size: 5px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   CTA IMPACT ROWS — urgency bullets
   ════════════════════════════════════════════════════════════ */
.cta-impact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 40px;
  margin: 40px 0 0;
  max-width: 680px;
}
.cta-impact-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cta-impact-sym {
  font-size: 16px;
  line-height: 1.4;
  flex-shrink: 0;
  width: 20px;
}
.cta-impact-text {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.6;
}
@media (max-width: 640px) {
  .cta-impact { grid-template-columns: 1fr; gap: 12px; }
}

/* ════════════════════════════════════════════════════════════
   WORK FEATURE — Meridian Capital card (no overlay on mobile)
   ════════════════════════════════════════════════════════════ */
.wf-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.wf-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wf-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8,9,12,0.18) 0%, rgba(8,9,12,0.62) 100%);
  z-index: 1;
}
.wf-overlay-top {
  position: absolute;
  left: 32px; top: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}
.wf-eyebrow  { color: rgba(245,247,250,0.7); }
.wf-title    { max-width: 22ch; color: #F5F7FA; text-shadow: 0 2px 16px rgba(0,0,0,0.6); }
.wf-overlay-bottom {
  position: absolute;
  right: 32px; bottom: 32px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(245,247,250,0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}
/* Caption block — hidden on desktop, shown on mobile */
.wf-caption { display: none; }

@media (max-width: 640px) {
  .work-feature {
    aspect-ratio: unset;
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .wf-media {
    aspect-ratio: 16 / 9;
    height: auto;
    flex-shrink: 0;
  }
  /* Hide floating overlays on mobile (they cover the image) */
  .wf-overlay-top,
  .wf-overlay-bottom { display: none; }
  /* Show caption block below image */
  .wf-caption {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background: var(--bg-1);
    border-top: 1px solid var(--line);
  }
  .wf-caption-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--fg);
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-top: 4px;
  }
  .wf-caption-meta {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg-4);
    margin-top: 4px;
  }
}

/* ════════════════════════════════════════════════════════════
   STAT — prevent fraction ligature on "24/7"
   ════════════════════════════════════════════════════════════ */
.trust-cell .stat {
  font-variant-numeric: normal;
  font-feature-settings: normal;
}

/* ════════════════════════════════════════════════════════════
   FOOT — "First call is free" badge
   ════════════════════════════════════════════════════════════ */
.foot-free-call {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ════════════════════════════════════════════════════════════
   BUTTON ANIMATIONS — sweep shimmer (inspired by 21st.dev)
   Approach: a pseudo-element white gradient sweeps left→right
   on hover. No JS, no dependencies, stays on-brand.
   ════════════════════════════════════════════════════════════ */

/* Primary button — shimmer sweep */
.btn-primary {
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 80%
  );
  transform: skewX(-18deg);
  transition: left 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.btn-primary:hover::after {
  left: 150%;
}

/* Ghost button — border pulse on hover */
.btn-ghost {
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: color-mix(in oklab, var(--fg) 0%, transparent);
  transition: background 0.35s ease;
  pointer-events: none;
}
.btn-ghost:hover::before {
  background: color-mix(in oklab, var(--fg) 8%, transparent);
}

/* Arrow nudge on .btn hover (already existed, now smoother) */
.btn .arrow {
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn:hover .arrow {
  transform: translateX(5px);
}

/* ════════════════════════════════════════════════════════════
   SCROLL CUE — animated line pulse
   ════════════════════════════════════════════════════════════ */
.scroll-cue {
  position: relative;
  overflow: hidden;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 1px;
  height: 18px;
  background: var(--fg-3);
  animation: scroll-pulse 1.8s ease-in-out infinite;
  transform: translateX(-50%);
}
@keyframes scroll-pulse {
  0%   { transform: translateX(-50%) scaleY(0); transform-origin: top; opacity: 0; }
  30%  { opacity: 1; }
  60%  { transform: translateX(-50%) scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: translateX(-50%) scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* Nav CTA button — subtle accent glow on hover */
.nav-cta {
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.nav-cta:hover {
  box-shadow: 0 0 16px color-mix(in oklab, var(--accent) 25%, transparent);
}

/* ── Respect reduced-motion for all new animations ── */
@media (prefers-reduced-motion: reduce) {
  .btn-primary::after,
  .btn-ghost::before,
  .scroll-cue::after,
  .nav-cta { animation: none; transition: none; }
}

/* ── WhatsApp Form (CTA) ─────────────────────────────────── */
.wa-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
  margin-top: 48px;
}
.wa-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.wa-input {
  background: rgba(245, 247, 250, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.wa-input:focus { border-color: var(--accent); }
.wa-input::placeholder { color: var(--fg-4); }
.wa-select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='rgba(245,247,250,0.4)' stroke-width='1.3' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.wa-textarea { resize: vertical; min-height: 80px; }
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
  width: fit-content;
}
.btn-whatsapp:hover { background: #128C7E; }
.cta-contacts {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.cta-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-3);
  transition: color 0.2s;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.cta-contact-link:hover { color: var(--fg); }
@media (max-width: 640px) {
  .wa-form-row { grid-template-columns: 1fr; }
  .wa-form { max-width: 100%; }
  .cta-contacts { gap: 20px; }
}
/* ── Services carousel scroll hint ──────────────────────── */
@media (max-width: 640px) {
  .services .container::after {
    content: "← swipe →";
    display: block;
    text-align: center;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--fg-4);
    text-transform: uppercase;
    margin-top: 8px;
  }
}

/* ════════════════════════════════════════════════════════════
   SELECT OPTION FIX — fuerza dark bg en nativo
   ════════════════════════════════════════════════════════════ */
.wa-select option {
  background: #0E1116;
  color: #F5F7FA;
}

/* ════════════════════════════════════════════════════════════
   SERVICE CATEGORIES — Horizontal layout by type
   ════════════════════════════════════════════════════════════ */
.svc-category {
  display: flex;
  border-top: 1px solid var(--line);
  margin-top: 56px;
  min-height: 0;
}
.svc-cat-cover {
  flex: 0 0 220px;
  padding: 48px 36px 48px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid var(--line);
}
.svc-cat-title {
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--fg);
}
.svc-cat-desc {
  font-size: 13px;
  color: var(--fg-3);
  line-height: 1.6;
  max-width: 22ch;
}
.svc-cat-cta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: auto;
  transition: opacity 0.2s;
}
.svc-cat-cta:hover { opacity: 0.7; }
.svc-track {
  flex: 1;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 1px;
  background: var(--line);
  padding-left: 1px;
}
.svc-track::-webkit-scrollbar { display: none; }
.svc-card-h {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background: var(--bg-1);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.3s;
  min-height: 340px;
}
.svc-card-h:hover { background: var(--bg-2); }
.svc-card-h .num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--fg-4);
}
.svc-card-h .name {
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--fg);
}
.svc-card-h .desc {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.55;
  flex: 1;
}
.svc-card-h ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.svc-card-h li {
  font-size: 12px;
  color: var(--fg-3);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.svc-card-h li::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: var(--fg-4);
  flex-shrink: 0;
  transform: translateY(5px);
}
.svc-wire-sm {
  flex: 1;
  min-height: 100px;
  max-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
}

/* ── AI Category Cards (21st.dev inspired) ───────────────── */
.ai-category { margin-top: 0; }
.svc-cat-cover--ai { justify-content: flex-start; }
.ai-diagram-mini {
  height: 140px;
  margin-top: auto;
  opacity: 0.65;
  overflow: hidden;
}
.ai-card-h {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background: var(--bg-1);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}
.ai-card-h::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.ai-card-h:hover { background: var(--bg-2); }
.ai-card-h:hover::before { opacity: 1; }
.ai-card-icon {
  width: 40px;
  height: 40px;
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.ai-card-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--fg-4);
}
.ai-card-name {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--fg);
}
.ai-card-desc {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.6;
  flex: 1;
}
.ai-card-cta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  transition: opacity 0.2s;
  align-self: flex-start;
}
.ai-card-cta:hover { opacity: 0.7; }

/* ── Category layout responsive ──────────────────────────── */
@media (max-width: 768px) {
  .svc-category { flex-direction: column; }
  .svc-cat-cover {
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 32px 0;
  }
  .svc-cat-cover--ai .ai-diagram-mini { display: none; }
  .svc-track { padding-left: 0; }
}
@media (max-width: 480px) {
  .svc-card-h { flex: 0 0 78vw; min-width: 230px; padding: 22px 18px; min-height: 300px; }
  .ai-card-h  { flex: 0 0 78vw; min-width: 230px; padding: 24px 20px; }
  .svc-cat-cover { padding: 24px 0; }
  .svc-cat-title { font-size: 24px; }
}
