/* Portada de la web: amarillo y negro, plano, líneas finas (como la app) */
:root { --brand: #ffc928; --ink: #141414; --bg: #f6f6f4; --card: #fff; --line: #e8e8e4; --muted: #6b6b66; --soft: #fff6d6; }
@media (prefers-color-scheme: dark) { :root { --ink: #f2f2ee; --bg: #121212; --card: #1c1c1c; --line: #2c2c2a; --muted: #a3a39d; --soft: #2a2410; } }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* Cabecera */
.nav { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 12px max(20px, calc((100vw - 1160px) / 2));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; text-decoration: none; margin-right: auto; }
.logo { width: 32px; height: 32px; border-radius: 9px; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 10.2a1 1 0 0 0 1 .8h8.9a1 1 0 0 0 1-.8L20 8H6'/%3E%3Ccircle cx='9' cy='19' r='1.4'/%3E%3Ccircle cx='17' cy='19' r='1.4'/%3E%3C/svg%3E") center / 20px no-repeat; }
.nav nav { display: flex; gap: 22px; font-size: .92rem; font-weight: 600; }
.nav nav a { text-decoration: none; color: var(--muted); }
@media (hover: hover) { .nav nav a:hover { color: var(--ink); } }
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; border-radius: 999px; padding: 12px 22px; }
.btn.small { padding: 9px 16px; font-size: .9rem; }
.btn-dark { background: var(--ink); color: var(--bg); }

/* Botón del App Store (propio, no el logo oficial) */
.store { display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 16px; border-radius: 14px; background: #141414; color: #fff; text-decoration: none; }
.store small { display: block; font-size: .72rem; opacity: .8; line-height: 1.1; }
.store b { display: block; font-size: 1.3rem; line-height: 1.15; }
.store-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* Portada */
main { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 56px 0 40px; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--soft); border: 1px solid color-mix(in srgb, var(--brand) 60%, transparent); font-size: .85rem; font-weight: 600; }
h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.07; margin: 18px 0 16px; font-weight: 700; letter-spacing: -.02em; }
h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--brand) 62%); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 520px; margin: 0 0 26px; }
.trust { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; color: var(--muted); }
.trust li::before { content: "✓"; color: color-mix(in srgb, var(--brand) 70%, var(--ink)); font-weight: 700; margin-right: 6px; }
.hero-phones { position: relative; height: 600px; }
.phone { margin: 0; aspect-ratio: 1206 / 2622; border-radius: 44px; padding: 10px; background: #141414; box-shadow: 0 30px 60px -20px rgba(20, 20, 20, .35); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; }
.hero-phones .phone { position: absolute; width: 270px; }
.hero-phones .front { right: 8%; top: 0; z-index: 2; }
.hero-phones .back { left: 6%; top: 60px; transform: rotate(-6deg); opacity: .96; }

/* Tira de ventajas */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 10px 0 30px; }
.strip div { background: var(--card); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.strip b { font-size: 1rem; }
.strip span { font-size: .9rem; color: var(--muted); }

/* Secciones */
.section { padding: 64px 0 20px; }
.kicker { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; margin: 8px 0 14px; font-weight: 700; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 0 0 22px; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 30px; }
.gallery figure { margin: 0; }
.gallery .phone { border-radius: 36px; padding: 8px; }
.gallery .phone img { border-radius: 28px; }
.gallery figcaption { margin-top: 16px; font-size: .92rem; color: var(--muted); }
.gallery figcaption b { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 2px; }

/* Hogar */
.hogar { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hogar p { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #141414; font-size: .8rem; font-weight: 800; display: grid; place-items: center; }
.hogar-card { background: linear-gradient(160deg, var(--soft), var(--card) 70%); border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 22px; padding: 30px; display: flex; flex-direction: column; gap: 6px; }
.hogar-card b { font-size: 1.4rem; }
.hogar-card small { color: var(--muted); }
.avatars { display: flex; margin-bottom: 10px; }
.avatars span { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; border: 3px solid var(--card); margin-left: -10px; background: #ffd76a; color: #141414; }
.avatars span:first-child { margin-left: 0; background: var(--brand); }
.avatars span:last-child { background: #141414; color: #fff; }

/* Precio */
.toggle { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); margin-bottom: 22px; }
.toggle button { border: 0; background: none; font: inherit; font-weight: 600; padding: 9px 20px; border-radius: 999px; color: var(--muted); cursor: pointer; }
.toggle button.on { background: var(--ink); color: var(--bg); }
.toggle i { font-style: normal; font-size: .75rem; margin-left: 4px; padding: 2px 7px; border-radius: 999px; background: var(--brand); color: #141414; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.plan.pro { border: 2px solid var(--brand); background: linear-gradient(160deg, var(--soft), var(--card) 55%); }
.plan h3 { margin: 0; font-size: 1.2rem; }
.price { font-size: 2.6rem; font-weight: 800; margin: 6px 0 2px; letter-spacing: -.02em; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.note { margin: 0 0 6px; color: var(--muted); font-size: .88rem; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 9px; font-size: .96rem; }
.plan li:not(:has(b))::before { content: "✓"; margin-right: 9px; font-weight: 800; color: color-mix(in srgb, var(--brand) 70%, var(--ink)); }
.badge { position: absolute; top: -13px; right: 22px; background: var(--ink); color: var(--bg); font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.fine { color: var(--muted); font-size: .88rem; margin-top: 18px; }

/* Preguntas */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; margin-bottom: 10px; max-width: 860px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* Final y pie */
.final { text-align: center; margin: 70px 0 40px; padding: 56px 24px; border-radius: 28px; background: var(--brand); color: #141414; }
.final h2 { margin-top: 0; }
.final p { margin: 0 0 24px; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 26px max(20px, calc((100vw - 1160px) / 2)) 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { text-decoration: none; }

/* Tableta y móvil */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .hero, .hogar { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; text-align: left; }
  .hero-phones { height: 520px; }
  .hero-phones .phone { width: 220px; }
  .hero-phones .front { right: 4%; }
  .hero-phones .back { left: 2%; }
  .strip { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(4, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .gallery figure { scroll-snap-align: start; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero-phones { height: 430px; }
  .hero-phones .phone { width: 180px; border-radius: 32px; padding: 7px; }
  .hero-phones .phone img { border-radius: 26px; }
  .strip { grid-template-columns: 1fr; }
}
/* iPad */
.tablet { margin-top: 26px; width: min(100%, 570px); aspect-ratio: 2064 / 2752; border-radius: 34px; padding: 14px; background: #141414; box-shadow: 0 30px 60px -20px rgba(20, 20, 20, .35); }
.tablet img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 22px; }
.lang { text-decoration: none; font-weight: 700; font-size: .85rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
@media (max-width: 900px) { .tablet { border-radius: 24px; padding: 9px; } .tablet img { border-radius: 16px; } }
/* Safari no resuelve height:100% dentro de aspect-ratio: la imagen marca la altura */
.phone { aspect-ratio: auto; }
.phone img { display: block; height: auto; aspect-ratio: 1206 / 2622; }
/* Portada: iPad en horizontal detrás y iPhone delante (28-11-2026) */
.hero { grid-template-columns: 1fr 1.15fr; }
.hero-phones { height: 520px; }
.hero-tablet { position: absolute; right: 0; top: 30px; width: min(100%, 600px); margin: 0; padding: 12px; border-radius: 30px; background: #141414; box-shadow: 0 30px 60px -20px rgba(20, 20, 20, .35); }
.hero-tablet img { display: block; width: 100%; height: auto; border-radius: 19px; }
.hero-phones .front { left: 0; right: auto; top: auto; bottom: 0; width: 200px; z-index: 2; border-radius: 36px; padding: 8px; }
.hero-phones .front img { border-radius: 28px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-phones { height: auto; min-height: 0; padding: 10px 0 0 70px; }
  .hero-tablet { position: relative; top: 0; width: 100%; }
  .hero-phones .front { width: 150px; bottom: -20px; border-radius: 28px; padding: 6px; }
  .hero-phones .front img { border-radius: 22px; }
}
@media (max-width: 640px) {
  .hero-phones { height: auto; padding: 30px 0 30px 60px; margin-top: 10px; }
  .hero-phones .front { width: 120px; bottom: 0; border-radius: 22px; padding: 5px; }
  .hero-phones .front img { border-radius: 17px; }
  .hero-tablet { padding: 7px; border-radius: 18px; }
  .hero-tablet img { border-radius: 12px; }
}
/* Sección iPhone / iPad con pestañas */
.dev-tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); margin: 22px 0 26px; }
.dev-tabs button { border: 0; background: none; font: inherit; font-weight: 600; padding: 9px 24px; border-radius: 999px; color: var(--muted); cursor: pointer; }
.dev-tabs button.on { background: var(--ink); color: var(--bg); }
.dev-pane { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 30px; justify-content: center; }
.dev-pane[hidden] { display: none; }
.dev-pane figure { margin: 0; }
.dev-pane[data-pane="ipad"] { grid-template-columns: repeat(2, 1fr); }
.dev-tablet { position: static; width: 100%; }
@media (max-width: 900px) { .dev-pane[data-pane="ipad"] { grid-template-columns: 1fr; } .dev-pane { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
/* Botón volver arriba */
.to-top { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: 48px; height: 48px; border-radius: 50%; background: var(--brand, #ffc928); color: #141414; display: grid; place-items: center; box-shadow: 0 8px 20px -6px rgba(20,20,20,.35); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; z-index: 50; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
@media (hover: hover) { .to-top:hover { filter: brightness(.95); } }
/* iPad en vertical: galería en 2 columnas en lugar de carrusel de móviles enormes */
@media (min-width: 641px) and (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 260px)); justify-content: center; overflow: visible; gap: 30px; }
}
