:root {
  --bg: #faf8f5; --ink: #292421; --muted: #71675f; --line: #e9e3dd;
  --red: #bc1820; --red-dark: #9e131a; --soft: #fff3f3; --yellow: #ffde32;
  --sand: #ede7dc; --gold: #8a5a00; --gold-bg: #fdf3e1; --ok: #2f7a4a; --ok-bg: #edf6ef;
  --bad: #b3261e; --bad-bg: #fdecea;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* Márgenes laterales que respetan el notch del iPhone en horizontal */
  --pad-l: max(16px, env(safe-area-inset-left));
  --pad-r: max(16px, env(safe-area-inset-right));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: Montserrat, system-ui, sans-serif; font-size: 16px; line-height: 1.55; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: "League Spartan", Montserrat, sans-serif; text-wrap: balance; }
p { text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }


.pattern { position: fixed; inset: 0 0 auto 0; height: 520px; z-index: -1; opacity: .07; pointer-events: none;
  background-image: radial-gradient(circle at 12px 12px, var(--red) 2px, transparent 2.5px); background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent); mask-image: linear-gradient(to bottom, #000, transparent); }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: var(--pad-l); padding-right: var(--pad-r); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 24px; }
/* Bloques de marca a la derecha del encabezado */
.brand-blocks { display: flex; align-items: stretch; gap: 8px; height: 72px; }
.brand-blocks .tiles { display: flex; flex-direction: column; gap: 6px; }
.tile { display: grid; place-items: center; width: 33px; height: 33px; padding: 6px; border-radius: 10px; }
.tile.ink { background: #292421; color: #fdf3e1; }
.tile.yellow { background: #ffde32; color: #292421; }
.mark { display: block; width: 100%; aspect-ratio: 696 / 555; background: currentColor; -webkit-mask: url(/assets/isotipo-mascara.svg) center / contain no-repeat; mask: url(/assets/isotipo-mascara.svg) center / contain no-repeat; }
.panel { position: relative; width: clamp(120px, 18vw, 240px); border-radius: 14px; overflow: hidden; background: #bc1820; color: #9e131a; }
.pattern-fill { position: absolute; inset: 0; background: currentColor; -webkit-mask: url(/assets/patron.svg) 0 0 / 72px auto repeat; mask: url(/assets/patron.svg) 0 0 / 72px auto repeat; }
.logo { width: 180px; height: auto; aspect-ratio: 836 / 255; display: block; }

/* Escritorio: texto a la izquierda, formulario fijo a la derecha */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); grid-template-areas: "intro card" "art card"; column-gap: clamp(32px, 5vw, 72px); row-gap: 32px; align-items: start; padding: clamp(32px, 6vh, 72px) 0 56px; }
.intro { grid-area: intro; }
.teasers-wrap { padding: 8px 0 48px; }
/* Ilustración: el fondo blanco de la imagen se funde con el crema */
.art { grid-area: art; margin: -8px 0 0 -12px; position: relative; }
.art img { display: block; width: min(440px, 100%); height: auto; mix-blend-mode: multiply; }
.art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(to bottom, #faf8f500, var(--bg)); pointer-events: none; }
.anim .art img { animation: bob 5s ease-in-out 1.2s infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-.6deg); } }
/* Etiqueta en texto rojo, sin cápsula (como la referencia) */
.tag-plain { display: inline-block; color: var(--red); font-size: 13px; font-weight: 800; letter-spacing: .12em; }
h1 .big { display: block; font-size: 1.18em; line-height: 1; color: var(--red); margin-top: .04em; }
h1 .big .dot { color: var(--ink); }
.intro h1 { font-size: clamp(40px, 4.6vw, 64px); }
/* Saludo al registrarse */
.wave { display: block; width: 132px; height: auto; margin: -8px auto 4px; mix-blend-mode: multiply; }
.anim .done:not([hidden]) .wave { animation: hello .9s var(--out, ease-out) both; transform-origin: 50% 90%; }
@keyframes hello { 0% { opacity: 0; transform: translateY(12px) scale(.9); } 60% { opacity: 1; transform: translateY(0) scale(1.03) rotate(-2deg); } 100% { transform: none; } }
.card-col { grid-area: card; position: sticky; top: 24px; }
h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: .98; letter-spacing: -.02em; margin: 18px 0 18px; }
h1 em { font-style: normal; color: var(--red); }
.lead { font-size: clamp(17px, 1.4vw, 19px); color: #4a423c; max-width: 38ch; margin: 0; }
.teasers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
/* Tarjetas como .cecy-help-grid del portal: blanco, borde fino, radio 18 px */
.teasers li { display: flex; flex-direction: column; gap: 18px; padding: 24px; background: #fff; border: 1px solid #e9e3dd; border-radius: 18px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.teasers li:hover { border-color: #dccdac; box-shadow: 0 14px 35px #30251a0d; }
/* Ficha del ícono como .cecy-state-art del portal: blanca, borde, sombra cálida, girada */
.teasers .ico { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; flex-shrink: 0; color: #b71920; background: #fff; border: 1px solid #e9e3dd; box-shadow: 0 14px 35px #30251a0d; transform: rotate(-8deg); transition: transform .35s var(--ease); }
.teasers li:hover .ico { transform: rotate(0deg); }
.teasers svg { width: 26px; height: 26px; }
/* Título de sección con la barra roja y amarilla del portal (.cecy-section-heading) */
.teasers-head { margin: 0 0 18px; font-size: 24px; line-height: 1.1; }
.teasers-head::after { content: ""; display: block; width: 72px; height: 4px; margin-top: 12px; border-radius: 99px; background: linear-gradient(90deg, #bc1820 0 70%, transparent 70% 76%, #ffde32 76%); }
.teasers strong { display: block; font-size: 15px; line-height: 1.3; margin-bottom: 4px; }
/* Etiqueta de marca, como .cecy-tag[data-tone=brand] del portal */
.pre { display: inline-flex; margin-top: 10px; padding: 2px 8px; border-radius: 999px; background: #fff3f3; color: #9e131a; font-size: 12px; font-weight: 600; line-height: 1.5; }
.teasers span.t { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.lock { display: inline-flex; align-items: center; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #f0dcb4; color: #5c3c00; font-size: 12px; font-weight: 600; line-height: 1.5; vertical-align: 2px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: 0 8px 30px #30251a0d; scroll-margin-top: 16px; }
.card h2 { font-size: 28px; line-height: 1.1; margin: 0; }
.card-sub { color: var(--muted); font-size: 14px; margin: 8px 0 4px; }
.req { color: var(--red-dark); font-weight: 700; font-size: 12.5px; margin: 0 0 4px; }
form { display: grid; gap: 4px; }
.field { display: grid; gap: 6px; margin-top: 12px; }
label { font-size: 13px; font-weight: 600; color: #514943; }
input, select { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background-color: #fff; font: inherit; font-size: 16px; color: var(--ink); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input::placeholder { color: #71675f; opacity: 1; }
/* iOS dibuja el select con degradado gris: se reemplaza por uno propio */
select { -webkit-appearance: none; appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371675f' stroke-width='2' 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 14px center; background-size: 18px; }
select.empty { color: #71675f; }
/* Foco en tinta: el rojo queda reservado para los errores */
input:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px #29242122; }
[aria-invalid=true] { border-color: var(--bad); background-color: #fffafa; }
.err { display: flex; gap: 6px; align-items: flex-start; color: var(--bad); font-size: 13px; font-weight: 600; margin: 0; }
.err:empty { display: none; }
.err svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 16px; cursor: pointer; padding: 4px 0; }
.check input { width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--red); flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 12px; background: var(--red); color: #fff; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; margin-top: 16px; transition: background .15s var(--ease), transform .1s var(--ease); touch-action: manipulation; }
form .btn { width: 100%; }
.btn:hover { background: var(--red-dark); }
.btn:active { transform: scale(.98); }
.btn[aria-busy=true] { opacity: .75; cursor: progress; }
.btn svg { width: 18px; height: 18px; }
.btn-ink { background: var(--ink); }
.btn-ink:hover { background: #000; }
.order-today { margin-top: 12px; }
.order-toggle { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-decoration-color: #dccdac; text-underline-offset: 4px; cursor: pointer; }
.order-toggle:hover { text-decoration-color: var(--ink); }
.order-toggle svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform .2s var(--ease); }
.order-toggle[aria-expanded=true] svg { transform: rotate(90deg); }
:is(a, button, input, select):focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* Estado después del registro */
[hidden] { display: none !important; }
.done .ok { display: flex; gap: 12px; align-items: flex-start; background: var(--ok-bg); color: #1f5a35; border-radius: 14px; padding: 14px; font-size: 14px; }
.done .ok svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--ok); }
.done .ok h2 { font-size: 18px; margin: 0 0 2px; color: #1f5a35; outline: none; }
.bridge { margin-top: 18px; background: var(--sand); border-radius: 16px; padding: 22px 18px 18px; position: relative; overflow: hidden; }
.bridge::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--yellow); }
.bridge h3 { margin: 4px 0 4px; font-size: 22px; line-height: 1.15; }
.bridge p { margin: 0; font-size: 14px; color: #4a423c; }
.bridge .btn { width: 100%; }
.picker { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.picker a { display: flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; transition: border-color .15s var(--ease); }
.picker a:hover { border-color: var(--red); color: var(--red-dark); }
.picker a:last-child:nth-child(odd) { grid-column: 1 / -1; }

.band { height: 10px; background: var(--yellow); border-radius: 999px; margin: 8px 0 24px; }
footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; padding-top: 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

/* Botón fijo para celular: aparece cuando el formulario no está a la vista */
.dock { display: none; }

/* Tableta */
@media (max-width: 1024px) {
  .teasers { grid-template-columns: 1fr; }
  .art img { width: min(380px, 100%); }
  .teasers li { flex-direction: row; align-items: center; gap: 18px; }
}

/* Celular: el formulario sube y todo pasa a una columna */
@media (max-width: 760px) {
  .top { padding-top: 16px; }
  .logo { width: 136px; }
  .brand-blocks { height: 52px; gap: 6px; }
  .brand-blocks .tiles { gap: 4px; }
  .tile { width: 24px; height: 24px; padding: 4px; border-radius: 7px; }
  .panel { width: 72px; border-radius: 10px; }
  .pattern-fill { -webkit-mask-size: 52px auto; mask-size: 52px auto; }
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "art" "card"; row-gap: 16px; padding: 16px 0 36px; }
  .art { justify-self: center; }
  .art img { width: min(250px, 64vw); }
  .tag-plain { font-size: 12px; }
  h1 .big { font-size: 1.2em; }
  .intro h1 { font-size: clamp(34px, 10vw, 44px); }
  .card-col { position: static; }
  .card { padding: 22px 20px; border-radius: 18px; }
  .card h2 { font-size: 25px; }
  h1 { font-size: clamp(36px, 11vw, 48px); margin: 14px 0 12px; }
  .teasers { gap: 10px; }
  .teasers li { padding: 16px; }
  .teasers .ico { width: 48px; height: 48px; border-radius: 16px; }
  footer { flex-direction: column; gap: 4px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  .dock { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 10px var(--pad-r) calc(10px + env(safe-area-inset-bottom)) var(--pad-l);
    background: #faf8f5f2; -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
    border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .25s var(--ease); }
  .dock.show { transform: translateY(0); }
  .dock .btn { width: 100%; margin: 0; }
}

/* iPhone SE y pantallas muy angostas */
@media (max-width: 360px) {
  .picker { grid-template-columns: 1fr; }
  .logo { width: 118px; }
  .panel { width: 48px; }
}

/* iPhone en horizontal: menos altura disponible */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding-top: 16px; }
  .card-col { position: static; }
  .dock { display: none; }
}


/* ===== Animaciones (solo con JS activo y sin "reducir movimiento") ===== */
:root { --out: cubic-bezier(.16, 1, .3, 1); }
/* Barra de progreso de la página */
.progress { position: fixed; left: 0; top: 0px; height: 3px; width: 100%; z-index: 25; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
.progress.full { background: var(--ok); }
/* Entrada escalonada */
.anim .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--out), transform .7s var(--out); transition-delay: var(--d, 0ms); }
.anim .reveal.in { opacity: 1; transform: none; }
h1 em { position: relative; display: inline-block; }
/* El formulario saluda una vez cuando llegas */
.anim .card.arrive { animation: arrive 1.1s var(--out); }
@keyframes arrive { 0% { box-shadow: 0 0 0 0 #bc182055, 0 8px 30px #30251a0d; } 60% { box-shadow: 0 0 0 10px #bc182000, 0 8px 30px #30251a0d; } 100% { box-shadow: 0 8px 30px #30251a0d; } }
/* Íconos de los avances: pequeño salto al aparecer */
.anim .teasers li.in .ico { animation: pop .5s var(--out) backwards; animation-delay: calc(var(--d, 0ms) + 200ms); }
@keyframes pop { 0% { transform: scale(.6) rotate(-20deg); } 70% { transform: scale(1.06) rotate(-5deg); } 100% { transform: rotate(-8deg); } }
/* Flecha que empuja en botones y enlaces */
.btn svg { transition: transform .2s var(--out); }
.btn:hover svg { transform: translateX(3px); }
/* Registro: el check se dibuja y el puente sube */
.anim .done:not([hidden]) .ok svg { stroke-dasharray: 70; }
.anim .done:not([hidden]) .ok svg use { stroke-dasharray: 70; stroke-dashoffset: 70; animation: draw .7s var(--out) .1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.anim .done:not([hidden]) .ok { animation: rise .5s var(--out) both; }
.anim .done:not([hidden]) .bridge { animation: rise .6s var(--out) .3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .progress { display: none; }
}

/* ===== Producción ===== */
/* Sprite de íconos (antes era un atributo style, que la política de seguridad bloquea) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Retardos de entrada (antes atributos style="--d:…") */
.d1 { --d: 90ms; } .d2 { --d: 180ms; } .d3 { --d: 220ms; } .d4 { --d: 240ms; } .d5 { --d: 110ms; }
/* Campo trampa: fuera de la vista y del lector de pantalla */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Turnstile: espacio solo cuando el widget se dibuja */
.turnstile { margin-top: 14px; min-height: 0; }
.turnstile:empty { display: none; }
.form-err { margin-top: 10px; }
/* Enlaces de texto */
.check a, footer a { color: var(--red-dark); text-underline-offset: 3px; }
.check a:hover, footer a:hover { color: var(--ink); }
/* Página de privacidad */
.legal { max-width: 720px; margin: 0 auto; padding: 24px 0 48px; }
.legal h1 { font-size: clamp(32px, 6vw, 44px); line-height: 1.05; }
.legal h2 { font-size: 22px; margin-top: 28px; }
.legal p { color: #4a423c; }
.legal a { color: var(--red-dark); text-underline-offset: 3px; }
::selection { background: #ffde32; color: var(--ink); }
