/* The public pages of a company: its gallery and its cases. */
@font-face {
    font-family: 'Schibsted Grotesk';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/schibsted-grotesk-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Schibsted Grotesk';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/schibsted-grotesk-latin-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Schibsted Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/schibsted-grotesk-latin-700-normal.woff2') format('woff2');
}

/* One accent colour carries the page, so a company's own colour can replace it later. */
:root {
    --accent: #173f33;
    --ink: #151c19;
    --muted: #5c6660;
    --paper: #f8f7f3;
    --soft: #e8ebdd;
    --line: #d8d8cf;
    --radius: 8px;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font:
        16px/1.6 'Schibsted Grotesk',
        system-ui,
        sans-serif;
}
.public-wrap {
    max-width: 1160px;
    margin: auto;
    padding: 20px 32px 32px;
}
a {
    color: inherit;
    text-decoration: none;
}
a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}
h1 {
    font-size: clamp(30px, 4.4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin: 10px 0 16px;
}
h2 {
    font-size: 21px;
    line-height: 1.3;
    margin: 16px 0 6px;
}
.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}
.button {
    display: inline-block;
    padding: 11px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.button:hover,
.text-link:hover,
.link:hover {
    text-decoration: underline;
}
.text-link,
.link {
    color: var(--accent);
    font-weight: 700;
    font-size: 15px;
}
.company-logo {
    width: auto;
    max-width: 160px;
    height: 40px;
    object-fit: contain;
}

/* The top of the page: the company, its projects and a way to the contact section. */
.site-header {
    display: flex;
    align-items: center;
    gap: 16px 40px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 28px;
}
.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
    min-width: 0;
}
.site-brand strong {
    font-size: 21px;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}
.site-nav {
    display: flex;
    gap: 28px;
    margin-right: auto;
}
.site-nav a {
    font-size: 15px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 36px;
    color: var(--muted);
    font-size: 13px;
}
.breadcrumb a {
    color: var(--ink);
    font-weight: 500;
}
.breadcrumb a:hover {
    text-decoration: underline;
}

/* A case: title and who made it, photos, facts, the story and how to get in touch. */
.case-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 40px;
    margin-bottom: 36px;
}
.lead {
    max-width: 720px;
    margin: 0;
    font-size: 19px;
    line-height: 1.5;
    white-space: pre-line;
}
.case-by {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 320px;
    padding-left: 40px;
    border-left: 1px solid var(--line);
}
.case-by p {
    margin: 0;
    display: grid;
    line-height: 1.4;
}
.case-by span {
    color: var(--muted);
    font-size: 13px;
}
.case-by strong {
    font-size: 17px;
}
.mosaic {
    display: grid;
    gap: 12px;
}
.mosaic img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}
.hero-image {
    max-height: 600px;
    aspect-ratio: 3/2;
}
.mosaic-1,
.mosaic-2 {
    grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr);
}
.mosaic-2 .hero-image {
    grid-row: span 2;
    aspect-ratio: auto;
    max-height: none;
}
.mosaic-side {
    position: relative;
    min-height: 0;
}
.mosaic-2 .mosaic-side img {
    aspect-ratio: 3/2;
}
.mosaic-more {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 12px;
    background: rgb(21 28 25 / 85%);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}
.fact-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin: 28px 0 0;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.fact-strip div {
    padding: 4px 20px;
    border-left: 1px solid var(--line);
    min-width: 0;
}
.fact-strip div:first-child {
    border-left: 0;
    padding-left: 0;
}
.fact-strip dt,
.case-company dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.fact-strip dd,
.case-company dd {
    margin: 2px 0 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.case-content {
    display: grid;
    grid-template-columns: minmax(0, 720px) minmax(260px, 340px);
    justify-content: space-between;
    align-items: start;
    gap: 48px;
    margin: 44px 0;
}
.article-body {
    font-size: 18px;
}
.article-body p {
    margin: 0 0 1em;
    white-space: pre-line;
}
.contact-card {
    padding: 26px;
    background: var(--soft);
    border-radius: var(--radius);
}
.contact-card-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
}
.contact-card-brand .company-logo {
    height: 28px;
}
.contact-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.contact-card p {
    margin: 0 0 18px;
    font-size: 15px;
}
.contact-card .button {
    display: block;
    text-align: center;
    margin-bottom: 16px;
}

/* Photos marked before, during or after carry their label. */
.staged {
    position: relative;
    margin: 0;
}
.staged figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 4px 12px;
    background: #fff;
    color: var(--ink);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}
.staged img {
    display: block;
}
.before-after {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.before-after img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-radius: var(--radius);
}
.case-quote {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 44px 0 0;
    padding: 28px 36px;
    background: var(--soft);
    border-radius: var(--radius);
}
.case-quote-mark {
    color: var(--accent);
    font-size: 96px;
    font-weight: 700;
    line-height: 0.6;
    padding: 28px 28px 0 0;
    border-right: 1px solid var(--line);
    align-self: stretch;
}
.case-quote blockquote {
    margin: 0;
    font-size: 21px;
    line-height: 1.4;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.01em;
}
.case-quote figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}
.case-photos,
.case-related {
    margin-top: 56px;
}
.case-photos h2,
.case-related h2 {
    font-size: 28px;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
}
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
}
.case-related h3 {
    font-size: 18px;
    line-height: 1.3;
    margin: 12px 0 2px;
}
.case-related a:hover h3 {
    text-decoration: underline;
}

/* The band that ends a page: how to reach the company, and its profile. */
.case-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    align-items: center;
    gap: 48px;
    margin-top: 64px;
    padding: 32px 40px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
}
.case-contact h2 {
    margin: 0 0 6px;
    font-size: 28px;
    letter-spacing: -0.02em;
}
.case-contact p {
    margin: 0 0 20px;
    color: rgb(255 255 255 / 80%);
}
.case-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.contact-button {
    padding: 11px 20px;
    border: 1px solid rgb(255 255 255 / 45%);
    border-radius: 6px;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.contact-button.primary {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
}
.contact-button:hover {
    text-decoration: underline;
}
.case-contact a:focus-visible {
    outline-color: #fff;
}
.case-company {
    margin: 0;
    display: grid;
    gap: 14px;
}
.case-contact .case-company dt {
    color: rgb(255 255 255 / 70%);
}
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 32px;
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}
.site-footer-company {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.site-footer-company .company-logo {
    height: 28px;
}
.site-footer-company strong {
    color: var(--ink);
    font-size: 16px;
}
.made-with {
    margin: 0;
}
.made-with a {
    color: var(--ink);
    font-weight: 700;
}

/* A list of cases: the gallery, the photos of a case and a company's other cases. */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}
.gallery.columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gallery img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius);
}
.gallery article {
    min-width: 0;
    overflow-wrap: anywhere;
}
.gallery a {
    display: block;
}
.gallery p {
    color: var(--muted);
    margin: 0 0 10px;
    font-size: 14px;
}
.gallery a:hover h2,
.gallery-more a:hover {
    text-decoration: underline;
}
.gallery-more {
    margin: 28px 0 0;
    color: var(--accent);
    font-weight: 700;
}
.gallery-intro {
    margin: -4px 0 28px;
    color: var(--muted);
    font-size: 19px;
}
.gallery-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 32px;
}
.gallery-filter a {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
}
.gallery-filter a:hover {
    border-color: var(--accent);
}
.gallery-filter a[aria-current] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.empty {
    padding: 48px;
    background: var(--soft);
    border-radius: var(--radius);
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Embedded galleries sit on the company's own website: no page background, and they are sized
   by their content, never by the height of the frame. */
.embedded-gallery {
    background: transparent;
}
.embedded-gallery .public-wrap {
    padding: 20px;
    max-width: none;
    display: flow-root;
}
.embedded-gallery h1 {
    font-size: 28px;
    margin: 0 0 24px;
}
.company-profile {
    padding: 0 0 16px;
    min-width: 0;
}
.company-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.company-brand strong {
    font-size: 21px;
}
.company-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}
.company-contact a {
    overflow-wrap: anywhere;
    font-size: 14px;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .case-head,
    .case-content,
    .case-contact {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .case-by {
        padding: 0;
        border: 0;
        max-width: none;
    }
    .mosaic-1,
    .mosaic-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .mosaic .hero-image {
        grid-column: 1 / -1;
        grid-row: auto;
        aspect-ratio: 3/2;
    }
    .mosaic-1 .mosaic-side {
        grid-column: 1 / -1;
    }
    .mosaic-side img {
        aspect-ratio: 3/2;
    }
    .case-contact {
        padding: 26px;
    }
    .gallery.columns-3,
    .gallery:not(.columns-2) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 700px) {
    .public-wrap {
        padding: 16px 20px 24px;
    }
    .site-header {
        margin-bottom: 20px;
    }
    .site-brand strong {
        font-size: 18px;
    }
    .breadcrumb {
        margin-bottom: 24px;
    }
    .fact-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 0;
    }
    .fact-strip div:nth-child(odd) {
        border-left: 0;
        padding-left: 0;
    }
    .before-after,
    .gallery,
    .gallery.columns-2,
    .gallery.columns-3,
    .gallery:not(.columns-2) {
        grid-template-columns: 1fr;
    }
    .case-quote {
        padding: 22px;
        gap: 0;
    }
    .case-quote-mark {
        display: none;
    }
    .embedded-gallery .public-wrap {
        padding: 16px;
    }
}

/* The embedded gallery's line that it is made with Fagvis, under the cases. */
.embedded-made-with {
    margin: 16px 0 0;
    text-align: right;
}
