/* ============================================================
   FisioIzquierdo — demo de renovación
   Identidad conservada de la original (fisioizquierdo.es):
   azul profundo #171795, blanco, Raleway + Open Sans (OnePress).
   Modernización: tokens, tipografía fluida, bandas a sangre,
   alternancia texto/foto, reveals suaves.
   Paleta 60-30-10: 60% blanco/papel frío, 30% azul profundo,
   10% azul de marca #171795 como acento (CTA).
   ============================================================ */

:root {
  --blue: #171795;        /* azul de marca (idéntico a la original) */
  --blue-deep: #0d0e5a;   /* banda oscura / footer */
  --blue-hover: #1d1db4;
  --paper: #f7f8fc;       /* papel frío clínico */
  --white: #ffffff;
  --ink: #1c1d3d;         /* texto sobre claro */
  --muted: #4d5077;       /* secundario sobre claro (7.2:1 sobre papel) */
  --on-blue: #ffffff;
  --muted-on-blue: #c3c8ee; /* 8:1 sobre #171795 */
  --line: rgba(23, 23, 149, .16);
  --line-on-blue: rgba(255, 255, 255, .22);
  --f-display: 'Raleway', 'Segoe UI', sans-serif;
  --f-body: 'Open Sans', system-ui, sans-serif;
  --wrap: 1140px;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(13, 14, 90, .10);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 {
  font-family: var(--f-display);
  line-height: 1.12;
  margin: 0 0 .5em;
  color: var(--ink);
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.band--dark :focus-visible, footer :focus-visible { outline-color: #fff; }
section { scroll-margin-top: 24px; }
.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--blue); color: #fff; padding: .7rem 1.1rem;
}
.skip:focus { left: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); }

/* motivo "One To One": doble línea */
.rule2 { width: 64px; height: 9px; border-top: 3px solid var(--blue); border-bottom: 3px solid var(--blue); margin: 0 0 1.1rem; }
.band--dark .rule2, .band--blue .rule2 { border-color: #fff; }

/* numeración editorial (firma del sitio) */
.kicker {
  display: flex; align-items: baseline; gap: .7rem;
  font-family: var(--f-display); font-weight: 700; font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--blue);
  margin-bottom: .8rem;
}
.kicker .num { font-size: 1.9rem; font-weight: 900; letter-spacing: 0; line-height: 1; }
.band--dark .kicker, .band--blue .kicker { color: var(--muted-on-blue); }
.band--blue .kicker { color: #fff; }

/* ---------- header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 20;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }
.brand img { width: 180px; height: auto; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { font-family: var(--f-display); font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--ink); }
.nav a:hover { color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
.btn-tel {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  border: 2px solid var(--blue); color: var(--blue);
  padding: .5rem 1rem; border-radius: var(--radius);
}
.btn-tel:hover { background: var(--blue); color: #fff; }
.menu-btn {
  display: none; background: none; border: 2px solid var(--blue); border-radius: var(--radius);
  padding: .5rem .65rem; font: inherit; color: var(--blue); cursor: pointer;
  min-width: 44px; min-height: 44px; line-height: 0;
}
.menu-btn svg { width: 22px; height: 22px; }

/* ---------- bandas ---------- */
.band { padding: clamp(3.2rem, 8vw, 6rem) 0; }
.band--paper { background: var(--paper); }
.band--blue { background: var(--blue); color: var(--on-blue); }
.band--blue h2, .band--blue h3 { color: #fff; }
.band--deep { background: var(--blue-deep); color: var(--on-blue); }
.band--deep h2, .band--deep h3 { color: #fff; }
.band--blue p, .band--deep p { color: var(--muted-on-blue); }
.band-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3.4rem); }
.band-head .lead { font-size: 1.06rem; color: var(--muted); }
.band--blue .band-head .lead, .band--deep .band-head .lead { color: var(--muted-on-blue); }

/* hero split editorial */
.hero { padding: clamp(2.6rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy .kicker { margin-top: .4rem; }
.hero h1 { margin-bottom: .55em; }
.hero .sub { font-size: clamp(1.02rem, 1.6vw, 1.15rem); color: var(--muted); max-width: 34em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1.2rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .9rem; color: var(--muted); margin: 0; padding: 0; list-style: none; }
.hero-trust li { display: flex; align-items: center; gap: .45rem; }
.hero-trust svg { width: 15px; height: 15px; flex: none; color: var(--blue); }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow); position: relative; z-index: 1; width: 100%; }
.hero-media::before {
  content: ""; position: absolute; inset: 18px -14px -14px 18px;
  border: 3px solid var(--blue); border-radius: var(--radius); opacity: .35;
}
.hero-media::after {
  content: ""; position: absolute; top: -16px; left: 22px; z-index: 2;
  width: 56px; height: 9px; border-top: 3px solid var(--blue); border-bottom: 3px solid var(--blue);
}

/* botones */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--f-display); font-weight: 700; font-size: 1rem;
  padding: .85rem 1.5rem; border-radius: var(--radius);
  text-decoration: none; border: 2px solid var(--blue);
  background: var(--blue); color: #fff; cursor: pointer;
  min-height: 48px; transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--blue); }
.btn--ghost:hover { background: var(--blue); color: #fff; }
.btn--light { background: #fff; border-color: #fff; color: var(--blue); }
.btn--light:hover { background: transparent; color: #fff; }
.btn--ghost-light { background: transparent; border-color: #fff; color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--blue); }

/* banda de cifras (firma) */
.stats { background: var(--blue); color: #fff; padding: clamp(2.8rem, 7vw, 4.6rem) 0; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.stat { border-left: 3px solid rgba(255, 255, 255, .35); padding-left: 1.1rem; }
.stat .val {
  font-family: var(--f-display); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(2.1rem, 4.4vw, 3.2rem); line-height: 1; display: block;
  margin-bottom: .35rem; font-variant-numeric: tabular-nums;
}
.stat .lbl { font-size: .95rem; color: var(--muted-on-blue); display: block; }
.stats-note { margin: 2.2rem 0 0; font-size: .82rem; color: var(--muted-on-blue); }

/* bandas verticales texto/foto alternas */
.svc-band { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.svc-band + .svc-band { margin-top: clamp(3rem, 7vw, 5rem); }
.svc-band .photo { position: relative; }
.svc-band .photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.svc-band .photo::after {
  content: attr(data-credit); position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.2rem 1rem .7rem; border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(180deg, rgba(13,14,90,0) 0%, rgba(13,14,90,.82) 78%);
  color: #fff; font-size: .8rem;
}
.svc-band.flip .photo { order: -1; }
.svc-band p { color: var(--muted); max-width: 34em; }
.svc-band .more { font-weight: 700; }

/* método en 3 columnas */
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.method article { border-top: 3px solid var(--blue); padding-top: 1.1rem; }
.method .big {
  font-family: var(--f-display); font-weight: 900; font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: var(--blue); display: block; margin-bottom: .3rem; letter-spacing: -.02em;
}
.method p { color: var(--muted); font-size: .97rem; margin: 0; }

/* chips de servicios extra */
.chips { display: flex; flex-wrap: wrap; gap: .7rem; list-style: none; margin: 1.4rem 0 0; padding: 0; }
.chips li {
  font-family: var(--f-display); font-weight: 600; font-size: .92rem;
  border: 1px solid var(--line-on-blue); border-radius: 999px; padding: .45rem 1rem; color: #fff;
}

/* CTA final */
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.6rem; }
.cta-band h2 { margin-bottom: .3em; }
.cta-band p { margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* contacto */
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
form .field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: .35rem; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; padding: .8rem 1rem; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
input:focus, textarea:focus { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .88rem; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin-top: .15rem; flex: none; }
.form-ok { display: none; }
.form-ok.show { display: block; }
.centers { display: grid; gap: 1.2rem; }
.center-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.center-card h3 { margin-bottom: .2rem; }
.center-card address { font-style: normal; color: var(--muted); margin-bottom: .6rem; }
.center-card .tel { font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.contact-aside .mail { font-weight: 700; }

/* footer */
.site-footer { background: var(--blue-deep); color: var(--muted-on-blue); padding: clamp(2.6rem, 6vw, 4rem) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); padding-bottom: 2.4rem; }
.site-footer h3 { color: #fff; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; }
.site-footer a { color: var(--muted-on-blue); }
.site-footer a:hover { color: #fff; }
.footer-mark { font-family: var(--f-display); font-weight: 900; font-size: 1.5rem; color: #fff; letter-spacing: -.01em; }
.footer-mark span { color: #8f94e8; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.footer-legal { border-top: 1px solid var(--line-on-blue); padding: 1.2rem 0 1.4rem; font-size: .82rem; }
.footer-legal .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; justify-content: space-between; }
.footer-legal p { margin: 0; }
.social { display: flex; gap: .8rem; margin-top: .8rem; }
.social a { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line-on-blue); border-radius: 50%; }
.social svg { width: 18px; height: 18px; }

/* CTA sticky móvil */
.sticky-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--blue-deep); border-top: 1px solid var(--line-on-blue);
}
.sticky-cta a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem;
  color: #fff; text-decoration: none; font-family: var(--f-display); font-weight: 700;
  padding: .95rem .5rem; min-height: 56px; font-size: .98rem;
}
.sticky-cta a+a { border-left: 1px solid var(--line-on-blue); }
.sticky-cta svg { width: 17px; height: 17px; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero .wrap, .svc-band, .contact-grid { grid-template-columns: 1fr; }
  .svc-band.flip .photo { order: 0; }
  .hero-media { max-width: 560px; }
  .method { grid-template-columns: 1fr; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .svc-band .photo { max-width: 640px; }
  body { padding-bottom: 58px; }
  .sticky-cta { display: flex; }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: .6rem clamp(1.1rem, 4vw, 2rem) 1.2rem;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn-tel { margin-top: 1rem; justify-content: center; border-bottom: none; }
  .site-header .wrap { flex-wrap: wrap; }
  .btn-tel.header-tel { display: none; }
  .hero .wrap { gap: 2.2rem; }
}

/* ---------- animación (con respeto a reduced-motion) ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; transition-delay: var(--d, 0s); }
.reveal.visible { opacity: 1; transform: none; }
@supports (animation-timeline: view()) {
  .parallax img { animation: par linear both; animation-timeline: view(); animation-range: entry 0% cover 55%; }
  @keyframes par { from { transform: translateY(6%) scale(1.06); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .parallax img { animation: none; }
  * { transition-duration: .01ms !important; }
}
