/* ============================================
   Odontosys — Hoja de estilos principal
   Diseño minimalista, mobile-first
   ============================================ */

:root {
  --azul: #006aff;
  --azul-claro: #3389ff;
  --azul-oscuro: #0050c8;
  --fondo: #ffffff;
  --fondo-alt: #f9fbff;
  --texto: #111827;
  --texto-suave: #5b6472;
  --borde: #e5eaf2;
  --blanco: #ffffff;
  --radio: 14px;
  --radio-sm: 10px;
  --sombra: 0 8px 30px rgba(17, 38, 80, 0.08);
  --sombra-suave: 0 2px 10px rgba(17, 38, 80, 0.06);
  --transicion: 0.25s ease;
  --ancho-max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  width: min(var(--ancho-max), 92%);
  margin-inline: auto;
}

.container--narrow { max-width: 760px; }

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transicion);
  white-space: nowrap;
}

.btn--lg { padding: 0.9rem 1.8rem; font-size: 1rem; }

.btn--primary {
  background: var(--azul);
  color: var(--blanco);
  box-shadow: 0 4px 14px rgba(0, 106, 255, 0.35);
}
.btn--primary:hover { background: var(--azul-oscuro); transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--azul);
  border-color: var(--azul);
}
.btn--ghost:hover { background: rgba(0, 106, 255, 0.07); }

.btn--light {
  background: var(--blanco);
  color: var(--azul);
}
.btn--light:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }

.btn--outline {
  background: transparent;
  color: var(--blanco);
  border-color: rgba(255, 255, 255, 0.6);
}
.btn--outline:hover { background: rgba(255, 255, 255, 0.12); }

/* ===== Badge ===== */
.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--azul);
  background: rgba(0, 106, 255, 0.08);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--transicion);
}
.header.is-scrolled { box-shadow: var(--sombra-suave); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--texto);
}
.brand__logo { width: 38px; height: 38px; border-radius: 9px; }
.brand__name { font-size: 1.25rem; font-weight: 400; letter-spacing: -0.02em; }
.brand__name strong { font-weight: 800; color: var(--azul); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav__link {
  text-decoration: none;
  color: var(--texto-suave);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transicion);
}
.nav__link:hover { color: var(--azul); }

/* Hamburguesa (solo mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--texto);
  border-radius: 2px;
  transition: var(--transicion);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(180deg, var(--fondo-alt) 0%, var(--fondo) 100%);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  gap: 3rem;
  padding-block: 4rem 5rem;
  align-items: center;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 1.2rem;
}
.hero__title em {
  font-style: normal;
  color: var(--azul);
  position: relative;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--texto-suave);
  max-width: 54ch;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.2rem;
}

.hero__trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  font-size: 0.88rem;
  color: var(--texto-suave);
}
.hero__trust li::before {
  content: "✓";
  color: var(--azul);
  font-weight: 700;
  margin-right: 0.45rem;
}

/* Mockup de agenda */
.hero__visual {
  position: relative;
  justify-self: center;
  width: min(420px, 100%);
}

.mockup {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  overflow: hidden;
}

.mockup__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--borde);
  background: var(--fondo-alt);
}
.mockup__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #d9e1ee;
}
.mockup__title {
  margin-left: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--texto-suave);
}

.mockup__body {
  display: grid;
  gap: 0.7rem;
  padding: 1.1rem;
}

.appt {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radio-sm);
  background: var(--fondo-alt);
  border-left: 4px solid var(--azul);
}
.appt--blue   { border-left-color: #006aff; }
.appt--teal   { border-left-color: #0bb8a4; }
.appt--violet { border-left-color: #8b5cf6; }
.appt--amber  { border-left-color: #f59e0b; }

.appt__time { font-weight: 700; font-size: 0.85rem; color: var(--texto); }
.appt__name { font-size: 0.88rem; color: var(--texto-suave); flex: 1; }
.appt__tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--azul);
  background: rgba(0, 106, 255, 0.08);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

/* Tarjetas flotantes */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio-sm);
  box-shadow: var(--sombra);
  padding: 0.65rem 0.95rem;
  font-size: 0.8rem;
  line-height: 1.3;
}
.float-card strong { display: block; font-size: 0.82rem; }
.float-card small { color: var(--texto-suave); }

.float-card__icon {
  display: grid;
  place-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-weight: 700;
  color: var(--blanco);
  flex-shrink: 0;
}
.float-card__icon--green { background: #10b981; }
.float-card__icon--blue { background: var(--azul); }

.float-card--1 { top: -22px; right: -14px; animation: flotar 5s ease-in-out infinite; }
.float-card--2 { bottom: -22px; left: -14px; animation: flotar 5s ease-in-out 2.5s infinite; }

@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ===== Secciones genéricas ===== */
.section { padding-block: 5rem; }
.section--alt { background: var(--fondo-alt); }

.section__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.2rem;
}
.section__head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.8rem;
}
.section__head p { color: var(--texto-suave); font-size: 1.02rem; }

/* ===== Características ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.feature {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.8rem 1.6rem;
  transition: var(--transicion);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra);
  border-color: rgba(0, 106, 255, 0.25);
}

.feature__icon {
  display: grid;
  place-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(0, 106, 255, 0.08);
  color: var(--azul);
  margin-bottom: 1.1rem;
}
.feature__icon svg { width: 26px; height: 26px; }

.feature h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 0.45rem; }
.feature p { font-size: 0.92rem; color: var(--texto-suave); }

/* ===== Galería ===== */
.gallery { max-width: 900px; margin-inline: auto; }

.gallery__main {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  overflow: hidden;
}
.gallery__main img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #fff;
  padding: 0.8rem;
}
.gallery__main figcaption {
  text-align: center;
  font-size: 0.88rem;
  color: var(--texto-suave);
  padding: 0.7rem 1rem 1rem;
  border-top: 1px solid var(--borde);
}

.gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.gallery__thumb {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--texto-suave);
  background: var(--blanco);
  border: 1.5px solid var(--borde);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  transition: var(--transicion);
}
.gallery__thumb:hover { border-color: var(--azul); color: var(--azul); }
.gallery__thumb.is-active {
  background: var(--azul);
  border-color: var(--azul);
  color: var(--blanco);
}

.demos__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.4rem;
}

/* ===== Testimonios ===== */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.4rem;
}

.testimonial {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.testimonial blockquote {
  font-size: 0.96rem;
  color: var(--texto);
  flex: 1;
}

.testimonial figcaption {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--borde);
  padding-top: 0.9rem;
}
.testimonial figcaption strong { font-size: 0.92rem; }
.testimonial figcaption span { font-size: 0.82rem; color: var(--texto-suave); }

/* ===== FAQ ===== */
.faq { display: grid; gap: 0.8rem; }

.faq__item {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio-sm);
  overflow: hidden;
  transition: var(--transicion);
}
.faq__item[open] { border-color: rgba(0, 106, 255, 0.35); box-shadow: var(--sombra-suave); }

.faq__item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.3rem;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--azul);
  transition: transform var(--transicion);
  flex-shrink: 0;
}
.faq__item[open] summary::after { transform: rotate(45deg); }

.faq__item p {
  padding: 0 1.3rem 1.2rem;
  font-size: 0.93rem;
  color: var(--texto-suave);
}

/* ===== Acerca de ===== */
.about {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.about__text h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.about__text p {
  color: var(--texto-suave);
  margin-bottom: 1rem;
}
.about__text p strong { color: var(--texto); }

.about__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
  margin-top: 1.6rem;
}
.stat { display: flex; flex-direction: column; }
.stat strong {
  font-size: 2rem;
  font-weight: 800;
  color: var(--azul);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat span { font-size: 0.85rem; color: var(--texto-suave); }

.about__objectives {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-suave);
  padding: 1.8rem 1.7rem;
}
.about__objectives h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
}
.about__objectives ol {
  list-style: none;
  counter-reset: objetivo;
  display: grid;
  gap: 0.9rem;
}
.about__objectives li {
  counter-increment: objetivo;
  display: flex;
  gap: 0.85rem;
  font-size: 0.92rem;
  color: var(--texto-suave);
}
.about__objectives li::before {
  content: counter(objetivo);
  display: grid;
  place-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 106, 255, 0.08);
  color: var(--azul);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

@media (min-width: 880px) {
  .about { grid-template-columns: 1.2fr 1fr; gap: 3.5rem; }
}

/* ===== Contacto / CTA final ===== */
.cta {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-claro) 100%);
  color: var(--blanco);
}

.contact {
  display: grid;
  gap: 2.5rem;
  padding-block: 4.5rem;
  align-items: center;
}

.contact__info h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}
.contact__info > p {
  opacity: 0.92;
  margin-bottom: 1.8rem;
  font-size: 1.05rem;
  max-width: 48ch;
}

/* Formulario */
.form {
  background: var(--blanco);
  border-radius: var(--radio);
  box-shadow: 0 12px 40px rgba(0, 30, 80, 0.25);
  padding: 2rem 1.8rem;
  display: grid;
  gap: 1.1rem;
  color: var(--texto);
}

.form__field { display: grid; gap: 0.35rem; }
.form__field span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--texto);
}

.form__field input,
.form__field textarea {
  font: inherit;
  font-size: 0.95rem;
  color: var(--texto);
  background: var(--fondo-alt);
  border: 1.5px solid var(--borde);
  border-radius: var(--radio-sm);
  padding: 0.65rem 0.9rem;
  width: 100%;
  transition: border-color var(--transicion);
  resize: vertical;
}
.form__field input:focus,
.form__field textarea:focus {
  outline: none;
  border-color: var(--azul);
  background: var(--blanco);
}
.form__field ::placeholder { color: #9aa3b2; }

.form__submit { width: 100%; }

.form__status {
  font-size: 0.88rem;
  text-align: center;
  min-height: 1.2em;
  margin: 0;
}
.form__status--ok { color: #0a7a4b; font-weight: 600; }
.form__status--error { color: #c0392b; font-weight: 600; }

@media (min-width: 880px) {
  .contact { grid-template-columns: 1fr 1fr; gap: 4rem; padding-block: 5rem; }
}

/* ===== Footer ===== */
.footer {
  background: #0c1220;
  color: #aeb6c4;
  font-size: 0.9rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: 3.5rem 2.5rem;
}

.footer .brand__name { color: var(--blanco); }
.footer .brand__name strong { color: var(--azul-claro); }
.footer__brand p { margin-top: 0.9rem; line-height: 1.6; }

.footer__col { display: flex; flex-direction: column; gap: 0.55rem; }
.footer__col h4 {
  color: var(--blanco);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.footer__col a {
  color: #aeb6c4;
  text-decoration: none;
  transition: color var(--transicion);
}
.footer__col a:hover { color: var(--blanco); }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 1.3rem;
  text-align: center;
  font-size: 0.82rem;
}

/* ===== Página legal (privacidad) ===== */
.nav-simple .nav__link { font-size: 0.92rem; }

.legal { padding-block: 3rem 4.5rem; }

.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.legal__updated {
  font-size: 0.85rem;
  color: var(--texto-suave);
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2.2rem 0 0.6rem;
}

.legal h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--azul);
  margin: 1.6rem 0 0.4rem;
}

.legal ol.legal__pasos {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.8rem;
  margin-top: 0.4rem;
}
.legal ol.legal__pasos ul { margin-top: 0.4rem; }

.legal code {
  background: var(--fondo-alt);
  border: 1px solid var(--borde);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  font-size: 0.88em;
}

.legal p,
.legal li {
  color: var(--texto-suave);
  font-size: 0.96rem;
}
.legal p strong, .legal li strong { color: var(--texto); }

.legal ul {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.legal a { color: var(--azul); }

.footer__link { color: #aeb6c4; }
.footer__link:hover { color: var(--blanco); }

/* ===== Animación de aparición ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respetar preferencia de menos movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-card--1, .float-card--2 { animation: none; }
}

/* ===== Desktop ===== */
@media (min-width: 880px) {
  .hero__inner {
    grid-template-columns: 1.15fr 1fr;
    padding-block: 5.5rem 6.5rem;
  }
}

/* ===== Mobile ===== */
@media (max-width: 879px) {
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--blanco);
    border-bottom: 1px solid var(--borde);
    box-shadow: var(--sombra);
    padding: 0.6rem 1.2rem 1.2rem;
    display: none;
  }
  .nav.is-open { display: flex; }

  .nav__link {
    padding: 0.85rem 0.2rem;
    border-bottom: 1px solid var(--borde);
    font-size: 1rem;
  }
  .nav__cta { margin-top: 1rem; text-align: center; }

  .hero__visual { margin-top: 0.5rem; }
  .float-card--1 { right: 0; }
  .float-card--2 { left: 0; }

  .section { padding-block: 3.5rem; }

  .footer__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer__inner { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .cta__actions .btn { width: 100%; }
}
