/* =====================================================================
   Nexo — Landing "De la noche al día"
   La pagina es una jornada: cada tramo tiene su hora gigante y su color.
   El fondo/texto los cambia landing.js (--bg, --fg, --muted) al pasar de
   un tramo a otro. Las paginas de rubro siguen usando style.css.
   ===================================================================== */

:root {
  --bg: #0d1120;
  --fg: #f1ead9;
  --muted: rgba(241, 234, 217, .72);
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .9s ease, color .9s ease;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.label {
  font: 500 12px/1.3 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 26px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  font: 700 16px/1 var(--sans);
  cursor: pointer;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.btn-solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-solid:hover { opacity: .9; }
.btn-line:hover { background: var(--fg); color: var(--bg); }

/* ---------- Barra fija ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px var(--gutter);
  background: var(--bg);
  transition: background .9s ease;
}
.logo { font: 800 22px/1 var(--sans); font-stretch: 125%; letter-spacing: -.03em; }
.bar-right { display: flex; gap: 28px; align-items: center; }
.clock { font: 500 14px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .08em; opacity: .85; min-width: 5ch; transition: opacity .3s; }
/* La hora aparece recien al salir del hero */
.js .clock { opacity: 0; }
.js .clock.show { opacity: .85; }
.bar a.link { font-size: 14px; opacity: .75; }
.bar a.link:hover { opacity: 1; }
.bar .btn { padding: 10px 18px; font-size: 14px; }

/* ---------- Tramos ---------- */

.slot {
  min-height: 100vh;
  padding: 120px var(--gutter) 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px clamp(24px, 4vw, 64px);
  align-items: end;
}
.slot > * { min-width: 0; }
.time {
  grid-column: 1 / -1;
  font: 800 clamp(88px, 21vw, 320px)/.78 var(--sans);
  font-stretch: 125%;
  letter-spacing: -.06em;
  margin-left: -.04em;
}
.time sup {
  font: 500 clamp(13px, 1.3vw, 19px)/1.2 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  vertical-align: top;
  margin-left: 14px;
  position: relative;
  top: .6em;
  opacity: .85;
  white-space: nowrap;
}

.story { max-width: 46ch; }
.story h1, .story h2 {
  font: 700 clamp(28px, 3.4vw, 50px)/1.03 var(--sans);
  font-stretch: 112%;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}
.story p { font-size: 19px; line-height: 1.5; color: var(--muted); }
.story p + p { margin-top: 12px; }

/* Hero: solo el titular. La hora y la conversacion arrancan en el primer tramo */
.hero { grid-template-columns: 1fr; align-content: center; align-items: center; min-height: 100svh; position: relative; padding-top: 96px; }
.hero .story { max-width: none; }
.hero .story h1 { font: 800 clamp(40px, 7.4vw, 112px)/.98 var(--sans); font-stretch: 118%; letter-spacing: -.045em; margin-bottom: 20px; max-width: 12em; }
.hero .story p { font-size: clamp(18px, 1.6vw, 22px); max-width: 34em; }
/* Palabras clave del hero: marcador y subrayado a mano que se dibujan al cargar */
.mark { position: relative; isolation: isolate; white-space: nowrap; }
.mark::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: .06em -.1em .02em -.1em;
  background: #25d366;
  border-radius: 6px 14px 8px 16px / 12px 8px 14px 6px;
  transform: rotate(-1.2deg);
  transform-origin: left center;
}
.ul { position: relative; white-space: nowrap; }
.ul svg { position: absolute; left: -.02em; bottom: -.14em; width: 104%; height: .22em; overflow: visible; }
.ul path { fill: none; stroke: currentColor; stroke-width: 5.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .mark::before { transform: rotate(-1.2deg) scaleX(0); }
.js .on .mark::before { animation: mark .7s .35s cubic-bezier(.6, .1, .2, 1) forwards; }
.js .ul path { stroke-dashoffset: 1; }
.js .on .ul path { animation: draw .8s 1s ease forwards; }
.js .hero .story > :not(h1) { opacity: 0; animation: rise .6s ease forwards; }
.js .hero .story > p:not(.fine) { animation-delay: .6s; }
.js .hero .cta-row { animation-delay: .8s; }
.js .hero .fine { animation-delay: 1s; }
@keyframes mark { to { transform: rotate(-1.2deg) scaleX(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.fine { margin-top: 14px; opacity: .75; }
.scroll-cue { position: absolute; left: var(--gutter); bottom: 32px; opacity: .75; }
.scroll-cue:hover { opacity: 1; }

/* Conversacion */
.exchange { display: flex; flex-direction: column; gap: 10px; max-width: 460px; width: 100%; justify-self: end; }
.bubble {
  background: var(--fg);
  color: var(--bg);
  padding: 15px 20px;
  border-radius: 22px 22px 22px 4px;
  font-size: 19px;
  line-height: 1.35;
  max-width: 28ch;
}
.bubble.reply {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid currentColor;
  border-radius: 22px 22px 4px 22px;
  margin-left: auto;
}
.exchange .meta { margin-top: 8px; opacity: .75; display: flex; justify-content: space-between; gap: 12px; }

/* Entrada escalonada: solo con JS y sin reduced-motion */
.js .slot .bubble, .js .slot .agenda > * { opacity: 0; transform: translateY(10px); }
.js .slot.on .bubble, .js .slot.on .agenda > * { animation: rise .55s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i, 0) * .8s + .2s); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Foto a sangre debajo de cada conversacion */
.band { grid-column: 1 / -1; position: relative; height: min(46vh, 440px); overflow: hidden; margin: 24px calc(var(--gutter) * -1) -72px; }
.band img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.band .label { position: absolute; left: var(--gutter); bottom: 16px; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .55); }

/* Agenda: lista, no dashboard */
.agenda { border-top: 1.5px solid currentColor; }
.agenda > div {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  font-size: 19px;
}
.agenda .t { font: 400 15px/1.6 var(--mono); font-variant-numeric: tabular-nums; opacity: .8; }
.agenda .tag { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; align-self: center; border: 1.5px solid currentColor; padding: 6px 9px; border-radius: 99px; white-space: nowrap; }

/* ---------- Demo ---------- */

.demo { display: flex; flex-direction: column; gap: 14px; }
.demo-label, .demo-note { opacity: .75; }
.rubros { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.rubros button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: inherit;
  font: 700 clamp(18px, 1.9vw, 26px)/1.2 var(--sans);
  font-stretch: 112%;
  letter-spacing: -.02em;
  cursor: pointer;
  padding: 2px 0;
  opacity: .6;
  transition: opacity .2s;
}
.rubros button:hover { opacity: .9; }
.rubros button[aria-pressed="true"] { opacity: 1; border-bottom-color: currentColor; }
.rubros .otro { font-weight: 500; font-style: italic; }
.frame { position: relative; height: min(62vh, 580px); border: 1.5px solid currentColor; border-radius: 22px; overflow: hidden; background: #fff; }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.otro-box { position: absolute; inset: 0; background: var(--bg); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; }
.otro-box[hidden] { display: none; }
.otro-title { font: 800 clamp(26px, 3.2vw, 44px)/1 var(--sans); font-stretch: 118%; letter-spacing: -.03em; color: var(--fg); }
.otro-box p { color: var(--muted); max-width: 40ch; }

/* ---------- Cómo arrancás ---------- */

.how { padding: 96px var(--gutter); display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; border-top: 1.5px solid currentColor; }
.how h2 { font: 800 clamp(34px, 4.6vw, 68px)/.98 var(--sans); font-stretch: 118%; letter-spacing: -.04em; position: sticky; top: 96px; align-self: start; }
.how ol { counter-reset: s; }
.how li { counter-increment: s; border-top: 1.5px solid currentColor; padding: 24px 0 40px; display: grid; grid-template-columns: 56px 1fr; gap: 12px; }
.how li::before { content: "0" counter(s); font: 500 15px/2 var(--mono); }
.how li h3 { font: 700 clamp(22px, 2.4vw, 32px)/1.1 var(--sans); font-stretch: 108%; letter-spacing: -.02em; margin-bottom: 8px; }
.how li p { color: var(--muted); max-width: 44ch; }

/* ---------- Precio ---------- */

.price { padding: 96px var(--gutter); display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: end; border-top: 1.5px solid currentColor; }
.price .big { font: 800 clamp(80px, 15vw, 230px)/.82 var(--sans); font-stretch: 125%; letter-spacing: -.06em; }
.price .big small { display: block; font: 500 clamp(13px, 1.3vw, 19px)/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-top: 18px; opacity: .8; }
.price .side p { color: var(--muted); font-size: 18px; max-width: 40ch; }
.price .side p + p { margin-top: 12px; }
.price .side .btn { margin-top: 28px; }
.price .includes { margin-top: 28px; columns: 2; column-gap: 24px; font-size: 15px; color: var(--muted); }
.price .includes li { padding: 4px 0; break-inside: avoid; }
.price .includes li::before { content: "→ "; font-family: var(--mono); }
.price .extra { margin-top: 20px; font-size: 14px; opacity: .8; }

/* ---------- FAQ ---------- */

.faq { padding: 80px var(--gutter); display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; border-top: 1.5px solid currentColor; }
.faq h2 { font: 800 clamp(30px, 3.6vw, 52px)/1 var(--sans); font-stretch: 118%; letter-spacing: -.04em; }
.faq details { border-bottom: 1px solid color-mix(in srgb, currentColor 28%, transparent); }
.faq details:first-of-type { border-top: 1px solid color-mix(in srgb, currentColor 28%, transparent); }
.faq summary { cursor: pointer; padding: 20px 0; font: 600 19px/1.3 var(--sans); display: flex; justify-content: space-between; gap: 24px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 24px/1 var(--mono); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 56ch; }

/* ---------- Cierre ---------- */

.closing { padding: 96px var(--gutter) 40px; border-top: 1.5px solid currentColor; }
.closing h2 { font: 800 clamp(40px, 7vw, 110px)/.95 var(--sans); font-stretch: 118%; letter-spacing: -.045em; max-width: 14em; }
.closing p { margin-top: 24px; color: var(--muted); font-size: 19px; max-width: 44ch; }
.closing .btn { margin-top: 32px; }
.foot { display: flex; justify-content: space-between; gap: 16px; padding: 64px 0 0; opacity: .75; }

/* ---------- Pie legal (tambien en las paginas legales) ---------- */

.legal-bar { display: flex; flex-direction: column; gap: 14px; padding: 40px var(--gutter) 36px; border-top: 1.5px solid currentColor; }
.legal-bar nav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.legal-bar a { text-decoration: underline; text-underline-offset: 3px; }
.legal-bar p { font: 400 15px/1.5 Arial, "Helvetica Neue", Helvetica, sans-serif; color: var(--muted); }
.legal-bar p a { font-weight: 700; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  body { font-size: 16px; }
  .bar .link { display: none; }
  .bar-right { gap: 16px; }
  .slot { grid-template-columns: 1fr; align-items: start; padding-top: 100px; min-height: auto; padding-bottom: 56px; }
  .hero { min-height: 100svh; padding-bottom: 88px; }
  .hero .btn-secondary { display: none; }
  .time { font-size: clamp(72px, 24vw, 150px); }
  .time sup { display: block; margin: 16px 0 0; top: 0; white-space: normal; }
  .exchange { justify-self: stretch; max-width: 100%; }
  .band { margin-bottom: -56px; height: 34vh; }
  .how, .price, .faq { grid-template-columns: 1fr; gap: 32px; padding-top: 64px; padding-bottom: 64px; }
  .how h2 { position: static; }
  .agenda > div { grid-template-columns: 56px 1fr; font-size: 17px; }
  .agenda .tag { grid-column: 2; justify-self: start; }
  .price .includes { columns: 1; }
  .frame { height: 70vh; }
  .rubros { gap: 0 20px; }
  .rubros button { padding: 11px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .bar { transition: none; }
  .js .slot .bubble, .js .slot .agenda > * { opacity: 1; transform: none; animation: none !important; }
  .js .mark::before, .js .on .mark::before { transform: rotate(-1.2deg); animation: none; }
  .js .ul path, .js .on .ul path { stroke-dashoffset: 0; animation: none; }
  .js .hero .story > :not(h1) { opacity: 1; animation: none; }
}
