/* VIVAS quote forms — shared styles for /office, /events and /wrap.
   Tokens from the VIVAS web canon (Empleos/app/css/styles.css).
   Layout: a photo of a real VIVAS project on the left, one question on the right. */

@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url('fonts/poppins-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url('fonts/poppins-500-latin.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url('fonts/poppins-600-latin.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url('fonts/poppins-700-latin.woff2') format('woff2'); }

:root {
  --navy: #00163c;
  --navy-2: #16356b;
  --navy-3: #2f63c4;
  --accent: #a6c5f2;
  --accent-hi: #bcd4f6;
  --navy-tint: #e9eef8;
  --navy-tint-2: #f3f6fc;
  --ink: #0f1b2d;
  --gray: #6b7686;
  --gray-soft: #97a1b1;
  --line: #e3e8f1;
  --bg: #f4f6fb;
  --ok: #1f9d55; --ok-tint: #e7f6ee;
  --warn: #e2231a; --warn-tint: #fdecea;
  --amber: #b9760a; --amber-tint: #fdf3e2;
  --grad-btn: linear-gradient(135deg, #2f63c4 0%, #16356b 55%, #00163c 100%);
  --radius: 22px; --radius-sm: 14px; --radius-pill: 999px;
  --shadow: 0 10px 30px rgba(16, 35, 80, .08);
  --shadow-lg: 0 30px 80px rgba(16, 35, 80, .16);
  --shadow-btn: 0 12px 28px rgba(22, 53, 107, .35);
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell: photo + panel ---------- */
.app { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px; max-width: 1240px; margin: 24px auto; padding: 12px; background: #fff; border-radius: 30px; box-shadow: var(--shadow-lg); min-height: min(820px, calc(100vh - 48px)); }
.visual { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy); min-height: 100%; }
.visual img.ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: phIn .6s ease both; }
@keyframes phIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,22,60,.55) 0%, rgba(0,22,60,0) 28%, rgba(0,22,60,0) 52%, rgba(0,17,47,.92) 100%); }
.visual .brand { position: absolute; z-index: 2; top: 26px; left: 28px; display: flex; align-items: center; gap: 12px; }
.visual .brand img { height: 22px; width: auto; display: block; }
.visual .brand span { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border-left: 1px solid rgba(166,197,242,.4); padding-left: 12px; }
.visual .cap { position: absolute; z-index: 2; left: 28px; right: 28px; bottom: 28px; color: #fff; }
.visual .cap small { display: block; font-size: 13px; color: var(--accent); font-weight: 500; margin-bottom: 6px; }
.visual .cap b { display: block; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; font-weight: 700; }
.visual .cap em { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-style: normal; font-size: 12.5px; color: rgba(255,255,255,.75); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); padding: 5px 12px; border-radius: var(--radius-pill); backdrop-filter: blur(6px); }
@media (prefers-reduced-motion: reduce) { .visual img.ph { animation: none; } }

.panel { display: flex; flex-direction: column; padding: 34px clamp(22px, 4vw, 56px) 28px; min-width: 0; }

/* ---------- tape-measure progress ---------- */
.tape-wrap { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.tape { position: relative; flex: 1; height: 22px; border-radius: 6px; background: var(--navy-tint-2); overflow: hidden; }
.tape-in { position: absolute; inset: 0 auto 0 0; min-width: 22px; background:
    repeating-linear-gradient(90deg, rgba(0,22,60,.55) 0 1.5px, transparent 1.5px 100%) 0 100% / 12px 7px no-repeat,
    repeating-linear-gradient(90deg, rgba(0,22,60,.55) 0 1.5px, transparent 1.5px 12px) 0 100% / 100% 6px repeat-x,
    repeating-linear-gradient(90deg, rgba(0,22,60,.7) 0 2px, transparent 2px 60px) 0 100% / 100% 11px repeat-x,
    linear-gradient(180deg, #bcd4f6, #a6c5f2);
  border-radius: 6px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.tape-in::after { content: ""; position: absolute; right: -2px; top: -3px; bottom: -3px; width: 8px; border-radius: 3px; background: var(--navy); box-shadow: 0 2px 6px rgba(0,22,60,.35); }
.tape-lbl { font-size: 13px; color: var(--gray); white-space: nowrap; min-width: 0; }
.tape-lbl b { color: var(--navy); font-weight: 600; }
.tape-lbl .stepn { color: var(--navy); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .tape-in { transition: none; } }

/* ---------- step ---------- */
.step { display: flex; flex-direction: column; flex: 1; }
.step-body { flex: 1; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-3); margin: 0 0 10px; }
.step h2 { margin: 0 0 24px; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; font-weight: 700; color: var(--navy); outline: none; letter-spacing: -.01em; }
.step h2 + .hint { margin-top: -16px; }
.step .hint { margin: 0 0 26px; color: var(--gray); font-size: 15.5px; max-width: 560px; }
.anim { animation: stIn .35s ease both; }
@keyframes stIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .anim { animation: none; } }

.field { margin: 0 0 22px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 600; font-size: 15px; margin: 0 0 10px; padding: 0; color: var(--ink); }
.field > label.choice { display: flex; margin: 0; font-weight: 400; font-size: 16px; }
.opt { font-weight: 400; color: var(--gray-soft); font-size: 13px; margin-left: 4px; }
.help { display: block; font-size: 13px; color: var(--gray); margin-top: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 16px; }
.sub-h { margin: 22px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-3); }
.step-body .sub-h:first-of-type { margin-top: 4px; }
.row3:has(#f-vYear) { grid-template-columns: 1fr 1.3fr 1.7fr; }

.inp { width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 14px 16px; min-height: 54px; outline: none; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.inp.big { font-size: 22px; font-weight: 500; min-height: 64px; border-width: 0 0 2px; border-radius: 0; padding: 10px 2px; background: transparent; }
.inp.big:focus { box-shadow: none; }
textarea.inp { min-height: 140px; resize: vertical; line-height: 1.5; }
.inp:focus { border-color: var(--navy-3); box-shadow: 0 0 0 4px rgba(47,99,196,.14); }
.inp::placeholder { color: var(--gray-soft); }
.bad .inp, .inp.bad { border-color: var(--warn); }
.bad > legend, .bad > label:not(.choice) { color: var(--warn); }

/* ---------- choices ---------- */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.choices.pics { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.choice { position: relative; display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; background: #fff; min-height: 58px; transition: border-color .15s, background .15s, transform .15s, box-shadow .15s; }
.choice:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .key { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--gray); background: #fff; }
.choice .box { flex: none; width: 22px; height: 22px; border: 1.5px solid var(--gray-soft); border-radius: 7px; display: grid; place-items: center; background: #fff; }
.choice.radio .box { border-radius: 50%; }
.choice .box::after { content: ""; width: 10px; height: 10px; border-radius: 3px; background: transparent; }
.choice.radio .box::after { border-radius: 50%; }
.choice input:checked ~ .box { border-color: var(--navy-3); }
.choice input:checked ~ .box::after { background: var(--navy-3); }
.choice input:checked ~ .key { background: var(--navy-3); border-color: var(--navy-3); color: #fff; }
.choice:has(input:checked) { border-color: var(--navy-3); background: var(--navy-tint-2); box-shadow: 0 0 0 3px rgba(47,99,196,.12); }
.choice input:focus-visible ~ .box, .choice input:focus-visible ~ .key { box-shadow: 0 0 0 4px rgba(47,99,196,.25); }
.choice .t { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.choice .t b { font-weight: 600; font-size: 15.5px; }
.choice .t small { color: var(--gray); font-size: 13px; margin-top: 2px; }

/* picture choice */
.choice.pic { flex-direction: column; align-items: stretch; padding: 8px; gap: 0; }
.choice.pic .img { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--navy-tint); }
.choice.pic .img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.choice.pic:hover .img img { transform: scale(1.05); }
.choice.pic .img .none { position: absolute; inset: 0; display: grid; place-items: center; color: var(--navy-3); font-size: 30px; font-weight: 300; }
.choice.pic .row { display: flex; align-items: center; gap: 10px; padding: 12px 6px 6px; }
.choice.pic .tick { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--navy-3); color: #fff; display: grid; place-items: center; font-size: 15px; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; box-shadow: 0 4px 12px rgba(0,22,60,.3); }
.choice.pic input:checked ~ .tick { opacity: 1; transform: none; }

/* ---------- pieces (sizes) ---------- */
.piece { display: grid; grid-template-columns: 1.6fr 1fr 1fr .9fr .7fr 44px; gap: 10px; align-items: end; margin-bottom: 12px; }
.piece label { font-size: 12.5px; color: var(--gray); display: block; margin-bottom: 5px; font-weight: 500; }
.piece .inp { min-height: 48px; padding: 10px 12px; }
.piece .del { width: 44px; height: 48px; border: 0; background: var(--navy-tint-2); border-radius: 12px; cursor: pointer; color: var(--gray); font-size: 20px; line-height: 1; }
.piece .del:hover { color: var(--warn); }
.linkbtn { border: 0; background: none; color: var(--navy-3); font-weight: 600; cursor: pointer; padding: 6px 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--gray-soft); font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- files ---------- */
.drop { border: 1.5px dashed var(--accent); border-radius: var(--radius); background: var(--navy-tint-2); padding: 26px 18px; text-align: center; transition: background .15s, border-color .15s; }
.drop.over { border-color: var(--navy-3); background: var(--navy-tint); }
.drop .ico { width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 14px; background: #fff; display: grid; place-items: center; color: var(--navy-3); box-shadow: var(--shadow); }
.drop p { margin: 0 0 10px; color: var(--gray); font-size: 14.5px; }
.files { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--navy-tint-2); font-size: 14px; min-width: 0; }
.files li .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files li .s { color: var(--gray); font-size: 12.5px; white-space: nowrap; }
.files li.err { background: var(--warn-tint); color: var(--warn); }
.files li.err .s, .files li.lost .s { color: inherit; }
.files li.lost { background: var(--amber-tint); color: var(--amber); }
.files li button { border: 0; background: none; color: var(--gray); cursor: pointer; font-size: 18px; line-height: 1; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--amber-tint); color: #6b4706; font-size: 13.5px; margin-top: 12px; }

/* ---------- errors ---------- */
.errbox { display: none; border-radius: var(--radius-sm); background: var(--warn-tint); color: #8d1610; padding: 14px 16px; margin: 0 0 20px; font-size: 14.5px; }
.errbox.on { display: block; }
.errbox b { display: block; margin-bottom: 4px; }
.errbox ul { margin: 0; padding-left: 18px; }
.errbox a { color: inherit; font-weight: 500; }
.ferr { color: var(--warn); font-size: 13px; margin-top: 8px; display: none; }
.bad .ferr { display: block; }

/* ---------- nav ---------- */
.nav { display: flex; gap: 12px; align-items: center; margin-top: 30px; }
.btn { text-decoration: none; white-space: nowrap; border: 0; border-radius: var(--radius-pill); padding: 14px 28px; min-height: 52px; font-weight: 600; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .15s, box-shadow .15s; }
.btn-primary { background: var(--grad-btn); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:disabled { opacity: .75; cursor: progress; transform: none; }
.btn-ghost { background: var(--navy-tint); color: var(--navy); box-shadow: none; }
.btn-back { background: none; color: var(--gray); padding: 14px 12px; }
.btn-back[hidden] { display: none; }
.enter { font-size: 12.5px; color: var(--gray-soft); }
.enter kbd { font: inherit; font-weight: 600; color: var(--gray); }
.nav .spacer { flex: 1; }
.spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- review ---------- */
.review { margin: 0; padding: 0; }
.review div { display: grid; grid-template-columns: 180px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.review dt { color: var(--gray); }
.review dd { margin: 0; white-space: pre-line; word-break: break-word; }
.review button { border: 0; background: none; color: var(--navy-3); font-weight: 600; cursor: pointer; font-size: 13.5px; align-self: start; }
.privacy { font-size: 13px; color: var(--gray); margin: 18px 0 0; }

/* ---------- done ---------- */
.done h2 { font-size: clamp(26px, 2.8vw, 36px); color: var(--navy); margin: 0 0 10px; outline: none; }
.done > p { color: var(--gray); margin: 0 0 26px; max-width: 520px; font-size: 16px; }
.done .ok { width: 60px; height: 60px; border-radius: 18px; background: var(--ok-tint); color: var(--ok); display: grid; place-items: center; margin-bottom: 22px; font-size: 30px; }
.next-steps { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.next-steps li { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: start; counter-increment: s; }
.next-steps li::before { content: counter(s); width: 38px; height: 38px; border-radius: 12px; background: var(--navy-tint-2); color: var(--navy-3); font-weight: 700; display: grid; place-items: center; }
.next-steps li:first-child::before { background: var(--navy-3); color: #fff; }
.next-steps b { display: block; font-weight: 600; color: var(--ink); }
.next-steps span { color: var(--gray); font-size: 14px; }
.done .links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.done .ref { display: inline-block; padding: 8px 14px; background: var(--navy-tint-2); border-radius: var(--radius-pill); font-weight: 600; color: var(--navy-2); font-size: 13.5px; }

.restore { display: none; align-items: center; gap: 10px; background: var(--navy-tint-2); color: var(--navy-2); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 18px; font-size: 14px; }
.restore.on { display: flex; }
.restore .linkbtn { margin-left: auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.foot { text-align: center; color: var(--gray); font-size: 13px; margin: 0 0 28px; padding: 0 16px; }

/* ---------- tablet & phone ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; align-content: start; margin: 0; padding: 0; border-radius: 0; box-shadow: none; min-height: 0; background: var(--bg); gap: 0; }
  .visual { min-height: 0; height: 210px; border-radius: 0 0 26px 26px; }
  .visual::after { background: linear-gradient(180deg, rgba(0,17,47,.82) 0%, rgba(0,22,60,.35) 38%, rgba(0,22,60,.35) 55%, rgba(0,17,47,.94) 100%); }
  .visual .cap { bottom: 18px; left: 18px; right: 18px; }
  .visual .cap b { font-size: 20px; }
  .visual .cap em { display: none; }
  .visual .brand { top: 18px; left: 18px; }
  .panel { min-height: calc(100vh - 210px); background: #fff; margin: -18px 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 20px 22px; position: relative; z-index: 3; }
  .tape-wrap { margin-bottom: 24px; }
  .enter { display: none; }
}
@media (max-width: 560px) {
  .row2, .row3 { grid-template-columns: 1fr; }
  .row3:has(input[type=time]) { grid-template-columns: 1fr 1fr; }
  .row3:has(input[type=time]) > :first-child { grid-column: 1 / -1; }
  .choices { grid-template-columns: 1fr; }
  .choices.pics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .choice.pic .row { padding: 10px 4px 4px; }
  .choice.pic .key { display: none; }
  .choice .t b { font-size: 15px; }
  .piece { grid-template-columns: 1fr 1fr; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); }
  .piece .p-name { grid-column: 1 / -1; }
  .piece .del { grid-column: 2; justify-self: end; }
  .review div { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .review dt { grid-column: 1 / -1; font-size: 12.5px; }
  .nav .btn-primary { flex: 1; }
  .tape-lbl .len { display: none; }
}

/* phones held sideways and other short screens: a thin photo strip */
@media (max-width: 900px) and (max-height: 520px) {
  .visual { height: 112px; }
  .visual .cap small { display: none; }
  .visual .cap b { font-size: 16px; }
  .visual .cap { bottom: 26px; }
  .panel { min-height: 0; }
}
/* tablets: two columns of photo choices read better than one */
@media (min-width: 561px) and (max-width: 900px) {
  .choices.pics { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
