@font-face {
    font-family: 'Montserrat';
    src: url('assets/fontes/fonte-montserrat.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #ffffff;
    --bg-soft: #ffffff;
    --intro-bg: #ffffff;
    --intro-video-scale: 1;

    --text-dark: #111111;
    --text-muted: #343434;

    --btn-orange-bg: #fc9f3b;

    --font-main: 'Montserrat', Arial, sans-serif;

    --app-mobile-width: 430px;
    --app-mobile-height-limit: 932px;

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);

    --app-height: 100vh;
}

@supports (height: 100dvh) {
    :root {
        --app-height: 100dvh;
    }
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    width: 100%;
    min-width: 320px;
    min-height: 100%;
    background-color: var(--bg-color);
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    min-height: var(--app-height);
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
}

button,
input,
textarea,
select {
    font: inherit;
}

img,
video,
svg {
    display: block;
    max-width: 100%;
}

button {
    border: 0;
    background: none;
}

.noscript-message {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.8rem;
    padding:
        calc(2rem + var(--safe-top))
        calc(2rem + var(--safe-right))
        calc(2rem + var(--safe-bottom))
        calc(2rem + var(--safe-left));
    text-align: center;
    background-color: var(--bg-color);
    color: var(--text-dark);
}

.noscript-message strong {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    font-weight: 900;
}

.noscript-message p {
    max-width: 28rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.app-container {
    width: 100%;
    max-width: var(--app-mobile-width);
    min-height: 100vh;
    min-height: 100svh;
    min-height: var(--app-height);
    height: 100vh;
    height: 100svh;
    height: var(--app-height);
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: none;
    transition:
        opacity 1s cubic-bezier(0.25, 1, 0.5, 1),
        transform 1s cubic-bezier(0.25, 1, 0.5, 1),
        filter 1s ease,
        height 0.2s ease;
}

.app-container.app-fade-out {
    opacity: 0;
    transform: scale(1.02);
    filter: blur(3px);
}

.screen {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    min-height: var(--app-height);
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
}

.splash-screen {
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding:
        calc(1.5rem + var(--safe-top))
        calc(1.25rem + var(--safe-right))
        calc(1.5rem + var(--safe-bottom))
        calc(1.25rem + var(--safe-left));
    background:
        radial-gradient(circle at center, #ffffff 0%, #f7f9fa 100%);
}

.splash-content {
    width: min(100%, 32rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-splash {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 0.95;
    margin-bottom: clamp(1.3rem, 4vh, 1.8rem);
    animation: studioCameraBreathe 8s ease-out forwards;
    user-select: none;
}

.word-decida {
    font-size: clamp(3.05rem, 15vw, 4.8rem);
    font-weight: 900;
    font-style: italic;
    color: #ffffff;
    text-shadow:
        -1.5px -1.5px 0 var(--text-dark),
        0 -1.5px 0 var(--text-dark),
        1.5px -1.5px 0 var(--text-dark),
        1.5px 0 0 var(--text-dark),
        1.5px 1.5px 0 var(--text-dark),
        0 1.5px 0 var(--text-dark),
        -1.5px 1.5px 0 var(--text-dark),
        -1.5px 0 0 var(--text-dark),
        3px 3px 0 var(--text-dark),
        4px 4px 0 var(--text-dark);
    letter-spacing: clamp(0.02rem, 0.28vw, 0.08rem);
    opacity: 0;
    margin-bottom: clamp(-0.45rem, -1vw, -0.2rem);
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.06));
    animation: cinematicRevealTop 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity, filter;
}

.word-agora {
    font-size: clamp(3.35rem, 16.5vw, 5.35rem);
    font-weight: 900;
    font-style: italic;
    color: var(--text-dark);
    letter-spacing: clamp(-0.16rem, -0.6vw, -0.06rem);
    opacity: 0;
    text-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
    animation: cinematicRevealBottom 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.12s;
    will-change: transform, opacity, filter;
}

.splash-bar {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--btn-orange-bg), transparent);
    margin: 0 auto clamp(1.6rem, 4vh, 2.2rem);
    opacity: 0;
    box-shadow: 0 0 12px rgba(252, 159, 59, 0.4);
    animation: orangeDividerPremium 2.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 1s;
    will-change: width, opacity, filter;
}

.splash-subtitle {
    max-width: 25rem;
    color: var(--text-dark);
    font-size: clamp(0.92rem, 3.4vw, 1.08rem);
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
    opacity: 0;
    padding: 0 0.5rem;
    animation: fadeUpSmooth 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 1.5s;
    will-change: transform, opacity, filter;
}

.video-intro-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    min-width: 320px;
    height: 100vh;
    height: 100svh;
    height: var(--app-height);
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    transition:
        opacity 0.45s ease,
        visibility 0.45s ease;
    overflow: hidden;
}

.video-intro-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.18s ease;
}

.video-intro-container.intro-whiteout::after {
    opacity: 1;
}

.video-intro-container video {
    width: 100%;
    max-width: var(--app-mobile-width);
    height: 100vh;
    height: 100svh;
    height: var(--app-height);
    max-height: none;
    object-fit: cover;
    object-position: center;
    background-color: #ffffff;
    opacity: 1;
    border: 0;
    outline: 0;
    backface-visibility: hidden;
    transform: translateZ(0) scale(var(--intro-video-scale));
}

.video-intro-container video::-webkit-media-controls,
.video-intro-container video::-webkit-media-controls-enclosure,
.video-intro-container video::-webkit-media-controls-panel,
.video-intro-container video::-webkit-media-controls-play-button,
.video-intro-container video::-webkit-media-controls-start-playback-button {
    display: none !important;
    opacity: 0 !important;
}

.video-hidden {
    opacity: 0 !important;
}

#studioVideo {
    transition: opacity 0.25s ease;
}

.hidden {
    display: none !important;
}

.intro-fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 360px) {
    .word-decida {
        font-size: clamp(2.65rem, 14vw, 3.4rem);
    }

    .word-agora {
        font-size: clamp(2.95rem, 15vw, 3.8rem);
    }

    .splash-subtitle {
        font-size: 0.86rem;
    }
}

@media (max-height: 520px) {
    .splash-screen {
        padding:
            calc(0.8rem + var(--safe-top))
            calc(1rem + var(--safe-right))
            calc(0.8rem + var(--safe-bottom))
            calc(1rem + var(--safe-left));
    }

    .logo-splash {
        margin-bottom: 1rem;
        transform: scale(0.9);
    }

    .splash-bar {
        margin-bottom: 1.1rem;
    }

    .splash-subtitle {
        font-size: 0.86rem;
        line-height: 1.4;
    }
}

/* Moldura de preview apenas para desktop real */
@media (min-width: 700px) and (hover: hover) and (pointer: fine) {
    body {
        padding: 1.5rem;
        background-color: var(--bg-soft);
    }

    .app-container {
        width: min(100%, var(--app-mobile-width));
        min-height: auto;
        height: min(var(--app-mobile-height-limit), calc(100dvh - 3rem));
        border-radius: 2rem;
        box-shadow:
            0 14px 38px rgba(0, 0, 0, 0.045),
            0 0 0 1px rgba(0, 0, 0, 0.012);
    }

    .splash-screen {
        border-radius: inherit;
    }

    .video-intro-container {
        padding: 1.5rem;
        background-color: var(--bg-soft);
    }

    .video-intro-container video {
        width: min(100%, var(--app-mobile-width));
        height: min(var(--app-mobile-height-limit), calc(100dvh - 3rem));
        border-radius: 2rem;
        box-shadow:
            0 14px 38px rgba(0, 0, 0, 0.045),
            0 0 0 1px rgba(0, 0, 0, 0.012);
    }
}

/* App instalado / Capacitor / WebView Android */
.runtime-app {
    --intro-video-scale: 0.965;
}

.runtime-app body {
    padding: 0;
    background-color: var(--bg-color);
    align-items: stretch;
}

.runtime-app .app-container,
.runtime-app .video-intro-container video {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100svh;
    min-height: var(--app-height);
    height: 100vh;
    height: 100svh;
    height: var(--app-height);
    border-radius: 0;
    box-shadow: none;
}

.runtime-app .video-intro-container {
    padding: 0;
    background-color: var(--bg-color);
}

.runtime-app .splash-screen {
    border-radius: 0;
}

/* PWA instalado no navegador */
@media (display-mode: standalone) {
    :root {
        --intro-video-scale: 0.965;
    }

    body {
        padding: 0;
        background-color: var(--bg-color);
        align-items: stretch;
    }

    .app-container,
    .video-intro-container video {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        min-height: 100svh;
        min-height: var(--app-height);
        height: 100vh;
        height: 100svh;
        height: var(--app-height);
        border-radius: 0;
        box-shadow: none;
    }

    .splash-screen {
        border-radius: 0;
    }

    .video-intro-container {
        padding: 0;
        background-color: var(--bg-color);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .word-decida,
    .word-agora,
    .splash-subtitle {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .splash-bar {
        width: 60px;
        opacity: 0.45;
        filter: none;
    }

    .app-container.app-fade-out,
    .intro-fade-out {
        opacity: 0;
        transform: none;
        filter: none;
    }
}

@keyframes studioCameraBreathe {
    0% {
        transform: scale(1.06);
    }

    30% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.02);
    }
}

@keyframes cinematicRevealTop {
    0% {
        opacity: 0;
        filter: blur(12px) drop-shadow(0 0 0 rgba(0, 0, 0, 0));
        transform: translateY(-30px) scale(1.05);
        letter-spacing: 0.7rem;
    }

    40% {
        opacity: 1;
        filter: blur(0) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.03));
    }

    100% {
        opacity: 1;
        filter: blur(0) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.06));
        transform: translateY(0) scale(1);
    }
}

@keyframes cinematicRevealBottom {
    0% {
        opacity: 0;
        filter: blur(12px);
        transform: translateY(30px) scale(1.05);
        letter-spacing: 0.5rem;
    }

    40% {
        opacity: 1;
        filter: blur(0);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1);
    }
}

@keyframes orangeDividerPremium {
    0% {
        width: 0;
        opacity: 0;
        filter: blur(2px);
    }

    40% {
        width: min(220px, 70vw);
        opacity: 0.85;
        filter: blur(0);
    }

    70% {
        width: min(180px, 58vw);
        opacity: 0.8;
    }

    100% {
        width: 60px;
        opacity: 0;
    }
}

@keyframes fadeUpSmooth {
    0% {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}