/* UWUPI — Meta ads landing (Spanish). Mobile first, single screen, no scroll on ≥ 6.1" phones.
 *
 * Vertical budget is expressed in svh (small viewport height = the space left once the
 * browser's own bars are showing), so every block shrinks together on short screens and
 * breathes on tall ones. Hard minimums keep touch targets ≥ 44px. Under ~560px tall
 * (landscape phones) the page simply scrolls. */
:root {
  --ink: #0f1229;
  --ink-2: #3d4566;
  --muted: #6b7394;
  --line: #dfe3ee;
  --soft: #f4f6fb;
  --brand: #7c3aed;
  --brand-dark: #6d28d9;
  --blue: #1f8fff;
  --blue-deep: #1f4ef5;
  --pink: #e83fd1;
  --orange: #ff9a3d;
  --green: #25d366;
  --green-ink: #15913a;
  --danger: #e11d48;
  --grad: linear-gradient(90deg, var(--blue) 0%, var(--brand) 50%, var(--pink) 100%);
  --shadow: 0 30px 70px -28px rgba(76, 29, 149, .38), 0 2px 6px rgba(15, 18, 41, .05);

  /* Fluid vertical rhythm (vh fallback, svh below) */
  --gap: clamp(6px, 1.4vh, 14px);
  --field-gap: clamp(8px, 1.3vh, 12px);
  --field-h: clamp(44px, 6.3vh, 56px);
  --cta-h: clamp(52px, 7vh, 62px);
  --pill-h: clamp(42px, 5.6vh, 48px);
  --logo-h: clamp(34px, 5.2vh, 48px);
  --mascot: clamp(48px, 7vh, 64px);
  --radius: 14px;
}
@supports (height: 1svh) {
  :root {
    --gap: clamp(6px, 1.4svh, 14px);
    --field-gap: clamp(8px, 1.3svh, 12px);
    --field-h: clamp(44px, 6.3svh, 56px);
    --cta-h: clamp(52px, 7svh, 62px);
    --pill-h: clamp(42px, 5.6svh, 48px);
    --logo-h: clamp(34px, 5.2svh, 48px);
    --mascot: clamp(48px, 7svh, 64px);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: "Plus Jakarta Sans", "Plus Jakarta Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.4;
  background:
    radial-gradient(520px 300px at 110% -8%, #ece4ff 0%, transparent 62%),
    radial-gradient(460px 320px at -14% 108%, #dfeaff 0%, transparent 62%),
    #fff;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
h1, h2, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(124, 58, 237, .45); outline-offset: 2px; }

/* ---------- Layout ---------- */
.page { flex: 1; display: flex; width: 100%; }
.pitch { display: none; }
.card-title { display: none; }
.sheet {
  width: 100%;
  max-width: 480px;            /* phablets & small tablets: keep the form a comfortable width */
  margin: auto;                /* vertical + horizontal centering inside the page */
  padding: max(10px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
}
.sheet__inner { display: flex; flex-direction: column; gap: var(--gap); }

/* ---------- Brand row: logo | mascot ---------- */
.brand { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3.5vw, 18px); }
.brand__logo img { height: var(--logo-h); width: auto; }
.brand__divider { width: 1.5px; height: calc(var(--mascot) * .8); background: #cfd4e3; border-radius: 2px; }
.brand__mascot {
  position: relative; width: var(--mascot); height: var(--mascot); padding: 0; border: 0; border-radius: 50%;
  background: #e9e3ff; overflow: visible; box-shadow: 0 6px 16px -8px rgba(76, 29, 149, .5);
  transition: transform .15s;
}
.brand__mascot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; border-radius: 50%; }
.brand__mascot:hover { transform: scale(1.04); }
.brand__play {
  position: absolute; right: -4px; bottom: -3px; width: 42%; height: 42%; min-width: 22px; min-height: 22px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; border: 2px solid #fff; box-shadow: 0 4px 10px -4px rgba(76, 29, 149, .7);
}
.brand__play svg { width: 60%; height: 60%; margin-left: 8%; }

/* ---------- Headline ---------- */
.hero { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.hero__title {
  position: relative; display: inline-block; padding: 0 10px;
  font-size: clamp(1.45rem, 6.6vw, 2.05rem); line-height: 1.12; font-weight: 800; font-style: italic;
  letter-spacing: -.03em; text-wrap: balance;
}
.hero__title em, .pitch__title em, .grad {
  font-style: inherit; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Three little sparks, top-left, as in the reference */
.spark {
  position: absolute; left: -12px; top: -10px; width: 26px; height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26' fill='none' stroke='%23ff9a3d' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M4 16 10 13'/%3E%3Cpath d='M8 7l5 5'/%3E%3Cpath d='M16 3v6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.swoosh { width: min(64%, 240px); height: 9px; margin-top: 2px; }
.hero__sub { font-size: clamp(13px, 3.6vw, 15px); color: var(--muted); font-weight: 500; max-width: 30rem; margin-top: 4px; }

.video-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 6px; margin-top: 6px;
  border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 13.5px;
  box-shadow: 0 10px 22px -12px rgba(15, 18, 41, .7); transition: transform .12s, background .15s;
}
.video-pill:hover { background: #1b2140; }
.video-pill:active { transform: scale(.98); }
.video-pill__icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); }
.video-pill__icon svg { width: 14px; height: 14px; margin-left: 2px; }
.video-pill__time { color: #aab2d1; font-weight: 600; }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: var(--field-gap); }
.field { position: relative; }
.field__icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 21px; height: 21px;
  color: var(--ink-2); pointer-events: none; stroke-width: 1.9;
}
.field input, .field select {
  width: 100%; height: var(--field-h); padding: 0 16px 0 50px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--soft);
  font-size: 16px; /* 16px: iOS does not zoom */ font-weight: 600; color: var(--ink);
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder { color: #5f6786; font-weight: 600; opacity: 1; }
.field select { padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1229' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 18px;
}
.field select:required:invalid { color: #5f6786; }  /* placeholder option looks like the inputs' placeholders */
.field select option { color: var(--ink); }
.field input:hover, .field select:hover { border-color: #c9cfe0; }
.field input:focus, .field select:focus {
  outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(124, 58, 237, .14);
}
.field input:focus ~ .field__icon { color: var(--brand); }
.field [aria-invalid="true"] { border-color: var(--danger) !important; background: #fff5f7; }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(225, 29, 72, .14); }
.field.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ---------- Primary CTA ---------- */
.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: var(--cta-h); margin-top: 2px;
  padding: 0 18px; border: 0; border-radius: 999px; text-decoration: none;
  background: linear-gradient(180deg, #34c759 0%, #1f9e46 55%, #15913a 100%); color: #fff;
  font-weight: 800; font-size: clamp(16px, 4.5vw, 19px); letter-spacing: -.01em; white-space: nowrap;
  box-shadow: 0 14px 28px -12px rgba(21, 145, 58, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .1s, filter .15s;
}
.cta:hover { filter: brightness(1.06); }
.cta:active { transform: scale(.985); }
.cta[disabled] { opacity: .75; cursor: progress; }
.cta__icon { width: 30px; height: 30px; border-radius: 8px; border: 2px solid rgba(255, 255, 255, .9); display: grid; place-items: center; flex-shrink: 0; }
.cta__icon svg { width: 18px; height: 18px; stroke-width: 2.2; }
.cta__label { flex: 1; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cta__arrow { width: 24px; height: 24px; stroke-width: 2.6; }
.cta--wa { background: var(--green); box-shadow: 0 12px 26px -12px rgba(37, 211, 102, .9); margin-top: 6px; }
.cta--wa svg { width: 24px; height: 24px; }

/* ---------- WhatsApp | Phone ---------- */
.contact { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(8px, 2.5vw, 14px); }
.contact__sep { width: 1.5px; height: calc(var(--pill-h) * .75); background: #cfd4e3; border-radius: 2px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--pill-h); min-width: 0; padding: 0 10px;
  border-radius: 999px; border: 2px solid; background: #fff; text-decoration: none;
  font-weight: 800; font-size: clamp(14px, 4vw, 16.5px); white-space: nowrap; transition: transform .1s, background .15s;
}
.pill span { overflow: hidden; text-overflow: ellipsis; }
.pill svg { width: 22px; height: 22px; }
.pill:active { transform: scale(.98); }
.pill--wa { border-color: var(--green); color: var(--green-ink); }
.pill--wa svg { color: var(--green); }
.pill--wa:hover { background: #effbf3; }
.pill--tel { border-color: var(--blue-deep); color: var(--blue-deep); }
.pill--tel svg { fill: var(--blue-deep); stroke: var(--blue-deep); stroke-width: 1.2; width: 19px; height: 19px; }
.pill--tel:hover { background: #eff3ff; }

/* ---------- Status slot ---------- */
.status { min-height: 18px; text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 500; text-wrap: balance; }
.status.is-error { display: block !important; color: var(--danger); font-weight: 700; } /* errors always show, even where the reassurance line is hidden */

/* ---------- Success ---------- */
.done { text-align: center; align-items: center; animation: in .35s ease both; }
.done:focus { outline: none; }
.brand--done img { height: var(--logo-h); width: auto; }
.done__icon {
  width: 68px; height: 68px; margin-top: 8px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #34d399, #059669); color: #fff;
  box-shadow: 0 16px 30px -12px rgba(5, 150, 105, .6);
}
.done__icon svg { width: 34px; height: 34px; stroke-width: 3; }
.done__title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.done__text { color: var(--muted); max-width: 24rem; font-size: 1rem; }
.next { list-style: none; margin: 4px 0 0; padding: 14px 16px; width: 100%; border-radius: 16px; background: var(--soft); text-align: left; display: grid; gap: 8px; counter-reset: n; }
.next li { counter-increment: n; display: flex; gap: 10px; align-items: baseline; font-size: 14px; color: var(--ink-2); }
.next b { color: var(--ink); white-space: nowrap; }
.next li::before { content: counter(n); display: inline-grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; }
.link { background: none; border: 0; color: var(--brand-dark); font-weight: 700; padding: 8px; }
.link:hover { text-decoration: underline; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Video modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .2s ease both; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(8, 10, 28, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal__player {
  position: relative; aspect-ratio: 9 / 16; background: #0f1229; border-radius: 24px; overflow: hidden;
  width: min(100%, 420px, calc((100vh - 32px) * 9 / 16));
  width: min(100%, 420px, calc((100svh - 32px) * 9 / 16));
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .12);
}
.modal__player video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0f1229; }
.modal__close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(15, 18, 41, .55); color: #fff; backdrop-filter: blur(6px);
  transition: background .15s;
}
.modal__close:hover { background: rgba(15, 18, 41, .8); }
.modal__close svg { width: 22px; height: 22px; stroke-width: 2.4; }
.modal__end {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 12px;
  padding: 24px 20px 28px; text-align: center; color: #fff;
  background: linear-gradient(to bottom, rgba(15, 18, 41, .15) 30%, rgba(15, 18, 41, .9));
  animation: fade .3s ease both;
}
.modal__end-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.cta--modal { background: var(--grad); box-shadow: 0 14px 30px -12px rgba(124, 58, 237, .8); height: 54px; font-size: 16.5px; }
.modal__replay { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: #fff; font-weight: 700; font-size: 14px; padding: 8px; opacity: .9; }
.modal__replay svg { width: 16px; height: 16px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Height tuning for phones ---------- */
/* Shorter viewports (iPhone SE-class, phones with large browser chrome): drop the sub line first. */
@media (max-height: 690px) {
  .hero__sub { display: none; }
}
@media (max-height: 640px) {
  .status { display: none; }
  .swoosh { display: none; }
}
@media (max-height: 600px) {
  .video-pill { height: 32px; margin-top: 2px; font-size: 13px; }
  .video-pill__icon { width: 22px; height: 22px; }
}
/* Landscape phones: single-screen fit is impossible — let it scroll comfortably. */
@media (max-height: 540px) {
  .sheet { margin: 0 auto; padding-top: 16px; }
  .hero__sub, .status, .swoosh { display: revert; }
}
/* Very narrow phones (≤ 360px): tighter horizontal rhythm */
@media (max-width: 360px) {
  .sheet { padding-left: 12px; padding-right: 12px; }
  .pill { gap: 6px; padding: 0 8px; }
  .pill svg { width: 19px; height: 19px; }
  .cta__icon { display: none; }
}

/* ---------- Desktop: pitch on the left, form card on the right ---------- */
@media (min-width: 900px) {
  body {
    background:
      radial-gradient(900px 500px at 100% -10%, #e4dcff 0%, transparent 60%),
      radial-gradient(700px 500px at -10% 30%, #dceaff 0%, transparent 60%),
      linear-gradient(#fbfbff, #f5f2ff);
  }
  .page { max-width: 1120px; margin: 0 auto; padding: 32px 24px; display: grid; grid-template-columns: 1fr 460px; gap: 56px; align-items: center; }
  .pitch { display: block; }
  .pitch__logo img { height: 64px; width: auto; }
  .pitch__title { margin-top: 28px; font-size: clamp(2.4rem, 4.2vw, 3.4rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 800; font-style: italic; text-wrap: balance; }
  .pitch__sub { margin-top: 16px; font-size: 1.15rem; color: var(--muted); max-width: 34rem; }
  .pitch__points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; max-width: 32rem; }
  .pitch__points li { display: flex; gap: 12px; align-items: baseline; color: var(--ink-2); font-size: 1rem; }
  .pitch__points b { min-width: 76px; color: var(--brand-dark); }
  .pitch__video {
    position: relative; display: block; margin-top: 28px; width: 300px; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 24px; overflow: hidden;
    background: #e9e3ff; box-shadow: var(--shadow); transition: transform .15s;
  }
  .pitch__video:hover { transform: translateY(-2px); }
  .pitch__video img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
  .pitch__play {
    position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%;
    display: grid; place-items: center; background: rgba(255, 255, 255, .95); color: var(--brand);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .3), 0 0 0 10px rgba(255, 255, 255, .28); animation: pulse 2s ease-in-out infinite;
  }
  .pitch__play svg { width: 34px; height: 34px; margin-left: 4px; }
  .pitch__video-label {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; color: #fff; font-weight: 800; font-size: 15px;
    background: linear-gradient(to top, rgba(15, 18, 41, .8), transparent);
  }
  @keyframes pulse { 50% { transform: translate(-50%, -50%) scale(1.06); } }

  .sheet {
    max-width: none; margin: 0; padding: 30px 30px 26px;
    background: rgba(255, 255, 255, .92); border: 1px solid #fff; border-radius: 28px; box-shadow: var(--shadow); backdrop-filter: blur(12px);
  }
  .sheet__inner { gap: 16px; }
  .brand, .hero { display: none; }
  .card-title { display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
  .form { gap: 12px; }
  .field input, .field select { height: 56px; }
  .cta { height: 60px; font-size: 18px; }
  .pill { height: 48px; font-size: 16px; }
  .hero__sub, .status, .swoosh { display: revert; }
  .status { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
