/* Connectional — Traducción certificada: request sheets, stamp, document anatomy. Loads after site.css. */

:root { --paper: #ffffff; --paper-edge: #e6e1d9; --rule: #ece7df; --ink-print: #2a3157; }

/* ---------- Hero stack of request sheets ---------- */
.sheets-stage { position: relative; padding-top: 28px; padding-bottom: 56px; display: flex; justify-content: center; }
.sheets { position: relative; display: grid; width: min(100%, 440px); }
.sheet { grid-area: 1 / 1; position: relative; background: var(--paper); color: var(--ink); border-radius: 6px; box-shadow: 0 1px 0 var(--paper-edge), 0 2px 4px rgba(0,0,0,.16), 0 30px 60px -22px rgba(0,0,0,.6);
  transition: transform 640ms var(--ease-out), opacity 420ms ease, box-shadow 640ms var(--ease-out); transform-origin: 30% 100%; }
.sheet--1 { z-index: 2; transform: rotate(-1.2deg); }
.sheet--2 { z-index: 1; transform: rotate(2.6deg) translate(14px, 14px); }
.sheet--2 > * { opacity: .0; transition: opacity 300ms ease 200ms; }
.sheets.is-2 .sheet--1 { transform: translate(-22%, -4%) rotate(-9deg); opacity: 0; pointer-events: none; }
.sheets.is-2 .sheet--2 { z-index: 3; transform: rotate(-1.2deg); }
.sheets.is-2 .sheet--2 > * { opacity: 1; }
.sheet-head { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; padding: 20px 24px 14px; border-bottom: 1px solid var(--rule); }
.sheet-head .logo { height: 24px; grid-column: 1; }
.sheet-folio { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
.sheet-folio small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-muted); }
.sheet-folio b { display: block; margin-top: 2px; font-size: 15px; font-weight: 800; color: var(--rojo); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.sheet-title { grid-column: 1; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-print); }
.sheet-rule { height: 2px; background: var(--gradient-rule); }
.sheet-body { padding: 18px 24px 22px; display: grid; gap: 13px; }
.sheet-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.sheet-sec h2, .sheet-sec h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--azul); }
.sheet-sec h2 span, .sheet-sec h3 span { color: var(--rojo); margin-right: 6px; font-variant-numeric: tabular-nums; }
.sheet-sec small { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.sheet-summary { font-size: 13px; line-height: 1.45; color: var(--ink-muted); }
.sheet-summary b { color: var(--ink); font-weight: 600; }
.sheet-foot { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; padding-top: 4px; }
.sign-line { border-top: 1px solid #b9b3a9; padding-top: 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.sheet .back-link { justify-self: start; }

/* Drop zone */
.drop { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 14px 16px; border: 1.5px dashed #9c968c; border-radius: var(--radius-sm); background: #faf8f5; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out); }
.drop:hover { border-color: var(--azul); background: #f4f5fb; }
.drop.is-over { border-color: var(--azul); background: var(--azul-soft); transform: scale(1.01); }
.drop.has-file { border-style: solid; border-color: var(--azul); background: #f4f5fb; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--azul-soft); color: var(--azul); }
.drop .ic svg { width: 20px; height: 20px; }
.drop b { display: block; font-size: 14px; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.drop span { display: block; font-size: 12.5px; color: var(--ink-muted); }

/* Stamp */
.stamp-wrap { position: absolute; right: 22px; bottom: 74px; width: 150px; height: 150px; pointer-events: none; z-index: 4; opacity: 0; }
.stamp-wrap svg { width: 100%; height: 100%; overflow: visible; }
.stamp-ink { fill: none; stroke: var(--rojo); }
.stamp-text { fill: var(--rojo); font: 800 11.5px var(--font-sans); letter-spacing: .14em; }
.stamp-center { fill: var(--rojo); font: 900 15px var(--font-sans); letter-spacing: .02em; }
.stamp-sub { fill: var(--rojo); font: 700 9px var(--font-sans); letter-spacing: .16em; }
.sheets.is-done .stamp-wrap { animation: stamp 520ms var(--ease-out) forwards; }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.7) rotate(-2deg); filter: blur(6px); } 55% { opacity: .95; transform: scale(.94) rotate(-11deg); filter: blur(0); } 100% { opacity: .9; transform: scale(1) rotate(-10deg); filter: blur(0); } }
.sheets.is-done .sheet--2 { animation: thud 260ms 220ms ease-out; }
@keyframes thud { 40% { transform: rotate(-1.2deg) translateY(3px) scale(.995); } }
.done-msg { display: none; padding: 4px 0 0; }
.sheets.is-done .done-msg { display: block; }
.sheets.is-done .form-2 { display: none; }
.done-msg h3 { font-size: 22px; font-weight: 900; letter-spacing: -.01em; color: var(--azul); }
.done-msg p { margin-top: 8px; font-size: 15px; color: var(--ink-muted); max-width: 30ch; }
.done-msg .btn { margin-top: 18px; }

/* ---------- Anatomy of a certified translation ---------- */
.anatomy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.doc { position: relative; max-width: 520px; padding: 34px 36px 30px; background: var(--paper); border-radius: 4px; box-shadow: 0 1px 0 var(--paper-edge), 0 2px 6px rgba(16,23,63,.08), 0 30px 60px -30px rgba(16,23,63,.35); color: var(--ink-print); font-size: 12.5px; line-height: 1.6; }
.doc::before { content: ""; position: absolute; inset: 10px -10px -10px 10px; z-index: -1; background: #f7f5f1; border-radius: 4px; box-shadow: 0 2px 6px rgba(16,23,63,.06); transform: rotate(2deg); }
.doc-k { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #676c84; }
.doc h3 { margin: 18px 0 12px; text-align: center; font-size: 14px; font-weight: 800; letter-spacing: .16em; color: var(--ink-print); }
.doc p + p { margin-top: 8px; }
.doc .bars { display: grid; gap: 7px; margin: 14px 0 16px; }
.doc .bars i { display: block; height: 7px; border-radius: 4px; background: #e9e6ee; }
.doc .legend { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 6px; background: #fbfaf8; font-style: italic; }
.doc-sign { display: grid; grid-template-columns: 1fr 120px; gap: 20px; align-items: end; margin-top: 18px; }
.doc-sign svg.sig { width: 100%; height: 48px; }
.doc-sign .sig path { fill: none; stroke: var(--azul); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.doc-sign .line { margin-top: 2px; border-top: 1px solid #b9b3a9; padding-top: 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #676c84; }
.doc-seal { width: 120px; height: 120px; transform: rotate(-12deg); opacity: .88; }
.pin { position: absolute; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--rojo); color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 0 0 4px #fff, 0 4px 10px -2px rgba(0,0,0,.25); }
.doc-note { margin-top: 14px; font-size: 13px; color: var(--ink-muted); }
.callouts { margin: 28px 0 0; padding: 0; list-style: none; counter-reset: c; }
.callouts li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.callouts li:last-child { border-bottom: 1px solid var(--line); }
.callouts .n { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--rojo); color: #fff; font-size: 13px; font-weight: 800; }
.callouts b { display: block; font-size: 17px; color: var(--azul); }
.callouts span { display: block; margin-top: 2px; font-size: 15px; color: var(--ink-muted); }
@media (max-width: 960px) { .anatomy { grid-template-columns: 1fr; } .doc { margin-inline: auto; } }

/* ---------- Documents by area ---------- */
.areas { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.area { padding: 30px 28px 32px 0; }
.area + .area { padding-left: 28px; border-left: 1px solid var(--line); }
.area .ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--azul-soft); color: var(--azul); }
.area .ic svg { width: 22px; height: 22px; }
.area h3 { margin-top: 0; font-size: 21px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; color: var(--azul); }
.area ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.area li { position: relative; padding-left: 18px; font-size: 15px; color: var(--ink); }
.area li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 2px; background: var(--rojo); }
.area .for { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-muted); }
.area .for b { color: var(--ink); font-weight: 700; }
@media (max-width: 1080px) { .areas { grid-template-columns: 1fr 1fr; } .area:nth-child(3) { padding-left: 0; border-left: 0; } .area:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 640px) { .areas { grid-template-columns: 1fr; } .area, .area + .area { padding: 26px 0; border-left: 0; } .area + .area { border-top: 1px solid var(--line); } }

/* ---------- Validity + delivery band ---------- */
.valid { background: var(--azul-deep); color: #fff; }
.valid .h2 { color: #fff; }
.valid .h2 em { color: var(--rosa); }
.valid .lead { color: var(--on-deep-muted); }
.valid-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.auth { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.auth li { padding: 10px 16px; border-radius: var(--radius-full); border: 1px solid rgba(255,255,255,.22); font-weight: 600; font-size: 15px; }
.deliver { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; border-top: 2px solid rgba(255,255,255,.7); }
.deliver li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.deliver .ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.08); color: var(--rosa); }
.deliver .ic svg { width: 24px; height: 24px; }
.deliver b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.deliver span { display: block; margin-top: 4px; color: var(--on-deep-muted); font-size: 15px; }
.valid .tab { background: rgba(255,255,255,.12); }
@media (max-width: 860px) { .valid-grid { grid-template-columns: 1fr; } }

@media (max-width: 1020px) { .sheets-stage { padding-top: 8px; } }
@media (max-width: 560px) { .sheet-head, .sheet-body { padding-left: 18px; padding-right: 18px; } .stamp-wrap { right: 10px; width: 128px; height: 128px; } }
@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet--2 > * { transition: opacity 200ms ease; }
  .sheets.is-2 .sheet--1 { transform: none; }
  .sheets.is-done .stamp-wrap { animation: none; opacity: .9; transform: rotate(-10deg); }
  .sheets.is-done .sheet--2 { animation: none; }
}

.sheet-note { display: flex; gap: 8px; align-items: flex-start; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-muted); }
.sheet-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--azul); }
.sheet { display: flex; flex-direction: column; }
.sheet-body { flex: 1; }
.form-2 { display: grid; gap: 13px; }
.done-msg:focus { outline: none; }
.done-msg { min-height: 230px; padding-top: 8px; }
.done-msg p { max-width: 21ch; }
.stamp-wrap { bottom: 56px; right: 26px; }
@media (max-width: 560px) { .sheet--2 { transform: rotate(2deg) translate(6px, 10px); } .doc { padding: 26px 22px 24px; } .doc::before { inset: 8px 4px -8px 8px; } }
@media (max-width: 960px) { .anatomy > div:first-child { order: 2; } }

/* ---------- Print-form treatment inside the sheets (fix round 1) ---------- */
.sheet .fld > span, .sheet .fld legend, .sheet #lbl-idiomas { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.sheet .ctl { min-height: 44px; padding: 8px 2px 6px; border: 0; border-bottom: 1.5px solid var(--line-control); border-radius: 0; background-color: transparent; font-size: 16px; }
.sheet select.ctl { background-position: right 2px center; padding-right: 28px; }
.sheet .ctl:hover { border-bottom-color: var(--azul); }
.sheet .ctl:focus { box-shadow: 0 1.5px 0 var(--azul); border-bottom-color: var(--azul); }
.sheet .ctl:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; border-radius: 2px; }
.sheet .ctl.is-invalid { border-bottom-color: var(--rojo); }
.sheet .seg { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 0; background: none; border-radius: 0; }
.sheet .seg label { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.sheet .seg input { position: static; opacity: 1; pointer-events: auto; appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; flex: none; border: 1.5px solid var(--line-control); border-radius: 3px; background: #fff center / 14px no-repeat; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease; }
.sheet .seg input:checked { border-color: var(--azul); background-color: var(--azul); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.sheet .seg input:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.sheet .seg span { display: inline; min-height: 0; padding: 0; background: none !important; box-shadow: none !important; border-radius: 0; font-size: 15px; font-weight: 600; color: var(--ink) !important; }
.sheet .drop { grid-template-columns: 36px 1fr; margin-top: 10px; border: 1.5px solid var(--line-control); border-radius: 2px; background: #fff; }
.sheet .drop::before { content: "Anexo"; position: absolute; left: 10px; top: -10px; padding: 0 6px; background: var(--paper); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rojo); }
.sheet .drop:hover, .sheet .drop.is-over, .sheet .drop.has-file { border-style: solid; border-color: var(--azul); background: #f4f5fb; }
.sheet .drop .ic { width: 36px; height: 36px; border-radius: 4px; }
.sheet .pair-row .swap { width: 32px; height: 32px; }

/* Printed request on stamp (done state) */
.printed { display: none; margin: 14px 0 0; padding: 0; }
.sheets.is-done .printed { display: block; }
.printed div { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px; align-items: end; padding: 9px 0 5px; border-bottom: 1px solid #b9b3a9; }
.printed dt { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.printed dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-print); overflow-wrap: anywhere; }
.done-msg { min-height: 0; }
.sheets.is-done .stamp-wrap { right: 18px; bottom: 60px; }

/* Anatomy header + annexed original */
.doc-k { gap: 16px; }
.doc-k span:last-child { white-space: nowrap; }
.annex { position: absolute; top: -34px; right: -22px; width: 58%; height: 120px; z-index: -1; padding: 14px 16px; background: #fff; border-radius: 4px; box-shadow: 0 1px 0 var(--paper-edge), 0 6px 18px -6px rgba(16,23,63,.25); transform: rotate(4deg); }
.annex span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--ink-print); }
.annex i { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: #e9e6ee; }
.annex i + i { width: 70%; }
@media (max-width: 560px) { .doc-k { flex-direction: column; gap: 2px; } .annex { right: -6px; width: 62%; } }
.stamp-wrap { mix-blend-mode: multiply; }
.doc-k .nw { white-space: nowrap; }
.pin--annex { right: -30px; top: -44px; }
.printed div { align-items: start; }
.printed dt { padding-top: 3px; }
@media (max-width: 560px) { .annex { top: -30px; right: 6px; width: 56%; } .pin--annex { right: 2px; top: -42px; } }

/* The stamp stays hidden until the request is sent (the step-2 reveal must not show it). */
.sheets .sheet--2 > .stamp-wrap { opacity: 0; transition: none; }
