/* Propuesta 2: estilo cálido tipo estudio (carbón, dorado y trazos de brocha) */
:root {
    --bg: #1b1815;
    --bg-2: #221f1b;
    --surface: #2b2723;
    --surface-2: #342f2a;
    --line: rgba(244, 232, 214, 0.09);
    --text: #f5efe6;
    --muted: #b5aa9b;
    --accent: #d4a64a;
    --accent-light: #f3d38a;
    --accent-dark: #9a6a22;
    --gold-grad: linear-gradient(135deg, #f3d38a 0%, #d4a64a 45%, #9a6a22 100%);
    --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 80' preserveAspectRatio='none'%3E%3Cpath fill='%23a8792b' d='M8 18 Q60 8 140 12 T300 10 T492 16 L486 28 L498 38 L484 50 L494 62 Q420 72 320 68 T150 72 T6 66 L16 54 L2 44 L14 34 L4 24 Z'/%3E%3Cpath fill='%23d4a64a' opacity='.45' d='M30 22 Q200 12 470 20 L466 30 Q250 22 34 32 Z M40 52 Q240 46 460 54 L456 60 Q240 54 44 60 Z'/%3E%3C/svg%3E");
    --head: 'Saira Semi Condensed', sans-serif;
    --max: 1180px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    font-family: var(--head);
    font-weight: 600;
    line-height: 1.12;
}

/* Párrafos justificados */
.text {
    color: var(--muted);
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Trazo de brocha detrás de una palabra; se "pinta" al aparecer */
.brush {
    padding: 0 0.22em;
    margin: 0 -0.05em;
    background-image: var(--brush);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 92%;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    transition: background-size 1.1s var(--ease) 0.25s;
}

.visible .brush,
.brush.visible,
.painted .brush {
    background-size: 100% 92%;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 1rem;
}

.tag::before {
    content: '';
    width: 22px;
    height: 1px;
    background: var(--accent);
}

/* Botones */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0.85rem 1.6rem;
    border-radius: 3px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: 1px solid transparent;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.4s var(--ease), color 0.35s ease, border-color 0.35s ease, box-shadow 0.4s ease;
}

.btn i {
    transition: transform 0.4s var(--ease);
}

.btn:hover i {
    transform: translateX(3px);
}

.btn-fill {
    background: var(--gold-grad);
    color: #1b1815;
}

/* Relleno claro que sube desde abajo */
.btn-fill::before,
.btn-ghost::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.45s var(--ease);
}

.btn-fill::before {
    background: var(--accent-light);
}

.btn-ghost {
    border-color: rgba(244, 232, 214, 0.35);
    color: var(--text);
    background: transparent;
}

.btn-ghost::before {
    background: var(--accent);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-fill:hover {
    box-shadow: 0 10px 26px -10px rgba(212, 166, 74, 0.7);
}

.btn-ghost:hover {
    color: #1b1815;
    border-color: var(--accent);
}

.btn:hover::before {
    transform: scaleY(1);
}

.link-line {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-light);
    padding-bottom: 3px;
}

.link-line::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.link-line:hover::after {
    transform: scaleX(0.4);
}

/* Encabezado */
header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    transition: background 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}

header.scrolled,
header.menu-open {
    background: rgba(27, 24, 21, 0.97);
    border-color: var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: var(--head);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 1.5px;
}

.brand img {
    height: 30px;
    width: auto;
    transition: transform 0.6s var(--ease);
}

.brand:hover img {
    transform: rotate(-8deg) scale(1.08);
}

.brand b {
    color: var(--accent);
    font-weight: 600;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav ul a {
    position: relative;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--muted);
    padding: 4px 0;
    transition: color 0.3s ease;
}

.nav ul a::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    transform: translateX(-50%) scale(0);
    transition: transform 0.35s var(--ease);
}

.nav ul a:hover,
.nav ul a.active {
    color: var(--text);
}

.nav ul a.active::before {
    transform: translateX(-50%) scale(1);
}

.nav-contact {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.admin-link {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--accent);
    padding: 4px 0;
    transition: color 0.3s ease;
}

.admin-link:hover {
    color: var(--text);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 26px;
    height: 16px;
    position: relative;
    cursor: pointer;
}

.menu-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.4s var(--ease), opacity 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 7px; }
.menu-toggle span:nth-child(3) { top: 14px; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Portada con video de fondo y reproductor */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 100px 0 28px;
}

.hero-media {
    position: absolute;
    inset: 0;
    background: #000 url('https://images.unsplash.com/photo-1768365423806-84b18702cb4e?auto=format&fit=crop&w=1600&q=70') center / cover;
}

.hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.6s ease;
}

.hero-media video.switching {
    opacity: 0;
}

.hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(27, 24, 21, 0.92) 0%, rgba(27, 24, 21, 0.65) 45%, rgba(27, 24, 21, 0.25) 100%),
        linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-copy {
    max-width: 760px;
}

.hero h1 {
    font-size: clamp(2.4rem, 5.4vw, 3.9rem);
    font-weight: 700;
    margin-bottom: 1.3rem;
}

.hero h1 .line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: rise 1s var(--ease) forwards;
}

.hero h1 .line:nth-child(2) {
    animation-delay: 0.15s;
}

.hero .text {
    max-width: 470px;
    color: #d6cdbf;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: rise 1s var(--ease) 0.35s forwards;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    opacity: 0;
    animation: rise 1s var(--ease) 0.5s forwards;
}

@keyframes rise {
    to { opacity: 1; transform: none; }
}

/* Reproductor del reel destacado */
.player {
    margin-top: clamp(1.6rem, 5vh, 3.2rem);
    max-width: 620px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px 18px;
    padding: 12px 18px 12px 12px;
    background: rgba(70, 62, 54, 0.42);
    border: 1px solid rgba(244, 232, 214, 0.16);
    border-radius: 6px;
    opacity: 0;
    animation: rise 1s var(--ease) 0.7s forwards;
}

.player-label {
    grid-column: 1 / -1;
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 1px;
    margin-bottom: -6px;
}

.player-thumb {
    width: 54px;
    height: 54px;
    border-radius: 4px;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.player-info h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.player-info small {
    font-size: 0.72rem;
    color: var(--muted);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.p-btn {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease);
}

.p-btn:hover {
    color: var(--accent-light);
}

.p-btn.main {
    width: 40px;
    height: 40px;
    background: var(--gold-grad);
    color: #1b1815;
    font-size: 0.85rem;
}

.p-btn.main:hover {
    background: var(--accent-light);
    color: #1b1815;
    transform: scale(1.08);
}

.player-track {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.player-bar {
    position: relative;
    flex: 1;
    height: 3px;
    background: rgba(244, 232, 214, 0.15);
    border-radius: 3px;
    cursor: pointer;
}

.player-bar::before {
    content: '';
    position: absolute;
    inset: -8px 0;
}

.player-bar span {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--accent);
    border-radius: 3px;
}

.player-bar span::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-radius: 50%;
    background: var(--accent-light);
    box-shadow: 0 0 0 4px rgba(212, 166, 74, 0.25);
}

/* Secciones: pensadas para verse completas en una pantalla de laptop */
section {
    padding: clamp(3rem, 7vh, 5rem) 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 3rem;
    flex-wrap: wrap;
    margin-bottom: clamp(1.6rem, 4vh, 2.6rem);
}

.section-head h2,
.side h2,
.about-copy h2,
.contact-card h2 {
    font-size: clamp(1.9rem, 3.8vw, 2.7rem);
}

.section-head .text {
    max-width: 430px;
    font-size: 0.9rem;
}

/* Textos cortos en columnas angostas: alineados a la izquierda para no abrir huecos */
.section-head .text,
.service-body .text,
.about-points .text {
    text-align: left;
}

/* Servicios: acordeón de fotos que se abre al pasar el cursor */
#servicios {
    background: var(--bg-2);
}

.services {
    display: flex;
    gap: 10px;
    height: clamp(300px, calc(100svh - 330px), 470px);
}

.service {
    position: relative;
    flex: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
    transition: flex 0.7s var(--ease);
}

.service.active {
    flex: 3.2;
}

.service img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease), opacity 0.6s ease;
}

.service.active img {
    transform: scale(1.05);
}

.service::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(27, 24, 21, 0.85) 0%, rgba(27, 24, 21, 0.2) 40%, rgba(27, 24, 21, 0.9) 100%);
}

.service-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 1.1rem 1.2rem;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.service-top span {
    font-family: var(--head);
    font-size: 0.8rem;
    color: var(--accent-light);
}

.service-top h3 {
    font-size: 1.1rem;
    white-space: nowrap;
}

/* En las franjas cerradas el título va en vertical para que se lea completo */
.service:not(.active) .service-top {
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.service:not(.active) .service-top h3 {
    writing-mode: vertical-rl;
    font-size: 1.05rem;
}

.service-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 1.4rem;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.6s var(--ease);
}

.service.active .service-body {
    opacity: 1;
    transform: none;
    transition-delay: 0.25s;
}

.service-body i {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #1b1815;
    font-size: 1rem;
}

.service-body .text {
    color: #ddd3c5;
    font-size: 0.86rem;
    max-width: 340px;
}

/* Trabajos: título a la izquierda y carrusel de tarjetas a la derecha */
.works {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) 2.2fr;
    gap: clamp(1.6rem, 4vw, 3.5rem);
    align-items: center;
}

.side h2 {
    margin-bottom: 1rem;
}

.side .text {
    font-size: 0.88rem;
    margin-bottom: 1.4rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.filter {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.filter:hover {
    color: var(--text);
    border-color: rgba(244, 232, 214, 0.3);
}

.filter.active {
    background: var(--gold-grad);
    border-color: var(--accent);
    color: #1b1815;
    font-weight: 500;
}

.side-nav {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.arrows {
    display: flex;
    gap: 8px;
}

.arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(244, 232, 214, 0.25);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}

.arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #1b1815;
}

.arrow:active {
    transform: scale(0.92);
}

/* El carrusel se centra cuando hay pocas tarjetas y se desliza cuando hay muchas */
.track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.track::-webkit-scrollbar {
    display: none;
}

.track-inner {
    display: flex;
    gap: 16px;
    width: max-content;
    margin: 0 auto;
}

.work {
    flex: 0 0 auto;
    width: clamp(190px, 19vw, 250px);
    scroll-snap-align: start;
    cursor: pointer;
}

.work.hidden {
    display: none;
}

.work.pop {
    animation: pop-in 0.6s var(--ease) both;
}

@keyframes pop-in {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

.work-media {
    position: relative;
    height: clamp(220px, calc(100svh - 420px), 380px);
    border-radius: 5px;
    overflow: hidden;
    background: var(--surface);
    margin-bottom: 0.8rem;
}

.work-media img,
.work-media video,
.work-media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-media img {
    transition: transform 1.2s var(--ease), opacity 0.6s ease;
}

.work-media video,
.work-media iframe {
    opacity: 0;
    border: 0;
    transition: opacity 0.6s ease;
}

.work.previewing .work-media video,
.work.previewing .work-media iframe {
    opacity: 1;
}

.work:hover .work-media img {
    transform: scale(1.07);
}

.work-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(27, 24, 21, 0.6), transparent 45%);
}

.work-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #1b1815;
    font-size: 0.8rem;
    padding-left: 2px;
    transition: transform 0.5s var(--ease), background 0.3s ease;
}

.work:hover .work-play {
    transform: rotate(360deg) scale(1.1);
    background: var(--accent-light);
}

.work-live {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 100px;
    background: rgba(27, 24, 21, 0.7);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.work-live::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e05a47;
    animation: blink 1.2s steps(2) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.work.previewing .work-live {
    opacity: 1;
}

.work h3 {
    font-size: 1rem;
    transition: color 0.3s ease;
}

.work:hover h3 {
    color: var(--accent-light);
}

.work small {
    font-size: 0.74rem;
    color: var(--muted);
}

/* Marcas de equipo en movimiento */
.brands {
    padding: clamp(1.6rem, 4vh, 2.4rem) 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    position: relative;
}

/* Bordes que se desvanecen (capas fijas encima; más liviano que una máscara) */
.brands::before,
.brands::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    width: 8%;
    pointer-events: none;
}

.brands::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg), transparent);
}

.brands::after {
    right: 0;
    background: linear-gradient(-90deg, var(--bg), transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee var(--marquee-time, 40s) linear infinite;
    will-change: transform;
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 18px;
    padding: 0.8rem 1.6rem;
    border: 1px solid transparent;
    border-radius: 4px;
    font-family: var(--head);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #8d8377;
    white-space: nowrap;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.brand-box i {
    font-size: 0.95rem;
}

.brand-box.hl,
.brand-box:hover {
    color: var(--accent-light);
    border-color: rgba(212, 166, 74, 0.6);
}

/* Nosotros: texto y cifras a la izquierda, foto en franjas a la derecha */
#nosotros {
    background: var(--bg-2);
}

.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.about-copy h2 {
    margin-bottom: 1rem;
}

.about-copy > .text {
    font-size: 0.9rem;
    margin-bottom: 1.4rem;
}

.about-points {
    list-style: none;
    display: grid;
    gap: 0.9rem;
    margin-bottom: clamp(1.4rem, 4vh, 2.2rem);
}

.about-points li {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: start;
}

.about-points i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(212, 166, 74, 0.5);
    color: var(--accent-light);
    font-size: 0.8rem;
}

.about-points b {
    display: block;
    font-family: var(--head);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.about-points .text {
    font-size: 0.84rem;
    line-height: 1.6;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 1.1rem 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.stat {
    text-align: center;
    padding: 0 0.6rem;
}

.stat + .stat {
    border-left: 1px solid var(--line);
}

.stat strong {
    display: block;
    font-family: var(--head);
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.1;
}

.stat strong em {
    font-style: normal;
    color: var(--accent);
    font-size: 0.7em;
    margin-left: 2px;
}

.stat small {
    font-size: 0.72rem;
    color: var(--muted);
}

/* Una sola foto cortada en franjas a distintas alturas; se alinean al pasar el cursor */
.stripes {
    position: relative;
    display: flex;
    gap: 8px;
    height: clamp(320px, calc(100svh - 230px), 520px);
    padding: 30px 0;
}

.stripe {
    flex: 1;
    border-radius: 4px;
    background-image: url('https://images.unsplash.com/photo-1632187981988-40f3cbaeef5e?auto=format&fit=crop&w=1100&q=70');
    background-size: 500% 100%;
    transform: translateY(var(--y, 0));
    transition: transform 0.9s var(--ease);
}

.stripe:nth-child(1) { background-position: 0% 50%; --y: -22px; }
.stripe:nth-child(2) { background-position: 25% 50%; --y: 18px; }
.stripe:nth-child(3) { background-position: 50% 50%; --y: -8px; }
.stripe:nth-child(4) { background-position: 75% 50%; --y: 26px; }
.stripe:nth-child(5) { background-position: 100% 50%; --y: -16px; }

.stripes:hover .stripe {
    transform: none;
}

/* Sello circular que gira */
.badge {
    position: absolute;
    left: -54px;
    bottom: 10px;
    z-index: 2;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: var(--bg);
    display: grid;
    place-items: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.badge svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: spin 16s linear infinite;
}

.badge text {
    font-family: 'Poppins', sans-serif;
    font-size: 9.4px;
    letter-spacing: 2.2px;
    fill: var(--accent-light);
    text-transform: uppercase;
}

.badge-core {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #14120f;
    border: 1.5px solid var(--accent);
    transform: rotate(45deg);
    transition: transform 0.8s var(--ease);
}

/* Da una vuelta completa al pasar el cursor, así el logo termina derecho */
.badge:hover .badge-core {
    transform: rotate(405deg);
}

/* Logo con sus colores originales y sin deformarse */
.badge-core img {
    width: 36px;
    height: auto;
    object-fit: contain;
    transform: rotate(-45deg);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Galería: franjas verticales escalonadas que se ensanchan al pasar el cursor */
.gallery {
    display: flex;
    gap: 10px;
    height: clamp(260px, calc(100svh - 360px), 440px);
    align-items: center;
}

.photo {
    position: relative;
    flex: 1;
    height: 88%;
    border: none;
    padding: 0;
    border-radius: 5px;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--surface);
    transition: flex 0.7s var(--ease), height 0.7s var(--ease);
}

.photo:nth-child(even) {
    height: 100%;
}

.photo:nth-child(3n) {
    height: 76%;
}

.photo:hover {
    flex: 2.4;
    height: 100%;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease), opacity 0.6s ease;
}

.photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(27, 24, 21, 0.85), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.photo figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    padding: 1rem;
    font-size: 0.8rem;
    text-align: left;
    color: var(--text);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.5s var(--ease);
    white-space: nowrap;
}

.photo:hover::after,
.photo:hover figcaption {
    opacity: 1;
    transform: none;
}

.gallery-actions {
    display: flex;
    justify-content: center;
    margin-top: clamp(1.4rem, 3.5vh, 2.2rem);
}

/* Visor de fotos */
.viewer {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    grid-template-columns: minmax(0, 1fr);
    background: rgba(20, 18, 16, 0.98);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.viewer.open {
    opacity: 1;
    visibility: visible;
}

.viewer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

.viewer-count {
    font-family: var(--head);
    font-size: 1rem;
    color: var(--muted);
    letter-spacing: 2px;
}

.viewer-count b {
    color: var(--accent-light);
}

.viewer-tools {
    display: flex;
    gap: 10px;
}

.v-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(244, 232, 214, 0.04);
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease);
}

.v-btn:hover,
.v-btn.playing {
    background: var(--accent);
    border-color: var(--accent);
    color: #1b1815;
}

#v-close:hover {
    transform: rotate(90deg);
}

.viewer-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0 84px;
    touch-action: pan-y;
}

#v-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    user-select: none;
    -webkit-user-drag: none;
}

.v-nav {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 52px;
    height: 52px;
    margin-top: -26px;
}

.v-nav.prev { left: 18px; }
.v-nav.next { right: 18px; }

.viewer-caption {
    text-align: center;
    padding: 14px 24px 8px;
    font-size: 0.9rem;
    color: #d6cdbf;
    min-height: 3em;
}

.viewer-bottom {
    padding: 0 24px 18px;
}

.viewer-progress {
    height: 2px;
    max-width: 520px;
    margin: 0 auto 12px;
    background: var(--line);
    overflow: hidden;
}

.viewer-progress span {
    display: block;
    height: 100%;
    background: var(--accent);
    transform-origin: left;
    transform: scaleX(0);
}

.viewer-progress span.run {
    animation: fill var(--slide, 4s) linear forwards;
}

@keyframes fill {
    to { transform: scaleX(1); }
}

.viewer-thumbs {
    display: flex;
    gap: 8px;
    justify-content: safe center;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px 0;
}

.viewer-thumbs::-webkit-scrollbar { display: none; }

.viewer-thumbs button {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    background: none;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease);
}

.viewer-thumbs button:hover { opacity: 0.8; }

.viewer-thumbs button.active {
    opacity: 1;
    border-color: var(--accent);
    transform: translateY(-3px);
}

.viewer-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contacto */
.contact-card {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(1.6rem, 4vw, 3.5rem);
    align-items: center;
    padding: clamp(2rem, 5vw, 3.5rem);
    border-radius: 8px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(34, 31, 27, 0.97) 0%, rgba(34, 31, 27, 0.9) 55%, rgba(34, 31, 27, 0.6) 100%),
        url('https://images.unsplash.com/photo-1625690303837-654c9666d2d0?auto=format&fit=crop&w=1400&q=60') center / cover;
    border: 1px solid var(--line);
}

.contact-card h2 {
    margin-bottom: 1rem;
}

.contact-card .text {
    font-size: 0.9rem;
    max-width: 460px;
    margin-bottom: 1.6rem;
}

.contact-list {
    display: grid;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1rem 1.2rem;
    border-radius: 6px;
    background: rgba(27, 24, 21, 0.75);
    border: 1px solid var(--line);
    transition: transform 0.4s var(--ease), border-color 0.3s ease;
}

.contact-item:hover {
    transform: translateX(6px);
    border-color: rgba(212, 166, 74, 0.5);
}

.contact-item > i {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #1b1815;
    font-size: 0.9rem;
}

.contact-item small {
    display: block;
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 1px;
}

.contact-item strong {
    font-weight: 500;
    font-size: 0.95rem;
}

.socials {
    display: flex;
    gap: 8px;
}

.socials a {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    font-size: 0.85rem;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s var(--ease);
}

.socials a:hover {
    background: var(--accent);
    color: #1b1815;
    transform: translateY(-3px);
}

/* Footer */
footer {
    padding: 1.8rem 0;
    border-top: 1px solid var(--line);
    font-size: 0.76rem;
    color: #8d8377;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem 1.5rem;
    flex-wrap: wrap;
    padding-right: 96px;
}

footer .brand {
    color: var(--text);
    font-size: 0.95rem;
}

.wa-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.55rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 90;
    transition: transform 0.4s var(--ease);
}

.wa-float:hover {
    transform: scale(1.1) rotate(-8deg);
}

/* Aparición al hacer scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: var(--d, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.work img.fade,
.photo img.fade,
.service img.fade {
    opacity: 0;
}

/* Si el equipo pide reducir movimiento, solo se quitan los desplazamientos grandes */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { transform: none; }
}

/* Tableta */
@media (max-width: 1000px) {
    .works {
        grid-template-columns: 1fr;
    }

    .side {
        text-align: center;
    }

    .side .text {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }

    .filters,
    .side-nav {
        justify-content: center;
    }

    .work {
        width: clamp(190px, 30vw, 250px);
    }

    .about {
        grid-template-columns: 1fr;
    }

    .stripes {
        height: 360px;
        max-width: 560px;
        width: 100%;
        margin: 0 auto;
    }

    .badge {
        left: 10px;
    }

    .contact-card {
        grid-template-columns: 1fr;
    }
}

/* Celular */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-contact {
        display: none;
    }

    .nav ul {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 24px 1.4rem;
        background: rgba(27, 24, 21, 0.98);
        border-bottom: 1px solid var(--line);
        clip-path: inset(0 0 100% 0);
        pointer-events: none;
        transition: clip-path 0.6s var(--ease);
    }

    .nav ul.show {
        clip-path: inset(0 0 0 0);
        pointer-events: auto;
    }

    .nav ul a {
        display: block;
        padding: 0.95rem 0;
        font-size: 0.9rem;
        border-bottom: 1px solid var(--line);
    }

    .nav ul a::before {
        display: none;
    }

    section {
        padding: 3.6rem 0;
    }

    .hero {
        padding-top: 96px;
    }

    .hero-actions .btn {
        flex: 1 1 140px;
    }

    .player {
        grid-template-columns: auto 1fr;
    }

    .player-controls {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Servicios apilados: se abre el que se toca */
    .services {
        flex-direction: column;
        height: auto;
    }

    .service {
        flex: none;
        height: 64px;
        transition: height 0.6s var(--ease);
    }

    .service.active {
        flex: none;
        height: 260px;
    }

    /* En celular las franjas son horizontales: el título vuelve a leerse en línea */
    .service:not(.active) .service-top {
        flex-direction: row;
        align-items: baseline;
    }

    .service:not(.active) .service-top h3 {
        writing-mode: horizontal-tb;
    }

    /* En pantallas angostas el justificado abre huecos: texto alineado a la izquierda */
    .text {
        text-align: left;
    }

    .work {
        width: 62vw;
    }

    .work-media {
        height: 78vw;
        max-height: 380px;
    }

    .gallery {
        height: 300px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        margin: 0 -24px;
        padding: 0 24px;
    }

    .gallery::-webkit-scrollbar {
        display: none;
    }

    .photo,
    .photo:hover {
        flex: 0 0 42%;
        scroll-snap-align: center;
    }

    .photo figcaption {
        opacity: 1;
        transform: none;
        white-space: normal;
        font-size: 0.72rem;
    }

    .photo::after {
        opacity: 1;
    }

    .stripes {
        height: 300px;
    }

    .badge {
        width: 104px;
        height: 104px;
    }

    .viewer-stage {
        padding: 0 12px;
    }

    .v-nav {
        width: 42px;
        height: 42px;
        margin-top: -21px;
        background: rgba(20, 18, 16, 0.6);
    }

    .viewer-thumbs {
        justify-content: flex-start;
    }

    .viewer-thumbs button {
        width: 46px;
        height: 46px;
    }

    footer .container {
        flex-direction: column;
        text-align: center;
        padding-right: 24px;
        padding-bottom: 60px;
    }
}
