/**
 * ZPOS sector chooser — ported from the Next.js /escolha page.
 * All rules are scoped under .zyrgon-escolha so the popup never inherits or
 * leaks theme/Elementor styles.
 */

.zyrgon-escolha {
    --zy-ink: 0 0% 4%;
    --zy-fg: 0 0% 100%;
    --zy-accent: 11 100% 64%;

    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background: hsl(var(--zy-ink));
    color: hsl(var(--zy-fg));
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.zyrgon-escolha *,
.zyrgon-escolha *::before,
.zyrgon-escolha *::after {
    box-sizing: border-box;
}

/* ---------- Top bar ---------- */
.zyrgon-escolha__topbar {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    pointer-events: none;
}

.zyrgon-escolha__brand {
    display: inline-flex;
    align-items: center;
    color: hsl(var(--zy-accent));
    pointer-events: auto;
}

.zyrgon-escolha__logo {
    display: block;
    height: 26px;
    width: auto;
}

.zyrgon-escolha__controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    pointer-events: auto;
}

.zyrgon-escolha__chooser-label {
    display: none;
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: hsl(var(--zy-fg) / 0.6);
}

.zyrgon-escolha__langs {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    border: 1px solid hsl(var(--zy-fg) / 0.2);
    border-radius: 9999px;
    background: hsl(var(--zy-ink) / 0.4);
    backdrop-filter: blur(8px);
}

.zyrgon-escolha__lang {
    display: inline-block;
    border: 0;
    margin: 0;
    cursor: pointer;
    border-radius: 9999px;
    padding: 4px 10px;
    background: transparent;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.16em;
    color: hsl(var(--zy-fg) / 0.6);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.zyrgon-escolha__lang:hover,
.zyrgon-escolha__lang:focus {
    color: hsl(var(--zy-fg));
    text-decoration: none;
}

.zyrgon-escolha__lang.is-active {
    background: hsl(var(--zy-fg));
    color: hsl(var(--zy-ink));
}

/* ---------- Grid + panels ---------- */
.zyrgon-escolha__grid {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

.zyrgon-escolha__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 60vh;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.zyrgon-escolha__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.zyrgon-escolha__panel:hover .zyrgon-escolha__bg {
    transform: scale(1.05);
}

.zyrgon-escolha__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: opacity 700ms ease;
}

.zyrgon-escolha__overlay--gradient {
    background: linear-gradient(
        to top,
        hsl(var(--zy-ink)) 0%,
        hsl(var(--zy-ink) / 0.7) 50%,
        hsl(var(--zy-ink) / 0.3) 100%
    );
}

.zyrgon-escolha__panel:hover .zyrgon-escolha__overlay--gradient {
    opacity: 0.9;
}

.zyrgon-escolha__overlay--tint {
    background: hsl(var(--zy-ink) / 0.3);
}

.zyrgon-escolha__panel:hover .zyrgon-escolha__overlay--tint {
    opacity: 0;
}

.zyrgon-escolha__content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 2rem;
    padding-top: 6rem;
}

.zyrgon-escolha__kicker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: hsl(var(--zy-fg) / 0.7);
}

.zyrgon-escolha__num {
    color: hsl(var(--zy-accent));
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.zyrgon-escolha__sep {
    width: 1px;
    height: 12px;
    background: hsl(var(--zy-fg) / 0.2);
}

.zyrgon-escolha__title {
    margin: 0;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.02em;
    text-wrap: balance;
    font-size: clamp(2.75rem, 6vw, 6rem);
    /* Explicit so a theme's `h2 { color }` rule cannot turn it grey. */
    color: hsl(var(--zy-fg));
}

.zyrgon-escolha__title span {
    color: inherit;
}

.zyrgon-escolha__title-b {
    color: hsl(var(--zy-accent)) !important;
}

.zyrgon-escolha__desc {
    margin-top: 1.5rem;
    max-width: 28rem;
    font-size: 1rem;
    line-height: 1.6;
    color: hsl(var(--zy-fg) / 0.8);
}

.zyrgon-escolha__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid hsl(var(--zy-fg) / 0.3);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: hsl(var(--zy-fg));
    transition: color 700ms ease, border-color 700ms ease;
}

.zyrgon-escolha__panel:hover .zyrgon-escolha__cta {
    color: hsl(var(--zy-accent));
    border-color: hsl(var(--zy-accent));
}

.zyrgon-escolha__arrow {
    transition: transform 0.3s ease;
}

.zyrgon-escolha__panel:hover .zyrgon-escolha__arrow {
    transform: translate(4px, -4px);
}

/* ---------- Center divider ---------- */
.zyrgon-escolha__divider {
    display: none;
}

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
    .zyrgon-escolha__topbar {
        padding: 1.5rem 2.5rem;
    }

    .zyrgon-escolha__logo {
        height: 28px;
    }

    .zyrgon-escolha__chooser-label {
        display: block;
    }

    .zyrgon-escolha__grid {
        grid-template-columns: 1fr 1fr;
    }

    .zyrgon-escolha__panel {
        min-height: 100vh;
    }

    .zyrgon-escolha__content {
        padding: 4rem;
        padding-top: 6rem;
    }

    .zyrgon-escolha__desc {
        font-size: 1.125rem;
    }

    .zyrgon-escolha__divider {
        display: block;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        z-index: 20;
        width: 1px;
        transform: translateX(-50%);
        background: hsl(var(--zy-fg) / 0.1);
        pointer-events: none;
    }
}

/* ---------- Overlay container (home gate) ---------- */
#zy-escolha-gate {
    /* Critical positioning lives inline in <head>; this ensures the chooser
       fills the layer even if the inline block is ever overridden. */
    min-height: 100vh;
}

#zy-escolha-gate .zyrgon-escolha {
    min-height: 100vh;
}
