/* Fonts are loaded via <link> in base.html (with preconnect hints); no @import
   here since @import is render-blocking within this stylesheet and would just
   duplicate that request. */

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

/* Accessibility helpers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10001;
    padding: 0.75rem 1rem;
    background: #0d9488;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 0.5rem 0;
}

.skip-link:focus {
    left: 0;
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

/* Visible focus state for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #0d9488;
    outline-offset: 2px;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:root {
    --primary-color: #0d9488;
    --secondary-color: #0f766e;
    --accent-color: #f59e0b;
    --dark-bg: #ffffff;
    --darker-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --gradient-primary: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    /* Dedicated white-text button colors: --primary-color itself is too light
       for white text to clear WCAG AA (~3.7:1 light theme, ~2.5:1 dark theme).
       Fixed across both themes rather than theme-adaptive since it's chosen
       purely to keep this exact 4.5:1+ contrast, not to match brand accents. */
    --btn-primary-bg: #0f766e;
    --btn-primary-bg-hover: #0c5f58;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-color: #e2e8f0;
}

:root[data-theme="dark"] {
    --primary-color: #14b8a6;
    --secondary-color: #2dd4bf;
    --accent-color: #fbbf24;
    --dark-bg: #0f172a;
    --darker-bg: #1e293b;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --gradient-primary: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%);
    --border-color: #334155;
    /* The light-mode shadow alphas (0.05-0.1) are calibrated against white
       cards; at that opacity they're nearly invisible against a near-black
       card, so every hover-lift/elevated surface loses its shadow cue in
       dark mode. Bump the alpha substantially so shadows keep reading as
       "darker than the surface" against #1e293b/#0f172a too. */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.35);
}

/* Theme transitions: everything that reacts to the variables above fades
   instead of snapping when the toggle is clicked. */
body, .navbar, .footer {
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* .navbar's translucent blur background is an rgba() literal (not a plain
   hex var), so it needs its own explicit dark-mode override. */
:root[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.85);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--darker-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 84px;
}

@media (max-width: 600px) {
    .nav-container { height: 70px; }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-text .labs {
    color: var(--primary-color);
    font-weight: 800;
}

/* Image logo (replaces .logo-text in nav and footer) */
.nav-logo a,
.footer-logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.nav-logo-img {
    display: block;
    height: 56px;
    width: auto;
    max-width: none;
    transition: transform 0.2s ease;
}
.nav-logo a:hover .nav-logo-img,
.nav-logo a:focus-visible .nav-logo-img {
    transform: scale(1.02);
}

.footer-logo-img {
    display: block;
    height: 70px;
    width: auto;
    max-width: 100%;
    margin-bottom: 0.75rem;
}

/* The wordmark's "Jiddat" text is dark navy on a transparent background —
   legible on the light/off-white surfaces it normally sits on, but not on
   an actual dark theme. Rather than inverting (which would also invert the
   teal mark to an off-brand pink), give it a light backing chip so its
   real two-tone colors stay intact. */
[data-theme="dark"] .nav-logo-img,
[data-theme="dark"] .footer-logo-img {
    background: #f8fafc;
    padding: 0.4rem 0.65rem;
    border-radius: 0.5rem;
}

@media (max-width: 600px) {
    .nav-logo-img { height: 46px; }
    .footer-logo-img { height: 56px; }
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Nav CTA: the one link that isn't a plain scroll-to-section link, so it
   gets the same pill treatment as the hero/section buttons instead of
   blending into the flat text-link row. */
.nav-cta.btn {
    padding: 0.55rem 1.25rem;
    font-size: 0.875rem;
}

/* Duplicate of the nav-menu CTA above, shown only once the menu itself
   collapses into the hamburger (same breakpoint as .nav-menu going
   display:none below) so "Book a Call" stays visible without opening it. */
.nav-cta-mobile.btn {
    display: none;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    gap: 4px;
}

.bar {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 5px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -5px);
}

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: var(--dark-bg);
    /* Subtle engineering-blueprint dot grid under the gradient blobs below —
       var(--border-color) is already a low-contrast token in both themes. */
    background-image: radial-gradient(circle, var(--border-color) 1px, transparent 1px);
    background-size: 32px 32px;
    position: relative;
    overflow: hidden;
}

/* Soft blurred gradient blobs behind the hero content — purely decorative,
   contained by .hero's overflow:hidden so they never cause page scroll. */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.28;
    z-index: 0;
    pointer-events: none;
}

.hero::before {
    width: 420px;
    height: 420px;
    background: var(--primary-color);
    top: -140px;
    right: -100px;
}

.hero::after {
    width: 380px;
    height: 380px;
    background: var(--accent-color);
    bottom: -160px;
    left: -120px;
}

@media (max-width: 768px) {
    .hero::before,
    .hero::after {
        opacity: 0.16;
    }
}

/* Light theme's colors are darker/more saturated (meant for text/icons on
   white), so the same 0.28 opacity that glows nicely on a near-black dark-mode
   background just desaturates into a muddy wash on white. Dial it back. */
:root[data-theme="light"] .hero::before,
:root[data-theme="light"] .hero::after {
    opacity: 0.08;
}

@media (max-width: 768px) {
    :root[data-theme="light"] .hero::before,
    :root[data-theme="light"] .hero::after {
        opacity: 0.05;
    }
}

/* Blobs drift slowly instead of sitting static; site-wide reduced-motion
   rule above (.reveal's neighbor, forces animation-duration: 0.01ms) already
   neutralizes this for users who ask for it. */
.hero::before {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    animation: heroBlobDrift 16s ease-in-out infinite alternate;
}

.hero::after {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    animation: heroBlobDrift 20s ease-in-out infinite alternate-reverse;
}

@keyframes heroBlobDrift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-30px, 25px) scale(1.12); }
    100% { transform: translate(20px, -15px) scale(0.96); }
}

.hero-title .gradient-text {
    background-size: 200% auto;
    animation: gradientShimmer 6s ease-in-out infinite;
}

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

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.95rem;
    margin-bottom: 1.25rem;
    border-radius: 2rem;
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.hero-eyebrow i {
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .hero-eyebrow {
        margin-left: auto;
        margin-right: auto;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: var(--secondary-color);
}

/* Scroll-reveal: fade + rise on first intersection (applied site-wide via JS).
   Deliberately class-based rather than inline styles so it never overshadows
   a component's own :hover transform — this block must stay ABOVE every
   component rule below so hover wins the specificity tie. Each target
   component still owns its own `transition` declaration (opacity/transform
   included) so reveal timing never clobbers that component's hover speed. */
.reveal {
    opacity: 0;
    transform: translateY(20px);
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.hero-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.hero-tag i {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--btn-primary-bg-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Hero social proof: overlapping client avatars + platform logos */
.hero-social-proof {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.social-proof-avatars {
    display: flex;
}

.social-proof-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--dark-bg);
    box-shadow: var(--shadow-sm);
    background: var(--darker-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-left: -10px;
}

.social-proof-avatar:first-child {
    margin-left: 0;
}

.social-proof-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-proof-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.social-proof-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

.social-proof-logos {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.social-proof-logo {
    height: 16px;
    width: auto;
    display: inline-block;
    opacity: 0.85;
}

/* Same reasoning as .testimonial-source-badge img — Upwork's mark is
   monochrome black (safe to invert), Fiverr's has a brand-green dot that
   inversion would corrupt, so it gets a light chip instead. */
[data-theme="dark"] img[alt="Upwork"] {
    filter: brightness(0) invert(1);
}

[data-theme="dark"] .social-proof-logo[alt="Fiverr"],
[data-theme="dark"] .trust-strip-logo[alt="Fiverr"],
[data-theme="dark"] .spotlight-source[alt="Fiverr"] {
    background: #f8fafc;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Trust Strip: full-width band below the hero linking to on-page reviews */
.trust-strip {
    padding: 28px 0;
    background: var(--darker-bg);
    border-bottom: 1px solid var(--border-color);
}

.trust-strip-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.trust-strip-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

.trust-strip-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.trust-strip-logo {
    height: 20px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.trust-strip-logo-link:hover .trust-strip-logo,
.trust-strip-logo-link:focus-visible .trust-strip-logo {
    opacity: 1;
}

/* Hero results panel — replaces the old static code-window mockup with
   real credibility numbers + one actual client quote. */
.hero-results-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.results-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.1rem 1.5rem;
    background: var(--darker-bg);
    border-bottom: 1px solid var(--border-color);
}

.results-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: status-pulse 1.8s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.results-panel-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.65rem;
    border-radius: 1rem;
    white-space: nowrap;
}

.results-panel-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
}

.stat-tile i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.stat-value {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.panel-divider {
    height: 1px;
    background: var(--border-color);
}

.client-spotlight {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.spotlight-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.spotlight-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.spotlight-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spotlight-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    text-align: left;
}

.spotlight-name {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 700;
}

.spotlight-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.spotlight-source {
    height: 20px;
    width: auto;
    opacity: 0.85;
    flex-shrink: 0;
}

.spotlight-quote {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-style: italic;
    text-align: left;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.spotlight-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.spotlight-link:hover {
    text-decoration: underline;
}

/* The avatar strip now lives inside the panel's own gap-spaced flow instead
   of sitting under the CTA buttons, so drop its old standalone top margin. */
.hero-results-panel .hero-social-proof {
    margin-top: 0;
}

@media (max-width: 992px) {
    .spotlight-header {
        flex-wrap: wrap;
        justify-content: center;
    }
    /* Undo the desktop flex:1 stretch — without it the source badge gets
       shoved to the row's far edge instead of centering with the group. */
    .spotlight-info {
        flex: none;
        text-align: center;
    }
    .spotlight-quote {
        text-align: center;
    }
    .spotlight-link {
        align-self: center;
    }
}

@media (max-width: 768px) {
    .results-panel-body {
        padding: 1.25rem;
    }
    .stat-tile {
        padding: 0.85rem;
    }
}

/* Sections General */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Serif italic accent inside a heading — carries the emphasis without
   another weight of Inter. Newsreader is loaded italic-only for this. */
.section-title em,
.hero-title em {
    font-family: 'Newsreader', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0;
}

/* Category eyebrow above a section title. */
.section-label {
    display: block;
    margin-bottom: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Services (also used by Results and Pricing, which reuse this class) */
.services {
    padding: 80px 0;
    background: var(--dark-bg);
    /* Same subtle dot grid as .hero, breaks up the flat color band. */
    background-image: radial-gradient(circle, var(--border-color) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* Flex (not grid) so an incomplete last row centers itself — 5 cards in a
   3-column grid would otherwise strand 2 cards flush-left with a gaping
   empty slot beside them. */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.service-card {
    position: relative;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    flex: 1 1 300px;
    min-width: 300px;
    max-width: 400px;
}

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

/* Hover-reveal CTA over each expertise card. Fixed (not theme-adaptive var)
   scrim colors so the white button text stays readable — but the color
   itself still differs per theme: dark mode's near-black slate blends into
   an already-dark page, while the same slate on a light-mode card would
   punch a harsh black hole, so light mode gets a lighter teal scrim instead
   (same hex as --btn-primary-bg, verified high-contrast for white text). */
.service-portfolio-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.92);
    border-radius: inherit;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 2;
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

:root[data-theme="light"] .service-portfolio-overlay {
    background: rgba(15, 118, 110, 0.85);
}

.service-card:hover .service-portfolio-overlay,
.service-card:focus-within .service-portfolio-overlay {
    opacity: 1;
    visibility: visible;
}

.service-portfolio-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transform: translateY(8px);
    transition: transform 0.25s ease, background 0.2s ease;
}

.service-card:hover .service-portfolio-btn,
.service-card:focus-within .service-portfolio-btn {
    transform: translateY(0);
}

.service-portfolio-btn:hover,
.service-portfolio-btn:focus-visible {
    background: var(--secondary-color);
}

/* Fixed dark neutral background (same literal hex as .tech-icon-badge, and
   for the same reason: it's verified to clear 3:1 contrast against every
   --service-color below regardless of site theme, whereas the previous
   theme-adaptive var(--darker-bg) would flip to a near-white background in
   light mode and wreck contrast for the brighter accents). */
.service-icon {
    width: 72px;
    height: 72px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--service-color, var(--primary-color));
    transition: transform 0.2s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.08);
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.service-card .pricing-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.service-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* How We Work: reuses the .feature/.feature-icon cards from the About
   section — same card shape, different grid, no new component needed. */
.process-section {
    padding: 80px 0;
    background: var(--dark-bg);
    background-image: radial-gradient(circle, var(--border-color) 1px, transparent 1px);
    background-size: 32px 32px;
}

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

.process-compare {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.compare-col {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.75rem;
}

.compare-col--us {
    border-color: var(--primary-color);
}

.compare-col-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.compare-col--them .compare-col-title i {
    color: var(--text-secondary);
}

.compare-col--us .compare-col-title i {
    color: var(--primary-color);
}

/* Technologies */
.technologies {
    padding: 56px 0;
    background: var(--darker-bg);
}

.tech-categories {
    display: grid;
    /* minmax(0, 1fr) — not the default implicit "auto" column — so the track
       is capped at the available width instead of growing to fit the
       marquee's full (un-clipped) content width. Without this, the auto
       track sizing lets .tech-marquee's overflow:hidden box balloon to its
       content size before clipping ever applies, blowing out the page. */
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
}

.tech-category h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.tech-category h3 .icon {
    color: var(--primary-color);
}

/* Each category renders as one continuously auto-scrolling row instead of a
   multi-line grid — the same tech list in far less vertical space. The track
   holds two identical item groups back to back (the second is aria-hidden);
   animating translateX from 0 to -50% therefore shifts by exactly one
   group's width, so the loop point is invisible. The edge mask fades items
   in/out at the row boundary instead of a hard visual cut. */
/* Vertical padding gives the row real headroom instead of clipping flush
   against the item height: on hover .tech-item lifts (translateY(-2px)) and
   its badge grows (scale(1.08)), and different icon fonts (Font Awesome vs
   Phosphor) render with slightly different glyph metrics — without this
   slack, some icons' top edge gets sliced by the overflow:hidden boundary. */
.tech-marquee {
    overflow: hidden;
    min-width: 0;
    padding: 10px 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
    mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
    transition: -webkit-mask-image 0.2s ease, mask-image 0.2s ease;
}

/* Hovering pauses the row on whatever item the mouse lands on — if that item
   happened to be mid-transit through the edge fade zone, it would stay
   frozen there looking partly hidden. Dropping the mask while paused keeps
   the icon you're actually inspecting fully visible; the fade only matters
   while items are in motion. */
.tech-marquee:hover {
    -webkit-mask-image: none;
    mask-image: none;
}

.tech-track {
    display: flex;
    width: max-content;
    gap: 1rem;
    animation: tech-marquee-scroll 32s linear infinite;
}

/* Alternate scroll direction per row so the section reads as motion, not repetition. */
.tech-category:nth-child(even) .tech-track {
    animation-direction: reverse;
}

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

.tech-track-group {
    display: contents;
}

@keyframes tech-marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.tech-item {
    background: var(--card-bg);
    padding: 0.6rem 1.1rem 0.6rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    white-space: nowrap;
}

.tech-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* Each tech-item carries its own brand color via the --tech-color custom
   property (set inline per item); items with no strong official brand
   color (e.g. NLTK) simply fall back to the site's primary teal.
   Badge background is a FIXED dark neutral (literal hex, deliberately NOT
   var(--text-primary)/var(--darker-bg) — those flip in dark mode, which
   would collapse both badge variants to the same color and wreck the WCAG
   calibration below) — not a tint of the brand color itself, since tinting
   toward white broke contrast (many brand colors sit at medium-to-high
   luminance, so icon-vs-own-tinted-badge came out under 3:1, e.g.
   JavaScript's yellow at ~1.3:1). A dark neutral badge clears 3:1 against
   every brand color used here except the ones that are themselves too dark
   or too saturated at medium luminance (OpenCV, Django, Bootstrap, Keras,
   Pandas) — those opt into the light variant below via
   .tech-icon-badge--light. Both variants are fixed in both themes on
   purpose: recomputing them per-theme would need re-verifying all 27
   contrast ratios against a second badge color. */
.tech-icon-badge {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    background: #1e293b;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.tech-icon-badge.tech-icon-badge--light {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.tech-item:hover .tech-icon-badge {
    transform: scale(1.08);
}

.tech-item .icon {
    font-size: 1.25rem;
    color: var(--tech-color, var(--primary-color));
}

.tech-item span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.about-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.feature {
    background: var(--darker-bg);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.feature-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}


/* Founder Section */
.founder-section {
    padding: 80px 0;
    background: var(--darker-bg);
}

.founder-card {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 3rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.founder-visual {
    text-align: center;
}

.founder-avatar-frame {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 2rem;
}

.avatar-glow {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary-color), var(--accent-color), var(--secondary-color), var(--primary-color));
    filter: blur(16px);
    opacity: 0.55;
    z-index: 0;
    animation: avatar-glow-spin 8s linear infinite;
}

@keyframes avatar-glow-spin {
    to { transform: rotate(360deg); }
}

.founder-avatar {
    position: relative;
    z-index: 1;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

.founder-achievements {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.achievement {
    padding: 1rem;
    background: var(--darker-bg);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.achievement .number {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

.achievement .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.founder-info h2,
.founder-info h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.founder-info h2 a,
.founder-info h3 a {
    color: inherit;
    text-decoration: none;
}

.founder-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: var(--darker-bg);
    color: var(--text-primary);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Team Section (homepage block + /team page) — reuses .founder-card for every member */
.team-section {
    padding: 80px 0;
    background: var(--darker-bg);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--dark-bg);
}

/* Follows Pricing (.services), same --dark-bg with no divider between them —
   full padding on both sides would double into 160px of flat dead space. */
#pricing {
    padding-bottom: 40px;
}

#contact {
    padding-top: 40px;
}

.call-includes {
    max-width: 420px;
    margin: 0 auto 2.5rem;
    text-align: left;
}

/* Column, not row: this holds the button *and* the "not ready yet" line.
   As a row the two overflowed the container in both directions. */
.book-call {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.book-call .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* CTA Section */
.hero-cta, .cta-section {
    padding: 80px 0;
    /* Deliberately always dark (like the hero code-window), independent of
       site theme — not var(--text-primary), which flips to a light color
       in dark mode and would turn this into a light band with invisible
       white text. */
    background: #1e293b;
    color: white;
    text-align: center;
}

.hero-cta h2, .cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
}

.hero-cta p, .cta-subtitle {
    color: #cbd5e1;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section p a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section p a:hover {
    color: var(--primary-color);
}

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

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .founder-card {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        min-width: 0;
        width: 100%;
        max-width: 100vw;
    }

    .hero-visual {
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .hero-buttons, .hero-tags, .hero-social-proof, .expertise-tags {
        justify-content: center;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--card-bg);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
    }

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

    .nav-cta-mobile.btn {
        display: inline-flex;
    }

    .hamburger {
        display: flex;
    }

    .founder-avatar-frame {
        margin-right: auto;
        margin-left: auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .code-window {
        max-width: 100%;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* Testimonials: a fanned "deck of cards" — the active review up front,
   the next couple peeking behind it, cycling via autoplay, drag/swipe,
   arrows, or keyboard. Scales to any number of testimonials since only
   the top 3 of the stack are ever visibly rendered at once. */
.testimonials {
    padding: 80px 0;
    background: var(--dark-bg);
}

.testimonial-deck-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    /* No overflow-x:hidden backstop here anymore — the peeking cards below
       deliberately overflow this box on both axes (that's the "peek"), and
       per spec, pairing overflow-x:hidden with an unset (visible) overflow-y
       silently promotes overflow-y to "auto", which rendered a real vertical
       scrollbar whenever the peeking cards overflowed vertically. body's own
       overflow-x:hidden (styles.css) already backstops horizontal page
       scroll, so this element is safe left at the default visible/visible. */
}

.testimonial-deck {
    position: relative;
    flex: 0 1 min(640px, 100%);
    height: 460px;
}

@media (min-width: 640px) {
    .testimonial-deck { height: 400px; }
}

.testimonial-deck:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 6px;
    border-radius: 1.25rem;
}

.testimonial-card {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    padding: 2.5rem 1.75rem 1.75rem;
    border-radius: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    /* opacity fades much faster than transform: a card jumping straight from
       front (pos 0) to the far back (pos 3, opacity 0) used to stay visible
       for most of the slide, overlapping the incoming card mid-transition
       and "ghosting" both cards' text/badges on top of each other. */
    transition: transform 0.55s cubic-bezier(0.22, 0.68, 0, 1.01), opacity 0.1s ease-out;
    touch-action: pan-y;
    cursor: grab;
}

.testimonial-card.dragging {
    transition: none;
    cursor: grabbing;
}

/* Stack depth 0 = active card, 1-2 = peeking behind it, 3+ = out of sight
   (still in the DOM for crawlers/SEO, just faded away behind the stack). */
.testimonial-card[data-pos="0"] {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
    z-index: 3;
}

.testimonial-card[data-pos="1"] {
    transform: translate(18px, 16px) rotate(2.5deg) scale(0.96);
    opacity: 0.7;
    z-index: 2;
    cursor: default;
}

.testimonial-card[data-pos="2"] {
    transform: translate(34px, 30px) rotate(4.5deg) scale(0.92);
    opacity: 0.4;
    z-index: 1;
    cursor: default;
}

.testimonial-card[data-pos="3"] {
    transform: translate(34px, 30px) rotate(4.5deg) scale(0.88);
    opacity: 0;
    z-index: 0;
    cursor: default;
}

/* Below ~500px the deck is nearly full-viewport width, so the peeking
   cards' rightward translate pushed their edge past the viewport and
   caused real page-level horizontal scroll. Halving the offsets keeps the
   peek effect visible without overflowing at these widths. */
@media (max-width: 500px) {
    .testimonial-card[data-pos="1"] {
        transform: translate(9px, 8px) rotate(1.5deg) scale(0.96);
    }

    .testimonial-card[data-pos="2"] {
        transform: translate(16px, 14px) rotate(2.5deg) scale(0.92);
    }

    .testimonial-card[data-pos="3"] {
        transform: translate(16px, 14px) rotate(2.5deg) scale(0.88);
    }
}

.testimonial-source-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    display: inline-flex;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.testimonial-source-badge:hover,
.testimonial-source-badge:focus-visible {
    opacity: 1;
    transform: translateY(-2px);
}

.testimonial-source-badge img {
    height: 22px;
    width: auto;
    display: block;
}

/* Upwork's logo is a solid black wordmark — safe to invert to white in dark
   mode. Fiverr's has a brand-green dot, which inversion would corrupt into
   an off-brand pink, so it gets a light backing chip instead (same
   reasoning as the site wordmark above). */
[data-theme="dark"] .testimonial-source-badge img[alt="Fiverr"] {
    background: #f8fafc;
    padding: 3px 6px;
    border-radius: 4px;
}

.testimonial-quote-mark {
    display: block;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 4rem;
    line-height: 1;
    color: var(--primary-color);
    opacity: 0.15;
    margin-bottom: -0.75rem;
}

.testimonial-text {
    color: var(--text-primary);
    font-size: 0.98rem;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 1.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 640px) {
    .testimonial-text { -webkit-line-clamp: 6; }
}

.testimonial-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.testimonial-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--darker-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-person-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.testimonial-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testimonial-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Prev/next arrows: desktop-only affordance — mobile relies on the drag/swipe
   already available on the card itself, which also frees up the width budget. */
.testimonial-nav {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

@media (min-width: 640px) {
    .testimonial-nav { display: flex; }
}

.testimonial-nav:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.testimonial-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: min(640px, 100%);
    margin: 1.75rem auto 0;
}

.testimonial-progress {
    flex-grow: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    overflow: hidden;
}

.testimonial-progress-bar {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: var(--gradient-primary);
    transition: width 0.4s ease;
}

.testimonial-counter {
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   SEO: project breadcrumbs + related projects
   ============================================================ */

/* Visible breadcrumbs on project pages (mirrors BreadcrumbList JSON-LD) */
.project-breadcrumb-visible {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}
.project-breadcrumb-visible a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}
.project-breadcrumb-visible a:hover { border-color: currentColor; }
.project-breadcrumb-visible .sep { color: #cbd5e1; padding: 0 0.15rem; }

/* Related projects strip on project pages */
.related-projects {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.related-projects h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.related-projects h2 i { color: var(--primary-color); }
.related-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}
@media (min-width: 700px) {
    .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.related-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.related-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}
.related-kicker {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin: 0 0 0.4rem;
    font-weight: 600;
}
.related-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}
.related-card:hover .related-title { color: var(--primary-color); }
.related-arrow {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* FAQ — native <details>, no JS. Reuses the card surface from .service-card. */
.faq {
    padding: 80px 0;
    background: var(--darker-bg);
}

.faq-list {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
}

/* Hide the default disclosure triangle; the caret icon replaces it. */
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover { color: var(--primary-color); }

.faq-item summary:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.faq-item summary i {
    flex-shrink: 0;
    color: var(--primary-color);
    transition: transform 0.2s ease;
}

.faq-item[open] summary i { transform: rotate(180deg); }

.faq-item > p {
    margin: 0;
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-footer {
    max-width: 820px;
    margin: 2rem auto 0;
    text-align: center;
    color: var(--text-secondary);
}

.faq-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Pricing badge + timeline line (cards reuse .service-card, which is positioned). */
.pricing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
}

.pricing-timeline {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: -0.5rem 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Duration chip beside each "How We Work" step heading. */
.step-duration {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    vertical-align: middle;
    white-space: nowrap;
}

/* --- Free AI Opportunity Audit page --- */
.audit-hero {
    padding: 120px 0 80px;
    background: var(--dark-bg);
    background-image: radial-gradient(circle, var(--border-color) 1px, transparent 1px);
    background-size: 32px 32px;
}

.audit-intro {
    max-width: 760px;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.audit-intro .hero-title { margin: 1rem 0; }

.audit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    max-width: 1080px;
    margin: 0 auto;
}

@media (max-width: 860px) {
    .audit-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.audit-grid h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.audit-deliverables .service-features li { margin-bottom: 0.85rem; }
.audit-deliverables strong { color: var(--text-primary); }

.audit-turnaround {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.audit-catch {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.audit-form-wrap {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.audit-form { display: flex; flex-direction: column; }

.audit-form label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.audit-form label span[aria-hidden] { color: var(--primary-color); }
.field-optional { font-weight: 400; color: var(--text-secondary); }

.audit-form input,
.audit-form textarea {
    font: inherit;
    color: var(--text-primary);
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.7rem 0.85rem;
    margin-bottom: 1.25rem;
    width: 100%;
    resize: vertical;
}

.audit-form input:focus,
.audit-form textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
    border-color: var(--primary-color);
}

.audit-form .btn { align-self: flex-start; }

.audit-privacy {
    margin-top: 1rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.audit-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 0.5rem;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #b91c1c;
    font-size: 0.9375rem;
}

:root[data-theme="dark"] .audit-error { color: #fca5a5; }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.audit-sent {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.audit-sent i {
    font-size: 3.5rem;
    color: var(--primary-color);
}

.audit-sent h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 1rem 0;
}

.audit-sent p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.audit-sent-meta a { color: var(--primary-color); font-weight: 600; }

.book-call-alt {
    margin-top: 1.25rem;
    max-width: 46ch;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.book-call-alt a { color: var(--primary-color); font-weight: 600; }

/* Footer brand note: what the name actually means. Uses the Nastaliq face
   that was already in the font request. */
.footer-brand-note {
    margin-top: 0.85rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.footer-brand-note em {
    font-family: 'Newsreader', Georgia, serif;
    font-style: italic;
    color: var(--text-primary);
}

.brand-urdu {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 1.15rem;
    line-height: 2.2;
    color: var(--primary-color);
    margin-inline-end: 0.35rem;
}
