/* ─────────────────────────────────────────────────────────────
   BECLECTIC PROJECT STUDIO (assets/project-studio.js)
   Usa los tokens del sitio público (site.css): --bg, --lime, --line…
   ───────────────────────────────────────────────────────────── */
.ps { position: relative; padding: 96px 0 88px; background: var(--bg); border-top: 1px solid var(--line); scroll-margin-top: var(--head); }
.ps .s-wrap { display: flex; flex-direction: column; gap: 40px; }
.ps-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px 56px; align-items: end; }
.ps-motto { font-size: 12px; letter-spacing: .24em; color: var(--mu); margin: 0 0 18px; }
.ps-title { font-size: clamp(46px, 9vw, 112px); }
.ps-title em { font-style: normal; color: var(--lime); }

/* IDEA → SOLUTION → IMPACT */
.ps-flow { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ps-flow svg { width: 100%; height: auto; overflow: visible; }
.ps-flow-line { stroke: var(--line2); stroke-width: 1.5; fill: none; }
.ps-flow-run { stroke: var(--lime); stroke-width: 2; fill: none; stroke-dasharray: 40 380; animation: ps-run 3.2s linear infinite; }
@keyframes ps-run { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
.ps-node circle, .ps-node rect { fill: var(--s1); stroke: var(--line2); stroke-width: 1.5; }
.ps-node .ps-dot { fill: var(--tx); stroke: none; }
.ps-node .ps-cross { stroke: var(--tx); stroke-width: 1.6; }
.ps-node.is-lime > circle:first-child { fill: var(--lime); stroke: var(--lime); }
.ps-node.is-lime .ps-ring { fill: none; stroke: var(--lime-ink); stroke-width: 1.4; }
.ps-flow figcaption { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .2em; color: var(--mu); padding: 0 2%; }
.ps-flow figcaption span:last-child { color: var(--lime); }

/* contenedor del configurador */
.ps-shell { border: 1px solid var(--line2); border-radius: 6px; background: var(--s1); padding: clamp(18px, 3vw, 36px); display: flex; flex-direction: column; gap: 22px; }
.ps-progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ps-progress button { width: 100%; display: flex; align-items: baseline; gap: 10px; background: none; border: 0; border-top: 2px solid var(--line2); padding: 12px 0 0; color: var(--mu); font: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.ps-progress button:disabled { cursor: default; opacity: .55; }
.ps-progress b { font-weight: 600; font-size: 14.5px; }
.ps-progress span { font-size: 11px; }
.ps-progress .is-done button { color: var(--tx); border-top-color: var(--tx); }
.ps-progress .is-on button { color: var(--lime); border-top-color: var(--lime); }
.ps-bar { height: 2px; background: var(--line); display: none; }
.ps-bar i { display: block; height: 100%; background: var(--lime); transition: width .4s ease; }

.ps-form { display: flex; flex-direction: column; gap: 22px; }
.ps-step { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; animation: ps-in .35s ease both; }
@keyframes ps-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ps-q { padding: 0; font-family: var(--display); font-weight: 760; font-stretch: 78%; font-size: clamp(26px, 4vw, 38px); line-height: 1.05; letter-spacing: -.01em; outline: none; }
.ps-q .mono { font-size: .45em; color: var(--lime); vertical-align: middle; margin-right: 6px; letter-spacing: .1em; }
.ps-q small { display: block; font-family: inherit; font-size: 15px; font-weight: 400; font-stretch: 100%; color: var(--mu); margin-top: 6px; letter-spacing: 0; }

/* tarjetas de servicio */
.ps-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ps-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg); cursor: pointer; transition: border-color .25s ease, background .25s ease, transform .25s ease; }
.ps-card:hover { border-color: var(--tx); }
.ps-card input, .ps-goal input, .ps-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ps-card-top { display: flex; align-items: center; gap: 12px; }
.ps-card-n { font-size: 12px; color: var(--mu); }
.ps-card-ic { color: var(--tx); display: inline-flex; margin-left: auto; transition: color .25s ease, transform .3s ease; }
.ps-tick { width: 26px; height: 26px; border: 1px solid var(--line2); border-radius: 50%; display: grid; place-items: center; color: transparent; transition: all .25s ease; }
.ps-card strong { font-family: var(--display); font-weight: 760; font-stretch: 80%; font-size: 26px; line-height: 1; text-transform: uppercase; }
.ps-card-d { color: var(--mu); font-size: 14.5px; line-height: 1.45; }
.ps-card-l { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.ps-card-l span { font-size: 12px; color: var(--mu); border: 1px solid var(--line); border-radius: 2px; padding: 3px 7px; }
.ps-card:has(input:checked) { border-color: var(--lime); background: rgba(210, 255, 60, .06); }
.ps-card:has(input:checked) .ps-tick { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); animation: ps-pop .35s ease; }
.ps-card:has(input:checked) .ps-card-ic { color: var(--lime); transform: rotate(-6deg) scale(1.06); }
.ps-card:has(input:checked) .ps-card-n { color: var(--lime); }
.ps-card:has(input:focus-visible), .ps-goal:has(input:focus-visible) span, .ps-chip:has(input:focus-visible) span { outline: 2px solid var(--lime); outline-offset: 3px; }
@keyframes ps-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.ps-unsure { border-style: dashed; }

/* objetivos */
.ps-goals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ps-goal { position: relative; cursor: pointer; }
.ps-goal span { display: flex; flex-direction: column; justify-content: space-between; gap: 26px; min-height: 150px; padding: 20px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg); transition: all .25s ease; }
.ps-goal b { font-family: var(--display); font-weight: 760; font-stretch: 80%; font-size: 24px; line-height: 1.02; text-transform: uppercase; }
.ps-goal:hover span { border-color: var(--tx); }
.ps-goal:has(input:checked) span { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); transform: translateY(-2px); }

/* campos */
.ps-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ps-field label, .ps-lbl { font-weight: 600; font-size: 14.5px; }
.ps-field label em, .ps-lbl em { color: var(--lime); font-style: normal; }
.ps-field small, .ps-lbl small { color: var(--mu); font-weight: 400; }
.ps-field input, .ps-field textarea { width: 100%; background: var(--bg); color: var(--tx); border: 1px solid var(--line2); border-radius: 4px; padding: 13px 14px; font: 16px/1.5 inherit; font-family: inherit; transition: border-color .2s ease; }
.ps-field textarea { resize: vertical; min-height: 150px; }
.ps-field input:focus, .ps-field textarea:focus { outline: none; border-color: var(--lime); }
.ps-field.is-bad input, .ps-field.is-bad textarea { border-color: #ff8a65; }
.ps-field.is-ok input, .ps-field.is-ok textarea { border-color: rgba(210, 255, 60, .55); }
.ps-help { font-size: 12.5px; color: var(--mu); }
.ps-err { margin: 0; color: #ff9f80; font-size: 13.5px; min-height: 0; }
.ps-err:empty { display: none; }
.ps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.ps-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* arrastrar y soltar */
.ps-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 30px 18px; border: 1px dashed var(--line2); border-radius: 4px; background: var(--bg); color: var(--mu); cursor: pointer; transition: all .2s ease; }
.ps-drop b { color: var(--tx); font-weight: 600; }
.ps-drop u { color: var(--lime); text-underline-offset: 3px; }
.ps-drop span { font-size: 13px; }
.ps-drop:hover, .ps-drop.is-over { border-color: var(--lime); color: var(--lime); background: rgba(210, 255, 60, .05); }
.ps-drop:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.ps-files { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.ps-files:empty { display: none; }
.ps-files li { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg); min-width: 0; animation: ps-in .25s ease both; }
.ps-files img, .ps-ext { width: 44px; height: 44px; object-fit: cover; border-radius: 2px; flex: 0 0 auto; background: var(--s2); display: grid; place-items: center; font-size: 10.5px; color: var(--lime); }
.ps-fn { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ps-fn b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-fn small { font-size: 11px; color: var(--mu); }
.ps-files .is-ok small { color: var(--lime); }
.ps-files .is-err { border-color: #ff8a65; }
.ps-files button { width: 40px; height: 40px; flex: 0 0 auto; border: 0; background: none; color: var(--mu); cursor: pointer; border-radius: 4px; display: grid; place-items: center; }
.ps-files button:hover { color: var(--tx); background: var(--s2); }

/* presupuesto */
.ps-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-chip { position: relative; cursor: pointer; }
.ps-chip span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 2px; font-size: 14px; transition: all .2s ease; }
.ps-chip:hover span { border-color: var(--tx); }
.ps-chip:has(input:checked) span { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); font-weight: 600; }

/* resumen */
.ps-summary { border: 1px solid var(--line2); border-radius: 4px; padding: 18px 20px; background: var(--bg); }
.ps-summary h4 { margin: 0 0 10px; font-size: 11.5px; letter-spacing: .2em; color: var(--lime); font-weight: 600; }
.ps-summary dl { margin: 0; display: flex; flex-direction: column; }
.ps-summary dl > div { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.ps-summary dt { font-size: 11px; letter-spacing: .14em; color: var(--mu); }
.ps-summary dd { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.ps-mu { color: var(--mu); }
.ps-edit { background: none; border: 0; color: var(--lime); font: 600 13px inherit; font-family: inherit; cursor: pointer; padding: 6px 4px; min-height: 32px; }

/* navegación y estado */
.ps-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; border-top: 1px solid var(--line); padding-top: 20px; }
.ps-back { margin-right: auto; }
.ps-send { text-transform: uppercase; letter-spacing: .04em; }
.ps-send[aria-busy="true"] { opacity: .7; cursor: progress; }
.ps-status { margin: 0; text-align: right; font-size: 14px; color: var(--mu); }
.ps-status:empty { display: none; }
.ps-status.is-bad { color: #ff9f80; }

/* confirmación */
.ps-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: clamp(28px, 6vw, 64px) 12px; outline: none; animation: ps-in .4s ease both; }
.ps-done-ic { width: 82px; height: 82px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); display: grid; place-items: center; animation: ps-pop .5s ease; margin-bottom: 8px; }
.ps-done h3 { font-size: clamp(38px, 7vw, 76px); }
.ps-done-lead { font-size: 20px; color: var(--lime); margin: 0; }
.ps-done p { margin: 0; color: var(--mu); }
.ps-done-id { font-size: 12px; letter-spacing: .14em; margin: 10px 0 14px !important; }

/* hablemos */
.ps-talk { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 40px; border-top: 1px solid var(--line); padding-top: 36px; }
.ps-talk h3 { font-size: clamp(34px, 6vw, 64px); }
.ps-talk-a { display: flex; flex-wrap: wrap; gap: 10px; }

.ps-i { flex: 0 0 auto; }

/* página /studio sola */
.ps-page .ps { border-top: 0; padding-top: calc(var(--head) + 48px); }

@media (max-width: 1080px) {
  .ps-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ps { padding: 64px 0; }
  .ps-hero { grid-template-columns: minmax(0, 1fr); }
  .ps-cards, .ps-grid { grid-template-columns: minmax(0, 1fr); }
  .ps-goal span { min-height: 112px; gap: 16px; }
  .ps-goal b { font-size: 20px; }
  .ps-progress b { display: none; }
  .ps-progress .is-on b { display: inline; }
  .ps-summary dl > div { grid-template-columns: minmax(0, 1fr) auto; }
  .ps-summary dt { grid-column: 1 / -1; }
  .ps-nav .s-btn { flex: 1 1 auto; }
  .ps-back { margin-right: 0; }
  .ps-status { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-flow-run, .ps-step, .ps-files li, .ps-done, .ps-done-ic { animation: none; }
  .ps-card, .ps-goal span, .ps-card-ic { transition: none; }
}
.ps-q { margin-bottom: 4px; }

/* vista previa de la propuesta (paso 4) */
.ps-preview { border: 1px solid var(--lime); border-radius: 4px; background: var(--bg); padding: clamp(16px, 2.6vw, 26px); display: flex; flex-direction: column; gap: 18px; }
.ps-preview-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px 24px; }
.ps-preview-k { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .2em; color: var(--lime); }
.ps-preview-head h4 { margin: 0; font-family: var(--display); font-weight: 760; font-stretch: 80%; font-size: 28px; line-height: 1; text-transform: uppercase; }
.ps-preview-head p:not(.ps-preview-k) { margin: 6px 0 0; color: var(--mu); font-size: 14px; max-width: 52ch; }
.ps-preview-a { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-proto { border-radius: 4px; overflow: hidden; border: 1px solid var(--line2); background: #0a0b06; }
.ps-proto iframe { display: block; width: 100%; height: min(78vh, 720px); min-height: 520px; border: 0; }
@media (max-width: 760px) {
  .ps-preview-a .s-btn { flex: 1 1 auto; }
}

/* opt-in de WhatsApp (paso 4) */
.ps-optin { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg); cursor: pointer; transition: border-color .2s ease; }
.ps-optin input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ps-optin-box { flex: 0 0 auto; width: 24px; height: 24px; border: 1.5px solid var(--line2); border-radius: 3px; display: grid; place-items: center; color: transparent; margin-top: 1px; transition: all .2s ease; }
.ps-optin b { display: block; font-weight: 600; }
.ps-optin small { color: var(--mu); font-size: 13px; }
.ps-optin:has(input:checked) { border-color: var(--lime); }
.ps-optin:has(input:checked) .ps-optin-box { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.ps-optin:has(input:focus-visible) { outline: 2px solid var(--lime); outline-offset: 3px; }
.ps-done-wa { color: var(--lime) !important; font-weight: 600; }
.ps-done-wa:empty { display: none; }
