/* =========================================================================
   DentalFLOW — Landing comercial
   Identidad "Clínico Sereno". CSS propio, sin dependencias ni build.
   ========================================================================= */

:root {
  /* Base */
  --bg: #f3f7f7;
  --surface: #ffffff;
  --surface-2: #eaf1f2;
  --border: #dbe6e7;
  --text: #11272b;
  --muted: #5c7177;

  /* Primario (teal) */
  --primary: #0e8a8f;
  --primary-600: #0a6e72;
  --primary-700: #0a4d52;
  --primary-tint: #def0f0;
  --on-primary: #ffffff;

  /* Acentos / estados */
  --accent: #3f7fc2;
  --accent-tint: #e2ecf8;
  --ok: #1e9e6a;
  --ok-tint: #dff3ea;
  --warn: #c98717;
  --warn-tint: #fbeed6;
  --danger: #d8553f;
  --danger-tint: #fae3dd;
  --purple: #7a5ac9;
  --purple-tint: #ece6f8;

  /* WhatsApp */
  --wa: #25d366;
  --wa-600: #1da851;

  /* Superficie oscura (secciones "invertidas") */
  --dark: #0c2529;
  --dark-2: #0f2e33;
  --dark-border: #1d454b;

  /* Radios */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-2xl: 34px;

  /* Sombras */
  --shadow: 0 1px 2px rgba(13, 42, 46, 0.04), 0 10px 28px -14px rgba(13, 42, 46, 0.14);
  --shadow-lg: 0 24px 56px -26px rgba(13, 42, 46, 0.26);

  --font-display: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;

  --maxw: 1140px;
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; color: var(--text); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: 12.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary-600);
}
.eyebrow.on-tint { color: var(--primary); }
.section-head { max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin-top: 12px; }
.section-head p { color: var(--muted); font-size: 18px; margin-top: 16px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  padding: 14px 22px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 20px -10px rgba(14, 138, 143, 0.7); }
.btn-primary:hover { background: var(--primary-600); }
.btn-wa { background: var(--wa); color: #04321a; }
.btn-wa:hover { background: var(--wa-600); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-600); background: var(--surface); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.22); }
.btn-ghost-light:hover { background: rgba(255,255,255,.15); }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn-block { width: 100%; }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 247, 247, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(243, 247, 247, 0.92); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 9px; }
.wordmark .logo { width: 30px; height: 30px; }
.wordmark .n1 { color: var(--text); }
.wordmark .n2 { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { font-weight: 600; font-size: 15px; color: var(--muted); padding: 8px 12px; border-radius: var(--r-sm); transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .btn { padding: 10px 18px; font-size: 15px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--r-sm); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* Mobile menu */
.mobile-menu { display: none; }
@media (max-width: 900px) {
  .nav-links, .nav-cta > .btn-outline { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  /* En celulares el CTA del header vive en el menú hamburguesa: evita overflow */
  .nav-cta .btn-primary { display: none; }
}
@media (max-width: 900px) {
  .mobile-menu {
    display: block; position: fixed; inset: 68px 0 auto 0; z-index: 49;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: 14px 22px 22px;
    transform: translateY(-120%); transition: transform .28s cubic-bezier(.4,0,.2,1); visibility: hidden;
  }
  .mobile-menu.open { transform: translateY(0); visibility: visible; }
  .mobile-menu a { display: block; padding: 13px 6px; font-weight: 600; font-size: 17px; border-bottom: 1px solid var(--surface-2); color: var(--text); }
  .mobile-menu .btn { margin-top: 16px; }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(14,138,143,.18), transparent 60%),
    radial-gradient(760px 420px at 8% 0%, rgba(63,127,194,.10), transparent 55%),
    linear-gradient(180deg, #eaf6f5 0%, var(--bg) 62%);
  background-color: #e9f5f4;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding-block: clamp(40px, 6vw, 74px); }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); margin-top: 18px; }
.hero h1 .hl { color: var(--primary); }
.hero-sub { font-size: clamp(17px, 2vw, 20px); color: var(--muted); margin-top: 20px; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 30px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.hero-badge svg { width: 20px; height: 20px; color: var(--primary); flex: none; }

/* Hero visual (phones + floating cards) */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 520px; }
.phone {
  border-radius: 40px; background: #0c2529; padding: 9px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(13,42,46,.2);
}
.phone > img { border-radius: 32px; display: block; width: 100%; }
.phone.bare { padding: 0; background: transparent; border: none; box-shadow: var(--shadow-lg); border-radius: 42px; overflow: hidden; }
.phone.bare > img { border-radius: 42px; }
.hero-phone-front { width: 258px; position: relative; z-index: 3; transform: rotate(-3deg); }
.hero-phone-back { width: 216px; position: absolute; right: 2%; top: 12%; z-index: 1; transform: rotate(6deg); opacity: .98; }
.float-card {
  position: absolute; z-index: 4; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 12px 15px;
  display: flex; align-items: center; gap: 11px; font-size: 13.5px;
}
.float-card .fc-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.float-card .fc-ico svg { width: 19px; height: 19px; }
.float-card strong { font-family: var(--font-display); font-size: 14px; display: block; }
.float-card span { color: var(--muted); font-size: 12.5px; }
.fc-confirm { left: -4%; top: 16%; }
.fc-confirm .fc-ico { background: var(--ok-tint); color: var(--ok); }
.fc-remind { right: -2%; bottom: 12%; }
.fc-remind .fc-ico { background: var(--primary-tint); color: var(--primary-600); }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-visual { min-height: 440px; margin-top: 18px; }
  .hero-badges { gap: 14px 20px; }
}
@media (max-width: 520px) {
  .hero-phone-front { width: 210px; }
  .hero-phone-back { width: 168px; right: 4%; }
  .float-card { padding: 9px 12px; }
  .fc-confirm { left: 0; }
  .fc-remind { right: 0; }
}

/* =========================================================================
   Trust strip
   ========================================================================= */
.trust { border-block: 1px solid var(--border); background: var(--surface); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-block: 22px; }
.trust-item { display: flex; align-items: center; gap: 11px; justify-content: center; font-weight: 600; font-size: 14.5px; color: var(--text); }
.trust-item svg { width: 22px; height: 22px; color: var(--primary); flex: none; }
@media (max-width: 760px) { .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 8px; } .trust-item { justify-content: flex-start; } }

/* =========================================================================
   Cards / grids genéricos
   ========================================================================= */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-ico { width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center; margin-bottom: 16px; }
.card-ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 18.5px; }
.card p { color: var(--muted); font-size: 15.5px; margin-top: 8px; }

.ico-teal { background: var(--primary-tint); color: var(--primary-600); }
.ico-blue { background: var(--accent-tint); color: var(--accent); }
.ico-green { background: var(--ok-tint); color: var(--ok); }
.ico-amber { background: var(--warn-tint); color: var(--warn); }
.ico-red { background: var(--danger-tint); color: var(--danger); }
.ico-purple { background: var(--purple-tint); color: var(--purple); }

.grid { display: grid; gap: 20px; margin-top: 44px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; } }

/* Problema: la 5ta tarjeta ocupa fila propia en desktop de 3 cols -> usar auto-fit */
.problem-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* =========================================================================
   Pasos (solución)
   ========================================================================= */
.step { position: relative; overflow: hidden; }
.step .step-n { font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: .1em; color: var(--primary); }
.step h3 { font-size: 20px; margin-top: 10px; }
.step p { color: var(--muted); font-size: 15.5px; margin-top: 10px; }
.step .ghost-n { position: absolute; right: 14px; top: -14px; font-family: var(--font-display); font-weight: 800; font-size: 96px; color: var(--surface-2); z-index: 0; line-height: 1; }
.step > * { position: relative; z-index: 1; }

/* =========================================================================
   Funcionalidades (filas alternadas)
   ========================================================================= */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 76px); align-items: center; padding-block: clamp(34px, 5vw, 56px); }
.feature:nth-child(even) .feature-media { order: 2; }
.feature-eyebrow { color: var(--primary-600); font-family: var(--font-display); font-weight: 700; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; }
.feature h3 { font-size: clamp(23px, 3vw, 31px); margin-top: 12px; }
.feature > .feature-body > p { color: var(--muted); font-size: 17px; margin-top: 14px; }
.feature-list { list-style: none; margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.feature-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 15.5px; }
.feature-list li svg { width: 21px; height: 21px; color: var(--primary); flex: none; margin-top: 1px; }
.feature-media { display: flex; justify-content: center; }
.feature-media .phone { width: 290px; }
.feature-media .phone.bare { width: 300px; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 30px; }
  .feature:nth-child(even) .feature-media { order: 0; }
  .feature-media .phone, .feature-media .phone.bare { width: 250px; }
}

/* Banda "En camino" */
.roadmap { margin-top: 46px; background: var(--dark); color: #eaf4f4; border-radius: var(--r-2xl); padding: clamp(30px, 5vw, 48px); text-align: center; }
.roadmap h3 { color: #fff; font-size: clamp(21px, 3vw, 27px); }
.roadmap p { color: #9fc0c1; max-width: 620px; margin: 12px auto 0; font-size: 16px; }
.roadmap-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700;
  font-size: 12.5px; letter-spacing: .06em; padding: 9px 16px; border-radius: 999px;
  background: var(--dark-2); border: 1px solid var(--dark-border); color: #bfe0e0;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }

/* =========================================================================
   Sección oscura (Por qué)
   ========================================================================= */
.dark-section { background: var(--dark); color: #e7f2f2; }
.dark-section .eyebrow { color: #63c7c9; }
.dark-section h2 { color: #fff; font-size: clamp(28px, 4vw, 42px); margin-top: 12px; }
.dark-card { background: var(--dark-2); border: 1px solid var(--dark-border); border-radius: var(--r-lg); padding: 24px; }
.dark-card .card-ico { background: rgba(14,138,143,.22); color: #63c7c9; }
.dark-card h3 { color: #fff; font-size: 18.5px; }
.dark-card p { color: #9fc0c1; font-size: 15.5px; margin-top: 8px; }
.dark-quote { margin-top: 34px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2.6vw, 27px); color: #cbe7e7; max-width: 860px; margin-inline: auto; line-height: 1.35; }
.dark-quote b { color: #fff; }

/* =========================================================================
   Seguridad
   ========================================================================= */
.security-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-top: 44px; align-items: stretch; }
.security-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sec-item { display: flex; gap: 13px; align-items: flex-start; }
.sec-item .sec-ico { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--primary-tint); color: var(--primary-600); display: grid; place-items: center; flex: none; }
.sec-item .sec-ico svg { width: 21px; height: 21px; }
.sec-item h4 { font-family: var(--font-display); font-size: 16px; }
.sec-item p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.ley-card { background: linear-gradient(160deg, var(--primary-700), var(--primary-600)); color: #eafafa; border-radius: var(--r-lg); padding: 30px; display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow-lg); }
.ley-card .ley-ico { width: 52px; height: 52px; border-radius: var(--r-md); background: rgba(255,255,255,.15); display: grid; place-items: center; margin-bottom: 18px; }
.ley-card .ley-ico svg { width: 28px; height: 28px; color: #fff; }
.ley-card h3 { color: #fff; font-size: 21px; }
.ley-card p { color: #cdeeee; font-size: 15px; margin-top: 12px; }
@media (max-width: 860px) { .security-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .security-list { grid-template-columns: 1fr; } }

/* =========================================================================
   CTA final + formulario
   ========================================================================= */
.cta-final { background: linear-gradient(155deg, var(--primary) 0%, var(--primary-700) 100%); border-radius: var(--r-2xl); color: #fff; padding: clamp(34px, 6vw, 64px); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta-final::after { content: ""; position: absolute; width: 460px; height: 460px; right: -140px; top: -180px; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%); }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 56px); align-items: center; position: relative; z-index: 1; }
.cta-final .eyebrow { color: #b9ecec; }
.cta-final h2 { color: #fff; font-size: clamp(28px, 4vw, 42px); margin-top: 12px; }
.cta-final > .cta-grid > .cta-copy > p { color: #d5f2f2; font-size: 17px; margin-top: 16px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.cta-micro { margin-top: 18px; font-size: 13.5px; color: #bfeaea; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.lead-form { background: var(--surface); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-lg); }
.lead-form h3 { color: var(--text); font-size: 20px; }
.lead-form p.hint { color: var(--muted); font-size: 14px; margin-top: 6px; }
.field { margin-top: 14px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; color: var(--text); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font-family: var(--font-sans); font-size: 15.5px; color: var(--text);
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r-md);
  padding: 12px 14px; transition: border-color .15s, background .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.field textarea { resize: vertical; min-height: 84px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lead-form .btn { margin-top: 18px; }
.form-note { font-size: 12px; color: var(--muted); margin-top: 12px; text-align: center; }
.form-status { display: none; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14.5px; font-weight: 600; }
.form-status.ok { display: block; background: var(--ok-tint); color: #0f6b45; border: 1px solid #bfe6d3; }
.form-status.err { display: block; background: var(--danger-tint); color: #a13a27; border: 1px solid #f0c4ba; }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } }

/* =========================================================================
   FAQ
   ========================================================================= */
.faq-list { margin-top: 40px; max-width: 820px; margin-inline: auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 16.5px; color: var(--text);
  padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-q .chev { width: 22px; height: 22px; flex: none; color: var(--primary); transition: transform .25s ease; }
.faq-item.open .faq-q .chev { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 20px 18px; color: var(--muted); font-size: 15.5px; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--dark); color: #b7d3d3; padding-block: 56px 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.footer-brand .wordmark { color: #fff; }
.footer-brand .wordmark .n1 { color: #fff; }
.footer-brand .wordmark .n2 { color: #63c7c9; }
.footer-brand p { color: #8fb4b4; font-size: 14.5px; margin-top: 14px; max-width: 320px; }
.footer-col h4 { font-family: var(--font-display); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #63c7c9; margin-bottom: 14px; }
.footer-col a, .footer-col span { display: block; color: #b7d3d3; font-size: 14.5px; padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--dark-border); margin-top: 40px; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: #7ea6a6; font-size: 13px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Reveal on scroll — solo se oculta si hay JS (html.js). Sin JS, todo visible. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
