/* ==================================================================
   ESTUDIO AUDIOVISUAL — style.css
   ------------------------------------------------------------------
   Sistema de diseño "cine/timecode": fondo casi negro, acento rojo
   tally (luz de grabación) y acento dorado (iluminación de set),
   tipografía condensada de póster para titulares y monoespaciada
   para elementos de timecode/UI. Ver README.md para instrucciones
   de personalización.

   Índice:
   1. Variables (tokens)
   2. Reset y base
   3. Utilidades / layout
   4. Header y navegación
   5. Hero / slider
   6. Botones
   7. Servicios
   8. Clientes
   9. Nosotros
   10. CTA
   11. Formulario de contacto
   12. Footer
   13. WhatsApp flotante / volver arriba
   14. Animaciones (reveal)
   15. Accesibilidad y utilidades finales
   16. Responsive
   ================================================================== */

/* ---------------------------------------------------------------
   1. VARIABLES
--------------------------------------------------------------- */
:root {
    /* Color */
    --bg: #0b0b0d;
    --bg-elev: #151519;
    --bg-elev-2: #1c1c21;
    --text: #f5f3ee;
    --text-muted: #a7a6a1;
    --text-faint: #6f6e6a;
    --accent: #e63946;       /* rojo tally / REC */
    --accent-dark: #b8202c;
    --accent-2: #d4a857;     /* dorado, luz de set */
    --line: rgba(245, 243, 238, 0.12);
    --line-strong: rgba(245, 243, 238, 0.22);
    --overlay: rgba(11, 11, 13, 0.72);

    /* Tipografía */
    --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

    /* Layout */
    --container-w: 1240px;
    --radius-s: 6px;
    --radius-m: 12px;
    --radius-l: 22px;
    --header-h: 84px;

    /* Movimiento */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-s: 200ms;
    --dur-m: 420ms;
    --dur-l: 700ms;
}

/* ---------------------------------------------------------------
   2. RESET Y BASE
--------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

input,
textarea,
select {
    font: inherit;
    color: inherit;
}

svg {
    display: block;
}

/* Foco visible consistente en toda la página */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
    border-radius: var(--radius-s);
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -60px;
    background: var(--accent);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-s);
    z-index: 999;
    transition: top var(--dur-s) var(--ease);
    font-weight: 600;
}

.skip-link:focus {
    top: 1rem;
}

/* ---------------------------------------------------------------
   3. UTILIDADES / LAYOUT
--------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-w);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
    padding-block: clamp(4rem, 8vw, 7rem);
}

.section--alt {
    background: var(--bg-elev);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head {
    max-width: 640px;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 0.9rem;
    display: inline-block;
}

.eyebrow--dark {
    color: var(--accent);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.01em;
    font-size: clamp(2.1rem, 4.2vw, 3.4rem);
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--text);
}

.section-lede {
    margin-top: 1.1rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 52ch;
}

/* ---------------------------------------------------------------
   4. HEADER Y NAVEGACIÓN
--------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 11, 13, 0.4);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: background var(--dur-m) var(--ease), border-color var(--dur-m) var(--ease), box-shadow var(--dur-m) var(--ease);
}

.site-header.is-scrolled {
    background: rgba(11, 11, 13, 0.92);
    border-bottom-color: var(--line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--line-strong);
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
}

.brand-mark-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.18);
}

.brand-name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 2.75rem);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: clamp(1.1rem, 2vw, 2rem);
}

.nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    padding-block: 0.4rem;
    transition: color var(--dur-s) var(--ease);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--dur-m) var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--text);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
    width: 100%;
}

.nav-cta {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-s);
    padding: 0;
}

.menu-toggle-bar {
    width: 20px;
    height: 2px;
    background: var(--text);
    margin-inline: auto;
    transition: transform var(--dur-m) var(--ease), opacity var(--dur-s) var(--ease);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.header-timecode {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.35rem clamp(1.25rem, 4vw, 2.5rem);
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-faint);
    letter-spacing: 0.08em;
}

.tc-rec {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
}

.tc-rec-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-rec 1.6s ease-in-out infinite;
}

@keyframes pulse-rec {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-m) var(--ease);
    z-index: 90;
}

.mobile-nav-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ---------------------------------------------------------------
   5. HERO / SLIDER
--------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: stretch;
    background: #000;
}

.hero-cinebar {
    position: absolute;
    left: 0;
    right: 0;
    height: clamp(18px, 4vw, 46px);
    background: #000;
    z-index: 6;
}

.hero-cinebar--top {
    top: 0;
}

.hero-cinebar--bottom {
    bottom: 0;
}

.hero-slider {
    position: relative;
    width: 100%;
}

.hero-slides {
    position: relative;
    height: 92vh;
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-l) var(--ease);
    display: flex;
    align-items: center;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-slide-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    /*
     * PLACEHOLDER VISUAL: reemplaza estos degradados por imágenes o
     * videos reales de producción. Ejemplo:
     * background-image: url('../img/hero/slide-1.jpg');
     */
}

.hero-media--1 {
    background-image:
        linear-gradient(160deg, rgba(11,11,13,0.35), rgba(11,11,13,0.85)),
        repeating-linear-gradient(115deg, #1c1c21 0px, #1c1c21 2px, #101012 2px, #101012 42px);
}

.hero-media--2 {
    background-image:
        linear-gradient(160deg, rgba(11,11,13,0.3), rgba(11,11,13,0.85)),
        radial-gradient(circle at 25% 30%, rgba(212,168,87,0.18), transparent 55%),
        repeating-linear-gradient(70deg, #191a1e 0px, #191a1e 2px, #101012 2px, #101012 42px);
}

.hero-media--3 {
    background-image:
        linear-gradient(160deg, rgba(11,11,13,0.3), rgba(11,11,13,0.85)),
        radial-gradient(circle at 75% 70%, rgba(230,57,70,0.16), transparent 55%),
        repeating-linear-gradient(20deg, #17181c 0px, #17181c 2px, #101012 2px, #101012 42px);
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(11,11,13,0.9) 0%, rgba(11,11,13,0.35) 55%, rgba(11,11,13,0.55) 100%);
}

.hero-slide-content {
    position: relative;
    z-index: 3;
    max-width: 780px;
}

.hero-title {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-weight: 400;
    font-size: clamp(2.6rem, 6.5vw, 5rem);
    line-height: 0.98;
    letter-spacing: 0.01em;
    color: var(--text);
    margin-bottom: 1.1rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--text-muted);
    max-width: 52ch;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: rgba(11, 11, 13, 0.4);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    color: var(--text);
    transition: background var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease), transform var(--dur-s) var(--ease);
}

.hero-arrow:hover,
.hero-arrow:focus-visible {
    background: var(--accent);
    border-color: var(--accent);
}

.hero-arrow--prev {
    left: clamp(0.75rem, 3vw, 2.5rem);
}

.hero-arrow--next {
    right: clamp(0.75rem, 3vw, 2.5rem);
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: clamp(2.5rem, 6vw, 3.75rem);
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
}

.hero-dot {
    width: 28px;
    height: 3px;
    background: rgba(245, 243, 238, 0.3);
    transition: background var(--dur-s) var(--ease);
}

.hero-dot.is-active {
    background: var(--accent);
}

.hero-pause {
    position: absolute;
    z-index: 5;
    right: clamp(0.75rem, 3vw, 2.5rem);
    bottom: clamp(2.5rem, 6vw, 3.75rem);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    display: grid;
    place-items: center;
    color: var(--text-muted);
    background: rgba(11, 11, 13, 0.4);
}

.hero-pause:hover {
    color: var(--text);
}

.scroll-cue {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: clamp(0.9rem, 2vw, 1.2rem);
    transform: translateX(-50%);
    width: 22px;
    height: 34px;
    border: 1.5px solid var(--line-strong);
    border-radius: 12px;
}

.scroll-cue span {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent-2);
    animation: scroll-cue-move 1.8s ease-in-out infinite;
}

@keyframes scroll-cue-move {
    0% { opacity: 1; transform: translate(-50%, 0); }
    70% { opacity: 0; transform: translate(-50%, 10px); }
    100% { opacity: 0; transform: translate(-50%, 0); }
}

/* ---------------------------------------------------------------
   6. BOTONES
--------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius-s);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    transition: transform var(--dur-s) var(--ease), background var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease), color var(--dur-s) var(--ease);
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-accent:hover,
.btn-accent:focus-visible {
    background: var(--accent-dark);
}

.btn-outline {
    border-color: var(--line-strong);
    color: var(--text);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    border-color: var(--text);
    background: rgba(245, 243, 238, 0.06);
}

.btn-lg {
    padding: 1.05rem 2.1rem;
    font-size: 1rem;
}

/* ---------------------------------------------------------------
   7. SERVICIOS
--------------------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    position: relative;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 2.1rem 1.75rem 1.9rem;
    transition: transform var(--dur-m) var(--ease), border-color var(--dur-m) var(--ease), background var(--dur-m) var(--ease);
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    background: var(--bg-elev-2);
}

.service-tc {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-faint);
    letter-spacing: 0.06em;
    margin-bottom: 1.1rem;
}

.service-icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(230, 57, 70, 0.12);
    color: var(--accent);
    margin-bottom: 1.25rem;
    transition: background var(--dur-m) var(--ease), color var(--dur-m) var(--ease);
}

.service-card:hover .service-icon {
    background: var(--accent);
    color: #fff;
}

.service-icon--add {
    background: rgba(212, 168, 87, 0.12);
    color: var(--accent-2);
}

.service-name {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-bottom: 0.6rem;
}

.service-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.4rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent-2);
    transition: gap var(--dur-s) var(--ease);
}

.service-link:hover {
    gap: 0.6rem;
}

.service-card--add {
    border-style: dashed;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-card--add:hover {
    transform: none;
    background: rgba(245, 243, 238, 0.03);
}

/* ---------------------------------------------------------------
   8. CLIENTES
--------------------------------------------------------------- */
.clients-track-wrap {
    overflow: hidden;
    margin-top: 1rem;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.clients-track {
    display: flex;
    gap: clamp(2rem, 5vw, 4rem);
    width: max-content;
    animation: clients-scroll 28s linear infinite;
    padding-block: 0.5rem;
}

.clients-track-wrap:hover .clients-track,
.clients-track-wrap:focus-within .clients-track {
    animation-play-state: paused;
}

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

.client-logo {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    height: 78px;
    padding-inline: 1.75rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-s);
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    /* PLACEHOLDER: reemplazar por <img src="assets/img/clientes/logo-x.svg" alt="Nombre del cliente"> */
}

/* ---------------------------------------------------------------
   9. NOSOTROS
--------------------------------------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: center;
}

.about-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-l);
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(212,168,87,0.16), transparent 55%),
        radial-gradient(circle at 75% 80%, rgba(230,57,70,0.14), transparent 55%),
        repeating-linear-gradient(135deg, #191a1e 0px, #191a1e 2px, #101012 2px, #101012 46px);
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    /* PLACEHOLDER: reemplazar por <img> real de producción/equipo */
}

.about-frame .hero-cinebar {
    height: clamp(14px, 3vw, 26px);
}

.about-frame-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    border: 1px solid var(--line-strong);
    padding: 0.5rem 1rem;
    border-radius: 999px;
}

.about-text {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 1.1rem 0 2.25rem;
    max-width: 58ch;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 2rem;
}

.about-feature {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.about-feature-icon {
    flex: none;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(212, 168, 87, 0.14);
    color: var(--accent-2);
}

.about-feature h3 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-weight: 400;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.about-feature p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ---------------------------------------------------------------
   10. CTA
--------------------------------------------------------------- */
.cta-section {
    position: relative;
    background: linear-gradient(120deg, #17080a, #0b0b0d 60%);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-block: clamp(4rem, 8vw, 6rem);
    text-align: center;
    overflow: hidden;
}

.cta-cinebar {
    height: clamp(10px, 2vw, 20px);
}

.cta-inner {
    max-width: 640px;
}

.cta-title {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-weight: 400;
    font-size: clamp(2rem, 4.5vw, 3.1rem);
    margin-bottom: 0.9rem;
}

.cta-text {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

/* ---------------------------------------------------------------
   11. FORMULARIO DE CONTACTO
--------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.3fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
}

.contact-info-list {
    margin-top: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-info-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.contact-info-list svg {
    color: var(--accent-2);
    flex: none;
}

.contact-form-wrap {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    padding: clamp(1.75rem, 4vw, 2.75rem);
}

.form-row {
    margin-bottom: 1.35rem;
}

.form-row--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-row label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-row label span {
    color: var(--accent);
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-s);
    padding: 0.85rem 1rem;
    color: var(--text);
    transition: border-color var(--dur-s) var(--ease), box-shadow var(--dur-s) var(--ease);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: var(--text-faint);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(212, 168, 87, 0.16);
    outline: none;
}

.form-row textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row.has-error input,
.form-row.has-error select,
.form-row.has-error textarea {
    border-color: var(--accent);
}

.form-error {
    display: block;
    min-height: 1.1em;
    font-size: 0.8rem;
    color: var(--accent);
    margin-top: 0.4rem;
}

.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-submit {
    width: 100%;
    position: relative;
    margin-top: 0.5rem;
}

.form-submit[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-feedback {
    margin-top: 1.1rem;
    font-size: 0.9rem;
    padding: 0;
    border-radius: var(--radius-s);
    min-height: 0;
    transition: padding var(--dur-s) var(--ease);
}

.form-feedback:not(:empty) {
    padding: 0.9rem 1rem;
}

.form-feedback.is-success {
    background: rgba(93, 168, 108, 0.14);
    color: #8fd6a0;
    border: 1px solid rgba(93, 168, 108, 0.35);
}

.form-feedback.is-error {
    background: rgba(230, 57, 70, 0.14);
    color: #ff9aa2;
    border: 1px solid rgba(230, 57, 70, 0.35);
}

/* ---------------------------------------------------------------
   12. FOOTER
--------------------------------------------------------------- */
.site-footer {
    background: var(--bg-elev);
    border-top: 1px solid var(--line);
    padding-top: clamp(3rem, 6vw, 4.5rem);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 3rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 1rem 0 1.5rem;
    max-width: 34ch;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--text-muted);
    transition: color var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease), background var(--dur-s) var(--ease);
}

.social-link:hover,
.social-link:focus-visible {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.footer-heading {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 1.1rem;
}

.footer-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-list a {
    color: var(--text-muted);
    font-size: 0.92rem;
    transition: color var(--dur-s) var(--ease);
}

.footer-list a:hover,
.footer-list a:focus-visible {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding-block: 1.5rem;
}

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-faint);
}

/* ---------------------------------------------------------------
   13. WHATSAPP FLOTANTE / VOLVER ARRIBA
--------------------------------------------------------------- */
.whatsapp-float {
    position: fixed;
    right: clamp(1rem, 3vw, 1.75rem);
    bottom: clamp(1rem, 3vw, 1.75rem);
    z-index: 80;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #0b0b0d;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.35);
    animation: whatsapp-pulse 2.6s ease-in-out infinite;
    transition: transform var(--dur-s) var(--ease);
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
    transform: scale(1.08);
}

@keyframes whatsapp-pulse {
    0%, 100% { box-shadow: 0 10px 26px rgba(37, 211, 102, 0.35); }
    50% { box-shadow: 0 10px 26px rgba(37, 211, 102, 0.6), 0 0 0 8px rgba(37, 211, 102, 0.08); }
}

.whatsapp-tooltip {
    position: absolute;
    right: calc(100% + 0.9rem);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: var(--bg-elev-2);
    border: 1px solid var(--line-strong);
    color: var(--text);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-s);
    font-size: 0.82rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-s) var(--ease), transform var(--dur-s) var(--ease);
}

.whatsapp-float:hover .whatsapp-tooltip,
.whatsapp-float:focus-visible .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.back-to-top {
    position: fixed;
    right: clamp(1rem, 3vw, 1.75rem);
    bottom: clamp(5.5rem, 12vw, 6.5rem);
    z-index: 80;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-elev-2);
    border: 1px solid var(--line-strong);
    color: var(--text);
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity var(--dur-m) var(--ease), transform var(--dur-m) var(--ease), background var(--dur-s) var(--ease);
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--accent);
}

/* ---------------------------------------------------------------
   14. ANIMACIONES (reveal on scroll)
--------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--dur-l) var(--ease), transform var(--dur-l) var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------------------------------------------------------------
   16. RESPONSIVE
--------------------------------------------------------------- */
@media (max-width: 1080px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-frame {
        max-width: 420px;
        margin-inline: auto;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 860px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(340px, 84vw);
        background: var(--bg-elev);
        border-left: 1px solid var(--line);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: calc(var(--header-h) + 1.5rem) 1.75rem 2rem;
        gap: 2.5rem;
        transform: translateX(100%);
        transition: transform var(--dur-m) var(--ease);
        z-index: 95;
        overflow-y: auto;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        width: 100%;
    }

    .nav-link {
        font-size: 1.1rem;
    }

    .nav-cta {
        width: 100%;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
    }

    .header-timecode {
        display: none;
    }
}

@media (max-width: 700px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .form-row--split {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-arrow {
        width: 38px;
        height: 38px;
    }

    .hero-title {
        font-size: clamp(2.2rem, 9vw, 3rem);
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        width: 52px;
        height: 52px;
    }

    .whatsapp-tooltip {
        display: none;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
    }
}
