:root { --brand-hover: #006CD0; }
.dark { --brand-hover: #2596ff; }

:focus { outline: none; }
:focus-visible { outline: 2px solid #006CD0; outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible { outline-color: #00f3ff; }

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.loading { overflow: hidden; }

#site-loader {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    transition: opacity 350ms ease;
}
.dark #site-loader { background-color: #071d33; }
#site-loader.is-hidden { opacity: 0; pointer-events: none; }

.site-loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.logo-sweep {
    position: relative;
    width: 250px;
    max-width: 80%;
    height: 40px;
    line-height: 0;
}
.logo-sweep > div {
    position: absolute;
    inset: 0;
    -webkit-mask: url(../imgs/atualstudio_logo.svg) center / contain no-repeat;
            mask: url(../imgs/atualstudio_logo.svg) center / contain no-repeat;
}
.logo-sweep__base {
    background-color: rgba(0, 0, 0, 0.15);
}
.logo-sweep__hi {
    background-image: linear-gradient(
        100deg,
        transparent 30%,
        rgba(0, 0, 0, 0.30) 42%,
        rgba(0, 0, 0, 0.70) 50%,
        rgba(0, 0, 0, 0.30) 58%,
        transparent 70%
    );
    background-size: 250% 100%;
    background-repeat: no-repeat;
    background-position: 120% 0;
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.15));
    animation: logo-sweep 1.3s linear infinite;
}
.dark .logo-sweep__base {
    background-color: rgba(255, 255, 255, 0.15);
}
.dark .logo-sweep__hi {
    background-image: linear-gradient(
        100deg,
        transparent 30%,
        rgba(255, 255, 255, 0.30) 42%,
        rgba(255, 255, 255, 0.70) 50%,
        rgba(255, 255, 255, 0.30) 58%,
        transparent 70%
    );
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}
@keyframes logo-sweep {
    from { background-position: 120% 0; }
    to   { background-position: -20% 0; }
}

#immersive-stage { height: 225vh; }

@supports (height: 100dvh) {
    #stage-pin { height: 100dvh; }
}

#about-section.about-panning { align-items: flex-start; }

.no-js #immersive-stage { height: auto !important; }
.no-js #immersive-stage > div {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
}
.no-js #hero-section,
.no-js #about-section {
    position: static !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
}
.no-js #about-card { transform: none !important; }
.no-js #hero-subtitle,
.no-js #hero-cta { opacity: 1 !important; transform: none !important; }
.no-js .reveal,
.no-js .about-anim-item { opacity: 1 !important; transform: none !important; }
.no-js .typing-cursor::after { display: none !important; }
.no-js #three-canvas,
.no-js #white-flash,
.no-js #site-loader { display: none !important; }
.no-js body.loading { overflow: visible !important; }

.glass-header {
    background: transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.dark .glass-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.glass-header.scrolled {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px -2px rgba(0,0,0,0.05);
}
.dark .glass-header.scrolled {
    background: rgba(9, 9, 11, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 20px -2px rgba(0,0,0,0.5);
}

.typing-cursor::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: currentColor;
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 1s step-start infinite;
    transition: opacity 0.3s ease-out;
}

.typing-cursor.typing-done::after { opacity: 0; animation: none; }
@keyframes blink { 50% { opacity: 0; } }

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.dark ::-webkit-scrollbar-thumb { background: #334155; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#mobile-menu-btn span {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease;
}
#mobile-menu-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#mobile-menu-btn.open span:nth-child(2) { opacity: 0; transform: scale(0); }
#mobile-menu-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.faq-answer {
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}
.faq-icon { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

.will-change-transform { will-change: transform, opacity; }

.no-canyon #immersive-stage { height: auto !important; }

.no-canyon #immersive-stage > div:not(#canyon-static) {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
}
.no-canyon #hero-section {

    position: relative !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
}
.no-canyon #about-section {
    position: static !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
}

.no-canyon .about-anim-item { opacity: 1 !important; transform: none !important; }

.no-canyon #about-card { transform: none !important; }
.no-canyon #three-canvas,
.no-canyon #white-flash { display: none !important; }

.no-canyon #hero-wash { display: none !important; }

.no-canyon #hero-section { min-height: 100vh !important; }

.canyon-static {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    display: none;
}
.no-canyon .canyon-static { display: block; }

.canyon-static img { width: 100%; height: 100%; display: block; object-fit: cover; position: absolute; inset: 0; }

.no-canyon #hero-section { padding-top: 9rem !important; }
@media (min-width: 1024px) {
    .no-canyon #hero-section { padding-top: 15rem !important; }
}

.hero-shadow { filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.9)); }
.dark .hero-shadow { filter: drop-shadow(0 0 7px #071d33); }

#timeline-progress-line {
    background-color: #006CD0;
    height: 0;
    transition: height 0.12s linear;
}
.timeline-step-circle { transition: border-color 0.4s ease, color 0.4s ease; }
.timeline-step-circle.is-active {
    border-color: #006CD0 !important;
    color: #006CD0 !important;
}

.dark #timeline-progress-line {
    background-color: #2596ff !important;
}

.dark .timeline-step-circle.is-active {
    border-color: #2596ff !important;
    color: #2596ff !important;
}

.privacy-notice {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    margin-left: auto;
    max-width: 380px;
    z-index: 50;
    padding: 20px;
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.20);
    font-size: 0.875rem;
    line-height: 1.55;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 350ms ease, transform 350ms ease;
    background: #071d33;
    color: #cbd5e1;
}
.dark .privacy-notice {
    background: #fafafa;
    color: #475569;
}
.privacy-notice.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (max-width: 520px) {
    .privacy-notice.is-visible {
        left: 50%;
        right: auto;
        margin-left: 0;
        transform: translateX(-50%) !important;
        width: 90%;
    }
}
.privacy-notice__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}
.dark .privacy-notice__title { color: #0f172a; }
.privacy-notice__icon {
    width: 16px;
    height: 16px;
    color: #00f3ff;
    flex-shrink: 0;
}
.dark .privacy-notice__icon { color: #006CD0; }
.privacy-notice__text {
    margin-bottom: 14px;
}
.privacy-notice__text a {
    color: #00f3ff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.dark .privacy-notice__text a { color: #006CD0; }
.privacy-notice__text a:hover { text-decoration-thickness: 2px; }
.privacy-notice__btn {
    background-color: #006CD0;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    padding: 10px 22px;
    border-radius: 999px;
    transition: transform 200ms ease, background-color 200ms ease;
    cursor: pointer;
}
.privacy-notice__btn:hover {
    transform: scale(1.03);
    background-color: #2596ff;
}

.history-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 450ms cubic-bezier(0.16, 1, 0.3, 1);
}
.history-modal[hidden] { display: none; }
.history-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.history-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(250, 250, 250, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
}
.dark .history-modal__backdrop {
    background: rgba(5, 5, 7, 0.97);
}

.history-modal__content {
    position: relative;
    height: 100%;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), opacity 500ms ease;
}
.history-modal.is-open .history-modal__content {
    transform: translateY(0);
    opacity: 1;
}

.history-modal__content::-webkit-scrollbar { width: 6px; }
.history-modal__content::-webkit-scrollbar-track { background: transparent; }
.history-modal__content::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.18);
    border-radius: 10px;
}
.dark .history-modal__content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
}

.history-modal__close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 95;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    background: transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #0f172a;
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55),
                background-color 250ms ease,
                color 250ms ease,
                border-color 250ms ease;
}
.history-modal__close svg { width: 22px; height: 22px; }
.history-modal__close:hover {
    transform: rotate(90deg) scale(1.08);
    background: #006CD0;
    border-color: #006CD0;
    color: #ffffff;
}
.dark .history-modal__close {
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.dark .history-modal__close:hover {
    background: #2596ff;
    border-color: #2596ff;
    color: #050505;
}

#history-progress-line {
    background-color: #006CD0;
    height: 0;
    transition: height 0.12s linear;
}
.dark #history-progress-line { background-color: #2596ff; }

.history-anim {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.history-anim.active {
    opacity: 1;
    transform: translateY(0);
}

.history-card__photo {
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.35);
}
.dark .history-card__photo {
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.7);
}
