/* ==========================================================================
   Roles tipográficos del contenido. Los nombres vienen de la migración (un rol
   por estilo medido en la web original); aquí se reinterpretan en el estilo
   nuevo: títulos en Bodoni cursiva, texto en Jost ligera y antetítulos en
   versalitas espaciadas. Uso: <h2 class="t-h2 c-pizarra a-center">
   ========================================================================== */

/* --- Títulos (Bodoni Moda cursiva) ---------------------------------------- */
.t-h-banda,
.t-h2,
.t-h2-xl,
.t-h2-40,
.t-h2-38,
.t-acento,
.t-h3-22,
.t-h5,
.t-card,
.t-display,
.t-display-md {
    padding-bottom: 12px;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -.01em;
    font-size: var(--fs);
    color: var(--color-tinta);
}

/* Cada rol fija su tamaño en --fs (así las cajas estrechas pueden limitarlo, ver abajo) */
.t-h-banda { --fs: clamp(2rem, 1.45rem + 1.9vw, 3.25rem); }
.t-h2 { --fs: var(--fs-h2); }
.t-h2-xl { --fs: var(--fs-h2-grande); }
.t-h2-40,
.t-h2-38 { --fs: var(--fs-h2-seccion); }
.t-acento { --fs: var(--fs-h2-acento); }
.t-h3-22 { --fs: 1.5rem; }
.t-h5 { --fs: var(--fs-h5); }
.t-card { --fs: 1.5rem; line-height: 1.2; }
.t-display { --fs: var(--fs-display); line-height: 1; letter-spacing: -.02em; }
.t-display-md { --fs: var(--fs-display-md); line-height: 1.05; letter-spacing: -.02em; }

h1.t-h-banda,
h1.t-h2 { padding-bottom: 0; }

/* Dentro de una caja estrecha el título se ajusta a su ancho en vez de partir la palabra
   (la Bodoni es más ancha que la Gilda de la original). 15cqi deja sitio a unos 6-7 caracteres. */
.caja { container-type: inline-size; }
.caja :is(.t-h-banda, .t-h2, .t-h2-xl, .t-h2-40, .t-h2-38, .t-acento, .t-display, .t-display-md) {
    font-size: min(var(--fs), 15cqi);
}

/* Título compuesto de las fichas: "La Vila Hort" / "-" / "Dúplex Confortable".
   El guion central se convierte en un filete corto. */
.titulo-compuesto > span { display: block; }
.titulo-compuesto > span:nth-child(2) {
    width: 40px;
    height: 1px;
    margin: 18px auto;
    overflow: hidden;
    background-color: var(--color-arena);
    color: transparent;
}
.titulo-compuesto + .divisor { margin: 36px auto 10px; }

/* --- Antetítulos y rótulos (Jost en versalitas espaciadas) ---------------- */
.t-ante,
.t-ante-28,
.t-mini,
.t-h4 {
    padding-bottom: 18px;
    font-family: var(--font-texto);
    font-size: var(--fs-ante);
    font-style: normal;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: var(--ls-ante);
    text-transform: uppercase;
}

.t-mini { padding-bottom: 0; font-size: var(--fs-ui); letter-spacing: var(--ls-ui); }
.t-h4 { padding-bottom: 10px; }

/* --- Texto (Jost 300) ----------------------------------------------------- */
.t-p,
.t-p-compacto,
.t-p-18,
.t-p-18c,
.t-p-19,
.t-p-16,
.t-p-lista {
    font-family: var(--font-texto);
    font-weight: 300;
    color: var(--color-texto);
}

.t-p,
.t-p-19 { font-size: var(--fs-texto); line-height: var(--lh-texto); }
.t-p-compacto { font-size: var(--fs-texto); line-height: 1.65; }
.t-p-18 { font-size: 1rem; line-height: 1.8; }
.t-p-18c { font-size: 1rem; line-height: 1.6; }
.t-p-16 { font-size: .9375rem; line-height: 1.7; }
.t-p-lista { font-size: var(--fs-texto); line-height: 2.1; }

.t-p p,
.t-p-compacto p,
.t-p-18 p,
.t-p-19 p,
.t-p-lista p {
    padding-bottom: 1.1em;
}

.t-p p:last-child,
.t-p-compacto p:last-child,
.t-p-18 p:last-child,
.t-p-19 p:last-child,
.t-p-lista p:last-child {
    padding-bottom: 0;
}

/* Viñetas finas: un guion corto en arena en lugar del disco */
.t-p ul,
.t-p-compacto ul,
.t-p-18 ul,
.t-p-lista ul,
.t-legal ul {
    padding: 0 0 1.4em;
    list-style: none;
}

.t-p li,
.t-p-compacto li,
.t-p-18 li,
.t-p-lista li,
.t-legal ul > li {
    position: relative;
    padding-left: 1.6em;
}

.t-p li::before,
.t-p-compacto li::before,
.t-p-18 li::before,
.t-p-lista li::before,
.t-legal ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .9em;
    width: .8em;
    height: 1px;
    background-color: var(--color-arena);
}

.t-p strong,
.t-p-18 strong { font-weight: 500; color: var(--color-tinta); }

.t-p a,
.t-p-18 a,
.t-legal a {
    color: var(--color-tinta);
    text-decoration: underline;
    text-decoration-color: var(--color-arena);
    transition: text-decoration-color var(--t-suave);
}

.t-p a:hover,
.t-p-18 a:hover,
.t-legal a:hover { text-decoration-color: currentColor; }

/* --- Páginas legales y carta ---------------------------------------------- */
.t-legal {
    font-family: var(--font-texto);
    font-size: .9375rem;
    font-weight: 300;
    line-height: 1.85;
    color: var(--color-texto);
}

.t-legal p { padding-bottom: 1em; }
.t-legal ul { line-height: 1.8; }
.t-legal ol { padding: 0 0 1.4em; list-style: decimal inside; line-height: 1.8; }
.t-legal table { width: 100%; margin: 0 0 24px; border-collapse: collapse; font-size: .875rem; }
.t-legal td,
.t-legal th { padding: 10px 18px; border-bottom: 1px solid var(--color-linea); text-align: left; vertical-align: top; }
.t-legal th { font-weight: 400; color: var(--color-tinta); }

/* Tablas anchas (política de cookies): desplazamiento propio en pantallas estrechas */
@media (max-width: 767px) {
    .t-legal table { display: block; max-width: 100%; overflow-x: auto; }
}

.t-legal-xl,
.t-legal-h1,
.t-legal-h2,
.t-legal-h3 {
    padding-bottom: 14px;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-tinta);
}

.t-legal-xl { font-size: var(--fs-h1); line-height: 1.1; }
.t-legal-h1 { font-size: 2rem; }
.t-legal-h2 { font-size: 1.625rem; padding-top: 18px; }
.t-legal-h3 { font-size: 1.3125rem; padding-top: 8px; }

/* --- Colores ----------------------------------------------------------------
   La web ya no tiene bandas oscuras: los colores "claros sobre oscuro" de la
   original (crema, arena claro) pasan a tinta/texto sobre blanco. */
.c-pizarra,
.c-negro,
.c-gris,
.c-crema,
.c-azul { color: var(--color-tinta); }
.c-gris-texto,
.c-arena-claro { color: var(--color-texto); }
.c-arena { color: var(--color-arena-texto); }
/* Los iconos (FontAwesome macizos) van siempre en arena clara para no pesar junto a la letra fina */
.icono[class] { color: var(--color-arena); }
.c-blanco { color: var(--color-blanco); }

/* Los párrafos van siempre un tono por debajo de los títulos */
:is(.t-p, .t-p-compacto, .t-p-18, .t-p-18c, .t-p-19, .t-p-16, .t-p-lista, .t-legal):is(.c-pizarra, .c-negro, .c-gris, .c-crema, .c-azul) {
    color: var(--color-texto);
}

/* Los antetítulos conservan la arena aunque la vista les ponga otro color */
:is(.t-ante, .t-ante-28, .t-h4)[class] { color: var(--color-arena-texto); }

/* --- Alineación y mayúsculas ------------------------------------------------
   El justificado de la original se sustituye por bandera a la izquierda: con
   una letra ligera el justificado abre "ríos" en el texto. */
.a-center { text-align: center; }
.a-justify { text-align: left; }
.a-right { text-align: right; }
.upper { text-transform: uppercase; }

/* Entradilla sin alineación propia bajo un título centrado: centrada y a medida de lectura */
:is(.t-h-banda, .t-h2, .t-h2-xl).a-center + :is(.t-p, .t-p-18):not(.a-justify, .a-right) {
    max-width: 46em;
    margin-inline: auto;
    text-align: center;
}

/* Párrafos vacíos de la original (<p>&nbsp;</p>) usados como separación */
.espacio { height: calc(var(--n, 1) * 2.4em); }
.espacio.t-p,
.espacio.t-p-18 { height: calc(var(--n, 1) * 2.2em); }
.espacio.t-p-compacto,
.espacio.t-p-18c { height: calc(var(--n, 1) * 2.4em); }

/* --- Piezas sueltas del contenido ------------------------------------------ */
.boton { padding: 0; margin: 0; }
.boton + .boton { margin-top: 20px; }

.icono { line-height: 0; }
.icono svg { display: inline-block; width: auto; fill: currentColor; }
.icono--64 svg { height: 40px; }
.icono--48 svg { height: 34px; }
.icono--32 svg { height: 26px; }
.icono a { color: inherit; transition: color var(--t-suave); }
.icono a svg { height: 24px; }   /* iconos que enlazan (redes): discretos */
.icono a:hover { color: var(--color-tinta); }

.col > * + * { margin-top: 0; }
.col > .icono + * { margin-top: 24px; }
.col > .divisor { margin-top: 24px; }

/* Visibilidad por dispositivo (ajustes "ocultar en móvil/escritorio" de Divi) */
@media (min-width: 768px) {
    .solo-movil { display: none !important; }
}

/* --- Móvil ------------------------------------------------------------------- */
@media (max-width: 767px) {
    .t-h-banda { --fs: 1.875rem; }
    .t-h2,
    .t-h2-xl,
    .t-h2-40,
    .t-h2-38,
    .t-acento { --fs: 1.75rem; }
    .t-card { --fs: 1.3125rem; }
    .t-display { --fs: 3.25rem; }
    .t-display-md { --fs: 2.75rem; }
    .t-ante,
    .t-ante-28 { font-size: .75rem; letter-spacing: .24em; }
    .t-p-lista { line-height: 1.9; }
    .t-legal-xl { font-size: 2.25rem; }

    /* La original fijaba tamaños móviles por módulo (--fs-m); la escala nueva ya es fluida */

    .am-left { text-align: left; }
    .am-center { text-align: center; }
    .am-right { text-align: right; }
    .am-justify { text-align: left; }
    :is(.t-h-banda, .t-h2, .t-h2-xl).am-left + :is(.t-p, .t-p-18):not(.a-justify, .a-right) { text-align: left; }

    .icono--64 svg { height: 36px; }
    .oculto-movil { display: none !important; }
}
