/* Clínica Dental Garden · web pública
   Idea: un listado clínico y tranquilo. Papel frío, tinta verde-negra, teal de marca usado en botones,
   enlaces y el punto de estado. Titulares en Jost y texto en Rubik, las tipografías de la marca (pensada
   para leerse bien con dolor, cansancio o baja visión). Sin tarjetas: las líneas ordenan la información. */

:root {
  /* color */
  --bg: #f8fbfa;
  --bg-2: #e6f1f0;
  --ink: #19434d;
  --muted: #4f6a6d;
  --accent: #409492;
  --accent-deep: #2b7a78;
  --accent-ink: #ffffff;
  --accent-soft: #dcecea;
  --line: rgb(25 67 77 / 0.16);
  --line-strong: rgb(25 67 77 / 0.5);
  --band: #19434d;
  --band-ink: #f2f8f7;
  --band-muted: #9ec3c1;
  --band-line: rgb(242 248 247 / 0.16);

  /* tipografía */
  --font-display: "Jost", "Century Gothic", system-ui, sans-serif;
  --font-text: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-label: 15px;
  --t-small: 16px;
  --t-body: 18px;
  --t-lead: clamp(1.25rem, 1.6vw, 1.45rem);
  --t-h2: clamp(2.5rem, 5vw, 4.25rem);
  --t-h1: clamp(2.9rem, 7.4vw, 6.6rem);

  /* espacio y forma */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;
  --r-md: 4px;
  --gutter: clamp(20px, 4vw, 56px);
  --head-gap: clamp(var(--s-6), 5vw, var(--s-8));
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd, ul, ol, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: var(--s-4); top: -60px; background: var(--ink); color: var(--bg); padding: var(--s-2) var(--s-4); z-index: 100; }
.skip-link:focus { top: var(--s-4); }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); row-gap: var(--s-6); }
/* inicio y extensión por separado: así un start-N no pisa al span-N del mismo elemento */
.span-4 { grid-column-end: span 4; }
.span-5 { grid-column-end: span 5; }
.span-6 { grid-column-end: span 6; }
.span-7 { grid-column-end: span 7; }
.span-8 { grid-column-end: span 8; }
.start-5 { grid-column-start: 5; }
.start-6 { grid-column-start: 6; }
.start-7 { grid-column-start: 7; }
.start-8 { grid-column-start: 8; }

.muted { color: var(--muted); }
.link {
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}
.link:hover { text-decoration-color: transparent; }

/* ---------- botones: rectángulos con una sola línea de texto ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-3);
  min-height: 52px; padding: 0 var(--s-5);
  border: 1.5px solid var(--accent);
  border-radius: 2px;
  font: 700 17px/1 var(--font-text);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn--primary { background: var(--accent-deep); color: var(--accent-ink); border-color: var(--accent-deep); }
.btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--lg { min-height: 64px; padding: 0 var(--s-6); font-size: 19px; }
.btn .arrow { width: 16px; height: 16px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- cabecera ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__bar { display: flex; align-items: center; gap: var(--s-6); min-height: 76px; }
.nav__logo { display: block; flex: none; }
.nav__logo img { width: 48px; height: 48px; }
.nav__links { display: flex; gap: var(--s-5); flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav__links::-webkit-scrollbar { display: none; }
.nav__links a {
  font-size: var(--t-small); font-weight: 700; white-space: nowrap;
  text-decoration: none; padding-block: var(--s-2);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size 220ms ease;
}
.nav__links a:hover { background-size: 100% 1.5px; }
.nav__cta { flex: none; min-height: 44px; padding: 0 var(--s-4); font-size: 16px; }

/* ---------- portada ---------- */
.hero { padding-block: clamp(var(--s-7), 8vw, var(--s-9)) var(--s-7); }
.status {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-size: var(--t-small); color: var(--muted); font-weight: 700;
  margin-bottom: var(--s-5);
}
.status__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.status[data-state="open"] .status__dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.status[data-state="open"] { color: var(--accent-deep); }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-h1);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 72;
  max-width: 18ch;
}
.hero__lead { font-size: var(--t-lead); line-height: 1.5; margin-top: var(--s-6); }
.hero__actions { margin-top: var(--s-6); }
.hero__photo { margin-top: clamp(var(--s-7), 6vw, var(--s-8)); overflow: hidden; border-radius: var(--r-md); background: var(--bg-2); }
.hero__photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }

/* un único movimiento: el titular sube al cargar */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: rise 900ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero__lead, .hero__actions, .status { animation: rise 900ms 120ms cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- secciones ---------- */
.block { padding-block: var(--s-9) 0; }
.block + .block { padding-top: var(--s-9); }
.block__head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-h2);
  line-height: 1.02;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 72;
}
.block__head p { margin-top: var(--s-5); font-size: var(--t-small); color: var(--muted); max-width: 40ch; }
.block__head--sticky { position: sticky; top: 120px; align-self: start; }

/* tratamientos: listado con líneas, sin tarjetas */
.ledger { border-top: 1.5px solid var(--ink); }
.ledger > li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2) var(--s-6);
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 100px;
}
.ledger h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.01em; }
.ledger p { color: var(--muted); font-size: var(--t-small); grid-column: 1; }
.ledger__meta { grid-column: 2; grid-row: 1; justify-self: end; color: var(--muted); font-size: var(--t-small); font-weight: 700; white-space: nowrap; align-self: start; padding-top: 6px; }
.ledger__price { grid-column: 2; justify-self: end; font-family: var(--font-display); font-size: 1.6rem; font-variant-numeric: lining-nums tabular-nums; }

.bonos { margin-top: var(--s-8); align-items: start; }
.bonos__photo { overflow: hidden; border-radius: var(--r-md); }
.bonos__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bonos__title { font-family: var(--font-display); font-weight: 500; font-size: 1.9rem; line-height: 1.15; }
.bonos__list { margin-top: var(--s-5); }
.bonos__list li { display: flex; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.bonos__list li:first-child { border-top: 1px solid var(--line); }
.bonos__list b { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.bonos__note { margin-top: var(--s-5); color: var(--muted); font-size: var(--t-small); max-width: 42ch; }

/* clases: tres fotos, la del centro baja para romper la línea */
.trio { margin-top: var(--head-gap); align-items: start; }
.trio > li { display: flex; flex-direction: column; gap: var(--s-4); }
.trio > li:nth-child(2) { margin-top: var(--s-9); }
.trio figure { overflow: hidden; border-radius: var(--r-md); background: var(--bg-2); }
.trio img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.trio h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; line-height: 1.15; letter-spacing: -0.01em; }
.trio p { color: var(--muted); font-size: var(--t-small); }

/* equipo: la única banda oscura */
.band { background: var(--band); color: var(--band-ink); margin-top: var(--s-9); padding-block: var(--s-9); }
.band .block__head h2 { color: var(--band-ink); }
.band .block__head p { color: var(--band-muted); }
.band__photo { overflow: hidden; border-radius: var(--r-md); }
.band__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 40% 45%; }
.team > li { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-1); padding-block: var(--s-5); border-bottom: 1px solid var(--band-line); }
.team > li:first-child { border-top: 1px solid var(--band-line); }
.team h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.85rem; line-height: 1.1; letter-spacing: -0.01em; }
.team__role { font-size: var(--t-label); color: var(--band-muted); font-weight: 700; }
.team p { color: var(--band-ink); opacity: 0.8; font-size: var(--t-small); margin-top: var(--s-1); }

/* preguntas */
.faq { border-top: 1.5px solid var(--ink); }
.faq > details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  padding-block: var(--s-5); cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 1.5rem; line-height: 1.25; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: none;
  background: linear-gradient(var(--ink), var(--ink)) center / 12px 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1.5px 12px no-repeat;
  transition: transform 200ms ease;
}
.faq details[open] > summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent-deep); }
.faq details p { padding-bottom: var(--s-5); color: var(--muted); font-size: var(--t-small); max-width: 56ch; }
.qa__aside { margin-top: var(--s-6); }
.qa__aside p + p { margin-top: var(--s-4); }
.qa__aside .lead { font-size: var(--t-lead); line-height: 1.5; }

/* horario y mapa */
.cx-map {
  margin-top: var(--head-gap);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: var(--s-5);
  align-items: stretch;
}
.cx-map__ground { position: relative; min-height: 420px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.cx-map .cx-map__card { position: static; inset: auto; width: auto; transform: none; display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-5) 0 0; border: 0; border-top: 1.5px solid var(--ink); border-radius: 0; background: none; box-shadow: none; align-self: start; }
.cx-map__addr { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.2; }
.cx-map__card .hours { font-size: var(--t-small); }
.cx-plain { max-width: 560px; }
.cx-plain .cx-map__card { display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-5) 0 0; border-top: 1.5px solid var(--ink); }
.hours { display: grid; grid-template-columns: auto auto; gap: var(--s-2) var(--s-5); }
.hours dt { color: var(--muted); }
.hours dd { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .cx-map { grid-template-columns: minmax(0, 1fr); } }

/* cierre */
.closing { padding-block: var(--s-9) var(--s-6); }
.closing__cta h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.8rem, 6.6vw, 5.8rem); line-height: 0.98; letter-spacing: -0.02em;
  font-variation-settings: "opsz" 72; max-width: 16ch;
}
.closing__cta p { margin-top: var(--s-5); max-width: 52ch; color: var(--muted); font-size: var(--t-lead); line-height: 1.5; }
.closing__cta .btn-row { margin-top: var(--s-6); }
.closing__info { margin-top: var(--s-9); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.closing__info h3 { font-size: var(--t-label); font-weight: 700; color: var(--muted); margin-bottom: var(--s-3); }
.closing__info address { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.25; }
.closing__legal { margin-top: var(--s-8); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); padding-top: var(--s-5); border-top: 1px solid var(--line); font-size: var(--t-label); color: var(--muted); }
.closing__legal .brand { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--ink); text-decoration: none; }
.closing__legal .brand img { width: 32px; height: 32px; }
.closing__legal a.credits { color: var(--muted); }

/* ---------- pantallas estrechas ---------- */
@media (max-width: 1024px) {
  .ledger__price { font-size: 1.4rem; }
  .trio > li:nth-child(2) { margin-top: var(--s-7); }
}
@media (max-width: 860px) {
  .grid > [class*="span-"], .grid > [class*="start-"] { grid-column: 1 / -1; }
  .block__head--sticky { position: static; }
  .hero__photo img { aspect-ratio: 4 / 3; }
  .trio > li:nth-child(2) { margin-top: 0; }
  .band__photo img { aspect-ratio: 3 / 2; }
  .qa__aside { margin-top: 0; }
}
@media (max-width: 640px) {
  :root { --t-body: 17px; }
  html { scroll-padding-top: 130px; }
  .nav__bar { flex-wrap: wrap; gap: var(--s-3) var(--s-4); padding-block: var(--s-3); }
  .nav__links { order: 3; flex-basis: 100%; gap: var(--s-5); }
  .nav__cta { margin-left: auto; }
  .hero__photo img { aspect-ratio: 5 / 4; }
  .ledger > li { padding-block: var(--s-4); }
  .ledger h3 { font-size: 1.4rem; }
  .btn-row .btn { width: 100%; justify-content: center; }
  .btn--lg { width: 100%; }
  .bonos__photo img { aspect-ratio: 16 / 10; }
  .trio img { aspect-ratio: 4 / 3; }
  .band { margin-top: var(--s-8); padding-block: var(--s-8); }
  .cx-map__ground { min-height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
