.clear-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2rem;
}

@media (max-width: 1023px) {
    .clear-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

#principles {
    padding-block-start: 4rem !important;
    padding-block-end: 2rem !important;
}

#testimonials {
    padding-block-start: 2rem !important;
}

main > section:first-of-type {
    min-height: auto !important;
    padding-top: 6rem !important;
    padding-bottom: 4rem !important;
}

/* Hide decorative bars above service card headings */
#services .h-px.bg-border.max-w-24 {
    display: none !important;
}

/* Remove leftover space from hidden service card bars */
#services .flex.items-center.gap-4.mb-4 {
    display: none !important;
}

/* Hero backdrop polish */
main > section:first-of-type {
    background: radial-gradient(circle at 28% 42%, rgba(56, 68, 82, 0.14), transparent 34%),
    radial-gradient(circle at 72% 38%, rgba(73, 88, 104, 0.10), transparent 32%),
    radial-gradient(circle at 50% 72%, rgba(35, 45, 58, 0.045), transparent 42%),
    linear-gradient(180deg, #f2f4f5 0%, #ffffff 68%, #ffffff 100%);
}

/* Section banding polish */
#services {
    background: #f4f6f7;
}

#testimonials {
    background: #eef1f3;
}

#contact {
    background: #f4f6f7;
}

/* Service card polish */
#services .group {
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(31, 41, 55, 0.10) !important;
    box-shadow: 0 18px 45px rgba(31, 41, 55, 0.055);
    backdrop-filter: blur(6px);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

#services .group:hover {
    transform: translateY(-2px);
    border-color: rgba(231, 91, 30, 0.22) !important;
    box-shadow: 0 22px 55px rgba(31, 41, 55, 0.085);
}

/* Testimonial card polish */
#testimonials .rounded-2xl {
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(31, 41, 55, 0.09) !important;
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.045);
}

/* Prevent sticky header from crowding anchored sections */
main section {
    scroll-margin-top: 110px;
}

#services,
#principles,
#testimonials,
#contact {
    padding-top: 6rem !important;
}

/* Contact form polish */
#contact form,
#contact .rounded-2xl {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(31, 41, 55, 0.10) !important;
    box-shadow: 0 18px 45px rgba(31, 41, 55, 0.055);
}

/* Insights section polish - matched to existing Covergent section system */
#insights {
    background: #ffffff;
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
}

.insights-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3rem;
}

.insights-intro-copy {
    max-width: 48rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.insight-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(31, 41, 55, 0.10);
    border-radius: 0.75rem;
    box-shadow: 0 16px 40px rgba(31, 41, 55, 0.045);
    text-decoration: none;
    color: inherit;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.insight-card:hover {
    transform: translateY(-2px);
    border-color: rgba(231, 91, 30, 0.22);
    box-shadow: 0 22px 55px rgba(31, 41, 55, 0.075);
}

.insight-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #e5e9ec;
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.insight-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.5rem;
}

.insight-card .insight-meta,
.post-meta {
    color: #e75b1e;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.insight-card h3 {
    margin-top: 1rem;
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.insight-card p {
    margin-top: 1rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.65;
}

.insight-card .read-more {
    margin-top: auto;
    padding-top: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.insights-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0 1.1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(31, 41, 55, 0.14);
    color: hsl(var(--foreground));
    font-weight: 700;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 30px rgba(31, 41, 55, 0.04);
}

.insights-link:hover {
    border-color: rgba(231, 91, 30, 0.28);
}

.blog-archive {
    background: #f4f6f7;
}

.blog-archive .insights-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-page {
    background: #ffffff;
}

.post-hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
    background: #f4f6f7;
}

.post-hero-inner {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.back-link {
    display: inline-flex;
    margin-bottom: 2rem;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    color: hsl(var(--foreground));
}

.post-hero h1 {
    margin-top: 1.25rem;
    font-family: var(--font-playfair), Georgia, serif;
    font-size: clamp(2.75rem, 6vw, 5.75rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    font-weight: 500;
    color: hsl(var(--foreground));
}

.post-deck {
    margin-top: 1.5rem;
    font-size: 1.25rem;
    line-height: 1.7;
    color: hsl(var(--muted-foreground));
}

.post-cover {
    margin-top: 2.5rem;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0.85rem;
    border: 1px solid rgba(31, 41, 55, 0.10);
    box-shadow: 0 18px 45px rgba(31, 41, 55, 0.075);
}

.post-body-wrap {
    max-width: 48rem;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

.source-note {
    margin-bottom: 2rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.95rem;
}

.source-note a {
    color: hsl(var(--foreground));
    font-weight: 700;
}

.post-body p {
    margin: 0 0 1.5rem;
    color: hsl(var(--foreground));
    font-size: 1.08rem;
    line-height: 1.85;
}

.post-body h2 {
    margin: 3rem 0 1rem;
    color: hsl(var(--foreground));
    font-size: 1.75rem;
    line-height: 1.25;
    font-weight: 600;
}

.post-body blockquote {
    margin: 2.5rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid #e75b1e;
    background: rgba(244, 246, 247, 0.85);
    border-radius: 0.5rem;
    color: hsl(var(--foreground));
    font-size: 1.15rem;
    line-height: 1.75;
    font-weight: 600;
}

@media (max-width: 1023px) {
    .insights-intro {
        display: block;
    }

    .insights-link {
        margin-top: 1.5rem;
    }

    .insights-grid,
    .blog-archive .insights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 639px) {
    .insights-grid,
    .blog-archive .insights-grid {
        grid-template-columns: 1fr;
    }

    #insights {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
}

/* Article list polish */
.post-body ul,
.post-body ol {
    margin: 0 0 1.75rem 1.25rem;
    padding-left: 1.25rem;
    color: hsl(var(--foreground));
}

.post-body ul {
    list-style: disc;
}

.post-body ol {
    list-style: decimal;
}

.post-body li {
    margin: 0.45rem 0;
    font-size: 1.08rem;
    line-height: 1.65;
}

/* Service card expand-in-place behavior */
#services details.service-expander {
    overflow: hidden;
}

#services .service-expander-summary {
    list-style: none;
    cursor: pointer;
}

#services .service-expander-summary::-webkit-details-marker {
    display: none;
}

#services .service-expander-summary:focus-visible {
    outline: 2px solid rgba(231, 91, 30, 0.55);
    outline-offset: 0.45rem;
    border-radius: 0.5rem;
}

#services .service-expander-icon {
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

#services details.service-expander[open] .service-expander-icon {
    transform: rotate(45deg);
    background: hsl(var(--foreground));
    border-color: hsl(var(--foreground));
}

#services details.service-expander[open] .service-expander-icon svg {
    color: hsl(var(--background));
}

#services .service-expander-content {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(31, 41, 55, 0.10);
    max-width: 54rem;
    color: hsl(var(--foreground));
}

#services .service-expander-content p {
    margin: 0 0 0.65rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.65;
    font-size: 1.02rem;
}

#services .service-expander-content ul,
#services .service-expander-content ol {
    margin: 0.35rem 0 0;
    padding-left: 1.25rem;
    color: hsl(var(--foreground));
}

#services .service-expander-content ul {
    list-style: disc;
}

#services .service-expander-content ol {
    list-style: decimal;
}

#services .service-expander-content li {
    margin: 0.2rem 0;
    line-height: 1.45;
}

/* Covergent compliance pages and cookie consent */
.legal-page {
    padding-top: 7rem;
    padding-bottom: 4rem;
}

.legal-page .legal-shell {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.legal-page .legal-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: hsl(var(--accent));
}

.legal-page h1 {
    margin-top: 0.75rem;
    font-family: var(--font-playfair), Georgia, serif;
    font-size: clamp(2.35rem, 4.6vw, 4.1rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: hsl(var(--foreground));
}

.legal-page .legal-updated {
    margin-top: 0.65rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.92rem;
}

.legal-page .legal-content {
    margin-top: 2.1rem;
    color: hsl(var(--foreground));
}

.legal-page .legal-content h2 {
    margin: 1.6rem 0 0.45rem;
    font-size: 1.22rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.legal-page .legal-content p,
.legal-page .legal-content li {
    color: hsl(var(--muted-foreground));
    font-size: 0.98rem;
    line-height: 1.55;
}

.legal-page .legal-content p {
    margin: 0 0 0.85rem;
}

.legal-page .legal-content ul {
    margin: 0.35rem 0 0.85rem 1.25rem;
    padding-left: 1.25rem;
    list-style: disc;
}

.legal-page .legal-content a,
.covergent-contact-privacy a,
.covergent-cookie-banner a {
    color: hsl(var(--accent));
    text-decoration: none;
}

.legal-page .legal-content a:hover,
.covergent-contact-privacy a:hover,
.covergent-cookie-banner a:hover {
    text-decoration: underline;
}

.covergent-contact-privacy {
    color: hsl(var(--muted-foreground));
    font-size: 0.86rem;
    line-height: 1.55;
}

.covergent-cookie-settings-link {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.covergent-cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.25rem;
    align-items: end;
    max-width: 70rem;
    margin: 0 auto;
    padding: 1.25rem;
    border: 1px solid rgba(31, 41, 55, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(12px);
}

.covergent-cookie-banner[hidden] {
    display: none;
}

.covergent-cookie-copy h2 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 650;
    color: hsl(var(--foreground));
}

.covergent-cookie-copy p {
    margin: 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.92rem;
    line-height: 1.55;
}

.covergent-cookie-options {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.45rem;
    color: hsl(var(--foreground));
    font-size: 0.9rem;
}

.covergent-cookie-options label {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.covergent-cookie-links {
    margin-top: 0.75rem !important;
}

.covergent-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

.covergent-cookie-actions button {
    min-height: 2.5rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(31, 41, 55, 0.18);
    background: #fff;
    color: hsl(var(--foreground));
    padding: 0 0.9rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.covergent-cookie-actions button:hover {
    background: rgba(31, 41, 55, 0.04);
}

#covergent-cookie-accept,
#covergent-cookie-save {
    background: hsl(var(--foreground));
    color: hsl(var(--background));
    border-color: hsl(var(--foreground));
}

@media (max-width: 760px) {
    .covergent-cookie-banner {
        grid-template-columns: 1fr;
    }

    .covergent-cookie-actions {
        justify-content: stretch;
    }

    .covergent-cookie-actions button {
        flex: 1 1 auto;
    }
}



/* Core values section */
#values {
    scroll-margin-top: 110px;
}

.cv-values-section {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    padding: 6rem 0;
}

.cv-values-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 20%, rgba(231, 91, 30, 0.08), transparent 30%),
        radial-gradient(circle at 85% 10%, rgba(31, 41, 55, 0.06), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f7f8f9 100%);
}

.cv-values-shell {
    position: relative;
    z-index: 1;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.cv-values-intro {
    max-width: 50rem;
    margin-bottom: 3.5rem;
}

.cv-values-eyebrow {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.25rem;
    text-transform: uppercase;
    color: hsl(var(--accent));
}

.cv-values-intro h2 {
    margin-top: 1rem;
    font-family: var(--font-playfair), Georgia, serif;
    font-size: clamp(2.25rem, 4.2vw, 3.35rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 500;
    color: hsl(var(--foreground));
}

.cv-values-intro p {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.75;
    color: hsl(var(--muted-foreground));
}

.cv-values-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.cv-value-card {
    position: relative;
    min-height: 100%;
    padding: 2rem;
    border: 1px solid rgba(31, 41, 55, 0.10);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 45px rgba(31, 41, 55, 0.055);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.cv-value-card:hover {
    transform: translateY(-2px);
    border-color: rgba(231, 91, 30, 0.24);
    box-shadow: 0 22px 55px rgba(31, 41, 55, 0.08);
}

.cv-value-rule {
    width: 3rem;
    height: 2px;
    margin-bottom: 1.35rem;
    background: #e75b1e;
}

.cv-value-card h3 {
    font-size: 1.45rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: hsl(var(--foreground));
}

.cv-value-card p {
    margin-top: 1rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.72;
}

@media (max-width: 1023px) {
    .cv-values-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 639px) {
    .cv-values-section {
        padding: 4rem 0;
    }

    .cv-value-card {
        padding: 1.5rem;
    }
}

/* v0.3.1.18: Hero image scaling correction
   Keep the image composition stable across viewport and content-height changes. */
main > section:first-of-type img[src*="covergent-hero-gemini-bg"] {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* v0.3.1.21: Twine-style hero image scaling experiment
   Treat the new visual as a scaled decorative band instead of a cropped full-cover background. */
main > section:first-of-type div:has(> img[src*="covergent-hero-gemini-bg"]) {
    top: 50%;
    bottom: auto;
    left: 8%;
    right: 0;
    height: 45%;
    display: flex;
    align-items: center;
    transform: translateY(calc(-50% + 10px));
}

main > section:first-of-type img[src*="covergent-hero-gemini-bg"] {
    width: 95%;
    height: auto;
    max-width: none;
    object-fit: contain;
    object-position: left center;
}

/* v0.3.1.22: Mobile hero metaphor placement
   Restore edge-to-edge proportional scaling on mobile and move the visual behind the headline. */
@media (max-width: 767px) {
    main > section:first-of-type div:has(> img[src*="covergent-hero-gemini-bg"]) {
        top: 31%;
        bottom: auto;
        left: 0;
        right: 0;
        height: auto;
        transform: none;
        display: block;
    }

    main > section:first-of-type img[src*="covergent-hero-gemini-bg"] {
        width: 100%;
        height: auto;
        object-fit: contain;
        object-position: center top;
    }
}

/* v0.3.1.23: Desktop/tablet edge-to-edge hero band
   Keep the accepted mobile behavior from v0.3.1.22, but remove the desktop/tablet side gutters introduced by the twine-style scaling experiment. */
@media (min-width: 768px) {
    main > section:first-of-type div:has(> img[src*="covergent-hero-gemini-bg"]) {
        left: 0;
        right: 0;
        width: 100%;
    }

    main > section:first-of-type img[src*="covergent-hero-gemini-bg"] {
        width: 100%;
    }
}
