/* =============================================================
   base.css — Layout, structure, typography, animations
   Color values come exclusively from the active theme file.
   ============================================================= */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ----- Typography ----- */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.15;
    font-weight: 700;
    color: var(--text);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

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

a { text-decoration: none; color: inherit; }

/* ----- Layout ----- */

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 96px 0;
}

.section-alt {
    background-color: var(--bg-subtle);
}

/* ----- Section header ----- */

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    margin: 12px 0 16px;
}

.section-sub {
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ----- Label chip ----- */

.label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ----- Accent text ----- */

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

/* ----- Buttons ----- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

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

.btn-primary:hover {
    background-color: var(--accent-bright);
    box-shadow: 0 8px 28px var(--accent-shadow);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

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

.btn-full {
    width: 100%;
}

/* ================================================================
   NAVIGATION
   ================================================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
    background-color: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

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

.nav-link {
    display: block;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
    background-color: var(--bg-card);
}

.nav-cta {
    background-color: var(--accent);
    color: var(--btn-text);
    margin-left: 8px;
}

.nav-cta:hover {
    background-color: var(--accent-bright);
    color: var(--btn-text);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================================================
   HERO
   ================================================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 20%, transparent 100%);
}

.hero-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 700px;
    background: radial-gradient(ellipse, var(--hero-glow) 0%, transparent 65%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 120px 24px 80px;
    max-width: 860px;
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent-muted);
    background-color: var(--accent-chip-bg);
    padding: 6px 18px;
    border-radius: 100px;
    margin-bottom: 32px;
    animation: fadeUp 0.7s ease both;
    animation-delay: 0.1s;
}

.hero-heading {
    margin-bottom: 24px;
    letter-spacing: -0.025em;
    animation: fadeUp 0.7s ease both;
    animation-delay: 0.25s;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeUp 0.7s ease both;
    animation-delay: 0.4s;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 0.7s ease both;
    animation-delay: 0.55s;
}

.hero-scroll {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    animation: fadeUp 0.7s ease both;
    animation-delay: 0.8s;
}

.hero-scroll-track {
    width: 24px;
    height: 38px;
    border: 2px solid var(--border-hover);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding: 5px 0;
    overflow: hidden;
}

.hero-scroll-dot {
    width: 4px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 2px;
    animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes scrollDot {
    0%   { transform: translateY(0);    opacity: 1; }
    65%  { transform: translateY(14px); opacity: 0; }
    66%  { transform: translateY(-8px); opacity: 0; }
    100% { transform: translateY(0);    opacity: 1; }
}

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

/* ================================================================
   SERVICES
   ================================================================ */

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

.svc-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.svc-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
}

.svc-icon {
    width: 42px;
    height: 42px;
    color: var(--accent);
    margin-bottom: 20px;
}

.svc-icon svg {
    width: 100%;
    height: 100%;
}

.svc-card h3 {
    margin-bottom: 12px;
    color: var(--text);
}

.svc-card p {
    font-size: 0.93rem;
}

/* ================================================================
   EXPERTISE
   ================================================================ */

.expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.expertise-left h2 {
    margin: 16px 0 20px;
}

.body-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.8;
}

.expertise-body {
    font-size: 0.95rem;
    margin-bottom: 40px;
}

.stats-row {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

.feature {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    align-items: flex-start;
}

.feature:last-child {
    margin-bottom: 0;
}

.feature-marker {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    margin-top: 6px;
    box-shadow: 0 0 0 4px var(--accent-muted);
}

.feature h4 {
    margin-bottom: 6px;
    color: var(--text);
}

.feature p {
    font-size: 0.92rem;
}

/* ================================================================
   CLIENTS
   ================================================================ */

.logos-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 64px;
}

.logos-row span {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dim);
    padding: 12px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--bg-card);
    letter-spacing: -0.01em;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.logos-row span:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

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

.engagement {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.engagement-domain {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.engagement h4 {
    font-size: 1.05rem;
    margin-bottom: 12px;
    color: var(--text);
}

.engagement p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ----- Tech tags (shared) ----- */

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tags span {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background-color: var(--tag-bg);
    color: var(--tag-text);
    border: 1px solid var(--tag-border);
}

/* ================================================================
   TECHNOLOGIES
   ================================================================ */

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 64px;
}

.tech-cat h4 {
    margin-bottom: 16px;
    color: var(--text);
    font-size: 0.95rem;
}

/* ================================================================
   CONTACT
   ================================================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 80px;
    align-items: center;
}

.contact-heading {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    margin: 16px 0 20px;
}

.contact-left .body-lead {
    margin-bottom: 32px;
}

.contact-email {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    transition: opacity 0.2s ease;
}

.contact-email:hover {
    opacity: 0.75;
}

.contact-location {
    font-size: 0.88rem;
    color: var(--text-dim);
}

.cta-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
}

.cta-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text);
}

.cta-card p {
    font-size: 0.92rem;
    margin-bottom: 24px;
}

.cta-note {
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--text-dim);
    text-align: center;
    letter-spacing: 0.02em;
}

/* ================================================================
   FOOTER
   ================================================================ */

.footer {
    background-color: var(--bg-subtle);
    border-top: 1px solid var(--border);
    padding: 48px 0 32px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: 0.88rem;
    color: var(--text-dim);
}

.footer-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.footer-nav a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.footer-bottom span {
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* ================================================================
   SCROLL REVEAL
   ================================================================ */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ================================================================
   RESPONSIVE
   ================================================================ */

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

    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .engagements-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 720px) {
    .section {
        padding: 72px 0;
    }

    .tech-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .stats-row {
        gap: 28px;
    }
}

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

    .nav-menu {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background-color: var(--nav-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 12px 16px 20px;
        border-bottom: 1px solid var(--border);
        gap: 4px;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        padding: 12px 16px;
    }

    .nav-cta {
        margin-left: 0;
        text-align: center;
    }

    .nav-toggle {
        display: flex;
    }

    .footer-top {
        flex-direction: column;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}
