/* ============================================================================
 * Dental Magy — Sistema de marca (mood: LUMINOSO / CLÍNICO-CONFIABLE)
 * Nunca dark/thriller: esto es salud y confianza. Tokens + componentes que
 * comparten el sitio, las 3 landings cinemáticas y las páginas de gracias.
 * Fuentes: Fraunces (display, serif cálida) + Plus Jakarta Sans (cuerpo).
 * ==========================================================================*/

:root {
  /* Paleta clínica: teal confiable + oro cálido de acento (uso escaso) */
  --dm-primary:        #0FA3B1;   /* teal clínico */
  --dm-primary-dark:   #0A7C88;
  --dm-primary-deep:   #075C66;
  --dm-primary-tint:   #E7F6F8;   /* fondo suave */
  --dm-primary-tint-2: #D2EDF0;

  --dm-gold:           #C7A34E;   /* acento premium, solo detalles */
  --dm-gold-dark:      #A9863A;

  --dm-action:         #00C853;   /* verde WhatsApp/agendar (reconocimiento) */
  --dm-action-dark:    #059B45;

  --dm-ink:            #0E1F27;   /* texto principal */
  --dm-ink-soft:       #3A4C54;
  --dm-muted:          #6B7B82;   /* texto secundario */
  --dm-line:           #E2ECEE;   /* bordes */
  --dm-bg:             #F6FAFB;   /* blanco roto con tinte frío */
  --dm-surface:        #FFFFFF;
  --dm-surface-2:      #FBFDFD;

  --dm-shadow-sm: 0 2px 10px rgba(11, 62, 68, .06);
  --dm-shadow:    0 12px 40px rgba(11, 62, 68, .10);
  --dm-shadow-lg: 0 28px 70px rgba(11, 62, 68, .16);

  --dm-radius: 18px;
  --dm-radius-lg: 28px;
  --dm-maxw: 1160px;

  --dm-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --dm-font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--dm-font-body);
  color: var(--dm-ink);
  background: var(--dm-bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--dm-primary); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--dm-font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--dm-ink);
}
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.6rem); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- Layout -------------------------------------------------------------- */
.dm-container { width: 100%; max-width: var(--dm-maxw); margin: 0 auto; padding: 0 22px; }
.dm-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--dm-font-body); font-weight: 800;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dm-primary-dark);
}
.dm-eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--dm-primary); border-radius: 2px; }

/* --- Botones ------------------------------------------------------------- */
.dm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border: none; cursor: pointer;
  font-family: var(--dm-font-body); font-weight: 800; font-size: 16px;
  border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, var(--dm-primary) 0%, var(--dm-primary-dark) 100%);
  box-shadow: 0 10px 26px rgba(15, 163, 177, .28);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, filter .2s;
  text-align: center; line-height: 1.1;
}
.dm-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15, 163, 177, .42); }
.dm-btn:active { transform: translateY(-1px) scale(.99); }

.dm-btn-action { background: linear-gradient(135deg, var(--dm-action) 0%, var(--dm-action-dark) 100%); box-shadow: 0 10px 26px rgba(0, 200, 83, .30); }
.dm-btn-action:hover { box-shadow: 0 16px 36px rgba(0, 200, 83, .45); }

.dm-btn-gold { background: linear-gradient(135deg, var(--dm-gold) 0%, var(--dm-gold-dark) 100%); color: #241a05; box-shadow: 0 10px 26px rgba(199, 163, 78, .30); }

.dm-btn-ghost {
  background: transparent; color: var(--dm-primary-dark);
  border: 1.5px solid var(--dm-primary-tint-2); box-shadow: none;
}
.dm-btn-ghost:hover { background: var(--dm-primary-tint); box-shadow: none; }

.dm-btn-lg { padding: 18px 38px; font-size: 17px; }
.dm-btn-block { width: 100%; }

/* --- Píldoras / badges --------------------------------------------------- */
.dm-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
  background: var(--dm-primary-tint); color: var(--dm-primary-deep);
}
.dm-pill-gold { background: #FBF3DE; color: var(--dm-gold-dark); }
.dm-badge-trust {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--dm-muted); font-weight: 600;
}
.dm-stars { color: var(--dm-gold); letter-spacing: 2px; }

/* --- Tarjetas ------------------------------------------------------------ */
.dm-card {
  background: var(--dm-surface); border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius); padding: 26px; box-shadow: var(--dm-shadow-sm);
}
.dm-card-soft { background: var(--dm-surface-2); }

/* ============================================================================
 * ESCENARIO CINEMÁTICO (para las landings V1/V2)
 * Mobile-first: teléfono centrado sobre fondo, 100dvh, sin scroll dentro.
 * ==========================================================================*/
.dm-cinema {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--dm-primary-tint) 0%, transparent 55%),
    linear-gradient(180deg, #EAF5F6 0%, #F6FAFB 100%);
  padding: 0;
}
.dm-stage {
  position: relative; width: 100%; max-width: 480px; min-height: 100dvh;
  background: var(--dm-surface); overflow: hidden;
  box-shadow: var(--dm-shadow-lg);
  display: flex; flex-direction: column;
}
@media (min-width: 520px) {
  .dm-cinema { padding: 22px; }
  .dm-stage { min-height: min(880px, calc(100dvh - 44px)); border-radius: 34px; }
}

/* Escena: ocupa el stage, transición por fade */
.dm-scene {
  position: absolute; inset: 0; display: none;
  flex-direction: column; padding: 30px 26px;
  opacity: 0; transition: opacity .6s ease;
}
.dm-scene.is-active { display: flex; opacity: 1; }
/* Escenas NO activas SIEMPRE ocultas (mayor especificidad que .grow/.scene-scroll
   de las páginas, que si no ponían display:flex y dejaban overlays invisibles que
   bloqueaban los clics — bug del botón "Empecemos"). */
.dm-scene:not(.is-active) { display: none !important; }

/* Efectos de firma (sutiles: es clínico, no thriller) */
.dm-bracket { position: absolute; width: 14px; height: 14px; z-index: 6; pointer-events: none; opacity: .5; }
.dm-bracket.tl { top: 16px; left: 16px; border-top: 1.5px solid var(--dm-primary); border-left: 1.5px solid var(--dm-primary); }
.dm-bracket.tr { top: 16px; right: 16px; border-top: 1.5px solid var(--dm-primary); border-right: 1.5px solid var(--dm-primary); }
.dm-bracket.bl { bottom: 16px; left: 16px; border-bottom: 1.5px solid var(--dm-primary); border-left: 1.5px solid var(--dm-primary); }
.dm-bracket.br { bottom: 16px; right: 16px; border-bottom: 1.5px solid var(--dm-primary); border-right: 1.5px solid var(--dm-primary); }

.dm-grain { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: .018;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.dm-brandmark {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 7;
  font-family: var(--dm-font-body); font-weight: 800; font-size: 11px;
  letter-spacing: .34em; text-transform: uppercase; color: var(--dm-primary-deep);
  opacity: .8; pointer-events: none;
}
/* Logo emblema en el escenario cinemático (persiste en todas las escenas) */
.dm-stage-logo {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 8;
  height: 64px; width: auto; pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)) drop-shadow(0 0 2px rgba(255,255,255,.55));
}

/* Barra de progreso del funnel (arriba del stage) */
.dm-progress { position: absolute; top: 0; left: 0; height: 3px; z-index: 8;
  background: linear-gradient(90deg, var(--dm-primary), var(--dm-primary-dark));
  width: 0; transition: width .5s cubic-bezier(.2,.8,.2,1); }

/* --- Opciones de quiz (cartas) ------------------------------------------ */
.dm-options { display: grid; gap: 12px; margin-top: 22px; }
.dm-option {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 18px; text-align: left; cursor: pointer;
  background: var(--dm-surface); border: 1.5px solid var(--dm-line);
  border-radius: 16px; font-family: var(--dm-font-body);
  font-weight: 600; font-size: 15.5px; color: var(--dm-ink);
  transition: transform .18s, border-color .18s, background .18s, box-shadow .18s;
}
.dm-option:hover { transform: translateY(-2px); border-color: var(--dm-primary); background: var(--dm-primary-tint); box-shadow: var(--dm-shadow-sm); }
.dm-option.is-picked { border-color: var(--dm-primary); background: var(--dm-primary-tint); box-shadow: 0 0 0 3px rgba(15,163,177,.14); }
.dm-option .emoji { font-size: 26px; flex-shrink: 0; line-height: 1; }

/* --- Precio -------------------------------------------------------------- */
.dm-price-box { text-align: center; }
.dm-price-old { text-decoration: line-through; color: var(--dm-muted); font-size: 1.05rem; }
.dm-price-now { font-family: var(--dm-font-display); font-weight: 600; font-size: clamp(2.2rem, 8vw, 3rem); color: var(--dm-primary-dark); line-height: 1; }
.dm-price-cur { font-size: .5em; vertical-align: super; color: var(--dm-muted); }

/* --- WhatsApp flotante --------------------------------------------------- */
.dm-wa-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 999;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--dm-action); color: #fff; box-shadow: 0 8px 26px rgba(0,200,83,.5);
  animation: dm-pulse 2.4s infinite;
}
.dm-wa-float svg { width: 30px; height: 30px; fill: #fff; }
@keyframes dm-pulse { 0% { box-shadow: 0 0 0 0 rgba(0,200,83,.55);} 70% { box-shadow: 0 0 0 16px rgba(0,200,83,0);} 100% { box-shadow: 0 0 0 0 rgba(0,200,83,0);} }

/* --- Animaciones utilitarias -------------------------------------------- */
@keyframes dm-fade-up { from { opacity: 0; transform: translateY(16px);} to { opacity: 1; transform: none;} }
.dm-fade-up { animation: dm-fade-up .6s both; }
.dm-delay-1 { animation-delay: .12s; } .dm-delay-2 { animation-delay: .24s; } .dm-delay-3 { animation-delay: .36s; }

@keyframes dm-ping { 75%, 100% { transform: scale(2); opacity: 0; } }
@keyframes dm-shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-1.5px);} 75%{transform:translateX(1.5px);} }

/* --- Agenda embebida (iframe Odontix) ----------------------------------- */
.dm-agenda-frame { width: 100%; border: 0; border-radius: var(--dm-radius); background: var(--dm-surface); min-height: 620px; box-shadow: var(--dm-shadow-sm); }
.dm-agenda-notice {
  border: 1.5px dashed var(--dm-primary-tint-2); background: var(--dm-primary-tint);
  border-radius: var(--dm-radius); padding: 22px; color: var(--dm-primary-deep);
  font-size: 14px; text-align: center;
}

/* --- Agenda NATIVA (API pública de Odontix, pintada con nuestra marca) --- */
.dm-bk { background: var(--dm-surface); border: 1px solid var(--dm-line); border-radius: var(--dm-radius); padding: 20px; box-shadow: var(--dm-shadow-sm); }
.dm-bk-head { font-family: var(--dm-font-display); font-weight: 600; font-size: 1.25rem; color: var(--dm-ink); }
.dm-bk-note { font-size: 12.5px; color: var(--dm-muted); font-weight: 600; margin: 4px 0 14px; }
.dm-bk-loading { text-align: center; color: var(--dm-muted); font-size: 14px; padding: 22px 0; font-weight: 600; }
.dm-bk-err { color: #b4463e; font-size: 13px; font-weight: 700; text-align: center; padding: 10px 0; }
.dm-bk-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.dm-bk-day { flex: 0 0 auto; padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--dm-line); background: #fff; font-weight: 700; font-size: 12.5px; color: var(--dm-ink-soft); cursor: pointer; white-space: nowrap; text-transform: capitalize; }
.dm-bk-day span { opacity: .6; font-weight: 800; }
.dm-bk-day.is-sel { background: var(--dm-primary); color: #fff; border-color: transparent; }
.dm-bk-day.is-full { color: #aeb9bd; background: #f5f8f9; border-style: dashed; }
.dm-bk-day.is-full .fx { color: #d09a9a; font-weight: 800; text-decoration: line-through; }

/* Calendario de fechas (elige el día en un mes) */
.dm-cal { margin: 6px 0 12px; }
.dm-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dm-cal-title { font-weight: 800; color: var(--dm-ink); font-size: 1.02rem; }
.dm-cal-arrow { width: 38px; height: 38px; border-radius: 11px; border: 1.5px solid var(--dm-line); background: #fff; color: var(--dm-primary-deep); font-size: 20px; font-weight: 800; cursor: pointer; line-height: 1; }
.dm-cal-arrow:disabled { opacity: .3; cursor: default; }
.dm-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dm-cal-dow { text-align: center; font-size: 11px; font-weight: 800; color: var(--dm-muted); padding: 2px 0; }
.dm-cal-cell { position: relative; min-width: 0; min-height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; border: 1.5px solid transparent; background: transparent; padding: 4px 0; font-family: inherit; color: var(--dm-ink); }
.dm-cal-dow { min-width: 0; }
.dm-cal-cell .d { font-weight: 700; line-height: 1; }
.dm-cal-cell.is-off { color: var(--dm-muted); opacity: .4; }
.dm-cal-cell.is-full { color: #aeb9bd; background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(11,62,68,.05) 4px, rgba(11,62,68,.05) 8px); }
.dm-cal-cell.is-full .mk { font-size: 7.5px; font-weight: 800; text-transform: uppercase; color: #d09a9a; margin-top: 1px; }
.dm-cal-cell.is-avail { background: var(--dm-primary-tint); color: var(--dm-primary-deep); border-color: var(--dm-primary-tint-2); cursor: pointer; }
.dm-cal-cell.is-avail:hover { background: var(--dm-primary); color: #fff; }
.dm-cal-cell.is-avail .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--dm-primary); margin-top: 3px; }
.dm-cal-cell.is-avail:hover .dot { background: #fff; }
.dm-cal-cell.is-sel { background: var(--dm-primary); color: #fff; border-color: var(--dm-primary); }
.dm-cal-cell.is-sel .dot { background: #fff; }
.dm-bk-slots-h { font-size: 13.5px; color: var(--dm-ink-soft); font-weight: 600; margin: 4px 0 10px; }
.dm-bk-slots-h b { color: var(--dm-primary-deep); text-transform: capitalize; }
.dm-bk-pick { text-align: center; color: var(--dm-muted); font-size: 14px; padding: 12px 0; }

/* Asistente de reserva por pasos (móvil-first, compatible) */
.dm-wiz-nav { display: flex; gap: 4px; margin: 4px 0 16px; }
.dm-wiz-dot { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; color: var(--dm-muted); text-align: center; line-height: 1.1; }
.dm-wiz-dot span { width: 26px; height: 26px; border-radius: 50%; background: var(--dm-line); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.dm-wiz-dot.on { color: var(--dm-primary-deep); }
.dm-wiz-dot.on span { background: var(--dm-primary); }
.dm-wiz-dot.done span { background: var(--dm-primary-deep); }
.dm-wiz-back { background: none; border: none; color: var(--dm-primary-deep); font-weight: 800; font-size: 14px; cursor: pointer; padding: 2px 0 8px; font-family: inherit; }
.dm-wiz-sum { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.dm-wiz-chip { flex: 1 1 130px; text-align: left; background: var(--dm-primary-tint); border: 1px solid var(--dm-primary-tint-2); border-radius: 12px; padding: 9px 12px; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; }
.dm-wiz-chip .l { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--dm-muted); font-weight: 800; }
.dm-wiz-chip b { color: var(--dm-ink); font-size: 14px; text-transform: capitalize; margin: 1px 0; }
.dm-wiz-chip .ch { font-size: 11px; color: var(--dm-primary-deep); font-weight: 800; }
.dm-bk-sub { font-size: 14px; color: var(--dm-ink-soft); font-weight: 600; margin-bottom: 8px; }
.dm-bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; margin-top: 14px; }
.dm-bk-slot { padding: 10px 0; border-radius: 10px; border: 1.5px solid var(--dm-line); background: #fff; font-weight: 700; font-size: 14px; color: var(--dm-ink); cursor: pointer; transition: all .15s; }
.dm-bk-slot:hover { border-color: var(--dm-primary); background: var(--dm-primary-tint); }
.dm-bk-slot.is-sel { background: var(--dm-primary); color: #fff; border-color: transparent; }
.dm-bk-slot.is-busy { background: #f5f8f9; border-color: #eef2f3; color: #b7c2c6; cursor: not-allowed; padding: 6px 0 5px; display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.05; }
.dm-bk-slot.is-busy s { color: #b7c2c6; }
.dm-bk-slot.is-busy em { font-style: normal; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #d09a9a; }
.dm-bk-form { margin-top: 16px; display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--dm-line); }
.dm-bk-input { width: 100%; height: 46px; border: 1.5px solid var(--dm-line); border-radius: 12px; padding: 0 14px; font-size: 15px; font-family: var(--dm-font-body); color: var(--dm-ink); background: #fff; }
.dm-bk-input:focus { outline: none; border-color: var(--dm-primary); box-shadow: 0 0 0 3px rgba(15,163,177,.12); }
.dm-bk-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.dm-bk.dm-bk-done { text-align: center; }
.dm-bk-check { width: 56px; height: 56px; border-radius: 50%; background: var(--dm-primary-tint); color: var(--dm-primary-dark); font-size: 28px; font-weight: 900; display: flex; align-items: center; justify-content: center; margin: 4px auto 12px; }
.dm-bk-done h3 { color: var(--dm-primary-deep); }
.dm-bk-done p { color: var(--dm-ink-soft); font-size: 14px; margin-top: 6px; }
.dm-bk-gift a { color: var(--dm-primary-dark); font-weight: 800; text-decoration: underline; }
.dm-bk-deliver { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--dm-line); text-align: left; }
.dm-bk-gift-t { font-weight: 800; font-size: 14px; color: var(--dm-gold-dark); }
.dm-bk-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dm-bk-emailnote { font-size: 12px; color: var(--dm-muted); margin-top: 10px; }

/* --- Bloque compartido: oferta + regalo + agenda (V1/V2/V3) -------------- */
.dm-offer-card { background: var(--dm-primary-tint); border: 1px solid var(--dm-primary-tint-2); border-radius: 20px; padding: 20px; text-align: center; }
.dm-obj-note { background: #fff; border-left: 3px solid var(--dm-primary); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--dm-ink-soft); text-align: left; font-weight: 600; }
.dm-gift-card { background: linear-gradient(135deg, #FBF6E6 0%, #F7EFD6 100%); border: 1px solid #EBDCAF; border-radius: 20px; padding: 20px; text-align: left; display: flex; gap: 14px; align-items: center; }
.dm-gift-emoji { font-size: 34px; flex-shrink: 0; }
.dm-mini-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.dm-trust-row { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-top: 14px; font-size: 12px; color: var(--dm-muted); font-weight: 600; }
.dm-footer-legal { font-size: 10.5px; color: var(--dm-muted); text-align: center; line-height: 1.5; padding: 14px 0 4px; }
.dm-wa-ico { width: 20px; height: 20px; fill: currentColor; }
.dm-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* --- Accesibilidad: menos movimiento ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .dm-wa-float { animation: none; }
}
