:root {
    --bg-color: #000204;
    --bg-secondary: #121214;
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --accent: #ff6700;
    /* Brand Orange */
    --accent-hover: #e65c00;
    --border: #333333;

    --container-width: 1200px;
    --header-height: 80px;

    --font-main: 'Outfit', sans-serif;
}

body.light-mode {
    --bg-color: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-main: #000204;
    --text-muted: #4a4a4a;
    --border: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    color: #cecece;
    /* Slightly increased contrast from #b0b0b0 */
    margin-bottom: 1.5rem;
}

.overline {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

.subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.outline-text {
    color: var(--accent);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.small-container {
    max-width: 600px;
}



.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent);
    color: #000;
    border: 2px solid var(--accent);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    /* Reduced visual weight */
    border: 1px solid var(--border);
    /* Thinner border */
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
}

.full-width {
    width: 100%;
    margin-left: 0;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--header-bg, rgba(0, 2, 4, 0.9));
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

body.light-mode .logo-img {
    filter: invert(1) brightness(0.2);
    /* Make it dark blue-black */
}

.logo .accent {
    color: var(--accent);
}

.desktop-nav {
    display: flex;
    align-items: center;
}

.desktop-nav a {
    margin-left: 2rem;
    font-size: 0.95rem;
    /* Slightly larger */
    font-weight: 700;
    /* Increased font weight */
    letter-spacing: 0.02em;
}

.desktop-nav a:hover {
    color: var(--accent);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    margin-left: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.theme-toggle .sun {
    display: none;
}

body.light-mode .theme-toggle .sun {
    display: block;
}

body.light-mode .theme-toggle .moon {
    display: none;
}

/* Portfolio Loading & Items */
.loading-state {
    color: var(--text-muted);
    font-style: italic;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

.portfolio-item {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-item:nth-child(2) {
    animation-delay: 0.1s;
}

.portfolio-item:nth-child(3) {
    animation-delay: 0.2s;
}

.portfolio-item:nth-child(4) {
    animation-delay: 0.3s;
}

.portfolio-item:nth-child(n+5) {
    animation-delay: 0.4s;
}

.btn-nav {
    border: 1px solid var(--accent);
    /* Consistent with primary CTA */
    color: var(--accent);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    margin-left: 2rem;
    font-weight: 700;
}

.btn-nav:hover {
    background-color: var(--accent);
    color: #000;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
}

.mobile-nav-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    padding: 2rem;
    display: none;
    /* JS will toggle this */
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    z-index: 999;
    transition: background-color 0.3s ease;
}

.mobile-nav-overlay.active {
    display: flex;
}

.mobile-link {
    font-size: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--bg-secondary);
}

/* Sections */
section {
    padding: 8rem 0;
    /* More spacing for modern feel */
}

/* Alternating Backgrounds */
section:nth-of-type(even) {
    background-color: var(--bg-secondary);
    /* Lighter shade */
}

section:nth-of-type(odd) {
    background-color: var(--bg-color);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grids */
.services-grid .service-card:nth-child(2) {
    transition-delay: 0.1s;
}

.services-grid .service-card:nth-child(3) {
    transition-delay: 0.2s;
}


/* Hero */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
    /* Background handled by img tag now */
    background-color: #000204;
    overflow: hidden;
    /* Ensure image doesn't spill out */
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-overlay {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    transition: background 0.3s ease;
}

body.light-mode .hero-overlay {
    background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.8));
}

body.light-mode #hero img {
    opacity: 0.1 !important;
}



/* Services */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.service-icon {
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: inline-flex;
}

.service-icon svg {
    width: 48px;
    height: 48px;
}

/* SEO & Who This Is For */
#seo-overview {
    text-align: center;
}

.seo-block {
    max-width: 800px;
    margin: 0 auto 6rem;
}

.seo-block h2 {
    margin-bottom: 2rem;
}

.seo-block p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.target-audience h3 {
    margin-bottom: 3rem;
    color: var(--text-main);
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.audience-card {
    background-color: var(--bg-secondary);
    padding: 2.5rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.audience-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.audience-icon {
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.audience-icon svg {
    width: 32px;
    height: 32px;
}

.audience-card p {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Portfolio */
.portfolio-carousel-wrapper {
    position: relative;
    padding: 0 1rem;
}

.portfolio-grid {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 2rem;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    scroll-behavior: auto;
    /* Managed by JS for seamless loop */
    scroll-snap-type: none;
    /* Disabled for seamless infinite transitions */
}

.portfolio-grid::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.portfolio-item {
    flex: 0 0 calc(50% - 0.75rem);
    /* 2 items on mobile */
    scroll-snap-align: start;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

@media (min-width: 768px) {
    .portfolio-item {
        flex: 0 0 calc(33.333% - 1rem);
        /* 3 items on tablets */
    }
}

@media (min-width: 1024px) {
    .portfolio-item {
        flex: 0 0 calc(25% - 1.125rem);
        /* Exactly 4 items on desktop */
    }
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 2, 4, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease, background 0.3s ease;
}

body.light-mode .portfolio-overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), transparent);
}

.portfolio-info h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.portfolio-info .category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    font-weight: 600;
}

.portfolio-caption {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-bottom: 0;
    opacity: 0.8;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.carousel-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.carousel-btn.prev {
    left: -22px;
}

.carousel-btn.next {
    right: -22px;
}

@media (max-width: 1024px) {
    .carousel-btn {
        display: none;
        /* Hide buttons on mobile/touch, rely on native scroll */
    }

    .portfolio-carousel-wrapper {
        padding: 0;
    }
}

/* About / Split */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 1rem;
}

.feature-list li::before {
    content: '>';
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.visual-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.visual-img:hover {
    transform: scale(1.02);
}

/* Process */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    position: relative;
}

.step {
    text-align: center;
    position: relative;
}

.step-num {
    font-size: 4rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px var(--border);
    line-height: 1;
    margin-bottom: 1rem;
    transition: -webkit-text-stroke 0.3s ease;
}

.step:hover .step-num {
    -webkit-text-stroke: 1px var(--accent);
}

.step h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.step p {
    font-size: 0.95rem;
    max-width: 200px;
    margin: 0 auto;
}

/* FAQ Accordion */
.faq-accordion {
    margin-top: 2rem;
    border-top: 1px solid var(--border);
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
    font-family: inherit;
    transition: color 0.3s ease;
}

.faq-question span:first-child {
    font-size: 1.1rem;
    font-weight: 600;
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform 0.3s ease;
    margin-left: 1rem;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
    overflow: hidden;
}

.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer-inner {
    min-height: 0;
}

.faq-answer p {
    padding-bottom: 2rem;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Contact */
.contact-form {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: 4px;
    font-family: inherit;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Footer */
footer {
    padding: 6rem 0 3rem;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo-link {
    display: block;
    margin-bottom: 1.5rem;
}

.footer-seo-text {
    font-size: 0.9rem;
    max-width: 400px;
    line-height: 1.6;
}

.footer-nav {
    display: flex;
    gap: 4rem;
}

.footer-links-group h4 {
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    letter-spacing: 0.1em;
}

.footer-links-group a {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.footer-links-group a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.75rem;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: left;
    }

    .footer-nav {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    input,
    select,
    textarea,
    .btn {
        min-height: 44px;
        /* Tap targets */
    }
}

/* Form UX Enhancements */
.form-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
    display: block;
}

.contact-form .form-group.error input {
    border-color: #ff4444;
}

.error-message {
    color: #ff4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 2, 4, 0.95);
    backdrop-filter: blur(10px);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.5, 0, 0, 1), background-color 0.3s ease;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

body.light-mode .lightbox {
    background-color: rgba(255, 255, 255, 0.95);
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 85%;
    max-height: 80vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.5, 0, 0, 1);
    object-fit: contain;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    color: var(--text-main);
    font-size: 40px;
    font-weight: 200;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease, transform 0.3s ease;
}

.lightbox-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.lightbox-caption {
    margin-top: 2rem;
    color: var(--text-main);
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 32px;
    }

    .lightbox-content {
        max-width: 95%;
    }
}