/*
 * Title — public site styles.
 *
 * Colours, fonts, button shape and motion level come from the site settings:
 * the layout prints --color-* and --font-body on :root and data-motion,
 * data-anim, data-btn and data-header on <body>. Every section declares a
 * data-theme, which resolves --bg and --fg for everything inside it.
 * Spacing and alignment use logical properties so Arabic (RTL) and English
 * (LTR) share one stylesheet.
 */

/* ---------- Tokens ---------- */

:root {
    --ink: var(--color-primary, #0e0d0c);
    --paper: var(--color-secondary, #f3efe7);
    --accent: var(--color-accent, #ff4a1c);
    --on-accent: var(--color-on-accent, #000);

    --ease: cubic-bezier(0.6, 0.05, 0.01, 1);
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --duration: 0.9s;
    --stagger: 60ms;

    --gutter: clamp(1.25rem, 4vw, 3.5rem);
    --section-space: clamp(4.5rem, 11vw, 10.5rem);
    --header-height: 4.5rem;
    --radius: clamp(0.75rem, 1.4vw, 1.5rem);

    --step-xl: clamp(3.5rem, 17vw, 17rem);
    --step-l: clamp(2.875rem, 10.5vw, 10rem);
    --step-m: clamp(2.375rem, 6.4vw, 6rem);
    --step-s: clamp(1.875rem, 4.2vw, 3.75rem);

    --display-tracking: -0.045em;
    --display-leading: 0.94;
    --display-weight: 600;
    --eyebrow-tracking: 0.08em;
    --arrow-flip: 1;
}

/* Arabic letters join, so they get no negative tracking and more line height. */
[dir='rtl'] {
    /* Arabic display faces read larger at the same size; the top steps come down slightly. */
    --step-xl: clamp(3rem, 14vw, 14rem);
    --step-l: clamp(2.5rem, 9vw, 8.5rem);
    --display-tracking: 0;
    --display-leading: 1.22;
    --display-weight: 700;
    --eyebrow-tracking: 0;
    --arrow-flip: -1;
}

@media (min-width: 64rem) {
    :root {
        --header-height: 5.5rem;
    }
}

/* ---------- Themes ---------- */

/* The highlight is the accent colour unless it is too close to the surface; the layout works that out. */
[data-theme='dark'] {
    --bg: var(--ink);
    --fg: var(--paper);
    --highlight: var(--color-highlight-dark, var(--accent));
    --on-highlight: var(--color-on-highlight-dark, var(--on-accent));
}

[data-theme='light'] {
    --bg: var(--paper);
    --fg: var(--ink);
    --highlight: var(--color-highlight-light, var(--accent));
    --on-highlight: var(--color-on-highlight-light, var(--on-accent));
}

[data-theme='accent'] {
    --bg: var(--accent);
    --fg: var(--on-accent);
    --highlight: var(--on-accent);
    --on-highlight: var(--accent);
}

[data-theme] {
    /* Secondary text stays at 4.5:1 or more against either surface (WCAG AA for small text). */
    --muted: color-mix(in oklab, var(--fg) 78%, var(--bg));
    --line: color-mix(in oklab, var(--fg) 20%, var(--bg));
    --surface: color-mix(in oklab, var(--fg) 7%, var(--bg));
    background-color: var(--bg);
    color: var(--fg);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-block-start: var(--header-height);
}

body {
    margin: 0;
    background-color: var(--ink);
    color: var(--paper);
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1875rem);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

img,
video,
svg {
    max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

::selection {
    background-color: var(--accent);
    color: var(--on-accent);
}

.container {
    width: 100%;
    max-width: 120rem;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container.narrow {
    max-width: 58rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    inset-block-start: 0.75rem;
    inset-inline-start: 0.75rem;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background-color: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

.arrow {
    flex: none;
    width: 1.1em;
    height: 1.1em;
    transform: scaleX(var(--arrow-flip));
}

.media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

picture.media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* A video under its poster picture. The video stays in the flow so the frame keeps its size, and is always drawn:
   browsers may refuse to autoplay a video they cannot see. The poster fades away once frames are advancing. */
.media-video {
    position: relative;
}

.media-video video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-video-poster,
.media-video-poster img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-video-poster {
    pointer-events: none;
    transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

.media-video.is-playing .media-video-poster {
    opacity: 0;
    visibility: hidden;
}

.media-video-toggle {
    position: absolute;
    z-index: 2;
    inset-block-end: 1rem;
    inset-inline-end: 1rem;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid color-mix(in oklab, #fff 45%, transparent);
    border-radius: 50%;
    background-color: color-mix(in oklab, #040a1c 55%, transparent);
    color: #fff;
    cursor: pointer;
}

.media-video-toggle[hidden] {
    display: none;
}

.media-video-toggle:hover,
.media-video-toggle:focus-visible {
    background-color: color-mix(in oklab, #040a1c 80%, transparent);
}

.media-video-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.media-video-toggle .media-video-icon-pause,
.media-video.is-running .media-video-toggle .media-video-icon-play {
    display: none;
}

.media-video.is-running .media-video-toggle .media-video-icon-pause {
    display: block;
}

/* In the full-screen hero the button sits under the header, clear of the headline and the buttons. */
.hero .media-video-toggle {
    inset-block: calc(var(--header-height) + 0.75rem) auto;
    inset-inline-end: var(--gutter);
}

.video-debug {
    position: fixed;
    z-index: 200;
    inset-inline: 0.5rem;
    inset-block-end: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(0, 0, 0, 0.85);
    color: #9ef09e;
    font: 12px/1.45 ui-monospace, Menlo, monospace;
    white-space: pre-wrap;
    direction: ltr;
    text-align: left;
}

/* ---------- Type ---------- */

.display {
    font-weight: var(--display-weight);
    letter-spacing: var(--display-tracking);
    line-height: var(--display-leading);
    text-wrap: balance;
    overflow-wrap: break-word;
}

.display-xl {
    font-size: var(--step-xl);
}

.display-l {
    font-size: var(--step-l);
}

.display-m {
    font-size: var(--step-m);
}

.display-s {
    font-size: var(--step-s);
    line-height: calc(var(--display-leading) + 0.1);
}

.eyebrow {
    margin-block-end: 1.25rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}

.eyebrow a {
    border-block-end: 1px solid var(--line);
}

.eyebrow a:hover {
    color: var(--fg);
    border-color: currentColor;
}

.lead {
    max-width: 40ch;
    color: var(--muted);
    font-size: clamp(1.125rem, 1rem + 0.7vw, 1.625rem);
    line-height: 1.4;
}

.heading .display + .lead {
    margin-block-start: clamp(1.5rem, 3vw, 2.5rem);
}

.empty-state {
    padding-block: 3rem;
    border-block-start: 1px solid var(--line);
    color: var(--muted);
    font-size: 1.25rem;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1.6rem;
    border: 1px solid var(--highlight);
    border-radius: 999px;
    background-color: var(--highlight);
    color: var(--on-highlight);
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition:
        background-color 0.3s var(--ease-out),
        color 0.3s var(--ease-out),
        border-color 0.3s var(--ease-out);
}

.btn-icon {
    display: inline-flex;
    transition: transform 0.4s var(--ease);
}

.btn:hover,
.btn:focus-visible {
    border-color: var(--fg);
    background-color: var(--fg);
    color: var(--bg);
}

.btn:hover .btn-icon,
.btn:focus-visible .btn-icon {
    transform: translateX(calc(0.3rem * var(--arrow-flip)));
}

.btn-ghost {
    border-color: var(--line);
    background-color: transparent;
    color: var(--fg);
}

.btn-small {
    padding: 0.65rem 1.15rem;
    font-size: 0.9375rem;
}

body[data-btn='sharp'] .btn {
    border-radius: 0;
}

body[data-btn='underline'] .btn {
    padding-inline: 0;
    border-width: 0 0 2px;
    border-radius: 0;
    border-color: var(--highlight);
    background-color: transparent;
    color: var(--fg);
}

body[data-btn='underline'] .btn:hover,
body[data-btn='underline'] .btn:focus-visible {
    border-color: var(--fg);
    background-color: transparent;
    color: var(--fg);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    margin-block-start: clamp(2rem, 4vw, 3rem);
}

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 50;
    height: var(--header-height);
    background-color: transparent;
    transition:
        transform 0.6s var(--ease),
        background-color 0.3s linear,
        color 0.3s linear;
}

.site-header.is-solid,
body[data-header='solid'] .site-header {
    background-color: var(--bg);
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: none;
}

.brand-name {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-weight: 700;
    letter-spacing: var(--display-tracking);
    line-height: 1;
}

.brand-logo {
    width: auto;
    height: clamp(1.75rem, 1.4rem + 1vw, 2.5rem);
}

/* Each surface shows the logo variant made for it; an accent surface counts as dark or light by its own tone. */
[data-theme='light'] .brand-logo-on-dark,
[data-theme='dark'] .brand-logo-on-light,
body[data-accent='light'] [data-theme='accent'] .brand-logo-on-dark,
body[data-accent='dark'] [data-theme='accent'] .brand-logo-on-light {
    display: none;
}

.site-nav {
    display: none;
}

.site-nav ul {
    display: flex;
    gap: clamp(1.25rem, 2.2vw, 2.5rem);
}

.site-nav a,
.language-switch,
.footer-links a,
.footer-legal a,
.site-menu-meta a,
.contact-list a {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size 0.45s var(--ease);
}

[dir='rtl'] .site-nav a,
[dir='rtl'] .language-switch,
[dir='rtl'] .footer-links a,
[dir='rtl'] .footer-legal a,
[dir='rtl'] .site-menu-meta a,
[dir='rtl'] .contact-list a {
    background-position: 100% 100%;
}

.site-nav a:hover,
.language-switch:hover,
.footer-links a:hover,
.footer-legal a:hover,
.site-menu-meta a:hover,
.contact-list a:hover {
    background-size: 100% 1px;
}

.site-nav a {
    padding-block: 0.25rem;
    font-size: 1.0625rem;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 1.6vw, 1.5rem);
}

.language-switch {
    padding-block: 0.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

.header-cta {
    display: none;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 1.0625rem;
    font-weight: 500;
    cursor: pointer;
}

.menu-toggle-icon {
    position: relative;
    width: 1.75rem;
    height: 0.75rem;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    height: 2px;
    background-color: currentColor;
    transition: transform 0.5s var(--ease);
}

.menu-toggle-icon::before {
    inset-block-start: 0;
}

.menu-toggle-icon::after {
    inset-block-end: 0;
}

.menu-toggle[aria-expanded='true'] .menu-toggle-icon::before {
    transform: translateY(0.3125rem) rotate(45deg);
}

.menu-toggle[aria-expanded='true'] .menu-toggle-icon::after {
    transform: translateY(-0.3125rem) rotate(-45deg);
}

/* Without JavaScript the overlay cannot open, so the footer carries the links. */
html:not(.js) .menu-toggle {
    display: none;
}

@media (min-width: 48rem) {
    .header-cta {
        display: inline-flex;
    }
}

@media (min-width: 64rem) {
    .site-nav {
        display: block;
    }

    .menu-toggle {
        display: none;
    }
}

/* ---------- Fullscreen menu ---------- */

.site-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    padding-block: calc(var(--header-height) + 1.5rem) 2rem;
    overflow-y: auto;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.8s var(--ease);
}

.site-menu[hidden] {
    display: none;
}

.site-menu.is-open {
    clip-path: inset(0);
}

.site-menu-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
}

.site-menu-list a {
    display: inline-block;
    padding-block: 0.1em;
    font-size: clamp(2.75rem, 11vw, 6.5rem);
    font-weight: var(--display-weight);
    letter-spacing: var(--display-tracking);
    line-height: calc(var(--display-leading) + 0.12);
}

.site-menu-list li {
    overflow: hidden;
}

.site-menu-list a {
    transform: translateY(110%);
    transition:
        transform 0.9s var(--ease) calc(0.15s + var(--i, 0) * var(--stagger)),
        color 0.2s linear;
}

.site-menu.is-open .site-menu-list a {
    transform: none;
}

.site-menu-list a:hover,
.site-menu-list a:focus-visible {
    color: var(--highlight);
}

.site-menu-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    padding-block-start: 1.5rem;
    border-block-start: 1px solid var(--line);
    color: var(--muted);
}

html.menu-open {
    overflow: hidden;
}

/* ---------- Sections ---------- */

.section {
    position: relative;
    padding-block: var(--section-space);
}

.heading {
    margin-block-end: clamp(2.5rem, 6vw, 5.5rem);
}

.heading:last-child,
.heading-row .heading {
    margin-block-end: 0;
}

.heading-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 3rem;
    margin-block-end: clamp(2.5rem, 6vw, 5.5rem);
}

/* ---------- Hero ---------- */

.hero {
    display: flex;
    min-height: 100svh;
    padding-block: calc(var(--header-height) + 3rem) clamp(2rem, 5vw, 4rem);
    overflow: hidden;
}

.hero-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-title {
    margin-block-end: clamp(1.75rem, 4vw, 3.5rem);
}

.hero-foot {
    display: grid;
    gap: 1.5rem;
    padding-block-start: clamp(1.25rem, 2.5vw, 2rem);
    border-block-start: 1px solid var(--line);
}

.hero-foot .btn-row {
    margin-block-start: 0;
}

.hero-media {
    position: absolute;
    inset: 0;
}

/* A flat tint keeps the headline readable over any picture. */
.hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: color-mix(in oklab, var(--bg) 52%, transparent);
}

/* On a dark hero the picture or film is tinted a deep navy made from the brand colour, a little deeper where the text and buttons sit. */
.hero[data-theme='dark'] .hero-media::after {
    background:
        linear-gradient(to top, color-mix(in oklab, color-mix(in oklab, var(--bg) 35%, #040a1c) 70%, transparent), transparent 65%),
        color-mix(in oklab, color-mix(in oklab, var(--bg) 45%, #040a1c) 58%, transparent);
}

.hero-media ~ .hero-inner .lead {
    color: var(--fg);
}

@media (min-width: 64rem) {
    .hero-foot {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 3rem;
    }

    .hero-layout-split.has-media .hero-inner {
        padding-inline-end: calc(40% + var(--gutter));
    }

    .hero-layout-split .hero-media {
        inset-block: calc(var(--header-height) + 1rem) clamp(2rem, 5vw, 4rem);
        inset-inline: auto var(--gutter);
        width: 38%;
        overflow: hidden;
        border-radius: var(--radius);
    }

    .hero-layout-split .hero-media::after {
        content: none;
    }
}

/* ---------- Showreel ---------- */

.hero + .showreel {
    padding-block-start: clamp(2.5rem, 5vw, 4.5rem);
}

.showreel-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius);
    background-color: var(--surface);
}

.showreel-play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--fg);
    font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
    font-weight: 500;
}

.showreel-play-icon {
    display: grid;
    place-items: center;
    width: clamp(4.5rem, 9vw, 8rem);
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--accent);
    color: var(--on-accent);
    transition: transform 0.6s var(--ease);
}

.showreel-play-icon svg {
    width: 34%;
    height: 34%;
    /* A play triangle always points the same way, in both writing directions. */
    transform: translateX(6%);
}

.showreel-play:hover .showreel-play-icon,
.showreel-play:focus-visible .showreel-play-icon {
    transform: scale(1.12);
}

.showreel-play-label {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background-color: var(--bg);
}

@media (min-width: 48rem) {
    .showreel-frame {
        aspect-ratio: 16 / 9;
    }
}

.lightbox {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background-color: #000;
    color: #fff;
}

.lightbox::backdrop {
    background-color: #000;
}

.lightbox-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    inset-block-start: 1rem;
    inset-inline-end: 1rem;
    z-index: 1;
    padding: 0.65rem 1.15rem;
    border: 1px solid rgb(255 255 255 / 0.4);
    border-radius: 999px;
    background-color: rgb(0 0 0 / 0.6);
    color: #fff;
    cursor: pointer;
}

/* ---------- Statement ---------- */

.statement-text {
    max-width: 24em;
    font-size: clamp(1.625rem, 3.7vw, 3.5rem);
    font-weight: 500;
    letter-spacing: calc(var(--display-tracking) * 0.6);
    line-height: calc(var(--display-leading) + 0.22);
    text-wrap: pretty;
}

.link-list {
    margin-block-start: clamp(2.5rem, 5vw, 4.5rem);
    border-block-start: 1px solid var(--line);
}

.link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: clamp(1rem, 2vw, 1.75rem);
    border-block-end: 1px solid var(--line);
    font-size: clamp(1.375rem, 2.6vw, 2.5rem);
    font-weight: 500;
    letter-spacing: calc(var(--display-tracking) * 0.6);
    line-height: 1.2;
    transition:
        padding 0.5s var(--ease),
        color 0.2s linear;
}

.link-list a:hover,
.link-list a:focus-visible {
    padding-inline: 1rem;
    color: var(--highlight);
}

@media (min-width: 64rem) {
    .statement-inner {
        display: grid;
        grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
        gap: 4rem;
    }

    .statement-inner.no-heading {
        display: block;
    }

    .statement .heading .display {
        font-size: clamp(1.5rem, 2.4vw, 2.5rem);
        line-height: calc(var(--display-leading) + 0.2);
    }
}

/* ---------- Work ---------- */

.projects {
    display: grid;
    gap: clamp(2rem, 4vw, 4rem);
}

.project-link {
    display: grid;
    gap: 1.5rem;
}

.project-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background-color: var(--surface);
}

.project-media .media,
.project-media picture.media img {
    transition: transform 1.2s var(--ease);
}

.project-link:hover .project-media .media,
.project-link:hover .project-media picture.media img {
    transform: scale(1.045);
}

.project-link:hover .project-media picture.media {
    transform: none;
}

/* Shown until a project has media: its position in the list, set large. */
.project-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--highlight);
    font-size: clamp(6rem, 22vw, 18rem);
    font-weight: var(--display-weight);
    letter-spacing: -0.05em;
    line-height: 1;
    direction: ltr;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin-block-end: 0.75rem;
    color: var(--muted);
    font-size: 0.875rem;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}

.project-title {
    font-size: clamp(1.75rem, 3.4vw, 3.5rem);
    font-weight: var(--display-weight);
    letter-spacing: var(--display-tracking);
    line-height: calc(var(--display-leading) + 0.1);
    text-wrap: balance;
}

.project-summary {
    max-width: 46ch;
    margin-block-start: 0.875rem;
    color: var(--muted);
}

.project-client {
    margin-block-start: 0.75rem;
    font-size: 0.9375rem;
}

.project-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-block-start: 1.25rem;
    font-weight: 500;
}

.project-cta .arrow {
    transition: transform 0.4s var(--ease);
}

.project-link:hover .project-cta .arrow {
    transform: translateX(calc(0.35rem * var(--arrow-flip))) scaleX(var(--arrow-flip));
}

.projects-list .project {
    padding-block-start: clamp(1.5rem, 3vw, 2.5rem);
    border-block-start: 1px solid var(--line);
}

@media (min-width: 48rem) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: clamp(1.5rem, 3vw, 3rem);
        row-gap: clamp(3rem, 6vw, 6rem);
    }

    /* Offsetting the second column gives the grid an editorial rhythm. */
    .projects-grid .project:nth-child(even) {
        margin-block-start: clamp(3rem, 8vw, 8rem);
    }

    .projects-list .project-link {
        grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
        align-items: center;
        gap: clamp(1.5rem, 4vw, 4rem);
    }

    .projects-stack .project {
        position: sticky;
        inset-block-start: calc(var(--header-height) + 1rem + var(--i, 0) * 0.875rem);
    }

    .projects-stack .project-link {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        align-items: stretch;
        gap: 0;
        min-height: min(72svh, 46rem);
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background-color: var(--surface);
    }

    .projects-stack .project-media {
        aspect-ratio: auto;
        border-radius: 0;
        background-color: color-mix(in oklab, var(--fg) 12%, var(--bg));
    }

    .projects-stack .project-body {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: clamp(1.5rem, 3vw, 3rem);
    }
}

/* ---------- Full-width media ---------- */

.media-band {
    padding-block: 0;
}

.media-band-figure {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.media-band-contained {
    padding: var(--gutter);
}

.media-band-contained .media-band-figure {
    border-radius: var(--radius);
}

.media-band-caption {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    padding: var(--gutter);
    background-color: color-mix(in oklab, var(--bg) 58%, transparent);
}

.media-band-caption .lead {
    margin-block-start: 1rem;
    color: var(--fg);
}

@media (min-width: 48rem) {
    .media-band-figure {
        aspect-ratio: 16 / 9;
        max-height: 92svh;
        width: 100%;
    }
}

/* ---------- Services ---------- */

.divisions {
    display: grid;
    gap: clamp(4rem, 9vw, 9rem);
}

.division {
    display: grid;
    gap: clamp(2rem, 4vw, 3rem);
    padding-block-start: clamp(1.5rem, 3vw, 2.5rem);
    border-block-start: 1px solid var(--fg);
}

.division-index,
.service-index {
    color: var(--highlight);
    font-size: 0.9375rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}

.division-title {
    margin-block: 0.75rem 1rem;
    font-size: clamp(2.25rem, 5vw, 5rem);
    font-weight: var(--display-weight);
    letter-spacing: var(--display-tracking);
    line-height: var(--display-leading);
    text-wrap: balance;
}

.division-title a:hover {
    color: var(--highlight);
}

.division-tagline {
    font-size: clamp(1.25rem, 1.8vw, 1.75rem);
    font-weight: 500;
    line-height: 1.3;
}

.division-description {
    max-width: 44ch;
    margin-block-start: 1rem;
    color: var(--muted);
}

.division-header .btn {
    margin-block-start: 2rem;
}

.service-list {
    border-block-start: 1px solid var(--line);
}

.statement-text + .service-list {
    margin-block-start: clamp(3rem, 6vw, 6rem);
}

.display + .service-list {
    margin-block-start: clamp(2.5rem, 5vw, 4.5rem);
}

.service-row {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 1rem;
    row-gap: 0.4rem;
    padding-block: clamp(1.1rem, 2vw, 1.75rem);
    border-block-end: 1px solid var(--line);
    transition: padding 0.5s var(--ease);
}

.service-name {
    font-size: clamp(1.375rem, 2.5vw, 2.375rem);
    font-weight: 500;
    letter-spacing: calc(var(--display-tracking) * 0.6);
    line-height: 1.2;
}

.service-excerpt {
    grid-column: 2;
    max-width: 52ch;
    color: var(--muted);
    font-size: 1rem;
}

.service-row .arrow {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    opacity: 0.45;
    transition:
        transform 0.5s var(--ease),
        opacity 0.2s linear;
}

.service-row:hover,
.service-row:focus-visible {
    padding-inline: 0.875rem;
}

.service-row:hover .arrow,
.service-row:focus-visible .arrow {
    opacity: 1;
    transform: translateX(calc(0.35rem * var(--arrow-flip))) scaleX(var(--arrow-flip));
}

@media (min-width: 64rem) {
    .division {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: 4rem;
        align-items: start;
    }

    .division-header {
        position: sticky;
        inset-block-start: calc(var(--header-height) + 1.5rem);
    }

    .service-list-wide .service-row {
        grid-template-columns: 4rem minmax(0, 5fr) minmax(0, 6fr) auto;
    }

    .service-list-wide .service-excerpt {
        grid-column: 3;
    }

    .service-list-wide .service-row .arrow {
        grid-column: 4;
    }
}

/* ---------- Sectors ---------- */

.sector-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 3rem);
}

.sector {
    padding-block-start: 1.25rem;
    border-block-start: 1px solid var(--fg);
}

.sector-media {
    aspect-ratio: 4 / 3;
    margin-block-end: 1.25rem;
    overflow: hidden;
    border-radius: var(--radius);
}

.sector-name {
    font-size: clamp(1.625rem, 2.6vw, 2.5rem);
    font-weight: var(--display-weight);
    letter-spacing: var(--display-tracking);
    line-height: calc(var(--display-leading) + 0.14);
}

.sector-description {
    margin-block-start: 0.75rem;
    color: var(--muted);
}

/* ---------- Client logos ---------- */

.logos .heading {
    margin-block-end: clamp(2rem, 4vw, 3.5rem);
}

.logo-wall {
    --logo-gap: clamp(2.5rem, 6vw, 6rem);
    display: flex;
    gap: var(--logo-gap);
    padding-inline: var(--gutter);
}

.logo-track {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--logo-gap);
}

.logo img {
    display: block;
    width: auto;
    max-width: 10rem;
    height: clamp(1.75rem, 3.4vw, 3rem);
    object-fit: contain;
}

.logo-wall-marquee {
    padding-inline: 0;
    overflow: hidden;
}

.logo-wall-marquee .logo-track {
    flex: none;
    flex-wrap: nowrap;
}

/* ---------- Editorial ---------- */

.editorial-inner {
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
}

.editorial .heading {
    margin-block-end: clamp(1.5rem, 3vw, 2.5rem);
}

.editorial-text {
    max-width: 52ch;
    font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
    line-height: 1.5;
}

.editorial-media {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius);
}

@media (min-width: 64rem) {
    .editorial-inner {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: 5rem;
    }

    .editorial.has-media .editorial-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
    }

    .editorial-media-start .editorial-media {
        order: -1;
    }

    .editorial:not(.has-media) .editorial-copy {
        display: contents;
    }

    .editorial:not(.has-media) .editorial-text,
    .editorial:not(.has-media) .btn-row {
        grid-column: 2;
    }
}

/* ---------- Call to action ---------- */

.section-cta {
    overflow: hidden;
}

.section-cta .container {
    position: relative;
}

.section-cta .heading {
    margin-block-end: 0;
}

.section-cta .lead {
    margin-block-start: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--fg);
}

.cta-media {
    position: absolute;
    inset: 0;
}

.cta-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: color-mix(in oklab, var(--bg) 62%, transparent);
}

/* ---------- Contact ---------- */

.contact-inner {
    display: grid;
    gap: clamp(2.5rem, 6vw, 5rem);
}

.contact-list {
    display: grid;
    gap: 0.6rem;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 500;
}

/* Social links carry the platform's mark beside its name; the hover underline sits under the name only. */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.75rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 1.0625rem;
    font-weight: 500;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-links a.social-link,
.social-links .social-link {
    background-image: none;
}

.social-link span {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size 0.45s var(--ease);
}

.social-link:hover span,
.social-link:focus-visible span {
    background-size: 100% 1px;
}

.social-icon {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
}

.contact-form {
    display: grid;
    gap: 1.75rem;
}

.form-grid {
    display: grid;
    gap: 1.75rem;
}

.field label {
    display: block;
    color: var(--muted);
    font-size: 0.9375rem;
}

.field-hint {
    opacity: 0.8;
}

.field input,
.field select,
.field textarea {
    display: block;
    width: 100%;
    padding: 0.7rem 0;
    border: 0;
    border-block-end: 1px solid var(--muted);
    border-radius: 0;
    background-color: transparent;
    font-size: clamp(1.125rem, 1.6vw, 1.5rem);
    transition: border-color 0.2s linear;
}

.field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position:
        calc(100% - 0.9rem) 55%,
        calc(100% - 0.5rem) 55%;
    background-size: 0.4rem 0.4rem;
    background-repeat: no-repeat;
    padding-inline-end: 2rem;
}

[dir='rtl'] .field select {
    background-position:
        0.5rem 55%,
        0.9rem 55%;
}

.field select option {
    background-color: var(--bg);
    color: var(--fg);
}

.field textarea {
    resize: vertical;
    min-height: 8rem;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
    outline: none;
    border-block-end: 2px solid var(--highlight);
}

.field [aria-invalid='true'] {
    border-block-end-width: 2px;
    border-color: var(--fg);
}

.form-note {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.8;
}

.form-note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.field-error {
    margin-block-start: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.field-error::before {
    content: '! ';
}

.form-status {
    padding: 1rem 1.25rem;
    border: 1px solid var(--fg);
    border-radius: calc(var(--radius) / 2);
    font-weight: 500;
}

.form-status-success {
    border-color: var(--highlight);
    background-color: var(--highlight);
    color: var(--on-highlight);
}

/* Bots fill this field; people never see it. */
.form-honeypot {
    position: absolute;
    inset-inline-start: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form .btn {
    justify-self: start;
}

@media (min-width: 48rem) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 64rem) {
    .contact-inner {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: 6rem;
    }
}

/* ---------- Inner pages ---------- */

.page-header {
    padding-block: calc(var(--header-height) + clamp(3.5rem, 9vw, 9rem)) clamp(2.5rem, 6vw, 5rem);
}

.page-header .lead {
    max-width: 52ch;
    margin-block-start: clamp(1.5rem, 3vw, 2.5rem);
}

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 1.5rem 2rem;
    margin-block-start: clamp(2.5rem, 5vw, 4.5rem);
    padding-block-start: 1.5rem;
    border-block-start: 1px solid var(--line);
}

.facts dt {
    margin-block-end: 0.35rem;
    color: var(--muted);
    font-size: 0.875rem;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}

.facts dd {
    font-size: 1.125rem;
    font-weight: 500;
}

.facts-wide {
    grid-column: 1 / -1;
}

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

.tags li {
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.9375rem;
}

.tags a:hover {
    color: var(--highlight);
}

.case-hero {
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

@media (min-width: 48rem) {
    .case-hero {
        aspect-ratio: 16 / 9;
        max-height: 92svh;
        width: 100%;
    }
}

.outcome-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: clamp(2rem, 5vw, 4rem);
}

.outcome-list > div {
    display: flex;
    flex-direction: column;
    padding-block-start: 1.25rem;
    border-block-start: 1px solid var(--line);
}

.outcome-value {
    color: var(--highlight);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: var(--display-weight);
    letter-spacing: -0.045em;
    line-height: 1;
}

.outcome-label {
    margin-block-start: 0.75rem;
    color: var(--muted);
}

.case-film {
    padding-block-start: 0;
}

.case-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    background-color: #000;
}

.gallery {
    display: grid;
    gap: clamp(1rem, 2.5vw, 2.5rem);
}

.gallery-item .media {
    height: auto;
    border-radius: var(--radius);
}

.gallery-item picture.media img {
    height: auto;
    border-radius: var(--radius);
}

.gallery-item figcaption {
    margin-block-start: 0.75rem;
    color: var(--muted);
    font-size: 0.9375rem;
}

@media (min-width: 48rem) {
    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-item:nth-child(3n + 1) {
        grid-column: 1 / -1;
    }
}

.next-project-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.next-project-link .arrow {
    width: clamp(2.5rem, 6vw, 6rem);
    height: clamp(2.5rem, 6vw, 6rem);
    transition: transform 0.6s var(--ease);
}

.next-project-link:hover {
    color: var(--highlight);
}

.next-project-link:hover .arrow {
    transform: translateX(calc(1rem * var(--arrow-flip))) scaleX(var(--arrow-flip));
}

.prose {
    font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
    line-height: 1.7;
}

.prose > * + * {
    margin-block-start: 1.25em;
}

.prose h2,
.prose h3,
.prose h4 {
    margin-block-start: 2em;
    font-weight: var(--display-weight);
    letter-spacing: calc(var(--display-tracking) * 0.6);
    line-height: 1.15;
}

.prose h2 {
    font-size: 1.9em;
}

.prose h3 {
    font-size: 1.45em;
}

.prose a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.prose ul,
.prose ol {
    padding-inline-start: 1.4em;
}

.prose ul {
    list-style: disc;
}

.prose ol {
    list-style: decimal;
}

.prose blockquote {
    margin-inline: 0;
    padding-inline-start: 1.25em;
    border-inline-start: 3px solid var(--highlight);
    font-size: 1.2em;
}

.prose img,
.featured-image {
    display: block;
    height: auto;
    border-radius: var(--radius);
}

/* A page image from the media library: a rounded frame in the picture's own proportions. */
.featured-media {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: var(--radius);
}

.prose .featured-media :is(.media, img) {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
}

/* ---------- Footer ---------- */

.site-footer {
    padding-block: clamp(4rem, 8vw, 7rem) 2rem;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: 2.5rem 3rem;
}

.footer-tagline {
    max-width: 18ch;
    font-size: clamp(1.5rem, 2.6vw, 2.5rem);
    font-weight: 500;
    letter-spacing: calc(var(--display-tracking) * 0.6);
    line-height: 1.15;
}

.footer-text {
    max-width: 36ch;
    margin-block-start: 1rem;
    color: var(--muted);
}

.footer-title {
    margin-block-end: 1rem;
    color: var(--muted);
    font-size: 0.875rem;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}

.footer-links {
    display: grid;
    gap: 0.55rem;
    justify-items: start;
    font-size: 1.125rem;
}

.footer-wordmark {
    margin-block: clamp(3rem, 7vw, 6rem) clamp(1rem, 2vw, 2rem);
    font-size: clamp(5rem, 25vw, 27rem);
    font-weight: 700;
    letter-spacing: var(--display-tracking);
    line-height: calc(var(--display-leading) - 0.08);
    white-space: nowrap;
}

[dir='rtl'] .footer-wordmark {
    font-size: clamp(4rem, 19vw, 20rem);
    line-height: 1.25;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    padding-block-start: 1.5rem;
    border-block-start: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9375rem;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

/* ---------- Motion ---------- */

/*
 * Reveals only apply once site.js has marked the document with .js, so the
 * page is fully readable without JavaScript. The preset (rise, fade, clip)
 * comes from the site settings and can be overridden per section.
 */

[data-anim='rise'] {
    --reveal-shift: 2.75rem;
    --reveal-clip: inset(0);
    --word-shift: 110%;
    --word-opacity: 1;
}

[data-anim='fade'] {
    --reveal-shift: 0rem;
    --reveal-clip: inset(0);
    --word-shift: 0%;
    --word-opacity: 0;
}

[data-anim='clip'] {
    --reveal-shift: 0rem;
    --reveal-clip: inset(0 0 100% 0);
    --word-shift: 110%;
    --word-opacity: 1;
}

.word {
    display: inline-block;
    /* Room for descenders and Arabic marks inside the clipping box. */
    margin-block: -0.2em;
    padding-block: 0.2em;
    overflow: hidden;
    vertical-align: bottom;
}

.word-inner {
    display: inline-block;
}

.js [data-reveal]:not([data-reveal='words']) {
    opacity: 0;
    transform: translateY(var(--reveal-shift, 0));
    clip-path: var(--reveal-clip, inset(0));
    transition:
        opacity var(--duration) var(--ease-out) calc(var(--i, 0) * var(--stagger)),
        transform var(--duration) var(--ease) calc(var(--i, 0) * var(--stagger)),
        clip-path var(--duration) var(--ease) calc(var(--i, 0) * var(--stagger));
}

.js [data-reveal='scale'] {
    transform: scale(0.94);
    clip-path: inset(0);
}

.js [data-reveal].is-in:not([data-reveal='words']) {
    opacity: 1;
    transform: none;
    clip-path: inset(0);
}

.js [data-reveal='words'] .word-inner {
    opacity: var(--word-opacity, 1);
    transform: translateY(var(--word-shift, 0%));
    transition:
        opacity var(--duration) var(--ease-out) calc(var(--i, 0) * var(--stagger)),
        transform var(--duration) var(--ease) calc(var(--i, 0) * var(--stagger));
}

.js [data-reveal='words'].is-in .word-inner {
    opacity: 1;
    transform: none;
}

@keyframes marquee {
    to {
        transform: translateX(calc((-100% - var(--logo-gap)) * var(--arrow-flip)));
    }
}

body[data-motion='full'] .logo-wall-marquee .logo-track {
    animation: marquee 45s linear infinite;
}

.logo-wall-marquee:hover .logo-track,
.logo-wall-marquee:focus-within .logo-track {
    animation-play-state: paused;
}

/* The showreel frame grows as it scrolls into view where the browser supports it. */
@supports (animation-timeline: view()) {
    @keyframes frame-grow {
        from {
            transform: scale(0.84);
        }

        to {
            transform: none;
        }
    }

    body[data-motion='full'] .showreel-frame {
        animation: frame-grow linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 45%;
    }
}

body[data-motion='subtle'] {
    --duration: 0.5s;
    --stagger: 30ms;
}

body[data-motion='subtle'] [data-anim] {
    --reveal-shift: 0.75rem;
    --reveal-clip: inset(0);
    --word-shift: 0%;
    --word-opacity: 0;
}

body[data-motion='subtle'] .projects-stack .project {
    position: static;
}

/* No motion: by site setting, by section, or by the visitor's own preference. */
body[data-motion='none'] [data-reveal],
body[data-motion='none'] .word-inner,
.section[data-anim='none'] [data-reveal],
.section[data-anim='none'] .word-inner {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
}

body[data-motion='none'] *,
body[data-motion='none'] *::before,
body[data-motion='none'] *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
}

body[data-motion='none'] .projects-stack .project {
    position: static;
}

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

    [data-reveal],
    .word-inner {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }

    .projects-stack .project {
        position: static;
    }

    .logo-wall-marquee {
        overflow-x: auto;
    }
}

@media print {
    .site-header,
    .site-menu,
    .lightbox {
        display: none;
    }

    [data-reveal],
    .word-inner {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }
}

/* ---------- Error page ---------- */

.error-page {
    display: flex;
    align-items: flex-end;
    min-height: 100svh;
}

.error-page .btn-row {
    margin-block-start: clamp(2rem, 4vw, 3rem);
}

/* ---------- Design options set in the admin panel ---------- */

/* Site-wide heading weight, tracking and section spacing. */
body[data-weight='400'] { --display-weight: 400; }
body[data-weight='500'] { --display-weight: 500; }
body[data-weight='600'] { --display-weight: 600; }
body[data-weight='700'] { --display-weight: 700; }

body[data-tracking='tight'] { --display-tracking: -0.06em; }
body[data-tracking='normal'] { --display-tracking: -0.02em; }
body[data-tracking='wide'] { --display-tracking: 0.01em; }

body[data-spacing='compact'] { --section-space: clamp(3rem, 7vw, 6.5rem); }
body[data-spacing='spacious'] { --section-space: clamp(6rem, 15vw, 14rem); }

/* Per-section overrides. The section title is the heading's display line or the hero title. */
.tw-400 { --display-weight: 400; }
.tw-500 { --display-weight: 500; }
.tw-600 { --display-weight: 600; }
.tw-700 { --display-weight: 700; }

.tk-tight { --display-tracking: -0.06em; }
.tk-normal { --display-tracking: -0.02em; }
.tk-wide { --display-tracking: 0.01em; }

/* Arabic letters join, so negative tracking is never applied to them. */
[dir='rtl'] body[data-tracking='tight'],
[dir='rtl'] body[data-tracking='normal'],
[dir='rtl'] .tk-tight,
[dir='rtl'] .tk-normal {
    --display-tracking: 0;
}

.sp-compact { --section-space: clamp(3rem, 7vw, 6.5rem); }
.sp-normal { --section-space: clamp(4.5rem, 11vw, 10.5rem); }
.sp-spacious { --section-space: clamp(6rem, 15vw, 14rem); }

.al-center :is(.heading, .hero-inner, .statement-body, .editorial-copy) {
    text-align: center;
}

.al-center :is(.heading, .hero-inner) :is(.lead, .display) {
    margin-inline: auto;
}

.al-center :is(.btn-row, .heading-row, .hero-foot) {
    justify-content: center;
}

@media (max-width: 47.9375rem) {
    .ts-m-xl :is(.heading > .display, .hero-title) { font-size: var(--step-xl); }
    .ts-m-l :is(.heading > .display, .hero-title) { font-size: var(--step-l); }
    .ts-m-m :is(.heading > .display, .hero-title) { font-size: var(--step-m); }
    .ts-m-s :is(.heading > .display, .hero-title) { font-size: var(--step-s); }
}

@media (min-width: 48rem) and (max-width: 63.9375rem) {
    .ts-t-xl :is(.heading > .display, .hero-title) { font-size: var(--step-xl); }
    .ts-t-l :is(.heading > .display, .hero-title) { font-size: var(--step-l); }
    .ts-t-m :is(.heading > .display, .hero-title) { font-size: var(--step-m); }
    .ts-t-s :is(.heading > .display, .hero-title) { font-size: var(--step-s); }
}

@media (min-width: 64rem) {
    .ts-d-xl :is(.heading > .display, .hero-title) { font-size: var(--step-xl); }
    .ts-d-l :is(.heading > .display, .hero-title) { font-size: var(--step-l); }
    .ts-d-m :is(.heading > .display, .hero-title) { font-size: var(--step-m); }
    .ts-d-s :is(.heading > .display, .hero-title) { font-size: var(--step-s); }
}

/* ---------- Icons picked in the admin panel ---------- */

.service-icon,
.division-icon,
.sector-icon {
    display: block;
    color: var(--highlight);
    stroke-width: 1.25;
}

.service-icon {
    width: 1.5rem;
    height: 1.5rem;
    transform: translateY(0.25rem);
}

.division-icon {
    width: clamp(2.25rem, 3.5vw, 3.25rem);
    height: auto;
    aspect-ratio: 1;
    margin-block-end: 1rem;
}

.sector-icon {
    width: 2rem;
    height: 2rem;
    margin-block-end: 1rem;
}

/* ---------- Refinements ---------- */

/* In-page links glide to their section unless motion is switched off. */
@media (prefers-reduced-motion: no-preference) {
    html:has(body:not([data-motion='none'])) {
        scroll-behavior: smooth;
    }
}

/* Buttons fill from the reading edge instead of switching colour at once. */
.btn {
    background-image: linear-gradient(var(--fg), var(--fg));
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: 0% 100%;
    transition:
        background-size 0.5s var(--ease),
        color 0.3s var(--ease-out),
        border-color 0.3s var(--ease-out);
}

[dir='rtl'] .btn {
    background-position: 100% 0;
}

.btn:hover,
.btn:focus-visible {
    background-color: var(--highlight);
    background-size: 100% 100%;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    background-color: transparent;
}

body[data-btn='underline'] .btn {
    background-image: none;
}

/* Page-to-page transition, printed only while motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(root) {
        animation: 0.3s var(--ease-out) both page-leave;
    }

    ::view-transition-new(root) {
        animation: 0.6s var(--ease) both page-enter;
    }
}

@keyframes page-leave {
    to {
        opacity: 0;
        transform: translateY(-1.25rem);
    }
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(2.5rem);
    }
}

/* Headings that share a row with other content stay inside their column, whatever the text. */
:where(.editorial, .contact-copy, .division-header) .display,
:where(.editorial, .contact-copy) .heading > .display {
    overflow-wrap: anywhere;
}

@media (min-width: 64rem) {
    :where(.editorial, .contact-copy) .heading > .display {
        font-size: var(--step-m);
    }

    /* Without media the button follows the text directly instead of dropping below the heading. */
    .editorial:not(.has-media) .editorial-inner {
        grid-template-rows: auto 1fr;
        row-gap: 2.5rem;
    }

    .editorial:not(.has-media) .heading {
        grid-row: span 2;
        margin-block-end: 0;
    }

    .editorial:not(.has-media) .btn-row {
        align-self: start;
    }
}

/* The footer name is sized by site.js to span the page; this is the size without it. */
.footer-wordmark {
    max-width: 100%;
    overflow: hidden;
}

.footer-wordmark.is-fitted {
    overflow: visible;
}

/* Comfortable touch targets for small text links. */
@media (pointer: coarse) {
    .footer-links a,
    .footer-legal a,
    .site-menu-meta a,
    .language-switch,
    .contact-list a {
        display: inline-flex;
        align-items: center;
        min-height: 2.75rem;
    }
}

/* Without JavaScript the overlay menu cannot open, so a plain link leads to the footer links. */
.menu-fallback {
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

@media (min-width: 64rem) {
    .menu-fallback {
        display: none;
    }
}

/* A filled button's own text colour can match the page behind it, so its focus ring uses the section's text colour. */
.btn:focus-visible {
    outline-color: var(--fg);
}

/* ---------- Logo size and footer logo ---------- */

body[data-logo='small'] .site-header .brand-logo {
    height: clamp(1.5rem, 1.2rem + 0.8vw, 2rem);
}

body[data-logo='large'] .site-header .brand-logo {
    height: clamp(2.5rem, 2rem + 1.5vw, 3.5rem);
}

.footer-logo {
    margin-block: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 3vw, 2.5rem);
}

.footer-logo img {
    width: auto;
    max-width: 100%;
    height: clamp(7rem, 22vw, 20rem);
}

/* ---------- Footer balance ---------- */

/* A hairline keeps the footer distinct when the section above shares its colour. */
.site-footer {
    border-block-start: 1px solid var(--line);
}

.footer-logo {
    display: flex;
    margin-block: clamp(3.5rem, 8vw, 7rem) clamp(2rem, 4vw, 3.5rem);
}

.footer-logo img {
    height: clamp(5.5rem, 15vw, 14rem);
}

/* Consecutive sections of one colour read as a single block, so the second one drops its top padding. */
.next-project[data-theme='light'] {
    border-block-start: 1px solid var(--line);
}

/* ---------- Industries: oversized rows with an image that follows the pointer ---------- */

.industries {
    position: relative;
}

.sectors-rows .heading,
.sectors-detail .heading {
    margin-block-end: clamp(2.5rem, 5vw, 4.5rem);
}

.sectors-rows .buttons,
.sectors-detail .buttons {
    margin-block-start: clamp(2rem, 4vw, 3.5rem);
}

.industry-list {
    border-block-end: 1px solid var(--line);
}

.industry-item {
    border-block-start: 1px solid var(--line);
}

.industry {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: clamp(0.875rem, 3vw, 3.5rem);
    align-items: start;
    padding-block: clamp(1.5rem, 3.2vw, 3rem);
    color: inherit;
    text-decoration: none;
}

.industry-index {
    min-width: 2.25ch;
    padding-block-start: 0.55em;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: var(--eyebrow-tracking);
}

.industry-name {
    font-size: clamp(2rem, 4.8vw, 4.75rem);
    font-weight: var(--display-weight);
    letter-spacing: var(--display-tracking);
    line-height: calc(var(--display-leading) + 0.06);
    text-wrap: balance;
    transition:
        transform 0.7s var(--ease),
        opacity 0.5s var(--ease-out);
}

[dir='rtl'] .industry-name {
    font-size: clamp(1.875rem, 4.3vw, 4.25rem);
}

.industry-description {
    max-width: 36rem;
    margin-block-start: clamp(0.75rem, 1.2vw, 1.125rem);
    color: var(--muted);
    font-size: clamp(1rem, 1.25vw, 1.125rem);
    transition: opacity 0.5s var(--ease-out);
}

.industry-arrow {
    align-self: center;
    width: clamp(1.375rem, 2.4vw, 2.5rem);
    height: auto;
    aspect-ratio: 1;
    color: var(--muted);
    transition:
        transform 0.7s var(--ease),
        opacity 0.5s var(--ease-out),
        color 0.5s var(--ease-out);
}

.industry:focus-visible {
    outline: 2px solid var(--highlight);
    outline-offset: 0.25rem;
}

/* The image inside a row or a detail block. It opens from the top once it scrolls into view. */
.industry-media {
    position: relative;
    grid-column: 1 / -1;
    aspect-ratio: 16 / 10;
    margin-block-start: clamp(1.25rem, 3vw, 2rem);
    overflow: hidden;
    border-radius: var(--radius);
}

.js .industry-media {
    clip-path: inset(0 0 100% 0 round var(--radius));
    transition: clip-path 1.1s var(--ease);
}

.js .industry-media > * {
    transform: scale(1.16);
    transition: transform 1.6s var(--ease-out);
}

.js .is-seen > .industry-media,
.js .is-seen .industry > .industry-media {
    clip-path: inset(0 round var(--radius));
}

.js .is-seen > .industry-media > *,
.js .is-seen .industry > .industry-media > * {
    transform: none;
}

/* Touch screens: the row nearest the middle of the screen carries the emphasis; the others stay readable. */
.js .industry-list .industry-item:not(.is-current) :is(.industry-name, .industry-description) {
    opacity: 0.6;
}

.industry-item.is-current .industry-arrow {
    color: var(--fg);
}

.industry-stage,
.industry-stage-cue {
    display: none;
}

/* Temporary artwork for a sector without an image. */
.sector-art .art-ground {
    fill: var(--ink);
}

.sector-art .art-low {
    fill: color-mix(in oklab, var(--paper) 13%, var(--ink));
}

.sector-art .art-mid {
    fill: color-mix(in oklab, var(--paper) 30%, var(--ink));
}

.sector-art .art-high {
    fill: var(--paper);
}

.sector-art-icon {
    color: var(--paper);
    stroke-width: 1;
    opacity: 0.9;
}

/* Fine pointer on a wide screen: the rows are type only and one image floats beside the cursor. */
@media (hover: hover) and (pointer: fine) and (min-width: 64rem) {
    .js .industry-list .industry > .industry-media {
        display: none;
    }

    .js .industry-list .industry-item:not(.is-current) :is(.industry-name, .industry-description) {
        opacity: 1;
    }

    /* The text keeps to its own side so the floating image never covers the row being read. */
    .js .industry-list .industry-copy {
        max-width: 58%;
    }

    .js .industry-list .industry-arrow {
        display: none;
    }

    .industries.is-engaged .industry-item:not(.is-active) :is(.industry-name, .industry-description, .industry-index) {
        opacity: 0.22;
    }

    .industry-index {
        transition: opacity 0.5s var(--ease-out);
    }

    .industry-item.is-active .industry-name {
        transform: translateX(calc(clamp(0.75rem, 1.6vw, 1.75rem) * var(--arrow-flip)));
    }

    .js .industry-stage {
        position: absolute;
        z-index: 2;
        top: 0;
        left: 0;
        display: block;
        width: clamp(17rem, 27vw, 27rem);
        aspect-ratio: 4 / 5;
        pointer-events: none;
        will-change: transform;
    }

    .industry-stage-frame {
        position: absolute;
        inset: 0;
        overflow: hidden;
        border-radius: var(--radius);
        clip-path: inset(100% 0 0 0 round var(--radius));
        transition: clip-path 0.75s var(--ease);
    }

    .industries.is-engaged .industry-stage-frame {
        clip-path: inset(0 round var(--radius));
    }

    .industry-stage-item {
        position: absolute;
        inset: -7%;
        opacity: 0;
        transform: scale(1.14);
        transition:
            opacity 0.55s var(--ease-out),
            transform 1.2s var(--ease-out);
    }

    .industry-stage-item.is-active {
        z-index: 1;
        opacity: 1;
        transform: none;
    }

    .industry-stage-item > * {
        transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0);
    }

    .industry-stage-cue {
        position: absolute;
        z-index: 2;
        inset-block-end: 1.25rem;
        inset-inline-start: 1.25rem;
        display: grid;
        place-items: center;
        width: 3.5rem;
        aspect-ratio: 1;
        border-radius: 50%;
        background-color: var(--paper);
        color: var(--ink);
        opacity: 0;
        transform: scale(0.6);
        transition:
            opacity 0.4s var(--ease-out),
            transform 0.6s var(--ease);
    }

    .industries.is-engaged .industry-stage-cue {
        opacity: 1;
        transform: none;
        transition-delay: 0.25s;
    }
}

/* ---------- Industries page: one block per sector ---------- */

.industry-detail {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    padding-block: clamp(2rem, 5vw, 5rem);
    border-block-start: 1px solid var(--line);
    scroll-margin-block-start: calc(var(--header-height) + 1rem);
}

.industry-detail .industry-index {
    margin-block-end: clamp(0.75rem, 1.5vw, 1.25rem);
    padding: 0;
}

.industry-detail .industry-name {
    font-size: clamp(2rem, 4.6vw, 4.5rem);
}

[dir='rtl'] .industry-detail .industry-name {
    font-size: clamp(1.875rem, 4vw, 3.875rem);
}

.industry-detail .industry-description {
    font-size: clamp(1.0625rem, 1.5vw, 1.375rem);
    line-height: 1.5;
}

.industry-detail .industry-media {
    grid-column: auto;
    margin: 0;
}

@media (min-width: 64rem) {
    .industry-detail {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        column-gap: clamp(3rem, 7vw, 7rem);
        align-items: center;
    }

    .industry-detail .industry-media {
        aspect-ratio: 5 / 4;
    }

    .industry-detail:nth-child(even) .industry-copy {
        order: 2;
    }
}

body[data-motion='none'] .industry-media,
body[data-motion='none'] .industry-media > * {
    clip-path: none !important;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .industry-media,
    .industry-media > *,
    .industry-stage-item,
    .industry-name,
    .industry-arrow,
    .industry-stage-cue {
        transform: none !important;
    }

    .industry-media {
        clip-path: none !important;
    }
}

@media print {
    .industry-media,
    .industry-stage {
        display: none !important;
    }
}

/* ---------- Brands: a ruled index of logos ---------- */

.logos-index .heading {
    margin-block-end: clamp(2.5rem, 5vw, 4.5rem);
}

.client-index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-block-start: 1px solid var(--line);
    border-inline-start: 1px solid var(--line);
}

.client {
    border-block-end: 1px solid var(--line);
    border-inline-end: 1px solid var(--line);
}

.client-cell {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    padding-block-end: clamp(3.25rem, 5vw, 4.5rem);
    color: inherit;
    text-decoration: none;
    transition: background-color 0.5s var(--ease-out);
}

/* Every logo is shown in the text colour, so different brand colours sit together calmly. */
.client-mark {
    width: auto;
    max-width: min(68%, 11rem);
    height: auto;
    max-height: 38%;
    object-fit: contain;
    filter: grayscale(1) contrast(1.1);
    opacity: 0.78;
    transition:
        filter 0.5s var(--ease-out),
        opacity 0.5s var(--ease-out),
        transform 0.7s var(--ease);
}

[data-theme='dark'] .client-mark {
    filter: brightness(0) invert(1);
}

.client-meta {
    position: absolute;
    inset-block-end: clamp(0.875rem, 1.6vw, 1.5rem);
    inset-inline: clamp(0.875rem, 1.6vw, 1.5rem);
    display: grid;
    gap: 0.125rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    transition:
        opacity 0.4s var(--ease-out),
        transform 0.6s var(--ease);
}

.client-name {
    font-weight: 600;
}

.client-note {
    color: var(--muted);
}

.client-arrow {
    position: absolute;
    inset-block-start: clamp(0.875rem, 1.6vw, 1.5rem);
    inset-inline-end: clamp(0.875rem, 1.6vw, 1.5rem);
    color: var(--muted);
    transition:
        opacity 0.4s var(--ease-out),
        transform 0.6s var(--ease);
}

.client-cell:focus-visible {
    outline: 2px solid var(--highlight);
    outline-offset: -2px;
}

@media (min-width: 48rem) {
    .client-index {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .client-cell {
        aspect-ratio: 4 / 3;
    }
}

@media (min-width: 64rem) {
    .client-index {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* With a mouse the cell is the logo alone; pointing at it fills the cell and brings in the name. */
@media (hover: hover) and (pointer: fine) {
    .client-cell {
        padding-block-end: clamp(1.25rem, 3vw, 2.5rem);
    }

    .client-meta {
        opacity: 0;
        transform: translateY(0.5rem);
    }

    .client-arrow {
        opacity: 0;
        transform: translate(calc(-0.5rem * var(--arrow-flip)), 0.5rem) scaleX(var(--arrow-flip));
    }

    .client-cell:is(:hover, :focus-visible) {
        background-color: var(--fg);
        color: var(--bg);
    }

    .client-cell:is(:hover, :focus-visible) .client-mark {
        filter: brightness(0) invert(1);
        opacity: 1;
        transform: translateY(-0.75rem);
    }

    [data-theme='dark'] .client-cell:is(:hover, :focus-visible) .client-mark {
        filter: brightness(0);
    }

    .client-cell:is(:hover, :focus-visible) .client-meta {
        opacity: 1;
        transform: none;
    }

    .client-cell:is(:hover, :focus-visible) .client-note {
        color: inherit;
        opacity: 0.72;
    }

    .client-cell:is(:hover, :focus-visible) .client-arrow {
        color: inherit;
        opacity: 1;
        transform: scaleX(var(--arrow-flip));
    }
}

/* ---------- Case study: challenge, contribution, solutions, testimonial ---------- */

.case-story-part {
    display: grid;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    padding-block: clamp(2rem, 4vw, 3.5rem);
    border-block-start: 1px solid var(--line);
}

.case-story-title {
    font-size: var(--step-s);
    font-weight: var(--display-weight);
    letter-spacing: var(--display-tracking);
    line-height: calc(var(--display-leading) + 0.1);
}

.case-story-text {
    max-width: 60ch;
    font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.375rem);
    line-height: 1.6;
}

.solution-list {
    display: grid;
    gap: 0 clamp(2rem, 5vw, 5rem);
    margin-block-start: clamp(1.5rem, 3vw, 2.5rem);
}

.solution {
    padding-block: clamp(1.5rem, 3vw, 2.5rem);
    border-block-start: 1px solid var(--line);
}

.solution-index {
    display: block;
    margin-block-end: 0.75rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.solution-title {
    font-size: clamp(1.5rem, 2.4vw, 2.25rem);
    font-weight: var(--display-weight);
    letter-spacing: var(--display-tracking);
    line-height: calc(var(--display-leading) + 0.16);
}

.solution-description {
    max-width: 48ch;
    margin-block-start: 0.75rem;
    color: var(--muted);
}

.testimonial {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    padding-block-start: clamp(2rem, 4vw, 3.5rem);
    border-block-start: 1px solid var(--fg);
}

.testimonial-quote {
    max-width: 28ch;
    font-size: var(--step-s);
    font-weight: var(--display-weight);
    letter-spacing: var(--display-tracking);
    line-height: calc(var(--display-leading) + 0.18);
    text-wrap: balance;
}

.testimonial-source {
    display: grid;
    gap: 0.125rem;
}

.testimonial-name {
    font-weight: 600;
}

.testimonial-role {
    color: var(--muted);
}

@media (min-width: 64rem) {
    .case-story-part {
        grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    }

    .solution-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .testimonial-quote {
        max-width: 24ch;
    }
}

/* ---------- Brands showcase: large logos in their own colours, drifting sideways ---------- */

.logos-showcase .heading {
    margin-block-end: clamp(2.5rem, 5vw, 4.5rem);
}

.logos-showcase .buttons {
    margin-block-start: clamp(2rem, 4vw, 3.5rem);
}

.showcase {
    --tile-w: clamp(19rem, 33vw, 30rem);
    --tile-gap: clamp(1rem, 1.8vw, 1.75rem);
    display: grid;
    gap: var(--tile-gap);
    overflow: hidden;
    /* Tiles lift on hover, so the clipped box leaves them room above and below. */
    padding-block: 1.25rem;
    margin-block: -1.25rem;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}

.showcase-row {
    display: flex;
    gap: var(--tile-gap);
    width: max-content;
    animation: showcase-drift calc(var(--tiles, 10) * 9s) linear infinite;
}

.showcase-row-reverse {
    animation-direction: reverse;
}

.showcase-group {
    display: flex;
    flex: none;
    gap: var(--tile-gap);
}

.showcase-item {
    flex: none;
    width: var(--tile-w);
}

.showcase-tile {
    display: grid;
    gap: clamp(0.75rem, 1.2vw, 1rem);
    color: inherit;
    text-decoration: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Every logo sits on the same light card, whatever colour the section is. */
.showcase-card {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
    background-color: color-mix(in oklab, #fff 62%, var(--paper));
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--ink) 9%, transparent);
    transition:
        transform 0.7s var(--ease),
        background-color 0.5s var(--ease-out),
        box-shadow 0.7s var(--ease-out);
}

[data-theme='dark'] .showcase-card,
[data-theme='accent'] .showcase-card {
    background-color: var(--paper);
    box-shadow: none;
}

/* --logo-w grows with the logo's width-to-height ratio, so a long wordmark and a compact
   emblem cover a similar area. The file itself is only ever scaled in proportion. */
.showcase-logo {
    width: min(calc(var(--tile-w) * 0.29 * var(--logo-w, 1.5)), 84%);
    height: auto;
    max-height: 64%;
    object-fit: contain;
    transition: transform 0.9s var(--ease);
}

.showcase-caption {
    display: grid;
    gap: 0.125rem;
    padding-inline: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.showcase-name {
    font-weight: 600;
}

.showcase-note {
    color: var(--muted);
}

.showcase-tile:focus-visible {
    outline: none;
}

.showcase-tile:focus-visible .showcase-card {
    outline: 2px solid var(--highlight);
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    .showcase-tile:hover .showcase-card {
        transform: translateY(-0.5rem);
        background-color: #fff;
        box-shadow:
            0 0 0 1px color-mix(in oklab, var(--ink) 9%, transparent),
            0 1.5rem 3rem -1.25rem color-mix(in oklab, var(--ink) 38%, transparent);
    }

    .showcase-tile:hover .showcase-logo {
        transform: scale(1.045);
    }

    /* Without the script the drift simply stops under the pointer. */
    .showcase:not(.is-enhanced):hover .showcase-row {
        animation-play-state: paused;
    }
}

.showcase.is-offscreen .showcase-row {
    animation-play-state: paused;
}

@keyframes showcase-drift {
    to {
        transform: translateX(calc((-50% - var(--tile-gap) / 2) * var(--arrow-flip)));
    }
}

@media (max-width: 47.9375rem) {
    .showcase {
        --tile-w: min(78vw, 21rem);
    }

    .showcase-row {
        animation-duration: calc(var(--tiles, 10) * 7s);
    }
}

/* No motion: the same tiles, still, in a centred wrap with the copies left out. */
body[data-motion='none'] .showcase,
.section[data-anim='none'] .showcase {
    --tile-w: clamp(14rem, 27vw, 22rem);
    overflow: visible;
    padding-inline: var(--gutter);
    -webkit-mask-image: none;
    mask-image: none;
}

body[data-motion='none'] .showcase-row,
.section[data-anim='none'] .showcase-row {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: clamp(1.75rem, 3vw, 2.75rem);
    width: auto;
    animation: none;
}

body[data-motion='none'] .showcase-group,
.section[data-anim='none'] .showcase-group {
    display: contents;
}

body[data-motion='none'] :is(.showcase-group[aria-hidden], .showcase-item.is-copy),
.section[data-anim='none'] :is(.showcase-group[aria-hidden], .showcase-item.is-copy) {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .showcase {
        --tile-w: clamp(14rem, 27vw, 22rem);
        overflow: visible;
        padding-inline: var(--gutter);
        -webkit-mask-image: none;
        mask-image: none;
    }

    .showcase-row {
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
        animation: none !important;
        row-gap: clamp(1.75rem, 3vw, 2.75rem);
    }

    .showcase-group {
        display: contents;
    }

    .showcase-group[aria-hidden],
    .showcase-item.is-copy {
        display: none;
    }

    .showcase-card,
    .showcase-logo {
        transform: none !important;
    }
}

@media print {
    .showcase-row {
        flex-wrap: wrap;
        width: auto;
        animation: none;
    }

    .showcase-group[aria-hidden],
    .showcase-item.is-copy {
        display: none;
    }
}

/* ---------- Small screens: the same design, set for a phone ---------- */

/* The full-screen menu is what phones and tablets navigate with, so it is set like a title page:
   numbered lines, a clear way to start a project and the language switch within reach of the thumb. */
.site-menu-foot {
    display: grid;
    gap: 1.5rem;
}

.site-menu-cta {
    display: none;
}

@media (max-width: 63.9375rem) {
    .site-menu-list {
        counter-reset: menu-line;
        border-block-start: 1px solid var(--line);
    }

    .site-menu-list li {
        counter-increment: menu-line;
        border-block-end: 1px solid var(--line);
    }

    .site-menu-list a {
        display: flex;
        align-items: baseline;
        gap: 1rem;
        padding-block: 0.3em;
        font-size: clamp(2.5rem, 11.5vw, 4.75rem);
    }

    .site-menu-list a::before {
        content: counter(menu-line, decimal-leading-zero);
        min-width: 2ch;
        color: var(--muted);
        font-size: 0.8125rem;
        font-weight: 500;
        letter-spacing: var(--eyebrow-tracking);
        font-variant-numeric: tabular-nums;
    }

    .site-menu-meta {
        gap: 0.25rem 2rem;
        padding-block-start: 0.75rem;
        font-size: 1.0625rem;
    }

    .site-menu-meta a {
        padding-block: 0.625rem;
    }

    /* Small text links above page titles get a full-size touch area. */
    .page-header .eyebrow a {
        display: inline-block;
        padding-block: 0.875rem;
        margin-block: -0.875rem;
    }
}

@media (max-width: 47.9375rem) {
    .site-menu-cta {
        display: flex;
        justify-content: space-between;
        padding-block: 1.15rem;
        font-size: 1.125rem;
        opacity: 0;
        transform: translateY(1rem);
        transition:
            opacity 0.6s var(--ease-out) 0.45s,
            transform 0.8s var(--ease) 0.45s;
    }

    .site-menu.is-open .site-menu-cta {
        opacity: 1;
        transform: none;
    }

    /* Hero: the headline is the largest thing on the page, as it is on a desktop screen. */
    .hero :where(.hero-title:not(.display-xl)) {
        font-size: clamp(3.25rem, 14.4vw, 4.75rem);
    }

    [dir='rtl'] .hero :where(.hero-title:not(.display-xl)) {
        font-size: clamp(2.875rem, 12.6vw, 4.25rem);
    }

    /* Buttons run the full width with the arrow at the far edge: easier to hit and tidier in a stack. */
    .btn-row {
        display: grid;
    }

    .btn-row .btn,
    .division-header .btn,
    .contact-form .btn {
        justify-content: space-between;
        width: 100%;
        padding-block: 1.1rem;
    }

    /* Long lists of services become one line each; the description is one tap away on its own page. */
    :is(.section-divisions, .services-more) .service-excerpt {
        display: none;
    }

    :is(.section-divisions, .services-more) .service-row {
        align-items: center;
        padding-block: 1.05rem;
    }

    /* Form fields get a full-size touch area. */
    .field input,
    .field select {
        min-height: 3.25rem;
    }

}

/* A phone held sideways has very little height: the hero and the menu tighten to fit it. */
@media (max-height: 30rem) and (orientation: landscape) and (max-width: 63.9375rem) {
    .hero {
        padding-block-start: calc(var(--header-height) + 1.25rem);
    }

    .hero :where(.hero-title) {
        font-size: clamp(2.25rem, 13vh, 3.5rem);
    }

    .site-menu-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 2rem;
    }

    .site-menu-list a {
        font-size: clamp(1.75rem, 9vh, 2.5rem);
    }
}

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