/* Clínica Raquel Selva. La web es la puerta de la clínica: campo ciruela con letra de vinilo,
   placa blanca de timbres y magenta del logo para la acción. Una sola familia tipográfica. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/sites/raquelselva/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --plum: #4a1f45;
  --plum-deep: #33142f;
  --on-plum: #ffffff;
  --on-plum-soft: #e7d6e4;
  --plum-line: #7a4f75;
  --magenta: #b8297f;
  --whatsapp: #1fa855;
  --bg: #ffffff;
  --soft: #f3edf1;
  --text: #1e1420;
  --muted: #5c4d5a;
  --line: #e2d8df;
  --link: #a01f6d;
  --radius: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171016;
    --soft: #221822;
    --text: #f5eef4;
    --muted: #c9bac6;
    --line: #3e2f3c;
    --link: #f58ec6;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }

ul { list-style: none; }

h1, h2 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; text-wrap: balance; }

h1 { font-size: clamp(2.75rem, 5.7vw, 5.25rem); }

@media (min-width: 1024px) {
  h1 span { display: block; }
}

h2 { font-size: clamp(2.125rem, 4.2vw, 3.5rem); }

h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }

p { text-wrap: pretty; }

::selection { background: var(--magenta); color: #ffffff; }

:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.door :focus-visible, .home :focus-visible, .gait :focus-visible, .close :focus-visible, .foot :focus-visible { outline-color: #ffffff; }

.top :focus-visible { outline-color: #b8297f; }

.plate :focus-visible { outline-color: var(--magenta); outline-offset: -4px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 40; padding: 12px 16px; border-radius: 8px; background: #ffffff; color: #1e1420; }

.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 32px; }

.block { padding-block: 112px; }

.section-title { margin-bottom: 56px; }

.ico { flex: none; width: 22px; height: 22px; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s, border-color .2s;
}

.btn:active { transform: translateY(1px) scale(.98); }

.btn--white { background: #ffffff; color: var(--plum); }

.btn--white .ico { color: var(--whatsapp); }

.btn--line { border-color: var(--plum-line); color: var(--on-plum); }

.door .btn--line { border-color: rgba(255, 255, 255, .55); }

.btn--main { background: var(--magenta); color: #ffffff; }

.go {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: 20px;
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* Cabecera: blanca siempre, como la pared del rótulo. El logo lleva letras negras */
.top { position: sticky; top: 0; z-index: 20; background: #ffffff; color: #1e1420; box-shadow: 0 1px 0 #e2d8df; }

.top__in { display: flex; align-items: center; gap: 32px; height: 80px; }

.top__logo { display: block; flex: none; }

.top__logo img { width: auto; height: 60px; }

.nav { display: flex; gap: 28px; margin-left: auto; font-size: 16px; white-space: nowrap; }

.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }

.call { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; text-decoration: none; white-space: nowrap; }

.call .ico { width: 20px; height: 20px; color: #b8297f; }

.call span { line-height: 1.15; }

.call small { display: block; color: #5c4d5a; font-size: 13px; font-weight: 400; }

.menu { display: none; position: relative; }

.menu summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #e2d8df;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.menu summary::-webkit-details-marker { display: none; }

.menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: grid;
  width: min(280px, calc(100vw - 32px));
  padding: 8px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}

.menu nav a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; text-decoration: none; }

/* La puerta */
.door { position: relative; background: var(--magenta); color: #ffffff; }

/* El monograma, como un vinilo esmerilado en el cristal de la puerta */
.door::before {
  content: "";
  position: absolute;
  top: 36px;
  right: max(32px, calc((100vw - 1280px) / 2 + 32px));
  width: min(36vw, 500px);
  aspect-ratio: 1;
  background: #ffffff;
  opacity: .08;
  -webkit-mask: url("/sites/raquelselva/img/monograma.svg?v=2") right top / contain no-repeat;
  mask: url("/sites/raquelselva/img/monograma.svg?v=2") right top / contain no-repeat;
  pointer-events: none;
}

.door__in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-top: 72px;
}

.door h1 { grid-column: 1; }

.rate { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 12px; color: var(--on-plum); font-size: 16px; font-weight: 600; text-decoration: none; }

/* La nota pinta las estrellas: cambiar --nota si cambia en Google */
.stars {
  --nota: 4.7;
  flex: none;
  width: 95px;
  height: 19px;
  background: linear-gradient(90deg, #ffc23d calc(var(--nota) / 5 * 100%), rgba(255, 255, 255, .3) 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.8l3.1 6.6 7.2.9-5.3 5 1.4 7.1L12 17.9l-6.4 3.5 1.4-7.1-5.3-5 7.2-.9z'/%3E%3C/svg%3E") 0 0 / 20% 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.8l3.1 6.6 7.2.9-5.3 5 1.4 7.1L12 17.9l-6.4 3.5 1.4-7.1-5.3-5 7.2-.9z'/%3E%3C/svg%3E") 0 0 / 20% 100% repeat-x;
}

.door__lead { grid-column: 1; margin-top: 28px; }

.door__lead p { max-width: 46ch; color: #ffffff; font-size: 1.25rem; line-height: 1.45; }

.door__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.door__lead .door__cta { margin-top: 28px; }

/* La placa de timbres, montada sobre el borde de la puerta */
.plate {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  margin-top: 48px;
  margin-bottom: -72px;
  border-radius: var(--radius);
  background: #ffffff;
  color: #1e1420;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}

.plate__title { display: flex; align-items: center; gap: 10px; padding: 18px 24px; border-bottom: 1px solid #e2d8df; color: #5c4d5a; font-size: 16px; font-weight: 500; letter-spacing: 0; line-height: 1.3; }

.plate__ico { flex: none; width: 22px; height: 22px; color: var(--whatsapp); }

.bells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }

.bells li + li { border-left: 1px solid #e2d8df; }

.bells li:nth-child(4n + 1) { border-left: 0; }

.bells li:nth-child(n + 5) { border-top: 1px solid #e2d8df; }

.bell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 104px;
  height: 100%;
  padding: 16px 20px 16px 24px;
  color: #5c4d5a;
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
}

.bell strong { display: block; margin-bottom: 4px; color: #1e1420; font-size: 1.25rem; letter-spacing: -0.015em; }

.bell::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border: solid #5c4d5a;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
  transition: transform .15s var(--ease);
}

/* La clínica */
.clinic { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; padding-top: 184px; align-items: start; }

.clinic__text { grid-row: 1 / span 2; }

.clinic__text p { margin-top: 18px; max-width: 44ch; color: var(--muted); font-size: 1.125rem; }

.clinic__sign { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #ffffff; }

.clinic__sign img { width: 100%; }

/* Huecos: lo que falta se ve y se explica. Se sustituyen por la foto real antes de publicar */
.slot {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 24px;
  border: 1.5px dashed var(--muted);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
}

.slot strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 1.0625rem; }

.slot figcaption { max-width: 32ch; }

.slot--person { aspect-ratio: 4 / 5; }

.slot--line { min-height: 0; place-items: start; padding: 16px 18px; text-align: left; }

/* Domicilio */
.home { background: var(--magenta); color: #ffffff; }

.home__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: end; padding-block: 80px; }

.home p { margin-bottom: 24px; font-size: 1.125rem; }

/* Especialidades */
.specs { display: grid; gap: 72px; }

.spec { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; }

.spec--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }

.spec--flip > :first-child { order: 2; }

.spec > img, .spec > .slot { width: 100%; aspect-ratio: 3 / 2; border-radius: var(--radius); object-fit: cover; }

.spec > img { filter: saturate(.82); }

.spec--flip > img { object-position: 50% 40%; }

.spec p { margin-top: 14px; max-width: 48ch; color: var(--muted); }

.spec .go { margin-top: 14px; }

.spec__alt { font-size: 16px; }

/* Estudio de la pisada */
.gait { background: var(--plum-deep); color: var(--on-plum); }

.gait__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; padding-block: 112px; }

.gait__text { grid-row: 1 / span 2; align-self: center; }

.gait__text p { margin-block: 18px 28px; max-width: 42ch; color: var(--on-plum-soft); }

.gait__map { width: 100%; border-radius: var(--radius); }

.gait__insole { justify-self: end; width: 38%; margin-top: -120px; margin-right: -24px; aspect-ratio: 4 / 3; object-fit: cover; border: 6px solid var(--plum-deep); border-radius: var(--radius); filter: saturate(.72); }

/* Más problemas */
.issues { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; }

.issues a { display: block; height: 100%; padding-block: 24px 28px; border-top: 1px solid var(--line); text-decoration: none; }

.issues h3 { font-size: 1.5rem; }

.issues h3::after { content: ""; display: inline-block; width: .42em; height: .42em; margin-left: .35em; border: solid var(--link); border-width: 2px 2px 0 0; transform: rotate(45deg) translate(-1px, 1px); vertical-align: .08em; }

.issues p { margin-top: 8px; max-width: 46ch; color: var(--muted); }

.also { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }

/* Quién te atiende */
.team { background: var(--soft); }

.team .slot { background: var(--bg); }

.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }

/* Dónde estamos */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }

.contact dl { display: grid; gap: 20px; margin-block: 32px; }

.contact dt { color: var(--muted); font-size: 15px; }

.contact dd { font-size: 1.125rem; font-weight: 600; }

.contact dd a { display: inline-flex; align-items: center; min-height: 44px; }

.map { width: 100%; min-height: 440px; border: 0; border-radius: var(--radius); background: var(--soft); }

/* Cierre */
.close { background: var(--plum); color: var(--on-plum); }

.close__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; padding-block: 88px; }

/* Pie */
.foot { background: var(--plum-deep); color: var(--on-plum-soft); font-size: 16px; }

.foot__in { display: grid; grid-template-columns: auto auto auto minmax(0, 300px); justify-content: space-between; gap: 48px; align-items: start; padding-block: 56px 32px; }

.foot__in img { width: 132px; padding: 12px; border-radius: var(--radius); background: #ffffff; }

.foot nav { display: grid; grid-template-columns: repeat(2, max-content); gap: 0 40px; }

.foot nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }

.foot__info { display: grid; gap: 16px; }

.foot__info dt { font-size: 14px; }

.foot__info dd { color: var(--on-plum); font-weight: 600; line-height: 1.35; }

.foot .slot { border-color: var(--plum-line); background: transparent; color: var(--on-plum-soft); }

.foot .slot strong { color: var(--on-plum); }

.foot__end { padding-block: 8px 28px; }

.foot__end a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-plum); }

/* Accesos fijos. Fuera de la portada: en móvil una barra al alcance del pulgar */
.dock { position: fixed; right: 20px; bottom: 20px; z-index: 15; transition: transform .3s var(--ease), opacity .2s; }

.dock.is-away { opacity: 0; transform: translateY(16px); pointer-events: none; visibility: hidden; }

.dock__wa { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--whatsapp); color: #ffffff; box-shadow: 0 8px 20px rgba(0, 0, 0, .28); }

.dock svg { width: 30px; height: 30px; }

.dock span, .dock__tel { display: none; }

@media (max-width: 359px) {
  .call small { display: none; }
  .call { justify-content: center; width: 44px; }
}

/* Entrada: el título se aplica como un vinilo, de izquierda a derecha */
@media (prefers-reduced-motion: no-preference) {
  .door h1 { animation: vinyl .9s var(--ease) both; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@keyframes vinyl {
  from { clip-path: inset(-10% 100% -10% 0); }
  to { clip-path: inset(-10% -2% -10% 0); }
}

/* El hover solo existe con ratón y en escritorio */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .nav a:hover, .call:hover { color: #b8297f; }
  .btn--white:hover { background: var(--on-plum-soft); }
  .btn--line:hover { border-color: #ffffff; }
  .btn--main:hover { background: #9d1f6b; }
  .go:hover { text-decoration-thickness: 2px; }
  .bell:hover::after { transform: translateX(3px) rotate(45deg); }
  .bell:hover strong { color: #b8297f; }
  .issues a:hover h3 { color: var(--link); }
  .foot nav a:hover { color: #ffffff; }
  .dock__wa:hover { transform: scale(1.06); }
}

@media (min-width: 1024px) and (max-height: 800px) {
  .door__in { padding-top: 40px; }
  h1 { font-size: clamp(2.75rem, 4.7vw, 4rem); }
  .door__lead { margin-top: 18px; }
  .door__lead .door__cta { margin-top: 20px; }
  .plate { margin-top: 28px; }
  .plate__title { padding-block: 12px; }
  .bell { min-height: 80px; }
  .door::before { top: 24px; width: min(30vw, 400px); }
}

@media (max-width: 1180px) {
  .nav { gap: 20px; font-size: 15px; }
  .call__num { display: none; }
}

@media (max-width: 1023px) {
  .wrap { padding-inline: 24px; }
  h1 { font-size: clamp(2.75rem, 7.5vw, 4.5rem); }
  .block, .gait__in { padding-block: 80px; }
  .nav { display: none; }
  .call { margin-left: auto; }
  .call__num { display: inline; }
  .menu { display: block; }
  .door::before { top: 24px; right: 24px; width: 40vw; }
  .door__in { padding-top: 56px; }
  .plate { margin-top: 32px; }
  .bells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bells li:nth-child(odd) { border-left: 0; }
  .bells li:nth-child(n + 3) { border-top: 1px solid #e2d8df; }
  .clinic { grid-template-columns: minmax(0, 1fr); padding-top: 152px; }
  .clinic__text { grid-row: auto; }
  .spec, .spec--flip { gap: 32px; }
  .gait__in { grid-template-columns: minmax(0, 1fr); }
  .gait__text { grid-row: auto; }
  .gait__insole { margin-right: 0; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .foot__in { grid-template-columns: auto auto auto; }
  .foot .slot { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  body { font-size: 17px; }
  html { scroll-padding-top: 84px; }
  .wrap { padding-inline: 16px; }
  .block, .gait__in { padding-block: 64px; }
  .section-title { margin-bottom: 36px; }
  .top__in { height: 72px; gap: 8px; }
  .top__logo img { height: 50px; }
  .call__num { display: none; }
  .call small { color: #1e1420; font-size: 14px; font-weight: 600; }
  .door::before { top: 30px; right: 10px; width: 34vw; opacity: .2; }
  .door__in { padding-top: 24px; }
  .rate { margin-top: 4px; }
  .door__lead { margin-top: 20px; }
  .door__lead p { font-size: 1.125rem; }
  .door__cta, .btn { width: 100%; }
  .btn { padding-inline: 14px; font-size: 16px; }
  .plate { margin-bottom: 0; }
  .plate { margin-top: 12px; }
  .plate__title { gap: 8px; padding: 12px 14px; font-size: 15px; }
  .plate__ico { width: 20px; height: 20px; }
  .bell { align-items: flex-start; min-height: 76px; padding: 12px 14px; font-size: 14px; }
  .bell strong { margin-bottom: 2px; font-size: 1.0625rem; line-height: 1.2; }
  .bell::after { display: none; }
  .clinic { padding-top: 64px; }
  .home__in { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 56px; }
  .specs { gap: 56px; }
  .spec, .spec--flip { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .spec--flip > :first-child { order: 0; }
  .gait__insole { width: 60%; margin-top: -72px; }
  .issues { grid-template-columns: minmax(0, 1fr); }
  .people { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .slot--person { aspect-ratio: auto; min-height: 180px; }
  .map { min-height: 320px; }
  .close__in { padding-block: 64px; }
  .foot__in { grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 28px; padding-block: 40px 16px; }
  .foot nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .foot .slot { grid-column: auto; }
  .foot__end { padding-bottom: 96px; }
  .dock { left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -1px 0 var(--line); }
  .dock__wa, .dock__tel { display: flex; align-items: center; justify-content: center; gap: 8px; width: auto; height: 52px; border-radius: 10px; box-shadow: none; font-size: 1.1875rem; font-weight: 700; text-decoration: none; }
  .dock__tel { background: var(--soft); color: var(--text); }
  .dock span { display: inline; }
  .dock svg { width: 22px; height: 22px; }
}
