/* ===== Agencia Canaria de Fotografía ===== */

@font-face { font-family: "Rubik"; src: url("../fonts/rubik.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../fonts/playfair-display.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/open-sans.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
    --negro: #000;
    --blanco: #fff;
    --gris-claro: #ECECEC;
    --gris-linea: #C9C9C9;
    --gris-pie: #E6E6E6;

    --fuente-titulos: "Rubik", system-ui, sans-serif;
    --fuente-texto: "Plus Jakarta Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--fuente-texto);
    font-size: 18px;
    font-weight: 300;
    line-height: 32px;
    color: var(--negro);
    background: var(--blanco);
}
body.sin-scroll { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--fuente-titulos); font-weight: 300; line-height: 1.2; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }

.skip-link { position: absolute; left: -9999px; top: 0; padding: .5rem 1rem; background: #000; color: #fff; z-index: 1000; }
.skip-link:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.centro { text-align: center; }

/* ===== Cabecera fija (transparente; negra al hacer scroll) ===== */
.cabecera {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    padding: 0 70px;
    transition: height .4s, background-color .4s;
}
.cabecera.is-compacta { height: 60px; background: var(--negro); }
.cabecera__menu {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
}
.cabecera__menu svg { width: 20px; height: 20px; fill: #fff; filter: drop-shadow(0 1px 3px rgb(0 0 0 / .35)); }
.cabecera__marca {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 16px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgb(0 0 0 / .35);
}

/* ===== Menú a pantalla completa ===== */
.menu {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gris-claro);
    opacity: 0;
    transition: opacity .3s;
}
.menu[hidden] { display: none; }
.menu.is-abierto { opacity: 1; }
.menu ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.menu li + li { margin-top: 30px; }
.menu a {
    font-family: var(--fuente-titulos);
    font-size: 22px;
    letter-spacing: 6px;
    text-transform: uppercase;
    text-decoration: none;
    color: #555;
    transition: color .2s;
}
.menu a:hover { color: var(--negro); }
.menu__cerrar {
    position: absolute;
    top: 20px;
    left: 30px;
    background: none;
    border: 0;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    color: var(--negro);
}

/* ===== Slider con efecto Ken Burns ===== */
.slider {
    position: relative;
    overflow: hidden;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider--alto  { height: 800px; height: min(800px, 100svh); }
.slider--medio { height: 640px; }
.slider__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.2s ease, transform 7s linear;
}
.slider__slide.is-activa { opacity: 1; transform: scale(1.12); }
.slider__flecha {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    background: none;
    border: 0;
    padding: 15px;
    cursor: pointer;
    opacity: .75;
    transition: opacity .2s;
}
.slider__flecha:hover { opacity: 1; }
.slider__flecha svg { width: 18px; height: 30px; fill: rgb(237 237 237); filter: drop-shadow(0 1px 3px rgb(0 0 0 / .4)); }
.slider__flecha--prev { left: 15px; }
.slider__flecha--next { right: 15px; }
.slider__titulo {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
    font-weight: 300;
    text-align: center;
    padding: 0 1rem;
    text-shadow: 0 2px 16px rgb(0 0 0 / .35);
}
@media (prefers-reduced-motion: reduce) {
    .slider__slide { transition: opacity .5s; transform: none !important; }
}

/* ===== Secciones ===== */
.seccion { padding: 100px 20px; }
.seccion--sin-arriba { padding-top: 0; }

.titulo-seccion {
    font-size: clamp(2rem, 3vw + 1rem, 3rem);
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 50px;
}
.titulo-seccion::after {
    content: "";
    display: block;
    width: 80px;
    height: 2px;
    margin: 25px auto 0;
    background: var(--gris-linea);
}

.texto {
    max-width: 640px;
    margin: 0 auto;
    text-align: justify;
}
.texto p:last-child { margin-bottom: 0; }

.logo-centro { margin: 60px auto 0; width: 150px; }
.cierre .logo-centro { width: 296px; margin-top: 40px; }

/* ===== Mosaico de categorías ===== */
.mosaico {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 10px;
    max-width: 1140px;
    margin: 0 auto;
}
.mosaico__tarjeta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    overflow: hidden;
    text-decoration: none;
    grid-column: span 5;
}
.mosaico__tarjeta:nth-child(1) { grid-column: span 9; }
.mosaico__tarjeta:nth-child(2) { grid-column: span 6; }
.mosaico__tarjeta img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.mosaico__tarjeta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / .25);
    transition: background .3s;
}
.mosaico__tarjeta:hover img { transform: scale(1.06); }
.mosaico__tarjeta:hover::after { background: rgb(0 0 0 / .45); }
.mosaico__titulo {
    margin: 0;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    color: #fff;
    font-family: var(--fuente-titulos);
    font-size: 28px;
    font-weight: 300;
}

/* ===== Galería (masonry) ===== */
.galeria {
    columns: 3;
    column-gap: 30px;
    max-width: 1140px;
    margin: 0 auto;
}
.galeria__item {
    display: block;
    margin-bottom: 30px;
    break-inside: avoid;
    overflow: hidden;
    cursor: zoom-in;
}
.galeria__item img { width: 100%; transition: transform .5s ease, opacity .3s; }
.galeria__item:hover img { transform: scale(1.03); opacity: .9; }

/* ===== Visor de fotos ===== */
.visor {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(0 0 0 / .94);
}
.visor[hidden] { display: none; }
.visor__img { max-width: 92vw; max-height: 88vh; object-fit: contain; user-select: none; }
.visor button {
    position: absolute;
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
    opacity: .8;
    line-height: 1;
}
.visor button:hover { opacity: 1; }
.visor__cerrar { top: 15px; right: 25px; font-size: 44px; }
.visor__nav { top: 50%; transform: translateY(-50%); font-size: 64px; padding: 20px; }
.visor__nav--prev { left: 10px; }
.visor__nav--next { right: 10px; }
.visor__contador {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    margin: 0;
    text-align: center;
    color: #ccc;
    font-size: 14px;
}

/* ===== Portada: Sobre nosotros ===== */
.dos-columnas {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
    max-width: 640px;
    margin: 0 auto;
}
.dos-columnas__foto { width: 300px; height: 450px; object-fit: cover; }

.firma { width: 150px; margin-top: 20px; }

/* ===== Work: equipo ===== */
.equipo {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 800px;
    margin: 60px auto 0;
    padding: 0;
    text-align: center;
}
.equipo img { width: 122px; height: 122px; border-radius: 50%; object-fit: cover; margin: 0 auto 15px; }
.equipo h3 { font-size: 18px; font-weight: 400; }
.equipo p { font-size: 10px; line-height: 1.4; text-transform: uppercase; margin: 6px 0 0; }

/* ===== Banda con foto de fondo ===== */
.banda {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 460px;
    padding: 40px 20px;
    background-size: cover;
    background-position: center;
    position: relative;
    isolation: isolate;
}
.banda::before { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .25); z-index: -1; }
.banda__titulo {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    max-width: 800px;
}
.banda__logo { width: 171px; }

.cierre { text-align: center; }
.cierre__frase { font-size: clamp(1.6rem, 2vw + 1rem, 2.25rem); font-weight: 700; }

/* ===== Botón ===== */
.boton {
    display: inline-block;
    margin-top: 40px;
    padding: 12px 40px;
    border: 1px solid var(--negro);
    background: #fff;
    font-family: var(--fuente-titulos);
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.boton:hover { background: var(--negro); color: #fff; }

/* ===== Contacto ===== */
.contacto { text-align: center; }
.contacto__telefono { font-family: var(--fuente-titulos); font-size: 23px; font-weight: 600; }
.contacto__email { font-family: var(--fuente-titulos); font-size: 18px; font-weight: 400; margin-top: 20px; }
.contacto a { text-decoration: none; }
.contacto a:hover { text-decoration: underline; }

/* ===== Redes sociales ===== */
.redes {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}
.redes a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
.redes svg { width: 21px; height: 21px; fill: currentColor; transition: opacity .2s; }
.redes a:hover svg { opacity: .7; }
.redes--grandes { margin-top: 20px; }
.redes--grandes a { width: 60px; height: 60px; }
.redes--grandes svg { width: 30px; height: 30px; }

/* ===== Pie ===== */
.pie {
    background: var(--negro);
    color: var(--gris-pie);
    text-align: center;
    padding: 40px 20px;
}
.pie__marca {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 13px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 15px;
}
.pie__contacto { font-family: "Open Sans", system-ui, sans-serif; font-size: 13px; margin: 15px 0 0; }
.pie__contacto a { text-decoration: none; }
.pie__contacto a:hover { text-decoration: underline; }
.pie__contacto span { margin: 0 8px; }

.pie__legal { margin: 15px 0 0; }
.pie__legal button { background: none; border: 0; padding: 0; color: #999; font: 12px "Open Sans", system-ui, sans-serif; cursor: pointer; }
.pie__legal button:hover { color: #fff; }

/* ===== Aviso de cookies ===== */
.cookies {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 300;
    width: min(calc(100% - 40px), 400px);
    padding: 24px;
    background: #fff;
    color: var(--negro);
    box-shadow: 0 10px 40px rgb(0 0 0 / .25);
    font-size: 14px;
    line-height: 1.6;
}
.cookies[hidden] { display: none; }
.cookies__titulo { font-family: var(--fuente-titulos); font-size: 17px; font-weight: 400; margin-bottom: 8px; }
.cookies__texto { margin-bottom: 18px; }
.cookies__botones { display: flex; gap: 10px; }
.cookies__boton {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--negro);
    background: var(--negro);
    color: #fff;
    font: 14px var(--fuente-titulos);
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}
.cookies__boton--secundario { background: #fff; color: var(--negro); }

/* ===== Página 404 ===== */
.error-404 { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.error-404 .pie__marca { color: var(--negro); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .galeria { columns: 2; column-gap: 10px; }
    .galeria__item { margin-bottom: 10px; }
}
@media (max-width: 767px) {
    body { font-size: 16px; line-height: 28px; }
    .texto { text-align: left; }
    .cabecera { height: 70px; padding: 0 50px; }
    .cabecera__menu { left: 10px; }
    .cabecera__marca { font-size: 12px; letter-spacing: 1.5px; }
    .slider__flecha { padding: 8px; }
    .slider--alto { height: 70svh; }
    .slider--medio { height: 420px; }
    .seccion { padding: 60px 20px; }
    .mosaico { grid-template-columns: 1fr; }
    .mosaico__tarjeta, .mosaico__tarjeta:nth-child(1), .mosaico__tarjeta:nth-child(2) { grid-column: auto; height: 220px; }
    .galeria { columns: 1; }
    .dos-columnas { grid-template-columns: 1fr; justify-items: center; }
    .equipo { grid-template-columns: repeat(2, 1fr); }
    .banda { min-height: 300px; }
    .visor__nav { font-size: 44px; padding: 10px; }
}
