:root {
  --cream: #F6F3EC;
  --ink: #10251F;
  --green: #0B4A3B;
  --green-dark: #0B2E25;
  --sage: #C8DACB;
  --muted: #3F514A;
  --muted-2: #5B6B64;
  --sage-grey: #9DB5A8;
  --line: #E8E3DA;
  --line-2: #C9C3B6;
  --orange: #E0683F;
  --white: #FFFFFF;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: 16px;
  --max: 1080px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p, ul { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Sections */
.section { padding: 72px 0; }
.section--dark { background: var(--ink); color: var(--cream); }
.section--green { background: var(--green); color: var(--cream); }
.section--cream { background: var(--cream); color: var(--ink); }

.eyebrow {
  display: block;
  margin-bottom: 16px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.section--dark .eyebrow,
.section--green .eyebrow { color: var(--sage-grey); }

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Hero */
.hero { padding: 0 0 72px; }

.site-header { padding: 24px 0 56px; }
.site-header img { width: 150px; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 10vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  max-width: 14ch;
}

.hero .tagline {
  margin-top: 20px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.15;
  color: var(--sage);
  max-width: 28ch;
}

.hero .lede {
  margin-top: 28px;
  max-width: 60ch;
  font-size: 18px;
  color: var(--cream);
  opacity: 0.88;
}

.hero .btn { margin-top: 36px; }

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 18px 24px;
  border: 0;
  border-radius: 12px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(224, 104, 63, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover {
  background: #D45C33;
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(224, 104, 63, 0.45);
}
.btn:active {
  transform: translateY(1px);
  box-shadow: 0 6px 16px rgba(224, 104, 63, 0.35);
}
.btn:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 3px;
}
.section--cream .btn:focus-visible { outline-color: var(--ink); }

/* Included */
.included .h2 { margin-bottom: 40px; }

.cards {
  display: grid;
  gap: 16px;
  padding: 0;
  list-style: none;
}

.card {
  padding: 28px 24px;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--line);
}
.card h3 {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.card p { color: var(--muted); }

/* Plans */
.plans .h2 { margin-bottom: 40px; }

.plan-grid {
  display: grid;
  gap: 16px;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.plan h3 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
}
.plan .price {
  margin-top: 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 76px);
  line-height: 1;
  letter-spacing: -0.025em;
}
.plan .price span {
  font-size: 0.4em;
  letter-spacing: 0;
  color: var(--sage);
}
.plan .detail {
  margin-top: 12px;
  color: var(--cream);
  opacity: 0.88;
}
.plan .btn { margin-top: auto; }
.plan .detail { margin-bottom: 32px; }

/* Contact */
.contact p {
  margin-top: 20px;
  max-width: 60ch;
  font-size: 18px;
  color: var(--muted);
}
.contact a {
  color: var(--green);
  font-weight: 700;
  text-underline-offset: 3px;
}
.contact a:hover { color: var(--ink); }

/* Footer */
.site-footer {
  padding: 40px 0;
  background: var(--ink);
  color: var(--sage-grey);
  font-size: 14px;
}
.site-footer .wrap {
  display: grid;
  gap: 12px;
}
.site-footer img { width: 120px; }

/* Confirmation */
.thanks {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.thanks main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 24px 0 72px;
}
.thanks h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 10vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.thanks h1 em {
  display: block;
  font-style: italic;
  color: var(--sage);
}
.thanks main p {
  margin-top: 24px;
  max-width: 56ch;
  font-size: 18px;
  opacity: 0.9;
}
.thanks main p + p { margin-top: 16px; font-size: 16px; color: var(--sage-grey); opacity: 1; }
.thanks main a { color: var(--sage); text-underline-offset: 3px; }
.thanks .back {
  display: inline-block;
  margin-top: 40px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--sage);
}
.thanks .back:hover { color: var(--cream); }

/* Larger screens */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .section { padding: 112px 0; }
  .hero { padding: 0 0 120px; }
  .site-header { padding: 32px 0 88px; }
  .site-header img { width: 180px; }
  .btn { width: auto; display: inline-flex; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .plan { padding: 36px 32px; }
  .plan .btn { width: 100%; }
  .site-footer .wrap {
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 32px;
  }
  .site-footer .legal { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}

/* ==========================================================
   Movimiento
   - Solo transform y opacity (y stroke-dashoffset; las sombras
     viven en pseudo-elementos que se animan por opacidad).
   - Los estados ocultos solo existen con <html class="js">. Las
     animaciones usan fill-mode "backwards": al terminar, cada
     elemento vuelve a sus estilos normales (hover incluido).
   ========================================================== */
:root {
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@keyframes tl-rise {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
}
@keyframes tl-fade {
  from { opacity: 0; }
}
@keyframes tl-price {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
}
@keyframes tl-draw {
  from { transform: scaleX(0); }
}
@keyframes tl-stroke {
  from { stroke-dashoffset: 1; }
}
@keyframes tl-drift-a {
  to { transform: translate3d(-8%, 6%, 0) scale(1.08); }
}
@keyframes tl-drift-b {
  to { transform: translate3d(10%, -5%, 0) scale(1.05); }
}
@keyframes tl-marquee {
  to { transform: translate3d(-50%, 0, 0); }
}
@keyframes tl-breathe {
  50% { opacity: 1; }
}

/* 1. Entrada del hero y del logo */
.js .site-header img {
  animation: tl-fade 900ms ease 60ms backwards;
}
.js .hero .wrap > * {
  animation: tl-rise 650ms var(--ease) backwards;
}
.js .hero .wrap > :nth-child(1) { animation-delay: 140ms; }
.js .hero .wrap > :nth-child(2) { animation-delay: 220ms; }
.js .hero .wrap > :nth-child(3) { animation-delay: 300ms; }
.js .hero .wrap > :nth-child(4) { animation-delay: 380ms; }
.js .hero .wrap > :nth-child(5) { animation-delay: 460ms; }

/* 2. Fondo del hero: halos y textura de puntos */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(246, 243, 236, 0.07) 1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}
.halo {
  position: absolute;
  width: min(110vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
}
.halo--a {
  top: 4%;
  right: -28%;
  background: radial-gradient(circle, rgba(200, 218, 203, 0.11) 0%, rgba(200, 218, 203, 0) 68%);
  animation: tl-drift-a 26s ease-in-out infinite alternate;
}
.halo--b {
  bottom: 2%;
  left: -32%;
  width: min(100vw, 680px);
  background: radial-gradient(circle, rgba(11, 74, 59, 0.75) 0%, rgba(11, 74, 59, 0) 68%);
  animation: tl-drift-b 30s ease-in-out infinite alternate;
}

/* 3. Aparicion al hacer scroll (motion.js pone .is-in) */
.js [data-reveal]:not(.is-in) { opacity: 0; }
.js [data-reveal].is-in {
  animation: tl-rise 650ms var(--ease) var(--reveal-delay, 0ms) backwards;
}
.cards > :nth-child(2),
.plan-grid > :nth-child(2) { --reveal-delay: 90ms; }
.cards > :nth-child(3) { --reveal-delay: 180ms; }

/* 4. Tarjetas de What's included: linea naranja + elevacion */
.card {
  position: relative;
  transition: transform 0.3s var(--ease);
}
.card::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-bottom: 20px;
  border-radius: 2px;
  background: var(--orange);
  transform-origin: left center;
}
.js .card.is-in::before {
  animation: tl-draw 700ms var(--ease) calc(var(--reveal-delay, 0ms) + 300ms) backwards;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 22px 44px -22px rgba(16, 37, 31, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
@media (hover: hover) {
  .card:hover { transform: translate3d(0, -4px, 0); }
  .card:hover::after { opacity: 1; }
}

/* 5. Planes: halo al pasar, precio con fundido, botones de pago */
.plan { position: relative; }
.plan::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(200, 218, 203, 0.45);
  box-shadow: 0 0 0 5px rgba(200, 218, 203, 0.06), 0 28px 60px -24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.plan:focus-within::after { opacity: 1; }
@media (hover: hover) {
  .plan:hover::after { opacity: 1; }
}
.js .plan.is-in .price {
  animation: tl-price 900ms var(--ease) calc(var(--reveal-delay, 0ms) + 280ms) backwards;
}

.btn--pay {
  position: relative;
  gap: 10px;
}
.btn__arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.25s var(--ease);
}
.btn--pay:hover .btn__arrow,
.btn--pay:focus-visible .btn__arrow { transform: translate3d(4px, 0, 0); }
.btn--pay::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 16px 42px rgba(224, 104, 63, 0.5);
  opacity: 0;
  pointer-events: none;
  animation: tl-breathe 4.5s ease-in-out infinite;
}

/* 6. Banda en movimiento (decorativa, aria-hidden) */
.band {
  overflow: hidden;
  background: var(--green);
  color: var(--sage);
  border-top: 1px solid rgba(200, 218, 203, 0.12);
  border-bottom: 1px solid rgba(200, 218, 203, 0.12);
}
.band__track {
  display: flex;
  width: max-content;
  animation: tl-marquee 48s linear infinite;
}
.band__group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}
.band__group span {
  padding: 14px 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
.band__group .band__dot {
  padding: 14px 26px;
  color: var(--orange);
  letter-spacing: 0;
}

/* 7. Contacto: subrayado que se dibuja */
.contact a {
  position: relative;
  display: inline-block;
}
.contact a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease);
}
.contact a:hover,
.contact a:focus-visible { text-decoration-color: transparent; }
.contact a:hover::after,
.contact a:focus-visible::after { transform: scaleX(1); }

/* 8. Pagina de gracias: check dibujado y cascada */
.check {
  display: block;
  width: 56px;
  height: 56px;
  margin-bottom: 28px;
  fill: none;
  stroke: var(--sage);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.check__ring,
.check__tick {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.check__tick { stroke: var(--orange); stroke-width: 3; }
.js .check__ring { animation: tl-stroke 700ms var(--ease) 150ms backwards; }
.js .check__tick { animation: tl-stroke 450ms var(--ease) 650ms backwards; }
.js .thanks main .wrap > :not(.check) {
  animation: tl-rise 650ms var(--ease) backwards;
}
.js .thanks main .wrap > :nth-child(2) { animation-delay: 500ms; }
.js .thanks main .wrap > :nth-child(3) { animation-delay: 580ms; }
.js .thanks main .wrap > :nth-child(4) { animation-delay: 660ms; }
.js .thanks main .wrap > :nth-child(5) { animation-delay: 740ms; }

/* En telefono la flecha obligaba a partir el texto del boton en dos lineas: ahi no se muestra. */
@media (max-width: 479px) {
  .btn__arrow { display: none; }
}

/* Seguro: el contenido nunca depende de que una animacion corra. Pasado un momento, lo que
   entra animado queda con sus estilos normales (visible), haya corrido o no la animacion. */
.motion-done .site-header img,
.motion-done .hero .wrap > *,
.motion-done .check__ring,
.motion-done .check__tick,
.motion-done .thanks main .wrap > :not(.check),
.js [data-reveal].is-done,
.js .card.is-done::before,
.js .plan.is-done .price { animation: none !important; }

/* Movimiento reducido: todo visible y quieto */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js [data-reveal] { opacity: 1 !important; }
  .card:hover,
  .btn--pay:hover .btn__arrow,
  .btn--pay:focus-visible .btn__arrow { transform: none; }
  .contact a::after { display: none; }
  .contact a:hover,
  .contact a:focus-visible { text-decoration-color: currentColor; }
}
