/* Kunawa v2 — complementos: formulario Tharot (OTP, antibot), gracias y 404 */

.kf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { min-height: 0; }

/* intl-tel-input dentro del campo de teléfono */
.kf-tel .iti { width: 100%; }
.kf-tel .iti input { width: 100%; border: 0; background: transparent; min-height: 52px; }
.kf-tel .iti__selected-dial-code { color: var(--ink); font-weight: 400; }

.kf button[disabled], .kf-otp button[disabled] { opacity: .6; cursor: wait; }

.kf-otp { display: grid; gap: 16px; justify-items: center; text-align: center; padding: 24px 0; }
.kf-otp h3 { font-family: var(--f-d); font-weight: 300; font-size: clamp(34px, 3.4vw, 46px); line-height: 1.05; }
.kf-otp > p:not(.reg-tag):not(.kf-err) { color: var(--mute); max-width: 36ch; }
.kf-otp-in {
  width: min(100%, 260px); min-height: 60px; text-align: center; letter-spacing: .5em; font: 400 26px var(--f-b);
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); padding: 0 12px;
}
.kf-otp-in:focus { outline: 0; border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(143, 129, 82, .12); }
.kf-otp .pill-block { max-width: 360px; }

/* ---------- Estados: gracias y 404 ---------- */
.st { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 110px var(--px) 70px; color: #fff; background: var(--night); overflow: hidden; isolation: isolate; }
.st-bg { position: absolute; inset: 0; z-index: -2; }
.st-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: stZoom 22s var(--ease) both; }
.st::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(17, 17, 11, .72), rgba(17, 17, 11, .55) 45%, rgba(17, 17, 11, .92)); }
.st-logo { position: absolute; top: clamp(22px, 3vw, 40px); left: 50%; transform: translateX(-50%); }
.st-logo img { width: 130px; height: auto; }
.st-box { max-width: 760px; text-align: center; display: grid; justify-items: center; gap: 22px; animation: stIn 1s var(--ease) both; }
.st-tag { font-size: 11.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--khaki); }
.st-num { font-family: var(--f-d); font-weight: 100; font-size: clamp(120px, 22vw, 280px); line-height: .9; letter-spacing: -.03em; color: rgba(248, 245, 230, .92); }
.st-h { font-family: var(--f-d); font-weight: 300; font-size: clamp(44px, 6vw, 92px); line-height: 1.02; letter-spacing: -.012em; }
.st-h em { font-family: var(--f-i); font-weight: 100; font-style: italic; color: var(--khaki); }
.st-p { max-width: 46ch; font-size: 18px; color: rgba(255, 255, 255, .78); }
.st-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 8px; }
.st-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: min(100%, 720px); counter-reset: s; }
.st-steps li { counter-increment: s; text-align: left; padding: 18px 20px; border: 1px solid var(--line-d); border-radius: var(--r); background: rgba(255, 255, 255, .05); backdrop-filter: blur(8px); font-size: 14.5px; color: rgba(255, 255, 255, .8); }
.st-steps li::before { content: '0' counter(s); display: block; font-family: var(--f-d); font-size: 26px; color: var(--khaki); margin-bottom: 6px; }
@keyframes stZoom { from { transform: scale(1.14); } to { transform: scale(1.04); } }
@keyframes stIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) { .st-steps { grid-template-columns: 1fr; } .st-p { font-size: 16.5px; } }
@media (prefers-reduced-motion: reduce) { .st-bg img, .st-box { animation: none; } }

/* ---------- Validación: campos en rojo ---------- */
.kf-f.bad > span:first-child { color: #b4553f; }
.kf-f.bad input, .kf-f.bad select, .kf-f.bad .kf-tel { border-color: #b4553f; background: #fdf6f4; box-shadow: 0 0 0 4px rgba(180, 85, 63, .10); }
.kf-f.bad .kf-tel input { box-shadow: none; background: transparent; }
.kf-check.bad { color: #b4553f; animation: kfShake .45s; }
.kf-check.bad input { outline: 2px solid #b4553f; outline-offset: 2px; }
.kf-err { transition: opacity .3s; }
.kf-otp-in.bad { border-color: #b4553f; background: #fdf6f4; animation: kfShake .45s; }
@keyframes kfShake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .kf-check.bad, .kf-otp-in.bad { animation: none; } }

/* ---------- Gracias (una sola pantalla, sin scroll) ---------- */
.gr { position: relative; height: 100vh; height: 100svh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 0 var(--px); isolation: isolate; color: #fff; background: radial-gradient(ellipse 70% 60% at 85% 20%, rgba(200, 191, 153, .14), transparent 60%), var(--night); overflow: hidden; }
.gr-top { display: flex; justify-content: center; padding: clamp(14px, 3svh, 36px) 0 0; }
.gr-top img { height: clamp(26px, 4.5svh, 38px); width: auto; }
.gr-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 100px); align-items: center; width: 100%; max-width: 1240px; margin: 0 auto; min-height: 0; padding: clamp(10px, 2svh, 28px) 0 clamp(16px, 3.5svh, 44px); }
.gr-copy { display: grid; gap: clamp(10px, 2.2svh, 22px); justify-items: start; animation: stIn 1s var(--ease) both; min-height: 0; }
.gr-check { width: clamp(40px, 7svh, 60px); height: clamp(40px, 7svh, 60px); }
.gr-check svg { width: 100%; height: 100%; fill: none; stroke: var(--khaki); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gr-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: grDraw 1.1s .3s var(--ease) forwards; }
.gr-check path { stroke-dasharray: 44; stroke-dashoffset: 44; animation: grDraw .7s 1.1s var(--ease) forwards; }
.gr-tag { font-size: 11.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--khaki); }
.gr-h { font-family: var(--f-d); font-weight: 300; font-size: clamp(34px, min(5.4vw, 9svh), 84px); line-height: 1.02; letter-spacing: -.012em; }
.gr-h em { font-family: var(--f-i); font-weight: 100; font-style: italic; color: var(--khaki); }
.gr-p { max-width: 50ch; font-size: clamp(14.5px, 2.2svh, 18px); line-height: 1.5; color: rgba(255, 255, 255, .75); }
.gr-steps { list-style: none; margin: clamp(0px, 1svh, 10px) 0 clamp(2px, 1svh, 10px); padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); width: 100%; }
.gr-steps li { position: relative; display: grid; gap: 8px; padding-top: clamp(10px, 2svh, 18px); border-top: 1px solid rgba(200, 191, 153, .35); }
.gr-n { font-family: var(--f-d); font-size: clamp(18px, 3svh, 26px); line-height: 1; color: var(--khaki); }
.gr-steps h2 { font-size: clamp(13.5px, 1.9svh, 16.5px); font-weight: 400; line-height: 1.3; margin: 0; }
.gr-steps p { font-size: clamp(12.5px, 1.7svh, 14px); line-height: 1.4; color: rgba(255, 255, 255, .6); margin: 0; }
.gr-fig { margin: 0; display: grid; gap: clamp(10px, 2svh, 18px); justify-items: center; align-content: center; min-height: 0; animation: stIn 1.2s .15s var(--ease) both; }
.gr-arch { height: min(66svh, 640px); aspect-ratio: 11 / 15; max-width: 100%; border-radius: 999px 999px 24px 24px; overflow: hidden; outline: 1px solid rgba(200, 191, 153, .45); outline-offset: 10px; }
.gr-arch img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); animation: stZoom 20s var(--ease) both; }
.gr-fig figcaption { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 255, 255, .55); text-align: center; }
/* detalle: fondo con la torre, estrellas, sello y sala de ventas */
.gr-bg { position: absolute; inset: 0; z-index: -2; }
.gr-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .2; filter: blur(3px) saturate(.8); transform: scale(1.06); }
.gr-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--night) 8%, rgba(29, 29, 20, .55) 60%, rgba(29, 29, 20, .85)); }
.gr-stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.gr-stars i { position: absolute; bottom: -10px; left: var(--x); width: calc(var(--s) * 2px); height: calc(var(--s) * 2px); border-radius: 50%; background: var(--khaki); box-shadow: 0 0 10px 2px rgba(200, 191, 153, .55); opacity: 0; animation: grRise var(--t) linear infinite; }
.gr-stars i:nth-child(even) { animation-delay: -4s; }
.gr-stars i:nth-child(3n) { animation-delay: -7s; }
@keyframes grRise { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: .9; } 85% { opacity: .5; } 100% { transform: translateY(-105svh); opacity: 0; } }
.gr-fig { position: relative; }
.gr-badge { position: absolute; left: 50%; bottom: clamp(34px, 7svh, 60px); transform: translateX(-50%) translateX(clamp(70px, 10vw, 150px)); display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 12px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; background: rgba(29, 29, 20, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); white-space: nowrap; animation: stIn 1.2s .6s var(--ease) both; }
.gr-badge b { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--khaki); color: var(--night); font-family: var(--f-d); font-size: 18px; font-weight: 400; }
.gr-badge span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .9); }
.gr-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px clamp(16px, 3vw, 40px); padding: clamp(10px, 2svh, 20px) 0 clamp(12px, 2.4svh, 24px); border-top: 1px solid var(--line-d); font-size: 12px; letter-spacing: .1em; color: rgba(255, 255, 255, .6); text-align: center; }
.gr-foot a { color: var(--khaki); }
.gr-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
@keyframes grDraw { to { stroke-dashoffset: 0; } }
@media (max-width: 900px) {
  .gr-grid { grid-template-columns: 1fr; align-content: center; }
  .gr-fig { display: none; }
  .gr-foot span:nth-child(2) { display: none; }
  .gr-bg::after { background: rgba(29, 29, 20, .78); }
  .gr-copy { justify-items: center; text-align: center; }
  .gr-steps { grid-template-columns: 1fr; gap: 8px; text-align: left; }
  .gr-steps li { grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding-top: 8px; }
  .gr-steps p { display: none; }
}
@media (max-height: 640px) { .gr-badge, .gr-stars { display: none; } }
@media (prefers-reduced-motion: reduce) { .gr-stars { display: none; } .gr-badge { animation: none; } .gr-copy, .gr-fig, .gr-arch img { animation: none; } .gr-check circle, .gr-check path { animation: none; stroke-dashoffset: 0; } }

/* ---------- 404 (comparte fondo, estrellas y franja con gracias) ---------- */
.nf .gr-bg::after { background: radial-gradient(ellipse 60% 55% at 50% 45%, rgba(29, 29, 20, .5), var(--night) 85%); }
.nf-box { display: grid; justify-items: center; align-content: center; gap: clamp(8px, 1.8svh, 18px); text-align: center; min-height: 0; animation: stIn 1s var(--ease) both; }
.nf-num { display: flex; align-items: center; justify-content: center; gap: clamp(6px, 1.2vw, 18px); margin: 0 0 clamp(2px, 1svh, 10px); font-family: var(--f-d); font-weight: 100; font-size: clamp(84px, min(18vw, 24svh), 230px); line-height: 1; color: rgba(248, 245, 230, .92); letter-spacing: -.02em; }
.nf-0 { position: relative; display: block; width: .56em; height: .86em; border: 2px solid var(--khaki); border-radius: 999px 999px 18px 18px; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, rgba(200, 191, 153, .55), rgba(200, 191, 153, .08) 70%); }
.nf-0 i { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(248, 245, 230, .35)); }
.nf-0::before, .nf-0::after { content: ''; position: absolute; top: 0; bottom: 0; width: 50%; z-index: 1; background: linear-gradient(90deg, #3a3a2a, #26261b); box-shadow: inset 0 0 0 1px rgba(200, 191, 153, .25); animation: nfDoor 7s var(--ease) infinite; }
.nf-0::before { left: 0; --o: -100%; }
.nf-0::after { right: 0; --o: 100%; }
@keyframes nfDoor { 0%, 18% { transform: none; } 34%, 70% { transform: translateX(var(--o)); } 86%, 100% { transform: none; } }
.nf .gr-h { font-size: clamp(32px, min(5vw, 8svh), 76px); }
.nf .gr-p { max-width: 44ch; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: clamp(4px, 1.2svh, 12px); }
.pill-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.pill-ghost .pill-ico { background: rgba(255, 255, 255, .14); color: #fff; }
.pill-ghost:hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 900px) { .nf .gr-bg::after { background: rgba(29, 29, 20, .78); } }
@media (prefers-reduced-motion: reduce) { .nf-0::before, .nf-0::after { animation: none; transform: translateX(var(--o)); } .nf-box { animation: none; } }

/* ---------- Selector de idioma ---------- */
body { transition: opacity .45s var(--ease); }
body.lang-leaving { opacity: 0; }
.lang { --w: 46px; --h: 32px; position: relative; display: inline-flex; align-items: center; margin-left: 12px; padding: 3px 3px 3px 12px; border: 1px solid rgba(255, 255, 255, .32); border-radius: 999px; background: rgba(29, 29, 20, .28); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); isolation: isolate; transition: border-color .4s, box-shadow .5s var(--ease); }
.lang:hover { border-color: var(--khaki); box-shadow: 0 0 0 4px rgba(200, 191, 153, .12), 0 10px 30px -12px rgba(200, 191, 153, .6); }
.lang-globe { width: 16px; height: 16px; margin-right: 9px; fill: none; stroke: var(--khaki); stroke-width: 1.4; stroke-linecap: round; flex-shrink: 0; transition: transform .9s var(--ease); }
.lang:hover .lang-globe, .lang.is-busy .lang-globe { transform: rotate(360deg); }
.lang-o, .hd-nav .lang-o { position: relative; z-index: 2; display: grid; place-items: center; width: var(--w); height: var(--h); padding: 0; font-size: 11.5px; font-weight: 500; letter-spacing: .16em; color: rgba(255, 255, 255, .8); transition: color .5s var(--ease); }
.hd-nav .lang-o::after { display: none; }
.lang[data-cur="es"] .lang-o[lang="es"], .lang[data-cur="en"] .lang-o[lang="en"] { color: var(--night); }
.lang-thumb { position: absolute; z-index: 1; top: 3px; right: 3px; width: var(--w); height: var(--h); border-radius: 999px; background: linear-gradient(135deg, #fff, var(--khaki)); box-shadow: 0 8px 20px -8px rgba(200, 191, 153, .9); transform: translateX(calc(var(--w) * -1)); transition: transform .6s cubic-bezier(.68, -.35, .27, 1.3); }
.lang[data-cur="en"] .lang-thumb { transform: none; }
.lang-fixed { position: absolute; top: clamp(12px, 2.6svh, 32px); right: var(--px); margin: 0; z-index: 6; }
.menu .lang { --w: 58px; --h: 40px; justify-self: start; margin: 28px 0 0; }
.menu .lang-o { font-family: var(--f-b); font-size: 13px; font-weight: 500; line-height: 1; padding: 0; border: 0; }
@media (prefers-reduced-motion: reduce) { .lang-thumb, .lang-globe { transition: none; } body, body.lang-leaving { transition: none; opacity: 1; } }
