:root {
  --ink: #0e1214;
  --ink-2: #161d21;
  --water: #1d2b33;
  --bone: #efe9dc;
  --bone-dim: #b9b2a3;
  --rust: #e4572e;
  --rust-deep: #b8401d;

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-text: "Newsreader", Georgia, serif;

  --gutter: 16px;
  --measure: 62ch;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-text);
  font-size: 1.125rem;
  line-height: 1.7;
  overflow-x: hidden;
}

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

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Type scale ---------- */
.display-xl, .display-l, .display-m, .hero__wordmark, .launch__value {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.01em;
  margin: 0;
}
.display-xl { font-size: clamp(3rem, 9vw, 7.5rem); }
.display-l  { font-size: clamp(2.4rem, 6vw, 4.8rem); }
.display-m  { font-size: clamp(2rem, 4.5vw, 3.2rem); }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--ink) 80%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(239, 233, 220, .08);
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: .02em;
}
.topbar nav {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: .95rem;
}
.topbar nav a { text-decoration: none; opacity: .8; }
.topbar nav a:hover { opacity: 1; }
.topbar__cta {
  opacity: 1 !important;
  background: var(--rust);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
}
@media (max-width: 640px) {
  .topbar nav a:not(.topbar__cta) { display: none; }
}

/* ---------- Hero ---------- */
main { display: block; }

.hero {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 96px var(--gutter) 64px;
  position: relative;
  overflow: hidden;
}

.hero__logo {
  position: relative;
  width: clamp(200px, 58vw, 520px);
  aspect-ratio: 1;
  animation: launch 1.2s var(--ease) both;
}
.hero__img {
  width: 100%;
  height: 100%;
}
/* Línea de la caña que se dibuja desde la punta del logo */
.hero__line {
  position: absolute;
  top: -120%;
  right: 6%;
  width: 26%;
  height: 160%;
  pointer-events: none;
  overflow: visible;
}
.hero__line path {
  fill: none;
  stroke: var(--rust);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: cast 1.6s .8s var(--ease) forwards;
}

.hero__wordmark {
  margin-top: 28px;
  font-size: clamp(3.6rem, 17vw, 13rem);
  white-space: nowrap;
  animation: rise .9s .35s var(--ease) both;
}
.hero__word { display: inline-block; }

.hero__tagline {
  max-width: 36ch;
  margin: 20px 0 0;
  color: var(--bone-dim);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-style: italic;
  animation: rise .9s .55s var(--ease) both;
}

.hero__scroll {
  margin-top: 48px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: .95rem;
  color: var(--bone-dim);
  animation: rise .9s .8s var(--ease) both;
}
.hero__arrow {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--bone-dim), transparent);
  position: relative;
  animation: drip 2.2s 1.8s var(--ease) infinite;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(72px, 12vw, 140px) var(--gutter);
  max-width: 1200px;
  margin: 0 auto;
}

.split {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1.1fr .9fr; gap: 80px; }
  .split--flip { grid-template-columns: .9fr 1.1fr; }
  .split--flip h2 { order: 2; }
}

.prose p { max-width: var(--measure); margin: 0 0 1em; }
.prose p:first-child { font-size: 1.25rem; }
.prose__small { color: var(--bone-dim); max-width: var(--measure); margin-top: 20px; }

/* Franja de separación */
.band {
  background: var(--rust);
  color: var(--ink);
  padding: 22px var(--gutter);
  overflow: hidden;
  white-space: nowrap;
}
.band p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  text-align: center;
  line-height: 1.1;
}

/* Pasos */
.steps {
  list-style: none;
  padding: 0;
  margin: 56px 0 0;
  display: grid;
  gap: 0;
  counter-reset: paso;
}
.step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 28px 0;
  border-top: 1px solid rgba(239, 233, 220, .14);
}
.step:last-child { border-bottom: 1px solid rgba(239, 233, 220, .14); }
.step h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1;
}
.step p { margin: 0; max-width: var(--measure); color: var(--bone-dim); }

@media (min-width: 900px) {
  .step { grid-template-columns: 260px 1fr; align-items: baseline; }
}

/* Mensaje final bajo los pasos */
.steps__tagline {
  margin: 32px 0 0;
  text-align: center;
  font-size: .95rem;
  color: var(--bone-dim);
  opacity: .7;
}

/* Lista de ticks */
.ticks {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  border-top: 1px solid rgba(239, 233, 220, .14);
}
.ticks li {
  padding: 14px 0 14px 32px;
  position: relative;
  border-bottom: 1px solid rgba(239, 233, 220, .14);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 2px;
  background: var(--rust);
  transform: translateY(-50%);
}

/* Lanzamiento */
.section--dark {
  max-width: none;
  background: var(--water);
  text-align: left;
}
.section--dark > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.launch__label {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--bone-dim);
}
.launch__value {
  margin-top: 8px;
  font-size: clamp(4rem, 14vw, 11rem);
  color: var(--bone);
}
.credits {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 48px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(239, 233, 220, .2);
}
.credits dt { font-size: .9rem; color: var(--bone-dim); }
.credits dd { margin: 4px 0 0; font-size: 1.5rem; font-weight: 600; }
.credits__note {
  font-size: .95rem;
  font-weight: 400;
  color: var(--bone-dim);
  opacity: .7;
}

/* Formulario */
.signup {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-self: center;
}
.signup input {
  font: inherit;
  font-size: 1.1rem;
  color: var(--bone);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--bone-dim);
  padding: 12px 4px;
  min-width: 0;
  border-radius: 0;
  transition: border-color .3s var(--ease);
}
.signup input::placeholder { color: rgba(185, 178, 163, .6); }
.signup input:focus { outline: none; border-bottom-color: var(--rust); }
.signup input[aria-invalid="true"] { border-bottom-color: var(--rust); }
.signup__msg {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 1.5em;
  font-size: .95rem;
  color: var(--bone-dim);
}

.btn {
  font: inherit;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: .02em;
  background: var(--rust);
  color: var(--ink);
  border: 0;
  padding: 12px 26px;
  cursor: pointer;
  border-radius: 2px;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--rust-deep); color: var(--bone); }
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent;
  color: var(--bone);
  box-shadow: inset 0 0 0 2px var(--bone);
  margin-top: 24px;
}
.btn--ghost:hover { background: var(--bone); color: var(--ink); }

.share { text-align: left; }

/* Footer */
.footer {
  padding: 48px var(--gutter);
  border-top: 1px solid rgba(239, 233, 220, .1);
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}
.footer p { margin: 4px 0; }
.footer__small {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: .9rem;
  color: var(--bone-dim);
}

.footer__mail {
  color: #6ea8ff;
  text-underline-offset: 3px;
}
.footer__mail:hover { color: #9cc2ff; }

/* ---------- Motion ---------- */
@keyframes launch {
  0%   { opacity: 0; transform: translateY(40px) scale(.9) rotate(-6deg); }
  70%  { opacity: 1; transform: translateY(-6px) scale(1.02) rotate(1deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes cast {
  to { stroke-dashoffset: 0; }
}
@keyframes drip {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Revelado al hacer scroll (solo si JS lo activa) */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@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__line path { stroke-dashoffset: 0; }
  .js .reveal { opacity: 1; transform: none; }
}
