/* Tipografías alojadas en la propia web (Inter y Newsreader, licencia SIL OFL). Sin conexión con servicios externos. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(../assets/fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/newsreader-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/newsreader-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ==========================================================================
   Fisioterapia Héctor Santos — hoja de estilos
   Todo el diseño cuelga de los tokens de :root. Cuando llegue la identidad
   de la diseñadora (paleta + tipografías), solo hay que tocar este bloque.
   ========================================================================== */

:root {
  /* Color */
  --navy-900: #0a2150;
  --navy-700: #0f2f6b;
  --blue-600: #2b6cb0;       /* acento: 5.2:1 sobre blanco */
  --blue-300: #9dc0e8;
  --blue-100: #e6eff9;
  --blue-50:  #f3f7fc;
  --ink:      #12233d;
  --ink-soft: #4a5b73;       /* 7:1 sobre blanco */
  --line:     #dbe4ef;
  --bg:       #fbfcfe;
  --card:     #ffffff;
  --on-navy:  #ffffff;

  /* Tipografía */
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Espaciado y forma */
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --space-section: clamp(4rem, 9vw, 7.5rem);
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 236px;   /* alto de la cabecera sin compactar: se reserva en el body */

  /* Movimiento: curvas sin rebote (críticamente amortiguadas) */
  --ease-out: cubic-bezier(0.22, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.2, 0.5, 1);

  /* Sombras */
  --shadow-s: 0 1px 2px rgba(10, 33, 80, 0.06), 0 2px 8px rgba(10, 33, 80, 0.04);
  --shadow-m: 0 2px 4px rgba(10, 33, 80, 0.05), 0 12px 32px rgba(10, 33, 80, 0.10);
  --shadow-l: 0 4px 8px rgba(10, 33, 80, 0.06), 0 28px 64px rgba(10, 33, 80, 0.16);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 8.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  padding-top: var(--header-h);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; color: var(--navy-900); }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); line-height: 1.03; letter-spacing: -0.028em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; letter-spacing: -0.022em; }
h3 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.01em; }
em.accent { font-style: normal; color: var(--blue-600); }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 3px; border-radius: 6px; }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--navy-900); color: #fff; padding: 0.7rem 1.1rem; border-radius: var(--radius-s);
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--space-section); }
.section--tint { background: var(--blue-50); }
.section--navy { background: var(--navy-900); color: var(--on-navy); }
.section--navy h2, .section--navy h3 { color: var(--on-navy); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.9rem;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--blue-600); margin-bottom: 1.1rem;
}
.eyebrow::after { content: ""; width: 2.5rem; height: 1px; background: currentColor; opacity: 0.55; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); max-width: 38rem; }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head p { margin-top: 1rem; }
.section-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; max-width: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 48px; padding: 0.75rem 1.5rem;
  font: 500 0.82rem/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: var(--radius-s); border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.12s ease-out, background-color 0.25s, box-shadow 0.3s var(--ease-out), border-color 0.25s, color 0.25s;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--navy-900); color: #fff; box-shadow: var(--shadow-s); }
.btn--primary:hover { background: var(--navy-700); box-shadow: var(--shadow-m); }
.btn--ghost { background: transparent; color: var(--navy-900); border-color: var(--navy-900); }
.btn--ghost:hover { background: var(--navy-900); color: #fff; }
.btn--light { background: #fff; color: var(--navy-900); }
.btn--light:hover { background: var(--blue-100); }
.btn--sm { min-height: 42px; padding: 0.6rem 1.15rem; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-600);
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Cabecera (material translúcido) ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(251, 252, 254, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}
.site-header.is-scrolled { border-color: rgba(10, 33, 80, 0.08); box-shadow: 0 8px 24px rgba(10, 33, 80, 0.05); background: rgba(251, 252, 254, 0.86); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 236px; transition: min-height 0.35s var(--ease-out); }
.site-header.is-scrolled .nav { min-height: 126px; }

.brand { display: inline-flex; align-items: center; gap: 0.85rem; }
.brand__logo { height: 220px; width: auto; flex: none; transition: height 0.35s var(--ease-out); }
.site-header.is-scrolled .brand__logo { height: 110px; }
.brand__text { display: grid; line-height: 1.15; }
.brand__small { font-size: 0.64rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--blue-600); }
.brand__name { font-size: 1.12rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy-900); }

.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav__links a:not(.btn) {
  position: relative; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft); padding-block: 0.5rem; transition: color 0.2s;
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--navy-900);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease-out);
}
.nav__links a:not(.btn):hover, .nav__links a[aria-current="page"] { color: var(--navy-900); }
.nav__links a:not(.btn):hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__toggle { display: none; width: 48px; height: 48px; border: 0; border-radius: var(--radius-s); background: transparent; color: var(--navy-900); cursor: pointer; }
.nav__toggle svg { width: 26px; height: 26px; margin: auto; }
.nav__toggle .icon-close { display: none; }
.nav-open .nav__toggle .icon-open { display: none; }
.nav-open .nav__toggle .icon-close { display: block; }

@media (max-width: 900px) {
  .nav__toggle { display: grid; }
  .nav__links {
    position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem; background: rgba(251, 252, 254, 0.97);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-m);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity 0.28s var(--ease-out), transform 0.35s var(--ease-out), visibility 0s 0.35s;
  }
  .nav-open .nav__links { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav__links a:not(.btn) { padding: 1.05rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__links .btn { margin-top: 1.25rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3.5rem, 7vw, 6rem); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 60vw; height: 60vw; max-width: 780px; max-height: 780px;
  background: radial-gradient(closest-side, var(--blue-100), transparent 70%); z-index: -1;
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1.5rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero__visual { position: relative; }
.hero__visual .ph { aspect-ratio: 4 / 4.6; border-radius: var(--radius-l); box-shadow: var(--shadow-l); }
.hero__badge {
  position: absolute; left: -1.25rem; bottom: 2rem; display: grid; gap: 0.15rem;
  padding: 1rem 1.3rem; border-radius: var(--radius-m);
  background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7); border-top-color: #fff; box-shadow: var(--shadow-m);
  font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; font-weight: 500; color: var(--navy-900);
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { order: -1; }
  .hero__visual .ph { aspect-ratio: 16 / 11; }
  .hero__badge { left: 1rem; bottom: 1rem; }
}

/* ---------- Marcador de imagen (se sustituye por <img> reales) ---------- */
.ph {
  position: relative; overflow: hidden; display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(120% 90% at 20% 10%, #ffffff 0%, transparent 55%),
    linear-gradient(145deg, var(--blue-100), #cfe0f3 55%, var(--blue-300));
  color: var(--navy-700);
}
.ph__inner { display: grid; gap: 0.6rem; justify-items: center; padding: 1rem; }
.ph svg { width: 44px; height: 44px; opacity: 0.55; }
.ph__label { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; opacity: 0.7; }
img.photo { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Franja de valores ---------- */
.values { border-block: 1px solid var(--line); background: #fff; }
.values__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.value { display: flex; align-items: center; gap: 1rem; padding: 1.6rem 1.5rem; border-left: 1px solid var(--line); font-size: 0.92rem; line-height: 1.35; color: var(--ink); }
.value:first-child { border-left: 0; padding-left: 0; }
.value svg { flex: none; width: 36px; height: 36px; color: var(--navy-900); stroke-width: 1.4; }
@media (max-width: 900px) {
  .values__grid { grid-template-columns: repeat(2, 1fr); }
  .value:nth-child(odd) { border-left: 0; padding-left: 0; }
  .value:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Tarjetas de servicio ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow-s);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); border-color: var(--blue-300); }
.card:active { transform: translateY(-2px) scale(0.99); transition-duration: 0.12s; }
.card .ph { aspect-ratio: 16 / 9.5; }
.card__body { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.4rem 1.5rem 1.6rem; flex: 1; }
.card__num { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; color: var(--blue-600); }
.card__title { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.card__title svg { flex: none; width: 36px; height: 36px; padding: 8px; border: 1.5px solid var(--blue-300); border-radius: 50%; color: var(--blue-600); transition: background-color 0.3s, color 0.3s, transform 0.4s var(--ease-out); }
.card:hover .card__title svg { background: var(--navy-900); border-color: var(--navy-900); color: #fff; transform: translateX(3px); }
.card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.card a::after { content: ""; position: absolute; inset: 0; } /* toda la tarjeta clicable */
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Dos columnas (sobre mí, texto + imagen) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split--flip .split__media { order: -1; }
.split__media .ph { aspect-ratio: 4 / 4.4; border-radius: var(--radius-l); box-shadow: var(--shadow-m); }
.split h2 { margin-bottom: 1.25rem; }
.split .btn { margin-top: 0.75rem; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } .split--flip .split__media { order: 0; } }

.mini-values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.5rem; margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.mini-values li { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: var(--ink-soft); }
.mini-values svg { flex: none; width: 26px; height: 26px; color: var(--navy-900); stroke-width: 1.5; }

/* ---------- Proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.5rem); counter-reset: step; }
.step { position: relative; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.28); counter-increment: step; }
.step::before { content: "0" counter(step); display: block; font: 400 2.6rem/1 var(--font-display); color: var(--blue-300); margin-bottom: 1rem; }
.step p { color: rgba(255, 255, 255, 0.78); margin: 0.6rem 0 0; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta__box {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem); border-radius: var(--radius-l);
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; box-shadow: var(--shadow-l);
}
.cta__box h2 { color: #fff; margin-bottom: 1rem; }
.cta__box p { color: rgba(255, 255, 255, 0.82); max-width: 34rem; margin: 0 auto 2rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.cta__box .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.cta__box .btn--ghost:hover { background: #fff; color: var(--navy-900); }

/* ---------- Cabecera de páginas interiores ---------- */
.page-hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); background: linear-gradient(180deg, var(--blue-50), var(--bg)); }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); max-width: 18ch; }
.page-hero .lede { margin-top: 1.25rem; }

/* ---------- Servicios (detalle) ---------- */
.service { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; }
.service:nth-of-type(even) .service__media { order: 2; }
.service__media .ph { aspect-ratio: 16 / 11; border-radius: var(--radius-m); box-shadow: var(--shadow-m); }
.service h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0.4rem 0 1rem; }
.checklist { display: grid; gap: 0.6rem; margin-top: 1.2rem; }
.checklist li { display: flex; gap: 0.7rem; color: var(--ink-soft); font-size: 0.95rem; }
.checklist li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 0.6em; border-radius: 50%; background: var(--blue-600); }
@media (max-width: 800px) { .service { grid-template-columns: minmax(0, 1fr); } .service:nth-of-type(even) .service__media { order: 0; } }

/* ---------- Tarifas ---------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; }
.price { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.8rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-s); transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
.price:hover { transform: translateY(-5px); box-shadow: var(--shadow-m); }
.price--featured { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.price--featured h3, .price--featured .price__amount { color: #fff; }
.price--featured p, .price--featured .price__note { color: rgba(255, 255, 255, 0.8); }
.price__amount { font: 500 2.4rem/1 var(--font-display); color: var(--navy-900); letter-spacing: -0.02em; margin-top: auto; padding-top: 0.75rem; }
.price p, .price__note { color: var(--ink-soft); font-size: 0.93rem; margin: 0; }
.fine-print { margin-top: 2rem; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Línea de tiempo (sobre mí) ---------- */
.timeline { display: grid; gap: 0; border-left: 1px solid var(--line); margin-left: 0.4rem; }
.timeline li { position: relative; padding: 0 0 1.8rem 1.8rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 0.55em; width: 11px; height: 11px; border-radius: 50%; background: var(--blue-600); box-shadow: 0 0 0 4px var(--blue-100); }
.timeline .when { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue-600); font-weight: 500; }
.timeline h3 { font-size: 1.15rem; margin: 0.2rem 0; }
.timeline p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); }
.contact-list { display: grid; gap: 1.5rem; }
.contact-list li { display: flex; gap: 1rem; }
.contact-list svg { flex: none; width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: var(--blue-100); color: var(--navy-900); }
.contact-list strong { display: block; font-weight: 500; color: var(--navy-900); }
.contact-list span, .contact-list a { color: var(--ink-soft); }
.contact-list a:hover { color: var(--blue-600); }
.form { display: grid; gap: 1.1rem; padding: clamp(1.5rem, 3vw, 2.3rem); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-m); }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--navy-900); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 0.75rem 0.95rem; font: inherit; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-s);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--blue-300); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(43, 108, 176, 0.18); background: #fff; }
.field--check { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.85rem; color: var(--ink-soft); }
.field--check input { width: 20px; min-height: 20px; margin-top: 0.15rem; accent-color: var(--navy-900); }
.form__status { font-size: 0.9rem; min-height: 1.4em; color: var(--ink-soft); margin: 0; }
.map-box { margin-top: 2rem; }
.map-box .ph { aspect-ratio: 16 / 7; border-radius: var(--radius-m); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Texto legal ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.6rem; margin: 2.2rem 0 0.8rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { list-style: disc; padding-left: 1.3rem; margin-bottom: 1em; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, 0.78); padding-block: clamp(3rem, 6vw, 4.5rem) 1.5rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; }
.site-footer .brand__logo { height: 120px; filter: brightness(0) invert(1); }
.site-footer .brand__name { color: #fff; }
.site-footer .brand__small { color: var(--blue-300); }
.site-footer h3 { font: 500 0.75rem/1 var(--font-body); letter-spacing: 0.2em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem; }
.site-footer li { margin-bottom: 0.55rem; font-size: 0.93rem; }
.site-footer a:hover { color: #fff; }
.footer__about { margin-top: 1.1rem; font-size: 0.93rem; max-width: 22rem; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, 0.16); font-size: 0.82rem; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: minmax(0, 1fr); } }

/* Datos pendientes de recibir del cliente (resaltados para no olvidarlos) */
.todo { background: #fff7d6; color: #6b5200; border-radius: 4px; padding: 0 0.3em; border-bottom: 1px dashed #c9a400; }
.site-footer .todo, .section--navy .todo { background: rgba(255, 224, 102, 0.18); color: #ffe066; border-bottom-color: #ffe066; }

/* ---------- Animación de entrada al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.hero__visual { will-change: transform; }

/* ---------- Preferencias de accesibilidad ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .js .reveal { transform: none; transition: opacity 0.3s ease; }
  .card:hover, .price:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header, .site-header.is-scrolled, .nav__links, .hero__badge { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --ink-soft: #2b3a52; --line: #8fa3bd; }
  .site-header { background: #fff; border-bottom-color: var(--navy-900); }
}

/* ---------- Ajustes móvil ---------- */
@media (max-width: 700px) {
  .section-head--row { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .eyebrow { flex-wrap: wrap; row-gap: 0.4rem; }
  .hero__badge { padding: 0.8rem 1rem; }
  .btn { width: 100%; }
  .nav__toggle { margin-right: -0.5rem; }
}
@media (max-width: 520px) {
  .values__grid { grid-template-columns: minmax(0, 1fr); }
  .value, .value:nth-child(odd) { border-left: 0; padding: 1.1rem 0; }
  .value + .value { border-top: 1px solid var(--line); }
  .mini-values { grid-template-columns: minmax(0, 1fr); }
  .cta__actions .btn { width: 100%; }
}
.price--featured .price__amount.todo { color: #6b5200; }
@media (max-width: 900px) { .hero__badge { bottom: auto; top: 1rem; } }

@media (max-width: 700px) {
  :root { --header-h: 144px; }
  .nav { min-height: 144px; }
  .brand__logo { height: 128px; }
  .site-header.is-scrolled .brand__logo { height: 88px; }
  .site-header.is-scrolled .nav { min-height: 104px; }
}

/* ---------- Intro del logo ---------- */
/* La web se ve de fondo, suavizada por un velo translúcido que se disipa al mover el logo */
html.intro { overflow: hidden; scrollbar-gutter: stable; }
html.intro:not(.intro-ready)::before,
.intro-overlay {
  content: ""; position: fixed; inset: 0; z-index: 500;
  background: rgba(251, 252, 254, 0.42);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
html.intro .site-header .brand__logo { visibility: hidden; }
.intro-logo { position: fixed; left: 0; top: 0; z-index: 501; max-width: none; transform-origin: 0 0; will-change: transform, opacity; pointer-events: none; }
@media (prefers-reduced-transparency: reduce) {
  html.intro:not(.intro-ready)::before, .intro-overlay { background: rgba(251, 252, 254, 0.9); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Fotografías ---------- */
.photo-frame { position: relative; overflow: hidden; aspect-ratio: 4 / 4.4; border-radius: var(--radius-l); box-shadow: var(--shadow-m); background: var(--blue-100); }
.photo-frame picture, .photo-frame img { display: block; width: 100%; height: 100%; }
.photo-frame img { object-fit: cover; object-position: 50% 22%; }

/* Fotos dentro de tarjetas y bloques de servicio */
.ph--photo { background: var(--blue-100); }
.ph--photo picture, .ph--photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.ph--photo img { object-fit: cover; transition: transform 0.9s var(--ease-out); }
.card:hover .ph--photo img, .service:hover .ph--photo img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .card:hover .ph--photo img, .service:hover .ph--photo img { transform: none; } }

/* ---------- Sobre mí: texto largo y desplegables ---------- */
.split--top { align-items: start; }
.split__media--sticky { position: sticky; top: 9.5rem; }
.bio { max-width: 40rem; }
.bio p { font-size: 1.06rem; line-height: 1.75; color: var(--ink-soft); margin-bottom: 1.25em; }
.bio p:first-child { font-size: clamp(1.15rem, 1.8vw, 1.3rem); line-height: 1.6; color: var(--ink); }

.accordion { display: grid; gap: 1rem; max-width: 52rem; margin-inline: auto; }
.acc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-s); transition: box-shadow 0.4s var(--ease-out), border-color 0.3s; }
.acc[open] { box-shadow: var(--shadow-m); border-color: var(--blue-300); }
.acc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding: 1rem 1.5rem;
  font: 500 1.3rem/1.25 var(--font-display); letter-spacing: -0.01em; color: var(--navy-900); cursor: pointer; list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:focus-visible { outline-offset: -3px; border-radius: var(--radius-m); }
.acc summary svg { flex: none; width: 36px; height: 36px; padding: 8px; border: 1.5px solid var(--blue-300); border-radius: 50%; color: var(--blue-600); transition: transform 0.45s var(--ease-out), background-color 0.3s, color 0.3s; }
.acc summary:hover svg { background: var(--blue-100); }
.acc[open] summary svg { transform: rotate(180deg); background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.acc__body { padding: 0 1.5rem 1.6rem; max-width: 44rem; }
.acc__body p { color: var(--ink-soft); }
.acc__body .checklist { margin-top: 0.5rem; }
.acc[open] .acc__body { animation: accIn 0.5s var(--ease-out); }
@keyframes accIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) { .split__media--sticky { position: static; } }
@media (max-width: 520px) { .acc summary { font-size: 1.15rem; padding: 0.9rem 1.1rem; } .acc__body { padding: 0 1.1rem 1.3rem; } }
@media (prefers-reduced-motion: reduce) { .acc[open] .acc__body { animation: none; } .acc summary svg { transition: none; } }

/* ---------- Mapa (se carga solo con un clic) ---------- */
.map { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--radius-m); border: 1px solid var(--line); box-shadow: var(--shadow-s); background: var(--blue-100); }
.map__cover { position: absolute; inset: 0; border-radius: 0; }
.map__cover .ph__inner { gap: 0.9rem; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--ink-soft); }

.map-box .map__cover { aspect-ratio: auto; height: 100%; }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 90;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-width: 56px; min-height: 56px; padding: 0 1.1rem;
  border-radius: 999px; background: #0f7a6d; color: #fff; box-shadow: var(--shadow-m);
  font: 500 0.78rem/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase;
  transition: transform 0.12s ease-out, box-shadow 0.3s var(--ease-out), background-color 0.25s;
}
.wa-float svg { width: 26px; height: 26px; flex: none; }
.wa-float:hover { background: #0b645a; box-shadow: var(--shadow-l); }
.wa-float:active { transform: scale(0.95); }
html.intro .wa-float { visibility: hidden; }
@media (max-width: 699px) { .wa-float { padding: 0; width: 56px; } .wa-float span { display: none; } }

/* ---------- Páginas legales ---------- */
.legal-data { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.5rem; padding: 1.25rem 1.5rem; background: var(--blue-50); border: 1px solid var(--line); border-radius: var(--radius-m); }
.legal-data li { color: var(--ink-soft); }
.legal-data strong { color: var(--navy-900); font-weight: 600; }
.prose a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 3px; }
.prose ul:not(.legal-data) { margin-top: 0.5rem; }
.prose ul:not(.legal-data) li { margin-bottom: 0.5rem; }

.prose .legal-data { list-style: none; padding: 1.25rem 1.5rem; }
.container.prose { max-width: none; }
.container.prose > * { max-width: 46rem; }

/* ---------- Aviso de cookies ---------- */
.linklike { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.site-footer .linklike:hover { color: #fff; }
.site-footer .linklike:focus-visible { outline-color: #fff; }

.cookie-banner {
  position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 400;
  width: min(100% - 2rem, 980px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.1rem 2rem; align-items: center;
  padding: 1.25rem 1.5rem; border-radius: var(--radius-m);
  background: rgba(255, 255, 255, 0.88); border: 1px solid var(--line); box-shadow: var(--shadow-l);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  opacity: 0; transform: translate(-50%, 24px);
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.is-in { opacity: 1; transform: translate(-50%, 0); }
.cookie-banner__title { font: 500 1.3rem/1.2 var(--font-display); color: var(--navy-900); }
.cookie-banner p { margin: 0.4rem 0 0; font-size: 0.92rem; color: var(--ink-soft); }
.cookie-banner p a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
body.cookie-open .wa-float { bottom: calc(var(--cookie-h, 160px) + 1.5rem); }
.wa-float { transition: transform 0.12s ease-out, box-shadow 0.3s var(--ease-out), background-color 0.25s, bottom 0.5s var(--ease-out); }
@media (max-width: 760px) {
  .cookie-banner { grid-template-columns: minmax(0, 1fr); padding: 1.1rem 1.1rem 1.2rem; }
  .cookie-banner__actions .btn { flex: 1 1 calc(50% - 0.3rem); padding-inline: 0.5rem; }
  .cookie-banner__actions .btn[data-cc="config"] { flex-basis: 100%; }
}

.cookie-dialog { width: min(100% - 2rem, 560px); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: var(--radius-l); background: var(--card); color: var(--ink); box-shadow: var(--shadow-l); overflow: auto; }
.cookie-dialog::backdrop { background: rgba(10, 33, 80, 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cookie-dialog__body { padding: clamp(1.4rem, 4vw, 2rem); }
.cookie-dialog h2 { font-size: 1.6rem; margin-bottom: 0.6rem; }
.cookie-dialog p { color: var(--ink-soft); font-size: 0.95rem; }
.cc-row { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.1rem 0; border-top: 1px solid var(--line); cursor: pointer; }
.cc-row strong { display: block; color: var(--navy-900); font-weight: 600; }
.cc-row small { display: block; margin-top: 0.2rem; color: var(--ink-soft); font-size: 0.85rem; line-height: 1.45; }
.cc-switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 50px; height: 30px; margin: 0; border-radius: 999px; background: #7a8aa3; cursor: pointer; transition: background-color 0.25s; }
.cc-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.3s var(--ease-out); }
.cc-switch:checked { background: var(--navy-900); }
.cc-switch:checked::after { transform: translateX(20px); }
.cc-switch:disabled { opacity: 0.55; cursor: not-allowed; }
.cc-switch:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 3px; }
.cookie-dialog__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.cookie-dialog__actions .btn { flex: 1 1 auto; }

.map__consent { max-width: 26rem; margin: 0; font-size: 0.85rem; line-height: 1.45; color: var(--ink-soft); }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-s); }
.cookie-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.88rem; }
.cookie-table th, .cookie-table td { padding: 0.75rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.cookie-table th { background: var(--blue-50); color: var(--navy-900); font-weight: 600; }
.cookie-table tr:last-child td { border-bottom: 0; }
.cookie-table code { font-size: 0.85em; color: var(--navy-900); }
.prose .btn { text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .cookie-banner { transition: opacity 0.2s; transform: translate(-50%, 0); } }
@media (prefers-reduced-transparency: reduce) { .cookie-banner { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ---------- SEO: migas de pan, credenciales, ficha NAP ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
h1 > .eyebrow { display: flex; margin-bottom: 1.1rem; font-family: var(--font-body); line-height: 1.4; }
.breadcrumb { margin-bottom: 1.4rem; font-size: 0.82rem; color: var(--ink-soft); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.35rem; opacity: 0.5; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb a:hover { color: var(--blue-600); }
.breadcrumb [aria-current] { color: var(--navy-900); font-weight: 500; }
.creds { margin: 0 0 1.25rem; font-size: 0.9rem; font-weight: 500; color: var(--navy-700); }
.nap-card { padding: 1.6rem 1.8rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-s); }
.nap-card h3 { margin-bottom: 0.75rem; }
.nap-card p { color: var(--ink-soft); margin-bottom: 0.9rem; }
.nap-card p:last-child { margin-bottom: 0; }
.nap-card a:not(.link-arrow) { color: var(--navy-900); text-decoration: underline; text-underline-offset: 3px; }
.footer__grid { grid-template-columns: 1.3fr 1fr 1.3fr 1fr 1.3fr; }
@media (max-width: 1100px) { .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: minmax(0, 1fr); } }
