/* Landing de discalia.com — misma paleta que la app (AppPalette.light).
   Hero oscuro con mockups reales de la app en marcos CSS. */
:root {
  --primary: #146c60;
  --primary-dark: #0d4f46;
  --primary-deep: #0a3d37;
  --primary-soft: #dceeea;
  --accent: #2db39c;
  --bg: #fbf6f3;
  --surface: #ffffff;
  --text: #17332e;
  --text-secondary: #5b7370;
  --border: #e3eae8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

h1, h2, h3 { font-family: "Sora", "Inter", sans-serif; line-height: 1.2; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { font-family: "Sora", sans-serif; font-weight: 700; font-size: 22px; color: var(--primary-dark); text-decoration: none; display: flex; align-items: center; }
.logo-mark { width: 34px; height: 34px; margin-right: 10px; }
.logo span { color: var(--accent); }
nav a { color: var(--text-secondary); text-decoration: none; font-size: 15px; margin-left: 22px; }
nav a:hover { color: var(--primary); }

/* ===== Hero oscuro ===== */
.hero {
  background: radial-gradient(120% 140% at 85% 10%, #17685c 0%, var(--primary-dark) 45%, var(--primary-deep) 100%);
  color: #fff;
  overflow: hidden;
  padding: 72px 0 0;
}
.hero .wrap { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.hero-text { flex: 1 1 400px; padding-bottom: 72px; }
.hero-eyebrow {
  display: inline-block; background: rgba(45, 179, 156, 0.18); color: #7fe0cd;
  border: 1px solid rgba(45, 179, 156, 0.4); border-radius: 999px;
  padding: 6px 16px; font-size: 13px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 5.4vw, 56px); margin-bottom: 18px; }
.hero p { font-size: 18px; color: #cfe4df; max-width: 46ch; margin-bottom: 26px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn-light {
  background: #fff; color: var(--primary-dark); text-decoration: none; font-weight: 600;
  border-radius: 999px; padding: 13px 26px; font-size: 16px;
}
.btn-light:hover { background: var(--primary-soft); }
.badge-soon {
  color: #9fc6bf; font-size: 14px; border: 1px dashed rgba(255,255,255,0.35);
  border-radius: 999px; padding: 10px 18px;
}

/* Abanico de móviles */
.hero-phones {
  flex: 1 1 420px; display: flex; justify-content: center; align-items: center;
  gap: 0; padding: 48px 0; position: relative;
}
.phone {
  background: #10201d; border-radius: 38px; padding: 32px 9px 9px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.08);
  position: relative; flex-shrink: 0;
}
.phone::before {
  content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 64px; height: 14px; background: #2b3d39; border-radius: 999px; z-index: 2;
}
.phone img { display: block; width: 100%; height: auto; border-radius: 6px 6px 30px 30px; }
.phone-main { width: 240px; z-index: 3; }
.phone-side { width: 190px; z-index: 2; }
.phone-left { transform: rotate(-8deg) translate(26px, 12px); }
.phone-right { transform: rotate(8deg) translate(-26px, 12px); }

/* Demo interactiva */
.gallery { padding: 48px 0 72px; }
.gallery h2 { font-size: clamp(26px, 3.5vw, 34px); color: var(--primary-dark); text-align: center; margin-bottom: 10px; }
.gallery-sub { text-align: center; color: var(--text-secondary); max-width: 58ch; margin: 0 auto 28px; }
.demo-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary);
  border-radius: 999px; padding: 9px 18px; font: 600 14px "Inter", sans-serif; cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--accent); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.demo-stage { display: flex; justify-content: center; }
.demo-phone { width: 300px; }
.demo-screen { position: relative; }
.demo-screen img { transition: opacity 0.14s ease; }
.demo-screen img.fading { opacity: 0; }
#demo-zones { position: absolute; inset: 0; }
.demo-zone {
  position: absolute; background: transparent; border: 0; cursor: pointer;
  border-radius: 14px; padding: 0;
}
.demo-zone:hover { background: rgba(45, 179, 156, 0.12); box-shadow: inset 0 0 0 2px rgba(45, 179, 156, 0.45); }
.demo-caption {
  text-align: center; color: var(--text-secondary); margin-top: 22px; font-size: 15px;
  min-height: 24px;
}

/* Stats */
.stats { background: var(--primary-deep); color: #fff; padding: 26px 0; }
.stats .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.stat { text-align: center; }
.stat b { display: block; font-family: "Sora", sans-serif; font-size: 26px; color: #7fe0cd; }
.stat span { font-size: 14px; color: #b7d4ce; }

/* ===== Features con capturas ===== */
.features { padding: 72px 0 24px; }
.features h2, .faq h2, .contact h2 { font-size: clamp(26px, 3.5vw, 34px); color: var(--primary-dark); }
.features > .wrap > h2 { text-align: center; margin-bottom: 8px; }
.features-sub { text-align: center; color: var(--text-secondary); max-width: 60ch; margin: 0 auto 48px; }

.feature-row { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; margin-bottom: 64px; }
.feature-row.reverse { flex-direction: row-reverse; }
.feature-copy { flex: 1 1 340px; }
.feature-copy h3 { font-size: 24px; color: var(--primary-dark); margin-bottom: 12px; }
.feature-copy p { color: var(--text-secondary); max-width: 52ch; margin-bottom: 14px; }
.feature-copy ul { list-style: none; }
.feature-copy li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--text); }
.feature-copy li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--primary-soft);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23146c60" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13l4 4 10-10"/></svg>');
  background-size: 10px; background-position: center; background-repeat: no-repeat;
}
.feature-shot { flex: 0 1 300px; margin: 0 auto; }
.feature-shot .phone { width: 250px; margin: 0 auto; }

/* Tarjetas pequeñas */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; padding-bottom: 48px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; }
.card h3 { font-size: 17px; color: var(--primary-dark); margin: 12px 0 8px; }
.card p { font-size: 15px; color: var(--text-secondary); }
.card svg { width: 34px; height: 34px; stroke: var(--primary); }

.disclaimer {
  background: var(--primary-soft); border-radius: 20px; padding: 24px;
  margin-bottom: 64px; font-size: 14px; color: var(--primary-dark);
}

/* ===== FAQ ===== */
.faq { padding: 8px 0 56px; }
.faq h2 { margin-bottom: 28px; }
.faq details {
  border-bottom: 1px solid var(--border); padding: 6px 0;
}
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; padding: 14px 0;
  font-family: "Sora", sans-serif; font-weight: 600; font-size: 17px; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 24px; color: var(--primary); flex-shrink: 0;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-secondary); padding: 0 0 16px; max-width: 72ch; }

/* ===== Contacto ===== */
.contact { padding: 24px 0 64px; }
.contact h2 { margin-bottom: 8px; }
.contact-sub { color: var(--text-secondary); margin-bottom: 24px; max-width: 52ch; }
#contact-form { max-width: 520px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; color: var(--primary-dark); margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); padding: 12px 14px; font: inherit; color: var(--text);
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.form-row.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#cf-send {
  background: var(--primary); color: #fff; border: 0; border-radius: 999px;
  padding: 13px 28px; font: 600 16px "Inter", sans-serif; cursor: pointer;
}
#cf-send:hover { background: var(--primary-dark); }
#cf-send:disabled { opacity: 0.6; cursor: default; }
#cf-status { margin-top: 12px; font-size: 15px; min-height: 22px; }
#cf-status.ok { color: var(--primary); font-weight: 600; }
#cf-status.err { color: #b3402a; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 28px 0; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--text-secondary); }
footer a { color: var(--text-secondary); text-decoration: none; margin-right: 16px; }
footer a:hover { color: var(--primary); }

/* Legal pages */
.legal { padding: 40px 0 64px; max-width: 760px; }
.legal h1 { font-size: 32px; color: var(--primary-dark); margin-bottom: 8px; }
.legal .updated { color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; }
.legal h2 { font-size: 21px; color: var(--primary-dark); margin: 32px 0 12px; }
.legal p, .legal li { color: var(--text); font-size: 16px; margin-bottom: 12px; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--primary); }

/* Móvil */
@media (max-width: 760px) {
  nav { display: none; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat b { font-size: 22px; }
  .hero { padding-top: 48px; }
  .hero-text { padding-bottom: 40px; }
  .hero-phones { padding: 24px 0 36px; }
  .phone-main { width: 200px; }
  .phone-side { width: 150px; }
  .demo-phone { width: 260px; }
  .feature-row, .feature-row.reverse { flex-direction: column; gap: 28px; margin-bottom: 48px; }
}
