/* Homepage sections excluding hero slider */

.usp-editorial {
    padding: clamp(1rem, 2.3vw, 2.4rem) 0 clamp(2.4rem, 5vw, 5rem);
}

.usp-editorial .section-heading {
    margin-bottom: clamp(1.5rem, 3vw, 3rem);
}

.usp-editorial .section-heading p {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.usp-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: var(--box-radius);
    background: var(--surface);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.usp-block {
    position: relative;
    padding: clamp(1.35rem, 2.5vw, 2.4rem);
    border-right: 1px solid var(--line);
    overflow: hidden;
    transition: background .25s ease;
}

.usp-block:last-child {
    border-right: 0;
}

.usp-block:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--mint);
    transition: width .35s var(--ease);
}

.usp-block:hover:before {
    width: 100%;
}

.usp-block h2 {
    margin: 0 0 .75rem;
    font-size: clamp(1.35rem, 2.1vw, 2.15rem);
    letter-spacing: -.04em;
}

.usp-block p {
    max-width: 360px;
    margin: 0;
}

.work-section,
.services-section,
.quote-section {
    padding: clamp(2.4rem, 5vw, 5.8rem) 0;
}

.work-section {
    padding-top: clamp(2rem, 4.2vw, 4.8rem);
}

.services-section {
    padding-top: clamp(2rem, 4.2vw, 4.6rem);
}

.services-section .section-heading {
    margin-bottom: clamp(1.15rem, 2.3vw, 1.9rem);
}

.services-section .section-copy {
    max-width: 430px;
    font-size: 0.98rem;
}

.work-section .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-template-columns: none;
    gap: 1rem;
    margin-bottom: clamp(1.1rem, 2.2vw, 1.7rem);
}

.work-section .section-heading > div {
    display: flex;
    align-items: center;
}

.work-section .arrow-link {
    justify-self: auto;
    max-width: none;
    white-space: nowrap;
}

.work-marquee-group {
    display: grid;
    gap: clamp(0.85rem, 1.5vw, 1.15rem);
}

.work-marquee {
    position: relative;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.work-track {
    display: flex;
    width: max-content;
    gap: clamp(0.85rem, 1.5vw, 1.15rem);
    padding: 0.3rem clamp(0.85rem, 1.5vw, 1.15rem) 0.3rem;
    animation: workMarquee var(--work-marquee-duration, 46s) linear infinite;
}

.work-track-reverse {
    animation-direction: reverse;
}

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

@keyframes workMarquee {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(-50%, 0, 0);
    }
}

.work-row {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    flex: 0 0 auto;
    width: clamp(210px, 26vw, 296px);
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(12, 23, 39, 0.08);
    transition:
        transform 260ms var(--ease),
        box-shadow 260ms var(--ease),
        border-color 260ms ease;
}

.work-row::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.work-row:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--mint-deep) 42%, var(--line));
    box-shadow: 0 22px 54px rgba(12, 23, 39, 0.13);
}

.work-media {
    position: relative;
    aspect-ratio: 16 / 6.5;
    min-height: 0;
    background-color: var(--navy);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.work-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(6, 20, 39, 0.52), rgba(6, 20, 39, 0.08) 62%),
        linear-gradient(135deg, rgba(126, 238, 202, 0.14), transparent 48%);
    opacity: 0.92;
}

.work-media.is-empty {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--mint) 32%, transparent), transparent 9rem),
        linear-gradient(135deg, color-mix(in srgb, var(--navy) 90%, var(--mint)), var(--navy));
}

.work-media.is-empty > span:first-child {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 7vw, 4.8rem);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.work-open {
    position: absolute;
    right: 0.8rem;
    bottom: 0.8rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: var(--mint);
    color: #0d1726;
    font-weight: 900;
    transition: transform 260ms var(--ease);
}

.work-row:hover .work-open {
    transform: translate(3px, -3px);
}

.work-meta {
    display: grid;
    align-content: start;
    gap: 0.35rem;
    padding: clamp(0.7rem, 1.2vw, 0.9rem);
}

.work-meta > span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 20px;
    margin: 0;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.work-meta h3 {
    margin: 0;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.work-meta p {
    display: -webkit-box;
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.4;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-meta small {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin-top: 0.1rem;
    padding: 0.32rem 0.55rem;
    border: 1px solid color-mix(in srgb, var(--mint-deep) 26%, var(--line));
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.service-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.8rem, 1.4vw, 1.05rem);
}

.service-row {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 0.8rem;
    min-height: 240px;
    padding: clamp(1rem, 1.7vw, 1.35rem);
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, var(--mint)), var(--surface));
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(12, 23, 39, 0.08);
    transition:
        transform 260ms var(--ease),
        border-color 260ms ease,
        box-shadow 260ms var(--ease),
        background 260ms ease;
}

.service-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--mint), transparent 72%);
    opacity: 0;
    transform: translateY(-100%);
    transition:
        opacity 260ms ease,
        transform 260ms var(--ease);
}

.service-row::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -42px;
    width: 128px;
    height: 128px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--mint) 14%, transparent);
    opacity: 0.55;
    pointer-events: none;
    transition:
        transform 300ms var(--ease),
        opacity 300ms ease;
}

.service-row:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--mint-deep) 42%, var(--line));
    box-shadow: 0 22px 54px rgba(12, 23, 39, 0.13);
}

.service-row:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.service-row:hover::after {
    opacity: 0.9;
    transform: scale(1.12) translate(-8px, -8px);
}

.service-row span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.service-row h3 {
    position: relative;
    z-index: 1;
    max-width: 220px;
    margin: 0;
    font-size: clamp(1.2rem, 1.8vw, 1.62rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.service-row p {
    position: relative;
    z-index: 1;
    display: -webkit-box;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.52;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-row i {
    position: relative;
    z-index: 1;
    align-self: end;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-top: 0.6rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--mint) 16%, var(--surface));
    color: var(--text);
    font-style: normal;
    font-weight: 900;
    transition:
        transform 260ms var(--ease),
        background 260ms ease,
        border-color 260ms ease;
}

.service-row:hover i {
    transform: translate(4px, -4px);
    border-color: var(--mint);
    background: var(--mint);
    color: var(--navy);
}

.quote-section .shell {
    display: grid;
    gap: 1.5rem;
}

.quote-slider {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--box-radius);
    background: var(--surface);
    box-shadow: var(--box-shadow);
}

.quote-slide {
    padding: clamp(2rem, 5vw, 5rem);
}

.quote-slide blockquote {
    max-width: 1040px;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.6vw, 5.2rem);
    line-height: 1.02;
    letter-spacing: -.055em;
}

.quote-meta {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: clamp(2rem, 4vw, 4rem);
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.quote-meta p {
    margin: 0;
}

.quote-controls {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    gap: .45rem;
}

.quote-controls button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

@media (max-width: 1120px) {
    .usp-panel {
        grid-template-columns: 1fr;
    }

    .usp-block {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .usp-block:last-child {
        border-bottom: 0;
    }
}

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


@media (max-width: 760px) {
    .work-row {
        width: min(78vw, 300px);
    }

    .work-media {
        aspect-ratio: 16 / 9.5;
    }
}

@media (prefers-reduced-motion: reduce) {
    .work-track {
        width: 100%;
        animation: none;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .work-track > .work-row[aria-hidden="true"] {
        display: none;
    }

    .work-row {
        scroll-snap-align: start;
    }
}

@media (max-width: 640px) {
    .usp-panel,
    .service-list,
    .quote-slider {
        border-radius: 20px;
    }

    .work-media {
        min-height: 185px;
    }

    .service-list {
        grid-template-columns: 1fr;
    }

    .service-row {
        min-height: 0;
    }

    .quote-meta {
        flex-direction: column;
    }
}

/* Admin typography controls */
.work-meta h3,
.service-card h3,
.service-row h3,
.usp-block h2 {
    font-size: var(--font-size-card);
}

.section-heading h2,
.quote-slide blockquote {
    font-size: clamp(2rem, 4.4vw, var(--font-size-section));
}

.service-card p,
.work-meta p,
.usp-block p {
    font-size: var(--font-size-base);
}

.section-kicker,
.service-card span,
.work-meta > span {
    font-size: var(--font-size-small);
}