:root {
    /*
     * These backgrounds match the outer edge colors of the supplied
     * VerticalSpec light and dark logo images.
     *
     * Every major section uses this same background. There are no
     * gradients or translucent backgrounds behind the logo images.
     */
    --background-light: #fefefe;
    --background-dark: #05050a;

    --background: var(--background-light);
    --text: #071831;
    --text-strong: #031127;
    --muted: #687487;
    --line: rgba(7, 24, 49, 0.17);
    --line-strong: rgba(7, 24, 49, 0.30);

    --blue: #078cf0;
    --blue-light: #19aaff;

    --page-width: 1380px;
    --page-padding: 42px;

    color-scheme: light;
}

html[data-theme="dark"] {
    --background: var(--background-dark);
    --text: #f3f6fb;
    --text-strong: #ffffff;
    --muted: #a4afbf;
    --line: rgba(218, 228, 240, 0.18);
    --line-strong: rgba(218, 228, 240, 0.32);

    color-scheme: dark;
}

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

html {
    min-width: 320px;
    scroll-behavior: smooth;
    background: var(--background);
}

body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    background: var(--background);
    color: var(--text);
    font-family:
        "Avenir Next",
        Avenir,
        "Segoe UI",
        Helvetica,
        Arial,
        sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

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

button {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.page-width {
    width: min(
        calc(100% - (var(--page-padding) * 2)),
        var(--page-width)
    );

    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/*
 * Theme logo
 *
 * Both images always exist in the page and are preloaded.
 * CSS selects the proper one based only on html[data-theme].
 *
 * No <picture>, no <source>, and no JavaScript image swapping.
 */

.theme-logo {
    display: block;
    width: 100%;
}

.theme-logo img {
    width: 100%;
    height: auto;
    background: transparent;
}

.theme-logo__dark {
    display: none;
}

html[data-theme="dark"] .theme-logo__light {
    display: none;
}

html[data-theme="dark"] .theme-logo__dark {
    display: block;
}

/*
 * Header
 */

.site-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--line);
    background: var(--background);
}

.site-header__inner {
    min-height: 112px;
    display: grid;
    grid-template-columns: 220px 1fr auto;
    align-items: center;
    gap: 44px;
}

.header-logo {
    display: block;
    width: 210px;
}

.site-navigation {
    display: flex;
    justify-content: flex-end;
    gap: clamp(20px, 3vw, 44px);
}

.site-navigation a {
    position: relative;
    padding: 12px 0;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.19em;
    text-transform: uppercase;
}

.site-navigation a::after {
    position: absolute;
    right: 0;
    bottom: 5px;
    left: 0;
    height: 1px;
    content: "";
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 160ms ease;
}

.site-navigation a:hover {
    color: var(--text);
}

.site-navigation a:hover::after {
    transform: scaleX(1);
}

/*
 * Theme control styled like the light/dark control shown in the reference.
 */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.theme-toggle__label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.20em;
    text-transform: uppercase;
}

.theme-toggle__line {
    width: 38px;
    height: 1px;
    background: var(--line-strong);
}

.theme-toggle__switch {
    position: relative;
    width: 38px;
    height: 20px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
}

.theme-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text);
    transition: transform 160ms ease;
}

html[data-theme="dark"] .theme-toggle__thumb {
    transform: translateX(18px);
    background: var(--blue);
}

html[data-theme="light"] .theme-toggle__label--light,
html[data-theme="dark"] .theme-toggle__label--dark {
    color: var(--blue);
}

/*
 * Shared typography
 */

.section-label {
    margin: 0;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.30em;
    text-transform: uppercase;
}

.section-number {
    margin: 0;
    color: var(--blue);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.20em;
}

/*
 * Hero
 */

.hero {
    min-height: 720px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: var(--background);
}

.hero__inner {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    padding: 76px 0 88px;
    text-align: center;
}

.hero-logo {
    width: min(760px, 90vw);
    margin-top: 25px;
}

.hero-summary {
    max-width: 850px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: clamp(0.70rem, 1.3vw, 0.88rem);
    font-weight: 600;
    letter-spacing: 0.24em;
    line-height: 2;
    text-transform: uppercase;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 45px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-strong);
    color: var(--text);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.20em;
    text-transform: uppercase;
}

.hero-link span {
    color: var(--blue);
}

/*
 * About and horizontal identity lockup
 */

.about-section {
    border-bottom: 1px solid var(--line);
    background: var(--background);
}

.about-section__inner {
    padding: 0;
}

.about-section__identity {
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    border-bottom: 1px solid var(--line);
}

.about-logo {
    width: 240px;
}

.about-section__divider {
    width: 1px;
    height: 92px;
    background: var(--line-strong);
}

.about-section__lockup p {
    margin: 0;
    color: var(--text-strong);
    font-size: clamp(1.55rem, 3vw, 2.45rem);
    font-weight: 600;
    letter-spacing: 0.10em;
    line-height: 1;
    text-transform: uppercase;
}

.about-section__lockup p::first-letter {
    color: inherit;
}

.about-section__lockup span {
    display: block;
    margin-top: 15px;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.42em;
    text-transform: uppercase;
}

.about-section__content {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 35px;
    padding: clamp(80px, 9vw, 130px) 0;
}

.about-section__content h2 {
    max-width: 880px;
    margin: 20px 0 0;
    color: var(--text-strong);
    font-size: clamp(2.5rem, 6vw, 5.6rem);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.about-section__copy {
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(34px, 6vw, 82px);
    margin-top: 52px;
}

.about-section__copy p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(0.96rem, 1.6vw, 1.10rem);
    line-height: 1.85;
}

/*
 * Portfolio
 */

.portfolio-section {
    padding: clamp(74px, 8vw, 110px) 0 52px;
    border-bottom: 1px solid var(--line);
    background: var(--background);
}

.lined-heading {
    display: grid;
    grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr);
    align-items: center;
    gap: 34px;
    text-align: center;
}

.lined-heading__line {
    height: 1px;
    background: var(--line-strong);
}

.lined-heading .section-number {
    margin-bottom: 10px;
}

.lined-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.23em;
    text-transform: uppercase;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 56px;
}

.portfolio-company {
    min-width: 0;
    border-left: 1px solid var(--line);
}

.portfolio-company:first-child {
    border-left: 0;
}

.portfolio-company__link {
    min-height: 265px;
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 0 clamp(14px, 2vw, 28px) 30px;
    text-align: center;
}

.portfolio-company__logo {
    width: 100%;
    height: 122px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-company__logo img {
    width: min(160px, 100%);
    height: 105px;
    object-fit: contain;
}

.portfolio-company h3 {
    margin: 14px 0 0;
    color: var(--text-strong);
    font-size: clamp(1.05rem, 1.8vw, 1.42rem);
    font-weight: 500;
    line-height: 1.2;
}

.portfolio-company__accent {
    width: 30px;
    height: 1px;
    margin-top: 17px;
    background: var(--blue);
}

.portfolio-company p {
    max-width: 180px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.60rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    line-height: 1.55;
    text-transform: uppercase;
}

.portfolio-company__link:hover h3 {
    color: var(--blue);
}

.portfolio-statement {
    margin: 43px 0 0;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-align: center;
    text-transform: uppercase;
}

.portfolio-statement span {
    color: var(--blue);
}

/*
 * Operating structure
 */

.structure-section {
    padding: clamp(86px, 9vw, 135px) 0;
    border-bottom: 1px solid var(--line);
    background: var(--background);
}

.structure-section__heading {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 35px;
}

.structure-section__heading h2 {
    max-width: 900px;
    margin: 18px 0 0;
    color: var(--text-strong);
    font-size: clamp(2.2rem, 5vw, 4.7rem);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1.06;
}

.structure-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: clamp(60px, 8vw, 100px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.structure-item {
    min-height: 330px;
    padding: 44px clamp(26px, 4vw, 58px);
    border-left: 1px solid var(--line);
}

.structure-item:first-child {
    border-left: 0;
}

.structure-item__number {
    margin: 0;
    color: var(--blue);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.20em;
}

.structure-item h3 {
    margin: 45px 0 0;
    color: var(--text-strong);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 500;
    line-height: 1.25;
}

.structure-item > p:last-child {
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.8;
}

/*
 * Contact
 */

.contact-section {
    background: var(--background);
}

.contact-section__inner {
    min-height: 430px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: center;
    gap: clamp(60px, 10vw, 150px);
    padding-top: 80px;
    padding-bottom: 80px;
}

.contact-section .section-label {
    margin-top: 24px;
}

.contact-section h2 {
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--text-strong);
    font-size: clamp(2.4rem, 5vw, 4.9rem);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1.04;
}

.contact-section__details {
    padding-left: clamp(30px, 5vw, 70px);
    border-left: 1px solid var(--line-strong);
}

.contact-section__details p {
    max-width: 460px;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
}

.contact-section__details a {
    display: inline-block;
    margin-top: 33px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--blue);
    color: var(--text-strong);
    font-size: clamp(1.15rem, 2.4vw, 1.75rem);
    font-weight: 400;
    letter-spacing: 0.02em;
}

/*
 * Footer
 */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--background);
}

.site-footer__inner {
    min-height: 125px;
    display: grid;
    grid-template-columns: 175px 1fr auto;
    align-items: center;
    gap: 35px;
}

.footer-logo {
    display: block;
    width: 165px;
}

.site-footer p,
.site-footer > div > a:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 0.60rem;
    font-weight: 600;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.site-footer p {
    text-align: center;
}

.site-footer > div > a:last-child:hover {
    color: var(--blue);
}

/*
 * Tablet
 */

@media (max-width: 1050px) {
    :root {
        --page-padding: 30px;
    }

    .site-header__inner {
        grid-template-columns: 190px 1fr auto;
        gap: 25px;
    }

    .header-logo {
        width: 185px;
    }

    .site-navigation {
        gap: 22px;
    }

    .site-navigation a {
        font-size: 0.60rem;
    }

    .theme-toggle__line,
    .theme-toggle__label {
        display: none;
    }

    .portfolio-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 46px;
    }

    .portfolio-company:nth-child(4) {
        border-left: 0;
    }

    .contact-section__inner {
        grid-template-columns: 1fr;
        gap: 55px;
    }

    .contact-section__details {
        padding-top: 38px;
        padding-left: 0;
        border-top: 1px solid var(--line-strong);
        border-left: 0;
    }
}

/*
 * Mobile
 */

@media (max-width: 720px) {
    :root {
        --page-padding: 18px;
    }

    .site-header__inner {
        min-height: 92px;
        grid-template-columns: 160px 1fr auto;
        gap: 15px;
    }

    .header-logo {
        width: 155px;
    }

    .site-navigation {
        display: none;
    }

    .hero {
        min-height: 610px;
    }

    .hero__inner {
        padding: 65px 0 72px;
    }

    .hero-logo {
        width: min(560px, 100%);
        margin-top: 22px;
    }

    .hero-summary {
        max-width: 330px;
        line-height: 2.1;
    }

    .about-section__identity {
        min-height: 150px;
        justify-content: flex-start;
        gap: 18px;
    }

    .about-logo {
        width: 140px;
    }

    .about-section__divider {
        height: 70px;
    }

    .about-section__lockup p {
        font-size: 1.15rem;
    }

    .about-section__lockup span {
        font-size: 0.50rem;
        letter-spacing: 0.27em;
    }

    .about-section__content,
    .structure-section__heading {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .about-section__content {
        padding: 75px 0;
    }

    .about-section__copy {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 38px;
    }

    .lined-heading {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .lined-heading__line {
        width: 100%;
    }

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

    .portfolio-company:nth-child(odd) {
        border-left: 0;
    }

    .portfolio-company:nth-child(even) {
        border-left: 1px solid var(--line);
    }

    .portfolio-company__link {
        min-height: 240px;
        padding-inline: 12px;
    }

    .portfolio-company__logo {
        height: 105px;
    }

    .portfolio-company__logo img {
        height: 90px;
    }

    .portfolio-statement {
        line-height: 2;
    }

    .structure-grid {
        grid-template-columns: 1fr;
    }

    .structure-item {
        min-height: 0;
        padding: 42px 10px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .structure-item:first-child {
        border-top: 0;
    }

    .structure-item h3 {
        margin-top: 25px;
    }

    .contact-section__inner {
        min-height: 0;
        padding-top: 85px;
        padding-bottom: 85px;
    }

    .contact-section__details a {
        font-size: 1.05rem;
        overflow-wrap: anywhere;
    }

    .site-footer__inner {
        min-height: 170px;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 15px;
        padding: 30px 0;
    }

    .site-footer p {
        order: 3;
    }
}

@media (max-width: 430px) {
    .site-header__inner {
        grid-template-columns: 145px 1fr auto;
    }

    .header-logo {
        width: 140px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-company,
    .portfolio-company:nth-child(even) {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .portfolio-company:first-child {
        border-top: 0;
    }

    .about-logo {
        width: 115px;
    }

    .about-section__lockup p {
        font-size: 1rem;
    }

    .about-section__lockup span {
        max-width: 165px;
        line-height: 1.8;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
