/* ==========================================================================
   Reels feed
   ========================================================================== */
/* ET Book, served by verlo.co (falls back to Palatino when run locally) */
@font-face { font-family: "et-book"; src: url("/assets/fonts/et-book-roman-line-figures.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
    --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --serif: "et-book", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
    /* Header hidden: 0 lets the feed, strip and buttons use the full screen.
       To bring it back: --header-h: 76px here, 56px in the phone block, and drop .site-header-hidden. */
    --header-h: 0px;
}

.site-header-hidden {
    display: none !important;
}

/* ==========================================================================
   Verlo site header (matches /assets/verlo.css)
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    z-index: 300;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(16px, 5vw, 48px);
    background: rgba(255, 255, 248, 0.92);
    backdrop-filter: blur(6px);
    font-family: var(--serif);
    -webkit-font-smoothing: antialiased;
}

.site-header a {
    color: #111;
    text-decoration: none;
    text-underline-offset: 3px;
}

.site-header .logo {
    font-size: 1.6rem;
    white-space: nowrap;
}

.site-header nav {
    display: flex;
    white-space: nowrap;
}

.site-header nav a {
    margin-left: 28px;
    font-size: 1.15rem;
}

.site-header nav a:hover,
.site-header nav a.on {
    text-decoration: underline;
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: #fff;
    background: #000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* The feed fills the window below the header */
.app-container {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    background: #000;
}

.reels-container,
.reels--videos {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.reels--videos {
    touch-action: pan-y;
}

.reels--video {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    will-change: transform, opacity;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reels--video video,
.reels--video img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Set by main.js when the file's shape is close to the card's (e.g. 9:16 on a phone) */
.reels--video video.fit-cover,
.reels--video img.fit-cover {
    object-fit: cover;
}

/* Slides: every card holds one or more; only the active one shows */
.slides,
.slide {
    position: absolute;
    inset: 0;
}

.slide {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* Carousel controls */
.carousel-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    padding: 4px 14px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.55);
    font-size: 0.95rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.75);
}

.carousel-counter strong {
    color: #fff;
}

.carousel-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 8px;
}

.carousel-dots span {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.4);
    transition: width 0.3s ease, background 0.3s ease;
}

.carousel-dots span.active {
    width: 22px;
    background: #fff;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.75);
}

.carousel-nav.prev { left: 16px; }
.carousel-nav.next { right: 64px; }

/* ==========================================================================
   Contact: card CTA + contact sheet (Verlo palette)
   ========================================================================== */
.card-cta {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 18px;
    border: none;
    border-radius: 4px;
    background: #2340a0;
    color: #fff;
    font-family: var(--serif);
    font-size: 1.1rem;
    text-shadow: none;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.card-cta:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

html[data-region="latam"] .card-cta {
    background: #1f8a4c; /* WhatsApp-ish green, darker for white text contrast */
}

.contact-sheet[hidden] {
    display: none;
}

.contact-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.contact-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.contact-sheet__panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 28px 24px 22px;
    border-radius: 6px;
    background: #fffff8;
    color: #111;
    font-family: var(--serif);
    line-height: 1.5;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.contact-sheet__panel h2 {
    font-size: 1.9rem;
    font-weight: 400;
    line-height: 1.15;
}

.contact-sheet__about {
    margin: 4px 0 18px;
    color: #5d5a50;
    font-size: 1rem;
}

.contact-sheet__about:empty {
    display: none;
}

.contact-sheet__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #5d5a50;
    font-size: 1.2rem;
    cursor: pointer;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    padding: 11px 18px;
    border: 1.5px solid #111;
    border-radius: 4px;
    background: transparent;
    color: #111;
    font-family: var(--serif);
    font-size: 1.15rem;
    text-decoration: none;
    cursor: pointer;
}

.contact-btn--primary {
    border-color: #2340a0;
    background: #2340a0;
    color: #fff;
}

.contact-btn:hover {
    filter: brightness(0.95);
}

.contact-btn[hidden] {
    display: none;
}

.contact-form {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e2dcc6;
}

.contact-form__lead {
    margin-bottom: 8px;
    color: #5d5a50;
}

.contact-form label {
    display: block;
    margin-top: 10px;
    font-size: 1rem;
}

.contact-form label span {
    color: #5d5a50;
}

.contact-form input,
.contact-form textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid #e2dcc6;
    border-radius: 4px;
    background: #fffffc;
    color: #111;
    font: 1rem var(--font-family-primary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid #2340a0;
    outline-offset: 0;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form__error {
    margin-top: 10px;
    color: #b42318;
    font-size: 0.95rem;
}

.contact-form__note {
    margin-top: 10px;
    color: #5d5a50;
    font-size: 0.9rem;
}

.contact-form__note a {
    color: #2340a0;
}

/* Sound toggle */
.sound-toggle {
    position: fixed;
    top: calc(var(--header-h) + 16px);
    right: 16px;
    z-index: 200;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.sound-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
}

.sound-toggle.is-on {
    color: #fff;
}

/* Center flash when tapping the video toggles sound */
.sound-flash {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 30;
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 2.2rem;
    opacity: 0;
    pointer-events: none;
}

.sound-flash.show {
    animation: sound-flash 0.8s ease-out forwards;
}

@keyframes sound-flash {
    0%   { opacity: 0; transform: scale(0.7); }
    20%  { opacity: 1; transform: scale(1); }
    70%  { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.1); }
}

.media-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Swipe hint */
.reels--indicators {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    pointer-events: none;
}

.reels--indicators .indicator-text {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    writing-mode: vertical-rl;
}

.reels--indicators i {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ==========================================================================
   Card overlay: only the contact button, centered at the bottom of the card
   ========================================================================== */
.video-info {
    position: absolute;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 25;
    pointer-events: none;
    white-space: nowrap;
}

.card-cta {
    margin-top: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Dots sit above the button */
.carousel-dots {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

/* ==========================================================================
   Services banner
   Default (phones, tablets, tall screens): a strip over the top of the feed.
   Wide screens: a panel in the empty space left of the vertical video.
   ========================================================================== */
:root {
    --strip-h: 40px;
}

.services-strip {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: var(--strip-h);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: safe center;
    gap: 18px;
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    color: #fff;
    font-family: var(--serif);
    font-size: 0.95rem;
    white-space: nowrap;
}

.services-strip::-webkit-scrollbar {
    display: none;
}

.services-strip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.services-strip i {
    color: rgba(255, 255, 255, 0.75);
}

/* Controls at the top of the card clear the strip */
.sound-toggle {
    top: calc(var(--header-h) + var(--strip-h) + 12px);
}

.carousel-counter {
    top: calc(var(--strip-h) + 12px);
}

.services-panel {
    display: none;
}

@media (min-width: 1000px) and (min-aspect-ratio: 5/4) {
    .services-strip {
        display: none;
    }

    .sound-toggle {
        top: calc(var(--header-h) + 16px);
    }

    .carousel-counter {
        top: 20px;
    }

    .services-panel {
        display: block;
        position: fixed;
        z-index: 150;
        top: calc(var(--header-h) + (100vh - var(--header-h)) / 2);
        left: clamp(24px, 4vw, 64px);
        transform: translateY(-50%);
        /* the black space left of a 9:16 video, minus margins */
        width: calc(50vw - (100vh - var(--header-h)) * 0.28125 - 2 * clamp(24px, 4vw, 64px));
        max-width: 380px;
        color: #fffff8;
        font-family: var(--serif);
    }

    .services-panel h2 {
        font-size: clamp(1.8rem, 2.6vw, 2.6rem);
        font-weight: 400;
        line-height: 1.1;
    }

    .services-panel p {
        margin-top: 10px;
        color: rgba(255, 255, 248, 0.7);
        font-size: 1.1rem;
        line-height: 1.45;
    }

    .services-panel ul {
        margin-top: 22px;
        list-style: none;
    }

    .services-panel li {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 0;
        border-top: 1px solid rgba(255, 255, 248, 0.18);
        font-size: 1.2rem;
    }

    .services-panel li i {
        width: 22px;
        text-align: center;
        color: rgba(255, 255, 248, 0.7);
    }
}

/* ==========================================================================
   Phones
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --header-h: 0px;
        --strip-h: 36px;
    }

    .site-header .logo {
        font-size: 1.2rem;
    }

    .site-header nav a {
        margin-left: 14px;
        font-size: 1rem;
    }

    .services-strip {
        gap: 14px;
        font-size: 0.85rem;
    }

    .card-cta {
        padding: 10px 20px;
        font-size: 1.05rem;
    }

    /* Bottom sheet on phones */
    .contact-sheet {
        align-items: flex-end;
        padding: 0;
    }

    .contact-sheet__panel {
        max-width: none;
        max-height: 92vh;
        border-radius: 12px 12px 0 0;
    }

    .carousel-nav.next {
        right: 16px;
    }

    /* Swiping is the default on phones, and the hint would sit under the carousel arrow */
    .reels--indicators {
        display: none;
    }
}

@media (max-width: 360px) {
    .site-header nav a {
        margin-left: 10px;
        font-size: 0.92rem;
    }

    .services-strip {
        gap: 10px;
        font-size: 0.8rem;
    }
}
