/* =========================================
   Selamat Digital - Premium Agency Stylesheet
   ========================================= */

:root {
    /* Core Layout Tokens */
    --container-width: 1280px;
    --bento-gap: 20px;
    --border-radius: 16px;

    /* Base Colors (Deep Dark Theme Default) */
    --bg-main: #09090b;
    /* Zinc 950 */
    --bg-card: rgba(24, 24, 27, 0.7);
    /* Zinc 900 w/ opacity for glass */
    --bg-card-hover: rgba(39, 39, 42, 0.8);
    /* Zinc 800 */

    --text-primary: #fafafa;
    --text-muted: #a1a1aa;

    /* Accents (Neon/Cyber/Premium feel) */
    --accent-primary: #3b82f6;
    /* Blue 500 */
    --accent-glow: rgba(59, 130, 246, 0.15);

    /* Borders */
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
    --border-glass-hover: 1px solid rgba(255, 255, 255, 0.2);

    /* Typography */
    --font-heading: 'General Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* =========================================
   Buttons & UI Elements
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    gap: 8px;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-main);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(250, 250, 250, 0.1);
}

/* =========================================
   Navbar (Glassmorphic)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-smooth);
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: var(--border-glass);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--text-muted);
    font-weight: 400;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.btn-primary {
    color: var(--bg-main);
}

.nav-links a.btn-primary:hover {
    color: var(--bg-main);
    /* Removing the background override so it retains its premium white appearance */
    /* Relying on the global .btn-primary:hover for the scale and shadow */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    /* Add a distinct premium glow */
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    width: 24px;
}

.hamburger .bar {
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.hamburger .bar:nth-child(2) {
    width: 16px;
    align-self: flex-end;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Will handle mobile menu later */
    }

    .hamburger {
        display: flex;
    }
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    padding: 160px 0 100px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(40px, 8vw, 76px);
    letter-spacing: -2px;
    margin-bottom: 24px;
    max-width: 900px;
}

.hero-title span {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
}

/* Base button outlines */
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Abstract Background Glow */
.hero-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(9, 9, 11, 0) 70%);
    z-index: 1;
    pointer-events: none;
    filter: blur(60px);
    animation: pulse 8s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 120px 0 60px 0;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .hero-cta .btn {
        width: 100%;
    }
}

/* =========================================
   Global Section Styles
   ========================================= */
.section-padding {
    padding: 120px 0;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    text-align: center;
    margin-bottom: 16px;
}

.section-title span {
    color: var(--accent-primary);
}

.section-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 60px;
    max-width: 600px;
    margin-inline: auto;
}

/* =========================================
   Bento Box Grid (Services)
   ========================================= */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 300px;
    /* Increased from 240px to prevent text overflow */
    gap: var(--bento-gap);
}

.bento-card {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: var(--border-radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.bento-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border: var(--border-glass-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.bento-card:hover::before {
    opacity: 1;
}

.bento-card:hover::before {
    opacity: 1;
}

/* AI Service Images */
.bento-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity var(--transition-smooth);
    filter: brightness(0.6) contrast(1.1);
}

.bento-card:hover .bento-bg {
    transform: scale(1.05);
    opacity: 0.8;
}

/* Glassmorphic content overlaying the image */
.bento-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    padding-top: 60px;
    /* Space above text */
}

.bento-card h3 {
    font-size: 20px;
    margin-top: 24px;
    margin-bottom: 8px;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.bento-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.bento-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-primary);
    font-family: var(--font-heading);
    background: rgba(59, 130, 246, 0.1);
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Bento Grid Spans */
.col-span-2 {
    grid-column: span 2;
}

.col-span-3 {
    grid-column: span 3;
}

.row-span-2 {
    grid-row: span 2;
}

/* Highlight Card Specifics */
.highlight-card {
    background: linear-gradient(145deg, rgba(39, 39, 42, 0.9) 0%, rgba(24, 24, 27, 0.8) 100%);
}

.highlight-card .bento-bg {
    /* Different filter for the main featured card */
    filter: brightness(0.7) sepia(0.2) hue-rotate(-20deg) contrast(1.1);
}

.highlight-card h3 {
    font-size: 28px;
}

.highlight-card p {
    font-size: 16px;
    max-width: 90%;
}

.tech-tags {
    display: flex;
    gap: 12px;
    list-style: none;
    margin-top: 24px;
    position: relative;
    z-index: 1;
    /* Keep tags above background */
}

.tech-tags li {
    font-size: 12px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: var(--text-primary);
}

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

@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        min-height: 240px;
    }

    .col-span-2,
    .col-span-3,
    .row-span-2 {
        grid-column: span 1;
        grid-row: span 1;
    }

    .bento-card {
        min-height: 240px;
    }
}

/* =========================================
   Digital Products & SaaS / Pricing Tiers
   ========================================= */
.pricing-category {
    margin-bottom: 80px;
}

.pricing-category:last-child {
    margin-bottom: 0;
}

.category-title {
    display: block;
    width: 100%;
    font-size: 32px;
    text-align: center;
    margin: 0 auto 40px auto;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 16px;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 2px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.products-grid.grid-2-col {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 0 auto;
}

.products-grid.grid-1-col {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .products-grid.grid-2-col {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(145deg, rgba(39, 39, 42, 0.5), rgba(24, 24, 27, 0.5));
    border-bottom: var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-placeholder {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-smooth), color var(--transition-fast);
}

.product-card:hover .product-img-placeholder {
    transform: scale(1.1);
    color: rgba(59, 130, 246, 0.3);
}

.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.product-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-content h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.product-content p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 24px;
}

/* Pricing Section Specifics */
.pricing-features {
    list-style: none;
    margin-bottom: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-features li {
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li i {
    color: var(--accent-primary);
    font-size: 12px;
}

/* Highlighted Pro Tier */
.pricing-highlight {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

@media (min-width: 1025px) {
    .pricing-highlight {
        /* Removed margin-top/bottom to ensure all cards are identical size */
        transform: scale(1.05);
        /* Slight pop without breaking layout height */
    }
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: var(--border-glass);
}

.product-footer .price {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

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

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Onboarding / Contact Form
   ========================================= */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: var(--border-radius);
    padding: 48px;
    backdrop-filter: blur(10px);
}

.form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    margin-bottom: 32px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(9, 9, 11, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.form-group textarea {
    resize: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: rgba(9, 9, 11, 0.8);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23A1A1AA%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 16px top 50%;
    background-size: 12px auto;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
}

@media (max-width: 640px) {
    .form-row {
        flex-direction: column;
        gap: 24px;
    }

    .form-container {
        padding: 32px 20px;
    }
}

/* =========================================
   Footer
   ========================================= */
footer {
    border-top: var(--border-glass);
    padding: 60px 0 40px;
    background: rgba(9, 9, 11, 0.8);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
}

.footer-logo span {
    color: var(--text-muted);
    font-weight: 400;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 15px;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.social-links {
    display: flex;
    gap: 24px;
}

.social-links a {
    color: var(--text-muted);
    font-size: 24px;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    color: var(--accent-primary);
    transform: translateY(-4px);
}

.footer-bottom {
    margin-top: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

/* =========================================
   Animations & Interactions
   ========================================= */

/* JS Scroll Reveal Classes */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Nav Overlay */
@media (max-width: 768px) {
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(9, 9, 11, 0.95);
        backdrop-filter: blur(20px);
        padding: 32px;
        border-bottom: var(--border-glass);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}