/* =========================================================
   Page mode (full-scroll gallery pages: /branding, /experiments)
   ========================================================= */

body.page-mode {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
}
body.page-mode::before, body.page-mode::after {
    /* keep ambient gradients */
}
body.page-mode .slide-nav,
body.page-mode .cursor-follower,
body.page-mode .page-loader { display: none !important; }

.page-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 14px clamp(20px, 3vw, 44px);
    background: rgba(8, 3, 22, 0.75);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.page-header-inner {
    width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--c-text-dim);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}
.back-link:hover { color: var(--c-pink); }
.back-arrow {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    transition: all 0.35s var(--ease-spring);
}
.back-arrow svg { width: 14px; height: 14px; }
.back-link:hover .back-arrow {
    background: var(--grad-cta);
    border-color: transparent;
    color: #fff;
    transform: translateX(-3px);
}

.page-logo {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(184,41,224,0.4), rgba(255,79,163,0.4));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    transition: transform 0.4s var(--ease-spring);
}
.page-logo:hover { transform: rotate(-6deg) scale(1.06); }
.page-logo .logo-letter {
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 800;
    font-size: 20px;
    color: #fff;
}

.page-main { padding: 60px 0 80px; }
.page-hero {
    text-align: center;
    margin-bottom: 60px;
    padding: 30px 0 0;
}
.page-hero .eyebrow { justify-content: center; }
.page-title {
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 800;
    font-size: clamp(34px, 4.4vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 12px 0 14px;
    text-transform: uppercase;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.page-sub {
    color: var(--c-text-dim);
    font-size: clamp(14px, 1.05vw, 16.5px);
    margin: 0 auto;
    max-width: 620px;
}

.gallery-block { margin-bottom: 80px; }
.gallery-block .block-title {
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 700;
    font-size: clamp(22px, 2.2vw, 30px);
    margin: 0 0 24px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.logos-gallery {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.mockups-gallery {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.gallery-card {
    margin: 0;
    background: linear-gradient(140deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.4s var(--ease-spring), border-color 0.4s, box-shadow 0.5s;
    display: flex;
    flex-direction: column;
}
.gallery-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,79,163,0.4);
    box-shadow: 0 20px 50px -20px rgba(255,79,163,0.5);
}
.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}
.logo-tile {
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    padding: 18px;
}
.logo-tile img {
    max-width: 75%;
    max-height: 70%;
    width: auto; height: auto;
    object-fit: contain;
}
.logo-tile figcaption,
.mockup-tile figcaption,
.extra-tile figcaption {
    padding: 10px 14px;
    font-size: 12.5px;
    color: var(--c-text-dim);
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.mockup-tile { aspect-ratio: 4 / 3; }
.extra-tile { aspect-ratio: 3 / 4; }
.brand-tile {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.brand-tile img {
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center;
}
.brand-tile.is-fallback {
    flex-direction: column;
    gap: 4px;
}
.branding-page-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.thumb-tile { aspect-ratio: 16 / 9; }
.thumbnails-page-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.social-tile { aspect-ratio: 1 / 1; }
.social-tile.is-hidden { display: none; }
.social-page-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.ad-tile { aspect-ratio: 1 / 1; }
.ad-tile.is-hidden { display: none; }
.ad-tile figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.at-title {
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 600;
    font-size: 13.5px;
    color: #fff;
}
.at-pill {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 8px;
    border-radius: 6px;
}
.at-pill.meta { background: rgba(24, 119, 242, 0.2); color: #6ba6ff; }
.at-pill.google { background: rgba(255, 138, 61, 0.2); color: var(--c-orange); }
.at-pill.whatsapp { background: rgba(37, 211, 102, 0.2); color: #5ee68f; }
.ads-page-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.product-tile { aspect-ratio: 4 / 3; }
.product-tile.mobile { aspect-ratio: 9 / 16; }
.product-tile.is-hidden { display: none; }
.product-tile figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.pt-title {
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}
.pt-pill {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255,79,163,0.12);
    color: var(--c-pink);
}
.product-page-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.extra-tile.is-hidden { display: none; }
.empty-line {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--c-text-muted);
    padding: 40px;
    border: 1.5px dashed rgba(255,255,255,0.1);
    border-radius: 18px;
}

.tab-bar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 36px;
}

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.page-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 28px 0;
    margin-top: 40px;
}
.page-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.page-footer p {
    margin: 0;
    color: var(--c-text-muted);
    font-size: 13px;
}

/* Loaded image — animate in */
.gallery-card { animation: fadeUp 0.7s var(--ease-spring) backwards; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.gallery-card:nth-child(1) { animation-delay: 0.05s; }
.gallery-card:nth-child(2) { animation-delay: 0.10s; }
.gallery-card:nth-child(3) { animation-delay: 0.15s; }
.gallery-card:nth-child(4) { animation-delay: 0.20s; }
.gallery-card:nth-child(5) { animation-delay: 0.25s; }
.gallery-card:nth-child(6) { animation-delay: 0.30s; }
.gallery-card:nth-child(n+7) { animation-delay: 0.35s; }

@media (max-width: 720px) {
    .page-header-inner { gap: 8px; }
    .back-link span:not(.back-arrow) { display: none; }
    .btn-pill span:first-child { display: none; }
    .btn-pill { padding: 10px 12px; }
    .page-title { font-size: 32px; }
}
