/* ============================================================
   THEVERTECH — VISUAL ENHANCEMENT LAYER  (enhance.css)
   Loads AFTER style.css. Purely additive & reversible.
   Goal: take the existing dark/purple brand and make it read
   like a premium agency build — better type, atmospheric depth,
   tinted shadows, machined card surfaces, glass nav.
   Everything keys off the existing CSS variables so it adapts
   to both dark and light themes automatically.
   ============================================================ */

/* Premium typefaces — imported here so any page that loads this
   file gets them, regardless of folder depth. (index.html also
   preloads them via <link> for speed.) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ------------------------------------------------------------
   1. TYPOGRAPHY UPGRADE
   Space Grotesk = display headings (character + tight tracking)
   Plus Jakarta Sans = body (cleaner, more modern than Poppins)
   Redefining the two existing vars cascades site-wide.
   ------------------------------------------------------------ */
:root {
    --font-primary: 'Plus Jakarta Sans', 'Poppins', sans-serif;
    --font-secondary: 'Space Grotesk', 'Exo 2', sans-serif;
    /* Brand tint helpers for tinted shadows / glows */
    --brand-rgb: 205, 1, 253;
    --shadow-tint-sm: 0 10px 30px -12px rgba(var(--brand-rgb), 0.28);
    --shadow-tint-md: 0 24px 60px -22px rgba(var(--brand-rgb), 0.38);
    --shadow-tint-lg: 0 40px 90px -30px rgba(var(--brand-rgb), 0.45);
    /* Inner top highlight that makes surfaces feel like physical hardware */
    --inset-hi: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.light-theme {
    --inset-hi: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --shadow-tint-sm: 0 10px 30px -14px rgba(var(--brand-rgb), 0.18);
    --shadow-tint-md: 0 24px 55px -26px rgba(var(--brand-rgb), 0.22);
    --shadow-tint-lg: 0 40px 80px -34px rgba(var(--brand-rgb), 0.26);
}

/* Display headings: Space Grotesk shines a touch heavier + tighter */
h1, h2, h3,
.section-title,
.hero-main-title {
    font-weight: 600;
    letter-spacing: -0.025em;
}

/* Give section titles more presence (premium = bigger, tighter) */
.section-title {
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    line-height: 1.08;
}

.section-description {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    text-wrap: pretty;
    color: var(--text-secondary);
}

/* Tabular figures for all the stat counters so digits don't jitter */
.stat-value, .counter, .counter-hero, .metric-value, .sp-stat-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* ------------------------------------------------------------
   2. ATMOSPHERIC DEPTH
   A fixed, ultra-subtle grain overlay breaks digital flatness.
   pointer-events:none so it never blocks interaction.
   ------------------------------------------------------------ */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.light-theme::after {
    opacity: 0.022;
    mix-blend-mode: multiply;
}

/* Keep real content above the grain. NOTE: do not touch .navbar /
   #preloader positioning — they are fixed and must stay that way. */
section, footer { position: relative; z-index: 2; }

/* Ambient brand glow behind otherwise-flat sections (very low key) */
.about-section,
.services-section,
.portfolio-section,
.team-section { position: relative; }

.services-section::before,
.portfolio-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60% 50% at 85% 0%, rgba(var(--brand-rgb), 0.07), transparent 70%),
        radial-gradient(50% 45% at 0% 100%, rgba(var(--brand-rgb), 0.05), transparent 70%);
}

body.light-theme .services-section::before,
body.light-theme .portfolio-section::before {
    background:
        radial-gradient(60% 50% at 85% 0%, rgba(var(--brand-rgb), 0.05), transparent 70%),
        radial-gradient(50% 45% at 0% 100%, rgba(var(--brand-rgb), 0.04), transparent 70%);
}

/* ------------------------------------------------------------
   3. GLASS NAVBAR
   Turn the scrolled state into true frosted glass with a
   hairline and saturation boost instead of a flat panel.
   ------------------------------------------------------------ */
.navbar.scrolled {
    background: color-mix(in srgb, var(--bg-primary) 72%, transparent);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 8px 32px -16px rgba(0, 0, 0, 0.6), var(--inset-hi);
}

.nav-link { letter-spacing: -0.01em; }

/* Active/hover nav link gets a subtle brand underline cue */
.nav-link:hover { color: var(--text-primary) !important; }

/* ------------------------------------------------------------
   4. PRIMARY BUTTON — sheen + physical press
   ------------------------------------------------------------ */
.btn-gradient {
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-tint-sm), var(--inset-hi);
    isolation: isolate;
}

.btn-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.6s var(--ease-out);
}

.btn-gradient:hover {
    box-shadow: var(--shadow-tint-md), var(--inset-hi);
}

.btn-gradient:hover::after { transform: translateX(120%); }

.btn-gradient:active { transform: translateY(0) scale(0.98); }

/* ------------------------------------------------------------
   5. MACHINED CARD SURFACES
   Shared premium treatment: layered surface, inner top
   highlight, hairline border, and a brand-tinted lift on hover.
   Applied to the real card classes used across the page.
   ------------------------------------------------------------ */
.vm-card,
.leadership-card,
.service-card,
.metric-card,
.team-leader-card,
.tmc-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
        var(--bg-secondary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-tint-sm), var(--inset-hi);
    transition: var(--transition-smooth);
}

body.light-theme .vm-card,
body.light-theme .leadership-card,
body.light-theme .service-card,
body.light-theme .metric-card,
body.light-theme .team-leader-card,
body.light-theme .tmc-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), var(--bg-secondary) 60%);
}

.vm-card:hover,
.leadership-card:hover,
.service-card:hover,
.metric-card:hover,
.team-leader-card:hover,
.tmc-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-tint-md), var(--inset-hi);
}

/* Service cards: add a quiet radial spotlight that warms on hover */
.service-card { position: relative; overflow: hidden; }

.service-card::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -30%;
    width: 60%;
    height: 80%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(var(--brand-rgb), 0.16), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}

.service-card:hover::after { opacity: 1; }

/* Service icon: more deliberate, tactile chip */
.service-icon {
    box-shadow: var(--inset-hi);
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
    transform: translateY(-2px) scale(1.04);
}

/* ------------------------------------------------------------
   6. TOOL BADGES (marquee) — glass chips
   ------------------------------------------------------------ */
.tool-badge {
    background: color-mix(in srgb, var(--bg-secondary) 80%, transparent);
    border: 1px solid var(--border-light);
    box-shadow: var(--inset-hi);
    transition: var(--transition-smooth);
}

.tool-badge:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-tint-sm), var(--inset-hi);
    transform: translateY(-3px);
}

/* ------------------------------------------------------------
   7. PORTFOLIO CARDS — tinted lift + smoother media
   ------------------------------------------------------------ */
.portfolio-card {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-tint-sm);
    transition: var(--transition-smooth);
}

.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-tint-lg);
}

.portfolio-image img { transition: transform 0.6s var(--ease-out); }
.portfolio-card:hover .portfolio-image img { transform: scale(1.06); }

/* Filter buttons: pill polish + active brand state */
.filter-btn { transition: var(--transition-quick); }
.filter-btn.active {
    box-shadow: var(--shadow-tint-sm);
}

/* ------------------------------------------------------------
   8. WORKFLOW STEPS — make the step circle feel forged
   ------------------------------------------------------------ */
.step-circle {
    box-shadow: var(--shadow-tint-sm), var(--inset-hi);
    transition: var(--transition-smooth);
}

.workflow-step:hover .step-circle {
    transform: translateY(-4px) scale(1.03);
    box-shadow: var(--shadow-tint-md), var(--inset-hi);
}

/* ------------------------------------------------------------
   9. SCROLLBAR — quiet brand-tinted track
   ------------------------------------------------------------ */
::selection {
    background: rgba(var(--brand-rgb), 0.3);
    color: #fff;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--brand-rgb), 0.45) transparent;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(var(--brand-rgb), 0.4);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(var(--brand-rgb), 0.6); background-clip: padding-box; }

/* ------------------------------------------------------------
   11. SIGNATURE HERO — split layout + the growth engine
   The single memorable element: ad spend flows down through
   leads + automation into revenue. Boldness lives here; the
   rest of the hero stays quiet (particles/shapes removed).
   ------------------------------------------------------------ */

/* Left column: switch the centered defaults to a left-aligned thesis */
.hero-split { width: 100%; }

.hero-copy { text-align: left; }

.hero-copy .hero-description {
    margin-left: 0;
    margin-right: 0;
    max-width: 46ch;
}

.hero-copy .hero-cta-buttons {
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 0;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border-light);
    border-radius: 99px;
    background: color-mix(in srgb, var(--bg-secondary) 70%, transparent);
    box-shadow: var(--inset-hi);
    margin-bottom: var(--space-lg);
}

.hero-eyebrow span { color: var(--gradient-start); font-weight: 700; }

.hero-main-title { letter-spacing: -0.035em; }

/* Quiet tertiary link beside the single CTA */
.hero-text-link {
    font-family: var(--font-secondary);
    font-weight: 500;
    font-size: 0.98rem;
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    transition: var(--transition-quick);
}

.hero-text-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background: var(--gradient-start);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease-out);
}

.hero-text-link:hover { color: var(--text-primary); }
.hero-text-link:hover::after { transform: scaleX(1); }

/* The engine — a machined panel housing a vertical pipeline */
.growth-engine {
    position: relative;
    z-index: 2;
    padding: 1.4rem;
    border-radius: 22px;
    border: 1px solid var(--border-light);
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(var(--brand-rgb), 0.10), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
        var(--bg-secondary);
    box-shadow: var(--shadow-tint-md), var(--inset-hi);
}

.ge-caption {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-secondary);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    padding-left: 0.2rem;
}

.ge-caption-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ec26a;
    box-shadow: 0 0 0 0 rgba(46, 194, 106, 0.6);
    animation: ge-live 2.4s var(--ease-out) infinite;
}

@keyframes ge-live {
    0% { box-shadow: 0 0 0 0 rgba(46, 194, 106, 0.55); }
    70%, 100% { box-shadow: 0 0 0 7px rgba(46, 194, 106, 0); }
}

.ge-flow {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.ge-node {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    background: color-mix(in srgb, var(--bg-tertiary) 85%, transparent);
    box-shadow: var(--inset-hi);
    animation: ge-pulse 7.2s var(--ease-out) infinite;
    animation-delay: calc(var(--i) * 0.6s);
}

@keyframes ge-pulse {
    0%, 82%, 100% {
        border-color: var(--border-light);
        box-shadow: var(--inset-hi);
    }
    8%, 22% {
        border-color: var(--border-accent);
        box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.25),
            0 14px 36px -14px rgba(var(--brand-rgb), 0.55), var(--inset-hi);
    }
}

.ge-icon {
    flex: none;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    font-size: 1.05rem;
    color: var(--gradient-start);
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.16), rgba(88, 1, 102, 0.12));
    border: 1px solid var(--border-accent);
    box-shadow: var(--inset-hi);
}

.ge-node-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.ge-label {
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.ge-value {
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

.ge-value-muted { color: var(--text-tertiary); }

/* Vertical connector with a packet flowing downward (spend -> revenue) */
.ge-connector {
    width: 2px;
    height: 26px;
    margin: 5px 0 5px 21px;   /* aligns to the icon column centre */
    position: relative;
    border-radius: 2px;
    background: rgba(var(--brand-rgb), 0.16);
    overflow: hidden;
}

.ge-connector::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 60%;
    top: -60%;
    background: linear-gradient(180deg, transparent, var(--gradient-start));
    animation: ge-down 2.1s linear infinite;
}

.ge-connector:nth-of-type(4)::after { animation-delay: 0.35s; }
.ge-connector:nth-of-type(6)::after { animation-delay: 0.7s; }

@keyframes ge-down {
    from { transform: translateY(0); }
    to { transform: translateY(360%); }
}

/* Revenue node — the payoff, brighter and brand-tinted */
.ge-node-out {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.16), rgba(88, 1, 102, 0.10)), var(--bg-tertiary);
    border-color: var(--border-accent);
}

.ge-node-out .ge-icon {
    color: #fff;
    background: var(--gradient-primary);
    border-color: transparent;
}

.ge-value-hi {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gradient-start);
    letter-spacing: -0.02em;
}

@media (max-width: 991px) {
    .hero-copy { text-align: center; }
    .hero-copy .hero-description { margin-left: auto; margin-right: auto; }
    .hero-copy .hero-cta-buttons { justify-content: center; }
    .growth-engine { max-width: 460px; margin: 2.5rem auto 0; }
}

/* ------------------------------------------------------------
   12. PORTFOLIO — editorial reveal (keep the work visible)
   Replaces the full-magenta flood with a dark scrim so the
   project imagery stays legible; info slides up on hover.
   ------------------------------------------------------------ */
.portfolio-overlay {
    background: linear-gradient(
        to top,
        rgba(8, 0, 10, 0.94) 0%,
        rgba(8, 0, 10, 0.6) 42%,
        rgba(8, 0, 10, 0.05) 100%
    );
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    padding: 1.4rem;
}

.portfolio-card:hover .portfolio-overlay { opacity: 1; }

/* brand accent line that wipes across the top on hover */
.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 3;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease-out);
}

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

.portfolio-content {
    align-items: flex-start;
    text-align: left;
    transform: translateY(10px);
    transition: transform 0.45s var(--ease-out);
}

.portfolio-card:hover .portfolio-content { transform: translateY(0); }

.portfolio-content h3 { font-family: var(--font-secondary); letter-spacing: -0.01em; }

.portfolio-stat {
    background: rgba(var(--brand-rgb), 0.22);
    border: 1px solid rgba(var(--brand-rgb), 0.5);
    color: #fff;
    font-variant-numeric: tabular-nums;
}

/* View button anchored top-right instead of stacked in the middle */
.view-project-btn {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    margin-top: 0;
    opacity: 0;
    transform: translateY(-6px);
    transition: var(--transition-smooth);
}

.portfolio-card:hover .view-project-btn { opacity: 1; transform: translateY(0); }
.view-project-btn:hover { transform: scale(1.08); }

/* Year metric cards: tabular figures + tinted active glow */
.metric-value, .metric-card h3 { font-family: var(--font-secondary); }
.metric-value { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.metric-card.active { box-shadow: var(--shadow-tint-lg); }

/* ------------------------------------------------------------
   13. TESTIMONIALS — machined cards + signature quote mark
   ------------------------------------------------------------ */
.testimonial-card-item {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 38%),
        var(--bg-secondary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-tint-sm), var(--inset-hi);
}

body.light-theme .testimonial-card-item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), var(--bg-secondary) 60%);
}

/* Oversized ghost quotation mark — the section's signature detail */
.testimonial-card-item::after {
    content: '\201D';
    position: absolute;
    top: -0.35em;
    right: 0.15em;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 9rem;
    line-height: 1;
    color: var(--gradient-start);
    opacity: 0.10;
    pointer-events: none;
}

.testimonial-card-item:hover {
    transform: translateY(-6px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-tint-md), var(--inset-hi);
}

.testimonial-text { text-wrap: pretty; }
.testimonial-author { font-family: var(--font-secondary); letter-spacing: -0.01em; }

/* Carousel nav: glass chips with tinted hover */
.testimonial-nav {
    background: color-mix(in srgb, var(--bg-secondary) 78%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--inset-hi);
    transition: var(--transition-smooth);
}

.testimonial-nav:hover { box-shadow: var(--shadow-tint-sm), var(--inset-hi); }

/* Indicators: brand-tinted, active pill */
.testimonial-indicators button,
.testimonial-indicators .indicator {
    transition: var(--transition-quick);
}

/* ------------------------------------------------------------
   14. CTA + CONTACT — round out the foot of the page
   ------------------------------------------------------------ */

/* CTA: give the gradient slab real depth + a top sheen */
.cta-gradient-bg {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        radial-gradient(120% 130% at 0% 0%, rgba(255, 255, 255, 0.16), transparent 45%),
        var(--gradient-primary);
    box-shadow: var(--shadow-tint-lg), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cta-title {
    font-family: var(--font-secondary);
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.cta-text { text-wrap: pretty; }

/* White CTA button: depth + a sweeping shine on hover */
.cta-content .btn {
    font-family: var(--font-secondary);
    font-weight: 600;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 44px -18px rgba(0, 0, 0, 0.55);
    isolation: isolate;
}

.cta-content .btn::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, transparent 30%, rgba(205, 1, 253, 0.18) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.6s var(--ease-out);
}

.cta-content .btn:hover::after { transform: translateX(120%); }

/* Contact cards: machined surface, tinted hover, calmer icon */
.contact-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
        var(--bg-secondary);
    box-shadow: var(--shadow-tint-sm), var(--inset-hi);
}

body.light-theme .contact-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), var(--bg-secondary) 60%);
}

.contact-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-tint-md), var(--inset-hi);
}

.contact-card h3 {
    font-family: var(--font-secondary);
    letter-spacing: -0.01em;
}

.contact-card-icon { box-shadow: var(--inset-hi); }

/* Drop the gimmicky rotate for a calmer, more deliberate lift */
.contact-card:hover .contact-card-icon { transform: scale(1.06); }

/* ------------------------------------------------------------
   10. RESPECT REDUCED MOTION
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .btn-gradient::after,
    .cta-content .btn::after,
    .portfolio-image img,
    .portfolio-card::before,
    .portfolio-content,
    .view-project-btn,
    .service-card::after { transition: none; }
    .ge-node,
    .ge-connector::after,
    .ge-caption-dot { animation: none; }
    .ge-connector::after { display: none; }
}
