/*
Theme Name: Páez Terán 2026
Theme URI: https://jptabogados.com
Author: Páez Terán Abogados
Author URI: https://jptabogados.com
Description: Tema editorial premium para el estudio jurídico Páez Terán Abogados (Quito, desde 1958). Rediseño 2026 — verde institucional, ocre y crema, tipografía serif editorial, animaciones sutiles y rendimiento ultra rápido. Editable al 100% desde Apariencia → Editor.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: paez-teran-2026
Tags: block-theme, full-site-editing, one-column, custom-colors
*/

/* ==========================================================================
   PÁEZ TERÁN ABOGADOS — Rediseño editorial 2026 (WordPress FSE)
   Identidad: Manual de Marca — Verde #163F32 · Ocre #C69A6D
   ========================================================================== */

:root {
    --green: #163F32;
    --green-deep: #0C231C;
    --gold: #C69A6D;
    --gold-deep: #A87F4F;
    /* oro para texto pequeño sobre crema: #A87F4F solo da 3.2:1 y no pasa AA */
    --gold-ink: #8A6841;
    --gold-pale: #E3CBA8;
    --cream: #F6F1E7;
    --cream-2: #EFE8D9;
    --ink: #1B2823;
    --muted: #647169;
    --line: rgba(22, 63, 50, 0.16);
    --line-light: rgba(246, 241, 231, 0.18);
    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "Jost", "Avenir", "Century Gothic", sans-serif;
    --pad: clamp(1.25rem, 4vw, 4rem);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

/* Grano sutil — textura editorial */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 150;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--gold); color: var(--green-deep); }

/* Resets sobre bloques */
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-group { margin: 0; }
.wp-block-image { margin: 0; }
.wp-block-image img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }

/* ==========================================================================
   UTILIDADES (mismas clases que usan los patterns)
   ========================================================================== */

.eyebrow {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    font-size: 0.72rem !important;
    font-weight: 400;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--green);
}

.eyebrow strong,
.eyebrow em {
    font-family: var(--serif);
    font-size: 0.9rem;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--gold-deep);
}

.eyebrow::after {
    content: "";
    flex: 0 0 3.5rem;
    height: 1px;
    background: var(--gold);
    transform: translateY(-0.3em);
}

.eyebrow--light { color: var(--cream); }
.eyebrow--light strong, .eyebrow--light em { color: var(--gold); }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Botones ---------- */

.wp-block-button .wp-block-button__link {
    display: inline-block;
    padding: 1.05rem 2.5rem;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--green-deep);
    background: var(--gold);
    border: 0;
    border-radius: 0;
    transition: background 0.4s var(--ease), transform 0.4s var(--ease), color 0.4s var(--ease);
}

.wp-block-button .wp-block-button__link:hover {
    background: var(--gold-pale);
    color: var(--green-deep);
    transform: translateY(-2px);
}

/* Variante "línea" (editorial) — aplicar clase btn-line al bloque botón */
.btn-line .wp-block-button__link {
    padding: 0.9rem 0 0.55rem;
    background: transparent;
    color: var(--green);
    border-bottom: 1px solid currentColor;
    transition: color 0.4s var(--ease), letter-spacing 0.4s var(--ease);
}

.btn-line .wp-block-button__link:hover {
    background: transparent;
    color: var(--gold-deep);
    letter-spacing: 0.36em;
    transform: none;
}

.btn-line--gold .wp-block-button__link { color: var(--gold); }
.btn-line--gold .wp-block-button__link:hover { color: var(--gold-pale); }

/* ==========================================================================
   ANIMACIONES DE ENTRADA (el JS añade .reveal / .is-in automáticamente)
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(2.2rem);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .hero .wp-block-image img { animation: none !important; }
    .team__strip { animation: none !important; }
}

/* El editor de WordPress no ejecuta el JS del tema: mostrar todo */
.editor-styles-wrapper .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   PRELOADER (inyectado por functions.php)
   ========================================================================== */

.preloader {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    transition: transform 0.9s var(--ease);
}

.preloader.is-done { transform: translateY(-100%); }

.preloader__inner { text-align: center; }

.preloader__mark {
    width: clamp(64px, 9vw, 96px);
    margin: 0 auto 1.4rem;
    opacity: 0;
    animation: pt-fade-up 1s var(--ease) 0.1s forwards;
}

.preloader__name {
    font-family: var(--serif);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green);
    opacity: 0;
    animation: pt-fade-up 1s var(--ease) 0.25s forwards;
}

.preloader__name span {
    display: block;
    font-family: var(--sans);
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.5em;
    color: var(--gold-deep);
    margin-top: 0.4rem;
}

.preloader__count {
    margin-top: 2.2rem;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--muted);
    opacity: 0;
    animation: pt-fade-up 1s var(--ease) 0.4s forwards;
}

@keyframes pt-fade-up {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: none; }
}

/* ==========================================================================
   HEADER (parts/header.html)
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.1rem var(--pad);
    transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease), padding 0.5s var(--ease);
}

body.admin-bar .site-header { top: 32px; }

.site-header.is-scrolled {
    background: rgba(246, 241, 231, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--line);
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.site-header__brand {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.8rem;
}

.site-header .wp-block-site-logo img {
    height: 44px;
    width: auto;
    transition: height 0.5s var(--ease), filter 0.5s var(--ease);
}

.site-header.is-scrolled .wp-block-site-logo img { height: 36px; }

.site-header .wp-block-site-title {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.1;
}

.site-header .wp-block-site-title a { color: var(--green); transition: color 0.5s var(--ease); }

.site-header__tag {
    font-size: 0.55rem !important;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-top: 0.28rem !important;
    transition: color 0.5s var(--ease);
}

.site-header__wordmark { display: block; }

/* Navegación */
.site-header .wp-block-navigation .wp-block-navigation-item__content {
    position: relative;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--ink);
    padding: 0.4rem 0;
    transition: color 0.4s var(--ease);
}

.site-header .wp-block-navigation .wp-block-navigation-item__content::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.45s var(--ease);
}

.site-header .wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--green); }
.site-header .wp-block-navigation .wp-block-navigation-item__content:hover::after { transform: scaleX(1); transform-origin: left; }

.site-header .wp-block-navigation__container { gap: 2.4rem; }

.site-header__cta .wp-block-button__link {
    padding: 0.9rem 0 0.55rem;
    background: transparent;
    color: var(--green);
    border-bottom: 1px solid currentColor;
    font-size: 0.66rem;
}

.site-header__cta .wp-block-button__link:hover {
    background: transparent;
    color: var(--gold-deep);
    transform: none;
    letter-spacing: 0.34em;
}

/* Header sobre secciones oscuras (JS añade .on-dark) */
.site-header.on-dark:not(.is-scrolled) .wp-block-site-title a,
.site-header.on-dark:not(.is-scrolled) .wp-block-navigation .wp-block-navigation-item__content,
.site-header.on-dark:not(.is-scrolled) .site-header__cta .wp-block-button__link { color: var(--cream); }
.site-header.on-dark:not(.is-scrolled) .site-header__tag { color: var(--gold); }
.site-header.on-dark:not(.is-scrolled) .wp-block-site-logo img { filter: brightness(0) invert(1) sepia(0.15); }
.site-header.on-dark:not(.is-scrolled) .wp-block-navigation__responsive-container-open { color: var(--cream); }

/* Botón hamburguesa */
.wp-block-navigation__responsive-container-open {
    color: var(--green);
}

/* Overlay móvil de la navegación — restyle a verde profundo */
.wp-block-navigation__responsive-container.has-modal-open {
    background: var(--green-deep) !important;
}

.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation-item__content {
    font-family: var(--serif) !important;
    font-size: clamp(2rem, 6vw, 3.4rem) !important;
    font-weight: 300;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--cream) !important;
    padding: 0.4rem 0 !important;
}

.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation-item__content::after { content: none; }
.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation-item__content:hover { color: var(--gold) !important; }

.wp-block-navigation__responsive-container.has-modal-open .wp-block-navigation__responsive-container-content {
    padding: 6rem var(--pad) 3rem;
}

.wp-block-navigation__responsive-container-close {
    color: var(--cream) !important;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    color: var(--cream);
}

.hero__media {
    position: absolute !important;
    inset: -10% 0;
    z-index: 0;
    margin: 0 !important;
}

.hero__media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    animation: pt-hero-zoom 12s var(--ease) forwards;
}

@keyframes pt-hero-zoom {
    from { transform: scale(1.12); }
    to { transform: scale(1); }
}

/* velo de color sobre la imagen */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(12, 35, 28, 0.55) 0%, rgba(12, 35, 28, 0.25) 40%, rgba(12, 35, 28, 0.78) 100%),
        rgba(22, 63, 50, 0.28);
}

.hero__content {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7rem var(--pad) 3rem;
}

.hero__kicker {
    font-size: 0.72rem !important;
    font-weight: 400;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--gold-pale);
    margin-bottom: 2.2rem !important;
}

.hero__title {
    margin: 0 !important;
    font-family: var(--serif);
    font-size: clamp(3.2rem, 11.5vw, 10.5rem) !important;
    font-weight: 300;
    line-height: 0.98;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cream) !important;
    opacity: 0;
    transform: translateY(2.5rem);
    /* el título es el elemento LCP: fundido corto para no retrasar la métrica */
    transition: opacity 0.7s var(--ease) 0.05s, transform 0.7s var(--ease) 0.05s;
}

.hero__sub {
    margin-top: 1.2rem !important;
    font-size: clamp(0.8rem, 1.6vw, 1.15rem) !important;
    font-weight: 300;
    letter-spacing: 0.6em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity 0.7s var(--ease) 0.2s, transform 0.7s var(--ease) 0.2s;
}

body.is-ready .hero__title,
body.is-ready .hero__sub { opacity: 1; transform: none; }

.hero__tagline {
    margin-top: 2.4rem !important;
    font-family: var(--serif);
    font-size: clamp(1.1rem, 2.2vw, 1.5rem) !important;
    font-weight: 300;
    font-style: italic;
    color: rgba(246, 241, 231, 0.85);
}

.hero__foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: 0 var(--pad) 2.2rem;
}

.hero__foot p, .hero__foot a {
    font-size: 0.66rem !important;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(246, 241, 231, 0.7);
}

.hero__foot a { transition: color 0.4s var(--ease); }
.hero__foot a:hover { color: var(--gold); }

.hero__scroll { text-align: center; }

.hero__scroll::before {
    content: "";
    display: block;
    width: 1px;
    height: 3.4rem;
    margin: 0 auto 0.8rem;
    background: linear-gradient(var(--gold), transparent);
    animation: pt-scroll-pulse 2.2s ease-in-out infinite;
}

@keyframes pt-scroll-pulse {
    0%, 100% { transform: scaleY(0.5); transform-origin: top; opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

.hero__scroll {
    font-size: 0.62rem !important;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gold-pale) !important;
}

/* ==========================================================================
   SECCIONES GENÉRICAS
   ========================================================================== */

.section {
    padding: clamp(6rem, 11vw, 9rem) var(--pad);
}

.section--dark {
    background: var(--green);
    color: var(--cream);
}

.section--deep {
    background: var(--green-deep);
    color: var(--cream);
}

.section--tint {
    background: var(--cream-2);
    border-top: 1px solid var(--line);
}

.section--dark h2, .section--deep h2 { color: var(--cream) !important; }
.section--dark h3, .section--deep h3 { color: var(--cream) !important; }

h2 em, .h-em em { font-style: italic; color: var(--gold-deep); }
.section--dark h2 em, .section--deep h2 em { color: var(--gold); }

/* ==========================================================================
   MANIFIESTO
   ========================================================================== */

.manifesto__statement {
    max-width: 66rem;
    margin: 3rem 0 0 !important;
    font-size: clamp(1.7rem, 3.9vw, 3.3rem) !important;
    line-height: 1.22 !important;
}

.manifesto__row {
    display: grid !important;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(2rem, 6vw, 6rem);
    align-items: end;
    margin-top: clamp(3.5rem, 7vw, 6rem) !important;
}

.manifesto__img { overflow: hidden; }

.manifesto__img img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

.manifesto__img:hover img { transform: scale(1.04); }

.manifesto__aside { max-width: 30rem; }

.manifesto__aside p {
    font-size: 1.02rem !important;
    line-height: 1.85;
    color: var(--muted);
    margin-bottom: 2.2rem !important;
}

/* ==========================================================================
   CIFRAS
   ========================================================================== */

.stats {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 !important;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--cream-2);
}

.stats__item {
    padding: clamp(2.5rem, 5vw, 4.5rem) 1.5rem;
    text-align: center;
    border-left: 1px solid var(--line);
}

.stats__item:first-child { border-left: 0; }

.stats__num {
    font-family: var(--serif);
    font-size: clamp(2.6rem, 5.5vw, 4.6rem) !important;
    font-weight: 300;
    line-height: 1;
    color: var(--green);
}

.stats__label {
    margin-top: 0.9rem !important;
    font-size: 0.66rem !important;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold-deep);
}

/* ==========================================================================
   ÁREAS DE PRÁCTICA (acordeón con bloques "details")
   ========================================================================== */

.areas {
    display: grid !important;
    grid-template-columns: 1fr 1.35fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
}

.areas__intro {
    position: sticky;
    top: 8rem;
}

.areas__intro h2 {
    margin-top: 2.6rem !important;
    font-size: clamp(2.4rem, 5vw, 4.4rem) !important;
}

.areas__desc {
    max-width: 26rem;
    margin: 2rem 0 2.6rem !important;
    font-size: 0.98rem !important;
    line-height: 1.85;
    color: rgba(246, 241, 231, 0.72);
}

.areas__list {
    border-top: 1px solid var(--line-light);
    counter-reset: area;
}

/* — bloque details como fila del acordeón — */
.areas__list .wp-block-details,
.faq__list .wp-block-details {
    margin: 0 !important;
    border-bottom: 1px solid var(--line-light);
    counter-increment: area;
}

.areas__list summary,
.faq__list summary {
    position: relative;
    display: flex;
    align-items: center;
    gap: clamp(1.2rem, 3vw, 2.4rem);
    padding: 1.6rem 3.4rem 1.6rem 0;
    font-family: var(--serif);
    font-size: clamp(1.4rem, 2.8vw, 2.1rem);
    font-weight: 300;
    line-height: 1.15;
    color: var(--cream);
    cursor: pointer;
    list-style: none;
    transition: padding-left 0.45s var(--ease), color 0.4s var(--ease);
}

.areas__list summary::-webkit-details-marker,
.faq__list summary::-webkit-details-marker { display: none; }

.areas__list summary:hover { padding-left: 0.9rem; color: var(--gold); }

/* número de orden */
.areas__list summary::before,
.faq__list summary::before {
    content: "0" counter(area);
    font-family: var(--serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--gold);
    min-width: 2.2rem;
    flex-shrink: 0;
}

/* círculo de apertura */
.areas__list summary::after,
.faq__list summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--line-light);
    border-radius: 50%;
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--gold);
    transition: all 0.45s var(--ease);
}

.areas__list summary:hover::after { border-color: var(--gold); }

.areas__list .wp-block-details[open] summary::after,
.faq__list .wp-block-details[open] summary::after {
    content: "−";
    background: var(--gold);
    border-color: var(--gold);
    color: var(--green-deep);
}

.areas__list .wp-block-details > :not(summary),
.faq__list .wp-block-details > :not(summary) {
    max-width: 34rem;
    margin: 0 0 1.8rem clamp(3.4rem, 6vw, 4.6rem) !important;
    font-size: 0.95rem !important;
    line-height: 1.8;
    color: rgba(246, 241, 231, 0.68);
}

/* ==========================================================================
   NOSOTROS
   ========================================================================== */

.about {
    display: grid !important;
    grid-template-columns: 1fr 1.25fr;
    gap: clamp(3rem, 7vw, 7rem);
    align-items: start;
}

.about__media {
    position: sticky !important;
    top: 7rem;
    overflow: hidden;
}

.about__media img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: top;
}

.about__media figcaption {
    padding: 1rem 0 0;
    font-size: 0.66rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold-deep);
    text-align: left;
    margin: 0;
}

.about__content h2 {
    margin-top: 2.6rem !important;
    font-size: clamp(2.2rem, 4.6vw, 4rem) !important;
}

.about__text {
    max-width: 36rem;
    margin: 2rem 0 3.4rem !important;
    font-size: 1.02rem !important;
    line-height: 1.85;
    color: var(--muted);
}

.about__quote {
    margin: 0 0 3rem !important;
    padding: 0.4rem 0 0.4rem 1.8rem;
    border: 0;
    border-left: 2px solid var(--gold);
}

.about__quote p {
    font-family: var(--serif) !important;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem) !important;
    font-style: italic;
    font-weight: 300;
    line-height: 1.4;
    color: var(--green);
    margin-bottom: 0.7rem !important;
}

.about__quote cite {
    display: block;
    font-family: var(--sans);
    font-size: 0.66rem;
    font-style: normal;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--gold-ink);
}

.about__values {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0 !important;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    margin-bottom: 3rem !important;
    counter-reset: value;
}

.value {
    padding: 1.8rem 1.6rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    counter-increment: value;
}

.value::before {
    content: counter(value, upper-roman);
    display: block;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--gold-deep);
    margin-bottom: 0.8rem;
}

.value h3 {
    font-size: 1.35rem !important;
    margin-bottom: 0.5rem !important;
}

.value p { font-size: 0.88rem !important; line-height: 1.7; color: var(--muted); }

/* ==========================================================================
   EQUIPO
   ========================================================================== */

.team { padding-left: 0 !important; padding-right: 0 !important; overflow: hidden; }

.team__head {
    display: flex !important;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: 0 var(--pad);
    margin-bottom: clamp(2.5rem, 5vw, 4rem) !important;
}

.team__head h2 {
    margin-top: 2.4rem !important;
    font-size: clamp(2.4rem, 5vw, 4.4rem) !important;
}

.team__hint {
    font-size: 0.66rem !important;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    padding-bottom: 0.6rem;
}

.team__track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    padding: 0 var(--pad) 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
    counter-reset: member;
}

.team__track::-webkit-scrollbar { height: 3px; }
.team__track::-webkit-scrollbar-thumb { background: var(--gold); }

.member {
    flex: 0 0 clamp(240px, 26vw, 330px) !important;
    scroll-snap-align: start;
    counter-increment: member;
}

.member .wp-block-image {
    overflow: hidden;
    background: var(--green-deep);
}

.member .wp-block-image img {
    width: 100%;
    aspect-ratio: 3 / 3.8;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(1) sepia(0.22) contrast(1.02) brightness(0.92);
    transition: filter 0.8s var(--ease), transform 1s var(--ease);
}

.member:hover .wp-block-image img {
    filter: none;
    transform: scale(1.045);
}

.member h3 {
    position: relative;
    font-size: 1.55rem !important;
    margin: 2.6rem 0 0 !important;
}

.member h3::before {
    content: "0" counter(member);
    position: absolute;
    top: -1.6rem;
    left: 0;
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--gold-deep);
}

.member__role {
    margin: 0.35rem 0 0.7rem !important;
    font-size: 0.64rem !important;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold-deep);
}

.member p:not(.member__role) { font-size: 0.88rem !important; line-height: 1.65; color: var(--muted); }

/* Banda marquee del equipo completo */
.team__marquee {
    margin-top: clamp(3rem, 6vw, 5rem) !important;
    border-top: 1px solid var(--line);
    padding-top: clamp(3rem, 6vw, 5rem);
    overflow: hidden;
}

.team__strip {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1.2rem;
    width: max-content;
    animation: pt-marquee 48s linear infinite;
}

.team__strip:hover { animation-play-state: paused; }

.team__strip .wp-block-image { flex-shrink: 0; }

.team__strip img {
    height: clamp(160px, 22vw, 260px);
    width: auto !important;
    object-fit: cover;
    filter: grayscale(1) sepia(0.25) brightness(0.94);
    transition: filter 0.6s var(--ease);
}

.team__strip img:hover { filter: none; }

@keyframes pt-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.team__caption {
    padding: 1.4rem var(--pad) 0;
    font-size: 0.62rem !important;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}

/* ==========================================================================
   CLIENTES — carrusel de logos / sectores
   ========================================================================== */

.clients {
    padding: clamp(3rem, 6vw, 5rem) 0;
    border-top: 1px solid var(--line);
    background: var(--cream);
    overflow: hidden;
}

.clients__strip {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: clamp(3rem, 7vw, 6.5rem);
    width: max-content;
    animation: pt-marquee 38s linear infinite;
}

.clients__strip:hover { animation-play-state: paused; }

/* elemento de texto (sector o nombre del cliente) */
.clients__item {
    font-family: var(--serif) !important;
    font-size: clamp(1.3rem, 2.6vw, 2rem) !important;
    font-weight: 300;
    font-style: italic;
    white-space: nowrap;
    color: var(--green);
    opacity: 0.75;
    transition: opacity 0.4s var(--ease), color 0.4s var(--ease);
}

.clients__item:hover { opacity: 1; color: var(--gold-deep); }

/* separador entre elementos */
.clients__item::after {
    content: "·";
    margin-left: clamp(3rem, 7vw, 6.5rem);
    color: var(--gold);
    font-style: normal;
    opacity: 0.6;
}

/* logos reales: al reemplazar el texto por un bloque Imagen */
.clients__strip .wp-block-image { flex-shrink: 0; }

.clients__strip img {
    height: clamp(38px, 5vw, 56px);
    width: auto !important;
    object-fit: contain;
    filter: grayscale(1) sepia(0.3) brightness(0.85) opacity(0.75);
    transition: filter 0.5s var(--ease);
}

.clients__strip img:hover { filter: none; }

.clients__caption {
    padding: 1.6rem var(--pad) 0;
    font-size: 0.62rem !important;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}

/* ==========================================================================
   CÓDIGO ÉTICO
   ========================================================================== */

.ethics__head { max-width: 52rem; margin-bottom: clamp(3rem, 6vw, 5rem) !important; }

.ethics__head h2 {
    margin-top: 2.4rem !important;
    font-size: clamp(2.2rem, 4.6vw, 4rem) !important;
}

.ethics__list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 !important;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    counter-reset: ethic;
}

.ethic {
    padding: clamp(1.8rem, 3.5vw, 2.8rem);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background 0.5s var(--ease);
    counter-increment: ethic;
}

.ethic:hover { background: rgba(198, 154, 109, 0.08); }

.ethic::before {
    content: "0" counter(ethic);
    display: block;
    font-family: var(--serif);
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    font-weight: 300;
    line-height: 1;
    color: var(--gold);
    margin-bottom: 1.6rem;
}

.ethic h3 {
    font-size: 1.4rem !important;
    margin-bottom: 0.5rem !important;
}

.ethic p { font-size: 0.88rem !important; line-height: 1.7; color: var(--muted); }

/* ==========================================================================
   FAQ (acordeón claro)
   ========================================================================== */

.faq__head { max-width: 52rem; margin-bottom: clamp(2.5rem, 5vw, 4rem) !important; }

.faq__head h2 {
    margin-top: 2.4rem !important;
    font-size: clamp(2.2rem, 4.6vw, 4rem) !important;
}

.faq__list {
    border-top: 1px solid var(--line);
    max-width: 62rem;
    counter-reset: area;
}

.faq__list .wp-block-details { border-bottom: 1px solid var(--line); }

.faq__list summary {
    color: var(--green);
    font-size: clamp(1.2rem, 2.2vw, 1.7rem);
}

.faq__list summary:hover { padding-left: 0.9rem; color: var(--gold-deep); }
.faq__list summary::before { color: var(--gold-deep); }
.faq__list summary::after { border-color: var(--line); color: var(--gold-deep); }
.faq__list summary:hover::after { border-color: var(--gold-deep); }
.faq__list .wp-block-details > :not(summary) { color: var(--muted); }

/* ==========================================================================
   CONTACTO
   ========================================================================== */

.contact { padding-bottom: 0 !important; }

.contact__head { max-width: 56rem; }

.contact__head h2 {
    margin-top: 2.6rem !important;
    font-size: clamp(3rem, 8vw, 7rem) !important;
    line-height: 1 !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.contact__head h2 em { text-transform: none; }

.contact__sub {
    margin: 2rem 0 0 !important;
    max-width: 30rem;
    font-size: 0.98rem !important;
    line-height: 1.85;
    color: rgba(246, 241, 231, 0.7);
}

.contact__grid {
    display: grid !important;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(3rem, 7vw, 7rem);
    margin-top: clamp(3.5rem, 7vw, 6rem) !important;
    padding-bottom: clamp(4rem, 8vw, 7rem);
}

/* formulario (bloque HTML personalizado) */
.cform__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.cform__field { margin-bottom: 2.2rem; }

.cform__field label {
    display: block;
    font-size: 0.62rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.6rem;
}

.cform__field input,
.cform__field textarea {
    width: 100%;
    padding: 0.7rem 0;
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--cream);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-light);
    border-radius: 0;
    outline: none;
    transition: border-color 0.4s var(--ease);
    resize: vertical;
    box-sizing: border-box;
}

.cform__field input::placeholder,
.cform__field textarea::placeholder { color: rgba(246, 241, 231, 0.35); font-style: italic; }

.cform__field input:focus,
.cform__field textarea:focus { border-color: var(--gold); }

.cform button {
    display: inline-block;
    padding: 1.1rem 2.6rem;
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--green-deep);
    background: var(--gold);
    border: 0;
    cursor: pointer;
    transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}

.cform button:hover { background: var(--gold-pale); transform: translateY(-2px); }

.cform__success {
    display: none;
    margin-top: 1.6rem;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--gold-pale);
}

.cform__success.is-visible { display: block; }

/* info de contacto */
.contact__info { display: flex !important; flex-direction: column; gap: 1.9rem; }

.contact__info p { font-size: 0.95rem !important; line-height: 1.8; color: rgba(246, 241, 231, 0.78); }
.contact__info a:hover { color: var(--gold); }

.cinfo__label {
    font-size: 0.62rem !important;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold) !important;
    margin-bottom: 0.45rem !important;
}

/* mapa */
.contact__map { margin: 0 calc(var(--pad) * -1) !important; }

.contact__map iframe {
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
    filter: grayscale(1) sepia(0.14) brightness(0.96);
}

/* ==========================================================================
   FOOTER (parts/footer.html)
   ========================================================================== */

.site-footer {
    position: relative;
    background: var(--green-deep);
    color: rgba(246, 241, 231, 0.75);
    padding: clamp(4rem, 8vw, 6rem) var(--pad) 2rem;
    border-top: 1px solid var(--line-light);
    overflow: hidden;
}

.footer__giant {
    font-family: var(--serif);
    font-size: clamp(4rem, 14vw, 13rem) !important;
    font-weight: 300;
    line-height: 0.9;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.03em;
    color: transparent !important;
    -webkit-text-stroke: 1px rgba(198, 154, 109, 0.28);
    user-select: none;
    margin-bottom: clamp(3rem, 6vw, 5rem) !important;
}

.footer__grid {
    display: grid !important;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid var(--line-light);
}

.footer__col { display: flex !important; flex-direction: column; gap: 0.7rem; align-items: flex-start; }

.footer__col p { font-size: 0.9rem !important; line-height: 1.8; }

.footer__heading {
    font-size: 0.62rem !important;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold) !important;
    margin-bottom: 0.7rem !important;
}

.footer__col a {
    font-size: 0.9rem;
    color: rgba(246, 241, 231, 0.75);
    transition: color 0.35s var(--ease), padding-left 0.35s var(--ease);
}

.footer__col a:hover { color: var(--gold); padding-left: 0.4rem; }

.footer__bottom {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.8rem;
}

.footer__bottom p {
    font-size: 0.72rem !important;
    letter-spacing: 0.06em;
    /* 0.45 daba 4.0:1 sobre el verde profundo; 0.52 pasa AA sin cambiar el tono */
    color: rgba(246, 241, 231, 0.52);
}

/* ==========================================================================
   WHATSAPP FAB (inyectado por functions.php)
   ========================================================================== */

.wa-fab {
    position: fixed;
    right: 1.6rem;
    bottom: 1.6rem;
    z-index: 80;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--green);
    color: var(--gold-pale);
    border: 1px solid rgba(198, 154, 109, 0.4);
    box-shadow: 0 8px 30px rgba(12, 35, 28, 0.35);
    transition: transform 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
}

.wa-fab svg { width: 24px; height: 24px; fill: currentColor; }

.wa-fab:hover {
    transform: translateY(-4px);
    background: var(--gold);
    color: var(--green-deep);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1080px) {
    .areas { grid-template-columns: 1fr !important; }
    .areas__intro { position: static; }
    .about { grid-template-columns: 1fr !important; }
    .about__media { position: static !important; max-width: 30rem; }
    .footer__grid { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 860px) {
    .site-header__cta { display: none !important; }

    .manifesto__row { grid-template-columns: 1fr !important; align-items: start; }
    .manifesto__aside { max-width: none; }

    .stats { grid-template-columns: 1fr 1fr !important; }
    .stats__item:nth-child(3) { border-left: 0; }
    .stats__item:nth-child(1), .stats__item:nth-child(2) { border-bottom: 1px solid var(--line); }

    .about__values { grid-template-columns: 1fr !important; }
    .ethics__list { grid-template-columns: 1fr !important; }
    .contact__grid { grid-template-columns: 1fr !important; }

    .team__head { flex-direction: column !important; align-items: flex-start !important; }

    .footer__grid { grid-template-columns: 1fr !important; gap: 2.2rem; }
    .footer__bottom { flex-direction: column; }
}

@media (max-width: 520px) {
    .cform__row { grid-template-columns: 1fr; gap: 0; }
    .hero__foot { flex-direction: column; align-items: center; gap: 1.4rem; }
    .hero__foot > p:first-child { display: none; }
    .member { flex-basis: 78vw !important; }
}

/* ==========================================================================
   EDITOR (Apariencia → Editor): vista fiel para el cliente
   ========================================================================== */

.editor-styles-wrapper .hero__title,
.editor-styles-wrapper .hero__sub { opacity: 1; transform: none; }
.editor-styles-wrapper .team__strip { animation: none; }
