/* Self-hosted Google Fonts */
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/lora-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/lora-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/montserrat-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/montserrat-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/montserrat-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/montserrat-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

body, p {
    font-family: 'Lora', serif;
    font-weight: 400; 
    line-height: 1.6; 
}

a, .button, .btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600; 
}

h1 {
    font-size: 2.5rem;
}

p {
    font-size: 1.125rem; 
    line-height: 1.75;  
}

.custom-linkedin-badge a {
    color: rgba(220, 38, 38, 1); 
    border-color: rgba(220, 38, 38, 1); 
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.custom-linkedin-badge a:hover {
    background-color: rgba(220, 38, 38, 1);
    color: #fff; 
}   

.service-link {
    font-family: inherit;
    color: inherit;
    cursor: pointer;
}

html {
    scroll-behavior: smooth;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    gap: 2px;
    padding: 12px;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    opacity: 1;
    transition: opacity 0.4s ease-out;
}

.scroll-indicator.scroll-indicator-hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-chevron {
    animation: scrollDown 2s ease-in-out infinite;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.scroll-chevron-delayed {
    animation-delay: 0.25s;
    opacity: 0.5;
}

.scroll-indicator:hover .scroll-chevron,
.scroll-indicator:active .scroll-chevron {
    opacity: 1;
}

.scroll-indicator:hover .scroll-chevron-delayed,
.scroll-indicator:active .scroll-chevron-delayed {
    opacity: 0.8;
}

@keyframes scrollDown {
    0% {
        transform: translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.4;
    }
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }
}

@media (max-width: 768px) {
    .scroll-indicator {
        padding: 10px;
    }
    
    .scroll-chevron {
        animation: scrollDownMobile 2s ease-in-out infinite;
    }
    
    .scroll-chevron-delayed {
        animation: scrollDownMobile 2s ease-in-out infinite;
        animation-delay: 0.25s;
    }
}

@keyframes scrollDownMobile {
    0% {
        transform: translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(8px);
        opacity: 0.4;
    }
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }
}

/* Testimonials Carousel */
.testimonials-carousel {
    position: relative;
    overflow: hidden;
    padding: 5px 60px;
}

.testimonials-track {
    display: flex;
    align-items: stretch;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    min-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
}

.testimonial-slide > div {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-slide.active {
    opacity: 1;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

.carousel-button:hover {
    background-color: rgba(220, 38, 38, 1);
    border-color: rgba(220, 38, 38, 1);
}

.carousel-button:hover svg {
    stroke: white;
}

.carousel-button:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-button.prev {
    left: 0;
}

.carousel-button.next {
    right: 0;
}

.carousel-button svg {
    width: 24px;
    height: 24px;
    stroke: rgba(220, 38, 38, 1);
    transition: stroke 0.3s ease;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(156, 163, 175, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.carousel-dot:hover {
    background-color: rgba(220, 38, 38, 0.5);
}

.carousel-dot.active {
    background-color: rgba(220, 38, 38, 1);
    transform: scale(1.2);
}

@media (max-width: 1024px) {
    /* Mobile/tablet: stack vertically — track on top, then [prev] [dots] [next] in a row */
    .testimonials-carousel {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "track track track"
            "prev  dots  next";
        column-gap: 12px;
        row-gap: 16px;
        padding: 5px 4px;
    }

    .testimonials-track {
        grid-area: track;
    }

    .carousel-button {
        position: static;
        transform: none;
        width: 36px;
        height: 36px;
    }

    .carousel-button.prev {
        grid-area: prev;
    }

    .carousel-button.next {
        grid-area: next;
    }

    .carousel-button:active {
        transform: scale(0.95);
    }

    .carousel-button svg {
        width: 18px;
        height: 18px;
    }

    .carousel-dots {
        grid-area: dots;
        margin-top: 0;
        align-self: center;
        gap: 10px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

/* Services Tabs */
.services-tablist {
    display: flex;
    flex-wrap: wrap;
    padding-bottom: 0.25rem;
    gap: 3rem;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
    margin-top: 3rem;
}

.services-tab {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: #6B7280;
    background: none;
    border: none;
    padding: 0 0 0.65rem;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.services-tab:hover {
    color: #b91c1c;
}

.services-tab:focus-visible {
    outline: none;
    border-color: rgba(220, 38, 38, 0.35);
}

.services-tab.active {
    color: #111827;
    border-color: #DC2626;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.25s ease-in;
    background-color: #FFFFFF;
    padding: 1rem;
    margin-top: 0.5rem;
}

.tab-panel.active {
    display: block;
}

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

@media (max-width: 640px) {
    .services-tablist {
        justify-content: center;
        gap: 1.25rem;
    }

    .services-tab {
        padding-bottom: 0.45rem;
        font-size: 1.2rem;
    }

    /* Drop wrapper padding on mobile so cards reach the container edges, matching the Why Hire grid */
    .tab-panel {
        padding: 0;
        background-color: transparent;
    }
}

.services-section h2 {
    margin-bottom: 2.25rem;
}

/* Blog Styles */
.blog-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    position: relative;
    overflow: hidden;
}

.blog-card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(220, 38, 38, 0.1) 100%);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-featured {
    grid-column: 1 / -1;
}

.blog-featured .blog-card-image {
    aspect-ratio: 21 / 9;
}

.blog-featured .blog-card-content {
    padding: 2rem;
}

.category-badge {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.category-engineering {
    background-color: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.category-teams {
    background-color: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.category-strategy {
    background-color: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.category-research {
    background-color: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    color: #6b7280;
}

.article-meta svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

.author-section {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background-color: #f9fafb;
    border-radius: 12px;
    margin-top: 3rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.author-info .author-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.author-info .author-bio {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.author-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #dc2626;
    transition: opacity 0.2s ease;
}

.author-link:hover {
    opacity: 0.8;
}

.related-articles {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e7eb;
}

.related-articles h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.related-card {
    display: block;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.related-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-card p {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
}

@media (max-width: 768px) {
    main.container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .author-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .blog-featured .blog-card-image {
        aspect-ratio: 16 / 9;
    }

    .blog-featured .blog-card-content {
        padding: 1.5rem;
    }
}
/* ============================================================
   Editorial layout system (homepage)
   One column width, two primitives: .ed-row and .ed-col.
   Everything else is spacing and rules. No shadows, no radii.
   ============================================================ */

.ed-wrap {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .ed-wrap {
        padding: 0 2rem;
    }
}

.ed-section {
    width: 100%;
    padding: 4rem 0;
}

/* Sections alternate white / gray. The band does the separating, which is
   why no section carries a rule. */
.ed-section--alt {
    background-color: #f9fafb;
}

.ed-section--alt a.ed-row:hover,
.ed-section--alt .ed-art:hover {
    background-color: #fff;
}

@media (min-width: 768px) {
    .ed-section {
        padding: 5.5rem 0;
    }
}

.ed-eyebrow {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #dc2626;
    margin: 0 0 0.9rem;
}

.ed-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.ed-lede {
    font-size: 1.125rem;
    color: #4b5563;
    line-height: 1.7;
    margin: 0 0 3.25rem;
}

/* --- primitive: ruled row --- */
/* Lists are fenceless: separators sit *between* items only. */
.ed-rows > * + * {
    border-top: 1px solid #e5e7eb;
}

.ed-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 2.5rem 1rem;
    margin: 0 -1rem;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.18s ease;
}

@media (min-width: 768px) {
    .ed-row {
        grid-template-columns: repeat(12, 1fr);
        gap: 3rem;
        align-items: baseline;
    }

    .ed-row .ed-k { grid-column: span 4; }
    .ed-row .ed-v { grid-column: span 7; }
    .ed-row .ed-go { grid-column: span 1; justify-self: end; }
}

a.ed-row:hover { background-color: #fafafa; }
a.ed-row:hover .ed-k h3 { color: #dc2626; }

.ed-row h3 {
    font-size: 1.1875rem;
    font-weight: 600;
    margin: 0;
    transition: color 0.18s ease;
}

.ed-row .ed-v p { margin: 0; color: #4b5563; }

.ed-row .ed-go {
    display: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    color: #d1d5db;
    transition: transform 0.18s ease, color 0.18s ease;
}

@media (min-width: 768px) {
    .ed-row .ed-go { display: block; }
}

a.ed-row:hover .ed-go {
    color: #dc2626;
    transform: translateX(4px);
}

.ed-row--accent {
    border-left: 2px solid #dc2626;
    padding-left: 1.5rem;
    margin-left: -1.5rem;
}

.ed-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0.25rem 0 0;
}

.ed-price small {
    font-size: 0.9375rem;
    font-weight: 400;
    color: #6b7280;
}

.ed-meta {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0.15rem 0 0;
}

.ed-feat {
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem 0.5rem;
    font-size: 0.9375rem;
    color: #4b5563;
}

.ed-feat li {
    padding-left: 1.4rem;
    text-indent: -1.4rem;
}

@media (min-width: 640px) {
    .ed-feat {
        grid-template-columns: 1fr 1fr;
        column-gap: 2rem;
    }
}

.ed-feat li::before {
    content: "—";
    color: #dc2626;
    margin-right: 0.5rem;
}

.ed-link {
    color: #dc2626;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 0.9rem;
}

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

/* --- primitive: ruled column --- */
.ed-cols {
    display: grid;
    gap: 3rem;
}

@media (min-width: 768px) {
    .ed-cols--3 { grid-template-columns: repeat(3, 1fr); }
    .ed-cols--2 { grid-template-columns: repeat(2, 1fr); }
}

.ed-col {
    display: block;
    border-top: 1px solid #111827;
    padding-top: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease;
}

a.ed-col:hover { border-color: #dc2626; }
a.ed-col:hover h3 { color: #dc2626; }

.ed-col h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.75rem;
    transition: color 0.18s ease;
}

.ed-col p {
    margin: 0;
    color: #4b5563;
    font-size: 0.9688rem;
}

/* --- primitive: marked situation list --- */
.ed-marks {
    display: grid;
    gap: 2.25rem 4rem;
}

@media (min-width: 768px) {
    .ed-marks { grid-template-columns: 1fr 1fr; }
}

.ed-mark {
    border-left: 2px solid #dc2626;
    padding-left: 1.25rem;
    margin: 0;
    color: #374151;
    line-height: 1.75;
}

/* --- hero --- */
.ed-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    margin: 0 0 2.75rem;
}

.ed-stat b {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    display: block;
}

.ed-stat span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6b7280;
}

/* --- button --- */
.ed-btn {
    display: inline-block;
    background-color: #dc2626;
    color: #fff;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 1.6rem;
    transition: background-color 0.18s ease;
}

.ed-btn:hover { background-color: #b91c1c; color: #fff; }

/* --- articles --- */
.ed-art {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 2rem 1rem;
    margin: 0 -1rem;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.18s ease;
}

@media (min-width: 768px) {
    .ed-art {
        grid-template-columns: 5rem 1fr auto;
        gap: 1.75rem;
        align-items: center;
    }
}

.ed-art:hover { background-color: #fafafa; }
.ed-art:hover h3 { color: #dc2626; }

.ed-art img {
    width: 100%;
    height: 8rem;
    object-fit: cover;
    display: block;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .ed-art img { height: 5rem; margin-bottom: 0; }
}

.ed-art h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
    transition: color 0.18s ease;
}

.ed-art p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9375rem;
}

.ed-art .ed-go {
    display: none;
    font-family: 'Montserrat', sans-serif;
    color: #d1d5db;
}

@media (min-width: 768px) {
    .ed-art .ed-go { display: block; }
}

/* --- testimonials restyle (keeps carousel JS contract) --- */
.ed-quote {
    font-size: 1.125rem;
    font-style: italic;
    line-height: 1.7;
    color: #111827;
    margin: 0 0 1rem;
}

@media (min-width: 768px) {
    .ed-quote { font-size: 1.25rem; }
}

/* Keep the hero (and its scroll indicator) inside the fold on short viewports.
   The indicator is anchored to the hero's bottom edge, so the hero must not
   outgrow calc(100vh - header). */
@media (min-width: 768px) and (max-height: 820px) {
    .ed-hero {
        padding-top: 2.5rem;
        padding-bottom: 3.5rem;
    }
}

@media (min-width: 768px) and (max-height: 700px) {
    .ed-hero {
        padding-top: 1.5rem;
        padding-bottom: 3rem;
    }

    .ed-hero .ed-stats { margin-bottom: 1.75rem; }
}

/* Testimonials sit inside the editorial column: the quote aligns with every
   other left edge on the page. Arrows sit below the quote — the track must
   stay clipped (8 slides x 100% wide) or the page scrolls sideways. */
.ed-section .testimonials-carousel {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.ed-section .testimonials-track {
    order: -1;
    width: 100%;
}

.ed-section .carousel-button {
    position: static;
    transform: none;
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 0;
    background-color: transparent;
    border: 1px solid #e5e7eb;
}

.ed-section .carousel-button:hover {
    border-color: #dc2626;
    background-color: transparent;
}

.ed-section .carousel-button:hover svg { stroke: #dc2626; }
.ed-section .carousel-button:active { transform: scale(0.95); }

/* Arrows lead the control row; the step dots need their own breathing room
   so the two controls don't read as one cluster. */
.ed-section .carousel-dots {
    margin-top: 0;
    margin-left: 1.75rem;
    align-items: center;
    align-self: center;
}

@media (max-width: 480px) {
    .ed-section .carousel-dots { margin-left: 1rem; }
}


/* Give the identity card enough width for the role to set on one line. */
@media (min-width: 1024px) {
    .ed-about-cols { grid-template-columns: 1.35fr 1fr; }
}

/* Hero keeps the narrower measure of the text column while sharing the
   page's left edge with every other section. */
.ed-hero-h1 { max-width: 52rem; }

/* Article cards lead with the image. */
.ed-card-media {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background-color: #f3f4f6;
}

.ed-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ed-card:hover .ed-card-media img { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
    .ed-card-media img { transition: none; }
    .ed-card:hover .ed-card-media img { transform: none; }
}

/* ── Header ──────────────────────────────────────────────────────
   Sticky, and aligned to the same column as the page so the logo sits
   on the left edge that every heading below it shares. */
.ed-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.ed-header-inner {
    height: 4rem;
    display: flex;
    align-items: center;
}

.ed-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #111827;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.ed-burger {
    margin-left: auto;
    color: #4b5563;
    background: none;
    border: 0;
    cursor: pointer;
}

.ed-nav {
    display: none;
    margin-left: auto;
    align-items: center;
    gap: 1.75rem;
}

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

.ed-nav > a:not(.ed-nav-cta) {
    position: relative;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    padding: 0.35rem 0;
}

/* the underline grows from the left rather than just recoloring */
.ed-nav > a:not(.ed-nav-cta)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 100%;
    background-color: #dc2626;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.ed-nav > a:not(.ed-nav-cta):hover { color: #dc2626; }
.ed-nav > a:not(.ed-nav-cta):hover::after { transform: scaleX(1); }

.ed-nav-cta {
    background-color: #dc2626;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.18s ease;
}

.ed-nav-cta:hover { background-color: #b91c1c; color: #fff; }

/* Lives inside the sticky header so it opens under the bar at any scroll
   position, not a thousand pixels up the page. */
.ed-mobile-nav {
    background-color: #fff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0 1rem;
}

.ed-mobile-nav a {
    display: block;
    padding: 0.6rem 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
}

.ed-mobile-nav a:hover { color: #dc2626; }
.ed-mobile-cta { color: #dc2626 !important; font-weight: 600 !important; }

@media (prefers-reduced-motion: reduce) {
    .ed-nav > a::after { transition: none; }
}

/* ── Footer ──────────────────────────────────────────────────────
   Given room to be a real sitemap block instead of one cramped line. */
.ed-footer {
    border-top: 1px solid #e5e7eb;
    padding: 3.5rem 0 2rem;
    background-color: #fff;
}

.ed-footer-top {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .ed-footer-top {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        gap: 4rem;
    }
}

.ed-footer-brand p {
    margin: 1rem 0 0;
    color: #4b5563;
    font-size: 0.9375rem;
    max-width: 26rem;
}

.ed-footer-cta {
    display: inline-block;
    margin-top: 1.1rem;
    color: #dc2626;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.ed-footer-cta:hover { text-decoration: underline; }

.ed-footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.ed-footer-links .ed-eyebrow { margin-bottom: 0.75rem; }

.ed-footer-links a {
    display: block;
    padding: 0.3rem 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
}

.ed-footer-links a:hover { color: #dc2626; }

.ed-footer-legal {
    margin: 3rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Nothing on these pages is meant to scroll sideways. `clip` rather than
   `hidden`: `hidden` would make <body> a scroll container, which breaks
   position: sticky on the header. */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}
