/* ===== BUILDLUCENT — PRECISION ENGINEERING AESTHETIC ===== */
:root {
    /* Primary Palette - Deep Midnight */
    --primary: #0A1628;
    --primary-light: #1E3A5F;
    --primary-hover: #0D1D33;

    /* Accent - Golden (Precision Highlight) */
    --accent: #D4AF37;
    --accent-hover: #C5A028;
    --accent-glow: rgba(212, 175, 55, 0.15);

    /* Neutrals */
    --black: #020617;
    --dark-surface: #F1F5F9;
    --white: #FAFBFC;
    --surface: #FFFFFF;

    /* Text */
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-inverse: #F8FAFC;

    /* Borders & Lines */
    --border: #E2E8F0;
    --border-light: #F1F5F9;

    /* Typography */
    --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Motion */
    --ease-fluid: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 32px;
    --space-xl: 64px;
    --space-2xl: 128px;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--white);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1, 'liga' 1;
}

/* Dot Grid Background Pattern */
.dot-grid {
    background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Noise Texture Overlay */
.noise-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-main);
}

h3,
h4 {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--text-main);
}

p {
    color: var(--text-muted);
    line-height: 1.7;
}

.text-highlight {
    color: var(--accent);
}

/* Accent underline for emphasis */
.accent-underline {
    position: relative;
    display: inline-block;
}

.accent-underline::after {
    content: '';
    position: absolute;
    bottom: 0.1em;
    left: 0;
    width: 100%;
    height: 0.15em;
    background: var(--accent);
    opacity: 0.4;
    z-index: -1;
}

/* ===== NAVBAR (Precision Floating Design) ===== */
.header {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    z-index: 100;
    padding: 14px 32px;
    background: transparent;
    border-radius: 100px;
    display: flex;
    justify-content: center;
    transition: all 0.5s var(--ease-fluid);
}

/* Default Header State (On Dark Hero) */
.header .logo,
.header .nav-link {
    color: var(--text-inverse);
}

.header .logo-icon {
    filter: brightness(0) invert(1);
}

.header .mobile-toggle span {
    background: var(--text-inverse);
}

.header .btn-primary {
    background: var(--accent);
    color: var(--primary);
    font-weight: 600;
}

.header .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Scrolled State: Frosted Glass */
.header.scrolled {
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.05) inset;
    padding: 12px 28px;
    width: auto;
    min-width: min(88%, 860px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.header.scrolled .logo,
.header.scrolled .nav-link {
    color: var(--text-inverse);
}

.header.scrolled .logo-icon {
    filter: brightness(0) invert(1);
}

.header.scrolled .btn-primary {
    background: var(--accent);
    color: var(--primary);
}

.header.scrolled .btn-primary:hover {
    background: var(--accent-hover);
}

/* Ensure navbar items align properly */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 24px;
}

/* Specific fix for button spacing when scrolled/compressed */
.header .btn {
    margin-left: 12px;
}

.logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--black);
    white-space: nowrap;
    margin-right: 48px;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23000000"><path d="M12 2L2 12h3v8h6v-6h2v6h6v-8h3L12 2z"/></svg>') no-repeat center/contain;
    flex-shrink: 0;
}

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

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.25s var(--ease-fluid);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s var(--ease-fluid);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
}

.nav-link.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== DROPDOWN ===== */
.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 260px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-fluid);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(10px);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--dark-surface);
}

.dropdown-item strong {
    display: block;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 2px;
}

.dropdown-item span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: all 0.3s var(--ease-fluid);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
    box-shadow: 0 2px 8px rgba(10, 22, 40, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 22, 40, 0.2);
}

.btn-accent {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary-yellow {
    background: var(--accent);
    color: var(--primary);
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
}

.btn-primary-yellow:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.arrow {
    display: inline-block;
    transition: transform 0.3s var(--ease-bounce);
}

.btn:hover .arrow {
    transform: translateX(4px);
}

/* ===== LUCENT CUBE (Minimalistic 3D Element) ===== */
.lucent-cube-container {
    perspective: 1000px;
    width: 60px;
    height: 60px;
    position: absolute;
    /* Positioning will be handled per section */
    z-index: 10;
    pointer-events: none;
}

.lucent-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
}

.cube-face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    opacity: 0.8;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.face-front {
    transform: rotateY(0deg) translateZ(30px);
}

.face-right {
    transform: rotateY(90deg) translateZ(30px);
}

.face-back {
    transform: rotateY(180deg) translateZ(30px);
}

.face-left {
    transform: rotateY(-90deg) translateZ(30px);
}

.face-top {
    transform: rotateX(90deg) translateZ(30px);
}

.face-bottom {
    transform: rotateX(-90deg) translateZ(30px);
}

/* Internal grid lines for the "puzzle" look */
.cube-face::before,
.cube-face::after {
    content: '';
    position: absolute;
    background: var(--border);
}

.cube-face::before {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
}

.cube-face::after {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
}

/* Highlight specific cells to look like a Rubik's scramble */
.cube-face .cell {
    width: 100%;
    height: 100%;
    /* Keep mostly white, add subtle blue hints */
}

.cube-face .cell:nth-child(1) {
    background: rgba(0, 102, 255, 0.05);
}

.cube-face .cell:nth-child(4) {
    background: rgba(0, 102, 255, 0.1);
}

@keyframes rotateCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* Specific placements */
.hero .lucent-cube-container {
    top: 10%;
    right: 5%;
    opacity: 0.6;
}

.services .lucent-cube-container {
    bottom: -30px;
    left: 5%;
    /* Adjusted width/height for service cards if needed */
    width: 40px;
    height: 40px;
}

.services .cube-face {
    width: 40px;
    height: 40px;
    transform: rotateY(0deg) translateZ(20px);
}

/* Hero specific overrides for cleaner positioning */
.hero-visual {
    position: relative;
}

/* Ensure it can contain absolute cues if moved inside */
.hero {
    padding: 200px 0 120px;
    background: var(--primary);
    color: var(--text-inverse);
    overflow: hidden;
    position: relative;
    text-align: left;
}

/* Decorative Lines Element */
.hero-deco-lines {
    position: absolute;
    right: 5%;
    bottom: -50px;
    width: 300px;
    height: 400px;
    z-index: 1;
    pointer-events: none;
}

.hero-deco-lines svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 900px) {
    .hero-deco-lines {
        display: none;
    }
}

/* Page Decorative Lines (for inner pages) */
.page-deco-lines {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    height: 350px;
    z-index: 1;
    pointer-events: none;
}

.page-deco-lines svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 900px) {
    .page-deco-lines {
        display: none;
    }
}

/* Hero gradient overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 80% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 10% 80%, rgba(30, 58, 95, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

/* Subtle grid pattern on hero */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-container-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(48px, 5vw, 72px);
    margin-bottom: 28px;
    color: var(--text-inverse);
    line-height: 1.05;
}

.hero-title .text-highlight {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 48px;
    color: rgba(248, 250, 252, 0.8);
    max-width: 520px;
    line-height: 1.7;
}

/* Email Capture Form */
.hero-form-wrapper {
    background: var(--surface);
    padding: 6px;
    border-radius: 100px;
    display: flex;
    max-width: 480px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    margin-bottom: 48px;
}

.hero-email-form {
    display: flex;
    width: 100%;
    align-items: center;
}

.hero-email-form input {
    flex: 1;
    border: none;
    padding: 14px 24px;
    border-radius: 100px;
    outline: none;
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--text-main);
    background: transparent;
}

.hero-email-form input::placeholder {
    color: var(--text-muted);
}

.hero-email-form .btn {
    padding: 14px 24px;
}

/* Badges / Checkmarks */
.hero-badges {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(248, 250, 252, 0.85);
    font-weight: 500;
}

.check-icon {
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

/* ===== SECTIONS UI ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
}

section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 72px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.section-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 16px;
    padding: 6px 14px;
    background: var(--accent-glow);
    border-radius: 100px;
}

.section-title {
    font-size: clamp(36px, 4vw, 52px);
    margin-bottom: 20px;
    color: var(--text-main);
}

.section-desc {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== SERVICES GRID ===== */
.services {
    background: var(--dark-surface);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

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

.card-link {
    display: block;
    height: 100%;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    transition: all 0.4s var(--ease-fluid);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-fluid);
}

.card:hover {
    transform: translateY(-8px);
    border-color: transparent;
    box-shadow:
        0 20px 40px rgba(10, 22, 40, 0.08),
        0 0 0 1px rgba(10, 22, 40, 0.04);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border-radius: 14px;
    background: var(--primary);
    color: var(--text-inverse);
    transition: all 0.3s var(--ease-fluid);
}

.card:hover .card-icon {
    background: var(--accent);
    color: var(--primary);
    transform: scale(1.05);
}

.card-icon svg {
    stroke: currentColor;
}

.card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.card p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
}

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

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

/* ===== STATS SECTION ===== */
.stats-section {
    padding: 100px 0;
    background: var(--primary);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(48px, 5vw, 72px);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 15px;
    color: rgba(248, 250, 252, 0.7);
    font-weight: 500;
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

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

/* ===== MISSION / QUOTE SECTION ===== */
.mission-section {
    padding: 140px 0;
    background: var(--white);
    position: relative;
}

.mission-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.mission-quote {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.5vw, 44px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.mission-quote .highlight {
    color: var(--accent);
}

.mission-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.mission-author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-weight: 700;
    font-size: 20px;
}

.mission-author-info {
    text-align: left;
}

.mission-author-name {
    font-weight: 600;
    color: var(--text-main);
    font-size: 16px;
}

.mission-author-role {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== PROCESS / HOW WE WORK SECTION ===== */
.process-section {
    padding: 140px 0;
    background: var(--dark-surface);
    position: relative;
}

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

.process-step {
    position: relative;
    padding: 32px;
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease-fluid);
}

.process-step:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(10, 22, 40, 0.08);
}

.process-number {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 20px;
    display: inline-block;
    padding: 6px 12px;
    background: var(--accent-glow);
    border-radius: 100px;
}

.process-step h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.process-step p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
}

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

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

/* ===== TECH PARTNERS / LOGOS SECTION ===== */
.partners-section {
    padding: 100px 0;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.partners-header {
    text-align: center;
    margin-bottom: 48px;
}

.partners-header p {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 48px 64px;
}

.partner-logo {
    opacity: 0.5;
    transition: opacity 0.3s;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.partner-logo:hover {
    opacity: 1;
}

/* ===== FEATURES BENTO GRID ===== */
.features-section {
    padding: 140px 0;
    background: var(--white);
}

.features-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
}

.feature-card {
    background: var(--dark-surface);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-fluid);
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-card.large {
    grid-column: span 2;
}

.feature-card.tall {
    grid-row: span 2;
}

.feature-card.accent {
    background: var(--primary);
    color: var(--text-inverse);
}

.feature-card.accent h3,
.feature-card.accent p {
    color: var(--text-inverse);
}

.feature-card.accent p {
    opacity: 0.8;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--primary);
}

.feature-card.accent .feature-icon {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent);
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.feature-card p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .features-bento {
        grid-template-columns: 1fr;
    }

    .feature-card.large,
    .feature-card.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* ===== PAGE HERO (Shared) ===== */
.page-hero,
.service-detail-hero {
    padding: 200px 0 120px;
    background: var(--primary);
    text-align: center;
    color: var(--text-inverse);
    position: relative;
    overflow: hidden;
}

.page-hero::before,
.service-detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 100% 100%, rgba(30, 58, 95, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.page-hero::after,
.service-detail-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.page-hero .hero-title,
.service-detail-hero .section-title {
    color: var(--text-inverse);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.page-hero .hero-subtitle,
.service-detail-hero .hero-subtitle {
    color: rgba(248, 250, 252, 0.8);
    margin: 0 auto;
    font-size: 19px;
    max-width: 580px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.service-content {
    padding: 80px 0;
}

/* Service Page Split Layout */
.service-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 60px;
}

.service-text h2 {
    margin-bottom: 24px;
    font-size: 36px;
    line-height: 1.2;
}

.service-illustration {
    margin: 0;
    width: 100%;
    max-width: none;
    position: relative;
}

@media (max-width: 1024px) {
    .service-split-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .service-illustration {
        max-width: 500px;
        margin: 0 auto;
    }
}

.service-illustration img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow:
        0 24px 64px rgba(10, 22, 40, 0.12),
        0 8px 24px rgba(10, 22, 40, 0.08);
    transition: transform 0.4s var(--ease-fluid), box-shadow 0.4s var(--ease-fluid);
}

.service-illustration img:hover {
    transform: translateY(-4px);
    box-shadow:
        0 32px 80px rgba(10, 22, 40, 0.15),
        0 12px 32px rgba(10, 22, 40, 0.1);
}

/* Accent glow effect behind image */
.service-illustration::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    z-index: -1;
    filter: blur(40px);
    opacity: 0.5;
}

@media (max-width: 768px) {
    .service-illustration {
        margin: 40px auto;
        max-width: 100%;
    }

    .service-illustration img {
        border-radius: 16px;
    }
}

.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.tech-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-main);
}


/* ===== VALUE PROP / ABOUT CONTENT ===== */
.value-prop {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--dark-surface);
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.value-item h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.highlight-bar {
    width: 40px;
    height: 4px;
    background: var(--primary);
    margin-bottom: 20px;
    border-radius: 2px;
}

.section-text {
    padding: 60px 0;
}

.section-text p {
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-main);
}

/* ===== CTA SECTION (Precision Card) ===== */
.cta-section {
    padding: 140px 0;
    background: var(--dark-surface);
    position: relative;
}

.cta-card {
    background: var(--primary);
    border-radius: 28px;
    padding: 80px 72px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 80% at 100% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 40% 60% at 0% 100%, rgba(30, 58, 95, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.cta-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.cta-content {
    z-index: 2;
    text-align: left;
    position: relative;
}

.cta-content h2 {
    font-size: clamp(36px, 4vw, 52px);
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-inverse);
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 40px;
    color: rgba(248, 250, 252, 0.8);
    max-width: 460px;
    line-height: 1.7;
}

.cta-visual {
    position: relative;
    z-index: 2;
}

.cta-visual img {
    border-radius: 16px;
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: rotate(2deg);
    transition: transform 0.5s var(--ease-fluid);
    width: 380px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.cta-visual:hover img {
    transform: rotate(0deg) scale(1.03);
}

.cta-content .btn-primary {
    background: var(--accent);
    color: var(--primary);
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
}

.cta-content .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .cta-card {
        grid-template-columns: 1fr;
        padding: 60px 30px;
        text-align: center;
        gap: 40px;
    }

    .cta-content {
        text-align: center;
    }

    .cta-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .cta-visual img {
        transform: rotate(0deg);
        max-width: 100%;
    }
}

/* ===== CONTACT PAGE ===== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 72px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info-block {
    margin-bottom: 36px;
}

.contact-info-block h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.contact-info-block p {
    color: var(--text-muted);
}

.contact-form-full {
    background: var(--surface);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.contact-form-full label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-main);
}

.contact-form-full input,
.contact-form-full select,
.contact-form-full textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    background: var(--white);
    outline: none;
    transition: all 0.25s var(--ease-fluid);
    margin-bottom: 20px;
}

.contact-form-full input::placeholder,
.contact-form-full textarea::placeholder {
    color: var(--text-muted);
}

.contact-form-full textarea {
    resize: vertical;
    min-height: 140px;
    margin-bottom: 24px;
}

.contact-form-full input:focus,
.contact-form-full select:focus,
.contact-form-full textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact-form-full .btn {
    width: 100%;
}

@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ===== PROFESSIONAL FOOTER ===== */
.footer {
    background: var(--primary);
    padding: 100px 0 40px;
    font-size: 14px;
    color: rgba(248, 250, 252, 0.7);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 72px;
    position: relative;
    z-index: 1;
}

.footer-brand .logo {
    margin-right: 0;
    margin-bottom: 20px;
    color: var(--text-inverse);
}

.footer-brand p {
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 300px;
    color: rgba(248, 250, 252, 0.7);
}

.footer-col-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    display: block;
}

.footer-menu {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-menu a,
.footer-menu span {
    color: rgba(248, 250, 252, 0.7);
    transition: all 0.25s var(--ease-fluid);
}

.footer-menu a:hover {
    color: var(--text-inverse);
    transform: translateX(4px);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.social-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-fluid);
    color: var(--text-inverse);
}

.social-icon:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    color: rgba(248, 250, 252, 0.5);
}

.footer-legal {
    display: flex;
    gap: 28px;
}

.footer-legal a {
    color: rgba(248, 250, 252, 0.5);
    transition: color 0.25s;
}

.footer-legal a:hover {
    color: var(--text-inverse);
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== MOBILE ===== */
.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--black);
    margin: 0 auto;
    transition: 0.3s;
}

@media (max-width: 1024px) {
    .header.scrolled {
        padding: 12px 20px;
        min-width: 0;
        width: 90%;
    }

    .hero-container-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero {
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-form-wrapper {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-badges {
        justify-content: center;
    }

    /* Logo adjustments */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        border: 1px solid var(--border);
        flex-direction: column;
        padding: 32px;
        gap: 24px;
        text-align: center;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
        border-radius: 20px;
        margin-top: 16px;
        z-index: 1000;
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-menu.active {
        display: flex;
        white-space: normal;
        animation: slideDown 0.3s var(--ease-fluid);
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .mobile-toggle {
        display: flex;
    }

    .header .btn-primary {
        display: none;
    }

    .header .nav-menu .nav-link {
        color: var(--text-main);
        width: 100%;
        padding: 12px;
        display: block;
    }

    /* Ensure dropdowns in mobile menu are visible or flattened */
    .dropdown-content {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 0;
        opacity: 1;
        visibility: visible;
        background: transparent;
        margin-top: 12px;
        display: none;
        /* User clicks to open? Or flat? Let's make it flat for simplicity or just visible */
    }

    .dropdown:hover .dropdown-content {
        transform: none;
    }

    /* Show dropdown content inline nicely */
    .nav-menu .dropdown-content {
        display: block;
        padding-left: 0;
    }

    .nav-menu .dropdown-item {
        padding: 12px;
        background: var(--dark-surface);
        margin-bottom: 8px;
        text-align: left;
    }

    .nav-menu .nav-link.dropdown-trigger {
        justify-content: center;
        font-weight: 700;
        margin-bottom: 8px;
        pointer-events: none;
        /* Make it just a label in mobile */
    }

    .nav-menu .nav-link.dropdown-trigger svg {
        display: none;
    }
}

/* Animations */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease-fluid), transform 0.8s var(--ease-fluid);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* ===== TECH STACK MARQUEE ===== */
.tech-marquee-section {
    background: var(--primary);
    padding: 60px 0;
    overflow: hidden;
    position: relative;
}

.tech-marquee-section::before,
.tech-marquee-section::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.tech-marquee-section::before {
    left: 0;
    background: linear-gradient(to right, var(--primary), transparent);
}

.tech-marquee-section::after {
    right: 0;
    background: linear-gradient(to left, var(--primary), transparent);
}

.tech-marquee-title {
    text-align: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    opacity: 0.8;
}

.tech-marquee-title span {
    color: rgba(255, 255, 255, 0.6);
}

.tech-marquee-wrapper {
    display: flex;
    width: max-content;
    animation: marqueeScroll 30s linear infinite;
}

.tech-marquee-wrapper:hover {
    animation-play-state: paused;
}

.tech-marquee-track {
    display: flex;
    gap: 60px;
    padding: 0 30px;
}

.tech-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0.9;
    transition: opacity 0.3s, transform 0.3s;
}

.tech-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.tech-logo svg {
    width: 28px;
    height: 28px;
    fill: white;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}