/*
 * Landing page — deliberately independent from app.css.
 *
 * Aesthetic: measuring instrument. Navy plates, hairline rules, ruler ticks and
 * tabular figures. Both brand faces ship weight 400 only (see tokens.css), so
 * hierarchy comes from size, colour, case and letter-spacing — never from bold.
 */

.lp {
  --lp-signal: #c8792f;
  --lp-signal-soft: rgba(200, 121, 47, 0.16);
  --lp-signal-strong: #b06a26;
  --lp-onDark: #e7eff5;
  --lp-onDark-dim: rgba(231, 239, 245, 0.66);
  --lp-tick: rgba(20, 36, 51, 0.34);
  --lp-tick-dim: rgba(20, 36, 51, 0.16);
  --lp-tick-light: rgba(231, 239, 245, 0.4);
  --lp-tick-light-dim: rgba(231, 239, 245, 0.18);
  --lp-gutter: clamp(20px, 5vw, 56px);

  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.lp *, .lp *::before, .lp *::after { box-sizing: border-box; }

.lp img { max-width: 100%; display: block; }

.lp :focus-visible {
  outline: 2px solid var(--lp-signal);
  outline-offset: 3px;
  border-radius: 4px;
}

.lp-skip {
  position: absolute;
  left: -9999px;
}
.lp-skip:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 8px;
}

/* ---------- Layout primitives ---------- */

.lp-wrap {
  width: 100%;
  max-width: var(--shell-wide);
  margin-inline: auto;
  padding-inline: var(--lp-gutter);
}

.lp-wrap--narrow { max-width: 760px; }

/* Sections open with space and close with the ruler, which carries its own margin. */
.lp-section { padding-block: clamp(64px, 9vw, 128px) 0; }
.lp-section--tint { background: var(--surface); }

/* The last section before the closing band has no ruler, so it pays for its own floor. */
#preguntas { padding-bottom: clamp(64px, 9vw, 128px); }

/*
 * The ruler. This strip is the page's signature: the same scale marks that run
 * along a caliper, used to separate sections.
 */
.lp-rule {
  height: 18px;
  margin-top: clamp(56px, 8vw, 112px);
  background-image:
    repeating-linear-gradient(to right, var(--lp-tick) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(to right, var(--lp-tick-dim) 0 1px, transparent 1px 14px);
  background-size: 100% 16px, 100% 8px;
  background-position: left bottom, left bottom;
  background-repeat: repeat-x;
}

.lp-rule--onDark {
  background-image:
    repeating-linear-gradient(to right, var(--lp-tick-light) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(to right, var(--lp-tick-light-dim) 0 1px, transparent 1px 14px);
}

/* ---------- Type ---------- */

.lp-eyebrow {
  margin: 0 0 18px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lp-onDark-dim);
}
.lp-eyebrow--ink { color: var(--ink-muted); }

/*
 * Sized so "Medido en el galpón," holds one line inside the hero column: any
 * larger and the headline breaks into four ragged lines on a 1440 screen.
 */
.lp-h1 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.35rem, 3.6vw, 3.45rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
}

.lp-h2 {
  margin: 0 0 clamp(28px, 4vw, 48px);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.85rem, 3vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.028em;
}
.lp-h2--light { color: var(--lp-onDark); }

.lp h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: -0.012em;
}

.lp-lede {
  margin: 0 0 32px;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  color: var(--lp-onDark-dim);
  max-width: 38ch;
}

.lp p { margin: 0; }

/* ---------- Nav ---------- */

.lp-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--accent-strong);
  border-bottom: 1px solid rgba(231, 239, 245, 0.12);
}

.lp-nav__inner {
  width: 100%;
  max-width: var(--shell-wide);
  margin-inline: auto;
  padding: 14px var(--lp-gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}

.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.22rem;
  letter-spacing: 0.01em;
  color: var(--lp-onDark);
  text-decoration: none;
}

.lp-nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.lp-nav__links a {
  color: var(--lp-onDark-dim);
  text-decoration: none;
  font-size: 0.94rem;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.lp-nav__links a:hover {
  color: var(--lp-onDark);
  border-bottom-color: var(--lp-signal);
}

/* ---------- CTA ---------- */

/* Copper rather than the WhatsApp green it used to be: the call to action is now the
   contact form, and the only brand accent this page has is --lp-signal. */
.lp-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--lp-signal);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-family: inherit;
  padding: 14px 22px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(200, 121, 47, 0.26);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.lp-cta:hover {
  background: var(--lp-signal-strong);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(200, 121, 47, 0.32);
}
.lp-cta:active { transform: translateY(0); }
.lp-cta[disabled] { opacity: 0.6; pointer-events: none; }

.lp-cta--sm {
  font-size: 0.92rem;
  padding: 10px 16px;
  box-shadow: none;
}

.lp-cta__icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: none;
}

/* ---------- Hero ---------- */

.lp-hero {
  position: relative;
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(88, 142, 190, 0.36) 0%, transparent 62%),
    radial-gradient(620px 400px at 96% 8%, rgba(200, 121, 47, 0.14) 0%, transparent 58%),
    linear-gradient(150deg, var(--hero-1) 0%, var(--hero-2) 52%, var(--hero-3) 100%);
  color: var(--lp-onDark);
  overflow: hidden;
}

/* Fine grain so the navy reads as a surface, not a flat fill. */
.lp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.lp-hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--shell-wide);
  margin-inline: auto;
  padding: clamp(56px, 8vw, 104px) var(--lp-gutter) 0;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.lp-hero__copy { max-width: 46ch; }
.lp-h1 + .lp-lede { max-width: 40ch; }

/* The caliper scale, drawn rather than described. */
.lp-scale {
  margin: clamp(36px, 5vw, 56px) 0 0;
  padding: 0;
}

.lp-scale__label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(231, 239, 245, 0.5);
  margin-bottom: 12px;
}

.lp-scale__ticks {
  display: flex;
  align-items: flex-end;
  gap: clamp(6px, 1.1vw, 14px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-variant-numeric: tabular-nums;
}

.lp-scale__ticks li {
  position: relative;
  padding-top: 20px;
  font-size: 0.8rem;
  color: rgba(231, 239, 245, 0.45);
  transition: color 0.2s ease;
}

.lp-scale__ticks li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 12px;
  background: rgba(231, 239, 245, 0.32);
}

.lp-scale__ticks li[aria-current] {
  color: var(--lp-signal);
  font-size: 1.05rem;
  padding-top: 14px;
}

.lp-scale__ticks li[aria-current]::before {
  height: 20px;
  width: 2px;
  background: var(--lp-signal);
  box-shadow: 0 0 14px rgba(200, 121, 47, 0.7);
}

.lp-scale__note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: rgba(231, 239, 245, 0.55);
  max-width: 34ch;
}

.lp-hero__device { display: flex; justify-content: center; align-items: flex-end; }

.lp-phone {
  width: min(300px, 100%);
  border: 9px solid #060f18;
  border-radius: 38px;
  overflow: hidden;
  background: #060f18;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(231, 239, 245, 0.12);
  transform: translateY(clamp(12px, 2vw, 28px));
}

.lp-phone img { width: 100%; height: auto; border-radius: 29px; }

/* ---------- Steps ---------- */

.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.lp-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 26px 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.lp-section--tint .lp-step { background: var(--bg); }

.lp-step__n {
  display: block;
  font-family: var(--display);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: var(--lp-signal);
  font-variant-numeric: tabular-nums;
  margin-bottom: 14px;
}

.lp-step p { color: var(--ink-muted); font-size: 0.98rem; }

.lp-step__shot {
  margin-top: 24px;
  border-radius: 14px 14px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  overflow: hidden;
  background: var(--bg);
}

.lp-step__shot img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: top center;
}

/* The score sheet slides up from the bottom, so that card crops from the bottom. */
.lp-step__shot--bottom img { object-position: bottom center; }

/* ---------- Alternating detail blocks ---------- */

.lp-alt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  margin-bottom: clamp(48px, 7vw, 96px);
}
.lp-alt:last-child { margin-bottom: 0; }
.lp-alt--rev .lp-alt__copy { order: 2; }

.lp-alt__copy h3 { font-size: 1.5rem; margin-bottom: 10px; }
.lp-alt__copy p { color: var(--ink-muted); max-width: 34ch; }

/* align-items must not stay at stretch: a flex item image would be pulled to the
   row height and the phone comes out visibly taller than a phone. */
.lp-alt__shot { margin: 0; display: flex; justify-content: center; align-items: flex-start; }

/* Held to a real phone's proportion; wider than this and each block becomes a
   600px column of mostly empty screen. */
.lp-alt__shot img {
  width: min(205px, 100%);
  height: auto;
  border: 8px solid var(--accent-strong);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
}

.lp-alt__shot--wide img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}

/* ---------- Why ---------- */

.lp-why {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.lp-why li {
  background: var(--bg);
  padding: 30px 26px 34px;
}
.lp-section--tint .lp-why li { background: var(--surface); }

.lp-why p { color: var(--ink-muted); font-size: 0.98rem; }

/* ---------- FAQ ---------- */

/* The narrow column would otherwise start further right than every other section
   heading and read as a misalignment; centring makes the inset deliberate. */
#preguntas .lp-eyebrow,
#preguntas .lp-h2 { text-align: center; }

.lp-faq { border-top: 1px solid var(--line-strong); }

.lp-faq details {
  border-bottom: 1px solid var(--line-strong);
}

.lp-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 44px 22px 0;
  position: relative;
  font-size: 1.08rem;
  transition: color 0.18s ease;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary:hover { color: var(--lp-signal); }

.lp-faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 13px;
  height: 1px;
  background: var(--ink-soft);
  transition: transform 0.22s ease;
}
.lp-faq summary::before {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 1px;
  height: 13px;
  margin-top: -6px;
  background: var(--ink-soft);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.lp-faq details[open] summary::before { opacity: 0; transform: rotate(90deg); }

.lp-faq details p {
  padding: 0 44px 24px 0;
  color: var(--ink-muted);
  max-width: 58ch;
}

/* ---------- Close ---------- */

.lp-close {
  background:
    radial-gradient(620px 320px at 50% 0%, rgba(200, 121, 47, 0.16) 0%, transparent 62%),
    linear-gradient(180deg, var(--hero-2) 0%, var(--hero-3) 100%);
  color: var(--lp-onDark);
}

.lp-close .lp-rule { margin-top: 0; }

.lp-close__inner {
  text-align: center;
  padding-block: clamp(64px, 9vw, 112px);
}

.lp-close .lp-lede { margin-inline: auto; }

/* ---------- Contact form ---------- */

/* Left aligned inside a centred section: a form whose labels are centred reads as a
   poster, and the eye loses the column that the fields already form. */
.lp-form {
  text-align: left;
  margin-top: clamp(28px, 4vw, 40px);
  display: grid;
  gap: 16px;
}

.lp-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lp-field { display: grid; gap: 6px; }

.lp-field__label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lp-onDark-dim);
}

.lp-input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--lp-onDark);
  background: rgba(231, 239, 245, 0.06);
  border: 1px solid rgba(231, 239, 245, 0.22);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.lp-input::placeholder { color: rgba(231, 239, 245, 0.38); }
.lp-input:hover { border-color: rgba(231, 239, 245, 0.34); }
.lp-input:focus {
  background: rgba(231, 239, 245, 0.1);
  border-color: var(--lp-signal);
}
textarea.lp-input { resize: vertical; min-height: 104px; }

/* The bait is a real, reachable field for a bot filling everything it finds, and
   nothing at all for a person: off screen, out of the tab order, not announced. */
.lp-form__bait {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lp-form__actions { display: flex; justify-content: flex-end; }

.lp-form__status {
  min-height: 1.5em;
  font-size: 0.95rem;
  text-align: right;
  color: var(--lp-onDark-dim);
}
.lp-form__status[data-state="ok"] { color: #7fd6a2; }
.lp-form__status[data-state="error"] { color: #f2a08e; }

.lp-form__note {
  font-size: 0.88rem;
  color: rgba(231, 239, 245, 0.45);
}

/* ---------- Footer ---------- */

.lp-foot {
  background: var(--accent-strong);
  color: rgba(231, 239, 245, 0.5);
  font-size: 0.9rem;
}

.lp-foot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 26px;
}

.lp-brand--foot { font-size: 1.05rem; color: rgba(231, 239, 245, 0.8); }

/* ---------- Motion ---------- */

@keyframes lp-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.lp-hero__copy > *,
.lp-hero__device {
  animation: lp-rise 0.7s cubic-bezier(0.22, 0.68, 0.32, 1) backwards;
}
.lp-hero__copy > *:nth-child(1) { animation-delay: 0.04s; }
.lp-hero__copy > *:nth-child(2) { animation-delay: 0.11s; }
.lp-hero__copy > *:nth-child(3) { animation-delay: 0.18s; }
.lp-hero__copy > *:nth-child(4) { animation-delay: 0.25s; }
.lp-hero__copy > *:nth-child(5) { animation-delay: 0.34s; }
.lp-hero__device { animation-delay: 0.2s; }

/*
 * No scroll-linked reveals below the fold. They were tried and dropped: tying
 * opacity to scroll position left the copy invisible whenever a block entered
 * the viewport ahead of its range, and a sales page that hides its own argument
 * to look lively is a bad trade.
 */

@media (prefers-reduced-motion: reduce) {
  .lp *, .lp *::before, .lp *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .lp-cta:hover { transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
  .lp-why { grid-template-columns: repeat(2, 1fr); }
  .lp-hero__inner { grid-template-columns: 1fr 0.82fr; }
  .lp-phone { width: min(250px, 100%); }
}

@media (max-width: 767px) {
  .lp { font-size: 16px; }

  .lp-nav__links { display: none; }
  .lp-nav__inner { gap: 16px; justify-content: space-between; }

  .lp-hero__inner { grid-template-columns: 1fr; padding-top: 48px; }
  .lp-hero__copy { max-width: none; }
  .lp-hero__device { margin-top: 12px; }
  .lp-phone { transform: none; width: min(272px, 76%); }

  .lp-scale__ticks { gap: 4px; }
  .lp-scale__ticks li { font-size: 0.72rem; }

  .lp-steps { grid-template-columns: 1fr; }
  .lp-step__shot img { height: 220px; }

  /* Stacked, the screenshot always leads — including the reversed blocks. */
  .lp-alt { grid-template-columns: 1fr; gap: 24px; }
  .lp-alt .lp-alt__copy { order: 2; }
  .lp-alt__copy p { max-width: none; }

  .lp-why { grid-template-columns: 1fr; }

  .lp-form__row { grid-template-columns: 1fr; }
  .lp-form__actions .lp-cta { width: 100%; justify-content: center; }

  .lp-foot__inner { flex-direction: column; gap: 10px; text-align: center; }
}
