/* Agendia — landing. Misma dirección de arte que la app: Dark Mode (OLED).
   Lienzo negro, profundidad por luminancia (no por sombra) y el índigo de la
   marca en dos grados: "ink" para dibujar sobre negro, "fill" para rellenos. */

:root {
  --canvas: #000000;
  --surface: #121218;
  --surface-high: #1a1a22;
  --surface-top: #24242e;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);

  --text: #ecedf2;
  --text-2: #a8a9b6;
  --text-3: #8a8b98;

  --primary: #8b87ff;       /* ink */
  --primary-deep: #433df2;  /* fill */
  --secondary-deep: #5b2fc9;
  --accent: #ff8a7d;
  --success: #34d8a5;
  --warning: #f5b33e;

  --brand: linear-gradient(135deg, var(--primary-deep), var(--secondary-deep));
  --radius: 20px;
  --radius-lg: 28px;
  --max: 1120px;
  --gutter: 20px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface-top); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.nav-links a { color: var(--text-2); font-size: 14px; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav .btn { padding: 9px 16px; font-size: 14px; }
@media (max-width: 860px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 16px;
  font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2;
  color: #fff; background: var(--brand);
  border: 1px solid transparent; cursor: pointer;
  box-shadow: 0 0 36px rgba(67, 61, 242, 0.38);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 0 48px rgba(67, 61, 242, 0.5); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-ghost { background: var(--surface-high); border-color: var(--border-strong); box-shadow: none; color: var(--text); }
.btn-ghost:hover { background: var(--surface-top); box-shadow: none; }
.btn-lg { padding: 18px 26px; font-size: 17px; border-radius: 18px; }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Aviso del QR de un negocio (?join=) ---------- */
.join-banner { padding: 32px 0 0; }
.join-card {
  display: grid; gap: 14px;
  padding: 28px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border-strong);
}
.join-card .lead { margin: 0; }
.join-code { color: var(--text); letter-spacing: .12em; }
.join-card .small { margin: 0; }

/* ---------- Tipografía ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--primary); border-radius: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--text-2); max-width: 60ch; }
.muted { color: var(--text-2); }
.small { font-size: 14px; color: var(--text-3); }
.grad { background: linear-gradient(90deg, #a6a3ff, #ff8a7d); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Secciones ---------- */
section { padding: 88px 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 { margin: 12px 0 14px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.alt { background: linear-gradient(180deg, #000 0%, #08080c 18%, #08080c 82%, #000 100%); }
@media (max-width: 640px) { section { padding: 64px 0; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(67, 61, 242, 0.34), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; left: -200px; bottom: -40px; width: 480px; height: 480px;
  background: radial-gradient(closest-side, rgba(242, 105, 92, 0.14), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { margin: 16px 0 18px; }
.hero .lead { margin: 0 0 30px; }
.hero-note { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.hero-note svg { width: 16px; height: 16px; color: var(--success); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
}

/* ---------- Teléfonos (maquetas CSS de la app) ---------- */
.phones { position: relative; display: flex; justify-content: center; min-height: 520px; }
.phone {
  width: 260px; height: 520px; border-radius: 40px; padding: 12px;
  background: #0b0b0f; border: 1px solid var(--border-strong);
  box-shadow: 0 0 80px rgba(67, 61, 242, 0.28);
  flex: none;
}
.phones .phone + .phone { margin-left: -70px; margin-top: 60px; box-shadow: 0 0 60px rgba(91, 47, 201, 0.25); }
.screen {
  height: 100%; border-radius: 30px; background: var(--canvas); overflow: hidden;
  padding: 18px 14px; display: flex; flex-direction: column; gap: 10px;
  font-size: 11px; line-height: 1.35;
}
.screen .s-top { display: flex; justify-content: space-between; align-items: center; color: var(--text-3); font-size: 10px; }
.screen .s-title { font-size: 15px; font-weight: 700; color: var(--text); }
.screen .s-sub { color: var(--text-2); font-size: 10.5px; }
.s-hero { border-radius: 18px; padding: 14px; background: var(--brand); color: #fff; }
.s-hero b { font-size: 26px; display: block; line-height: 1.1; }
.s-hero small { color: rgba(255, 255, 255, 0.82); font-size: 9.5px; letter-spacing: .08em; font-weight: 600; }
.s-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; display: flex; gap: 10px; align-items: center; }
.s-card .t { flex: 1; min-width: 0; }
.s-card .t strong { display: block; color: var(--text); font-size: 11.5px; }
.s-card .t span { color: var(--text-2); font-size: 10px; }
.s-time { border-radius: 10px; padding: 6px 8px; font-weight: 700; font-size: 11px; text-align: center; min-width: 46px; }
.s-time.ok { background: rgba(52, 216, 165, 0.16); color: var(--success); }
.s-time.wait { background: rgba(245, 179, 62, 0.18); color: var(--warning); }
.s-time.brand { background: rgba(139, 135, 255, 0.18); color: var(--primary); }
.s-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.s-chip { text-align: center; padding: 8px 0; border-radius: 10px; background: var(--surface-high); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: 10.5px; }
.s-chip.on { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 0 18px rgba(67, 61, 242, 0.45); }
.s-chip.off { opacity: .35; text-decoration: line-through; }
.s-days { display: flex; gap: 6px; }
.s-day { flex: 1; text-align: center; padding: 6px 0; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.s-day b { display: block; color: var(--text); font-size: 13px; }
.s-day.on { background: var(--surface-top); border-color: var(--primary); }
.s-day.on b { color: var(--primary); }
.s-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.s-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; }
.s-stat b { display: block; font-size: 17px; color: var(--text); }
.s-stat span { color: var(--text-3); font-size: 9.5px; }
.s-btn { margin-top: auto; text-align: center; padding: 11px; border-radius: 14px; background: var(--brand); color: #fff; font-weight: 700; font-size: 12px; box-shadow: 0 0 20px rgba(67, 61, 242, 0.4); }
.s-qr { margin: 6px auto; width: 132px; height: 132px; border-radius: 16px; background: #fff; padding: 12px; }
.s-qr i { display: block; width: 100%; height: 100%;
  background:
    conic-gradient(from 90deg at 3px 3px, #000 25%, transparent 0) 0 0 / 12px 12px,
    linear-gradient(#fff, #fff);
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 99%, transparent 100%);
  opacity: .92;
}
.s-code { text-align: center; letter-spacing: .3em; font-weight: 700; color: var(--text); font-size: 15px; }
/* En móvil no caben dos teléfonos: se muestra sólo el segundo (la app de
   clientes en la home), centrado y sin solaparse. */
@media (max-width: 560px) {
  .phones { min-height: 0; }
  .phones .phone:first-child { display: none; }
  .phones .phone + .phone { margin: 0; }
  .hero .btn-row .btn { width: 100%; }
}

/* ---------- Tarjetas y rejillas ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin: 16px 0 8px; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(139, 135, 255, 0.16); color: var(--primary);
}
.icon svg { width: 24px; height: 24px; }
.icon.coral { background: rgba(255, 138, 125, 0.16); color: var(--accent); }
.icon.green { background: rgba(52, 216, 165, 0.16); color: var(--success); }
.icon.amber { background: rgba(245, 179, 62, 0.18); color: var(--warning); }

/* Tarjetas de las dos apps */
.app-card {
  position: relative; display: flex; flex-direction: column; gap: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; overflow: hidden;
}
.app-card::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 300px; height: 300px;
  background: radial-gradient(closest-side, rgba(67, 61, 242, 0.28), transparent 70%);
}
.app-card.biz::before { background: radial-gradient(closest-side, rgba(255, 138, 125, 0.2), transparent 70%); }
.app-card > * { position: relative; }
.app-card .who { display: flex; align-items: center; gap: 14px; }
.app-card .who img { width: 56px; height: 56px; border-radius: 16px; }
.app-card .who strong { display: block; font-size: 20px; }
.app-card .tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(52, 216, 165, 0.16); color: var(--success); }
.app-card.biz .tag { background: rgba(255, 138, 125, 0.16); color: var(--accent); }
.app-card ul { margin: 0; }
.app-card .btn { align-self: flex-start; margin-top: auto; }

/* Listas con check */
.checks { list-style: none; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; color: var(--text-2); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 6px;
  background: rgba(52, 216, 165, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d8a5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.checks li strong { color: var(--text); font-weight: 600; }

/* ---------- Pasos ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.steps.three { grid-template-columns: repeat(3, 1fr); }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 16px;
  box-shadow: 0 0 22px rgba(67, 61, 242, 0.4);
}
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--text-2); font-size: 15px; }
.step .who-tag { position: absolute; top: 26px; right: 22px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
@media (max-width: 960px) { .steps, .steps.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .steps, .steps.three { grid-template-columns: 1fr; } }

/* ---------- Precio ---------- */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; max-width: 920px; margin: 0 auto; }
.price-card {
  position: relative; border-radius: var(--radius-lg); padding: 34px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 18px;
}
.price-card.featured {
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand) border-box;
  border: 2px solid transparent;
  box-shadow: 0 0 70px rgba(67, 61, 242, 0.28);
}
.price-card .badge { position: absolute; top: -13px; left: 34px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price b { font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.price span { color: var(--text-2); font-weight: 500; }
.price-card .btn { margin-top: auto; }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } }

/* ---------- Descarga ---------- */
.download {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: 0 0 80px rgba(67, 61, 242, 0.18);
}
.download img { width: 96px; height: 96px; border-radius: 24px; }
.download h3 { font-size: 1.5rem; }
.download .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 18px; font-size: 14px; color: var(--text-3); }
.download .meta b { color: var(--text-2); font-weight: 600; }
.alt-download { margin: 14px 0 0; font-size: 14px; color: var(--text-2); }
.alt-download a { font-weight: 600; }
.sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-3); word-break: break-all; margin-top: 14px; }
@media (max-width: 640px) { .download { grid-template-columns: 1fr; text-align: left; } .download img { width: 72px; height: 72px; border-radius: 18px; } }

/* ---------- Guía de instalación ---------- */
.install { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: inst; list-style: none; padding: 0; margin: 0; }
.install li { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; color: var(--text-2); font-size: 15px; }
.install li::before { counter-increment: inst; content: "Paso " counter(inst); display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; }
.install li strong { color: var(--text); }
@media (max-width: 960px) { .install { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .install { grid-template-columns: 1fr; } }

.callout { display: flex; gap: 14px; align-items: flex-start; background: rgba(245, 179, 62, 0.08); border: 1px solid rgba(245, 179, 62, 0.3); border-radius: 16px; padding: 16px 18px; color: var(--text-2); font-size: 15px; margin-top: 18px; }
.callout svg { flex: none; width: 22px; height: 22px; color: var(--warning); margin-top: 2px; }
.callout strong { color: var(--text); }

/* ---------- Contacto ---------- */
.contact-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 22px 24px; color: var(--text);
  transition: transform .15s ease, border-color .15s ease;
}
.contact-card:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--primary); }
.contact-card h3 { margin: 0 0 2px; }
.contact-card p { margin: 0; color: var(--text-2); word-break: break-all; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0 20px; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 30px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--primary); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--text-2); }

/* ---------- CTA final y pie ---------- */
.cta {
  text-align: center; border-radius: var(--radius-lg); padding: 56px 24px;
  background: radial-gradient(120% 140% at 50% 0%, rgba(67, 61, 242, 0.35), transparent 60%), var(--surface);
  border: 1px solid var(--border-strong);
}
.cta h2 { margin-bottom: 12px; }
.cta .lead { margin: 0 auto 28px; }
.cta .btn-row { justify-content: center; }

footer { border-top: 1px solid var(--border); padding: 36px 0 44px; color: var(--text-3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--text-2); }

/* Breadcrumb de subpáginas */
.crumb { font-size: 14px; color: var(--text-3); margin-bottom: 14px; }
.crumb a { color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
