/* Formulario de pedido de presupuesto · Castez.ph */
:root {
  --ink: #1a1a22; --paper: #eef0f3; --sheet: #fff; --line: #d9dbe1; --muted: #6b6b76; --soft: #f4f5f7; --wa: #1fa855;
  --head: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --body: "Roboto Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--body); background: var(--paper); color: var(--ink); font-size: 18px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
main { max-width: 640px; margin: 0 auto; min-height: 100vh; }

/* Portada: la foto y la firma */
.hero { position: relative; height: 300px; display: flex; align-items: flex-end; padding: 24px 24px 52px; color: #fff;
  background: #1a1a22; overflow: hidden; isolation: isolate; }
.hero .slide { position: absolute; inset: 0; background: center 30%/cover no-repeat; opacity: 0; transition: opacity 1.6s ease; z-index: -2; }
.hero .slide.on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(26,26,34,.15) 0%, rgba(26,26,34,.75) 100%); }
.hero .logo { display: block; width: min(300px, 78%); height: auto; }
.hero p { margin: 8px 0 0 4px; font-size: 16px; opacity: .85; letter-spacing: .2px; }
.compact { display: none; position: sticky; top: 0; z-index: 10; background: var(--ink); padding: 10px 20px; }
.compact img { height: 34px; display: block; }

/* Hoja del formulario */
.content { position: relative; background: var(--sheet); border-radius: 26px 26px 0 0; margin-top: -26px; padding: 26px 24px 120px; min-height: 60vh; }
.progress { display: flex; align-items: center; gap: 6px; margin-bottom: 22px; }
.progress .bar { height: 5px; flex: 1; border-radius: 5px; background: var(--line); transition: background .3s; }
.progress .bar.on { background: var(--ink); }
.progress .step { font-family: var(--head); font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.screen { display: none; }
.screen.active { display: block; animation: in .28s ease; }
h2 { font-family: var(--head); font-size: 28px; line-height: 1.12; letter-spacing: -.02em; font-weight: 700; margin: 0 0 8px; }
.intro { margin: 0 0 22px; color: var(--muted); font-size: 18px; }
.section-title { font-family: var(--head); font-size: 17px; font-weight: 600; margin: 26px 0 4px; }
label { display: block; font-family: var(--head); font-size: 15px; font-weight: 600; margin: 20px 0 8px; }
.req { color: var(--muted); font-weight: 400; }
.optional { color: var(--muted); font-weight: 400; font-family: var(--body); font-size: 15px; }
input, textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--soft); outline: none; font-size: 18px; transition: border-color .15s, background .15s; }
input:focus, textarea:focus { border-color: var(--ink); background: #fff; }
input::placeholder, textarea::placeholder { color: #9a9aa4; }
textarea { min-height: 110px; resize: vertical; }
.hint { color: var(--muted); font-size: 15px; margin: 6px 2px 0; }

/* Sugerencias rápidas debajo de un campo */
.sugg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sugg button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 16px; cursor: pointer; }
.sugg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Tipos de trabajo: fotos que se eligen */
.categories { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.cat { position: relative; overflow: hidden; min-height: 132px; border: 0; border-radius: 18px; padding: 14px; text-align: left; cursor: pointer; color: #fff; isolation: isolate;
  background: linear-gradient(180deg, rgba(26,26,34,.05) 20%, rgba(26,26,34,.85) 100%), var(--img) center/cover, var(--ink); display: flex; align-items: flex-end; transition: transform .15s, box-shadow .15s; }
.cat::after { content: ""; position: absolute; inset: 0; border-radius: 18px; box-shadow: inset 0 0 0 3px transparent; transition: box-shadow .15s; }
.cat strong { display: block; font-family: var(--head); font-size: 17px; font-weight: 700; line-height: 1.15; }
.cat small { display: block; font-size: 14px; opacity: .85; margin-top: 3px; }
.cat.active { transform: scale(.98); }
.cat.active::after { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px var(--ink); }
.categories.picked .cat:not(.active) { filter: grayscale(1) brightness(.85); opacity: .6; }
#workbox:not(:empty) { margin-top: 10px; animation: in .25s ease; }

/* Opciones */
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice button { min-height: 48px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; padding: 10px 16px; cursor: pointer; font-size: 17px; }
.choice button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Botonera fija abajo en celular */
.actions { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; gap: 10px; margin: 28px -24px 0; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.next, .back, .submit, .wa, .ig { min-height: 52px; border: 0; border-radius: 14px; padding: 12px 22px; font-family: var(--head); font-weight: 700; font-size: 16px; cursor: pointer; }
.next, .submit { background: var(--ink); color: #fff; flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
.actions .back { flex: none; display: flex; align-items: center; justify-content: center; }
.actions > span:empty { display: none; }
.next:disabled { background: #e3e4e8; color: #a3a3ad; cursor: not-allowed; }
.back { background: var(--soft); color: var(--ink); }
:focus-visible { outline: 3px solid #5b8def; outline-offset: 2px; }

/* Revisión */
.summary { background: var(--soft); border-radius: 18px; padding: 6px 18px; margin: 16px 0 6px; }
.summary div { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.summary div:last-child { border: 0; }
.summary b { display: block; font-family: var(--head); font-size: 13px; font-weight: 600; color: var(--muted); }
.final-note { color: var(--muted); font-size: 16px; margin-top: 16px; }

/* Confirmación */
.success { text-align: left; padding: 6px 0 8px; }
.success h2 { font-size: 30px; }
.success p { color: var(--muted); margin: 12px 0; }
.success p strong { color: var(--ink); }
.wa { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; background: var(--wa); color: #fff; margin-top: 18px; }
.wa-svg { display: inline-flex; width: 22px; height: 22px; }
.wa-svg svg { width: 22px; height: 22px; fill: currentColor; }
.gallery-wrap { margin: 28px -24px 0; overflow: hidden; }
.gallery { display: flex; gap: 8px; width: max-content; animation: marquee 60s linear infinite; }
.gallery img { width: 240px; height: 180px; object-fit: cover; border-radius: 12px; display: block; }
.ig-block { margin-top: 22px; }
.ig-link { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: var(--soft); color: var(--ink); text-decoration: none; }
.ig-link small { display: block; color: var(--muted); }
.ig-link strong { font-family: var(--head); }
.ig-icon { width: 26px; height: 26px; flex: none; }
.ig-arrow { margin-left: auto; font-size: 20px; }
.location { margin-top: 22px; }
.location h3 { font-family: var(--head); font-size: 18px; margin: 0 0 4px; }
.location p { margin: 0 0 10px; color: var(--muted); }
.map { border-radius: 16px; background: var(--soft); }
.map .pin { display: none; }
.map a { display: block; padding: 16px 18px; color: var(--ink); font-family: var(--head); font-weight: 600; text-decoration: none; }

.floating-wa { position: fixed; right: 12px; top: 10px; z-index: 20; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ink); border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 14px; box-shadow: 0 4px 18px rgba(26,26,34,.14); font-family: var(--head); font-size: 13px; font-weight: 600; cursor: pointer; }
.floating-wa .wa-svg { color: var(--wa); width: 18px; height: 18px; }
.floating-wa .wa-svg svg { width: 18px; height: 18px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; margin-right: 8px; vertical-align: -3px; }

@keyframes in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 700px) {
  main { padding-top: 28px; }
  .hero { border-radius: 26px 26px 0 0; height: 340px; }
  .content { border-radius: 26px; margin-bottom: 40px; }
  .actions { position: static; background: none; border: 0; padding: 0; margin: 30px 0 0; backdrop-filter: none; }
  .floating-wa { top: auto; bottom: 24px; }
}
@media (max-width: 380px) { .categories { grid-template-columns: 1fr; } .cat { min-height: 110px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.hero[style*="none"] ~ .content { margin-top: 0; border-radius: 0; }

.choice button { display: inline-flex; align-items: center; gap: 8px; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.choice button .ms { width: 20px; height: 20px; fill: currentColor; flex: none; opacity: .7; }
.choice button:active { transform: scale(.96); }
.choice button.active { animation: chpop .32s cubic-bezier(.3,1.5,.5,1); }
.choice button.active .ms { opacity: 1; animation: icspin .4s ease; }
.cat.active, .cat.on { animation: chpop .32s cubic-bezier(.3,1.5,.5,1); }
@keyframes chpop { 0% { transform: scale(.94); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes icspin { 0% { transform: scale(.3) rotate(-30deg); } 100% { transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .choice button, .choice button .ms { animation: none !important; transition: none; } }

.compact img { height: 28px; }
