/* =========================================================
   RapidTools — portada estilo tienda de apps
   ========================================================= */
@font-face { font-family: "Inter"; src: url("../presupuestos/assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #ffffff; --surface: #f0f2f5; --card: #ffffff; --ink: #1f1f1f; --ink2: #444746; --muted: #5f6368;
  --line: #e3e3e3; --line2: #c4c7c5; --acc: #2f5bea; --acc-ink: #1f3fa8; --acc-soft: #e8eefd;
  --f1: #e8eefd; --f1-ink: #1f3fa8; --f2: #ecebfc; --f2-ink: #3f37b8; --qr: #3f37b8;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111318; --surface: #1e2128; --card: #181b21; --ink: #e8eaed; --ink2: #bdc1c6; --muted: #9aa0a6;
  --line: #2c3038; --line2: #474c56; --acc: #8ab4f8; --acc-ink: #c2d4ff; --acc-soft: #1f2a44;
  --f1: #182238; --f1-ink: #a8c0ff; --f2: #1f1d3b; --f2-ink: #b8b3ff; --qr: #b8b3ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 90; }
.skip:focus { left: 8px; }

/* barra superior */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 21px; color: var(--ink2); flex: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.search { flex: 1; min-width: 0; max-width: 420px; margin-left: auto; display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 999px; padding: 0 16px; }
.search .ico { color: var(--ink2); }
.search input { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; outline: none; font: inherit; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.search { transition: background-color var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease); }
.search:focus-within { background: var(--card); box-shadow: 0 0 0 2px var(--acc), 0 0 0 6px var(--acc-soft); }
.search .ico { transition: color var(--t-ui) var(--ease); }
.search:focus-within .ico { color: var(--acc); }
.round { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--ink2); cursor: pointer; }
.round:hover { background: var(--surface); }
.i-moon { display: none; } :root[data-theme="dark"] .i-sun { display: none; } :root[data-theme="dark"] .i-moon { display: block; }
@media (max-width: 560px) { .brand span { display: none; } .search { max-width: none; } }

/* secciones (pestañas que filtran) */
/* filtros por tipo de herramienta: píldoras compactas, una sola fila (en el celular se deslizan de costado) */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 4px; scrollbar-width: none; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); font: 500 14px/1 "Inter", system-ui, sans-serif; cursor: pointer;
  transition: background-color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease), transform .12s var(--ease); }
.tab:active { transform: scale(.96); } /* respuesta inmediata al tocar */
.tab img { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.tab:hover { border-color: var(--line2); color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--acc-soft); border-color: var(--acc); color: var(--acc-ink); font-weight: 650; }
@media (max-width: 1000px) {
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
  .tab:last-child { margin-right: 24px; }
}
@media (prefers-reduced-motion: reduce) { .tab { transition: none; } .tab:active { transform: none; } }

/* intro */
.intro { padding-top: 14px; padding-bottom: 22px; }
.intro h1 { margin: 0; font-size: clamp(34px, 5.6vw, 64px); font-weight: 800; letter-spacing: -.025em; line-height: 1.06; }
.intro h1 span { display: block; text-wrap: balance; }
.intro__grad { background: linear-gradient(90deg, #ff4fa0 0%, #c04dff 50%, #7a6bff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.intro__l2 { color: var(--ink); }
.intro p { margin: 16px 0 0; color: var(--ink2); font-size: clamp(15.5px, 1.5vw, 17.5px); line-height: 1.6; max-width: 640px; }
.intro__ok { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 16px 0 0; padding: 0; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.intro__ok li { display: inline-flex; align-items: center; gap: 6px; }
.intro__ok li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: #1e9e5a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-4.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

/* destacadas */
.feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .feat { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; } .feat::-webkit-scrollbar { display: none; } .fcard { flex: 0 0 88%; scroll-snap-align: center; } }
.fcard { position: relative; display: flex; align-items: center; gap: 20px; min-height: 230px; padding: 26px; border-radius: 24px; overflow: hidden; }
.fcard--blue { background: var(--f1); --k: var(--f1-ink); --b: #2f5bea; }
.fcard--indigo { background: var(--f2); --k: var(--f2-ink); --b: #4f46e5; }
.fcard__txt { flex: 1; min-width: 0; position: relative; z-index: 1; }
.fcard__k { font-size: 12.5px; font-weight: 750; letter-spacing: .06em; color: var(--k); }
.fcard h2 { margin-top: 8px; font-size: clamp(22px, 2.6vw, 32px); font-weight: 750; max-width: 15ch; }
.fcard__app { margin-top: 18px; display: flex; align-items: center; gap: 12px; }
.fcard__app img { width: 48px; height: 48px; border-radius: 12px; }
.fcard__app b { display: block; font-size: 15.5px; }
.fcard__app small { font-size: 13.5px; color: var(--ink2); }
.go { margin-left: auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 20px; border-radius: 999px; background: var(--b); color: #fff; font-weight: 600; font-size: 15px; }
.fcard__art { flex: 0 0 140px; display: grid; place-items: center; }
.paper { width: 130px; height: 170px; background: #fff; border-radius: 6px; box-shadow: 0 16px 30px -16px rgba(31, 63, 168, .55); padding: 13px; display: flex; flex-direction: column; gap: 7px; transform: rotate(-4deg); }
.paper i { display: block; height: 4px; border-radius: 2px; background: #e4e7ee; }
.paper .h { height: 8px; width: 58%; align-self: flex-end; background: #2f5bea; }
.paper .bar { height: 18px; background: #eef2fd; margin-top: 4px; }
.paper .th { height: 8px; background: #2f5bea; margin-top: 4px; }
.paper .tot { margin-top: auto; height: 13px; width: 50%; align-self: flex-end; background: #2f5bea; border-radius: 3px; }
.qrart { width: 120px; height: 120px; color: var(--qr); transform: perspective(320px) rotateX(24deg) rotateZ(-6deg); filter: drop-shadow(0 14px 10px rgba(63, 55, 184, .35)); }
@media (max-width: 520px) { .fcard { padding: 20px; min-height: 210px; } .fcard__art { position: absolute; right: -12px; top: 22px; flex: none; opacity: .95; } .fcard__art .paper { width: 104px; height: 136px; } .fcard__art .qrart { width: 96px; height: 96px; } .fcard h2 { max-width: 11ch; } .fcard__app { margin-top: 14px; } .go { display: none; } }

/* filas de apps */
.row { padding-top: 36px; }
.row__head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.row__head h2, .row__head h3 { margin: 0; font-size: clamp(19px, 2vw, 23px); font-weight: 650; }
/* «¿Qué necesitás resolver?»: agrupa las filas por necesidad bajo un mismo título */
.needs__head { padding-top: 40px; }
.needs__head h2 { margin: 0; font-size: clamp(24px, 2.8vw, 30px); font-weight: 780; letter-spacing: -.015em; }
.needs__head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.needs .row--need { padding-top: 22px; }
.needs .row--need .row__head h3 { font-size: clamp(17px, 1.7vw, 20px); }
.row__head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 22px 18px; }
@media (min-width: 1000px) { .apps:not(.list) { grid-template-columns: repeat(9, minmax(0, 1fr)); } }
.app { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.app img { width: 100%; max-width: 140px; aspect-ratio: 1; height: auto; border-radius: 22%; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.app b { display: block; font-size: 15px; font-weight: 550; line-height: 1.3; }
.app small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--ink2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app__go { display: none; }
@media (max-width: 720px) {
  .apps { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px; margin: 0 -16px; padding: 4px 16px 6px; scrollbar-width: none; }
  .apps::-webkit-scrollbar { display: none; }
  .apps .app { flex: 0 0 84px; scroll-snap-align: start; gap: 8px; }
  .apps .app img { width: 84px; border-radius: 20px; }
  .apps .app b { font-size: 13px; font-weight: 500; }
  .apps .app small { display: none; }
}

/* lista (Argentina y resultados) */
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 4px 28px; }
@media (max-width: 720px) { .list { grid-template-columns: 1fr; } }
.list .app { flex-direction: row; align-items: center; gap: 14px; padding: 10px 0; }
.list .app img { flex: none; width: 60px; border-radius: 15px; }
.list .app > span:not(.app__go) { flex: 1; min-width: 0; }
.list .app small { -webkit-line-clamp: 1; }
.list .app__go { display: inline-flex; align-items: center; flex: none; min-height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); font-size: 14px; font-weight: 600; color: var(--acc); }
.list .app:hover .app__go { background: var(--acc-soft); border-color: var(--acc-soft); }
.list .app__go { transition: background-color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease); }

/* carruseles de la portada: una sola fila que se desliza de costado; no se mueve sola, se pasa con las flechas */
.car { scrollbar-width: none; }
.car::-webkit-scrollbar { display: none; }
@media (min-width: 721px) {
  /* el margen negativo deja lugar al fondo y la elevación del hover sin que el desplazamiento los corte */
  .apps.car { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 12px; margin: -12px; padding: 12px; }
  .apps.car .app { flex: 0 0 132px; scroll-snap-align: start; }
}
.car--more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.carnav { display: flex; gap: 8px; margin-left: auto; flex: none; }
.carnav[hidden] { display: none; }
.carbtn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: background-color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease), opacity var(--t-ui) var(--ease), transform var(--t-ui) var(--ease); }
.carbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.carbtn:hover:not(:disabled) { background: var(--acc-soft); border-color: var(--acc); color: var(--acc); }
.carbtn:active:not(:disabled) { transform: scale(.94); }
.carbtn:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.carbtn:disabled { opacity: .35; cursor: default; }

/* ===== Movimiento (misma curva y tiempos en toda la portada) =====
   Controles: ~200 ms. Título: ~1 s, una sola vez. Solo transform y opacidad (sin saltos de diseño).
   Con «reducir movimiento» se apaga todo, salvo que la dirección tenga ?anim=1 (para probar). */
:root { --ease: cubic-bezier(.22, .8, .24, 1); --t-ui: 200ms; }

/* entrada del título: renglón 1, renglón 2, texto y por último las tildes de confianza */
@keyframes rt-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes rt-up-s { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.intro__grad { animation: rt-up .62s var(--ease) both; }
.intro__l2 { animation: rt-up .62s var(--ease) .12s both; }
.intro p { animation: rt-up-s .55s var(--ease) .28s both; }
.intro__ok { animation: rt-up-s .5s var(--ease) .44s both; }
.hero-done .intro__grad, .hero-done .intro__l2, .hero-done .intro p, .hero-done .intro__ok { animation: none; } /* no se repite al volver de un filtro */

/* tarjetas: se elevan un poco y aparece un fondo suave detrás (sin mover a las vecinas) */
@media (hover: hover) and (pointer: fine) {
  .app { position: relative; isolation: isolate; transition: transform .22s var(--ease); }
  .app::before { content: ""; position: absolute; inset: -10px; z-index: -1; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); opacity: 0; transition: opacity .22s var(--ease); pointer-events: none; }
  .list .app::before { inset: 0 -12px; border-radius: 16px; }
  .app img { transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
  .app:hover { transform: translateY(-3px); }
  .app:hover::before, .app:focus-visible::before { opacity: 1; }
  .app:hover img { transform: translateY(-1px); box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .28); }
  .fcard { transition: transform .24s var(--ease), box-shadow .24s var(--ease); }
  .fcard:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -18px rgba(0, 0, 0, .45); }
}

/* resultados de búsqueda y filtros: aparecen con un fundido corto */
@keyframes rt-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#results:not([hidden]) { animation: rt-fade .2s var(--ease) both; }

/* cambio de tema: los colores pasan suave solo durante el cambio, y el ícono gira un poco */
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
  transition: background-color .26s ease, color .26s ease, border-color .26s ease, fill .26s ease, stroke .26s ease !important; }
@keyframes rt-icon { from { opacity: 0; transform: rotate(-45deg) scale(.8); } to { opacity: 1; transform: none; } }
.theme-fade #themeBtn .ico { animation: rt-icon .3s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  :root:not(.anim-force) .intro__grad, :root:not(.anim-force) .intro__l2, :root:not(.anim-force) .intro p, :root:not(.anim-force) .intro__ok,
  :root:not(.anim-force) #results, :root:not(.anim-force) #themeBtn .ico { animation: none; }
  :root:not(.anim-force) .app, :root:not(.anim-force) .app img, :root:not(.anim-force) .fcard, :root:not(.anim-force) .search { transition: none; }
  :root:not(.anim-force) .app:hover, :root:not(.anim-force) .app:hover img, :root:not(.anim-force) .fcard:hover { transform: none; }
}
.count { color: var(--muted); font-size: 14px; margin-left: auto; }
.empty { padding: 30px 0; color: var(--ink2); }
.empty a { color: var(--acc); font-weight: 600; text-decoration: underline; }

/* secciones informativas */
.sec { padding-top: 64px; }
.sec h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 750; }
.sec .lead { color: var(--ink2); font-size: 16px; margin: 8px 0 20px; max-width: 680px; }
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .why { grid-template-columns: 1fr; } }
.why article { padding: 22px; border-radius: 20px; background: var(--surface); }
.why .ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--acc-soft); color: var(--acc-ink); }
.why h3 { font-size: 17px; margin: 14px 0 6px; }
.why p { margin: 0; color: var(--ink2); font-size: 15px; line-height: 1.6; }
.install { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 24px; border-radius: 22px; background: var(--f1); }
.install > div { flex: 1; min-width: 240px; }
.install p { margin: 8px 0 0; color: var(--ink2); }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 650; font-size: 15.5px; background: #2f5bea; color: #fff; }
.btn:hover { filter: brightness(1.08); }
.faq { max-width: 860px; margin-top: 16px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 17px 44px 17px 2px; font-weight: 600; font-size: 16px; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 18px; color: var(--ink2); }
.faq a { color: var(--acc); text-decoration: underline; }
.coffee { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 24px; border-radius: 22px; background: #fff3e6; color: #2a1a0f; }
:root[data-theme="dark"] .coffee { background: #1d140d; color: #f6e7da; }
.coffee > div { flex: 1; min-width: 240px; }
.coffee p { margin: 6px 0 0; opacity: .88; }
.coffee .btn { background: #b85a1f; color: #fff; }
:root[data-theme="dark"] .coffee .btn { background: #f0a05f; color: #1d1006; }
.foot { margin-top: 64px; border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 14px; }
.foot__in { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.foot p { margin: 0; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--ink2); }
.foot a:hover { text-decoration: underline; }

/* footer del sitio: logo + columnas (lo genera tools/sitefooter.py) */
.sf { margin-top: 56px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; }
.sf__in { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 32px 28px; padding-top: 38px; padding-bottom: 30px; }
.sf__logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 20px; color: var(--ink); text-decoration: none; }
.sf__logo img { width: 40px; height: 40px; border-radius: 22%; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.sf__brand p { margin: 12px 0 0; max-width: 34ch; line-height: 1.5; }
.sf__t { margin: 0 0 12px; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.sf ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.sf a { color: var(--ink2); text-decoration: none; }
.sf a:hover { color: var(--ink); text-decoration: underline; }
.sf__bar { border-top: 1px solid var(--line); }
.sf__bar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-top: 16px; padding-bottom: 28px; font-size: 13px; }
@media (max-width: 900px) { .sf__in { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sf__brand { grid-column: 1 / -1; } }
