/* ==========================================================
   Sergio Mesonero · Fisioterapia — hoja de estilos única
   Sin dependencias externas (sin CDN, sin Google Fonts):
   la web no carga recursos de terceros ni instala cookies.
   ========================================================== */

:root {
  --bg: #000000;
  --section: #0a0a0a;
  --card: #111827;
  --line: #1f2937;
  --line-soft: #111111;
  --line-strong: #374151;
  --text: #d1d5db;
  --muted: #9ca3af;
  --faint: #6b7280;
  --white: #ffffff;
  --accent: #10b981;
  --accent-hover: #22c55e;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--white); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--white); margin: 0; line-height: 1.15; }
p { margin: 0; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
.wrap-md { max-width: 64rem; margin: 0 auto; padding: 0 16px; }
.wrap-sm { max-width: 48rem; margin: 0 auto; padding: 0 16px; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; padding-bottom: 16px; gap: 12px; }
.brand { text-decoration: none; display: flex; flex-direction: column; }
.brand-name { font-weight: 900; font-size: 1.5rem; color: var(--white); letter-spacing: -0.05em; text-transform: uppercase; line-height: 1; }
.brand-name span, .dot { color: var(--accent); }
.brand-sub { font-size: 10px; font-weight: 700; color: var(--faint); letter-spacing: .2em; text-transform: uppercase; margin-top: 4px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; text-decoration: none; border-radius: 10px;
  transition: background .2s, transform .2s, border-color .2s;
  cursor: pointer; border: 0; font-family: inherit; text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-pill { border-radius: 999px; padding: 10px 20px; font-size: .875rem; }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-white { background: var(--white); color: #000; }
.btn-white:hover { background: #e5e7eb; }
.btn-outline { background: transparent; color: var(--white); border: 1px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--accent); }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-xl { padding: 16px 40px; font-size: 1.125rem; }
.btn svg { flex-shrink: 0; }
.only-sm { display: inline; }
.only-lg { display: none; }
@media (min-width: 640px) { .only-sm { display: none; } .only-lg { display: inline; } }

.cta-row { display: flex; flex-direction: column; gap: 12px; }
.cta-row .btn { width: 100%; }
@media (min-width: 640px) { .cta-row { flex-direction: row; } .cta-row .btn { width: auto; } }

.privacy-note { font-size: .75rem; color: var(--faint); margin-top: 12px; line-height: 1.5; }
.privacy-note a { color: var(--muted); }
.privacy-note a:hover { color: var(--white); }

/* ---------- Secciones ---------- */
.section { padding: 64px 0; border-bottom: 1px solid #111; }
.section.alt { background: var(--section); }
.section:last-of-type { border-bottom: 0; }
@media (min-width: 768px) { .section { padding: 96px 0; } }

.split { display: flex; flex-direction: column; align-items: center; gap: 48px; }
.split > * { width: 100%; }
@media (min-width: 768px) {
  .split { flex-direction: row; }
  .split > .half { width: 50%; }
  .split > .two-fifths { width: 40%; }
  .split > .three-fifths { width: 60%; }
}

.eyebrow { display: block; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .875rem; color: var(--muted); margin-bottom: 16px; }
.eyebrow.dim { color: var(--faint); margin-bottom: 8px; }
.h1 { font-size: 2.25rem; font-weight: 900; letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 24px; }
.h2 { font-size: 1.875rem; font-weight: 900; margin-bottom: 24px; line-height: 1.2; }
@media (min-width: 768px) { .h1 { font-size: 3.75rem; } }
.lead { font-size: 1.125rem; color: var(--muted); margin-bottom: 32px; line-height: 1.7; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Hero */
.hero .split { padding-top: 48px; padding-bottom: 48px; }
@media (min-width: 768px) { .hero .split { padding-top: 80px; padding-bottom: 80px; } .hero-text { text-align: left; } }
.hero-text { text-align: center; }
.photo { width: 100%; border-radius: var(--radius); object-fit: cover; border: 2px solid var(--line); opacity: .9; }
.photo-hero { height: 400px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.6); }
.photo-tall { height: 500px; }
.photo-wide { height: 250px; }
@media (min-width: 768px) { .photo-hero { height: 550px; } .photo-wide { height: 300px; } }
.photo-portrait { max-width: 24rem; margin: 0 auto; height: auto; }

/* Tarjetas */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card-lg { border-radius: var(--radius); padding: 32px; transition: border-color .3s; }
.card-lg:hover { border-color: #4b5563; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.pain { display: flex; gap: 16px; align-items: flex-start; }
.pain .icon { color: #ef4444; margin-top: 2px; }
.pain h3 { font-size: 1rem; }
.pain p { color: var(--muted); font-size: .875rem; margin-top: 4px; }

.grid-3 { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.phase-letter { font-size: 2.25rem; font-weight: 900; color: var(--white); margin-bottom: 16px; }
.phase h3 { font-size: 1.25rem; margin-bottom: 8px; }
.tag { font-size: .75rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.phase p.body { color: var(--muted); font-size: .875rem; line-height: 1.7; }

.prose-block p + p { margin-top: 16px; }
.prose-block { color: var(--muted); line-height: 1.7; }
.prose-block strong { color: var(--white); }
.badge { margin-top: 32px; display: inline-block; background: var(--card); color: var(--white); font-weight: 700; padding: 12px 20px; border-radius: 10px; border: 1px solid var(--line); }

.logo-tac { height: 12rem; width: auto; margin: 0 auto 32px; object-fit: contain; mix-blend-mode: lighten; }
@media (min-width: 768px) { .logo-tac { height: 16rem; } }
@media (min-width: 1024px) { .logo-tac { height: 18rem; } }
.intro { max-width: 42rem; margin: 0 auto; font-size: 1.125rem; color: var(--muted); }
.mb-64 { margin-bottom: 64px; }

/* Casos */
.case-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--line); border: 1px solid var(--line-strong); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.25rem; }
.case-head h4 { font-size: 1rem; }
.case-head p { font-size: .75rem; color: var(--accent); text-transform: uppercase; font-weight: 600; }
.case p.body { color: var(--muted); font-size: .875rem; line-height: 1.7; }
.disclaimer { font-size: .75rem; color: var(--faint); margin-top: 24px; text-align: center; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 16px; text-align: left; margin: 40px 0 48px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px; font-weight: 700; color: var(--white); cursor: pointer; transition: background .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--line); }
.faq summary svg { flex-shrink: 0; transition: transform .2s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .answer { color: var(--muted); padding: 0 20px 20px; line-height: 1.7; }

/* ---------- Pie ---------- */
.site-footer { background: var(--section); border-top: 1px solid #111; color: var(--faint); padding: 48px 0 32px; }
.footer-top { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 24px; text-align: center; }
@media (min-width: 768px) { .footer-top { flex-direction: row; text-align: left; } }
.footer-brand { font-weight: 900; font-size: 1.25rem; color: var(--white); letter-spacing: -0.05em; margin-bottom: 8px; }
.footer-top p { font-size: .875rem; }
.social { color: var(--faint); transition: color .2s; }
.social:hover { color: var(--white); }
.footer-bottom { margin-top: 32px; padding-top: 24px; border-top: 1px solid #111; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 16px; font-size: .75rem; color: #4b5563; text-align: center; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; text-align: left; } }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
.legal-links a { text-decoration: none; transition: color .2s; }
.legal-links a:hover, .legal-links a[aria-current="page"] { color: #d1d5db; }

/* ---------- Páginas legales ---------- */
.legal { padding: 48px 0 80px; }
.legal .back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: .875rem; margin-bottom: 32px; }
.legal .back:hover { color: var(--white); }
.legal h1 { font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 8px; }
@media (min-width: 768px) { .legal h1 { font-size: 2.5rem; } }
.legal .updated { color: var(--faint); font-size: .875rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.25rem; font-weight: 800; margin: 40px 0 12px; padding-top: 8px; }
.legal h3 { font-size: 1rem; font-weight: 700; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--muted); line-height: 1.75; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; margin: 12px 0; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--text); }
.legal a { color: var(--accent); }
.legal .box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin: 16px 0; }
.legal .box p { margin: 0; }
.legal .box p + p { margin-top: 4px; }
.table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }
.legal table { width: 100%; border-collapse: collapse; font-size: .875rem; min-width: 560px; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.legal th { color: var(--white); background: var(--card); font-weight: 700; }
.legal tr:last-child td { border-bottom: 0; }
