/* Sitio público de Comandify (landing, demostración y páginas legales). HTML estático servido por NginX. */
:root {
  --brand-50: #faf6f1;
  --brand-100: #f1e6da;
  --brand-200: #e2cbb3;
  --brand-500: #9f6c42;
  --brand-600: #855632;
  --brand-700: #6c4429;
  --espresso: #2b1d14;
  --espresso-2: #3a2a1f;
  --saffron: #e9a23b;
  --surface: #f6f3ef;
  --card: #ffffff;
  --text: #1c1917;
  --text-2: #57534e;
  --muted: #8a837d;
  --border: #e7e5e4;
  --green: #047857;
  --danger: #be123c;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(28 25 23 / 0.05), 0 12px 32px -12px rgb(43 29 20 / 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-700); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: 15px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--brand-200); }
.btn-light { background: #fff; color: var(--espresso); }
.btn-light:hover { background: var(--brand-50); }
.btn-ghost-light { color: #fff; border-color: rgb(255 255 255 / 0.3); background: transparent; }
.btn-ghost-light:hover { border-color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---------- Encabezado ---------- */
.header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(246 243 239 / 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(231 229 228 / 0.7);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-600); display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--text); }
.nav .btn { color: #fff; padding: 9px 18px; }
@media (max-width: 860px) {
  .nav a:not(.btn) { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--brand-100); color: var(--brand-700); font-weight: 700; font-size: 13px;
}
.hero h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 800; margin: 18px 0 18px; }
.hero h1 span { color: var(--brand-600); }
.lead { font-size: 18px; color: var(--text-2); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--muted); }
.hero-visual { position: relative; padding-bottom: 36px; }
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
}

/* Marco de navegador con captura del portal */
.browser { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #f5f5f4; border-bottom: 1px solid var(--border); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d6d3d1; }
.browser-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); background: #fff; border-radius: 6px; padding: 2px 10px; }
.browser img { width: 100%; height: auto; aspect-ratio: 1568 / 700; }

/* Marco de teléfono */
.phone {
  width: 210px; border-radius: 30px; padding: 8px; background: #1c1917; box-shadow: var(--shadow);
}
.phone-screen { border-radius: 23px; overflow: hidden; background: var(--surface); color: var(--text); text-align: left; aspect-ratio: 9 / 19.5; position: relative; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hero-visual .phone { position: absolute; right: -8px; bottom: 0; width: 170px; }
@media (max-width: 560px) {
  .hero-visual .phone { width: 128px; right: -4px; }
}

/* Pantalla de app dibujada con CSS (hasta tener capturas del teléfono) */
.ui { padding: 14px 10px; font-size: 10px; height: 100%; display: flex; flex-direction: column; gap: 7px; }
.ui-title { font-weight: 800; font-size: 15px; }
.ui-sub { color: var(--muted); font-size: 9px; margin-top: -6px; }
.ui-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ui-table { background: #fff; border: 1.5px solid #a7f3d0; border-radius: 9px; padding: 7px; }
.ui-table b { font-size: 13px; display: block; }
.ui-table small { font-weight: 700; color: var(--green); }
.ui-table.busy { border-color: var(--brand-200); background: var(--brand-50); }
.ui-table.busy small { color: var(--brand-700); }
.ui-table.bill { border-color: #fcd34d; background: #fffbeb; }
.ui-table.bill small { color: #b45309; }
.ui-card { background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 7px; }
.ui-row { display: flex; justify-content: space-between; gap: 6px; padding: 3px 0; }
.ui-pill { border-radius: 999px; padding: 1px 6px; font-weight: 700; font-size: 8px; background: #e0f2fe; color: #0369a1; }
.ui-pill.ok { background: #d1fae5; color: var(--green); }
.ui-pill.rep { background: #ede9fe; color: #6d28d9; }
.ui-btn { margin-top: auto; background: var(--brand-600); color: #fff; text-align: center; border-radius: 8px; padding: 7px; font-weight: 700; }
.ui-tabs { display: flex; justify-content: space-around; border-top: 1px solid var(--border); padding-top: 6px; color: var(--muted); font-size: 8px; font-weight: 600; }
.ui-tabs .on { color: var(--brand-600); }

/* ---------- Franja de confianza ---------- */
.strip { padding: 22px 0 8px; }
.strip .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.strip span { display: inline-flex; align-items: center; gap: 8px; }
.strip svg { width: 18px; height: 18px; color: var(--brand-600); }

/* ---------- Secciones ---------- */
.section { padding: 84px 0; }
.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; margin-top: 12px; }
.section-head p { margin-top: 14px; color: var(--text-2); font-size: 17px; }
.kicker { color: var(--brand-600); font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; margin-bottom: 16px; }
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 18px; font-weight: 700; }
.feature p { margin-top: 8px; color: var(--text-2); font-size: 15px; }

/* Bloques de pantalla + texto */
.showcase { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.showcase + .showcase { margin-top: 80px; }
.showcase.flip > :first-child { order: 2; }
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; gap: 28px; }
  .showcase.flip > :first-child { order: 0; }
}
.showcase h3 { font-size: 28px; font-weight: 800; margin-top: 10px; }
.showcase p { color: var(--text-2); margin-top: 12px; font-size: 16px; }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; color: var(--text-2); }
.checks li::before {
  content: ''; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: var(--brand-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23855632' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Sección oscura de la app */
.dark { background: var(--espresso); color: #f5efe8; }
.dark .section-head p, .dark .role p { color: #cdbfb1; }
.dark .kicker { color: var(--saffron); }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .roles { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }
.role { text-align: center; }
.role .phone { margin: 0 auto 22px; }
.role h3 { font-size: 20px; font-weight: 700; }
.role p { margin-top: 8px; font-size: 15px; }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; counter-increment: step; }
.step::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-600); color: #fff; font-weight: 800; margin-bottom: 14px;
}
.step h3 { font-size: 18px; }
.step p { margin-top: 8px; color: var(--text-2); font-size: 15px; }

/* Plan */
.plan { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; background: var(--card); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
@media (max-width: 860px) { .plan { grid-template-columns: 1fr; } }
.plan-body { padding: 36px; }
.plan-body h3 { font-size: 26px; font-weight: 800; }
.plan-body .checks { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .plan-body .checks { grid-template-columns: 1fr; } }
.plan-cta { padding: 36px; background: var(--brand-50); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.plan-cta p { color: var(--text-2); }
.plan-cta .big { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1.2; }

/* Preguntas frecuentes */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; }
.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: '+'; color: var(--brand-600); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 10px; color: var(--text-2); }

/* Llamado final */
.cta { background: linear-gradient(135deg, var(--brand-700), var(--espresso)); color: #fff; border-radius: 28px; padding: 56px 40px; text-align: center; }
.cta h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; }
.cta p { margin: 14px auto 0; max-width: 560px; color: #ead9c8; font-size: 17px; }
.cta .hero-actions { justify-content: center; }

/* ---------- Pie ---------- */
.footer { padding: 48px 0 32px; color: var(--text-2); font-size: 14px; }
.footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .footer .container { grid-template-columns: 1fr; } }
.footer h4 { margin: 0 0 10px; color: var(--text); font-size: 14px; }
.footer a { color: var(--text-2); text-decoration: none; display: block; padding: 3px 0; }
.footer a:hover { color: var(--brand-700); }
.footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 20px; color: var(--muted); font-size: 13px; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 10px 24px -6px rgb(0 0 0 / 0.35);
}
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Páginas de texto y formularios ---------- */
.page { padding: 48px 0 72px; }
.page .container { max-width: 800px; }
.doc { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: clamp(24px, 4vw, 44px); }
.doc h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; }
.doc .updated { color: var(--muted); font-size: 14px; margin-top: 8px; }
.doc h2 { font-size: 20px; margin: 30px 0 10px; }
.doc h3 { font-size: 16px; margin: 18px 0 6px; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 10px; }
.doc ul { padding-left: 20px; margin: 8px 0; }
.doc li + li { margin-top: 4px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.doc th, .doc td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { background: var(--brand-50); color: var(--text); }
.table-wrap { overflow-x: auto; }

.form { display: grid; gap: 16px; margin-top: 24px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form label small { color: var(--muted); font-weight: 500; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--border);
  background: #fff; color: var(--text);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brand-200); border-color: var(--brand-500); }
.form textarea { min-height: 110px; resize: vertical; }
.form .error { color: var(--danger); font-size: 13px; margin-top: 4px; min-height: 0; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: #fff1f2; color: var(--danger); border-radius: 11px; padding: 12px 14px; font-size: 14px; }
.sent { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 16px; padding: 24px; margin-top: 24px; }
.sent h2 { margin: 0 0 8px; color: var(--green); font-size: 20px; }
.note { background: var(--brand-50); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--text-2); margin-top: 16px; }
