@import url('/assets/css/components.css');

/*
 * Te Explico — Etapa 21
 * Cabeçalho e hero da Home pública.
 * Baseado no layout visual aprovado em 26/08/2026.
 */

.te-public-home {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 7% 31%, rgba(110, 175, 255, .13) 0 11rem, transparent 11.1rem),
        radial-gradient(circle at 89% 30%, rgba(255, 200, 61, .07) 0 7rem, transparent 7.1rem),
        linear-gradient(180deg, #ffffff 0%, #ffffff 76%, #f8faff 100%);
}

.te-site-header {
    position: relative;
    z-index: 20;
    width: 100%;
    border-bottom: 1px solid rgba(223, 229, 239, .34);
    background: rgba(255, 255, 255, .96);
}

.te-site-header__inner {
    display: grid;
    grid-template-columns: 205px minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1.25rem, 3vw, 3.25rem);
    min-height: 86px;
}

.te-site-header__brand {
    display: inline-flex;
    align-items: center;
    width: 192px;
    max-width: 100%;
    text-decoration: none;
}

.te-site-header__brand img {
    width: 100%;
    height: auto;
}

.te-site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1.05rem, 2.25vw, 2.25rem);
}

.te-site-nav a {
    position: relative;
    color: var(--te-color-navy-900);
    font-size: .95rem;
    font-weight: var(--te-font-weight-bold);
    text-decoration: none;
    white-space: nowrap;
}

.te-site-nav a::after {
    position: absolute;
    right: 0;
    bottom: -.45rem;
    left: 0;
    height: 2px;
    border-radius: var(--te-radius-pill);
    background: var(--te-primary);
    content: '';
    opacity: 0;
    transform: scaleX(.55);
    transition: opacity var(--te-transition-fast), transform var(--te-transition-fast);
}

.te-site-nav a:hover::after,
.te-site-nav a:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

.te-site-header__actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.te-site-header__actions .te-btn {
    min-width: 118px;
}

.te-site-header__actions .te-btn--primary {
    min-width: 152px;
}

.te-mobile-menu-button {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--te-border-default);
    border-radius: 50%;
    background: var(--te-color-white);
    color: var(--te-color-navy-900);
    box-shadow: var(--te-shadow-sm);
    cursor: pointer;
}

.te-mobile-menu-button__bars,
.te-mobile-menu-button__bars::before,
.te-mobile-menu-button__bars::after {
    display: block;
    width: 22px;
    height: 3px;
    margin-inline: auto;
    border-radius: 99px;
    background: currentColor;
    content: '';
    transition: transform var(--te-transition-fast), opacity var(--te-transition-fast);
}

.te-mobile-menu-button__bars {
    position: relative;
}

.te-mobile-menu-button__bars::before {
    position: absolute;
    top: -7px;
    left: 0;
}

.te-mobile-menu-button__bars::after {
    position: absolute;
    top: 7px;
    left: 0;
}

.te-mobile-menu-button[aria-expanded="true"] .te-mobile-menu-button__bars {
    background: transparent;
}

.te-mobile-menu-button[aria-expanded="true"] .te-mobile-menu-button__bars::before {
    top: 0;
    transform: rotate(45deg);
}

.te-mobile-menu-button[aria-expanded="true"] .te-mobile-menu-button__bars::after {
    top: 0;
    transform: rotate(-45deg);
}

.te-mobile-panel {
    display: none;
}

.te-home-hero {
    position: relative;
    isolation: isolate;
    min-height: 485px;
    padding: clamp(2rem, 3.5vw, 3.2rem) 0 1.75rem;
}

.te-home-hero::before,
.te-home-hero::after {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.te-home-hero::before {
    top: 6.4rem;
    left: max(-8rem, calc((100vw - var(--te-container)) / 2 - 9rem));
    width: 20rem;
    height: 20rem;
    background: rgba(145, 198, 255, .13);
}

.te-home-hero::after {
    top: 5rem;
    right: max(-4rem, calc((100vw - var(--te-container)) / 2 - 3rem));
    width: 10rem;
    height: 10rem;
    border: 22px solid rgba(255, 200, 61, .08);
}

.te-home-hero__grid {
    display: grid;
    grid-template-columns: minmax(350px, .84fr) minmax(520px, 1.16fr);
    align-items: center;
    gap: clamp(1rem, 3vw, 4rem);
}

.te-home-hero__visual {
    position: relative;
    align-self: end;
    min-height: 405px;
}

.te-home-hero__mascot {
    position: absolute;
    right: clamp(-1rem, 1vw, .4rem);
    bottom: -1.75rem;
    width: min(485px, 108%);
    max-height: 455px;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 18px 24px rgba(16, 42, 86, .08));
}

.te-home-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.te-home-hero__brand {
    width: min(595px, 100%);
    margin-inline: auto;
}

.te-home-hero__brand img {
    width: 100%;
    height: auto;
}

.te-home-hero__copy {
    width: min(675px, 100%);
    margin: .55rem auto 0;
    color: var(--te-color-navy-900);
    font-size: clamp(1.05rem, 1.55vw, 1.38rem);
    font-weight: var(--te-font-weight-medium);
    line-height: 1.48;
}

.te-home-hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: min(570px, 100%);
    margin-top: 1.45rem;
}

.te-home-hero__actions .te-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 54px;
    padding-inline: 1.5rem;
    font-size: 1rem;
}

.te-home-hero__actions .te-btn--primary {
    box-shadow: 0 13px 27px rgba(49, 84, 200, .23);
}

.te-home-hero__actions .te-btn--outline {
    border-width: 2px;
}

.te-home-hero__spark {
    position: absolute;
    z-index: 0;
    width: .7rem;
    height: .7rem;
    border: 3px solid currentColor;
    border-radius: 50%;
    color: var(--te-color-yellow-500);
    opacity: .92;
    pointer-events: none;
}

.te-home-hero__spark--one { top: 7.5rem; right: 5%; }
.te-home-hero__spark--two { top: 15.5rem; right: 1%; width: .42rem; height: .42rem; border-width: 0; background: var(--te-color-yellow-500); }
.te-home-hero__spark--three { top: 11.5rem; right: 8.5%; width: .4rem; height: .4rem; border-width: 0; background: #b6d5ff; }

.te-home-stage21-diagnostics {
    padding: 2.5rem 0 4rem;
    border-top: 1px solid var(--te-border-default);
    background: var(--te-bg-page);
}

.te-home-stage21-diagnostics__banner {
    margin-bottom: 1.4rem;
    padding: 1.45rem 1.6rem;
    border-radius: var(--te-radius-xl);
    background: var(--te-color-success-600);
    color: var(--te-color-white);
    box-shadow: var(--te-shadow-md);
}

.te-home-stage21-diagnostics__banner h2 {
    color: inherit;
    font-size: 1.45rem;
}

.te-home-stage21-diagnostics__banner p {
    margin-top: .25rem;
}

.te-home-stage21-diagnostics__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.te-stage-check {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: .85rem;
    padding: 1.1rem;
    border: 1px solid var(--te-border-default);
    border-radius: var(--te-radius-lg);
    background: var(--te-color-white);
    box-shadow: var(--te-shadow-sm);
}

.te-stage-check__icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: var(--te-color-success-500);
    color: #fff;
    font-weight: 800;
}

.te-stage-check--fail .te-stage-check__icon {
    background: var(--te-color-danger-500);
}

.te-stage-check h3 {
    font-size: 1rem;
}

.te-stage-check p {
    margin-top: .2rem;
    color: var(--te-text-muted);
    font-size: .875rem;
}

.te-home-stage21-diagnostics__note {
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    border-radius: var(--te-radius-lg);
    background: var(--te-color-blue-100);
    color: var(--te-color-navy-900);
}

@media (max-width: 1080px) {
    .te-site-header__inner {
        grid-template-columns: 176px minmax(0, 1fr) auto;
        gap: 1.25rem;
    }

    .te-site-header__brand { width: 168px; }
    .te-site-nav { gap: 1rem; }
    .te-site-nav a { font-size: .875rem; }
    .te-site-header__actions .te-btn { min-width: 102px; }
    .te-site-header__actions .te-btn--primary { min-width: 128px; }

    .te-home-hero__grid {
        grid-template-columns: minmax(300px, .78fr) minmax(440px, 1.22fr);
        gap: 1rem;
    }

    .te-home-hero__visual { min-height: 370px; }
    .te-home-hero__mascot { width: min(390px, 100%); }
}

@media (max-width: 900px) {
    .te-site-header__inner {
        grid-template-columns: 1fr auto;
        min-height: 74px;
    }

    .te-site-header__brand { width: 166px; }
    .te-site-nav,
    .te-site-header__actions { display: none; }
    .te-mobile-menu-button { display: inline-grid; place-items: center; }

    .te-mobile-panel {
        position: absolute;
        top: 100%;
        right: var(--te-gutter);
        left: var(--te-gutter);
        display: grid;
        max-height: 0;
        overflow: hidden;
        border: 0 solid var(--te-border-default);
        border-radius: 0 0 var(--te-radius-xl) var(--te-radius-xl);
        background: rgba(255, 255, 255, .985);
        box-shadow: none;
        opacity: 0;
        transform: translateY(-8px);
        transition: max-height var(--te-transition-base), opacity var(--te-transition-fast), transform var(--te-transition-fast), padding var(--te-transition-base);
    }

    .te-mobile-panel.is-open {
        max-height: 620px;
        padding: 1rem;
        border-width: 1px;
        box-shadow: var(--te-shadow-lg);
        opacity: 1;
        transform: translateY(0);
    }

    .te-mobile-panel nav {
        display: grid;
        gap: .25rem;
    }

    .te-mobile-panel nav a {
        padding: .8rem 1rem;
        border-radius: var(--te-radius-md);
        color: var(--te-color-navy-900);
        font-weight: var(--te-font-weight-semibold);
        text-decoration: none;
    }

    .te-mobile-panel nav a:hover { background: var(--te-color-blue-100); }

    .te-mobile-panel__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
        margin-top: .75rem;
        padding-top: .9rem;
        border-top: 1px solid var(--te-border-default);
    }

    .te-home-hero {
        min-height: auto;
        padding-top: 2.25rem;
    }

    .te-home-hero__grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .te-home-hero__visual {
        order: 2;
        min-height: 360px;
        margin-top: .75rem;
    }

    .te-home-hero__mascot {
        right: 50%;
        bottom: -1.75rem;
        width: min(420px, 86vw);
        transform: translateX(50%);
    }

    .te-home-hero__content { order: 1; }
    .te-home-hero__brand { width: min(560px, 88vw); }
    .te-home-hero__copy { width: min(630px, 92vw); }
}

@media (max-width: 620px) {
    .te-site-header__inner { min-height: 68px; }
    .te-site-header__brand { width: 148px; }
    .te-mobile-menu-button { width: 44px; height: 44px; }

    .te-home-hero {
        padding-top: 1.65rem;
    }

    .te-home-hero::before {
        top: 18rem;
        left: -8rem;
        width: 17rem;
        height: 17rem;
    }

    .te-home-hero__brand { width: min(500px, 94vw); }
    .te-home-hero__copy {
        margin-top: .75rem;
        font-size: 1rem;
    }

    .te-home-hero__actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: .75rem;
        width: min(390px, 92vw);
        margin-top: 1.15rem;
    }

    .te-home-hero__visual {
        min-height: 330px;
        margin-top: .35rem;
    }

    .te-home-hero__mascot {
        width: min(360px, 92vw);
    }

    .te-home-hero__spark--one { top: 5rem; right: 4%; }
    .te-home-hero__spark--two { top: 9rem; right: 2%; }
    .te-home-hero__spark--three { display: none; }

    .te-mobile-panel__actions { grid-template-columns: 1fr; }

    .te-home-stage21-diagnostics__grid {
        grid-template-columns: 1fr;
    }
}
