/* Disable smooth scroll when using inline links */
.t-about {
    scroll-behavior: auto;
}

.t-about h1:has(b),
.t-about h1:has(b) + h2 {
    font-style: italic;
}

.t-about figure.u-position--relative {
    max-width: max-content;
    margin-bottom: 0;
    border-radius: var(--r-l);
    overflow: hidden;
}

.t-about figure figcaption {
    padding: var(--space-s) var(--space-m);
    border-top-right-radius: var(--r-l);
    color: var(--white);
    background-color: var(--black);
    font-size: var(--fs-s);
    opacity: 0.7;
}

.t-about,
.t-about > body {
    color: var(--on-surface-dark-fixed);
    background-color: var(--surface-dark-fixed);
}

/* Nav component (TODO: Move to UI FW when ready) */
.c-nav {
    display: grid;
    height: 60px;
    grid-template-columns: 50px 1fr 50px;
    grid-template-areas: "button logo global";
    background-color: var(--surface-dark-fixed);
}

.c-nav--sticky {
    position: sticky;
    top: 0;
    z-index: 3;
    transition: var(--duration-long) transform var(--ease-in-out);
}

.c-nav--sticky.hidden {
    transform: translate3d(0, -100px, 0);
    transition-delay: var(--duration-short);
}

/* Sub items */
.c-nav--sticky > * {
    transition-delay: var(--duration-long);
    transition: var(--duration-long) transform var(--ease-in-out);
}

.c-nav--sticky.hidden > * {
    transform: translate3d(0, -100px, 0);
}

.c-nav__logo {
    grid-area: logo;
    display: grid;
    place-content: center;
    color: var(--on-surface-dark-fixed);
    font-size: 2rem;
    text-decoration: none;
}    

.c-nav__logo svg {
    width: 120px;
    height: 50px;
    fill: currentColor;
}    

.c-nav__menu {
    grid-area: menu;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-around;
    margin: 0;
    font-size: var(--fs-m);
}

@media screen and (max-width: 520px) {
    .c-nav__menu {
        position: fixed;
        display: none;
        top: 0;
        left: 0;
        right: 0;
        height: 100svh;
        flex-direction: column;
        background: var(--surface-dark-fixed);
        z-index: -1;
        justify-content: center;
    }

    .c-nav__toggle {
        padding: var(--space-m);
        border: unset;
        color: unset;
        background: unset;
        font: unset;
    }
}

@media screen and (min-width: 520px) {
    .c-nav {
        height: 80px;
        grid-template-columns: 170px auto;
        grid-template-areas: 
            "logo global"
            "menu menu";
    }

    .c-nav__toggle {
        display: none;
    }
}

@media screen and (min-width: 600px) {
    .c-nav {
        grid-template-columns: 170px 1fr auto;
        grid-template-areas: "logo menu global";
        box-shadow: var(--box-shadow-m);
    }

    .c-nav__menu {
        margin-inline: auto 2vw;
    }
}

.c-nav__menu > li {
    display: flex;
    justify-content: space-between;
    padding: 0 1em;
}

.c-nav__submenu {
    position: relative;
    flex-flow: column nowrap;
    height: auto;
    align-items: start;
    width: 50%;
    margin: 0;
    padding: 0;
    border: none;
    gap: 1rem;
    align-items: start;
    justify-content: space-around;
    color: inherit;
    background-color: transparent;    
    font-size: var(--fs-base);
    position-anchor: --links;
}

@media (max-width: 520px) {
    .c-nav__submenu {
        display: flex;
        text-wrap-style: balance;
    }

    .c-nav__submenu > h2 {
        margin-top: 0;
        padding-top: 2svh;
    }
}

@media screen and (min-width: 520px) {
    .c-nav__submenu {
        display: flex;
        position: absolute;
        top: anchor(bottom);
        left: 0;
        right: 0;
        width: 100%;
        height: 6rem;
        flex-flow: row wrap;
        align-items: start;
        justify-content: space-evenly;
        background-color: var(--surface-black-fixed);
        opacity: 0;
        transition: display var(--duration-short) ease-in-out allow-discrete, opacity var(--duration-short) ease-in-out allow-discrete;
        pointer-events: none;
    }

    .c-nav__submenu:popover-open,
    .c-nav__submenu:focus-within {
        opacity: 0.95;
        pointer-events: initial;
    }
}

.c-nav__submenu ul {
    display: contents;
    list-style: none;
}

.c-nav__link {
    padding: 2svh var(--space-xs);
    color: var(--on-surface-dark-fixed);
    font-weight: var(--fw-thin);
    line-height: var(--lh-s);
    text-align: center;
    text-decoration: none;
    anchor-name: --links;
}

.c-nav__sublink {
    color: var(--on-surface-dark-fixed);
    text-decoration: none;
}

@media screen and (min-width: 520px) {
    .c-nav__link {
        align-content: center;
        padding: 1svh 2vw;
    }

    .c-nav__submenu ul {
        display: flex;
        gap: 1rem;
        flex-direction: row;
        margin-top: var(--space-l);
    }

    .c-nav__sublink {
        padding: var(--space-m);
    }
}

.c-nav__link:has(+ .c-nav__submenu > ul > li > .c-nav__sublink--current),
.c-nav__link:hover,
.c-nav__link:focus,
.c-nav__link--current,
.c-nav__sublink:hover,
.c-nav__sublink:focus,
.c-nav__sublink--current {
    color: var(--secondary-bright-fixed);
}

.c-nav__global {
    grid-area: global;
    display: flex;
}

.c-nav__global .c-popup__body > *:first-child {
    border-bottom: 1px dotted var(--outline-variant);
}

.c-nav__global > button {
    width: 100%;
    padding: 0;
    border: unset;
    color: unset;
    background: unset;
    font: unset;
    cursor: pointer;
    anchor-name: --global;
}

.c-nav__global > button:hover,
.c-nav__global > button:focus {
    --color: var(--secondary-bright-fixed);
}

.c-nav__global a.c-card:hover,
.c-nav__global a.c-card:focus {
    background-color: var(--surface-container-high);
}

.c-nav__global a.c-card:not(:hover):not(:focus) p {
    color: var(--grey-50);
}

@media screen and (min-width: 520px) {
    .c-nav__global .c-popup__body > *:first-child {
        border-bottom: none;
        border-left: 1px dotted var(--outline-variant);
    }

    .c-nav__menu > li {
        padding: 0;
    }

    .c-nav__menu > li .c-button--primary {
        align-self: baseline;
    }

    /* Visually hide the contact button */
    .c-nav__menu li:has(> .c-button--primary:not(:hover):not(:focus)) {
        border: 0 !important;
        clip: rect(0 0 0 0) !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        overflow: hidden !important;
        padding: 0 !important;
        position: absolute !important;
    }
}

@media screen and (max-width: 520px) {
    /* Visually hide the language selector text */
    .c-nav__global button span {
        border: 0 !important;
        clip: rect(0 0 0 0) !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        overflow: hidden !important;
        padding: 0 !important;
        position: absolute !important;
    }
}

.c-nav__global .c-popup {
    position: fixed;
    top: anchor(bottom);
    right: anchor(right);
    left: auto;
    width: calc(100% - 4px);
    max-width: 45rem;
    margin: 2px;
    position-anchor: --global;
}

@supports not (anchor-name: --global) {
    .c-nav__global .c-popup {
        top: 80px !important;
    }
}

/* Sections */
.t-about.default main {
    background: var(--surface);
}

.t-about main > section.c-section:not([class*='u-color']) {
    background-color: var(--surface-container);
}

.t-about.sub-start main > section.c-section:first-child,
.t-about.product main > section.c-section:first-child,
.t-about.person main > section.c-section:first-child {
    color: var(--on-surface-dark-fixed);
    background-color: var(--surface-dark-fixed);
}

.t-about.team .c-section:first-of-type,
.t-about.person .c-section:first-of-type {
    min-height: 10vmax;
}

.t-about.category main section:first-of-type,
.t-about.post main section:first-of-type {
    padding-top: 8vw;
}

.t-about .c-section__body:not(.c-section__body--narrow, .c-section__body--full) {
    max-width: calc(1040px + 20vw);
}

/* Article links on colored sections */
.c-section[class*="u-color-"] p a:not([class]) {
    color: inherit;
}

/* Start page */
.t-about.start-page .c-article__body p {
    max-width: 80ch;
}

/* "NEWS" pill */
.t-about .c-article > .c-pill--large {
    font: var(--font-body-small);
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: var(--ls-xxl);
}

/* Less padding below section images/sliders (on mobile) */
@media screen and (max-width: 520px) {
    .t-about .o-grid--gap-xl .o-grid__col-12:has(> figure, .c-slider) {
        padding-bottom: 0;
    }
}

/* USP’s */
.t-about .trophy-teaser {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    line-height: var(--lh-m);
}

.t-about .trophy-teaser img {
    max-width: 5vw;
}

/* Start page button color fixes */
.t-about .c-section__body-start .c-button {
    text-shadow: none;
}

.t-about .u-color-blue-darker .check-list li {
    background-image: url(/assets/img/icons/check-white.svg);
}

.t-about .c-button:has(.u-hidden--visually)::after {
    content: "…";
}

.t-about .c-section__body-start .c-article {
    text-shadow: 0px 1px 2px rgb(0 0 0 / 50%);
}

.t-about .c-section--partners img {
    width: 200px;
    max-width: 80%;
}

/* Blog post content tweaks */
.t-about.post p + p {
    text-indent: 1em;
}

.t-about.post p:has(> img:only-child) {
    text-indent: 0;
}

.t-about.post li > img,
.t-about.post p > img {
    border-radius: 6px;
}

.t-about.post img.u-float--right {
    max-width: 50vw;
}

/* Sub-start */
.t-about .c-section__body-sub-start {
    margin-top: -7svh;
}

/* Start / Sub-start "curves" */
.t-about svg.full-width {
    position: absolute;
    bottom: -1px;
    width: 100%;
    max-height: 6vmax;
}

.t-about svg.full-width path {
    fill: var(--bg, var(--surface-container));
}

/* Style the static position of the sticky contact button */
.t-about .is-between-sections {
    margin: -2.5rem 0;
    z-index: 1;
    pointer-events: none;
}

.t-about .is-between-sections > * {
    pointer-events: initial;
}

/* Place start page hero above sticky contact button */
.t-about.start-page .c-section--full:first-child {
    z-index: 2;
}

/* Hide sticky contact button when acting on it */
.t-about .c-section:has(:target) ~ .u-position--sticky {
    display: none;
}

/* Crew photos */
.c-card--photo {
    min-width: 130px;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.c-card--photo .c-card__body {
    padding: 0;
}

.c-card--photo .c-card__title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 50% 0.5rem 1rem;
    background: linear-gradient(190deg,rgb(19 30 41 / 0),rgb(19 30 41 / 1%),rgb(19 30 41 / 90%)),linear-gradient(170deg,rgb(19 30 41 / 0),rgb(19 30 41 / 1%),rgb(19 30 41 / 50%));
    color: var(--white);
}

@media (hover: hover) {
    .c-card--photo .c-card__title {
        opacity: 0;
        transform: translateY(1rem);
        transition: var(--duration-short) opacity var(--ease-out), var(--duration-short) transform var(--ease-out);
    }

    .c-card--photo:hover .c-card__title {
        opacity: 1;
        transform: translateY(0rem);
    }
}

/* Temporary banner */
.t-about #start-banner {
    position: absolute;
    top: calc(3vmax + 80px);
    right: 1rem;
    left: 1rem;
    width: 30rem;
    max-width: 90%;
    margin: 0 auto;
    z-index: 2;
}

.t-about #start-banner-close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
    border: none;
    background: none;
    appearance: none;
}

/* Section buttons and images */
.t-about .c-section__image {
    width: 100%;
    height: max(180px, 38vw);
}

.t-about.start-page .c-section__image {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    opacity: 0.5;
}

.t-about .c-section__image > img {
    width: 100%;
    pointer-events: none;
    user-select: none;
}

.t-about.start-page .c-section__image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Smooth zoom effect */
.t-about figure > img {
    transform-origin: 90% 50%;
    transition: transform 5s linear;
}

.t-about .o-grid--order-1-sm figure > img {
    transform-origin: 10% 50%;    
}

.t-about figure > img:hover {
    transform: scale(1.05);
}

/* Make videos be positioned to the right side of its heading on large screens */
@media screen and (min-width: 768px) {
    .t-about .c-article__body > .c-video:first-child {
        float: right;
        width: 50%;
    }
}

/* Section "aside" (with cards slider, quote or subscribe form) */
.t-about div.page-aside {
    position: absolute;
    margin-top: -5svh;
    right: 10vw;
    width: min(380px, 38vw);
    height: auto;
    z-index: 1;
}

@media screen and (max-width: 1100px) {
    .t-about div.page-aside {
        position: relative;
        width: 100%;
        margin: 1rem auto;
        right: auto;
    }

    /* Subscribe box on Blog */
    .t-about .o-grid + div.page-aside {
        max-width: 30rem;
        margin-top: 1rem;
    }
}

.t-about div.page-aside .c-card {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.14), 0 4px 10px rgba(0, 0, 0, 0.12);
}

.t-about div.page-aside .glider-slide {
    min-width: calc(min(320px, 33vw));
}

/* Quotes */
.t-about .page-quote {
    line-height: 1.2;
}

.t-about .u-text--center blockquote {
    font-size: clamp(2.5rem, 8vw, 4rem);
}

.t-about blockquote p:first-child::before,
.t-about blockquote p:last-child::after {
    content: "”";
    font-family: serif;
    opacity: 0.75;
}

/* Articles */
.t-about .c-article__body {
    max-width: 100%;
}

.t-about .c-article__title {
    max-width: 60rem;
}

/* Product table scroll hacks for mobile */
@media screen and (max-width: 520px) {
    .t-about .c-section__body .o-grid--gap-xl .c-article:has(.c-table) {
        margin-inline: calc(-2vw - var(--space-l));
    }

    .t-about .c-section__body .o-grid--gap-xl .c-article__body > table {
        margin-inline: var(--space-l);
    }

    .t-about .c-article__body:has(.c-table) {
        overflow: auto;
    }
}

.t-about .c-article__body .c-table {
    margin: 1rem 0;
    border-spacing: 3vw 0;
    border-collapse: separate;
}

.t-about .c-article__body .c-table tr th {
    color: var(--tertiary-bright-fixed);
    text-align: center;
}

.t-about .c-article__body .c-table tr:nth-child(2) ~ tr td:first-letter {
    color: var(--secondary-bright-fixed);
}

.t-about .c-table td > img {
    display: block;
    max-height: min(300px, 50vw);
    margin: auto;
}

/* Set max heights on editorial images */
.t-about .c-article__body figure img {
    max-width: 920px;
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    object-position: 0 0;
}

.t-about .c-card__title a:not([class]) {
    color: inherit;
    text-decoration: none;
}

.t-about .c-card__title a:not([class]):hover,
.t-about .c-card__title a:not([class]):focus {
    text-decoration: underline;
}

.t-about .c-card__image figure {
    margin-bottom: 0;
}

.t-about .c-card__image--cover img {
    object-position: top;
}

@media screen and (min-width: 768px) {
    .t-about .c-card__image--cover img {
        height: 140px;
    }
}
  
@media screen and (min-width: 1200px) {
    .t-about .c-menu > a.large + a:not(.large) {
        margin-left: auto;
    }

    .t-about .c-card__image--cover img {
        height: 160px;
    }
}

/* Tabs / Clients slider */
.c-tabs.glider {
    align-self: flex-end;
}

.c-tabs__tab.glider-slide {
    display: inherit;
    aspect-ratio: 5 / 2;
    margin: 0;
    padding: 0 var(--space-l);
}

.c-tabs__tab--selected.glider-slide,
.c-tabs__tab.glider-slide:focus {
    color: var(--on-surface-dark-fixed);
    background-color: var(--surface-black-fixed);
    outline: none;
}

.c-tabs__tab.glider-slide img {
    max-width: 80%;
}

/* Footer addresses */
.t-about [itemprop="address"] {
    color: var(--grey-50);
}

/* Checklists */
.check-list {
    display: flex;
    flex-flow: column nowrap;
    margin: 0 0 var(--space-l);
    list-style: none;
}

.check-list--grid {
    --grid-min-item-size: clamp(22rem, 33%, 24rem);
    display: grid;
    grid-template-columns: repeat(var(--grid-item-repeats, auto-fit), minmax(var(--grid-min-item-size), 1fr));
}

.check-list li {
    min-height: 32px;
    margin: var(--space-m) 0;
    padding-left: 48px;
    background: url(/assets/img/icons/check-green.svg) no-repeat 0 0 / 32px;
    font-size: var(--fs-m);
    line-height: var(--lh-l);
    text-align: left;
}

.check-list.check-list--grid li {
    margin-left: 0;
}

.check-list span {
    display: flex;
}

/* Scroll trigger styles */
.lazyloading,
.lazyloaded,
.invisible,
.visible {
    opacity: 0;
    transform: translate3d(0, 50px, 0);
    transition: opacity 0.4s var(--ease-out) 0.05s, transform 0.4s var(--ease-out) 0.05s;
}

.invisible {
    box-shadow: none;
}

.lazyloaded,
.visible {
    opacity: 1;
    transform: translateY(0);
}

.t-about .u-loading > * {
    visibility: hidden;
}

/* Reset iframe video height to non-fullscreen */
.t-about .c-modal .lity-iframe-container {
    height: auto !important;
}

.t-about .c-section__body form {
    scroll-margin-top: 100px;
}

/* Contact form */
.calendly-inline-widget {
    min-width: 320px;
    max-width: 550px;
    height: 800px;
    border-radius: 6px;
    background-color: #fff;
    overflow: hidden;
}

.calendly-inline-widget.no-marketing-cookies {
    place-content: center;
    text-align: center;
    color: #000;
}

/* TODO: Keep until added to UI framework */
.u-initial-letter::first-letter {
    -webkit-initial-letter: 3;
    initial-letter: 3;
    font-family: serif;
    letter-spacing: 0.3em;
}

@keyframes horizontal-shaking {
    0% { transform: translateX(0) }
    25% { transform: translateX(5px) }
    50% { transform: translateX(-5px) }
    75% { transform: translateX(5px) }
    100% { transform: translateX(0) }
}

/* Shake info box if user needs support */
.needs-support + .c-box {
    animation: horizontal-shaking 0.4s;
}

/* Tone down Contact button if user needs support */
#needs-support-link:not(.u-hidden) + div:not(:hover) {
    opacity: 0.2;
}

/* TEMP hide Netlify widget iframe hack */
iframe#netlify-identity-widget[style="position: fixed; top: 0; left: 0; border: none; width: 100%; height: 100%; overflow: visible; background: transparent; display: none; z-index: 99; "] {
    display: none;
}