/* ============================================================
   ARDIEM: La señal
   Concepto: la comunicación teje conexiones desde el centro
   (ñandutí paraguayo). Verde-negro profundo, tinta marfil,
   hilo jade. Fraunces (voz) + Manrope (cuerpo) + Space Mono (hilo).
   ============================================================ */

/* ---------- Fuentes ---------- */
/* Una sola familia (la de la marca) en contraste extremo de pesos. */
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0B100E;
  --bg-soft: #111917;
  --ink: #EAE6DA;
  --ink-dim: #93A29A;
  --teal: #2E7D67;
  --jade: #7BDBB4;
  --hair: rgba(234, 230, 218, .09);

  --font-body: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
  --font-display: var(--font-body);
  --font-mono: var(--font-body);

  --page-pad: clamp(1.25rem, 5vw, 4rem);
  --section-gap: clamp(7rem, 16vh, 12rem);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  font-weight: 450;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: var(--jade); color: var(--bg); }

:focus-visible {
  outline: 2px dashed var(--jade); /* puntada: el hilo también guía el foco */
  outline-offset: 4px;
  border-radius: 2px;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* Scrollbar discreta */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #24312C; border-radius: 5px; }

/* ---------- Canvas tejido ---------- */
#tejido {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* Fallback sin WebGL: un centro que respira en CSS */
.no-gl #tejido { display: none; }
.no-gl body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 60% 45% at 50% 42%, rgba(46, 125, 103, .22), transparent 70%);
  pointer-events: none;
}

/* ---------- Preloader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: grid;
  place-items: center;
}
.loader__inner { text-align: center; width: min(340px, 74vw); }
.loader__logo {
  display: block;
  height: clamp(58px, 9vw, 84px);
  width: auto;
  margin: 0 auto .9rem;
}
.loader__tag {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.8rem;
}
.loader__count {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink-dim);
  margin-bottom: .75rem;
}
.loader__count span::after { content: '%'; opacity: .5; }
.loader__bar {
  height: 1px;
  background: var(--hair);
  position: relative;
  overflow: hidden;
}
.loader__bar span {
  position: absolute;
  inset: 0;
  background: var(--jade);
  transform-origin: left;
  transform: scaleX(0);
  display: block;
}

/* ---------- Cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
  .cursor {
    display: block;
    position: fixed;
    top: 0; left: 0;
    z-index: 900;
    pointer-events: none;
  }
  .cursor__dot {
    position: fixed;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--jade);
    transform: translate(-50%, -50%);
  }
  .cursor__ring {
    position: fixed;
    width: 64px; height: 64px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
  }
  .cursor__ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(123, 219, 180, .45);
    transform: scale(.56);
    transition: transform .3s var(--ease-out), background-color .3s var(--ease-out),
                border-color .3s var(--ease-out);
  }
  .cursor__label {
    position: relative;
    font-family: var(--font-mono);
    font-size: .55rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bg);
    opacity: 0;
    transition: opacity .2s;
  }
  .cursor--active .cursor__ring::before {
    transform: scale(1);
    background: var(--jade);
    border-color: var(--jade);
  }
  .cursor--active .cursor__label { opacity: 1; }
  .cursor--active .cursor__dot { opacity: 0; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.4rem var(--page-pad);
  transition: transform .5s var(--ease-out), opacity .5s var(--ease-out);
}
.nav.is-hidden { transform: translateY(-100%); opacity: 0; }
/* entrada de la nav: visible por defecto; oculta solo mientras carga */
html.is-loading .nav { transform: translateY(-12px); opacity: 0; }
/* un solo logo a la vez: el de la nav espera a que el del hero se disuelva */
.nav__logo { opacity: 0; pointer-events: none; transition: opacity .45s var(--ease-out); }
.nav.is-branded .nav__logo { opacity: 1; pointer-events: auto; }
.nav__logo img { height: 38px; width: auto; }
.nav__links {
  display: flex;
  gap: 2rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink-dim);
}
.nav__links a {
  text-decoration: none;
  transition: color .3s;
}
.nav__links a:hover { color: var(--jade); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
  padding: .95rem 1.9rem;
  transition: transform .35s var(--ease-out), background-color .35s,
              color .35s, border-color .35s;
  will-change: transform;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--hair);
  padding-bottom: .3rem;
  transition: color .3s, border-color .3s;
}
.link-arrow::after {
  content: '↓';
  color: var(--jade);
  transition: transform .3s var(--ease-out);
}
.link-arrow:hover { color: var(--jade); border-color: var(--jade); }
.link-arrow:hover::after { transform: translateY(3px); }
.btn--primary {
  background: var(--jade);
  color: var(--bg);
}
.btn--primary:hover { background: #94E8C7; transform: translateY(-2px); }
.btn--ghost {
  border: 1px solid var(--hair);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--jade); color: var(--jade); }
.btn--nav {
  border: 1px solid var(--teal);
  color: var(--jade);
  font-size: .85rem;
  padding: .55rem 1.3rem;
}
.btn--nav:hover { background: var(--jade); border-color: var(--jade); color: var(--bg); }
.btn--big { font-size: 1.1rem; padding: 1.1rem 2.4rem; }

/* ---------- Tipografía común ---------- */
.h2 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(2.1rem, 1.1rem + 4.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.025em;
  margin-bottom: 2.5rem;
  text-wrap: balance;
}

.prose { max-width: 34rem; }
.prose p { margin-bottom: 1.4em; color: var(--ink-dim); }
.prose p:last-child { margin-bottom: 0; }
.prose__strong { color: var(--ink); font-weight: 600; }
.prose--center { margin-inline: auto; }
.prose a { color: var(--jade); }

/* ---------- Layout de secciones ---------- */
main { position: relative; z-index: 1; }

.section { padding: var(--section-gap) var(--page-pad); }
.section__inner { max-width: 72rem; margin-inline: auto; }
.section__inner--narrow { max-width: 42rem; }
.section__inner--center { text-align: center; }
.section__inner--center .eyebrow { justify-content: center; }
.section__inner--split {
  max-width: 72rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

/* ---------- Hero (asimétrico, la marca primero) ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7.5rem var(--page-pad) 4.5rem;
  position: relative;
  z-index: 1;
}
.hero__layout {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
.hero__ident { grid-column: 1 / -1; margin-bottom: clamp(1.2rem, 3.5vh, 3rem); }
.hero__logo {
  height: clamp(88px, 13vw, 138px);
  width: auto;
  margin-left: -0.6em; /* compensa el aire interno del SVG para alinear la A */
}
.hero__tag {
  margin-top: .4rem;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .06em;
  color: var(--ink-dim);
}
.hero__title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(2.7rem, 1.2rem + 6.8vw, 5.9rem);
  line-height: .99;
  letter-spacing: -.03em;
  margin: 0;
}
.hero__title em {
  font-style: normal;
  color: var(--jade);
}
.hero__aside { align-self: end; padding-bottom: .5rem; }
.hero__sub {
  color: var(--ink-dim);
  font-size: clamp(1.02rem, 1rem + .2vw, 1.15rem);
  margin-bottom: 2.2rem;
  max-width: 30rem;
}
.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.3rem;
}
.hero__cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 56px;
  overflow: hidden;
}
.hero__cue span {
  display: block;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--jade));
  animation: cue 2.2s var(--ease-out) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* ---------- Secciones en teal: la marca se compromete con su color ---------- */
.section--guia,
.section--cta {
  background: var(--teal);
  position: relative; /* tapa el canvas: bloque sólido de marca */
}
.section--guia .h2,
.section--cta .h2 { color: #FFFFFF; }
.section--guia .prose p,
.section--cta .prose p { color: rgba(255, 255, 255, .88); }
.section--guia .prose__strong { color: #FFFFFF; }
.section--guia .cred { border-top-color: rgba(255, 255, 255, .25); }
.section--guia .cred li {
  color: #FFFFFF;
  border-bottom-color: rgba(255, 255, 255, .25);
}
.section--guia .cred li::before { border-color: var(--ink); }
.section--cta .plan li { color: rgba(255, 255, 255, .92); }
.section--cta .plan li span {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, .55);
}
.section--cta .btn--primary {
  background: #FFFFFF;
  color: var(--teal);
}
.section--cta .btn--primary:hover { background: var(--ink); color: var(--teal); }
.section--cta .cta__alt { color: rgba(255, 255, 255, .82); }
.section--cta .cta__alt a { color: #FFFFFF; }

/* ---------- La guía: credenciales ---------- */
.cred {
  list-style: none;
  margin-top: 2.2rem;
  border-top: 1px solid var(--hair);
}
.cred li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--hair);
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .9rem;
}
.cred li::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid var(--jade);
  flex: none;
}

/* ---------- El método ---------- */
.section--metodo { padding-inline: 0; }
.metodo__head { padding-inline: var(--page-pad); }
.metodo__track { position: relative; }
.metodo__steps {
  display: flex;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 4rem var(--page-pad);
  width: max-content;
}
.paso {
  width: clamp(280px, 34vw, 420px);
  flex: none;
  border-top: 1px solid var(--hair);
  padding-top: 2rem;
}
.paso__letra {
  display: block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(5rem, 10vw, 8.5rem);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--jade);
  margin-bottom: 1.2rem;
}
.paso__nombre {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}
.paso__desc { color: var(--ink-dim); max-width: 30ch; }

/* El final del método: las seis letras se unen en la palabra */
.metodo__final {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 1.6rem;
  pointer-events: none;
}
.metodo__wordmark {
  display: flex;
  justify-content: center;
  gap: clamp(.5rem, 1.4vw, 1.1rem);
}
.metodo__wordmark span {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(2.8rem, 8.5vw, 5.6rem);
  line-height: 1;
  color: var(--jade);
  opacity: 0; /* en desktop son solo blancos de aterrizaje para las letras reales */
}
.metodo__payoff {
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-dim);
  opacity: 0;
}

/* Móvil: columna simple y palabra final visible sin coreografía */
@media (max-width: 899px) {
  .metodo__steps {
    flex-direction: column;
    width: auto;
    gap: 3.5rem;
  }
  .paso { width: auto; max-width: 30rem; }
  .metodo__final {
    position: static;
    padding: 4rem var(--page-pad) 0;
  }
  .metodo__wordmark span { opacity: 1; }
  .metodo__payoff { opacity: 1; }
}

/* ---------- Servicios: filas editoriales, no cards ---------- */
.pilares {
  border-top: 1px solid var(--hair);
  margin-top: 1.5rem;
}
.pilar {
  display: grid;
  grid-template-columns: minmax(11rem, 1fr) 2fr;
  gap: clamp(1.2rem, 3vw, 3rem);
  align-items: start;
  padding: clamp(1.8rem, 3.5vw, 2.6rem) 0;
  border-bottom: 1px solid var(--hair);
}
.pilar__title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  letter-spacing: -.015em;
  margin: 0;
  transition: color .3s;
}
.pilar:hover .pilar__title { color: var(--jade); }
.pilar ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 2.2rem;
  padding-top: .35rem;
}
.pilar li {
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: .7rem;
  transition: color .3s;
}
.pilar li::before {
  content: '';
  width: 1.1rem;
  height: 1px;
  background: var(--teal);
  flex: none;
}
.pilar:hover li { color: var(--ink); }
.servicios__nota {
  margin-top: 3rem;
  color: var(--ink-dim);
  max-width: 40rem;
}
.servicios__nota a { color: var(--jade); }

/* ---------- El centro ---------- */
.section--centro {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
/* La señal clara: peso ligero, aire, calma. El contrapunto del 800 */
.centro__claim {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(2.4rem, 1.2rem + 5.8vw, 5.4rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
  margin-bottom: 1.8rem;
}
.centro__claim em { font-style: normal; font-weight: 800; color: var(--jade); }
.centro__line {
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 2.4rem;
}

/* ---------- CTA final ---------- */
.plan {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  flex-wrap: wrap;
  margin: 3rem 0 3.5rem;
}
.plan li {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--ink-dim);
  font-weight: 550;
}
.plan li span {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--jade);
  border: 1px solid var(--teal);
  border-radius: 50%;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  flex: none;
}
.cta__actions { display: grid; gap: 1.2rem; justify-items: center; }
.cta__alt { color: var(--ink-dim); font-size: .95rem; }
.cta__alt a { color: var(--jade); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--hair);
  padding: clamp(3rem, 6vw, 4.5rem) var(--page-pad) 2rem;
  position: relative;
  z-index: 1;
  background: var(--bg);
}
.footer__inner {
  max-width: 72rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.footer__logo { height: 44px; width: auto; margin-bottom: 1.1rem; }
.footer__about p {
  color: var(--ink-dim);
  font-size: .95rem;
  max-width: 34rem;
}
.footer__col h3 {
  font-size: .95rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--ink);
}
.footer__col a {
  display: block;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: .95rem;
  padding: .3rem 0;
  transition: color .3s;
}
.footer__col a:hover { color: var(--jade); }
.footer__copy {
  max-width: 72rem;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hair);
  font-size: .8rem;
  color: var(--ink-dim);
}
@media (max-width: 899px) {
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  .nav__links { display: none; }
  .section__inner--split { grid-template-columns: 1fr; }
  .hero { padding: 5.5rem var(--page-pad) 3.5rem; }
  .hero__layout { grid-template-columns: 1fr; align-items: start; }
  .hero__ident { margin-bottom: 1.2rem; }
  .hero__logo { height: clamp(72px, 21vw, 96px); margin-left: -0.4em; }
  .hero__aside { padding-bottom: 0; }
  .pilar { grid-template-columns: 1fr; gap: 1rem; }
  .plan { flex-direction: column; align-items: center; gap: 1rem; }
}

/* Teléfonos: CTAs a ancho completo, cómodos para el pulgar */
@media (max-width: 599px) {
  .hero__actions { align-items: stretch; width: 100%; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__actions .link-arrow { align-self: center; }
  .cta__actions .btn { width: 100%; justify-content: center; }
  .hero__cue { display: none; } /* en móvil el pulgar ya sabe scrollear */
}

/* ---------- Accesibilidad: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero__cue { display: none; }
}
