:root {
    --bg-main: #050505;
    --bg-card: rgba(20, 20, 20, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-muted: #888890;
    --accent: #ffffff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}
body.loading { overflow: hidden; }

/* ═══════════════════════════════════════════════
   PRELOADER
   ═══════════════════════════════════════════════ */
#preloader {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #020202; z-index: 10000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}
.preloader-content { display: flex; gap: 0.5rem; overflow: hidden; }
.preloader-text {
    font-size: 3rem; font-weight: 900; letter-spacing: -1px; color: var(--text-primary);
    transform: translateY(100%); opacity: 0;
}
.preloader-text.accent { color: var(--accent); }
.preloader-progress { position: absolute; bottom: 0; left: 0; height: 4px; background: var(--accent); width: 0%; }

/* ═══════════════════════════════════════════════
   BACKGROUNDS
   ═══════════════════════════════════════════════ */
.mesh-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background:
        radial-gradient(circle at 15% 50%, rgba(74, 222, 128, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
    z-index: -1; pointer-events: none;
}
.noise-bg {
    position: fixed; top: -5vh; left: -5vw; width: 110vw; height: 110vh;
    pointer-events: none; z-index: -1; opacity: 0.025;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    animation: noiseShift 4s steps(10) infinite;
}
@keyframes noiseShift {
    0% { transform: translate(0,0); }
    20% { transform: translate(-5%, 5%); }
    40% { transform: translate(5%, -5%); }
    60% { transform: translate(-5%, -5%); }
    80% { transform: translate(5%, 5%); }
    100% { transform: translate(0,0); }
}

/* ═══════════════════════════════════════════════
   PREMIUM NAVIGATION (shared)
   ═══════════════════════════════════════════════ */
.premium-nav {
    position: fixed; top: 0; left: 0; width: 100%; padding: 1.5rem 0; z-index: 100;
    transition: background 0.4s ease, padding 0.4s ease, transform 0.4s ease;
}
.premium-nav.scrolled {
    background: rgba(5, 5, 5, 0.85); backdrop-filter: blur(16px);
    padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.premium-nav.hidden { transform: translateY(-100%); }
.nav-container {
    max-width: 1400px; margin: 0 auto; padding: 0 3rem;
    display: flex; justify-content: space-between; align-items: center;
}
.nav-container .logo {
    font-weight: 900; font-size: 1.25rem; text-decoration: none;
    color: var(--text-primary); letter-spacing: -0.5px;
}
.nav-container .logo .accent { color: var(--accent); }
.nav-container .links { display: flex; gap: 3rem; }
.nav-container .links a {
    text-decoration: none; color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; position: relative;
    transition: color 0.3s ease; display: inline-block;
}
.nav-container .links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0%; height: 1px;
    background: var(--accent); transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-container .links a:hover { color: var(--text-primary); }
.nav-container .links a:hover::after { width: 100%; }

.lang-switch { display: flex; gap: 0.5rem; }
.lang-switch button {
    background: transparent; border: 1px solid transparent; color: var(--text-muted);
    font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 700;
    cursor: pointer; padding: 0.3rem 0.6rem; border-radius: 4px; transition: all 0.3s ease;
}
.lang-switch button:hover { color: var(--text-primary); }
.lang-switch button.active { color: var(--bg-main); background: var(--text-primary); }

/* ═══════════════════════════════════════════════
   SHARED LAYOUT (container, bento, hero, sections)
   ═══════════════════════════════════════════════ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.bento-section { padding: 6rem 0; }
.section-header { margin-bottom: 3.5rem; }
.section-header h2 { font-size: 2.5rem; letter-spacing: -1px; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }

.premium-hero {
    min-height: 80vh; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center; padding-top: 10vh;
}
.hero-content { overflow: hidden; }
.premium-hero h1 { font-size: 6rem; font-weight: 900; letter-spacing: -3px; line-height: 1; margin-bottom: 1rem; }
.premium-hero p { color: var(--text-muted); font-size: 1.25rem; font-weight: 500; }

.bento-grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.bento-masonry { grid-template-columns: repeat(2, 1fr); }
.bento-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 20px; padding: 2rem; position: relative; overflow: hidden;
    display: flex; flex-direction: column; transform-style: preserve-3d;
}
.bento-card > * { transform: translateZ(20px); }
.instruction { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

/* ═══════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════ */
.reveal-text {
    opacity: 0; transform: translateY(100%);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-text.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.fade-in {
    opacity: 0; transform: translateY(60px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════
   HUB-SPECIFIC LAYOUT
   ═══════════════════════════════════════════════ */
.hub-container {
    max-width: 1200px; margin: 0 auto; padding: 12vh 2rem 2rem 2rem;
    min-height: 85vh; display: flex; flex-direction: column; justify-content: center;
}
.hub-header { text-align: center; margin-bottom: 4rem; overflow: hidden; }
.hub-header h1 { font-size: 4rem; font-weight: 900; letter-spacing: -2px; line-height: 1.1; margin-bottom: 1rem; }
.gradient-text {
    background: linear-gradient(135deg, #fff, #555);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hub-header p { color: var(--text-muted); font-size: 1.2rem; }

.split-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.hub-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 24px; padding: 3rem; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    text-decoration: none; color: var(--text-primary);
    min-height: 350px; transform-style: preserve-3d; transition: border-color 0.4s ease;
}
.hub-card:hover { border-color: rgba(255,255,255,0.2); }
.card-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; opacity: 0.5; pointer-events: none;
}
.card-content {
    position: relative; z-index: 1; transform: translateZ(30px);
    display: flex; flex-direction: column; height: 100%;
}
.card-tag {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px;
    color: var(--text-muted); font-weight: 700; margin-bottom: 1.5rem; display: block;
}
.card-content h2 { font-size: 2.5rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 1rem; }
.card-content p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; margin-bottom: 2rem; flex-grow: 1; }
.card-action { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.95rem; color: #fff; }
.card-action svg { transition: transform 0.3s ease; }
.hub-card:hover .card-action svg { transform: translateX(5px); }

/* ═══════════════════════════════════════════════
   PAGE TRANSITION OVERLAY
   ═══════════════════════════════════════════════ */
.page-transition-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #050505; z-index: 10001; pointer-events: none;
    transform: translateY(100%);
    transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex; align-items: center; justify-content: center;
}
.page-transition-overlay.active { transform: translateY(0); pointer-events: all; }
.transition-logo { font-size: 2rem; font-weight: 900; color: #fff; opacity: 0; transition: opacity 0.3s; }
.page-transition-overlay.active .transition-logo { opacity: 1; transition-delay: 0.4s; }

/* ═══════════════════════════════════════════════
   TRUST TICKER / MARQUEE
   ═══════════════════════════════════════════════ */
.ticker-wrap {
    width: 100%; overflow: hidden; background: rgba(255,255,255,0.015);
    padding: 1.5rem 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
    margin: 2rem 0 4rem 0;
}
.ticker { display: flex; white-space: nowrap; animation: ticker 25s linear infinite; width: max-content; }
.ticker-item {
    font-size: 0.85rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 2px; margin: 0 3rem; display: flex; align-items: center; gap: 10px;
}
.ticker-item span.dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
@keyframes ticker { 0% { transform: translate3d(0,0,0); } 100% { transform: translate3d(-50%,0,0); } }

/* ═══════════════════════════════════════════════
   TEXT MASKING
   ═══════════════════════════════════════════════ */
.text-mask-wrap { overflow: hidden; display: inline-block; vertical-align: top; }
.text-mask-word {
    display: inline-block; transform: translateY(110%); opacity: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}
.text-mask-word.revealed { transform: translateY(0); opacity: 1; }

/* ═══════════════════════════════════════════════
   SVG LINE DRAWING BUTTON
   ═══════════════════════════════════════════════ */
.btn-premium { position: relative; }
.btn-premium .line { position: absolute; background: var(--accent); }
.btn-premium .line-top { top: 0; left: -100%; width: 100%; height: 1px; transition: left 0.3s ease; }
.btn-premium .line-bottom { bottom: 0; right: -100%; width: 100%; height: 1px; transition: right 0.3s ease; }
.btn-premium .line-left { bottom: -100%; left: 0; width: 1px; height: 100%; transition: bottom 0.3s ease; }
.btn-premium .line-right { top: -100%; right: 0; width: 1px; height: 100%; transition: top 0.3s ease; }
.btn-premium:hover .line-top { left: 0; }
.btn-premium:hover .line-bottom { right: 0; }
.btn-premium:hover .line-left { bottom: 0; }
.btn-premium:hover .line-right { top: 0; }

/* ═══════════════════════════════════════════════
   AI CHATBOT
   ═══════════════════════════════════════════════ */
.chatbot-widget { position: fixed; bottom: 30px; right: 30px; z-index: 9999; }
.chatbot-toggle {
    width: 65px; height: 65px; border-radius: 50%;
    background: var(--text-primary); color: var(--bg-main);
    border: none; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: pointer;
}
.chatbot-toggle:hover { transform: scale(1.1) rotate(5deg); }
.chatbot-toggle svg { width: 30px; height: 30px; fill: currentColor; }
.chatbot-window {
    position: absolute; bottom: 90px; right: 0; width: 360px; height: 500px;
    background: rgba(10, 10, 10, 0.85); backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px;
    display: flex; flex-direction: column; overflow: hidden;
    transform-origin: bottom right; transform: scale(0.9) translateY(20px);
    opacity: 0; pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}
.chatbot-window.active { transform: scale(1) translateY(0); opacity: 1; pointer-events: auto; }
.chat-header {
    padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.4);
}
.chat-header h3 { margin: 0; font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
.status-dot {
    width: 8px; height: 8px; background: #4ade80; border-radius: 50%;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.4); animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.chat-close { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; transition: color 0.2s; cursor: pointer; }
.chat-close:hover { color: var(--text-primary); }
.chat-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.message {
    max-width: 85%; padding: 14px 18px; border-radius: 14px; font-size: 0.9rem; line-height: 1.5;
    animation: messageSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; transform: translateY(15px);
}
@keyframes messageSlide { to { opacity: 1; transform: translateY(0); } }
.msg-ai {
    background: rgba(255,255,255,0.03); color: var(--text-primary);
    align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid rgba(255,255,255,0.05);
}
.msg-user { background: var(--text-primary); color: var(--bg-main); align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 500; }
.chat-input-container { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.05); display: flex; gap: 10px; background: rgba(0,0,0,0.3); }
.chat-input-container input {
    flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 12px 16px; color: var(--text-primary);
    font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.3s, background 0.3s;
}
.chat-input-container input:focus { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); }
.chat-input-container button {
    background: var(--text-primary); color: var(--bg-main); border: none;
    border-radius: 10px; padding: 0 16px; transition: transform 0.2s; cursor: pointer;
}
.chat-input-container button:active { transform: scale(0.92); }
.chat-input-container button svg { width: 20px; height: 20px; fill: currentColor; display: block; }

/* ═══════════════════════════════════════════════
   RESPONSIVE (Mobile First & Adaptation)
   ═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .nav-container .links { gap: 1.5rem; }
    .hub-header h1 { font-size: 3.5rem; }
}

@media (max-width: 900px) {
    /* Layout */
    .split-cards, .grid-3, .bento-masonry { grid-template-columns: 1fr; gap: 1rem; }
    .nav-container .links { display: none; }
    
    /* Hub */
    .hub-container { padding: 12vh 1.5rem 2rem 1.5rem; }
    .hub-header h1 { font-size: 2.8rem; }
    .hub-card { min-height: 250px; padding: 2rem; }
    .card-content h2 { font-size: 2rem; }
    
    /* Copywriter / Generic */
    .premium-hero h1 { font-size: 3.2rem; }
    .container { padding: 0 1.5rem; }
    .bento-card { padding: 1.5rem; }
    .section-header h2 { font-size: 2.2rem; }
    .bento-section { padding: 4rem 0; }
    
    /* Chatbot */
    .chatbot-widget { bottom: 20px; right: 20px; }
    .chatbot-window { width: calc(100vw - 40px); height: 60vh; bottom: 80px; }
    
    /* Marquee */
    .ticker-item { margin: 0 1.5rem; font-size: 0.75rem; }
}

@media (max-width: 600px) {
    /* Typography & Spacing for Phones */
    .hub-header h1 { font-size: 2.2rem; letter-spacing: -1px; }
    .hub-header p { font-size: 1rem; }
    .premium-hero h1 { font-size: 2.4rem; letter-spacing: -1px; }
    .premium-hero p { font-size: 1rem; }
    
    /* Layout Spacing */
    .hub-container { padding-top: 15vh; }
    .nav-container { padding: 0 1.2rem; }
    .container { padding: 0 1.2rem; }
    
    /* Hub Cards */
    .hub-card { padding: 1.5rem; min-height: 220px; }
    .card-content h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
    .card-content p { font-size: 0.95rem; margin-bottom: 1rem; }
    
    /* Bento Cards */
    .bento-card { padding: 1.2rem; }
    .section-header h2 { font-size: 1.8rem; }
    .section-header p { font-size: 0.95rem; }
    
    /* Preloader */
    .preloader-text { font-size: 2rem; }
    
    /* Forms & UI */
    .chat-input-container { padding: 12px 15px; }
    .chat-input-container input { padding: 10px 12px; }
    
    /* Counters Override */
    .counter-number { font-size: 2.5rem !important; }
}
