/* ═══════════════════════════════════════════════════════════
   NIGMA · Landing corporativa
   Grafito frío · latón desaturado · reglas de 1px
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Superficies */
  --ink:        #0C0F11;
  --ink-alt:    #101417;
  --ink-raise:  #161B1F;
  --rule:       #232A30;
  --rule-soft:  #1A2025;

  /* Texto */
  --bone:       #E8E6E1;
  --bone-dim:   #9AA3A9;
  --bone-faint: #6B757C;

  /* Acento */
  --brass:      #C4923F;
  --brass-lo:   #8A6529;
  --brass-glow: rgba(196, 146, 63, 0.09);

  /* Tipografía */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body:    "Spectral", Georgia, "Times New Roman", serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Ritmo */
  --gap:      clamp(1.5rem, 3vw, 2.75rem);
  --pad-y:    clamp(4.5rem, 10vw, 8.5rem);
  --wrap:     72rem;
  --nav-h:    4.5rem;
}

/* ── Reset ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--brass);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip:focus { top: 1rem; }

/* ── Primitivas tipográficas ───────────────────────────── */

.kicker,
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--bone-faint);
  margin-bottom: 1.4rem;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.section__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.65rem, 1.1rem + 2.2vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 20ch;
}

.section__lede {
  margin-top: 1.4rem;
  max-width: 54ch;
  color: var(--bone-dim);
  font-size: 1.06em;
}

/* ── Layout ────────────────────────────────────────────── */

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.section {
  padding-block: var(--pad-y);
  border-top: 1px solid var(--rule-soft);
}
.section--alt { background: var(--ink-alt); }

/* ── Botones ───────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--brass);
  background: transparent;
  color: var(--brass);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--solid {
  background: var(--brass);
  color: var(--ink);
}
.btn--solid:hover { background: #D8A64E; border-color: #D8A64E; }

.btn--ghost { border-color: var(--rule); color: var(--bone); }
.btn--ghost:hover { border-color: var(--bone-dim); }

/* ── Marca ─────────────────────────────────────────────── */

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--bone);
  text-decoration: none;
}
.mark__glyph { width: 1.35rem; height: 1.35rem; color: var(--brass); flex: none; }
.mark__word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* ── Navegación ────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 15, 17, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav.is-stuck { border-bottom-color: var(--rule); }

.nav__inner {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
}

.nav__list {
  display: flex;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
}

.nav__list a {
  position: relative;
  display: inline-block;
  padding-block: 0.35rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-dim);
  transition: color 0.2s ease;
}
.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav__list a:hover { color: var(--bone); }
.nav__list a.is-active { color: var(--bone); }
.nav__list a.is-active::after { transform: scaleX(1); }

.nav__cta { padding: 0.65rem 1.15rem; }

.nav__toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav__toggle-bars { display: grid; gap: 4px; width: 16px; }
.nav__toggle-bars i {
  display: block;
  height: 1px;
  background: var(--brass);
  transition: transform 0.22s ease;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bars i:first-child { transform: translateY(2.5px) rotate(12deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars i:last-child  { transform: translateY(-2.5px) rotate(-12deg); }

/* ── Hero ──────────────────────────────────────────────── */

.hero {
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(4rem, 9vw, 7.5rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 55% at 78% 22%, var(--brass-glow), transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.hero__title {
  margin-top: 1.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 1.2rem + 4.2vw, 4.15rem);
  line-height: 1.03;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.lede {
  margin-top: 1.75rem;
  max-width: 46ch;
  color: var(--bone-dim);
  font-size: 1.08em;
}

.hero__actions {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ── Signature: la curva de anticipación ───────────────── */

.curve { margin: 0; }

.curve svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.curve__grid line { stroke: var(--rule-soft); stroke-width: 1; }
.curve__grid .curve__axis { stroke: var(--rule); }

.curve__window { fill: var(--brass); opacity: 0.07; }
.curve__edge {
  stroke: var(--brass-lo);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.curve__mark {
  stroke: var(--bone-faint);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}

.curve__line {
  stroke: var(--bone);
  stroke-width: 2;
  stroke-linecap: round;
}

.curve__dot {
  fill: var(--brass);
  stroke: var(--ink);
  stroke-width: 3;
}

.curve__labels text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  fill: var(--brass);
}
.curve__labels .curve__sub {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: none;
  fill: var(--bone-faint);
}
.curve__labels .curve__axis-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  fill: var(--bone-faint);
}

.curve__legend {
  display: none;
  margin-top: 1.5rem;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--bone-dim);
}
.curve__legend li { display: flex; align-items: flex-start; gap: 0.7rem; }

.curve__swatch {
  flex: none;
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.25rem;
  border: 1px dashed var(--brass-lo);
  background: var(--brass-glow);
}
.curve__swatch--mark {
  border: 0;
  border-left: 1px dashed var(--bone-faint);
  background: none;
  width: 0.5rem;
}

.curve__caption {
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  max-width: 40ch;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--bone-dim);
}

/* Trazado animado */
.curve__line.is-drawn {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: draw 1.5s cubic-bezier(0.65, 0, 0.35, 1) 0.25s forwards;
}
.curve__dot.is-drawn { opacity: 0; animation: pop 0.5s ease 1.5s forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop  { to { opacity: 1; } }

/* ── Pilares ───────────────────────────────────────────── */

.pillars {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  display: grid;
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}

.pillar {
  background: var(--ink-alt);
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.5rem, 2.5vw, 2rem);
}

.pillar__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.pillar p { color: var(--bone-dim); }

/* ── Método ────────────────────────────────────────────── */

.steps { margin-top: clamp(2.5rem, 5vw, 3.75rem); }

.step {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
  border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }

.step__num {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--brass);
  padding-top: 0.35rem;
}

.step__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.35rem, 1rem + 1.3vw, 1.95rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.step__body p { max-width: 62ch; color: var(--bone-dim); }

/* ── Servicios ─────────────────────────────────────────── */

.services {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.service {
  position: relative;
  background: var(--ink-alt);
  padding: clamp(1.6rem, 2.6vw, 2.15rem);
  transition: background 0.22s ease;
}
.service::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.service:hover { background: var(--ink-raise); }
.service:hover::before { transform: scaleX(1); }

.service__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.service p {
  color: var(--bone-dim);
  font-size: 0.97rem;
  line-height: 1.66;
}

/* ── Cita y diferenciadores ────────────────────────────── */

.quote-section { text-align: center; }

.quote { margin: 0; }
.quote p {
  margin-inline: auto;
  max-width: 24ch;
  font-family: var(--body);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.6rem, 1.05rem + 2.3vw, 2.8rem);
  line-height: 1.22;
  text-wrap: balance;
}
.quote p::before { content: "«"; color: var(--brass); margin-right: 0.12em; }
.quote p::after  { content: "»"; color: var(--brass); margin-left: 0.12em; }

.proof {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  text-align: left;
}

.proof__item { border-top: 1px solid var(--rule); padding-top: 1.4rem; }

.proof__title {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.7rem;
}
.proof p { color: var(--bone-dim); }

/* ── Propósito ─────────────────────────────────────────── */

.purpose { margin-top: clamp(2.5rem, 5vw, 3.75rem); }

.purpose__row {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-top: 1px solid var(--rule);
}
.purpose__row:last-child { border-bottom: 1px solid var(--rule); }

.purpose dt {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  padding-top: 0.4rem;
}
.purpose dd { max-width: 62ch; color: var(--bone-dim); }

/* ── Contacto ──────────────────────────────────────────── */

.contact__grid {
  display: grid;
  gap: clamp(2.75rem, 6vw, 4.5rem);
  align-items: start;
}

.contact__direct {
  margin-top: 2.75rem;
  display: grid;
  gap: 1.5rem;
}
.contact__direct li { border-top: 1px solid var(--rule); padding-top: 1rem; }

.contact__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin-bottom: 0.5rem;
}
.contact__direct a {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.4rem);
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 1px solid var(--brass-lo);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.contact__direct a:hover { color: var(--brass); border-bottom-color: var(--brass); }

/* ── Formulario ────────────────────────────────────────── */

.form {
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  background: var(--ink-alt);
  border: 1px solid var(--rule);
}

.field { display: grid; gap: 0.55rem; }

.field label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--bone);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 6.5rem; }

.field input:hover,
.field textarea:hover { border-color: var(--bone-faint); }

.field input:focus,
.field textarea:focus {
  border-color: var(--brass);
  outline: none;
}

.field input:user-invalid,
.field textarea:user-invalid { border-color: #B5533E; }

.form__submit { justify-self: start; }

.form__note {
  min-height: 1.4rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--brass);
}

/* ── Footer ────────────────────────────────────────────── */

.footer {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--rule);
  background: var(--ink-alt);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.mark--footer .mark__word { font-size: 0.95rem; }

.footer__line {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--bone-faint);
}

/* ── Reveal al hacer scroll ────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ── Breakpoints ───────────────────────────────────────── */

@media (min-width: 40rem) {
  .pillars  { grid-template-columns: repeat(3, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .proof    { grid-template-columns: repeat(3, 1fr); }

  /* Iguala la línea base de los párrafos en la grilla de servicios. */
  .service__title { min-height: 2.6em; }
}

/* Etiquetas del SVG ilegibles a este ancho: se cambian por la leyenda HTML. */
@media (max-width: 43.99rem) {
  .curve__labels { display: none; }
  .curve__legend { display: grid; }
}

@media (min-width: 62rem) {
  .hero__inner   { grid-template-columns: 1.05fr 1fr; gap: clamp(3rem, 5vw, 5rem); }
  .services      { grid-template-columns: repeat(3, 1fr); }
  .contact__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 61.99rem) {
  .nav__toggle { display: inline-flex; }

  .nav__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.5rem;
    background: var(--ink);
    border-bottom: 1px solid var(--rule);
  }
  .nav__menu.is-open { display: flex; }

  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a {
    display: block;
    padding-block: 0.95rem;
    border-bottom: 1px solid var(--rule-soft);
    font-size: 0.82rem;
  }
  .nav__list a::after { display: none; }
  .nav__list a.is-active { color: var(--brass); }

  .nav__cta { margin-top: 1.25rem; justify-content: center; }
}

@media (max-width: 33rem) {
  .step,
  .purpose__row { grid-template-columns: 1fr; gap: 0.75rem; }
  .step__num,
  .purpose dt { padding-top: 0; }

  /* Botones al mismo ancho: apilados, los anchos dispares se leen como error. */
  .hero__actions { display: grid; }
  .form__submit { justify-self: stretch; }
}

/* ── Movimiento reducido ───────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] { opacity: 1; transform: none; }
  .curve__line.is-drawn { stroke-dasharray: none; stroke-dashoffset: 0; }
  .curve__dot.is-drawn { opacity: 1; }
}

/* ── Impresión ─────────────────────────────────────────── */

@media print {
  body { background: #fff; color: #000; }
  .nav, .hero::before, .form { display: none; }
  [data-reveal] { opacity: 1; transform: none; }
}
