/* ════════════════════════════════════════════
   CLÍNICA NORTE — odontología integral
   Canvas: blanco cálido · Acento: verde azulado
   Type: DM Serif Display (display) · Inter (body)
   ════════════════════════════════════════════ */
:root {
  --bg: #FBFBF9;
  --raise: #EEF3F2;
  --dark: #10232B;
  --text: #10232B;
  --muted: #5C6B70;
  --line: rgba(16, 35, 43, 0.10);
  --accent: #0E7C7B;
  --accent-hover: #0B6867;
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --container: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
}
.display {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.7rem, 6.2vw, 4.9rem); line-height: 1.04; letter-spacing: -0.012em;
}
.display em, .title em { font-style: italic; color: var(--accent); }
.title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.1; letter-spacing: -0.01em;
}
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.18rem); max-width: 31em; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ══════════ NAV ══════════ */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(251, 251, 249, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; transition: opacity 0.3s; }
.nav.scrolled::before { opacity: 1; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.logo {
  font-family: var(--font-display); font-size: 1.35rem;
  text-decoration: none; letter-spacing: 0.005em; color: var(--text);
}
.logo em { font-style: italic; color: var(--accent); }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  text-decoration: none; font-size: 0.92rem; font-weight: 500; color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  text-decoration: none; font-size: 0.88rem; font-weight: 600;
  color: #fff; background: var(--accent);
  padding: 11px 22px; border-radius: 999px; transition: background 0.2s;
}
.nav-cta:hover { background: var(--accent-hover); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; z-index: 102; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text); margin: 5px auto; transition: transform 0.3s, opacity 0.3s; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; background: var(--bg);
    flex-direction: column; align-items: center; justify-content: center; gap: 6vh;
    transform: translateY(-100%); transition: transform 0.4s cubic-bezier(0.7, 0, 0.2, 1); z-index: 101;
  }
  .nav.open .nav-links { transform: none; }
  .nav-links a { font-size: 1.8rem; font-family: var(--font-display); color: var(--text); }
  .nav-cta { display: none; }
}

/* ══════════ BOTONES ══════════ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  color: #fff; background: var(--accent);
  padding: 16px 34px; border-radius: 999px;
  transition: background 0.2s; will-change: transform;
}
.btn:hover { background: var(--accent-hover); }
.btn--big { padding: 19px 42px; font-size: 1.05rem; }
.link-arrow { color: var(--text); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: border-color 0.2s; }
.link-arrow:hover { border-color: var(--accent); }

/* ══════════ HERO ══════════ */
.hero { padding: calc(76px + clamp(48px, 9vh, 110px)) 0 clamp(64px, 9vh, 110px); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(36px, 6vw, 90px); align-items: center;
}
.hero-copy .label { display: block; margin-bottom: 24px; }
.hero-copy .lead { margin-top: 26px; }
.hero-actions { margin-top: 38px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.trust {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  list-style: none; font-size: 0.84rem; color: var(--muted); max-width: 34em;
}
.trust li { padding: 2px 18px; border-left: 1px solid var(--line); line-height: 1.45; }
.trust li:first-child { padding-left: 0; border-left: 0; }
.hero-img {
  aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius);
  background: var(--raise);
}
.hero-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%;
  transform: scale(1.06); transition: transform 1.8s cubic-bezier(0.2, 0.6, 0.2, 1), clip-path 0.95s cubic-bezier(0.65, 0, 0.35, 1);
}
.hero-loaded .hero-img img { transform: scale(1); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-img { aspect-ratio: 16 / 11; order: -1; }
}
@media (max-width: 560px) {
  .trust { grid-template-columns: 1fr; gap: 10px; }
  .trust li { padding: 0; border-left: 0; }
}

/* ══════════ SECCIONES ══════════ */
.section { padding: clamp(80px, 11vw, 120px) 0; }
.section--raise { background: var(--raise); }
.section--dark { background: var(--dark); color: #fff; }
.section-head { margin-bottom: 56px; display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: end; }
.section-head .label { display: block; margin-bottom: 16px; }
.section-head p { color: var(--muted); max-width: 30em; font-size: 0.97rem; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

/* ══════════ SERVICIOS ══════════ */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 40px); }
@media (max-width: 900px) { .services { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }
.service { text-decoration: none; display: block; }
.service-img {
  aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); margin-bottom: 20px;
  background: var(--raise);
}
.service-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), clip-path 0.95s cubic-bezier(0.65, 0, 0.35, 1);
}
.service:hover .service-img img { transform: scale(1.04); }
.service-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.service h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; letter-spacing: -0.005em; }
.service-price { font-size: 0.82rem; font-weight: 600; color: var(--accent); letter-spacing: 0.02em; flex-shrink: 0; white-space: nowrap; }
.service p { color: var(--muted); font-size: 0.93rem; margin-top: 8px; }
.service-link { display: inline-block; margin-top: 14px; font-size: 0.85rem; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color 0.2s; }
.service:hover .service-link { border-color: var(--accent); }
.services-note { margin-top: 52px; color: var(--muted); font-size: 0.86rem; letter-spacing: 0.01em; text-align: center; }

/* ══════════ POR QUÉ NORTE ══════════ */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 44px); }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } }
.why-col { border-top: 1px solid var(--line); padding-top: 24px; }
.why-num { display: block; font-family: var(--font-display); font-style: italic; color: var(--accent); font-size: 1.15rem; margin-bottom: 18px; }
.why-col h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.55rem; line-height: 1.15; margin-bottom: 14px; letter-spacing: -0.005em; }
.why-col p { color: var(--muted); font-size: 0.95rem; max-width: 28em; }

/* ══════════ EQUIPO ══════════ */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.5vw, 32px); }
@media (max-width: 900px) { .team { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .team { grid-template-columns: 1fr; } }
.member {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px 30px;
}
.avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 0.02em; margin-bottom: 26px;
}
.member h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; line-height: 1.15; letter-spacing: -0.005em; }
.member-role { display: block; margin-top: 6px; font-size: 0.84rem; font-weight: 600; color: var(--accent); }
.member p { margin-top: 14px; color: var(--muted); font-size: 0.93rem; }

/* ══════════ TESTIMONIOS ══════════ */
.section--dark .label { color: #7FC9C8; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 60px); }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }
.quote { border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 28px; }
.quote blockquote {
  font-family: var(--font-display); font-style: italic; font-size: clamp(1.3rem, 1.9vw, 1.6rem);
  line-height: 1.32; letter-spacing: -0.005em;
}
.quote figcaption { margin-top: 22px; font-size: 0.86rem; color: rgba(255, 255, 255, 0.62); }
.quote figcaption strong { display: block; font-weight: 600; color: #fff; margin-bottom: 2px; }

/* ══════════ PREGUNTAS ══════════ */
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(36px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-intro .label { display: block; margin-bottom: 16px; }
.faq-intro .title { margin-bottom: 20px; }
.faq-intro p { color: var(--muted); font-size: 0.97rem; max-width: 26em; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25;
  transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary .plus {
  flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%;
  position: relative; transition: transform 0.3s cubic-bezier(0.2, 0.6, 0.2, 1), border-color 0.2s;
}
.faq summary .plus::before, .faq summary .plus::after {
  content: ""; position: absolute; background: var(--text); left: 50%; top: 50%;
}
.faq summary .plus::before { width: 11px; height: 1px; transform: translate(-50%, -50%); }
.faq summary .plus::after { width: 1px; height: 11px; transform: translate(-50%, -50%); }
.faq details[open] summary .plus { transform: rotate(45deg); border-color: var(--accent); }
.faq details p { color: var(--muted); font-size: 0.95rem; padding: 0 44px 24px 0; max-width: 40em; }

/* ══════════ VISITA ══════════ */
.visit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 44px); }
@media (max-width: 760px) { .visit-grid { grid-template-columns: 1fr; } }
.visit-cell { border-top: 1px solid var(--line); padding-top: 22px; }
.visit-cell .label { display: block; margin-bottom: 12px; }
.visit-cell p { color: var(--muted); font-size: 0.97rem; }
.visit-cell a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color 0.2s; }
.visit-cell a:hover { border-color: var(--accent); }
.visit-cta { margin-top: 64px; text-align: center; }
.visit-cta small { display: block; margin-top: 16px; color: var(--muted); font-size: 0.84rem; }

/* ══════════ FOOTER ══════════ */
.footer { border-top: 1px solid var(--line); padding: 42px 0 36px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.foot-label { color: var(--muted); font-size: 0.82rem; text-decoration: none; }
.foot-credit { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color 0.2s, border-color 0.2s; }
.foot-credit:hover { color: var(--text); border-color: var(--accent); }
.foot-credits-photo { font-size: 0.7rem; opacity: 0.7; max-width: 70em; }

/* ══════════ MOTION ══════════ */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.wi {
  display: inline-block; transform: translateY(115%); will-change: transform;
  transition: transform 0.85s cubic-bezier(0.65, 0, 0.35, 1);
  transition-delay: var(--wd, 0ms);
}
.words-in .wi { transform: none; }
.wi.em-style { font-style: italic; color: var(--accent); }

/* El clip-path va en los hijos: si recorta al elemento observado, IntersectionObserver lo ve con área 0 y nunca lo revela */
.ir > * { clip-path: inset(100% 0 0 0); transition: clip-path 0.95s cubic-bezier(0.65, 0, 0.35, 1); }
.ir.in > * { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  .w, .wi { transform: none !important; transition: none !important; }
  .ir > * { clip-path: none !important; transition: none !important; }
  .hero-img img { transform: none !important; transition: none !important; }
  .service-img img { transition: none !important; }
}
