/* ========================================
   KUBUNI - Full Site Styles
   ======================================== */

:root {
    --black: #0A0A0A;
    --black-light: #1A1A1A;
    --red: #E53935;
    --red-dark: #C62828;
    --white: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray: #888888;
    --gray-dark: #333333;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background-color: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.highlight { color: var(--red); }

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary { background-color: var(--red); color: var(--white); }
.btn-primary:hover { background-color: var(--red-dark); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(229, 57, 53, 0.3); }
.btn-secondary { background-color: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-secondary:hover { background-color: var(--white); color: var(--black); }
.btn-full { width: 100%; }

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo { display: flex; align-items: center; }
.logo-img { height: 32px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 40px; }

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--red);
    transition: var(--transition);
}

.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: var(--red); }

.nav-cta { background-color: var(--red); color: var(--white) !important; padding: 10px 24px; border-radius: 4px; }
.nav-cta::after { display: none; }
.nav-cta:hover { background-color: var(--red-dark); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    position: relative;
    transition: var(--transition);
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--black) 0%, var(--black-light) 50%, var(--black) 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content { text-align: center; max-width: 800px; }

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--red);
    padding: 8px 16px;
    border: 1px solid rgba(229, 57, 53, 0.3);
    border-radius: 4px;
    margin-bottom: 32px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--red), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse { 0%, 100% { opacity: 1; transform: scaleY(1); } 50% { opacity: 0.5; transform: scaleY(0.6); } }

/* Services */
.services { padding: 120px 0; background-color: var(--black); }
.section-header { text-align: center; margin-bottom: 64px; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.service-card {
    background-color: var(--black-light);
    padding: 48px 32px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
}

.service-card:hover { border-color: var(--red); transform: translateY(-8px); }
.service-card:hover .service-number { color: var(--red); opacity: 0.1; }
.service-icon { width: 48px; height: 48px; margin-bottom: 24px; }

.service-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600; margin-bottom: 16px; }
.service-text { color: var(--gray); font-size: 0.95rem; line-height: 1.7; }

.service-number {
    position: absolute;
    top: 24px;
    right: 24px;
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: var(--gray-dark);
    opacity: 0.05;
    transition: var(--transition);
}

/* Portfolio */
.portfolio { padding: 120px 0; background-color: var(--black-light); }

.portfolio-filters { display: flex; justify-content: center; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; }

.filter-btn {
    padding: 10px 24px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    background: transparent;
    color: var(--gray);
    border: 1px solid var(--gray-dark);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active { background-color: var(--red); color: var(--white); border-color: var(--red); }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.portfolio-item { position: relative; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; cursor: pointer; }

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-dark) 0%, var(--black) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--gray);
    border: 2px dashed var(--gray-dark);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95), transparent);
    transform: translateY(100%);
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay { transform: translateY(0); }
.portfolio-overlay h3 { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; margin-bottom: 4px; }
.portfolio-overlay p { color: var(--red); font-size: 0.85rem; font-weight: 500; }

/* About */
.about { padding: 120px 0; background-color: var(--black); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

.about-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--gray-dark) 0%, var(--black-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--gray);
    border: 2px dashed var(--gray-dark);
    border-radius: 8px;
}

.about-text { color: var(--gray); font-size: 1.05rem; line-height: 1.8; margin-bottom: 24px; }
.about-stats { display: flex; gap: 48px; margin-top: 48px; }
.stat { display: flex; flex-direction: column; }
.stat-number { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700; color: var(--red); line-height: 1; }
.stat-label { font-size: 0.85rem; color: var(--gray); margin-top: 8px; }

/* Contact */
.contact { padding: 120px 0; background-color: var(--black-light); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.contact-text { color: var(--gray); font-size: 1.05rem; line-height: 1.8; margin-bottom: 32px; }
.contact-links { display: flex; flex-direction: column; gap: 16px; }

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--white);
    transition: var(--transition);
}

.contact-link:hover { color: var(--red); }
.contact-link svg { width: 24px; height: 24px; }

.contact-form { background-color: var(--black); padding: 48px; border-radius: 8px; border: 1px solid var(--gray-dark); }
.form-group { margin-bottom: 20px; }

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background-color: var(--black-light);
    color: var(--white);
    border: 1px solid var(--gray-dark);
    border-radius: 4px;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--red); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--gray); }

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.form-group select option { background-color: var(--black); color: var(--white); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* Footer */
.footer { padding: 48px 0; background-color: var(--black); border-top: 1px solid var(--gray-dark); }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.footer-logo img { height: 28px; width: auto; }
.footer-social { display: flex; gap: 24px; }

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: var(--transition);
}

.footer-social a:hover { color: var(--red); }
.footer-social svg { width: 20px; height: 20px; }
.footer-text { font-size: 0.8rem; color: var(--gray); }

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    z-index: 9998;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5); }
.whatsapp-float svg { width: 28px; height: 28px; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }

/* Chatbot */
.chatbot { position: fixed; bottom: 24px; right: 24px; z-index: 9999; }

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--red);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(229, 57, 53, 0.4);
    transition: var(--transition);
}

.chatbot-toggle:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(229, 57, 53, 0.5); }
.chatbot-toggle svg { width: 24px; height: 24px; }
.chatbot-toggle .close-icon { display: none; }
.chatbot.active .chatbot-toggle .chat-icon { display: none; }
.chatbot.active .chatbot-toggle .close-icon { display: block; }

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 480px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.chatbot.active .chatbot-window { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.chatbot-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background-color: var(--red); color: var(--white); }

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--white);
    color: var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
}

.chatbot-info { display: flex; flex-direction: column; }
.chatbot-name { font-weight: 600; font-size: 0.9rem; }
.chatbot-status { font-size: 0.75rem; opacity: 0.9; }

.chatbot-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; background-color: var(--gray-light); }

.chat-message { max-width: 85%; padding: 12px 16px; border-radius: 12px; font-size: 0.9rem; line-height: 1.5; animation: messageIn 0.3s ease-out; }
@keyframes messageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.chat-message.bot { align-self: flex-start; background-color: var(--white); color: var(--black); border: 1px solid rgba(0, 0, 0, 0.1); border-bottom-left-radius: 4px; }
.chat-message.user { align-self: flex-end; background-color: var(--red); color: var(--white); border-bottom-right-radius: 4px; }

.chatbot-quick-actions { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid rgba(0, 0, 0, 0.1); overflow-x: auto; background-color: var(--white); }

.quick-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    background-color: var(--gray-light);
    color: var(--gray-dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.quick-btn:hover { background-color: var(--red); color: var(--white); border-color: var(--red); }

.chatbot-input { display: flex; gap: 8px; padding: 16px 20px; border-top: 1px solid rgba(0, 0, 0, 0.1); background-color: var(--white); }

.chatbot-input input {
    flex: 1;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    background-color: var(--gray-light);
    color: var(--black);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    outline: none;
    transition: var(--transition);
}

.chatbot-input input:focus { border-color: var(--red); }
.chatbot-input input::placeholder { color: var(--gray); }

.chatbot-input button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--red);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chatbot-input button:hover { background-color: var(--red-dark); }
.chatbot-input button svg { width: 18px; height: 18px; }

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--black);
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active { right: 0; }
    .nav-toggle { display: block; z-index: 1001; }
    .nav-toggle.active .hamburger { background-color: transparent; }
    .nav-toggle.active .hamburger::before { top: 0; transform: rotate(45deg); }
    .nav-toggle.active .hamburger::after { top: 0; transform: rotate(-45deg); }
    .hero-title { font-size: clamp(2rem, 10vw, 3.5rem); }
    .services-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; gap: 48px; }
    .about-stats { justify-content: space-between; }
    .contact-grid { grid-template-columns: 1fr; gap: 48px; }
    .contact-form { padding: 32px 24px; }
    .chatbot-window { width: calc(100vw - 48px); right: 0; bottom: 72px; height: 420px; }
}

@media (max-width: 480px) {
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; }
    .about-stats { flex-direction: column; gap: 24px; }
    .stat { flex-direction: row; align-items: baseline; gap: 12px; }
}
