/* Peiros · web corporativa
   Layout: secciones amplias y aireadas que alternan fondo blanco y fondo suave; ilustración plana a la izquierda
   del hero y texto a la derecha; tarjetas sobrias solo donde agrupan contenido. Modo claro y oscuro con selector. */

:root {
  --bg: #ffffff;
  --bg-soft: #f2f6f5;
  --card: #ffffff;
  --text: #13252a;
  --muted: #56676b;
  --line: #e1e8e6;
  --brand: #123a43;
  --brand-ink: #ffffff;
  --teal: #1f6f6b;
  --accent: #d9952b;
  --accent-soft: #fbefd9;
  --ill-floor: #e3eeec;
  --ill-dark: #1b2b2f;
  --ill-screen: #dcecea;
  --ill-metal: #c9d4d2;
  --ill-skin: #f1c8a5;
  --ill-skin-2: #c58b62;
  --ill-hair: #2b2421;
  --ill-hair-grey: #b9b4ae;
  --ill-leaf: #2f8a7f;
  --shadow: 0 1px 2px rgba(19, 37, 42, .05), 0 8px 24px rgba(19, 37, 42, .06);
  --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1618; --bg-soft: #122023; --card: #152427; --text: #e6eeec; --muted: #9fb2b3; --line: #26383c;
    --brand: #7cc6c3; --brand-ink: #0d1618; --teal: #8fd3cf; --accent: #f0b44e; --accent-soft: #3a2d14;
    --ill-floor: #18292c; --ill-dark: #050b0c; --ill-screen: #23403f; --ill-metal: #4b5d60;
    --ill-skin: #e7b993; --ill-skin-2: #b97f57; --ill-hair: #0b0908; --ill-hair-grey: #a8a29b; --ill-leaf: #4fb3a6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1618; --bg-soft: #122023; --card: #152427; --text: #e6eeec; --muted: #9fb2b3; --line: #26383c;
  --brand: #7cc6c3; --brand-ink: #0d1618; --teal: #8fd3cf; --accent: #f0b44e; --accent-soft: #3a2d14;
  --ill-floor: #18292c; --ill-dark: #050b0c; --ill-screen: #23403f; --ill-metal: #4b5d60;
  --ill-skin: #e7b993; --ill-skin-2: #b97f57; --ill-hair: #0b0908; --ill-hair-grey: #a8a29b; --ill-leaf: #4fb3a6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16.5px/1.65 var(--font-ui); -webkit-font-smoothing: antialiased; }
a { color: var(--teal); }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
section { padding-block: 88px; }
section.soft { background: var(--bg-soft); }

/* --- Cabecera --- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; }
.brand svg { width: 30px; height: 30px; color: var(--brand); }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .94rem; }
.site-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 24px; font: 700 .95rem var(--font-ui); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s, background .15s; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); }
.btn-small { padding: 9px 18px; font-size: .88rem; }

/* --- Hero --- */
.hero { padding-block: 72px 88px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 5.4vw, 4rem); letter-spacing: -.01em; }
.hero h1 em { color: var(--accent); }
.hero p.lead { color: var(--muted); font-size: 1.12rem; margin: 20px 0 30px; max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 22px; font-size: .88rem; color: var(--muted); }

/* --- Bloque de declaración --- */
.statement { text-align: center; }
.statement blockquote { margin: 0 auto; max-width: 820px; font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.25; }
.statement blockquote em { color: var(--teal); }
.statement p { color: var(--muted); max-width: 640px; margin: 22px auto 0; }

/* --- Títulos de sección --- */
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); letter-spacing: -.02em; font-weight: 800; }
.section-head h2 span { color: var(--teal); }
.section-head p { color: var(--muted); margin: 14px 0 0; font-size: 1.05rem; }

/* --- Pasos --- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.step-icon svg { width: 28px; height: 28px; }
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step h3::before { counter-increment: step; content: counter(step) ". "; color: var(--accent); }
.step p { color: var(--muted); margin: 0; }

/* --- Pacientes --- */
.patients { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.patient.custom { border-style: dashed; background: transparent; justify-content: center; }
.patient.custom a { font-weight: 700; text-decoration: none; }
.patient { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.patient-head { display: flex; align-items: center; gap: 12px; }
.patient-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-soft); color: var(--teal); font-weight: 800; }
.patient h3 { font-size: 1.02rem; }
.patient .age { font-size: .85rem; color: var(--muted); }
.patient p { margin: 0; color: var(--muted); font-size: .94rem; }
.patient .skill { margin-top: auto; font-size: .8rem; font-weight: 700; color: var(--teal); }
.patients-note { margin-top: 22px; color: var(--muted); font-size: .92rem; }

/* --- Docentes --- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.checks li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.checks li svg { width: 22px; height: 22px; color: var(--teal); margin-top: 3px; }
.checks b { display: block; }
.checks span { color: var(--muted); font-size: .96rem; }

.mock { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 26px; }
.mock-top { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.mock-ring { width: 96px; height: 96px; flex: none; position: relative; }
.mock-ring svg { transform: rotate(-90deg); }
.mock-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; }
.mock-title { font-weight: 800; }
.mock-sub { color: var(--muted); font-size: .9rem; }
.mock-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.bars { display: flex; gap: 3px; }
.bars i { width: 20px; height: 6px; border-radius: 3px; background: var(--bg-soft); }
.bars i.on { background: var(--brand); }
.mock-quote { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; font-size: .9rem; }

/* --- Modalidades --- */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mode { text-align: center; padding: 30px 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.mode svg { width: 44px; height: 44px; color: var(--teal); margin-bottom: 12px; }
.mode h3 { font-size: 1.1rem; margin-bottom: 6px; }
.mode p { margin: 0; color: var(--muted); font-size: .94rem; }

/* --- Seguridad --- */
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; }
.pillar { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
.pillar svg { width: 30px; height: 30px; color: var(--accent); }
.pillar h3 { font-size: 1.05rem; margin-bottom: 4px; }
.pillar p { margin: 0; color: var(--muted); font-size: .95rem; }

/* --- Equipo --- */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.member { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.member svg { width: 76px; height: 76px; }
.member h3 { font-size: 1.1rem; }
.member .role { color: var(--teal); font-weight: 700; font-size: .88rem; margin: 2px 0 8px; }
.member p { margin: 0; color: var(--muted); font-size: .95rem; }

/* --- Contacto --- */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; }
.contact form { display: grid; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact label { display: grid; gap: 6px; font-size: .86rem; font-weight: 700; color: var(--muted); min-width: 0; }
.contact input, .contact select, .contact textarea { width: 100%; min-width: 0; font: inherit; font-size: .98rem; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.contact input:focus, .contact select:focus, .contact textarea:focus { outline: none; border-color: var(--brand); }
.contact textarea { min-height: 110px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-status { font-size: .92rem; min-height: 1.4em; }
.form-status.ok { color: var(--teal); }
.form-status.error { color: #c0453d; }

/* --- Pie --- */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px; color: var(--muted); font-size: .88rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }

/* --- Ilustración --- */
.illustration svg { width: 100%; height: auto; display: block; }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .hero .wrap, .split, .contact { grid-template-columns: 1fr; gap: 40px; }
  .hero .illustration { order: 2; }
  .steps, .modes { grid-template-columns: 1fr; }
  .patients { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillars, .team { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  section { padding-block: 64px; }
  .wrap { padding-inline: 16px; }
  .header-actions .btn-ghost { display: none; }
  .contact .row { grid-template-columns: 1fr; }
  .member { grid-template-columns: 1fr; }
  .patients { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* Colores de las ilustraciones (se adaptan al tema) */
.f-floor { fill: var(--ill-floor); } .f-dark { fill: var(--ill-dark); } .f-screen { fill: var(--ill-screen); }
.f-metal { fill: var(--ill-metal); } .f-skin { fill: var(--ill-skin); } .f-skin2 { fill: var(--ill-skin-2); }
.f-hair { fill: var(--ill-hair); } .f-grey { fill: var(--ill-hair-grey); } .f-leaf { fill: var(--ill-leaf); }
.f-brand { fill: var(--brand); } .f-accent { fill: var(--accent); } .f-accent-soft { fill: var(--accent-soft); }
.f-card { fill: var(--card); } .f-teal { fill: var(--teal); } .f-soft { fill: var(--bg-soft); }
.s-line { stroke: var(--line); } .s-accent { stroke: var(--accent); } .s-brand { stroke: var(--brand); } .s-skin2 { stroke: var(--ill-skin-2); }

/* --- Páginas legales --- */
.legal { padding-block: 56px 88px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 4.5vw, 3rem); margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: .9rem; margin: 0 0 32px; }
.legal h2 { font-size: 1.2rem; font-weight: 800; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--text); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .summary { background: var(--bg-soft); border-radius: 18px; padding: 20px 24px; margin-bottom: 8px; }
.legal .summary p { margin: 6px 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: .94rem; margin: 10px 0; }
.legal th, .legal td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.legal .table-wrap { overflow-x: auto; }
.fill { background: var(--accent-soft); color: var(--text); border-radius: 6px; padding: 0 6px; font-weight: 600; }
.form-legal { font-size: .8rem; color: var(--muted); margin: 0; line-height: 1.5; }

/* Vídeo de demostración (horizontal en pantallas grandes, vertical en el móvil) */
.demo-video { margin: 56px auto 0; max-width: 960px; display: grid; gap: 14px; }
.demo-video video { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: var(--ill-dark); box-shadow: var(--shadow); border: 1px solid var(--line); }
.demo-video figcaption { color: var(--muted); font-size: .95rem; text-align: center; max-width: 640px; margin-inline: auto; }
@media (max-width: 640px) {
  .demo-video { margin-top: 40px; }
  .demo-video video { aspect-ratio: 9 / 16; width: auto; height: min(78vh, 640px); margin-inline: auto; }
}
