/* Página /ejemplo — landing de una clínica FICTICIA. Hereda styles.css y cambia el acento. */
body.ej {
  --accent: #0b6f78;
  --accent-fill: #0b6f78;
  --accent-soft: rgba(11, 111, 120, 0.1);
  --accent-glow: 11, 111, 120;
  --mesh-a: 13, 148, 136;
  --mesh-b: 56, 189, 248;
  --mesh-c: 45, 212, 191;
  --mesh-d: 253, 230, 138;
}
@media not all /* modo oscuro desactivado: la web va siempre en blanco */ {
  body.ej {
    --accent: #5fd4c8;
    --accent-fill: #0d7f89;
    --accent-soft: rgba(95, 212, 200, 0.13);
    --mesh-d: 14, 116, 144;
  }
}
.ej .grad-text { background-image: linear-gradient(100deg, #0b6f78 10%, #0891b2 60%, #0d9488 100%); }
@media not all /* modo oscuro desactivado: la web va siempre en blanco */ { .ej .grad-text { background-image: linear-gradient(100deg, #7ee7dc 10%, #7dd3fc 60%, #99f6e4 100%); } }

/* Cartel de demostración, siempre visible */
.demo-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 70;
  padding-top: env(safe-area-inset-top, 0px);
  background: #fde68a; color: #422006;
  font-size: 0.85rem; font-weight: 600;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.demo-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2.5rem; }
.demo-bar a { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; padding: 0.4rem 0; }
.demo-bar .tag { display: inline-flex; align-items: center; gap: 0.45rem; }
.demo-bar .tag i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #b45309; flex: none; }
.ej .nav { top: calc(2.5rem + env(safe-area-inset-top, 0px)); padding-top: 0; }
.ej { --demo-h: 2.5rem; }
.ej .hero { padding-top: calc(var(--nav-h) + var(--demo-h) + env(safe-area-inset-top, 0px) + 2rem); }
.ej .brand-mark { background: linear-gradient(140deg, #14b8a6, #0b6f78 60%, #064e55); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 8px rgba(11,111,120,.35); }

/* Hero con ilustración */
.ej-hero { text-align: left; }
.ej-hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 940px) { .ej-hero-grid { grid-template-columns: 1.1fr 0.9fr; } }
.ej-hero h1 { margin-inline: 0; max-width: 13ch; font-size: clamp(2.6rem, 7vw, 5.25rem); }
.ej-hero .lead { margin-inline: 0; }
.ej-hero .btn-row { justify-content: flex-start; }
@media (max-width: 939px) {
  .ej-hero { text-align: center; }
  .ej-hero h1, .ej-hero .lead { margin-inline: auto; }
  .ej-hero .btn-row { justify-content: center; }
}

.implant-card {
  position: relative; margin-inline: auto; width: min(100%, 26rem); aspect-ratio: 4 / 5;
  border-radius: 40px; isolation: isolate; overflow: hidden;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-lg);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  display: grid; place-items: center;
}
.implant { width: 44%; height: auto; overflow: visible; }
.implant .p { transform-box: fill-box; transform-origin: center; opacity: 0; }
.implant .p-crown { transform: translateY(-60px); animation: pieceIn 1100ms var(--spring-bouncy) 500ms forwards; }
.implant .p-abut { transform: translateY(-40px); animation: pieceIn 1000ms var(--spring-bouncy) 350ms forwards; }
.implant .p-screw { transform: translateY(40px); animation: pieceIn 1000ms var(--spring-bouncy) 200ms forwards; }
@keyframes pieceIn { to { opacity: 1; transform: none; } }
.implant-float { animation: floatY 7s ease-in-out 1.6s infinite alternate; }
.implant-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.8rem; border-radius: 14px; font-size: 0.8rem; font-weight: 600;
  background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--glass-edge), var(--shadow-md);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.implant-chip svg { width: 1rem; height: 1rem; color: var(--accent); }
.implant-chip.c1 { left: 6%; top: 6%; }
.implant-chip.c2 { right: 5%; top: 47%; }
.implant-chip.c3 { left: 7%; bottom: 7%; }

/* Anatomía (vista explotada con scroll) */
.anatomy { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .anatomy { grid-template-columns: 1fr 1fr; } }
.anatomy-figure { position: relative; display: grid; place-items: center; min-height: 26rem; }
.anatomy-figure svg { width: min(56%, 15rem); overflow: visible; }
.anatomy-figure .x { transform-box: fill-box; transform-origin: center; will-change: transform; }
.parts { display: grid; gap: 0.75rem; }
.part { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.25rem 1.4rem; border-radius: 22px; background: var(--bg-elev); box-shadow: var(--shadow-md); }
.part .n { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.875rem; }
.part b { display: block; font-size: 1.1rem; letter-spacing: -0.02em; }
.part span { color: var(--text-2); font-size: 0.95rem; }

/* Incluye */
.includes { display: grid; gap: 0.75rem; }
@media (min-width: 720px) { .includes { grid-template-columns: 1fr 1fr; } }
.includes li { display: flex; gap: 0.85rem; align-items: flex-start; padding: 1.15rem 1.25rem; border-radius: 20px; background: var(--bg-elev); box-shadow: var(--shadow-sm); }
.includes svg { flex: none; width: 1.4rem; height: 1.4rem; padding: 0.2rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }

/* Formulario de demostración */
.form-card { max-width: 40rem; margin-inline: auto; padding: clamp(1.75rem, 5vw, 3rem); border-radius: 32px; background: var(--bg-elev); box-shadow: var(--shadow-lg); }
.field { display: grid; gap: 0.4rem; margin-top: 1rem; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field input, .field select {
  height: 3.25rem; padding: 0 1rem; border-radius: 14px; border: 0;
  background: var(--bg-sunken); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hair-strong);
  transition: box-shadow 200ms ease;
}
.field input:focus-visible, .field select:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); border-radius: 14px; }
.form-card .btn { width: 100%; margin-top: 1.5rem; }
.demo-msg { margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 14px; background: #fde68a; color: #422006; font-weight: 600; font-size: 0.95rem; }
.demo-msg:focus { outline: none; }

.cta-float {
  position: fixed; z-index: 60; left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 140%); opacity: 0; pointer-events: none;
  transition: opacity 300ms var(--ease-out), transform 700ms var(--spring-bouncy);
}
.cta-float.is-visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.cta-float .btn { box-shadow: 0 12px 30px rgba(var(--accent-glow), .4); }
@media (prefers-reduced-motion: reduce) {
  .implant .p { animation: rmFade 250ms ease forwards !important; transform: none !important; }
  .cta-float { transition: opacity 200ms ease; transform: translate(-50%, 0); }
  .anatomy-figure .x { transform: none !important; }
}

.show-sm { display: none; }
@media (max-width: 560px) { .hide-sm { display: none; } .show-sm { display: inline; } .demo-bar { font-size: 0.8rem; } }
