/* ============================================================================
   BASE · LANDING PÚBLICA · PET'SALUD
   ---------------------------------------------------------------------------
   Archivo base de la landing pública (se sirve en "/").
   Plantilla: src/main/resources/templates/landing/landing.html

   Contenido: variables CSS (tokens), reset, tipografía base, foco visible,
   utilidades, botones, variantes de sección y la marca compartida.

   Los componentes compartidos viven acá porque los usan varios fragmentos:
     .container / .u-visually-hidden / .skip-link  → todas las secciones
     .btn                                           → hero, contacto, ubicacion
     .section*                                      → servicios, pacientes,
                                                      contacto, ubicacion
     .brand*                                        → header y footer

   Se enlaza el PRIMERO: define los tokens que usan el resto de archivos.
   ============================================================================ */

/* ===================== TOKENS / PALETA ===================== */
:root {
    /* Paleta de la clínica — la misma del login y del panel
       (ver static/CSS/dashboard.css y static/CSS/login.css) */
    --teal-900: #1B5B4E;   /* títulos, footer y bloques oscuros */
    --teal-700: #226F61;   /* botones primarios y acentos con texto */
    --teal-600: #2A8C7A;   /* color primario / bordes y grafismos */
    --teal-500: #38A08C;
    --teal-100: #CDE9E1;   /* acentos claros sobre bloques oscuros */
    --teal-50:  #EAF4F1;   /* fondos claros: hero y secciones alternas */
    --mint:     #E4F1EC;

    --white:  #FFFFFF;
    --ink-700: #3C4F4A;   /* texto corrido */
    --border:  #D3E0DB;
    --danger: #B23A24;    /* errores del formulario (mismo rojo que el panel) */

    --radius:    6px;
    --radius-lg: 8px;
    --container: 1200px;
    --nav-h:     72px;
    /* Huellitas de fondo: patron SVG de 3 huellas (teal-900 al 7%) en un
       tile de 380x380. Se usa en el hero y en la seccion de servicios. */
    --huellas: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 380 380'%3E%3Cg fill='%231B5B4E' fill-opacity='0.07'%3E%3Cg transform='translate(230,70) rotate(22) scale(1.25)'%3E%3Cellipse cx='32' cy='44' rx='14' ry='11.5'/%3E%3Cellipse cx='12' cy='25' rx='6' ry='8' transform='rotate(-30 12 25)'/%3E%3Cellipse cx='25' cy='12' rx='6' ry='8' transform='rotate(-9 25 12)'/%3E%3Cellipse cx='41' cy='12' rx='6' ry='8' transform='rotate(9 41 12)'/%3E%3Cellipse cx='53' cy='25' rx='6' ry='8' transform='rotate(30 53 25)'/%3E%3C/g%3E%3Cg transform='translate(110,210) rotate(8) scale(1.4)'%3E%3Cellipse cx='32' cy='44' rx='14' ry='11.5'/%3E%3Cellipse cx='12' cy='25' rx='6' ry='8' transform='rotate(-30 12 25)'/%3E%3Cellipse cx='25' cy='12' rx='6' ry='8' transform='rotate(-9 25 12)'/%3E%3Cellipse cx='41' cy='12' rx='6' ry='8' transform='rotate(9 41 12)'/%3E%3Cellipse cx='53' cy='25' rx='6' ry='8' transform='rotate(30 53 25)'/%3E%3C/g%3E%3Cg transform='translate(280,270) rotate(-28) scale(1.1)'%3E%3Cellipse cx='32' cy='44' rx='14' ry='11.5'/%3E%3Cellipse cx='12' cy='25' rx='6' ry='8' transform='rotate(-30 12 25)'/%3E%3Cellipse cx='25' cy='12' rx='6' ry='8' transform='rotate(-9 25 12)'/%3E%3Cellipse cx='41' cy='12' rx='6' ry='8' transform='rotate(9 41 12)'/%3E%3Cellipse cx='53' cy='25' rx='6' ry='8' transform='rotate(30 53 25)'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");

    --font-title: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
    --font-body:  'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ===================== RESET MÍNIMO ===================== */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 20px);
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.62;
    color: var(--ink-700);
    background: var(--white);
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; color: var(--teal-900); font-family: var(--font-title); font-weight: 600; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
/* El atributo hidden gana siempre: se usa para guardar datos que luego
   lee el JS (p. ej. los datos de cada tarjeta de paciente). */
[hidden] { display: none !important; }

/* Las anclas heredan el color del contexto: nunca aparece el azul del navegador */
a { color: inherit; }

/* --- Foco visible --- */
:focus-visible {
    outline: 3px solid var(--teal-700);
    outline-offset: 3px;
    border-radius: 3px;
}
.section--dark :focus-visible { outline-color: var(--white); }

/* ===================== UTILIDADES ===================== */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
}
.u-visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 16px; top: -80px;
    z-index: 200;
    background: var(--teal-900); color: var(--white);
    padding: 12px 18px; border-radius: var(--radius);
    font-weight: 600; text-decoration: none;
    transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

/* ========================= BOTONES ========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 22px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

.btn--primary { background: var(--teal-700); color: var(--white); }
.btn--primary:hover { background: var(--teal-900); }

.btn--outline { background: transparent; color: var(--teal-900); border-color: var(--teal-700); }
.btn--outline:hover { background: var(--teal-900); color: var(--white); border-color: var(--teal-900); }

.btn--ghost-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn--ghost-light:hover { background: var(--white); color: var(--teal-900); }

/* ========================= SECCIONES ========================= */
/* Base de todas las secciones de la landing (servicios, pacientes,
   contacto y ubicacion). */
.section { padding: 88px 0; }
.section--soft { background: var(--teal-50); }
.section--white { background: var(--white); }
.section--dark { background: var(--teal-900); color: var(--white); }
.section--dark .section__title { color: var(--white); }
.section--dark .section__sub { color: var(--teal-50); }

.section__head { text-align: center; max-width: 62ch; margin: 0 auto 52px; }
.section__title { font-size: clamp(1.9rem, 4vw, 2.55rem); }
.section__sub { margin-top: 16px; font-size: 1.06rem; }
.section__note {
    margin-top: 18px;
    font-size: .88rem;
    color: var(--ink-700);
    font-style: italic;
}

/* =========================== MARCA =========================== */
/* Marca compartida por el header y el footer. El footer la pisa con
   .site-footer .brand (ver static/CSS/landing/footer.css). */
.brand {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--teal-900);
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
}
/* Marca: logo real (static/img/logo.png) sobre un disco blanco.
   El PNG es verde sobre fondo transparente, asi que el disco claro
   garantiza el contraste tanto en el header blanco como en el footer teal. */
.brand__mark {
    width: 54px; height: 54px;
    display: grid; place-items: center;
    background: var(--white);
    border-radius: 50%;
    flex: 0 0 auto;
}
.brand__mark img {
    width: 45px; height: 45px;
    object-fit: contain;
    display: block;
}
.brand__name {
    font-family: var(--font-title);
    font-size: 1.18rem;
    font-weight: 600;
    color: var(--teal-900);
    letter-spacing: .01em;
    white-space: nowrap;

}

/* ===================== RESPONSIVE GLOBAL ===================== */
@media (max-width: 700px) {
    body { font-size: 16px; }
    .section { padding: 64px 0; }
    .container { padding-inline: 18px; }
}

@media (max-width: 380px) {
    .btn { width: 100%; }
}

/* ===================== ACCESIBILIDAD / MOVIMIENTO ===================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
