/* Base estructural de las páginas de app. Cada app define su tema en apps/<app>/style.css */
:root {
  --accent: #333; --accent-2: #555; --accent-ink: #fff;
  --ink: #16161a; --muted: #6b6b75; --bg: #fff; --bg-2: #f5f5f7; --line: #e6e6ea;
  --radius: 22px; --radius-sm: 14px;
  --font-head: system-ui, sans-serif; --font-body: system-ui, sans-serif;
  --max: 1140px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 var(--font-body); color: var(--ink); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Barra superior */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.app-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 19px; text-decoration: none; }
.app-brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; }
.topnav { display: flex; gap: 4px; align-items: center; }
.topnav a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; color: var(--muted); }
.topnav a:hover { color: var(--ink); background: var(--bg-2); }
.topnav .by { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 760px) { .topnav a:not(.keep) { display: none; } }

/* Hero */
.app-hero { padding: 70px 0 60px; }
.app-hero .grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.app-hero .icon { width: 96px; height: 96px; border-radius: 24px; margin-bottom: 26px; object-fit: contain; }
.app-hero h1 { font-size: clamp(46px, 6.4vw, 78px); }
.app-hero .tagline { font-size: clamp(19px, 2vw, 23px); color: var(--muted); max-width: 32ch; }
.platforms { list-style: none; padding: 0; margin: 22px 0 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.platforms li { font-size: 14px; font-weight: 700; padding: 7px 14px; border-radius: 999px; background: var(--bg-2); color: var(--ink); display: inline-flex; gap: 7px; align-items: center; }
.platforms svg { width: 16px; height: 16px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cta {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  padding: 18px 30px 18px 24px; border-radius: 20px; font-weight: 800; font-size: 19px;
  box-shadow: 0 18px 40px -16px color-mix(in srgb, var(--accent) 80%, transparent);
  transition: transform .2s, box-shadow .2s;
}
.cta:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -16px color-mix(in srgb, var(--accent) 85%, transparent); }
.cta svg { width: 30px; height: 30px; flex: none; }
.cta small { display: block; font-size: 12px; font-weight: 600; opacity: .8; letter-spacing: .04em; text-transform: uppercase; }
.cta span { line-height: 1.15; }
.link-btn { font-weight: 700; text-decoration: none; padding: 14px 18px; border-radius: 16px; color: var(--ink); }
.link-btn:hover { background: var(--bg-2); }
.hero-visual { position: relative; display: grid; place-items: center; }
@media (max-width: 880px) { .app-hero .grid { grid-template-columns: 1fr; } .app-hero { padding-top: 40px; } }

/* Secciones */
.sec { padding: 80px 0; }
.sec-alt { background: var(--bg-2); }
.kicker { font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.sec h2 { font-size: clamp(32px, 4vw, 48px); }
.sec .intro { color: var(--muted); max-width: 58ch; font-size: 18px; }

/* Galería */
.gallery { display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 30px 20px 40px; margin: 0 -20px; scrollbar-width: thin; }
.gallery figure { margin: 0; flex: none; scroll-snap-align: center; }
.gallery figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 14px; font-weight: 600; }
.phone { width: 250px; aspect-ratio: 9 / 19.5; border-radius: 40px; padding: 10px; background: #111; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .5); position: relative; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 31px; background: var(--bg-2); }
.browser { width: min(760px, 86vw); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .45); border: 1px solid var(--line); }
.browser .bar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #f1f3f6; border-bottom: 1px solid var(--line); }
.browser .bar i { width: 11px; height: 11px; border-radius: 50%; background: #d9dde3; }
.browser img { width: 100%; aspect-ratio: 16 / 9.4; object-fit: cover; object-position: top; }
/* Hueco sin foto todavía */
figure.empty .phone img, figure.empty .browser img { visibility: hidden; }
figure.empty .phone, figure.empty .browser { background-image: var(--placeholder); background-repeat: no-repeat; background-position: center; background-size: 38%; }
figure.empty .phone { background-color: var(--bg-2); border: 10px solid #111; }

/* Características */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.feat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.feat .fi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); margin-bottom: 16px; }
.feat .fi svg { width: 24px; height: 24px; }
.feat h3 { font-size: 20px; margin-bottom: 6px; }
.feat p { color: var(--muted); margin: 0; font-size: 16px; }
@media (max-width: 900px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feat-grid { grid-template-columns: 1fr; } }

/* Ficha técnica */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 34px; background: var(--bg); }
.facts div { padding: 22px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: -1px -1px 0 0; }
.facts dt { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 700; font-size: 17px; }

/* Soporte */
.support { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: start; }
@media (max-width: 880px) { .support { grid-template-columns: 1fr; } }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.form-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: 0 24px 60px -34px rgba(0, 0, 0, .35); }
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } .form-card { padding: 24px 18px; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 13px 15px; width: 100%; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.submit { font: inherit; font-weight: 800; font-size: 16px; border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink); padding: 16px 28px; border-radius: var(--radius-sm); transition: transform .2s, opacity .2s; }
.submit:hover { transform: translateY(-2px); }
.submit[disabled] { opacity: .6; cursor: progress; transform: none; }
.form-status { display: none; padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 700; font-size: 15px; }
.form-status.ok { display: block; background: #e8f7ee; color: #16693a; }
.form-status.err { display: block; background: #fdecea; color: #a01a10; }

/* Pie */
.app-footer { border-top: 1px solid var(--line); padding: 34px 0 44px; font-size: 14px; color: var(--muted); }
.app-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; align-items: center; }
.app-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.app-footer a { text-decoration: none; }
.app-footer a:hover { color: var(--ink); text-decoration: underline; }
.made-by { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.made-by img { height: 18px; width: auto; filter: brightness(0) opacity(.55); }

/* Legal */
.legal { max-width: 760px; padding: 50px 0 80px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); }
.legal h2 { font-size: 22px; margin-top: 1.8em; }
.legal p, .legal li { color: color-mix(in srgb, var(--ink) 85%, var(--muted)); }
.legal .date { color: var(--muted); font-size: 15px; }
.lang-switch { display: inline-flex; gap: 6px; margin-bottom: 26px; }
.lang-switch button { font: inherit; font-size: 13px; font-weight: 700; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
[data-lang="en"] [lang="es"], [data-lang="es"] [lang="en"] { display: none; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }
