/* ============================================
   REPLI — Brand Stylesheet
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand-blue: #3B82F6;
    --brand-purple: #8B5CF6;
    --brand-cyan: #06B6D4;
    --dark-bg: #0a0a0f;
    --dark-card: #13131a;
    --dark-border: #26262f;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

/* ============ GLOBAL RESPONSIVE SAFETY ============ */
/* Prevent horizontal scroll on any page */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Flex children can shrink properly (otherwise long content overflows) */
.flex-shrink-safe > * {
    min-width: 0;
}

/* Constrain main content area in admin layout to prevent overflow */
main {
    min-width: 0;
    overflow-x: hidden;
}

/* Flex children can shrink properly (otherwise long content overflows) */
.min-w-0-safe > * {
    min-width: 0;
}

/* Cards and flex children that should respect container width */
.flex-card {
    min-width: 0;
    overflow: hidden;
}

/* Constrain main content area in admin layout */
.admin-main {
    min-width: 0;
    overflow-x: hidden;
}

/* ============ GRADIENT TEXT ============ */
.gradient-text {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #06B6D4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============ BUTTONS ============ */
.btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
}

/* ============ LANDING HERO ============ */
.hero-section {
    isolation: isolate;
    min-height: 680px;
}

.hero-grid {
    position: absolute;
    inset: 0;
    z-index: -3;
    opacity: .22;
    background-image: linear-gradient(rgba(99, 102, 241, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(99, 102, 241, .13) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 86%);
}

.hero-orb { position: absolute; z-index: -2; border-radius: 999px; filter: blur(70px); pointer-events: none; }
.hero-orb-blue { width: 34rem; height: 34rem; top: -17rem; left: 8%; background: rgba(59, 130, 246, .25); }
.hero-orb-purple { width: 29rem; height: 29rem; top: 2rem; right: 7%; background: rgba(139, 92, 246, .18); }
.hero-orb-cyan { width: 28rem; height: 20rem; bottom: -14rem; left: 38%; background: rgba(6, 182, 212, .14); }

.hero-copy { position: relative; z-index: 2; }
.hero-announcement { background: rgba(19, 19, 26, .72); border: 1px solid rgba(148, 163, 184, .2); box-shadow: 0 8px 30px rgba(0, 0, 0, .2), inset 0 1px rgba(255,255,255,.04); }
.hero-title { max-width: 720px; letter-spacing: -.055em; text-wrap: balance; }
.hero-description { max-width: 650px; }
.hero-trust { border-top: 1px solid rgba(148, 163, 184, .16); padding-top: 1.25rem; }
.hero-visual { min-height: 475px; display: grid; place-items: center; isolation: isolate; }
.hero-visual-glow { position: absolute; z-index: -2; width: 68%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(59,130,246,.38), rgba(139,92,246,.17) 43%, transparent 70%); filter: blur(12px); }
.hero-visual-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(96, 165, 250, .22); z-index: -1; }
.hero-visual-ring-one { width: 73%; aspect-ratio: 1; animation: hero-ring 12s linear infinite; }
.hero-visual-ring-two { width: 90%; aspect-ratio: 1; border-style: dashed; border-color: rgba(192, 132, 252, .16); animation: hero-ring 20s linear infinite reverse; }
.hero-illustration { position: relative; filter: drop-shadow(0 24px 35px rgba(12, 43, 120, .4)); }
.hero-live-card, .hero-response-card { position: absolute; z-index: 11; display: flex; align-items: center; gap: .65rem; background: rgba(14, 16, 29, .78); border-color: rgba(148, 163, 184, .2); box-shadow: 0 14px 32px rgba(0,0,0,.3); }
.hero-live-card { top: 12%; right: 1%; padding: .7rem .9rem; border-radius: 14px; animation: float-slow 7s ease-in-out infinite; }
.hero-live-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .12), 0 0 15px rgba(74, 222, 128, .9); }
.hero-response-card { bottom: 12%; left: 0; padding: .7rem .85rem; border-radius: 14px; line-height: 1.25; animation: float-medium 5s ease-in-out infinite; }
.hero-response-card strong { font-size: .85rem; }
.hero-response-card small { color: #9ca3af; font-size: .7rem; }
@keyframes hero-ring { to { transform: rotate(360deg); } }

@media (max-width: 1023px) {
    .hero-section { min-height: auto; }
    .hero-visual { min-height: 400px; max-width: 620px; margin: 0 auto; }
}

@media (max-width: 639px) {
    .hero-section { padding-top: 8rem; }
    .hero-title { letter-spacing: -.045em; }
    .hero-visual { min-height: 295px; margin-top: 1.25rem; }
    .hero-live-card { top: 4%; right: 0; transform: scale(.82); transform-origin: top right; }
    .hero-response-card { bottom: 3%; left: -3%; transform: scale(.82); transform-origin: bottom left; }
    .hero-visual-ring-two { width: 110%; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-visual-ring, .hero-live-card, .hero-response-card { animation: none; }
}

/* ============ LEGAL PAGES ============ */
.legal-nav { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(148, 163, 184, .14); background: rgba(10, 10, 15, .8); backdrop-filter: blur(18px); }
.legal-nav-link { color: #c4b5fd; font-size: .875rem; font-weight: 600; transition: color .2s ease; }
.legal-nav-link:hover { color: #fff; }
.legal-page { max-width: 1152px; margin: 0 auto; padding: 4.5rem 1.5rem 5rem; }
.legal-hero { position: relative; overflow: hidden; padding: 3.5rem; border: 1px solid rgba(139, 92, 246, .28); border-radius: 1.5rem; background: radial-gradient(circle at 82% 8%, rgba(59,130,246,.2), transparent 32%), radial-gradient(circle at 20% 110%, rgba(139,92,246,.2), transparent 45%), rgba(19,19,26,.65); }
.legal-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .28; background-image: linear-gradient(rgba(139,92,246,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(139,92,246,.16) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(120deg, black, transparent 70%); }
.legal-hero > * { position: relative; z-index: 1; }
.legal-eyebrow { display: inline-block; margin-bottom: 1rem; color: #a5b4fc; font-size: .72rem; font-weight: 800; letter-spacing: .15em; }
.legal-hero h1 { max-width: 720px; font-size: clamp(2.3rem, 5vw, 4.1rem); line-height: 1.06; letter-spacing: -.055em; font-weight: 800; }
.legal-hero p { max-width: 680px; margin-top: 1.25rem; color: #cbd5e1; font-size: 1.06rem; line-height: 1.75; }
.legal-meta { display: flex; flex-wrap: wrap; gap: .55rem 1.25rem; margin-top: 1.7rem; color: #94a3b8; font-size: .8rem; }
.legal-meta span::before { content: '•'; margin-right: .45rem; color: #60a5fa; }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 4.5rem; margin-top: 4.5rem; }
.legal-toc { align-self: start; position: sticky; top: 6.5rem; display: grid; gap: .15rem; padding: 1.1rem; border-left: 1px solid rgba(148,163,184,.2); }
.legal-toc strong { margin-bottom: .55rem; font-size: .78rem; color: #f8fafc; text-transform: uppercase; letter-spacing: .08em; }
.legal-toc a { padding: .35rem .1rem; color: #94a3b8; font-size: .82rem; transition: color .2s ease; }
.legal-toc a:hover { color: #c4b5fd; }
.legal-content { min-width: 0; color: #cbd5e1; font-size: 1rem; line-height: 1.8; }
.legal-content section { scroll-margin-top: 6.5rem; padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid rgba(148,163,184,.13); }
.legal-content section:last-child { border-bottom: 0; }
.legal-content h2 { margin-bottom: 1rem; color: #fff; font-size: 1.55rem; line-height: 1.25; font-weight: 750; letter-spacing: -.025em; }
.legal-content h3 { margin-bottom: .42rem; color: #f8fafc; font-size: .92rem; font-weight: 700; }
.legal-content p + p { margin-top: 1rem; }
.legal-content ul { margin: .95rem 0; padding-left: 1.35rem; }
.legal-content li { padding-left: .25rem; margin: .45rem 0; }
.legal-content li::marker { color: #8b5cf6; }
.legal-content a { color: #93c5fd; text-decoration: underline; text-decoration-color: rgba(147,197,253,.35); text-underline-offset: 3px; }
.legal-content a:hover { color: #fff; }
.legal-callout { display: flex; gap: .85rem; margin: 1.4rem 0; padding: 1rem 1.15rem; border: 1px solid rgba(96,165,250,.25); border-radius: .85rem; background: rgba(30,58,138,.13); color: #cbd5e1; font-size: .92rem; line-height: 1.6; }
.legal-callout strong { flex: 0 0 auto; color: #bfdbfe; }
.legal-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.legal-card { padding: 1.1rem; border: 1px solid rgba(148,163,184,.16); border-radius: .85rem; background: rgba(19,19,26,.48); }
.legal-card p { color: #94a3b8; font-size: .86rem; line-height: 1.6; }
.legal-rights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 1.2rem 0; }
.legal-rights div { padding: .9rem 1rem; border-radius: .75rem; background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.16); }
.legal-rights strong { display: block; color: #e9d5ff; font-size: .88rem; }
.legal-rights span { display: block; margin-top: .22rem; color: #a5b4c8; font-size: .8rem; line-height: 1.5; }
.legal-reference { color: #94a3b8; font-size: .86rem; }
.legal-footer { display: flex; justify-content: space-between; gap: 1rem; max-width: 1152px; margin: 0 auto; padding: 1.6rem 1.5rem 2.5rem; border-top: 1px solid rgba(148,163,184,.14); color: #64748b; font-size: .8rem; }
.legal-footer a { color: #a5b4fc; }
.legal-short-page { max-width: 960px; }
.legal-deletion-content { max-width: 760px; margin: 4rem auto 0; }
@media (max-width: 800px) { .legal-page { padding-top: 2rem; } .legal-hero { padding: 2rem 1.4rem; } .legal-layout { grid-template-columns: 1fr; gap: 2rem; margin-top: 2.5rem; } .legal-toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 0; border: 1px solid rgba(148,163,184,.14); border-radius: .85rem; } .legal-toc strong { grid-column: 1 / -1; } }
@media (max-width: 540px) { .legal-card-grid, .legal-rights { grid-template-columns: 1fr; } .legal-toc { grid-template-columns: 1fr; } .legal-footer { flex-direction: column; } }

.btn-secondary {
    background: var(--dark-card);
    color: white !important;
    border: 1px solid var(--dark-border);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-secondary:hover {
    border-color: var(--brand-blue);
    background: var(--dark-border);
}

/* ============ GLASS CARD ============ */
.glass-card {
    background: rgba(19, 19, 26, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

/* ============ METRIC CARDS ============ */
.metric-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: var(--brand-blue);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.metric-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============ FEATURE CARDS ============ */
.feature-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--brand-purple);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============ INTEGRATION CARDS ============ */
.integration-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.integration-card:hover {
    border-color: var(--brand-blue);
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.2);
}

.integration-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.integration-icon.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.integration-icon.instagram {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    color: white;
}

.integration-icon.telegram {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: white;
}

.integration-icon.tiktok {
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
    color: #f5f5f5;
    box-shadow: 4px 0 0 rgba(37, 244, 238, 0.75), -4px 0 0 rgba(254, 44, 85, 0.65);
}

/* ============ PRICING CARDS ============ */
.pricing-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-featured {
    border-color: var(--brand-blue);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.2);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-name {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-period {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
    -webkit-text-fill-color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    text-align: left;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.pricing-features li svg {
    color: var(--brand-blue);
    flex-shrink: 0;
}

/* ============ FAQ ============ */
.faq-item {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    transition: all 0.3s ease;
}

.faq-item[open] {
    border-color: var(--brand-blue);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--brand-blue);
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    margin-top: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============ CTA CARD ============ */
.cta-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid var(--brand-blue);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* ============ CHAT BUBBLES (Hero) ============ */
.chat-bubble {
    position: absolute;
    z-index: 5;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float-fast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 7s ease-in-out infinite;
}

.animate-float-medium {
    animation: float-medium 5s ease-in-out infinite;
}

.animate-float-fast {
    animation: float-fast 4s ease-in-out infinite;
}

/* ============ FORM (auth pages) ============ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-blue);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .metric-value {
        font-size: 2rem;
    }

    .pricing-featured {
        transform: scale(1);
    }
}
