/* ===================================
   SUNCLOUD SYSTEMS - MAIN STYLESHEET
   Design system v2 — evolution of the original
   --primary-color / --secondary-color tokens into a
   navy/indigo dark-first palette with blue-violet-amber
   gradient accents. Single stylesheet, no build step.
   =================================== */

:root {
    /* Brand core (evolved from legacy #2563eb / #f59e0b) */
    --primary-color: #6366f1;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary-color: #f59e0b;
    --secondary-dark: #d97706;
    --accent-color: #8b5cf6;
    --accent-pink: #ec4899;

    --gradient-1: linear-gradient(135deg, #2563eb 0%, #8b5cf6 50%, #f59e0b 100%);
    --gradient-2: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
    --gradient-text: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #fbbf24 100%);
    --gradient-mesh-1: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.35), transparent 45%);
    --gradient-mesh-2: radial-gradient(circle at 80% 30%, rgba(139, 92, 246, 0.3), transparent 45%);
    --gradient-mesh-3: radial-gradient(circle at 50% 90%, rgba(245, 158, 11, 0.25), transparent 50%);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 20px 40px -8px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.25);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 999px;

    --font-heading: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;

    --success-color: #34d399;
    --error-color: #f87171;

    --bg-base: #0a0e1a;
    --bg-elevated: #12172a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-solid: #161b2e;
    --bg-light: #0f1425;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-dark: #f1f3fb;
    --text-body: #cbd1e8;
    --text-light: #939bc0;
    --nav-bg: rgba(10, 14, 26, 0.8);
    --glass-blur: blur(16px);
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    line-height: 1.65;
    color: var(--text-body);
    background: var(--bg-base);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

a { text-decoration: none; color: inherit; transition: all 0.25s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.7rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

.gradient-text {
    background: var(--gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 0.8rem 1.5rem;
    z-index: 10000;
    border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 600;
}

.skip-link:focus {
    left: 0;
}

/* Focus visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-1);
    background-size: 200% auto;
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    background-position: right center;
}

.btn-secondary {
    background: var(--secondary-color);
    color: #1a1206;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.6);
    color: inherit;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
}

.btn-large { padding: 1.1rem 2.5rem; font-size: 1.1rem; }

/* Navigation */
.navbar {
    background: var(--nav-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 42px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 2rem; }

.nav-menu a {
    color: var(--text-body);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    font-size: 0.98rem;
}

.nav-menu a:hover,
.nav-menu a.active { color: var(--primary-light); }

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

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

/* Site-wide conversion action: make the final navigation item a clear
   project-start button while preserving the existing page structure. */
.nav-menu li:last-child a {
    padding: 0.65rem 1.15rem;
    border: 1px solid rgba(129, 140, 248, 0.38);
    border-radius: var(--radius-full);
    color: #fff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(124, 58, 237, 0.92));
    box-shadow: 0 8px 24px rgba(67, 56, 202, 0.22);
}

.nav-menu li:last-child a:hover,
.nav-menu li:last-child a.active {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(67, 56, 202, 0.34);
}

.nav-menu li:last-child a::after { display: none; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-actions { display: flex; align-items: center; gap: 1rem; }

/* Hero */
.hero {
    position: relative;
    background: var(--bg-base);
    color: var(--text-dark);
    padding: 150px 0 100px;
    overflow: hidden;
}

.hero-mesh {
    position: absolute;
    inset: 0;
    background-image: var(--gradient-mesh-1), var(--gradient-mesh-2), var(--gradient-mesh-3);
    pointer-events: none;
}

.hero-photo {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
}

.hero-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--bg-base) 0%, rgba(10, 14, 26, 0.75) 55%, var(--bg-base) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    backdrop-filter: var(--glass-blur);
}

.hero-title {
    font-size: 3.6rem;
    margin-bottom: 1.2rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-body);
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2.2rem;
    color: var(--text-light);
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Trust bar */
.trust-bar {
    padding: 2.5rem 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.trust-bar-label {
    text-align: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.trust-bar-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
}

.trust-bar-grid a {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-body);
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.trust-bar-grid a:hover {
    color: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

/* Section basics */
section { padding: 90px 0; }

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 0.8rem;
}

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

.alt-bg { background: var(--bg-elevated); }

/* Glass card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

/* Stats */
.stats { padding: 60px 0; background: var(--bg-elevated); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item i { font-size: 2.2rem; color: var(--primary-light); margin-bottom: 0.8rem; }
.stat-item h3 { font-size: 2.5rem; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 0.3rem; }
.stat-item p { color: var(--text-light); font-size: 1.05rem; }

/* Service cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 2.2rem;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i { font-size: 1.8rem; color: white; }
.service-card h3 { margin-bottom: 0.8rem; }
.service-card p { color: var(--text-light); margin-bottom: 1.2rem; }

.service-link {
    color: var(--primary-light);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link:hover { gap: 0.9rem; }

/* Feature items (why choose us) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    padding: 1.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.feature-item i { font-size: 1.7rem; color: var(--primary-light); flex-shrink: 0; }
.feature-item h4 { margin-bottom: 0.4rem; }
.feature-item p { color: var(--text-light); margin: 0; }

/* AI mini cards (supporting row under the automation section) */
.ai-mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-mini-card i { color: var(--secondary-color); font-size: 1.4rem; }

/* Testimonials */
.testimonials { background: var(--bg-elevated); }

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

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: var(--radius-md);
}

.stars { color: var(--secondary-color); margin-bottom: 1rem; }
.testimonial-card p { font-style: italic; color: var(--text-body); margin-bottom: 1.5rem; }
.testimonial-author strong { display: block; color: var(--text-dark); margin-bottom: 0.2rem; }
.testimonial-author span { color: var(--text-light); font-size: 0.9rem; }

/* Process */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.process-step {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

/* CTA */
.cta {
    position: relative;
    background: var(--gradient-1);
    color: white;
    text-align: center;
    overflow: hidden;
}

.cta-content h2 { font-size: 2.4rem; margin-bottom: 1rem; color: white; }
.cta-content p { font-size: 1.15rem; margin-bottom: 2rem; opacity: 0.95; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Footer */
.footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-color);
    color: var(--text-body);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 { margin-bottom: 1rem; color: var(--text-dark); }
.footer-section p { opacity: 0.85; margin-bottom: 1.5rem; }
.footer-section ul li { margin-bottom: 0.6rem; }
.footer-section ul li a { opacity: 0.85; display: flex; align-items: center; gap: 0.5rem; }
.footer-section ul li a:hover { opacity: 1; color: var(--secondary-color); }

.social-links { display: flex; gap: 1rem; }

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.contact-info li { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; }
.contact-info i { color: var(--secondary-color); }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links { display: flex; gap: 2rem; }
.footer-links a:hover { color: var(--secondary-color); }

/* Page header */
.page-header {
    position: relative;
    background: var(--bg-elevated);
    color: var(--text-dark);
    padding: 140px 0 60px;
    text-align: center;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--gradient-mesh-1), var(--gradient-mesh-3);
    pointer-events: none;
}

.page-header .container { position: relative; z-index: 1; }
.page-header h1 { font-size: 2.8rem; margin-bottom: 0.8rem; }
.page-header p { font-size: 1.15rem; color: var(--text-light); }

.breadcrumbs {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary-light); }

/* Content grids (about page etc) */
.content-grid, .content-grid-reverse {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: center;
}

.content-text h2 { margin-bottom: 1.4rem; }
.content-text p { color: var(--text-light); margin-bottom: 1rem; }

.content-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

/* Mission & Vision */
.mv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

.mv-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.mv-icon {
    width: 76px; height: 76px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
}

.mv-icon i { font-size: 2.2rem; color: white; }

.values-grid, .problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.value-item, .problem-item { text-align: center; padding: 1.8rem; }
.value-item i, .problem-item i { font-size: 2.4rem; color: var(--primary-light); margin-bottom: 1rem; }
.value-item h4, .problem-item h4 { margin-bottom: 0.7rem; }
.value-item p, .problem-item p { color: var(--text-light); }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2rem; }

.team-member {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.member-photo {
    width: 110px; height: 110px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
}

.member-photo i { font-size: 2.6rem; color: var(--primary-light); }

.location-info { margin-top: 2rem; }
.info-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.info-item i { font-size: 1.4rem; color: var(--primary-light); margin-top: 0.2rem; }

/* Service detail */
.service-detail { padding: 60px 0; }

.service-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}

.service-content.reverse { grid-template-columns: 1fr 1.5fr; }

.service-badge {
    width: 56px; height: 56px;
    background: var(--gradient-1);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
}

.service-badge i { font-size: 1.6rem; color: white; }
.service-text h2 { margin-bottom: 1rem; }
.lead { font-size: 1.15rem; color: var(--text-dark); margin-bottom: 1.5rem; font-weight: 500; }

.feature-list { margin: 1.5rem 0; }
.feature-list li { display: flex; align-items: start; gap: 1rem; margin-bottom: 1rem; color: var(--text-light); }
.feature-list i { color: var(--success-color); margin-top: 0.3rem; flex-shrink: 0; }

.tech-tags { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.5rem 0; }

.tech-tags span {
    padding: 0.45rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-body);
    font-weight: 500;
}

.service-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

/* Portfolio */
.portfolio-filter { padding: 40px 0 10px; background: var(--bg-elevated); }
.filter-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.filter-btn {
    padding: 0.7rem 1.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-body);
    transition: all 0.25s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
}

.flagship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
    margin-bottom: 1rem;
}

.flagship-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.flagship-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }

.flagship-card img { width: 100%; height: 170px; object-fit: cover; }

.flagship-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.flagship-body h3 { margin-bottom: 0.5rem; font-size: 1.2rem; }
.flagship-body p { color: var(--text-light); flex: 1; margin-bottom: 1rem; }

.flagship-link {
    color: var(--primary-light);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.flagship-link:hover { gap: 0.9rem; }

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

.portfolio-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.portfolio-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }

.portfolio-image { height: 160px; overflow: hidden; }
.portfolio-image img { width: 100%; height: 100%; object-fit: cover; }

.portfolio-content { padding: 1.8rem; }

.portfolio-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 1rem;
}

.portfolio-content h3 { margin-bottom: 0.8rem; font-size: 1.2rem; }
.portfolio-content p { color: var(--text-light); margin-bottom: 1rem; }

.portfolio-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.portfolio-tech span { padding: 0.3rem 0.8rem; background: var(--bg-light); border-radius: var(--radius-full); font-size: 0.78rem; }

.portfolio-results { display: flex; gap: 2rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.result-item { flex: 1; text-align: center; }
.result-item strong { display: block; font-size: 1.2rem; color: var(--primary-light); margin-bottom: 0.2rem; }
.result-item span { font-size: 0.8rem; color: var(--text-light); }

/* Pricing */
.pricing-category { text-align: center; margin: 3rem 0 2rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-bottom: 3rem; }

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.4rem;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }
.pricing-card.featured { border: 2px solid var(--primary-light); box-shadow: var(--shadow-glow); }

.featured-badge {
    position: absolute;
    top: -14px;
    right: 20px;
    background: var(--gradient-2);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-header { text-align: center; padding-bottom: 1.8rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1.8rem; }
.pricing-header h4 { margin-bottom: 0.8rem; }
.price { display: flex; align-items: start; justify-content: center; gap: 0.3rem; margin-bottom: 0.5rem; }
.currency { font-size: 1.4rem; color: var(--primary-light); margin-top: 0.5rem; }
.amount { font-family: var(--font-heading); font-size: 2.7rem; font-weight: 700; color: var(--text-dark); }
.period { font-size: 1.1rem; color: var(--text-light); align-self: flex-end; margin-bottom: 0.7rem; }
.price-description { color: var(--text-light); margin: 0; }

.pricing-features { margin-bottom: 2rem; }
.pricing-features li { display: flex; align-items: start; gap: 0.7rem; margin-bottom: 0.9rem; color: var(--text-body); font-size: 0.95rem; }
.pricing-features i { margin-top: 0.2rem; flex-shrink: 0; }
.pricing-features .fa-check { color: var(--success-color); }
.pricing-features .fa-times { color: var(--text-light); }
.pricing-features .not-included { color: var(--text-light); }

.pricing-info-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.8rem;
    border-radius: var(--radius-md);
    display: flex;
    gap: 2rem;
    align-items: start;
    margin-bottom: 3rem;
}

.pricing-info-box > i { font-size: 3.4rem; color: var(--primary-light); flex-shrink: 0; }
.custom-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.8rem; margin: 1.5rem 0; color: var(--text-light); }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.6rem; }

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.8rem;
    border-radius: var(--radius-md);
}

.faq-item h4 { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; color: var(--primary-light); font-size: 1.05rem; }
.faq-item p { color: var(--text-light); margin: 0; }

/* Contact */
.contact-wrapper { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; }

.contact-form-container, .contact-info-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.4rem;
    border-radius: var(--radius-md);
}

.contact-form { margin-top: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-dark); }

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: border-color 0.25s ease;
}

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

.checkbox-group { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-group input { width: auto; }

.form-message { margin-top: 1rem; padding: 1rem; border-radius: var(--radius-sm); display: none; }
.form-message.success { background: rgba(52, 211, 153, 0.15); color: var(--success-color); display: block; }
.form-message.error { background: rgba(248, 113, 113, 0.15); color: var(--error-color); display: block; }

.contact-info-list .info-item { display: flex; gap: 1rem; margin-bottom: 2rem; }

.info-icon {
    width: 48px; height: 48px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.info-icon i { font-size: 1.2rem; color: var(--primary-light); }
.info-content h4 { margin-bottom: 0.4rem; }
.info-content p { color: var(--text-light); margin: 0; }
.info-content .small { font-size: 0.85rem; }
.info-content a { color: var(--primary-light); }
.info-content a:hover { text-decoration: underline; }

.social-section { margin: 2rem 0; padding: 1.5rem; background: var(--bg-light); border-radius: var(--radius-md); text-align: center; }
.social-links-large { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; }

.social-links-large a {
    width: 48px; height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-light);
}

.social-links-large a:hover { background: var(--primary-color); color: white; transform: translateY(-3px); }

.business-hours { padding: 1.5rem; background: var(--bg-light); border-radius: var(--radius-md); }
.business-hours ul { margin-top: 1rem; }
.business-hours li { display: flex; justify-content: space-between; padding: 0.7rem 0; border-bottom: 1px solid var(--border-color); }
.business-hours li:last-child { border-bottom: none; }

.map-section { background: var(--bg-elevated); padding: 0; }

/* Legal pages */
.legal-content { max-width: 900px; margin: 0 auto; padding: 60px 20px; }
.legal-content h2 { margin-top: 2rem; margin-bottom: 1rem; color: var(--primary-light); }
.legal-content h3 { margin-top: 1.5rem; margin-bottom: 0.8rem; }
.legal-content ul { list-style: disc; margin-left: 2rem; margin-bottom: 1rem; }
.legal-content ul li { margin-bottom: 0.5rem; color: var(--text-light); }
.legal-content a { color: var(--primary-light); }

.last-updated {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    color: var(--text-light);
}

.legal-consent {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.blog-card img { width: 100%; height: 190px; object-fit: cover; }
.blog-card-body { padding: 1.6rem; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta { font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; }
.blog-card-body h3 { font-size: 1.2rem; margin-bottom: 0.7rem; }
.blog-card-body p { color: var(--text-light); flex: 1; margin-bottom: 1rem; }
.blog-card-link { color: var(--primary-light); font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; }
.blog-card-link:hover { gap: 0.9rem; }

.article-header { padding: 150px 0 40px; background: var(--bg-elevated); position: relative; overflow: hidden; }
.article-header::before { content: ''; position: absolute; inset: 0; background-image: var(--gradient-mesh-1), var(--gradient-mesh-3); pointer-events: none; }
.article-header .container { position: relative; z-index: 1; max-width: 800px; }
.article-header h1 { font-size: 2.4rem; margin-bottom: 1rem; }
.article-meta { color: var(--text-light); font-size: 0.95rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.article-hero-img { max-width: 900px; margin: -20px auto 0; padding: 0 20px; }
.article-hero-img img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); aspect-ratio: 16/8; object-fit: cover; }

.article-body { max-width: 760px; margin: 0 auto; padding: 60px 20px; }
.article-body h2 { margin-top: 2.2rem; margin-bottom: 1rem; font-size: 1.6rem; }
.article-body h3 { margin-top: 1.8rem; margin-bottom: 0.8rem; }
.article-body p { color: var(--text-body); margin-bottom: 1.2rem; font-size: 1.05rem; }
.article-body ul, .article-body ol { margin: 1rem 0 1.2rem 1.6rem; color: var(--text-body); }
.article-body li { margin-bottom: 0.6rem; }
.article-body a { color: var(--primary-light); text-decoration: underline; }

.article-cta {
    margin-top: 3rem;
    padding: 2.4rem;
    text-align: center;
    background: var(--gradient-1);
    border-radius: var(--radius-lg);
    color: white;
}

.article-cta h3 { color: white; margin-bottom: 0.8rem; }
.article-cta p { color: rgba(255,255,255,0.9); }

/* Estimator */
.estimator-wrap {
    max-width: 760px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.estimator-progress { display: flex; gap: 0.5rem; margin-bottom: 2rem; }
.estimator-progress .dot { flex: 1; height: 4px; border-radius: var(--radius-full); background: var(--border-color); }
.estimator-progress .dot.active { background: var(--gradient-1); }

.estimator-step { display: none; }
.estimator-step.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.estimator-step h3 { margin-bottom: 1.5rem; }

.estimator-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

.estimator-option {
    background: var(--bg-base);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
    color: var(--text-body);
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
}

.estimator-option:hover { border-color: var(--primary-light); }
.estimator-option.selected { border-color: var(--primary-color); background: rgba(99, 102, 241, 0.12); }
.estimator-option strong { display: block; color: var(--text-dark); margin-bottom: 0.3rem; }
.estimator-option span { font-size: 0.85rem; color: var(--text-light); }

.estimator-nav { display: flex; justify-content: space-between; margin-top: 2rem; gap: 1rem; }

.estimator-result { text-align: center; }
.estimator-result .amount-range { font-family: var(--font-heading); font-size: 2.4rem; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 1rem 0; }
.estimator-result p { color: var(--text-light); }

/* AI Assistant Widget */
.ai-widget-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-1);
    background-size: 200% auto;
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: transform 0.25s ease, background-position 0.4s ease;
}

.ai-widget-bubble:hover { transform: scale(1.08); background-position: right center; }
.ai-widget-bubble svg { width: 28px; height: 28px; }

.ai-widget-panel {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 140px);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 2000;
}

.ai-widget-panel.open { display: flex; animation: fadeIn 0.25s ease; }

.ai-widget-header {
    background: var(--gradient-1);
    color: white;
    padding: 1.1rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.ai-widget-header svg { width: 24px; height: 24px; flex-shrink: 0; }
.ai-widget-header-text { flex: 1; }
.ai-widget-header-text strong { display: block; font-family: var(--font-heading); font-size: 1rem; }
.ai-widget-header-text span { font-size: 0.78rem; opacity: 0.9; }

.ai-widget-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.ai-msg { max-width: 85%; padding: 0.7rem 1rem; border-radius: var(--radius-md); font-size: 0.92rem; line-height: 1.5; }
.ai-msg-bot { background: var(--bg-card); border: 1px solid var(--border-color); align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-msg-user { background: var(--gradient-1); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }

.ai-typing { display: flex; gap: 4px; align-self: flex-start; padding: 0.7rem 1rem; }
.ai-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-light); animation: aiTypingBounce 1.2s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes aiTypingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.ai-widget-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.2rem 0.8rem; }

.ai-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-body);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-chip:hover { border-color: var(--primary-light); color: var(--primary-light); }

.ai-widget-input {
    display: flex;
    gap: 0.6rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.ai-widget-input input {
    flex: 1;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.7rem 1.1rem;
    color: var(--text-dark);
    font-family: inherit;
    font-size: 0.9rem;
}

.ai-widget-input input:focus { outline: none; border-color: var(--primary-light); }

.ai-widget-send {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Scroll reveal (simple fade — still used for elements without a
   bespoke motion treatment) */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .gradient-text { animation: none; }
    * { scroll-behavior: auto !important; }
}

/* ===================================
   MOTION SYSTEM
   Scroll-driven primitives layered on top of the base design system.
   js/motion.js wires the behaviors; this block owns the visuals.
   Every rule here has a reduced-motion fallback further down.
   =================================== */

/* --- Hero mesh drift + parallax --- */
.hero-mesh {
    animation: meshDrift 22s ease-in-out infinite alternate;
    will-change: transform, background-position;
}

@keyframes meshDrift {
    0%   { background-position: 0% 0%, 100% 0%, 50% 100%; transform: scale(1) translateY(0); }
    50%  { background-position: 8% 12%, 92% 15%, 45% 92%; transform: scale(1.04) translateY(-6px); }
    100% { background-position: 0% 6%, 100% 6%, 55% 96%; transform: scale(1.02) translateY(4px); }
}

/* --- CTA mesh (bookend symmetry with hero) --- */
.cta-mesh {
    position: absolute;
    inset: 0;
    background-image: var(--gradient-mesh-1), var(--gradient-mesh-2), var(--gradient-mesh-3);
    mix-blend-mode: overlay;
    opacity: 0.9;
    pointer-events: none;
    animation: meshDrift 22s ease-in-out infinite alternate;
}

/* --- Word-stagger heading entrance --- */
.word-stagger-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.5em);
    filter: blur(6px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.55s ease;
}

.word-stagger-in .word-stagger-word,
.word-stagger-done .word-stagger-word {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Lighter/faster variant for interior page <h1> headers */
.word-stagger-fast .word-stagger-word {
    transition-duration: 0.4s;
    filter: blur(3px);
}

/* --- Marquee (trust bar) --- */
.marquee {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 1rem 2rem;
    padding-right: 2rem;
    white-space: nowrap;
    vertical-align: top;
}

.marquee-animated {
    display: flex;
}

.marquee-animated .marquee-track {
    animation: marqueeScroll 26s linear infinite;
}

.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

/* Non-animated (reduced motion) fallback: single row, wraps normally */
.marquee:not(.marquee-animated) {
    -webkit-mask-image: none;
    mask-image: none;
}

.marquee:not(.marquee-animated) .marquee-track {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center;
    white-space: normal;
    padding-right: 0;
}

/* --- Pinned reveal stack (services overview) --- */
.pin-stack {
    position: relative;
}

.pin-stack-sticky {
    position: sticky;
    top: 96px;
    padding-bottom: 2rem;
}

.pin-item {
    opacity: 0;
    transform: translateY(36px) scale(0.96);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pin-item-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Reduced motion / no-JS-progress fallback: no sticky pin, normal flow */
.pin-stack-static {
    height: auto !important;
}

.pin-stack-static .pin-stack-sticky {
    position: static;
    top: auto;
}

.pin-stack-static .pin-item {
    opacity: 1;
    transform: none;
    transition: none;
}

/* --- Typewriter --- */
.typewriter::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    background: currentColor;
    vertical-align: -0.15em;
    animation: typewriterBlink 0.9s step-end infinite;
}

.typewriter-done::after {
    animation: typewriterBlink 0.9s step-end infinite;
}

@keyframes typewriterBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Scroll-snap carousel (testimonials) --- */
.carousel-wrapper {
    position: relative;
}

.carousel-snap {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 10%;
    padding: 0.5rem 10% 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.carousel-snap .testimonial-card {
    flex: 0 0 min(420px, 82vw);
    scroll-snap-align: center;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.carousel-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.carousel-nav-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
    transform: translateY(-2px);
}

/* --- Automation split-panel --- */
.automation-section {
    position: relative;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.automation-split {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: stretch;
    margin-top: 2.5rem;
}

.automation-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.automation-panel-manual { border-color: rgba(248, 113, 113, 0.25); }
.automation-panel-auto { border-color: rgba(52, 211, 153, 0.3); }

.automation-panel-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.4rem;
}

.automation-panel-manual .automation-panel-label { color: var(--error-color); }
.automation-panel-auto .automation-panel-label { color: var(--success-color); }

.automation-steps {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.automation-step {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    color: var(--text-body);
}

.automation-step i { color: var(--text-light); margin-top: 0.15rem; flex-shrink: 0; }
.automation-panel-auto .automation-step i { color: var(--primary-light); }

.automation-outcome {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.88rem;
    color: var(--text-light);
}

.automation-panel-auto .automation-outcome { color: var(--text-body); }
.automation-panel-auto .automation-outcome strong { color: var(--success-color); }

.automation-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
}

.automation-connector svg { width: 100%; height: auto; overflow: visible; }

.flow-line {
    fill: none;
    stroke: var(--primary-light);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 8 6;
    opacity: 0.55;
}

.flow-dot {
    fill: var(--secondary-color);
    opacity: 0;
    offset-path: path('M4,10 L4,90');
    offset-distance: 0%;
    transform-box: fill-box;
}

.flow-diagram.flow-in-view .flow-dot {
    opacity: 1;
    animation: flowDotTravel 2.2s ease-in-out infinite;
}

@keyframes flowDotTravel {
    0% { offset-distance: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}

/* Browsers without offset-path (older Safari): fall back to a simple
   vertical translate between the connector endpoints, still readable. */
@supports not (offset-path: path('M0,0 L0,1')) {
    .flow-dot {
        offset-path: none;
        transform: translateY(0);
        animation: none !important;
    }
    .flow-diagram.flow-in-view .flow-dot {
        opacity: 1;
        animation: flowDotFallback 2.2s ease-in-out infinite !important;
    }
    @keyframes flowDotFallback {
        0% { transform: translateY(0); opacity: 0; }
        10% { opacity: 1; }
        90% { opacity: 1; }
        100% { transform: translateY(80px); opacity: 0; }
    }
}

.automation-proof-row {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* --- Draw-on reveal (Why Choose Us) --- */
[data-draw-reveal] {
    position: relative;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-draw-reveal]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-1);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 3px;
}

[data-draw-reveal] i {
    transform: scale(0.5) rotate(-15deg);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s, opacity 0.4s ease 0.15s;
}

.draw-reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.draw-reveal-visible::before {
    transform: scaleY(1);
}

.draw-reveal-visible i {
    transform: scale(1) rotate(0deg);
    opacity: 1;
}

/* --- Stagger reveal (long grids: portfolio, service detail sections) --- */
.stagger-item {
    opacity: 0;
    transform: translateY(28px) scale(0.94);
    filter: blur(6px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
}

.stagger-item-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* --- Process progress line --- */
.process-progress {
    position: relative;
}

.process-line-track {
    position: relative;
    height: 4px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    margin: 0 0 2.5rem;
    overflow: hidden;
}

.process-line-fill {
    --process-progress: 0;
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    transform-origin: left center;
    transform: scaleX(var(--process-progress));
    border-radius: var(--radius-full);
}

/* --- Sliding filter indicator (portfolio) --- */
[data-filter-group] {
    position: relative;
}

.filter-indicator {
    position: absolute;
    left: 0;
    top: 0;
    background: var(--gradient-1);
    border-radius: var(--radius-full);
    z-index: 0;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.filter-indicator-ready { opacity: 1; }

.filter-group-indicated .filter-btn {
    position: relative;
    z-index: 1;
    background: transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.filter-group-indicated .filter-btn.active,
.filter-group-indicated .filter-btn:hover {
    background: transparent;
    color: white;
}

.filter-group-indicated .filter-btn:not(.active):hover {
    color: var(--text-body);
    border-color: var(--primary-light);
}

/* --- Blog reading progress bar --- */
.reading-progress-track {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 3000;
}

.reading-progress-bar {
    height: 100%;
    width: 100%;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.1s linear;
}

/* --- Native scroll-driven animation enhancement layer ---
   Where the browser supports `animation-timeline: scroll()` we let it
   drive a couple of simple, purely-visual timelines natively (smoother,
   off main thread). Everything above still functions as the baseline
   because these rules only ADD a refinement, never remove the
   JS-driven classes they layer on top of. */
@supports (animation-timeline: scroll()) {
    .supports-scroll-timeline .stagger-item {
        animation-timeline: view();
        animation-range: entry 0% cover 30%;
    }
}

/* ===================================
   REDUCED MOTION — every effect above gets a static, final-state
   fallback here. Nothing may be stuck invisible or mid-transition.
   =================================== */
@media (prefers-reduced-motion: reduce) {
    .hero-mesh, .cta-mesh { animation: none; }
    .hero-mesh { transform: none; }

    .word-stagger-word {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }

    .marquee-track { animation: none !important; }

    .pin-item {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .typewriter::after { animation: none; opacity: 1; }

    .carousel-snap { scroll-behavior: auto; }

    .flow-dot { animation: none !important; opacity: 1 !important; offset-distance: 100% !important; }
    .flow-line { stroke-dasharray: none; opacity: 0.55; }

    [data-draw-reveal],
    [data-draw-reveal]::before,
    [data-draw-reveal] i {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .stagger-item {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
        animation: none !important;
    }

    .process-line-fill { transform: scaleX(1); }

    .filter-indicator { transition: none; }

    .reading-progress-bar { transition: none; }

    .hero-mesh, .hero-photo { transform: none !important; }
}

/* Responsive: motion system */
@media (max-width: 900px) {
    .automation-split { grid-template-columns: 1fr; }
    .automation-connector { width: 100%; height: 48px; transform: rotate(90deg); }
    .automation-proof-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .carousel-snap { scroll-padding: 0 6%; padding: 0.5rem 6% 2rem; }
    .carousel-snap .testimonial-card { flex-basis: 88vw; }
    .pin-stack-sticky { top: 76px; }
}

/* Responsive */
@media (max-width: 900px) {
    .service-content, .service-content.reverse { grid-template-columns: 1fr; }
    .contact-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 68px;
        flex-direction: column;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 1.2rem;
    }

    .nav-menu.active { left: 0; }

    .nav-menu li:last-child a {
        display: inline-flex;
        justify-content: center;
        min-width: 190px;
    }

    .hero-title { font-size: 2.4rem; }
    .hero-subtitle { font-size: 1.1rem; }

    h1 { font-size: 2.3rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }

    .services-grid, .features-grid, .values-grid, .problems-grid,
    .team-grid, .process-grid, .portfolio-grid, .pricing-grid,
    .testimonials-grid, .faq-grid, .blog-grid, .flagship-grid {
        grid-template-columns: 1fr;
    }

    .content-grid, .content-grid-reverse, .service-content { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .hero-buttons, .cta-buttons { flex-direction: column; }
    .btn { width: 100%; }
    .footer-content { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .pricing-info-box { flex-direction: column; text-align: center; }

    .ai-widget-panel { right: 16px; bottom: 88px; width: calc(100vw - 32px); }
    .ai-widget-bubble { right: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .hero { padding: 120px 0 70px; }
    .hero-title { font-size: 2rem; }
    .stats-grid { grid-template-columns: 1fr; }
}
