/* --- DESIGN SYSTEM COLOR TOKENS --- */
:root {
    /* Dark Mode variables (default) */
    --color-bg: hsl(222, 47%, 6%);
    --color-bg-card: hsla(222, 40%, 12%, 0.7);
    --color-bg-header: rgba(9, 13, 22, 0.85);
    --color-text-main: hsl(0, 0%, 96%);
    --color-text-muted: hsl(220, 15%, 72%);
    --color-border: hsla(220, 20%, 25%, 0.4);
    --color-primary: hsl(263, 90%, 55%); /* Cyber Purple */
    --color-secondary: hsl(190, 90%, 50%); /* Neon Cyan */
    --color-card-glow: rgba(0, 229, 255, 0.08);
    --color-badge-bg: rgba(124, 77, 255, 0.1);
    
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-accent: 'Outfit', sans-serif;
    
    --transition-theme: background-color 0.4s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    --transition-normal: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="light"] {
    /* Light Mode variables */
    --color-bg: hsl(220, 30%, 95%);
    --color-bg-card: hsla(0, 0%, 100%, 0.9);
    --color-bg-header: rgba(240, 242, 245, 0.85);
    --color-text-main: hsl(222, 47%, 12%);
    --color-text-muted: hsl(220, 15%, 38%);
    --color-border: hsla(220, 15%, 80%, 0.7);
    --color-primary: hsl(263, 80%, 45%);
    --color-secondary: hsl(190, 85%, 38%);
    --color-card-glow: rgba(0, 184, 212, 0.06);
    --color-badge-bg: rgba(103, 58, 183, 0.08);
}

/* --- DYNAMIC CUSTOM CURSOR --- */
.custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-secondary);
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.custom-cursor-outline {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--color-secondary);
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.08s ease-out, width 0.2s, height 0.2s, border-color 0.2s;
}

.custom-cursor-dot.hovered {
    width: 10px;
    height: 10px;
    background-color: var(--color-primary);
}

.custom-cursor-outline.hovered {
    width: 50px;
    height: 50px;
    border-color: var(--color-primary);
    background-color: rgba(124, 77, 255, 0.04);
}

@media (pointer: fine) {
    body, a, button, select, input, textarea, .project-card, .service-card {
        cursor: none !important;
    }
}

@media (max-width: 1024px) {
    .custom-cursor-dot, .custom-cursor-outline {
        display: none !important;
    }
}

/* --- RESET & LAYOUT --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: var(--transition-theme);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.glow-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow-bg::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 77, 255, 0.12) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
}

.glow-bg::after {
    content: '';
    position: absolute;
    bottom: 20%;
    right: 5%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.1) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
    font-family: var(--font-accent);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.huge-heading {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--color-text-main) 60%, var(--color-text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* Text Reveal Scroller Effect */
.text-reveal {
    opacity: 0.15;
    transform: translateY(15px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-active .text-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Add slight transition delay to paragraph reveal */
p.text-reveal {
    transition-delay: 0.15s;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    text-decoration: none;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(124, 77, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 26px rgba(124, 77, 255, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* --- FLOATING THEME SELECTOR --- */
.floating-theme-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    z-index: 1001;
    backdrop-filter: blur(12px);
    transition: all var(--transition-normal);
}

.floating-theme-btn:hover {
    transform: scale(1.08) rotate(15deg);
    border-color: var(--color-secondary);
    box-shadow: 0 12px 35px var(--color-card-glow);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* --- HEADER NAVBAR --- */
.agency-header {
    height: 85px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    z-index: 1000;
    background: var(--color-bg-header);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-theme);
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-accent);
    font-weight: 900;
    font-size: 1.4rem;
}

.logo-bracket { color: var(--color-secondary); }
.logo-text {
    background: linear-gradient(135deg, var(--color-text-main) 40%, var(--color-text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-secondary);
}

/* --- HERO SECTION --- */
.hero-section {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 850px;
}

.hero-badge {
    display: inline-block;
    background: var(--color-badge-bg);
    border: 1px solid rgba(124, 77, 255, 0.2);
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 8px 20px;
    border-radius: 30px;
    margin-bottom: 28px;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--color-text-main) 60%, var(--color-text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--color-text-muted);
    margin-bottom: 44px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* --- SPLIT / REVEAL SECTIONS (Responsive fix) --- */
.split-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 70px;
    align-items: center;
    padding: 100px 0;
    width: 100%;
}

.split-layout.reverse {
    grid-template-columns: 0.9fr 1.1fr;
}

.split-layout.reverse .split-text {
    order: 2;
}

.split-layout.reverse .split-image {
    order: 1;
}

.section-tag {
    display: inline-block;
    color: var(--color-secondary);
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.split-image {
    position: relative;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.mockup-img {
    max-width: 520px; /* Constrains image sizes so they do not expand offscreen */
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.mockup-img:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 20px 45px var(--color-card-glow);
}

/* --- SERVICES GRID --- */
.services-section {
    padding: 120px 0;
    border-top: 1px solid var(--color-border);
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 70px auto;
}

.section-header h2 {
    margin-bottom: 18px;
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
}

.service-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 50px 35px;
    backdrop-filter: blur(12px);
    transition: all var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-secondary);
    box-shadow: 0 15px 35px var(--color-card-glow);
}

.service-icon {
    font-size: 2.8rem;
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 14px;
}

.service-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* --- PORTFOLIO (Rich Preview Cards) --- */
.portfolio-section {
    padding: 120px 0;
    border-top: 1px solid var(--color-border);
    background: rgba(255,255,255,0.005);
    position: relative;
    z-index: 1;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 35px;
}

.project-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 0; /* Clear default padding to fit header image preview */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
    transition: all var(--transition-normal);
    height: auto; /* Dynamic height to fit previews */
    min-height: 490px;
    width: 100%;
    position: relative;
}

.project-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    display: block;
}

.project-preview-img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center top;
    transition: transform var(--transition-normal);
}

.project-card:hover .project-preview-img {
    transform: scale(1.05);
}

.project-content-wrapper {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.project-card:hover {
    transform: translateY(-8px);
}

.client-card:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 15px 40px var(--color-card-glow);
}

.app-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 15px 40px rgba(124, 77, 255, 0.1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.project-badge {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.badge-active {
    background: rgba(0, 229, 255, 0.1);
    color: var(--color-secondary);
}

.badge-testing {
    background: rgba(255, 153, 51, 0.1);
    color: #ff9933;
}

.project-type {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.project-card h3 {
    font-size: 1.45rem;
    margin-bottom: 10px;
}

.project-desc {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    margin-bottom: 24px;
    flex: 1;
}

.project-link-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-border);
    padding-top: 22px;
}

.subdomain-text {
    font-size: 0.8rem;
    font-family: monospace;
    color: var(--color-text-muted);
    max-width: 65%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-launch {
    padding: 7px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 20px;
    background: var(--color-secondary);
    color: #090d16;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.btn-launch:hover {
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    transform: translateY(-1px);
}

.btn-launch.disabled {
    background: rgba(255,255,255,0.05);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    cursor: not-allowed;
    pointer-events: none;
}

/* --- CONTACT SECTION --- */
.contact-section {
    padding: 120px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.contact-box {
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.05), rgba(0, 229, 255, 0.05));
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 70px 40px;
    max-width: 850px;
    margin: 0 auto;
    backdrop-filter: blur(12px);
    transition: all var(--transition-normal);
}

.contact-box:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 20px 50px var(--color-card-glow);
}

.contact-box h2 {
    margin-bottom: 18px;
}

.contact-box p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 35px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

/* --- FOOTER --- */
.agency-footer {
    padding: 45px 24px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.88rem;
    color: var(--color-text-muted);
    position: relative;
    z-index: 1;
}

/* --- RESPONSIVENESS --- */
@media (max-width: 968px) {
    .split-layout, .split-layout.reverse {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .split-layout.reverse .split-text {
        order: 1;
    }
    .split-layout.reverse .split-image {
        order: 2;
    }
    .hero-title {
        font-size: 3rem;
    }
    .huge-heading {
        font-size: 2.6rem;
    }
}

@media (max-width: 768px) {
    .agency-header {
        padding: 0 20px;
    }
    .navbar {
        display: none;
    }
    .hero-title {
        font-size: 2.6rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
    }
    .huge-heading {
        font-size: 2.2rem;
    }
    .floating-theme-btn {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }
}
