/* ======================
   Tokens
   My own sections are black and white. Hisbah and GoTrainee
   each keep their real brand: colors, type and motion.
====================== */
:root {
    --black: #000;
    --white: #F6F4EF;
    --muted: #B4B1A9;
    --line: rgba(246, 244, 239, .2);

    /* Hisbah */
    --teal: #125A5E;
    --teal-deep: #0C4347;
    --paper: #F3EDE2;
    --paper-light: #FBF8F1;
    --paper-line: #E2DACA;
    --teal-text: #4A5F5C;

    /* GoTrainee */
    --navy: #011751;
    --sky: #1F6E98;
    --sky-light: #8FCBEC;
    --gold: #C99A2E;
    --gold-light: #E8B23C;
    --go-paper: #F7F8FA;
    --go-line: #E2E7EE;
    --go-text: #4A5570;

    --font-display: 'Sofia Sans Extra Condensed', 'Changa', sans-serif;
    --font-body: 'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
    --font-product: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;

    --gutter: clamp(16px, 4vw, 56px);
    --nav-height: 64px;
    --ease: cubic-bezier(.22, 1, .36, 1);

    --nav-bg: transparent;
    --nav-fg: var(--white);
    --bar: var(--white);
}

/* The navbar and progress bar follow the section under them */
[data-tone="black"] {
    --nav-bg: var(--black);
}

[data-tone="teal"] {
    --nav-bg: var(--teal);
    --nav-fg: var(--paper);
    --bar: var(--paper);
}

[data-tone="paper"] {
    --nav-bg: var(--paper);
    --nav-fg: var(--teal);
    --bar: var(--teal);
}

[data-tone="navy"] {
    --nav-bg: var(--navy);
    --nav-fg: #fff;
    --bar: var(--gold-light);
}

[data-tone="light"] {
    --nav-bg: var(--go-paper);
    --nav-fg: var(--navy);
    --bar: var(--gold);
}

/* Section elements carry data-tone too, but only the page root paints it */
main [data-tone],
.site-nav {
    --nav-bg: inherit;
}

/* ======================
   Base
====================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-padding-top: var(--nav-height);
    -webkit-text-size-adjust: 100%;
    background: var(--black);
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--white);
    background: var(--black);
    overflow-x: clip;
}

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

ul,
ol {
    list-style: none;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

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

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

.skip-link {
    position: fixed;
    inset-block-start: 8px;
    inset-inline-start: 8px;
    z-index: 40;
    padding: 8px 16px;
    color: var(--black);
    background: var(--white);
    transform: translateY(-200%);
}

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

.wrap {
    width: min(100%, 1320px);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* ======================
   Scroll progress
====================== */
.progress {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 31;
    height: 3px;
    background: var(--bar);
    transform: scaleX(var(--scroll, 0));
    transform-origin: left;
    pointer-events: none;
}

[dir="rtl"] .progress {
    transform-origin: right;
}

/* ======================
   Buttons and links
====================== */
.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 999px;
    color: var(--black);
    background: var(--white);
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .2s, transform .2s var(--ease);
    will-change: transform;
}

.btn:hover {
    background: #fff;
}

.btn:active {
    scale: .98;
}

.project--hisbah .btn {
    border-radius: 14px;
    color: var(--paper-light);
    background: var(--teal);
}

.project--hisbah .btn:hover {
    background: var(--teal-deep);
}

.project--gotrainee .btn {
    border-radius: 10px;
    color: #fff;
    background: var(--navy);
}

.project--gotrainee .btn:hover {
    background: var(--sky);
}

.link {
    font-weight: 500;
    text-underline-offset: 6px;
    text-decoration-thickness: 1.5px;
}

.link:hover {
    text-decoration-thickness: 3px;
}

/* ======================
   Navbar
====================== */
.site-nav {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 40px);
    height: var(--nav-height);
    padding-inline: var(--gutter);
    color: var(--nav-fg);
    background: var(--nav-bg);
    transition: background-color .35s, color .35s;
}

html[data-tone="teal"] .site-nav {
    background: var(--teal);
}

html[data-tone="paper"] .site-nav {
    background: var(--paper);
}

html[data-tone="navy"] .site-nav {
    background: var(--navy);
}

html[data-tone="light"] .site-nav {
    background: var(--go-paper);
}

html[data-tone="black"] .site-nav {
    background: var(--black);
}

.site-nav__mark {
    margin-inline-end: auto;
}

.site-nav__mark svg {
    display: block;
    width: 30px;
    height: 30px;
    fill: currentColor;
    transition: transform .6s var(--ease);
}

.site-nav__mark:hover svg {
    transform: rotate(180deg);
}

.site-nav nav {
    display: flex;
    gap: clamp(14px, 2.4vw, 32px);
}

.site-nav nav a {
    font-weight: 500;
    font-size: .9375rem;
    text-decoration: none;
    white-space: nowrap;
}

.lang-toggle {
    flex: none;
    padding: 4px 13px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    font-family: var(--font-product);
    font-weight: 500;
    font-size: .875rem;
}

/* ======================
   Hero
   The two names come from opposite edges and stop at the portrait.
   Scrolling sends them back the way they came.
====================== */
.hero {
    --tear: 0;
    --name-size: min(11.5vw, 23svh);

    position: relative;
    background: var(--black);
}

.motion .hero {
    height: 180svh;
}

.hero__pin {
    position: sticky;
    inset-block-start: 0;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
}

.hero__glyphs {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: calc(1 - var(--tear) * 1.4);
}

.hero__name {
    font: inherit;
}

.hero__line {
    position: absolute;
    z-index: 1;
    inset-block-start: 13svh;
    white-space: nowrap;
    color: var(--white);
    line-height: 1;
    pointer-events: none;
    will-change: transform;
}

.hero__line--ltr {
    left: var(--gutter);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--name-size);
    line-height: .9;
    text-transform: uppercase;
    transform: translateX(calc(var(--tear) * -60vw));
    overflow: hidden;
}

.hero__line--ltr span {
    display: inline-block;
    transition: transform 1.1s var(--ease);
    transition-delay: calc(var(--i) * 45ms);
}

.hero__line--rtl {
    right: var(--gutter);
    font-family: 'Changa', sans-serif;
    font-weight: 700;
    font-size: calc(var(--name-size) * .68);
    line-height: 1.32;
    transform: translateX(calc(var(--tear) * 60vw));
    clip-path: inset(-20% 0 -20% 0);
    transition: clip-path 1.3s var(--ease) .35s;
}

.hero__portrait {
    position: absolute;
    z-index: 2;
    inset-block-end: 0;
    left: 50%;
    height: 70svh;
    aspect-ratio: 1100 / 1037;
    transform: translateX(-50%) scale(calc(1 + var(--tear) * .2));
    transform-origin: 50% 40%;
    opacity: calc(1.15 - var(--tear) * 1.5);
    -webkit-mask-image: linear-gradient(#000 58%, transparent 97%);
    mask-image: linear-gradient(#000 58%, transparent 97%);
    transition: translate 1.5s var(--ease), filter 1.5s;
}

.hero__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom;
}

.hero__foot {
    position: absolute;
    z-index: 4;
    inset-block-end: 0;
    inset-inline: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding: 0 var(--gutter) clamp(20px, 3.5svh, 36px);
    opacity: calc(1 - var(--tear) * 3);
    transition: opacity .8s, translate 1s var(--ease);
}

.hero__claim {
    max-width: 22ch;
    font-weight: 500;
    font-size: clamp(1.125rem, 1.7vw, 1.5rem);
    line-height: 1.35;
}

.hero__intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 36ch;
    font-size: .9375rem;
    color: var(--muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-block-start: 14px;
    color: var(--white);
}

/* The opening sequence */
.motion:not(.is-ready) .hero__line--ltr span {
    transform: translateY(110%);
}

.motion:not(.is-ready) .hero__line--rtl {
    clip-path: inset(-20% 0 -20% 100%);
}

.motion:not(.is-ready) .hero__portrait {
    translate: 0 6%;
    filter: brightness(0);
}

.motion:not(.is-ready) .hero__foot {
    translate: 0 24px;
    opacity: 0;
}

/* ======================
   Ticker: each project opens with its own name, running
====================== */
.ticker {
    overflow: hidden;
    padding-block: clamp(14px, 2vw, 28px);
    pointer-events: none;
}

.ticker__row {
    display: flex;
    width: max-content;
    align-items: center;
    gap: .7em;
    font-family: var(--font-product);
    font-weight: 700;
    font-size: clamp(2.25rem, 6vw, 5.5rem);
    line-height: 1.25;
    will-change: transform;
}

.project--hisbah .ticker {
    color: var(--paper);
    background: var(--teal);
}

.project--gotrainee .ticker {
    color: #fff;
    background: var(--navy);
}

.ticker b {
    font-weight: 700;
    color: var(--gold-light);
}

/* ======================
   Project sections
====================== */
.project--hisbah {
    --muted: var(--teal-text);
    --line: var(--paper-line);

    color: #17302F;
    background: var(--paper);
}

.project--gotrainee {
    --muted: var(--go-text);
    --line: var(--go-line);

    color: var(--navy);
    background: var(--go-paper);
}

.project__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 104px);
    align-items: start;
    padding-block: clamp(56px, 8vw, 112px);
    font-family: var(--font-product);
}

.project__brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-block-end: 24px;
    font-weight: 600;
}

.project__brand img {
    border-radius: 12px;
}

.project__brand .project__plate {
    border: 1px solid var(--go-line);
    border-radius: 10px;
    background: #fff;
}

.project__status {
    display: block;
    font-weight: 400;
    font-size: .875rem;
    color: var(--muted);
}

.project__title {
    font-weight: 700;
    line-height: 1.2;
    text-wrap: balance;
}

.project--hisbah .project__title {
    font-size: clamp(2rem, 3.8vw, 3.25rem);
    color: var(--teal);
}

/* GoTrainee's brand caps headings at 42px */
.project--gotrainee .project__title {
    font-size: clamp(1.875rem, 3vw, 2.625rem);
    color: var(--navy);
}

/* Hisbah's mark closes a total with a ledger's double underline */
.double-rule {
    width: min(100%, 300px);
    height: 8px;
    margin-block-start: 18px;
    border: 0;
    border-block: 2px solid var(--teal);
    transform-origin: 0 0;
}

[dir="rtl"] .double-rule {
    transform-origin: 100% 0;
}

.project__lead {
    max-width: 56ch;
    margin-block-start: 22px;
    color: var(--muted);
}

.rules {
    max-width: 56ch;
    margin-block-start: 28px;
}

.rules>div {
    padding-block: 14px;
    border-block-start: 1px solid var(--line);
}

.rules dt {
    font-weight: 600;
    color: var(--teal);
}

.rules dd {
    font-size: 1rem;
    color: var(--muted);
}

.project__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
    margin-block-start: 28px;
}

/* Headline words climb out of their own lines */
.word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-block: .12em;
    margin-block: -.12em;
}

.word>span {
    display: inline-block;
}

.motion [data-split]:not([data-split="light"]) .word>span {
    transform: translateY(115%);
    transition: transform .9s var(--ease);
    transition-delay: calc(var(--i) * 55ms);
}

.motion [data-split].is-in .word>span {
    transform: none;
}

.motion [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.motion [data-reveal].is-in {
    opacity: 1;
    transform: none;
}

.motion .double-rule[data-reveal] {
    opacity: 1;
    transform: scaleX(0);
    transition: transform 1s var(--ease) .3s;
}

.motion .double-rule[data-reveal].is-in {
    transform: none;
}

/* GoTrainee's own motion: a fade and a 14px slide, nothing more */
.motion .project--gotrainee [data-split] .word {
    overflow: visible;
}

.motion .project--gotrainee [data-split] .word>span {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.motion .project--gotrainee [data-split].is-in .word>span {
    opacity: 1;
    transform: none;
}

/* ======================
   Hisbah phone demo (matches the app's own tokens)
====================== */
.demo-phone {
    position: sticky;
    inset-block-start: calc(var(--nav-height) + 20px);
    justify-self: center;
    width: min(100%, 370px);
    min-width: 0;
}

.demo-phone figcaption {
    margin-block-start: 16px;
    font-size: .875rem;
    color: var(--muted);
}

.phone {
    display: grid;
    gap: 12px;
    padding: 18px 16px 16px;
    border: 8px solid var(--teal-deep);
    border-radius: 40px;
    color: #17302F;
    background: var(--paper);
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: .9375rem;
    box-shadow: 0 24px 50px rgba(12, 67, 71, .22);
}

.phone__top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone__top img {
    border-radius: 10px;
}

.phone__top strong,
.phone__top span {
    display: block;
    line-height: 1.3;
}

.phone__top strong {
    font-size: 1.0625rem;
}

.phone__top span {
    font-size: .8125rem;
    color: #566965;
}

.phone__card {
    display: grid;
    justify-items: start;
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--paper-light);
    background: var(--teal);
}

.phone__total {
    position: relative;
    padding-block-end: 9px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 1.875rem;
    line-height: 1.25;
    background:
        linear-gradient(var(--paper-light), var(--paper-light)) 0 100% / 100% 2px no-repeat,
        linear-gradient(var(--paper-light), var(--paper-light)) 0 calc(100% - 5px) / 100% 2px no-repeat;
}

.phone__total.is-closed {
    animation: close-total .7s var(--ease);
}

@keyframes close-total {
    from {
        background-size: 0 2px, 0 2px;
    }
}

.phone__count {
    margin-block-start: 8px;
    font-size: .8125rem;
}

.phone__products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.phone__product {
    position: relative;
    padding: 10px 12px;
    border: 1px solid var(--paper-line);
    border-radius: 12px;
    background: var(--paper-light);
    text-align: start;
    transition: border-color .15s, transform .2s var(--ease);
}

.phone__product:hover {
    border-color: var(--teal);
}

.phone__product:active {
    transform: scale(.96);
}

.phone__product b,
.phone__product>span {
    display: block;
}

.phone__product b {
    font-weight: 600;
    font-size: .875rem;
    line-height: 1.35;
}

.phone__product>span {
    font-size: .75rem;
    color: #566965;
}

.phone__product i {
    position: absolute;
    inset-block-start: -6px;
    inset-inline-end: -4px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    color: var(--paper-light);
    background: var(--teal);
    font-style: normal;
    font-weight: 600;
    font-size: .75rem;
    line-height: 22px;
    text-align: center;
}

.phone__pay {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--paper-line);
}

.phone__pay button {
    padding: 8px;
    border-radius: 9px;
    font-weight: 600;
    font-size: .8125rem;
}

.phone__pay [aria-pressed="true"] {
    color: var(--paper-light);
    background: var(--teal);
}

.phone__debt {
    font-size: .8125rem;
}

.phone__meter {
    height: 8px;
    margin-block-start: 4px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--paper-line);
}

.phone__meter i {
    display: block;
    height: 100%;
    background: var(--teal);
    transition: inline-size .35s var(--ease);
}

.phone__debt.is-over .phone__meter i {
    background: #B3261E;
}

.phone__confirm {
    padding: 12px;
    border-radius: 12px;
    color: var(--paper-light);
    background: var(--teal);
    font-weight: 600;
}

.phone__confirm:disabled {
    color: #5D6F6B;
    background: var(--paper-line);
    cursor: not-allowed;
}

.phone__message {
    min-height: 2.8em;
    font-size: .8125rem;
    line-height: 1.4;
}

/* ======================
   Sideways gallery
====================== */
.hscroll {
    color: var(--paper);
    background: var(--teal);
}

.hscroll__pin {
    padding-block: 40px;
    overflow-x: auto;
    scrollbar-width: none;
}

.hscroll__track {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2vw, 28px);
    width: max-content;
    padding-inline: var(--gutter);
}

.hscroll__track li {
    flex: none;
    height: min(66svh, 580px);
}

.hscroll__track img {
    width: auto;
    height: 100%;
    max-width: none;
    border-radius: 20px;
}

.hscroll__track .hscroll__title {
    display: flex;
    align-items: center;
    width: min(76vw, 380px);
    height: auto;
}

.hscroll__title h3 {
    font-family: var(--font-product);
    font-weight: 700;
    font-size: clamp(1.625rem, 2.8vw, 2.5rem);
    line-height: 1.25;
}

.hscroll__wide img {
    border-radius: 12px;
}

@media (min-width: 981px) {
    .motion .hscroll__pin {
        position: sticky;
        inset-block-start: 0;
        display: flex;
        align-items: center;
        height: 100svh;
        padding-block: 0;
        overflow: hidden;
    }

    .motion .hscroll__track {
        will-change: transform;
    }
}

/* ======================
   GoTrainee media
====================== */
.project__media {
    position: relative;
    padding-block-end: 16%;
}

.project__shot {
    width: 100%;
    border-radius: 12px;
}

.project__art {
    position: absolute;
    inset-block-end: 0;
    inset-inline-end: 0;
    width: 42%;
    border: 1px solid var(--go-line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(1, 23, 81, .08);
}

/* ======================
   GoTrainee route
====================== */
.motion .route-pin {
    height: 500svh;
}

.route {
    display: grid;
    align-content: center;
    gap: clamp(20px, 3svh, 32px);
    min-height: 100svh;
    padding: calc(var(--nav-height) + 8px) max(var(--gutter), calc((100% - 1208px) / 2)) 28px;
    color: #fff;
    background: var(--navy);
    font-family: var(--font-product);
}

.motion .route {
    position: sticky;
    inset-block-start: 0;
    height: 100svh;
    overflow: hidden;
}

.route__head {
    font-size: .9375rem;
    color: var(--sky-light);
}

.route__track {
    --progress: 0;

    position: relative;
    display: flex;
    justify-content: space-between;
}

.route__track::before,
.route__track::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 20px;
    height: 2px;
    margin-block-start: -1px;
}

.route__track::before {
    inset-inline-end: 20px;
    background: rgba(255, 255, 255, .22);
}

.route__track::after {
    width: calc((100% - 40px) * var(--progress));
    background: var(--gold-light);
    transition: width .5s var(--ease);
}

.route__track li {
    position: relative;
    z-index: 1;
}

.route__track button {
    display: block;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    color: #fff;
    background: var(--navy);
    font-weight: 600;
    font-size: .9375rem;
    line-height: 37px;
    text-align: center;
    transition: color .3s, background-color .3s, border-color .3s;
}

.route__track .is-done button {
    border-color: var(--gold-light);
    color: var(--gold-light);
}

.route__track .is-current button {
    border-color: var(--gold-light);
    color: var(--navy);
    background: var(--gold-light);
}

.route__steps {
    display: grid;
}

.route__step {
    display: grid;
    grid-template-columns: minmax(0, .35fr) minmax(0, 1.65fr);
    gap: clamp(16px, 3vw, 48px);
    align-items: start;
}

.route__number {
    font-weight: 700;
    font-size: clamp(4rem, 9vw, 7.5rem);
    line-height: 1;
    color: var(--sky-light);
}

.route__step h3 {
    font-weight: 700;
    font-size: clamp(1.75rem, 3vw, 2.625rem);
    line-height: 1.2;
}

.route__step p {
    max-width: 60ch;
    margin-block-start: 10px;
    color: #C9D4EA;
}

.route__step dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 640px;
    margin-block-start: 16px;
    padding-block-start: 12px;
    border-block-start: 1px solid rgba(255, 255, 255, .2);
}

.route__step dt {
    font-size: .875rem;
    color: var(--sky-light);
}

.route__step dd {
    font-weight: 500;
    line-height: 1.4;
}

/* Pinned, the steps stack and swap. Without motion they read as a list */
.motion .route__step {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .35s, transform .5s var(--ease);
    pointer-events: none;
}

.motion .route__step.is-current {
    opacity: 1;
    transform: none;
}

.motion .route__step.is-past {
    transform: translateY(-14px);
}

html:not(.motion) .route__track {
    display: none;
}

html:not(.motion) .route__steps {
    gap: 56px;
}

/* ======================
   Stack
====================== */
.stack {
    padding-block: clamp(72px, 9vw, 128px);
    background: var(--black);
}

.stack__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1;
    text-transform: uppercase;
    text-wrap: balance;
}

[dir="rtl"] .stack__title {
    font-family: 'Changa', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 3.6vw, 3.25rem);
    line-height: 1.3;
}

.stack__table {
    position: relative;
    margin-block-start: clamp(28px, 4vw, 48px);
    overflow-x: auto;
}

.stack table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.stack th,
.stack td {
    padding: 13px 12px;
    border-block-end: 1px solid var(--line);
    text-align: start;
    vertical-align: middle;
    transition: color .2s, background-color .2s;
}

.stack thead th {
    color: var(--muted);
    font-weight: 500;
}

.stack tbody th {
    width: 26%;
    font-weight: 600;
}

.stack tbody tr:hover>* {
    color: var(--black);
    background: var(--white);
}

.stack__none {
    color: #8F8C85;
}

.stack__note {
    max-width: 68ch;
    margin-block-start: 24px;
    color: var(--muted);
}

/* ======================
   Contact
====================== */
.contact {
    padding-block: clamp(72px, 10vw, 144px) clamp(40px, 6vw, 72px);
    background: var(--black);
}

.contact__title {
    max-width: 18ch;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3rem, 7.5vw, 6.5rem);
    line-height: 1;
    text-transform: uppercase;
}

[dir="rtl"] .contact__title {
    font-family: 'Changa', sans-serif;
    font-weight: 700;
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    line-height: 1.3;
}

.motion [data-split="light"] .word>span {
    color: rgba(246, 244, 239, calc(.18 + var(--lit, 0) * .82));
}

.contact__email {
    display: inline-block;
    margin-block-start: clamp(24px, 3vw, 40px);
    font-weight: 500;
    font-size: clamp(1.125rem, 2.2vw, 1.75rem);
    text-underline-offset: 7px;
    text-decoration-thickness: 1.5px;
    overflow-wrap: anywhere;
    will-change: transform;
}

.contact__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-block-start: 26px;
}

.contact__links a {
    display: inline-block;
    padding-block: 6px;
    font-weight: 500;
    text-underline-offset: 5px;
}

.site-footer {
    padding: 20px var(--gutter);
    border-block-start: 1px solid var(--line);
    color: var(--muted);
    font-size: .9375rem;
}

/* ======================
   Tablet
====================== */
@media (max-width: 980px) {
    .project__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo-phone {
        position: static;
    }

    .route__step {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }
}

/* ======================
   Phone
====================== */
@media (max-width: 760px) {
    .hero {
        --name-size: 19vw;
    }

    .hero__line {
        inset-block-start: calc(var(--nav-height) + 6px);
    }

    .hero__line--ltr {
        left: 50%;
        margin-inline-start: 0;
        translate: -50% 0;
    }

    .hero__line--rtl {
        inset-block-start: calc(var(--nav-height) + 19vw);
        right: auto;
        left: 50%;
        translate: -50% 0;
        font-size: 13vw;
    }

    .hero__portrait {
        height: min(48svh, 98vw);
        inset-block-end: 22svh;
        -webkit-mask-image: linear-gradient(#000 72%, transparent 100%);
        mask-image: linear-gradient(#000 72%, transparent 100%);
    }

    .hero__foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .hero__claim {
        max-width: none;
    }

    .hero__intro {
        max-width: none;
    }

    .route__step dl {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .hscroll__track li {
        height: 58svh;
    }
}

@media (max-width: 480px) {
    .site-nav {
        gap: 8px;
    }

    .site-nav__mark svg {
        width: 26px;
        height: 26px;
    }

    .site-nav nav {
        gap: 10px;
    }

    .site-nav nav a {
        font-size: .8125rem;
    }

    /* The stack section is one scroll away; the toggle needs the room */
    .site-nav nav a[href="#stack"] {
        display: none;
    }

    .lang-toggle {
        padding: 2px 8px;
        font-size: .75rem;
    }
}
