/* ==========================================================================
   DOUBLER GROWTH — CAKTO-INSPIRED MODERN SAAS DESIGN SYSTEM
   Paleta Doubler Growth (#09090b, #111018, #6b21a8, #a855f7, #f3e8ff)
   Tipografia: Plus Jakarta Sans + Inter (sans-serif editorial limpa)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
    --dg-bg: #07070a;
    --dg-surface: #0f0e16;
    --dg-surface-elevated: #161422;
    --dg-accent: #7c3aed;
    --dg-accent-deep: #6b21a8;
    --dg-accent-bright: #a855f7;
    --dg-border: rgba(255, 255, 255, 0.08);
    --dg-border-hover: rgba(168, 85, 247, 0.38);
}

html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #09090b;
    color: #f8fafc;
    overflow-x: hidden;
}

body {
    background-color: #09090b;
    background-image:
        radial-gradient(ellipse 65% 45% at 18% 12%, rgba(107, 33, 168, 0.32), transparent 70%),
        radial-gradient(ellipse 55% 45% at 86% 48%, rgba(88, 28, 135, 0.24), transparent 70%),
        radial-gradient(ellipse 65% 50% at 28% 88%, rgba(124, 58, 237, 0.20), transparent 70%);
    background-attachment: fixed;
    overflow-x: hidden;
}

h1, h2, h3, h4, .dg-display {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

p, li {
    text-wrap: pretty;
}

.font-mono {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 300;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* Scrollbar discreta */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.3) transparent;
}
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background-color: rgba(168, 85, 247, 0.3); border-radius: 9999px; }

/* Navbar flutuante estilo Cakto com transição refinada no scroll */
.dg-floating-nav {
    background: rgba(15, 14, 22, 0.68);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.65);
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.dg-floating-nav.is-scrolled {
    background: rgba(10, 9, 16, 0.88);
    border-color: rgba(168, 85, 247, 0.24);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.85), 0 0 28px -14px rgba(168, 85, 247, 0.45);
}

/* Botão primário vibrante com reflexo especular elegante */
.dg-btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #7c3aed 0%, #6b21a8 100%);
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.42), 0 10px 28px -8px rgba(124, 58, 237, 0.65);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, filter 0.25s ease;
}

.dg-btn-primary::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -130%;
    width: 65%;
    height: 140%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 35%,
        rgba(255, 255, 255, 0.26) 50%,
        rgba(255, 255, 255, 0.04) 65%,
        transparent 100%
    );
    transform: skewX(-22deg);
    pointer-events: none;
    animation: dgLuxurySheen 7s cubic-bezier(0.19, 1, 0.22, 1) infinite;
}

.dg-btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.09);
    box-shadow: 0 0 0 1px rgba(216, 180, 254, 0.68), 0 16px 38px -8px rgba(124, 58, 237, 0.85);
}

@keyframes dgLuxurySheen {
    0%, 72% { left: -130%; }
    100% { left: 165%; }
}

/* Cards Bento escuros com filete de luz superior e brilho sutil */
.dg-bento {
    background: linear-gradient(180deg, rgba(46, 16, 101, 0.22) 0%, rgba(15, 14, 22, 0.66) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(168, 85, 247, 0.15);
    box-shadow: inset 0 1px 0 0 rgba(216, 180, 254, 0.14), 0 18px 42px -24px rgba(0, 0, 0, 0.75);
    transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.dg-bento:hover {
    border-color: var(--dg-border-hover);
    box-shadow: inset 0 1px 0 0 rgba(233, 213, 255, 0.28), 0 24px 52px -20px rgba(107, 33, 168, 0.42);
    transform: translateY(-3px);
}

/* Subpáginas compatibilidade */
.dg-header {
    background: rgba(9, 9, 11, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dg-hero-surface {
    background-color: #09090b;
    background-image:
        radial-gradient(ellipse 70% 55% at 15% 10%, rgba(107, 33, 168, 0.34), transparent 70%),
        radial-gradient(ellipse 60% 50% at 88% 82%, rgba(46, 16, 101, 0.42), transparent 70%);
}

.dg-card {
    background-color: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

/* Ecossistema Tabs */
.dg-eco-node {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.dg-eco-node:hover {
    border-color: rgba(168, 85, 247, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.dg-eco-node.is-highlighted {
    border-color: rgba(168, 85, 247, 0.75);
    background: rgba(124, 58, 237, 0.16);
    box-shadow: 0 0 24px -8px rgba(168, 85, 247, 0.5);
}

/* Stepper do método & Explorador de Soluções (Pílulas horizontais no mobile, lista vertical no desktop) */
.dg-step-track {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.dg-step-track::-webkit-scrollbar {
    display: none;
}

.dg-step-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 9999px;
    color: #94a3b8;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.dg-step-btn:hover {
    color: #ffffff;
}

.dg-step-btn.is-active {
    border-color: rgba(168, 85, 247, 0.65);
    background: rgba(124, 58, 237, 0.22);
    color: #ffffff;
}

@media (min-width: 1024px) {
    .dg-step-btn {
        display: block;
        justify-content: flex-start;
        border: 0;
        border-left: 2px solid rgba(255, 255, 255, 0.1);
        background: transparent;
        border-radius: 0;
        white-space: normal;
    }
    .dg-step-btn.is-active {
        border-left-color: #a855f7;
        background: transparent;
        padding-left: 1.25rem;
    }
}

/* Scroll reveal editorial (progressive enhancement seguro com .js-ready) */
.js-ready .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Palavras animadas com foco óptico */
.dg-word {
    display: inline-block;
    will-change: transform, opacity, filter;
}

/* Linhas divisórias interativas sutis */
.divide-y > div {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.28s ease;
}

@media (pointer: fine) {
    .divide-y > div:hover {
        transform: translateX(4px);
    }
}

/* Respiração imperceptível da aura nos banners CTA */
@keyframes dgAuraBreathe {
    0%, 100% { transform: scale(1); opacity: 0.52; }
    50% { transform: scale(1.07); opacity: 0.66; }
}

img[src*="aura-diagonal"] {
    animation: dgAuraBreathe 11s ease-in-out infinite;
    will-change: transform, opacity;
}

/* Pulso sutil no ponto luminoso do badge principal */
@keyframes dgDotGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.65); }
    50% { box-shadow: 0 0 0 6px rgba(168, 85, 247, 0); }
}

.bg-growth-500.rounded-full {
    animation: dgDotGlow 2.8s ease-in-out infinite;
}

/* Animação sutil para composição abstrata do Hero */
@keyframes dgFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

@keyframes dgPulseRing {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.04); }
}

@keyframes dgDataFlow {
    to { stroke-dashoffset: -36; }
}

.dg-hero-float {
    animation: dgFloat 7s ease-in-out infinite;
}

.dg-pulse-ring {
    transform-origin: center;
    animation: dgPulseRing 5s ease-in-out infinite;
}

.dg-data-line {
    stroke-dasharray: 6 6;
    animation: dgDataFlow 2.2s linear infinite;
}

/* Film grain sutil estilo editorial */
.dg-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 60;
    opacity: 0.032;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 3D Tilt & Spotlight nos cards */
.dg-bento {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
}

.dg-bento::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(168, 85, 247, 0.14), transparent 70%);
}

.dg-bento:hover::after {
    opacity: 1;
}

/* Barra de progresso de scroll */
.dg-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #6b21a8, #a855f7, #e9d5ff);
    z-index: 80;
}

/* WebGL 3D Full-Viewport Canvas */
#dg-webgl {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100lvh;
    z-index: 0;
    pointer-events: none;
}

section, footer {
    position: relative;
    z-index: 10;
}

/* Máscara para tipografia cinética */
.dg-mask {
    overflow: hidden;
    display: inline-block;
    vertical-align: bottom;
}

.dg-mask-inner {
    display: inline-block;
    will-change: transform, opacity;
}

/* Overlay de Menu Mobile com Iris Circular (100% opaco, sem vazamento de fundo) */
.dg-index-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: #07070a;
    background-image: radial-gradient(circle at 50% 25%, #2b0f5c 0%, #07070a 62%);
    clip-path: circle(0% at calc(100% - 42px) 34px);
    transition: clip-path 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    pointer-events: none;
}

.dg-index-overlay.is-open {
    clip-path: circle(150% at calc(100% - 42px) 34px);
    pointer-events: auto;
}

.dg-menu-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Destaque visual e animação para imagens */
.dg-media-frame {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    border: 1px solid rgba(168, 85, 247, 0.28);
    box-shadow: 0 24px 60px -18px rgba(107, 33, 168, 0.42);
    will-change: transform, clip-path;
}

.dg-media-frame img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.dg-media-frame:hover img {
    transform: scale(1.05);
}

/* Tratamento arquitetônico noturno/violeta para integrar fotos externas ao tema escuro */
.dg-arch-media {
    position: relative;
    overflow: hidden;
    background: #0d0b15;
}

.dg-arch-media img {
    object-position: center 22%;
    filter: saturate(0.28) contrast(1.14) brightness(0.74);
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.dg-bento:hover .dg-arch-media img,
.dg-arch-media:hover img {
    transform: scale(1.04);
    filter: saturate(0.45) contrast(1.12) brightness(0.84);
}

.dg-arch-media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.48) 0%, rgba(15, 14, 22, 0.35) 100%);
    mix-blend-mode: color;
    pointer-events: none;
    z-index: 1;
}
