/* =============================================================
   FRAGADENT Laboratorio Dental — styles.css
   Arquetipo: Editorial Light (adaptado a paleta "porcelana")
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #f4f2ee;   /* porcelana cálida */
  --bg-2:      #e9e5dd;   /* arena clara */
  --paper:     #ffffff;
  --ink:       #14201f;
  --ink-soft:  #2b3735;
  --ink-mute:  #5f6b69;
  --accent:    #0f5f5a;   /* verde esmeralda clínico */
  --accent-2:  #b8925e;   /* oro / zirconia cálida */
  --line:      rgba(20, 32, 31, 0.12);
  --wa:        #1fae5b;
  --wa-dark:   #128c4e;
  --deep:      #0d2624;   /* fondo de la sección WhatsApp */

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --radius-sm: 12px;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.08; letter-spacing: -0.02em; font-weight: 400; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--ink); color: #fff; border-radius: 8px; font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   4. Typography
   ============================================================= */
h1, h2, h3 { font-family: var(--serif); font-optical-sizing: auto; }
h1 em, h2 em { font-style: italic; color: var(--accent); font-weight: 300; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; }

.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute);
}
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 4px rgba(31,174,91,.18); }
.kicker-light { color: rgba(255,255,255,.65); }

.section-head { max-width: 760px; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head h2 { margin-top: .9rem; }
.section-sub { margin-top: 1rem; color: var(--ink-mute); max-width: 52ch; }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .85rem 1.5rem;
  border-radius: 999px; font-weight: 500; font-size: .98rem; line-height: 1.2;
  transition: transform .35s var(--ease-out), background-color .25s var(--ease-soft), box-shadow .35s var(--ease-out), color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { min-height: 42px; padding: .55rem 1.1rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 10px 24px -12px rgba(18,140,78,.7); }
.btn-wa:hover { background: var(--wa-dark); box-shadow: 0 16px 30px -14px rgba(18,140,78,.8); }
.btn-ghost { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.wa-ico { width: 20px; height: 20px; flex: none; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 242, 238, 0);
  border-bottom: 1px solid transparent;
  transition: background-color .35s var(--ease-soft), border-color .35s, backdrop-filter .35s;
}
.nav.is-solid {
  background: rgba(244, 242, 238, 0.94);
  border-bottom-color: var(--line);
}
@supports (backdrop-filter: blur(10px)) {
  .nav.is-solid { background: rgba(244, 242, 238, 0.78); backdrop-filter: blur(14px) saturate(1.2); }
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); }
.brand .brand-mark { width: 38px; height: 38px; flex: none; margin-block: -4px; }
.brand-word { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; letter-spacing: .06em; }
.brand-sub { display: none; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); padding-left: .6rem; border-left: 1px solid var(--line); }
.nav-links { display: none; gap: 1.6rem; white-space: nowrap; font-size: .93rem; color: var(--ink-soft); }
.nav-links a { position: relative; padding-block: .3rem; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; } /* en celular ya está el botón flotante */

/* =============================================================
   6. Sections
   ============================================================= */

/* ---- Hero ---- */
.hero { padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(3rem, 7vw, 6rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-title {
  margin-top: 1.1rem;
  font-size: clamp(2.5rem, 7.2vw, 5.4rem);
  font-weight: 350;
  line-height: 1.02;
}
.hero-title em { display: block; }
.hero-sub { margin-top: 1.4rem; max-width: 54ch; font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-points { display: grid; gap: 1rem; margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.hero-points li { display: grid; gap: .15rem; }
.hero-points strong { font-weight: 600; font-size: .95rem; }
.hero-points span { font-size: .88rem; color: var(--ink-mute); }

.hero-media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-2); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; }
.hero-badge {
  position: absolute; left: 1rem; bottom: 1rem;
  display: grid; gap: .1rem;
  padding: .85rem 1.1rem; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.92); color: var(--ink);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.45);
}
.badge-k { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.badge-v { font-family: var(--serif); font-size: 1.15rem; font-style: italic; color: var(--accent); }

/* ---- Ticker ---- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--paper); }
.ticker-track {
  display: flex; align-items: center; gap: 2rem; width: max-content;
  padding-block: 1.1rem;
  font-family: var(--serif); font-size: clamp(1.1rem, 2.2vw, 1.6rem); font-style: italic; color: var(--ink-soft);
  animation: ticker 38s linear infinite;
}
.ticker-track i { font-style: normal; font-size: .8em; color: var(--accent-2); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---- Manifesto ---- */
.manifesto { display: grid; gap: 1.5rem; padding-block: clamp(4rem, 9vw, 8rem); }
.manifesto-num { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.manifesto-body { display: grid; gap: 1.4rem; max-width: 820px; }
.manifesto .lead { font-family: var(--serif); font-size: clamp(1.5rem, 3.2vw, 2.4rem); line-height: 1.25; font-weight: 350; letter-spacing: -0.01em; }
.manifesto .lead em { color: var(--accent); }
.manifesto-body > p:last-child { color: var(--ink-soft); max-width: 62ch; }

/* ---- Services bento ---- */
.services { padding-block: clamp(3rem, 7vw, 6rem); background: var(--bg-2); }
.bento { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0));
  will-change: transform;
}
.card:hover { --ty: -6px; box-shadow: 0 30px 60px -30px rgba(15, 95, 90, .45), 0 0 0 1px rgba(15,95,90,.08); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out), filter .6s; }
.card:hover .card-media img { transform: scale(1.06); filter: saturate(1.1) brightness(1.04); }
.card-body { display: flex; flex-direction: column; gap: .55rem; padding: 1.4rem 1.4rem 1.5rem; flex: 1; }
.card-tag { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; }
.card-body > p:not(.card-tag) { color: var(--ink-mute); font-size: .95rem; }
.card-link {
  margin-top: auto; padding-top: .8rem;
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 500; font-size: .92rem; color: var(--wa-dark);
}
.card-link span { transition: transform .4s var(--ease-out); }
.card-link:hover span { transform: translateX(4px); }
.card-link::before { content: ""; position: absolute; inset: 0; } /* toda la tarjeta es clicable */

/* ---- Process ---- */
.process { padding-block: clamp(4rem, 9vw, 7rem); }
.steps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.2rem); display: grid; gap: .7rem; align-content: start; transition: background-color .4s var(--ease-soft); }
.step:hover { background: var(--paper); }
.step-n { font-family: var(--serif); font-style: italic; font-size: 2.6rem; line-height: 1; color: var(--accent-2); }
.step p { color: var(--ink-mute); font-size: .95rem; }

/* ---- Why ---- */
.why { padding-block: 0 clamp(4rem, 9vw, 7rem); }
.why-grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.why-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1400 / 752; background: var(--ink); }
.why-media img { width: 100%; height: 100%; object-fit: cover; }
.why-copy h2 { margin-top: .9rem; }
.why-list { margin-top: 2rem; display: grid; }
.why-list li { display: grid; gap: .2rem; padding-block: 1.1rem; border-top: 1px solid var(--line); }
.why-list li:last-child { border-bottom: 1px solid var(--line); }
.why-list strong { font-weight: 600; }
.why-list span { color: var(--ink-mute); font-size: .95rem; }

/* ---- WhatsApp ---- */
.wa-section {
  position: relative; isolation: isolate;
  padding-block: clamp(4rem, 9vw, 7rem);
  background: var(--deep); color: #fff;
  overflow: hidden;
}
.wa-section::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vmax; height: 70vmax; z-index: -1;
  background: radial-gradient(closest-side, rgba(31,174,91,.22), transparent 70%);
  pointer-events: none;
}
.wa-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.wa-copy h2 { margin-top: .9rem; color: #fff; }
.wa-copy h2 em { color: #7fe0a8; }
.wa-copy > p { margin-top: 1.2rem; color: rgba(255,255,255,.75); max-width: 50ch; }
.wa-facts { margin-top: 2rem; display: grid; gap: .8rem; }
.wa-facts li { display: grid; gap: .1rem; padding-left: 1rem; border-left: 2px solid rgba(127,224,168,.5); }
.wa-facts span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); }

.wa-form {
  display: grid; gap: 1rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--paper); color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.6);
}
.field { display: grid; gap: .4rem; }
.field-row { display: grid; gap: 1rem; }
.field label { font-size: .82rem; font-weight: 500; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .75rem .9rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(15,95,90,.15);
}
.form-note { font-size: .8rem; color: var(--ink-mute); text-align: center; }

/* ---- FAQ ---- */
.faq { padding-block: clamp(4rem, 9vw, 7rem); }
.faq-list { border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-block: 1.3rem;
  font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.35rem);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; font-family: var(--sans); font-size: 1.5rem; font-weight: 300; color: var(--accent);
  transition: transform .4s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.4rem; color: var(--ink-mute); max-width: 68ch; }

/* ---- Footer ---- */
.footer { background: var(--ink); color: rgba(255,255,255,.78); padding-top: clamp(3rem, 7vw, 5rem); }
.footer-grid { display: grid; gap: 2rem; padding-bottom: 2.5rem; }
.footer-word { font-family: var(--serif); font-size: clamp(2.6rem, 7vw, 4.5rem); letter-spacing: .08em; color: #fff; line-height: 1; }
.footer-tag { margin-top: .7rem; color: rgba(255,255,255,.6); }
.footer-k { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: .5rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem;
  padding-block: 1.4rem 6rem;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .8rem; color: rgba(255,255,255,.5);
}
.footer-base a:hover { color: #fff; }

/* ---- Botón flotante WhatsApp ---- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  display: inline-flex; align-items: center; gap: .6rem;
  height: 58px; padding: 0 17px;
  border-radius: 999px; background: var(--wa); color: #fff;
  box-shadow: 0 14px 30px -10px rgba(18,140,78,.7);
  transition: transform .4s var(--ease-out), background-color .25s;
}
.wa-float svg { width: 24px; height: 24px; }
.wa-float:hover { transform: translateY(-3px) scale(1.03); background: var(--wa-dark); }
.wa-float-label { display: none; font-weight: 500; font-size: .92rem; }
.wa-float::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(31,174,91,.55);
  animation: wa-pulse 2.6s var(--ease-soft) 3;
  pointer-events: none;
}
@keyframes wa-pulse { 70% { box-shadow: 0 0 0 16px rgba(31,174,91,0); } 100% { box-shadow: 0 0 0 0 rgba(31,174,91,0); } }

/* =============================================================
   7. Effects — reveals
   ============================================================= */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .bento .reveal:nth-child(2), .js .steps .reveal:nth-child(2) { transition-delay: .08s; }
.js .bento .reveal:nth-child(3), .js .steps .reveal:nth-child(3) { transition-delay: .16s; }
.js .bento .reveal:nth-child(4), .js .steps .reveal:nth-child(4) { transition-delay: .08s; }
.js .bento .reveal:nth-child(5) { transition-delay: .16s; }
.js .bento .reveal:nth-child(6) { transition-delay: .24s; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .hero-points { grid-template-columns: repeat(3, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .nav-cta { display: inline-flex; }
  .wa-float-label { display: inline; }
}
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card-xl { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .brand-sub { display: none; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
  .manifesto { grid-template-columns: 220px 1fr; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .hero-media { aspect-ratio: 4 / 5; }
  .bento { grid-template-columns: repeat(3, 1fr); }
  .card-xl { grid-column: span 2; grid-row: span 2; }
  .card-xl .card-media { aspect-ratio: auto; flex: 1; min-height: 340px; }
  .card-xl .card-body { flex: none; }
  .card-wide { grid-column: span 2; }
  .card-wide { flex-direction: row; }
  .card-wide .card-media { aspect-ratio: auto; flex: 1.1; }
  .card-wide .card-body { flex: 1; justify-content: center; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .wa-grid { grid-template-columns: 1fr 1.05fr; }
}
@media (min-width: 1280px) {
  .hero { padding-top: 3rem; }
}

/* =============================================================
   9. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation-duration: 90s; }
  .wa-float::after { animation: none; }
}

/* =============================================================
   10. Teeth — asistente (diente animado)
   ============================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.teeth-ico { width: 100%; height: 100%; overflow: visible; }
.teeth-ico .t-body { fill: #fff; stroke: var(--accent); stroke-width: 2.6; stroke-linejoin: round; }
.teeth-ico .t-shine { fill: none; stroke: #cfe6e3; stroke-width: 2.4; stroke-linecap: round; }
.teeth-ico .t-eyes ellipse { fill: var(--ink); }
.teeth-ico .t-glint { fill: #fff; }
.teeth-ico .t-cheek { fill: #f4a6a6; opacity: .55; }
.teeth-ico .t-smile { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.teeth-ico .t-eyes { transform-box: fill-box; transform-origin: center; animation: t-blink 4.5s infinite; }
@keyframes t-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

.teeth { position: fixed; right: 16px; bottom: 16px; z-index: 70; }
.teeth-launcher {
  position: relative; display: grid; place-items: center;
  width: 62px; height: 62px; padding: 9px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 14px 30px -12px rgba(15, 95, 90, .55);
  animation: t-float 3.2s ease-in-out infinite;
  transition: transform .4s var(--ease-out), box-shadow .3s;
}
.teeth-launcher:hover { transform: scale(1.08) rotate(-6deg); animation-play-state: paused; }
.teeth-launcher::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--wa); border: 2px solid var(--paper);
}
@keyframes t-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.teeth.is-open .teeth-launcher { animation: none; }

.teeth-hint {
  position: absolute; right: 74px; top: 50%; translate: 0 -50%;
  white-space: nowrap; padding: .55rem .9rem; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: .85rem;
  opacity: 0; transform: translateX(8px); pointer-events: none;
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.teeth.show-hint:not(.is-open) .teeth-hint { opacity: 1; transform: none; }

.teeth-panel {
  position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 80;
  display: flex; flex-direction: column;
  height: min(78vh, 600px); height: min(78dvh, 600px);
  background: var(--paper); border-radius: 20px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(13, 38, 36, .6), 0 0 0 1px var(--line);
  animation: t-pop .45s var(--ease-out);
}
.teeth-panel[hidden] { display: none; }
@keyframes t-pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }

.teeth-head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; background: var(--deep); color: #fff; }
.teeth-avatar { width: 42px; height: 42px; padding: 5px; border-radius: 50%; background: #fff; flex: none; }
.teeth-id { display: grid; line-height: 1.25; flex: 1; }
.teeth-id strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; }
.teeth-id small { display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; color: rgba(255,255,255,.7); }
.teeth-id small i { width: 7px; height: 7px; border-radius: 50%; background: #7fe0a8; }
.teeth-close { width: 40px; height: 40px; border-radius: 50%; font-size: 1.6rem; line-height: 1; color: rgba(255,255,255,.8); }
.teeth-close:hover { background: rgba(255,255,255,.1); color: #fff; }

.teeth-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; background: var(--bg); overscroll-behavior: contain; }
.t-msg { display: flex; gap: .5rem; align-items: flex-end; max-width: 92%; animation: t-in .35s var(--ease-out); }
@keyframes t-in { from { opacity: 0; transform: translateY(6px); } }
.t-msg p { padding: .7rem .9rem; border-radius: 16px; font-size: .92rem; line-height: 1.5; }
.t-bot p { background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.t-user { align-self: flex-end; }
.t-user p { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.t-mini { width: 28px; height: 28px; flex: none; }
.t-typing p { display: inline-flex; gap: 4px; padding: .85rem 1rem; }
.t-typing p i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-mute); animation: t-dot 1s infinite; }
.t-typing p i:nth-child(2) { animation-delay: .15s; }
.t-typing p i:nth-child(3) { animation-delay: .3s; }
@keyframes t-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.t-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.t-action { display: inline-flex; align-items: center; min-height: 36px; padding: .4rem .9rem; border-radius: 999px; font-size: .84rem; font-weight: 500; }
.t-wa { background: var(--wa); color: #fff; }
.t-wa:hover { background: var(--wa-dark); }
.t-map { background: var(--bg-2); color: var(--ink); }
.t-map:hover { background: var(--line); }

.teeth-quick { display: flex; gap: .45rem; overflow-x: auto; padding: .7rem 1rem .2rem; background: var(--paper); border-top: 1px solid var(--line); scrollbar-width: none; }
.teeth-quick::-webkit-scrollbar { display: none; }
.t-chip { flex: none; min-height: 36px; padding: .4rem .85rem; border-radius: 999px; border: 1px solid rgba(15,95,90,.3); color: var(--accent); font-size: .84rem; background: #fff; transition: background-color .2s, color .2s; }
.t-chip:hover { background: var(--accent); color: #fff; }

.teeth-form { display: flex; gap: .5rem; padding: .7rem 1rem 1rem; background: var(--paper); }
.teeth-form input { flex: 1; min-width: 0; min-height: 46px; padding: .6rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; }
.teeth-form input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(15,95,90,.15); }
.teeth-form button { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; }
.teeth-form button svg { width: 20px; height: 20px; }
.teeth-form button:hover { background: #0b4a46; }

@media (min-width: 540px) {
  .teeth-panel { left: auto; right: 16px; bottom: 92px; width: 380px; height: min(70vh, 560px); }
}
@media (max-width: 539px) {
  .teeth-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .teeth-launcher { animation: none; }
}
.btn { white-space: nowrap; }
@media (min-width: 1280px) { .brand-sub { display: inline; } }

/* =============================================================
   11. Nuestro laboratorio (fotos reales)
   ============================================================= */
.lab { padding-block: 0 clamp(4rem, 9vw, 7rem); }
.lab-grid { display: grid; gap: 1rem; }
.lab-photo { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.lab-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.lab-photo:hover img { transform: scale(1.04); }
.lab-photo-main { aspect-ratio: 16 / 10; }
.lab-photo-tall { aspect-ratio: 4 / 5; }
.lab-photo figcaption {
  position: absolute; left: 1rem; bottom: 1rem;
  padding: .5rem .9rem; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--ink);
  font-size: .82rem; font-weight: 500;
  box-shadow: 0 10px 24px -14px rgba(0,0,0,.5);
}
.lab-facts { display: grid; gap: 1px; margin-top: 1rem; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lab-facts li { display: grid; gap: .2rem; padding: 1.2rem 1.4rem; background: var(--bg); }
.lab-facts strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; }
.lab-facts span { color: var(--ink-mute); font-size: .92rem; }
@media (min-width: 720px) {
  .lab-grid { grid-template-columns: 1.6fr 1fr; }
  .lab-photo-main, .lab-photo-tall { aspect-ratio: auto; height: clamp(340px, 42vw, 520px); }
  .lab-facts { grid-template-columns: repeat(3, 1fr); }
}
/* Laboratorio: 3 fotos (fresadoras + escáner a la izquierda, interior alto a la derecha) */
.lab-photo-scan { aspect-ratio: 16 / 9; }
@media (min-width: 720px) {
  .lab-photo-main, .lab-photo-scan { aspect-ratio: auto; height: clamp(240px, 27vw, 360px); }
  .lab-photo-tall { grid-column: 2; grid-row: 1 / span 2; height: auto; }
}

/* =============================================================
   12. Ubicación
   ============================================================= */
.location { padding-block: 0 clamp(4rem, 9vw, 7rem); }
.location-grid { display: grid; gap: 1rem; }
.location-card { display: flex; flex-direction: column; gap: 1.6rem; padding: clamp(1.4rem, 3vw, 2.2rem); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.location-list { display: grid; gap: 1.3rem; }
.location-list li { display: grid; gap: .15rem; padding-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.location-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.location-k { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; }
.location-list strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.location-list strong a:hover { color: var(--accent); }
.location-list span:not(.location-k) { color: var(--ink-mute); font-size: .95rem; }
.location-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: auto; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--accent); }
.location-map { border-radius: var(--radius); overflow: hidden; background: var(--bg-2); min-height: 320px; border: 1px solid var(--line); }
.location-map iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }
@media (min-width: 960px) {
  .location-grid { grid-template-columns: .9fr 1.4fr; }
  .location-map, .location-map iframe { min-height: 460px; }
}
/* Laboratorio: 4 fotos */
@media (min-width: 720px) {
  .lab-grid { grid-template-columns: 1fr 1fr; }
  .lab-grid .lab-photo-main { grid-column: 1 / 3; grid-row: auto; height: clamp(260px, 34vw, 400px); }
  .lab-grid .lab-photo-oven, .lab-grid .lab-photo-tall { grid-column: auto; grid-row: auto; height: 380px; aspect-ratio: auto; }
  .lab-grid .lab-photo-scan { grid-column: 1 / 3; height: clamp(240px, 30vw, 360px); aspect-ratio: auto; }
}
@media (min-width: 960px) {
  .lab-grid { grid-template-columns: 1fr 1fr .85fr; grid-template-rows: 330px 330px; }
  .lab-grid .lab-photo-main { grid-column: 1 / 3; grid-row: 1; height: auto; }
  .lab-grid .lab-photo-oven { grid-column: 3; grid-row: 1 / 3; height: auto; }
  .lab-grid .lab-photo-scan { grid-column: 1; grid-row: 2; height: auto; }
  .lab-grid .lab-photo-tall { grid-column: 2; grid-row: 2; height: auto; }
}
.lab-photo-oven { aspect-ratio: 4 / 5; }
.lab-photo-oven img { object-position: 50% 12%; }
/* Celulares muy angostos: que los botones largos puedan partirse en 2 líneas */
@media (max-width: 539px) {
  .btn { white-space: normal; text-align: center; }
  .hero-actions .btn { width: 100%; }
}
@media (max-width: 539px) {
  .footer-word { font-size: clamp(1.8rem, 11vw, 2.6rem); letter-spacing: .04em; }
  .footer-grid > * { min-width: 0; }
  .footer-col p { overflow-wrap: anywhere; }
}
