/* ==========================================================================
   SetupFinder · portada (taste-skill)
   Solo lo que el kit no trae: la mesa de la portada, el ejemplo del recomendador
   dentro de su ventana, las siluetas y las fotos de producto en los paneles.
   ========================================================================== */

/* ---------- La mesa (portada, sobre el fondo oscuro) ---------- */
.hero {
  --key-top: #262626; --key-bot: #1d1d1d; --key-edge: #000;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
.hero-visual { display: flex; flex-direction: column; gap: var(--s-4); }
.desk {
  position: relative; aspect-ratio: 16 / 11; width: 100%; container-type: inline-size;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background:
    radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1.3px) 0 0 / 16px 16px,
    linear-gradient(180deg, #121212, var(--bg) 60%);
}
.desk-bg { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.desk-lamp { position: absolute; inset: 0; background: radial-gradient(48% 52% at 50% -6%, rgba(84, 190, 125, .22), transparent 72%); }
.desk-surface {
  position: absolute; left: 0; right: 0; bottom: 0; height: 36%;
  background: linear-gradient(180deg, #232323, #1a1a1a 40%, #121212);
  border-top: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 -1px 0 rgba(84,190,125,.2), 0 -30px 60px -30px rgba(84,190,125,.22);
}
.desk-item {
  --x: 50%; --w: 20%; --b: 36%;
  position: absolute; left: var(--x); bottom: var(--b); width: var(--w); transform: translateX(-50%);
  display: grid; justify-items: center; color: inherit; outline-offset: 6px;
  transition: opacity .45s var(--ease), filter .45s var(--ease), transform .45s var(--ease);
}
.desk-shot { position: relative; display: block; width: 100%; }
.desk-shot .photo { display: block; width: 100%; height: auto; margin-inline: auto; filter: drop-shadow(0 14px 16px rgba(0,0,0,.6)); }
.desk-item--monitor .photo { width: auto; max-width: 100%; max-height: 37cqw; }
.desk-item--headphones .photo { width: auto; max-width: 100%; max-height: 23cqw; }
.desk-item--microphone .photo { width: auto; max-width: 100%; max-height: 22cqw; }
.desk-shot .ill { display: block; width: 100%; aspect-ratio: 4 / 3; }
.desk-shot .ill svg { width: 100%; height: 100%; }
.desk-item--monitor { --x: 50%; --w: 54%; --b: 35%; z-index: 1; }
.desk-item--headphones { --x: 12%; --w: 20%; --b: 34%; z-index: 2; }
.desk-item--microphone { --x: 88%; --w: 17%; --b: 34%; z-index: 2; }
.desk-item--monitor .desk-shot::after, .desk-item--headphones .desk-shot::after, .desk-item--microphone .desk-shot::after {
  content: ""; position: absolute; left: 20%; right: 20%; bottom: -6px; height: 3px; border-radius: 99px; background: var(--tone);
  box-shadow: 0 -6px 22px 2px color-mix(in srgb, var(--tone) 60%, transparent); transition: opacity .45s var(--ease);
}
.desk-item--mousepad, .desk-item--keyboard, .desk-item--mouse { perspective: 520px; }
.desk-item--mousepad .desk-shot { transform: rotateX(58deg); transform-origin: 50% 100%; }
.desk-item--keyboard .desk-shot { transform: rotateX(12deg); transform-origin: 50% 100%; }
.desk-item--mouse .desk-shot { transform: rotateX(26deg); transform-origin: 50% 100%; }
.desk-item--mousepad .desk-shot .photo, .desk-item--keyboard .desk-shot .photo, .desk-item--mouse .desk-shot .photo { filter: drop-shadow(0 6px 8px rgba(0,0,0,.6)); }
.desk-item--mousepad { --x: 68%; --w: 44%; --b: 3%; z-index: 3; }
.desk-item--keyboard { --x: 38%; --w: 50%; --b: 9%; z-index: 4; }
.desk-item--mouse { --x: 79%; --w: 6%; --b: 9%; z-index: 5; }
.desk-item--mousepad .desk-shot::before, .desk-item--keyboard .desk-shot::before, .desk-item--mouse .desk-shot::before {
  content: ""; position: absolute; inset: 6% 4%; border-radius: 12px; background: var(--tone); filter: blur(22px); opacity: .42; transition: opacity .45s var(--ease);
}
.desk-item:hover, .desk-item:focus-visible { z-index: 20; transform: translateX(-50%) translateY(-4px); }
.desk-item--mousepad:hover, .desk-item--mousepad:focus-visible { z-index: 4; }
.desk-item.is-off { opacity: .1; filter: grayscale(1); pointer-events: none; transform: translateX(-50%) translateY(10px); }
.desk-item.is-off .desk-shot::after, .desk-item.is-off .desk-shot::before { opacity: 0; }
.desk-tag {
  position: absolute; bottom: calc(100% + 10px); left: 50%; z-index: 9; display: grid; gap: 1px; width: max-content; max-width: 220px;
  padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-strong);
  font-size: var(--t-small); line-height: 1.35; text-align: center; opacity: 0; pointer-events: none;
  transform: translate(-50%, 4px); transition: opacity .15s, transform .15s var(--ease);
}
.desk-tag strong { font-weight: 500; }
.desk-tag span { font-variant-numeric: tabular-nums; color: var(--tone); }
.desk-item:hover .desk-tag, .desk-item:focus-visible .desk-tag { opacity: 1; transform: translate(-50%, 0); }
.desk-item--mousepad .desk-tag, .desk-item--keyboard .desk-tag, .desk-item--mouse .desk-tag { bottom: 60%; }

/* Las teclas que ponen y quitan piezas */
.desk-keys { border: 0; margin: 0; padding: 0; min-width: 0; }
.desk-keys-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3) var(--s-2); }
.opt { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* La casilla cubre su tecla: transparente, pero es ella la que recibe el foco y lo enseña */
.opt input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; border: 0; border-radius: var(--r-sm); cursor: pointer; }
.opt input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.key {
  --tone: var(--accent);
  position: relative; display: flex; align-items: center; min-height: 44px; padding: 10px 22px 12px 12px;
  border-radius: var(--r-sm); color: var(--ink);
  background: linear-gradient(180deg, var(--key-top), var(--key-bot));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 0 var(--key-edge);
  transition: transform .13s var(--ease), box-shadow .13s var(--ease), border-color .2s, background .2s;
}
.opt:hover .key { border-color: rgba(255,255,255,.2); }
.opt:active .key { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 1px 0 var(--key-edge); }
.opt input:checked + .key {
  transform: translateY(3px);
  border-color: color-mix(in srgb, var(--tone) 55%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 17%, var(--key-top)), color-mix(in srgb, var(--tone) 8%, var(--key-bot)));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 1px 0 var(--key-edge);
}
.key-label { font-size: var(--t-small); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.led { position: absolute; top: 50%; right: 9px; width: 7px; height: 7px; border-radius: 50%; transform: translateY(-50%); background: #3a3a3a; transition: background .2s, box-shadow .2s; }
.opt input:checked + .key .led { background: var(--tone); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 25%, transparent), 0 0 10px var(--tone); }
.desk-total { margin: 0; min-height: 1.6em; color: var(--muted); font-size: var(--t-small); }
.desk-total strong { color: var(--ink); font-family: var(--font-display); font-size: 24px; font-weight: 400; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* Apilada (tableta): la mesa toma el alto que queda y su ancho sale de la proporción */
@media (max-width: 1023px) {
  .hero-visual { align-items: center; }
  .desk { flex: 1 1 0; min-height: 0; width: auto; max-width: 100%; }
  .desk-wrap-foot { width: 100%; }

}
/* Teléfono: la mesa sola; las teclas y el total viven en el recomendador */
@media (max-width: 639px) {
  .desk-keys, .desk-total { display: none; }
  .desk { flex: none; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .desk-item, .desk-tag, .key { transition: none; } }

/* ---------- El ejemplo del recomendador, en su ventana ---------- */
.app.ui {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden;
}
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; padding: var(--s-6); }
.app > .app__pane + .app__pane { border-left: 1px solid var(--line); }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 48px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.app__bar { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-5); font-size: var(--t-small); color: var(--muted); }
.app__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.app__bar span { margin-left: var(--s-2); }
.answers { display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.answers a {
  display: flex; background: var(--surface); align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 48px; padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-weight: 500;
}
.answers a span { color: var(--muted); font-size: var(--t-small); font-weight: 400; }
.answers dt { font-size: var(--t-small); color: var(--muted); }
.sum { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.sum p { margin: 0; color: var(--muted); font-size: var(--t-small); }
.sum strong { display: block; font-family: var(--font-display); font-size: var(--t-stat); font-weight: 400; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.budget-meter { display: flex; gap: 2px; height: 10px; margin-top: var(--s-4); border-radius: 99px; overflow: hidden; background: var(--line); }
.budget-meter span { min-width: 4px; background: var(--tone); }
.budget-meter .budget-left { background: transparent; }
.receipt-lead { margin: 0 0 var(--s-4); font-size: var(--t-small); color: var(--muted); }
.receipt-list { margin: 0; padding: 0; list-style: none; }
.receipt-row {
  position: relative; display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: var(--s-4); align-items: start;
  padding: var(--s-4) 0; border-bottom: 1px solid var(--line);
}
.receipt-row:first-child { padding-top: 0; }
.receipt-thumb { display: grid; place-items: center; width: 88px; height: 72px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--tone) 14%, var(--surface)); }
.receipt-thumb .photo { max-width: 76px; max-height: 60px; width: auto; height: auto; object-fit: contain; }
.receipt-thumb .ill, .receipt-thumb .ill svg { width: 76px; height: 60px; }
.receipt-main { display: grid; gap: 2px; min-width: 0; }
.receipt-cat { font-size: var(--t-small); color: var(--muted); }
.receipt-name { font-weight: 500; }
.receipt-name::after { content: ""; position: absolute; inset: 0; }
.receipt-row:hover .receipt-name { text-decoration: underline; text-underline-offset: 3px; }
.receipt-thumb { overflow: hidden; }
.receipt-thumb .photo { transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.receipt-row:hover .receipt-thumb .photo { transform: scale(1.03); }
.receipt-why { font-size: var(--t-small); color: color-mix(in oklab, var(--ink) 80%, var(--bg)); line-height: 1.45; }
.receipt-price { font-family: var(--font-display); font-weight: 400; font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } .sum { display: none; } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list::after { display: none; }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--line); }
  .answers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sum { display: none; }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane { padding: var(--s-4); }
  .app > .app__pane + .app__pane { border-top: 0; }
  .receipt-row { grid-template-columns: 64px minmax(0, 1fr); }
  .receipt-thumb { width: 64px; height: 56px; }
  .receipt-thumb .photo { max-width: 56px; max-height: 48px; }
  .receipt-price { grid-column: 2; font-size: 18px; }
  .receipt-why { display: none; }
}

/* ---------- Siluetas (sobre la banda oscura) ---------- */
.shape-frame { display: grid; place-items: center; padding: var(--s-6); background: var(--surface); border-radius: var(--r-lg); }
.shape-fig { margin: 0; width: 100%; }
.shape-svg { display: block; width: auto; max-width: 100%; max-height: min(560px, 62svh); margin: 0 auto; }
.sh-grid { stroke: rgba(255,255,255,.06); stroke-width: 1; }
.sh-grid-10 { stroke: rgba(255,255,255,.12); }
.sh-axis { fill: var(--muted); font: 500 10px var(--font-text); }
.sh-dim { stroke: var(--muted); stroke-width: 1; }
.sh-dimtext { fill: var(--ink); font: 500 11px var(--font-text); }
.sh-body { stroke-width: 2; stroke-linejoin: round; }
.sh-ground { stroke: rgba(255,255,255,.25); stroke-width: 1.2; }
.shape-legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0; padding: 0; list-style: none; }
.shape-legend li { display: inline-flex; align-items: center; gap: var(--s-2); }
.shape-legend i { width: 24px; height: 0; border-top: 3px var(--line-style, solid) var(--c); }
.shape-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3) var(--s-5); margin: 0; }
.shape-facts dt { font-size: var(--t-small); color: var(--muted); }
.shape-facts dd { margin: 2px 0 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.shape-verdict { margin: 0; }
.shape-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); color: var(--muted); font-size: var(--t-small); }
.seg-ctl { display: inline-flex; padding: 3px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); }
.seg-ctl button { min-height: 44px; border: 0; background: none; padding: 0 var(--s-4); border-radius: calc(var(--r-sm) - 3px); font: 500 var(--t-small) var(--font-text); color: var(--muted); cursor: pointer; }
.seg-ctl button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.shape-copy > * + * { margin-top: var(--s-5); }
@media (max-width: 639px) { .shape-facts { grid-template-columns: 1fr 1fr; } .shape-frame { padding: var(--s-4); } .shape-svg { max-height: 300px; } }

/* ---------- Fotos de producto en los paneles de las tarjetas ---------- */
.shot { display: grid; place-items: center; height: 100%; padding: var(--s-6); background: color-mix(in srgb, var(--tone, var(--accent)) 10%, var(--surface)); }
.panel > .shot { position: absolute; inset: 0; }
.shot .photo { max-width: 82%; max-height: calc(var(--p-h, 240px) - 56px); width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(0,0,0,.18)); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.shot .ill { width: 70%; height: calc(var(--p-h, 240px) - 56px); }
.shot .ill svg { width: 100%; height: 100%; }
a.card:hover .shot .photo { transform: scale(1.03); }
.card .meta { margin-top: var(--s-2); font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
/* Categorías: seis fichas abiertas en una pantalla (3x2; 2x3 en tableta y teléfono) */
#cats { row-gap: var(--s-6); }
#categorias .tile { --tile-ratio: 5 / 2; gap: var(--s-3); }
#categorias .tile__media > .shot { position: absolute; inset: 0; }
#categorias .tile__media .photo { position: absolute; inset: 11% 8%; width: 84%; height: 78%; max-width: none; max-height: none; object-fit: contain; }
#categorias .tile__media .ill { position: absolute; inset: 11% 15%; width: 70%; height: 78%; }
#categorias .tile__facts { margin-top: calc(-1 * var(--s-2)); }
a.tile:hover .shot .photo { transform: scale(1.03); }
@media (min-width: 1024px) { #categorias .grid > .tile { grid-column: span 4; } }
@media (max-width: 1023px) { #categorias .grid > .tile { grid-column: span 6; } }
@media (max-width: 639px) {
  #categorias .tile { --tile-ratio: 4 / 3; }
  #categorias .tile__facts, #categorias .tile__price { display: none; }
  #categorias .tile__head > h3 { font-size: 16px; }
}
#guias .panel { --p-h: 220px; }
#guides { margin-top: var(--s-7); }
@media (min-width: 1024px) { #guias .card > h3 { min-height: 2lh; } }
.menu-card .panel { --p-h: 200px; }
.brands { min-width: 0; margin-top: var(--s-8); }
.brands [data-moment] { min-width: 0; max-width: 100%; }
.brands .t-label { margin: 0 0 var(--s-3); color: var(--muted); }
@media (min-width: 1024px) { #guias .grid > .card { grid-column: span 4; } }
@media (min-width: 1024px) and (max-width: 1279px) { #guias .panel { --p-h: 160px; } #categorias .panel { --p-h: 150px; } }
@media (min-width: 640px) and (max-width: 1023px) {
  #guias .grid > .card { grid-column: span 6; }
  #guias .grid > .card:nth-child(3) { display: none; }
  #guias .panel { --p-h: 160px; }
  .shape-svg { max-height: 280px; }
}
@media (max-width: 639px) { #guias { --hm: 2; } #guias .panel { --p-h: 120px; } .brands { margin-top: var(--s-6); } }
/* Tableta: el ejemplo enseña solo el resultado; las respuestas van en el texto de arriba */
@media (max-width: 1023px) { .app > .app__pane--list { display: none; } .app.ui { grid-template-rows: minmax(0, 1fr); } .app > .app__pane + .app__pane { border-top: 0; } }
@media (prefers-reduced-motion: reduce) { .shot .photo { transition: none; } }

/* ---------- Pie ---------- */
.footer__note { margin: 0; max-width: 62ch; font-size: var(--t-small); color: var(--muted); }
@media (max-width: 399px) { .close--type .btn--xl { white-space: normal; text-align: center; } }
@media (max-width: 639px) {
  #siluetas .shape-facts, #siluetas .shape-verdict, #siluetas .shape-tools { display: none; }
  #siluetas .shape-svg { max-height: 240px; }
  .closing__links .footer__col { grid-column: span 6; }
}
@media (min-width: 640px) and (max-width: 1023px) and (min-height: 1100px) { .shape-svg { max-height: 420px; } }

/* ---------------------------------------------------------------- compact flow
   Sections size to their content instead of a full screen each, so the next one is always in view. */
main > section:not(.hero), footer.closing {
  height: auto !important; min-height: 0 !important;
  padding: clamp(56px, 7vw, 96px) 0 clamp(56px, 7vw, 96px);
}
main > section:not(.hero) > .wrap, footer.closing > .wrap { height: auto; }
main > section:not(.hero) > .wrap > .fill { flex: none; }
main > section.g2 > .wrap, main > section.g2m > .wrap, footer.closing.g2m > .wrap {
  display: flex; flex-direction: column; row-gap: var(--s-7);
}
/* the hero leaves a strip of the next section showing */
main > .hero { height: auto !important; min-height: min(86svh, 820px) !important; }
/* hairline between two sections on the same ground */
main > section:not(.hero) + section:not(.ground-inverse):not(.hero) { border-top: 1px solid color-mix(in oklab, var(--p-ink) 8%, transparent); }

/* ---------------------------------------------------------------- smooth scrolling */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* laptop widths: the nav has no room for every link next to the button */
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav .nav__item:has(> a[href="/glosario"]), .nav a[href="/acceso"] { display: none; }
}

/* site logo in the home nav and footer */
.nav__logo .logo { width: 32px; height: 32px; object-fit: contain; }
.nav__logo .brand-accent { color: var(--accent); }
