/* =============================================================================
 * SafeStack — Design System PREMIUM v4.0
 * Referências: Stripe · Linear · Vercel · Raycast · Clerk · Framer
 * Cor primária: #6D5EF9 · Secundária: #22D3EE · BG: #050816
 * Glassmorphism · Aurora · Mouse Glow · Animated Grid · Bento Layout
 * Fontes: Inter + JetBrains Mono — carregadas via seo.php
 * ============================================================================= */

/* ---------- CSS VARIABLES (BRAND TOKENS) ---------- */
:root {
    /* Brand Colors */
    --brand-primary:    #6D5EF9;
    --brand-hover:      #7E70FF;
    --brand-secondary:  #22D3EE;
    --brand-accent:     #8B5CF6;
    --brand-success:    #22C55E;
    --brand-warning:    #F59E0B;
    --brand-danger:     #EF4444;

    /* Brand Gradient */
    --gradient-brand:     linear-gradient(135deg, #6D5EF9 0%, #22D3EE 100%);
    --gradient-brand-alt: linear-gradient(135deg, #8B5CF6 0%, #6D5EF9 60%, #22D3EE 100%);
    --gradient-text:      linear-gradient(135deg, #a78bfa 0%, #6D5EF9 40%, #22D3EE 100%);
    --gradient-aurora-l:  radial-gradient(ellipse at 20% 50%, rgba(109,94,249,.18) 0%, transparent 65%);
    --gradient-aurora-c:  radial-gradient(ellipse at 50% 0%, rgba(139,92,246,.12) 0%, transparent 60%);
    --gradient-aurora-r:  radial-gradient(ellipse at 80% 50%, rgba(34,211,238,.10) 0%, transparent 60%);

    /* Backgrounds */
    --bg-main:     #050816;
    --bg-secondary:#0B1120;
    --bg-surface:  #121826;
    --bg-glass:    rgba(255,255,255,.05);
    --bg-glass-md: rgba(255,255,255,.08);

    /* Text */
    --text-primary:   #FFFFFF;
    --text-secondary: #CBD5E1;
    --text-muted:     #94A3B8;
    --text-faint:     #475569;

    /* Borders */
    --border-glass:  rgba(255,255,255,.08);
    --border-subtle: rgba(255,255,255,.06);
    --border-glow:   rgba(109,94,249,.4);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Radius Scale (XS=8 SM=12 MD=18 LG=24 XL=32 XXL=42) */
    --r-xs:  8px;
    --r-sm:  12px;
    --r-md:  18px;
    --r-lg:  24px;
    --r-xl:  32px;
    --r-2xl: 42px;

    /* Shadows */
    --shadow-sm:    0 2px 8px rgba(0,0,0,.2);
    --shadow-md:    0 10px 30px rgba(0,0,0,.25);
    --shadow-lg:    0 25px 80px rgba(0,0,0,.35);
    --shadow-glow:  0 0 60px rgba(109,94,249,.35);
    --shadow-glow-sm: 0 0 20px rgba(109,94,249,.25);

    /* Transitions */
    --t-fast:   150ms cubic-bezier(.16,1,.3,1);
    --t-base:   250ms cubic-bezier(.16,1,.3,1);
    --t-slow:   450ms cubic-bezier(.16,1,.3,1);

    /* Spacing Scale */
    --sp-4:   4px;
    --sp-8:   8px;
    --sp-16: 16px;
    --sp-24: 24px;
    --sp-32: 32px;
    --sp-48: 48px;
    --sp-64: 64px;
    --sp-80: 80px;
    --sp-120:120px;
    --sp-160:160px;
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg-main);
    color: var(--text-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0; padding: 0;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }

/* ---------- NAVBAR ---------- */
.navbar {
    background: rgba(5,8,22,.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: .875rem 0;
    transition: all var(--t-base);
}
.navbar.navbar-scrolled {
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    border-bottom-color: rgba(109,94,249,.2);
}
.navbar .navbar-brand {
    font-weight: 700; font-size: 1.2rem; color: #fff;
    display: flex; align-items: center; gap: 8px;
}
.navbar .nav-link {
    font-size: .9rem; font-weight: 500; color: var(--text-muted);
    padding: .5rem 1rem; transition: color var(--t-fast);
}
.navbar .nav-link:hover { color: #fff; }
.nav-btn {
    display: inline-flex; align-items: center;
    background: var(--brand-primary); color: #fff !important;
    border: none; padding: .5rem 1.25rem; border-radius: var(--r-sm);
    font-weight: 600; font-size: .875rem;
    transition: all var(--t-fast);
    box-shadow: 0 0 0 1px rgba(255,255,255,.1) inset;
}
.nav-btn:hover {
    background: var(--brand-hover);
    box-shadow: var(--shadow-glow-sm), 0 0 0 1px rgba(255,255,255,.15) inset;
    transform: translateY(-1px);
}

/* ---------- TYPOGRAPHY ---------- */
.lp-h1 {
    font-size: clamp(3rem, 5vw, 4.75rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.0;
    color: var(--text-primary);
}
.lp-h2 {
    font-size: clamp(2.2rem, 3.5vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--text-primary);
}
.lp-h3 {
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-primary);
}
.lp-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-muted);
}
.lp-mono { font-family: var(--font-mono); }

.text-brand-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

/* ---------- SECTION LAYOUT ---------- */
.lp-section {
    padding: var(--sp-120) 0;
    position: relative;
}
.lp-section-lg {
    padding: var(--sp-160) 0;
    position: relative;
}
.lp-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    width: 100%;
}
.lp-container-md {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    width: 100%;
}

/* ---------- BACKGROUND ELEMENTS ---------- */
.aurora-layer {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.aurora-layer::before {
    content: '';
    position: absolute;
    top: -30%;  left: -10%;
    width: 70%; height: 80%;
    background: radial-gradient(ellipse, rgba(109,94,249,.22) 0%, transparent 70%);
    filter: blur(80px);
    animation: auroraFloat 12s ease-in-out infinite alternate;
}
.aurora-layer::after {
    content: '';
    position: absolute;
    top: -20%; right: -10%;
    width: 60%; height: 70%;
    background: radial-gradient(ellipse, rgba(34,211,238,.12) 0%, transparent 70%);
    filter: blur(100px);
    animation: auroraFloat 16s ease-in-out infinite alternate-reverse;
}
@keyframes auroraFloat {
    0%   { transform: translate(0,0) scale(1); }
    50%  { transform: translate(3%,5%) scale(1.05); }
    100% { transform: translate(-2%,-3%) scale(0.97); }
}

.grid-pattern {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
}

/* ---------- SCROLL-REVEAL ANIMATIONS ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
    will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }

/* ---------- PILL BADGE ---------- */
.pill-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: .375rem 1rem;
    border-radius: 999px;
    background: rgba(109,94,249,.12);
    border: 1px solid rgba(109,94,249,.3);
    color: #c4b5fd;
    font-size: .8rem; font-weight: 600; letter-spacing: .04em;
    backdrop-filter: blur(12px);
    text-transform: uppercase;
}
.pill-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--brand-success);
    box-shadow: 0 0 8px var(--brand-success);
    animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.4); opacity: .6; }
}

/* ---------- BUTTONS ---------- */
.btn-primary-glow {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem;
    height: 60px; padding: 0 34px;
    border-radius: var(--r-md);
    background: var(--gradient-brand);
    color: #fff !important;
    font-weight: 700; font-size: 1rem;
    border: none; cursor: pointer;
    position: relative; z-index: 1; overflow: hidden;
    transition: all var(--t-base);
    box-shadow: 0 4px 20px rgba(109,94,249,.4), 0 0 0 1px rgba(255,255,255,.12) inset;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary-glow::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--gradient-brand-alt);
    opacity: 0; transition: opacity var(--t-fast);
}
.btn-primary-glow:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 32px rgba(109,94,249,.55), 0 0 0 1px rgba(255,255,255,.2) inset;
}
.btn-primary-glow:hover::before { opacity: 1; }
.btn-primary-glow:active { transform: translateY(-1px) scale(.99); }
.btn-primary-glow > * { position: relative; z-index: 1; }

.btn-glass {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem;
    height: 60px; padding: 0 34px;
    border-radius: var(--r-md);
    background: var(--bg-glass);
    color: var(--text-secondary) !important;
    font-weight: 600; font-size: 1rem;
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    cursor: pointer;
    transition: all var(--t-base);
    text-decoration: none;
    white-space: nowrap;
}
.btn-glass:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(109,94,249,.4);
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ---------- SECTION HEADER ATOM ---------- */
.section-header { margin-bottom: var(--sp-64); }
.section-header.centered { text-align: center; }
.section-header .pill-badge { margin-bottom: 1.5rem; }
.section-header .lp-body { max-width: 620px; margin-top: 1rem; }
.section-header.centered .lp-body { margin: 1rem auto 0; }

/* ---------- HERO ---------- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    overflow: hidden;
    background: var(--bg-main);
    padding: 140px 0 80px;
}
/* Noise texture overlay for premium depth */
.hero-section::after {
    content: '';
    position: absolute; inset: 0; z-index: 1;
    pointer-events: none;
    opacity: .025;
    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='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}
.hero-section .lp-container {
    position: relative; z-index: 2;
}
.hero-layout {
    display: grid;
    grid-template-columns: 56fr 44fr;
    gap: var(--sp-64);
    align-items: center;
}

/* --- Terminal Card --- */
.terminal-card {
    background: rgba(18,24,38,.75);
    border: 1px solid rgba(109,94,249,.15);
    border-radius: var(--r-lg);
    backdrop-filter: blur(32px);
    box-shadow:
        var(--shadow-lg),
        var(--shadow-glow),
        inset 0 1px 0 rgba(255,255,255,.06);
    overflow: hidden;
    position: relative;
}
/* Pulsing glow ring behind the terminal */
.terminal-card::after {
    content: '';
    position: absolute; inset: -2px;
    border-radius: inherit;
    background: var(--gradient-brand);
    opacity: 0; z-index: -1;
    filter: blur(16px);
    animation: termGlow 4s ease-in-out infinite;
}
@keyframes termGlow {
    0%, 100% { opacity: 0; }
    50%      { opacity: .18; }
}
/* Terminal line-by-line stagger reveal */
.terminal-body > div {
    opacity: 0;
    animation: termLine .4s ease forwards;
}
.terminal-body > div:nth-child(1)  { animation-delay: .3s; }
.terminal-body > div:nth-child(2)  { animation-delay: .6s; }
.terminal-body > div:nth-child(3)  { animation-delay: .9s; }
.terminal-body > div:nth-child(4)  { animation-delay: 1.4s; }
.terminal-body > div:nth-child(5)  { animation-delay: 1.7s; }
.terminal-body > div:nth-child(6)  { animation-delay: 2.0s; }
.terminal-body > div:nth-child(7)  { animation-delay: 2.5s; }
.terminal-body > div:nth-child(8)  { animation-delay: 2.8s; }
.terminal-body > div:nth-child(9)  { animation-delay: 3.3s; }
.terminal-body > div:nth-child(10) { animation-delay: 3.6s; }
.terminal-body > div:nth-child(11) { animation-delay: 4.1s; }
.terminal-body > div:nth-child(12) { animation-delay: 4.4s; }
.terminal-body > div:nth-child(13) { animation-delay: 4.7s; }
@keyframes termLine {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}
.terminal-topbar {
    display: flex; align-items: center; gap: 8px;
    padding: .875rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}
.terminal-dot {
    width: 13px; height: 13px; border-radius: 50%;
    flex-shrink: 0;
}
.terminal-topbar-title {
    font-family: var(--font-mono);
    font-size: .72rem; color: var(--text-faint);
    margin-left: auto;
}
.terminal-body {
    padding: 1.5rem 1.5rem 1rem;
    font-family: var(--font-mono);
    font-size: .8rem;
    line-height: 1.9;
}
.terminal-prompt  { color: #22D3EE; }
.terminal-success { color: #22C55E; }
.terminal-info    { color: #94A3B8; }
.terminal-warn    { color: #F59E0B; }
.terminal-label   { color: #6D5EF9; }
.terminal-cursor  {
    display: inline-block; width: 10px; height: 1.1em;
    background: var(--brand-success); vertical-align: text-bottom;
    animation: cursorBlink 500ms step-end infinite;
}
@keyframes cursorBlink { 0%,100%{opacity:1} 50%{opacity:0} }

/* --- Hero Floating Cards --- */
.hero-floaters {
    position: absolute;
    pointer-events: none;
}
.float-card {
    display: flex; align-items: center; gap: .6rem;
    padding: .625rem 1rem;
    background: rgba(18,24,38,.8);
    border: 1px solid var(--border-glass);
    border-radius: var(--r-sm);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    font-size: .8rem; font-weight: 600; color: #fff;
    animation: floatCard 6s ease-in-out infinite;
}
.float-card:nth-child(2) { animation-delay: 2s; }
.float-card:nth-child(3) { animation-delay: 4s; }
.float-card .fc-dot {
    width: 8px; height: 8px; border-radius: 50%;
    flex-shrink: 0;
}
@keyframes floatCard {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* ---------- STATS STRIP ---------- */
.stats-section {
    padding: 3.5rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}
.stat-card {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--r-md);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all var(--t-base);
    cursor: default;
}
.stat-card:hover {
    background: rgba(109,94,249,.08);
    border-color: rgba(109,94,249,.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow-sm);
}
.stat-number {
    font-size: 3rem; font-weight: 800; line-height: 1;
    letter-spacing: -0.03em; color: #fff;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label {
    font-size: .8rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .06em;
    margin-top: .625rem;
}

/* ---------- BENTO GRID (SERVICES) ---------- */
.bento-section {
    background: var(--bg-main);
}
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto auto;
    gap: 28px;
}
.bento-xl {
    grid-column: 1 / 9;
    grid-row: 1;
    min-height: 380px;
}
.bento-md-a {
    grid-column: 9 / 13;
    grid-row: 1;
    min-height: 175px;
}
.bento-md-b {
    grid-column: 9 / 13;
    grid-row: 1;
    align-self: end;
    min-height: 175px;
}
.bento-wide {
    grid-column: 1 / 13;
    grid-row: 2;
}
.bento-md-c {
    grid-column: 1 / 5;
    grid-row: 3;
}
.bento-md-d {
    grid-column: 5 / 13;
    grid-row: 3;
}

/* Rearrange rows */
.bento-row-a {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 28px;
}
.bento-row-b {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 28px;
    margin-top: 28px;
}

.bento-card {
    background: rgba(18,24,38,.7);
    border: 1px solid var(--border-glass);
    border-radius: var(--r-lg);
    padding: 2.5rem;
    position: relative; overflow: hidden;
    transition: all var(--t-base);
    display: flex; flex-direction: column;
    backdrop-filter: blur(20px);
}
.bento-card::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity var(--t-base);
    border-radius: inherit;
    padding: 1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.bento-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
    border-color: transparent;
    background: rgba(18,24,38,.9);
}
.bento-card:hover::before { opacity: 1; }

/* Glow accent variants */
.bento-card.glow-purple .bento-glow {
    background: radial-gradient(ellipse at 0% 0%, rgba(109,94,249,.35) 0%, transparent 65%);
}
.bento-card.glow-cyan .bento-glow {
    background: radial-gradient(ellipse at 100% 100%, rgba(34,211,238,.25) 0%, transparent 65%);
}
.bento-card.glow-mixed .bento-glow {
    background: radial-gradient(ellipse at 50% 0%, rgba(139,92,246,.25) 0%, transparent 60%);
}
.bento-glow {
    position: absolute; inset: 0; pointer-events: none; z-index: 0;
    border-radius: inherit;
}
.bento-card > * { position: relative; z-index: 1; }

.bento-icon {
    width: 56px; height: 56px;
    border-radius: var(--r-md);
    background: rgba(109,94,249,.15);
    border: 1px solid rgba(109,94,249,.2);
    display: flex; align-items: center; justify-content: center;
    color: #a78bfa;
    margin-bottom: 1.5rem;
    transition: all var(--t-base);
}
.bento-card:hover .bento-icon {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 0 24px rgba(109,94,249,.5);
    transform: scale(1.08);
}
.bento-title {
    font-size: 1.4rem; font-weight: 700; color: #fff;
    margin-bottom: .75rem; letter-spacing: -.02em;
}
.bento-desc {
    font-size: .95rem; color: var(--text-muted); line-height: 1.7;
    flex: 1; margin-bottom: 1.5rem;
}
.bento-tags {
    display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto;
}
.bento-tag {
    font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
    padding: .25rem .75rem; border-radius: 999px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    color: var(--text-secondary);
}

/* Architecture Diagram visual within bento card */
.arch-diagram {
    font-family: var(--font-mono); font-size: .75rem;
    color: var(--text-muted); line-height: 2.2;
}
.arch-layer {
    display: flex; align-items: center; gap: .5rem;
}
.arch-dot {
    width: 6px; height: 6px; border-radius: 50%;
    flex-shrink: 0;
}
.arch-arrow { color: var(--text-faint); font-size: .6rem; }

/* ---------- CASES ---------- */
.cases-section { background: var(--bg-secondary); }
.case-card {
    background: rgba(18,24,38,.7);
    border: 1px solid var(--border-glass);
    border-radius: var(--r-lg);
    overflow: hidden;
    text-decoration: none;
    display: flex; flex-direction: column;
    transition: all var(--t-base);
    height: 100%;
}
.case-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(109,94,249,.2);
    border-color: rgba(109,94,249,.4);
}
.case-card-body {
    padding: 1.75rem 2rem 2rem;
    flex: 1; display: flex; flex-direction: column;
}
.case-tags {
    display: flex; flex-wrap: wrap; gap: .4rem;
    margin-bottom: .875rem;
}
.case-tag {
    font-size: .7rem; font-weight: 600; padding: .2rem .65rem;
    border-radius: 999px;
    background: rgba(109,94,249,.15);
    border: 1px solid rgba(109,94,249,.25);
    color: #c4b5fd;
}
.case-title {
    font-size: 1.4rem; font-weight: 700; color: #fff;
    margin-bottom: .5rem; letter-spacing: -.02em;
}
.case-desc {
    font-size: .9rem; color: var(--text-muted); line-height: 1.65;
    flex: 1; margin-bottom: 1.25rem;
}
.case-cta-link {
    font-size: .85rem; font-weight: 600;
    color: #a78bfa;
    display: flex; align-items: center; gap: .35rem;
    transition: gap var(--t-fast), color var(--t-fast);
}
.case-card:hover .case-cta-link {
    gap: .65rem; color: var(--brand-secondary);
}

/* ---------- PROCESS TIMELINE ---------- */
.process-section { background: var(--bg-main); }
.timeline-wrapper {
    position: relative; padding: 3rem 0;
}
.timeline-line {
    position: absolute;
    top: 52px; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(109,94,249,.5) 15%,
        rgba(34,211,238,.5) 85%,
        transparent 100%);
    pointer-events: none;
}
.timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-32);
    position: relative; z-index: 1;
}
.timeline-card {
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
}
.timeline-node {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--gradient-brand);
    color: #fff; font-weight: 800; font-size: .9rem;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 24px rgba(109,94,249,.4);
    font-family: var(--font-mono);
    position: relative;
}
.timeline-node::after {
    content: '';
    position: absolute; inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(109,94,249,.3);
    animation: nodePulse 3s ease-in-out infinite;
}
@keyframes nodePulse {
    0%,100% { transform: scale(1); opacity: .6; }
    50%      { transform: scale(1.1); opacity: 0; }
}
.timeline-content h4 {
    font-size: 1.05rem; font-weight: 700; color: #fff;
    margin-bottom: .4rem;
}
.timeline-content p {
    font-size: .875rem; color: var(--text-muted); line-height: 1.6;
    margin: 0;
}

/* ---------- TECH STACK GRID ---------- */
.tech-section { background: var(--bg-secondary); }
.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-24);
}
.tech-card {
    background: rgba(18,24,38,.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--r-md);
    padding: 1.75rem;
    transition: all var(--t-base);
}
.tech-card:hover {
    border-color: rgba(109,94,249,.35);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(109,94,249,.1);
}
.tech-label {
    font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
    color: var(--brand-primary); text-transform: uppercase; letter-spacing: .1em;
    margin-bottom: .75rem;
}
.tech-content {
    font-size: .9rem; color: var(--text-secondary); line-height: 1.7;
}

/* ---------- CTA SECTION ---------- */
.cta-section { background: var(--bg-main); }
.cta-box {
    background: linear-gradient(135deg, rgba(109,94,249,.2) 0%, rgba(34,211,238,.08) 100%);
    border: 1px solid rgba(109,94,249,.25);
    border-radius: var(--r-2xl);
    padding: 5rem 3rem;
    text-align: center;
    position: relative; overflow: hidden;
}
.cta-box::before {
    content: '';
    position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
    width: 60%; height: 100%;
    background: radial-gradient(ellipse, rgba(109,94,249,.3) 0%, transparent 70%);
    filter: blur(60px); pointer-events: none;
    animation: ctaGlow 6s ease-in-out infinite alternate;
}
@keyframes ctaGlow {
    0%   { opacity: .6; transform: translateX(-50%) scale(1); }
    100% { opacity: 1;  transform: translateX(-50%) scale(1.1); }
}
.cta-box > * { position: relative; z-index: 1; }
.cta-headline {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800; letter-spacing: -.03em; color: #fff;
    margin-bottom: 1rem;
}

/* ---------- FOOTER ---------- */
.footer {
    background: #030510;
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 0 2rem;
}
.footer-brand {
    font-size: 1.1rem; font-weight: 700; color: #fff;
}
.footer-desc {
    font-size: .875rem; color: var(--text-muted); line-height: 1.7;
    max-width: 320px; margin-top: .5rem;
}
.footer-label {
    font-size: .75rem; font-weight: 700; color: var(--text-faint);
    text-transform: uppercase; letter-spacing: .1em;
    margin-bottom: 1rem;
}
.footer a { color: var(--text-muted); font-size: .875rem; transition: color var(--t-fast); }
.footer a:hover { color: #a78bfa; }
.footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.footer-divider {
    border-color: var(--border-subtle); margin: 2.5rem 0 1.5rem;
}
.footer-copy {
    font-size: .8rem; color: var(--text-faint);
}

/* ---------- CHAT POPUP (preserved) ---------- */
.chat-popup {
    position: fixed; bottom: 96px; right: 24px;
    width: 360px; max-width: calc(100vw - 48px);
    height: 480px; max-height: calc(100vh - 140px);
    background: #fff; border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
    display: flex; flex-direction: column;
    z-index: 9998; overflow: hidden;
    transition: opacity .25s ease, transform .25s ease;
}
.chat-popup[hidden]     { opacity: 0; transform: translateY(20px); pointer-events: none; }
.chat-popup:not([hidden]){ opacity: 1; transform: translateY(0); }
.chat-popup-header {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #fff; padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-header-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--brand-primary); color: #fff;
    font-size: 14px; font-weight: bold;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-popup-header h6 { margin: 0; font-size: 15px; }
.chat-popup-header .subtitle { font-size: 11px; color: #94a3b8; }
.chat-popup-close {
    background: none; border: none; color: #94a3b8;
    font-size: 20px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.chat-popup-close:hover { color: #fff; }
.chat-popup-messages {
    flex: 1; overflow-y: auto; padding: 14px;
    background: #f1f5f9; display: flex; flex-direction: column; gap: 10px;
}
.chat-msg {
    max-width: 82%; padding: 10px 14px; border-radius: 12px;
    font-size: 13px; line-height: 1.5;
    animation: chatSlideIn .3s ease;
}
@keyframes chatSlideIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.chat-msg.bot  { background: #e2e8f0; color: #1e293b; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--brand-primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-popup-input {
    display: flex; gap: 8px; padding: 10px 14px;
    border-top: 1px solid #e2e8f0; background: #fff;
}
.chat-popup-input input {
    flex: 1; border: 1px solid #cbd5e1; border-radius: 20px;
    padding: 8px 14px; font-size: 13px; outline: none;
}
.chat-popup-input input:focus { border-color: var(--brand-primary); }
.chat-popup-input button {
    border: none; background: var(--brand-primary); color: #fff;
    border-radius: 50%; width: 36px; height: 36px;
    cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-quick-replies {
    display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; background: #fff;
}
.chat-quick-reply {
    background: #e2e8f0; border: none; border-radius: 14px;
    padding: 5px 12px; font-size: 12px; cursor: pointer; color: #334155;
    transition: background .15s;
}
.chat-quick-reply:hover { background: #cbd5e1; }
.chat-typing-indicator {
    display: flex; align-items: center; gap: 4px; padding: 12px 14px;
}
.chat-typing-indicator span {
    width: 8px; height: 8px; border-radius: 50%; background: #94a3b8;
    animation: typingPulse 1.2s infinite ease-in-out;
}
.chat-typing-indicator span:nth-child(2) { animation-delay: .2s; }
.chat-typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes typingPulse { 0%,70%,100%{opacity:.3;transform:scale(.85)} 35%{opacity:1;transform:scale(1)} }
.floating-whatsapp { background: #25D366; }
.floating-whatsapp:hover { background: #1eb555; }
.chat-badge { animation: badgePulse 2s infinite ease-in-out; }
@keyframes badgePulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }

/* ---------- CASE CARD ACCENT STRIP ---------- */
.case-card::before {
    content: '';
    display: block; height: 3px;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity var(--t-base);
}
.case-card:hover::before { opacity: 1; }

/* ---------- SECTION GRADIENT DIVIDER ---------- */
.section-divider {
    height: 1px; border: none; margin: 0;
    background: linear-gradient(90deg, transparent, rgba(109,94,249,.25), rgba(34,211,238,.15), transparent);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1199px) {
    .hero-layout { grid-template-columns: 1fr; gap: var(--sp-48); }
    /* Bento row-a: stack XL full, two MD side-by-side */
    .bento-row-a { grid-template-columns: 1fr 1fr; }
    .bento-row-a > .bento-card:first-child { grid-column: 1 / -1; }
    .bento-row-a > div[style*="grid-column:9/13"] { grid-column: 1 / -1; }
    /* Bento row-b: wide stays full, two MD side-by-side */
    .bento-row-b { grid-template-columns: 1fr 1fr; }
    .bento-row-b > div[style*="grid-column:1/13"] { grid-column: 1 / -1; }
    .bento-row-b > div[style*="grid-column:1/5"] { grid-column: 1; }
    .bento-row-b > div[style*="grid-column:5/13"] { grid-column: 2; }
    .timeline-grid { grid-template-columns: repeat(2, 1fr); }
    .tech-grid { grid-template-columns: repeat(2, 1fr); }
    /* Float cards adjust */
    .float-card[style*="right:-36px"] { right: -12px !important; }
    .float-card[style*="left:-24px"]  { left: -8px !important; }
}
@media (max-width: 991px) {
    .hero-section { padding: 120px 0 60px; }
    .hero-right { max-width: 560px; margin: 0 auto; }
    /* Security card inner grid to stack */
    .bento-card [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}
@media (max-width: 767px) {
    .lp-section, .lp-section-lg { padding: 5rem 0; }
    .lp-h1 { font-size: 2.5rem; }
    .lp-h2 { font-size: 2rem; }
    .bento-row-a,
    .bento-row-b { display: flex; flex-direction: column; }
    .bento-row-a > div[style*="grid-column"],
    .bento-row-b > div[style*="grid-column"] { grid-column: unset !important; }
    .timeline-grid { grid-template-columns: 1fr; }
    .timeline-line { display: none; }
    .tech-grid { grid-template-columns: 1fr; }
    .cta-box { padding: 3rem 1.5rem; border-radius: var(--r-xl); }
    .stat-number { font-size: 2.2rem; }
    .btn-primary-glow,
    .btn-glass { height: 52px; padding: 0 24px; font-size: .9rem; }
    .float-card { display: none; }
    .terminal-card { border-radius: var(--r-md); }
}
@media (max-width: 480px) {
    .chat-popup { width: calc(100vw - 32px); right: 16px; bottom: 80px; }
    .lp-h1 { font-size: 2rem; }
    .hero-section { padding: 100px 0 40px; min-height: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .terminal-body > div { opacity: 1 !important; animation: none !important; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
