/* =============================================================
   1. Tokens — Arquetipo 04 Glassmorphism, variante Hettich cobre
   (difiere de Carrillo verde-menta; rotación 06-diversity)
   ============================================================= */
:root {
  --bg: #faf6f1;
  --bg-2: #ffffff;
  --ink: #3a2a20;
  --ink-soft: #6b5648;
  --ink-mute: #97847a;
  --accent: #b4552d;
  --accent-2: #2e7d74;
  --peach: #ffd9c4;
  --mint: #cfe8e0;
  --lav: #e8dcc8;
  --glass: rgba(255, 255, 255, 0.5);
  --line: rgba(58, 42, 32, 0.12);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: "Montserrat", system-ui, sans-serif;
  --body: "Roboto", system-ui, sans-serif;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--body); font-size: 16px; line-height: 1.6;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; font-family: var(--sans); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--ink); color: #fff; z-index: 9999; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-soft { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); }
.section-num { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 1rem; }
.section-head { max-width: 44rem; margin-bottom: 2.2rem; }
.section-head h2, .section h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
.section-head h2 em, .section h2 em { font-style: italic; color: var(--accent); }
.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 38rem; }
.ejemplo-tag, .ejemplo-inline { font-size: .8rem; color: var(--ink-mute); }
.hero-note { font-size: .82rem; color: var(--ink-mute); margin-top: 1rem; }

/* =============================================================
   5. Components
   ============================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 600; border-radius: 999px; transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), background .3s; will-change: transform; }
.btn-sm { padding: .55rem 1.1rem; font-size: .88rem; }
.btn-lg { padding: .9rem 1.8rem; font-size: 1rem; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(58,42,32,.25); }
.btn-ghost { border: 1px solid var(--line); background: rgba(255,255,255,.6); }
.btn-ghost:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(58,42,32,.12); }
.btn-glass { background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-glass:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(58,42,32,.15); }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,211,102,.4); }

.nav { position: sticky; top: .8rem; z-index: 100; margin-top: .8rem; }
.nav-inner {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.6);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px; padding: .6rem .9rem; box-shadow: 0 10px 40px rgba(58,42,32,.10);
}
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 700; font-family: var(--sans); font-size: 1.35rem; }
.brand em { font-style: normal; color: var(--accent); }
.brand small { display: block; font-size: .8rem; font-weight: 400; color: var(--ink-mute); }
.brand-mark { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--mint), var(--lav)); font-size: 1.3rem; }
.brand-logo { width: 3.4rem; height: 3.4rem; border-radius: 50%; object-fit: cover; background: #fff; }
.nav-links { display: none; gap: 1.1rem; margin-left: auto; font-size: .92rem; }
.nav-links a { position: relative; color: var(--ink-soft); }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 2px; background: var(--accent); transition: right .3s var(--ease-out); }
.nav-links a:hover::after { right: 0; }
.nav-ctas { display: none; gap: .5rem; margin-left: auto; }
.nav-toggle { display: grid; gap: 5px; padding: .6rem; margin-left: auto; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav.open .nav-links { display: flex; position: absolute; top: calc(100% + .5rem); left: 0; right: 0; flex-direction: column; background: #fff; border-radius: 16px; padding: 1rem 1.2rem; box-shadow: 0 20px 50px rgba(58,42,32,.18); }

.kicker { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); background: rgba(255,255,255,.6); border: 1px solid var(--line); padding: .35rem .8rem; border-radius: 999px; }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }

.glass-card {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(58,42,32,.08);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
@supports (backdrop-filter: blur(20px)) {
  .glass-card { background: var(--glass); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); }
}
.glass-card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(58,42,32,.16); }
.glass-card img { width: 100%; height: 190px; object-fit: cover; }
.glass-card h3 { padding: 1rem 1.2rem 0; font-size: 1.12rem; }
.glass-card h3 small { font-size: .75rem; color: var(--ink-mute); font-weight: 400; }
.glass-card p { padding: .4rem 1.2rem 1.3rem; color: var(--ink-soft); font-size: .94rem; }
.card-tag { display: inline-block; margin: 1rem 1.2rem 0; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 700; padding: 0 !important; }

/* =============================================================
   6. Sections
   ============================================================= */
.hero { position: relative; overflow: clip; padding: clamp(2.5rem, 6vw, 4.5rem) 0 3rem; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.hero-mesh {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(at 18% 25%, var(--mint) 0%, transparent 50%),
    radial-gradient(at 85% 20%, var(--lav) 0%, transparent 50%),
    radial-gradient(at 50% 95%, var(--peach) 0%, transparent 55%);
  filter: blur(60px) saturate(150%);
  animation: meshDrift 30s ease-in-out infinite;
}
@keyframes meshDrift { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.15) rotate(8deg); } }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-title { font-size: clamp(2.4rem, 7vw, 4.2rem); max-width: 16ch; }
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub { margin: 1.1rem 0 1.6rem; font-size: 1.1rem; color: var(--ink-soft); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-visual { position: relative; margin: 0; }
.hero-visual img { border-radius: 28px; box-shadow: 0 60px 80px rgba(58,42,32,.28); width: 100%; height: clamp(280px, 40vw, 460px); object-fit: cover; animation: floatY 7s ease-in-out infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.glass-chip {
  position: absolute; left: 1rem; bottom: 1rem; right: auto;
  background: rgba(255,255,255,.7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.6); border-radius: 14px; padding: .5rem .9rem; font-size: .82rem; color: var(--ink-soft);
}

.ticker { overflow: hidden; border-block: 1px solid var(--line); background: #fff; padding: .7rem 0; }
.ticker-track { display: flex; gap: 1.4rem; width: max-content; animation: ticker 28s linear infinite; font-size: .9rem; color: var(--ink-soft); }
.ticker-track i { color: var(--accent); font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }

.cards { display: grid; gap: 1.2rem; }
.split { display: grid; gap: 2.5rem; align-items: start; }
.split-media img { border-radius: 24px; box-shadow: 0 30px 60px rgba(58,42,32,.18); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.6rem 0 .6rem; }
.stat dt { font-size: 1.9rem; font-weight: 700; font-family: var(--sans); }
.stat dd { font-size: .85rem; color: var(--ink-mute); }
.pillars { display: grid; gap: 1rem; margin-top: 1.6rem; }
.pillar { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.2rem; }
.pillar h3 { font-size: 1rem; margin-bottom: .3rem; }
.pillar p { font-size: .92rem; color: var(--ink-soft); }

.steps { list-style: none; padding: 0; display: grid; gap: 1rem; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; }
.steps span { font-size: .78rem; letter-spacing: .14em; color: var(--accent); font-weight: 700; }
.steps h3 { margin: .3rem 0; }

.duo { display: grid; gap: 1.2rem; align-items: start; }
.team img { height: 260px; }
.quotes { display: grid; gap: 1rem; }
.quotes blockquote { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.3rem 1.4rem; }
.quotes blockquote p { font-size: 1.05rem; }
.quotes cite { display: block; margin-top: .6rem; font-style: normal; font-size: .82rem; color: var(--ink-mute); }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; margin-bottom: .7rem; }
.faq summary { cursor: pointer; font-weight: 600; font-family: var(--sans); }
.faq summary::marker { color: var(--accent); }
.faq p { margin-top: .6rem; color: var(--ink-soft); }

.section-cta { background: linear-gradient(180deg, var(--bg) 0%, #e7f4ef 100%); }
.cta-grid { display: grid; gap: 2rem; align-items: start; }
.contact-list { list-style: none; padding: 0; margin-top: 1.4rem; display: grid; gap: 1rem; }
.contact-list li { background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1.1rem; }
.contact-list a { font-weight: 600; color: var(--accent); }
.form { padding: 1.6rem; }
.form h3 { margin-bottom: .4rem; }
.form-note { font-size: .85rem; color: var(--ink-mute); margin-bottom: 1rem; }
.form label { display: grid; gap: .35rem; font-size: .88rem; font-weight: 600; margin-bottom: .9rem; }
.form input { padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--line); font: inherit; background: #fff; width: 100%; }
.form .btn { width: 100%; margin-top: .3rem; }
.form-ok { margin-top: .9rem; background: #e6f7f0; border: 1px solid var(--accent); border-radius: 12px; padding: .8rem 1rem; font-size: .9rem; }

.footer { border-top: 1px solid var(--line); padding: 2rem 0; background: #fff; }
.footer-grid { display: grid; gap: .6rem; font-size: .9rem; color: var(--ink-soft); }
.footer-credits { font-size: .82rem; color: var(--ink-mute); }

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* =============================================================
   7. Credits page
   ============================================================= */
.page-credits main { padding: 3rem 0; }
.credits-list { margin-top: 1.2rem; display: grid; gap: .7rem; padding-left: 1.2rem; }
.credits-list li { font-size: .92rem; color: var(--ink-soft); }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) { .cards { grid-template-columns: repeat(2, 1fr); } .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 720px) {
  .nav-links { display: flex; }
  .nav-ctas { display: flex; }
  .nav-toggle { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: .9fr 1.1fr; }
  .duo { grid-template-columns: .9fr 1.1fr; }
  .cta-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1280px) { .container { width: min(1200px, 100% - 4rem); } }

/* =============================================================
   9. Asistente Hettich + orientador (mismo patrón que las otras
   clínicas dentales, adaptado a tokens cobre claros)
   ============================================================= */
.orientador { padding: 1.6rem; display: grid; gap: 1rem; margin-top: 1.6rem; }
.orientador label { display: grid; gap: .4rem; font-size: .92rem; font-weight: 600; }
.orientador select, .orientador input { font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; width: 100%; }
.orientador-result { border-left: 3px solid var(--accent); padding: .6rem .9rem; color: var(--ink-soft); display: none; }
.orientador-result.is-on { display: block; }
.orientador-lead { display: grid; gap: .9rem; }
.chat-panel[hidden] { display: none; }
.chat-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; background: var(--ink); color: #fff; font-weight: 700; border-radius: 999px; padding: .8rem 1.2rem; box-shadow: 0 14px 34px rgba(58,42,32,.35); }
.chat-fab:hover { transform: translateY(-2px); }
.chat-panel { position: fixed; right: 1rem; bottom: 4.4rem; z-index: 60; width: min(360px, calc(100vw - 2rem)); padding: 1rem; display: grid; gap: .7rem; }
.chat-panel header { display: flex; justify-content: space-between; align-items: center; font-family: var(--sans); }
.chat-panel header button { font-size: 1.3rem; line-height: 1; padding: .2rem .6rem; border-radius: 8px; }
.chat-log { display: grid; gap: .5rem; max-height: 300px; overflow: auto; font-size: .92rem; }
.chat-log p { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .75rem; color: var(--ink-soft); }
.chat-log p strong { color: var(--ink); }
.chat-panel form { display: flex; gap: .5rem; }
.chat-panel input { flex: 1; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .6rem .9rem; min-width: 0; }
.footer { padding-bottom: 5.5rem; }

/* =============================================================
   10. Reduced-motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mesh { animation-duration: 60s; }
  .ticker-track { animation-duration: 60s; }
  .hero-visual img { animation: none; }
}
