/*
 * Site styles for pauljonscott.com
 * Built on the Gearset tokens in tokens.css. The guide's type scale is in rem
 * on a 10px root (3.2rem = 32px), so html is set to 62.5%.
 */

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

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

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--fg-default);
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    font-feature-settings: 'cv08' 1, 'cv05' 1, 'calt' 1, 'liga' 1;
    font-weight: 400;
    font-size: 1.6rem;
    line-height: 2.4rem;
    background: var(--bg-default);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--fg-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--blue-70);
}

:focus-visible {
    outline: 2px solid var(--blue-60);
    outline-offset: 2px;
    box-shadow: var(--shadow-primary);
    border-radius: var(--border-radius-s);
}

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

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

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

.skip-link {
    position: absolute;
    left: var(--space-m);
    top: -100px;
    z-index: 100;
    padding: var(--space-s) var(--space-m);
    background: var(--gs-yellow);
    color: var(--gs-navy);
    font-weight: 600;
    border-radius: var(--border-radius-s);
}

.skip-link:focus {
    top: var(--space-m);
}

/* ---------- Type scale (from the guide) ---------- */

.headline-l { font-size: 3.2rem; line-height: 4rem; }
.headline-m { font-size: 2.4rem; line-height: 3.2rem; }
.headline-s { font-size: 2.2rem; line-height: 2.4rem; }
.title-l { font-size: 2rem; line-height: 3.2rem; }
.title-m { font-size: 1.8rem; line-height: 2.4rem; letter-spacing: 0.15px; }
.title-s { font-size: 1.6rem; line-height: 2rem; letter-spacing: 0.1px; }
.body-l { font-size: 1.6rem; line-height: 2.4rem; }
.body-m { font-size: 1.4rem; line-height: 2rem; letter-spacing: 0.1px; }
.body-s { font-size: 1.3rem; line-height: 1.6rem; letter-spacing: 0.1px; }
.label-l { font-size: 1.2rem; line-height: 1.6rem; letter-spacing: 0.1px; }
.label-m { font-size: 1.1rem; line-height: 1.6rem; letter-spacing: 0.5px; }
.label-s { font-size: 1rem; line-height: 1.6rem; letter-spacing: 0.5px; }

.text-muted { color: var(--fg-muted); }

/* Eyebrow label used above section headings */
.eyebrow {
    display: inline-block;
    font-size: 1.2rem;
    line-height: 1.6rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--fg-primary);
    margin-bottom: var(--space-s);
}

/* ---------- Layout ---------- */

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--space-m);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-l);
    }
}

.section {
    padding: var(--token-space-800) 0;
}

@media (min-width: 768px) {
    .section {
        padding: var(--token-space-1000) 0;
    }
}

.section--subtle {
    background: var(--bg-subtlest);
    border-top: 1px solid var(--border-muted);
    border-bottom: 1px solid var(--border-muted);
}

.section-header {
    max-width: 680px;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    font-size: 2.4rem;
    line-height: 3.2rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}

@media (min-width: 768px) {
    .section-header h2 {
        font-size: 3.2rem;
        line-height: 4rem;
    }
}

.section-header p {
    margin-top: var(--space-s);
    color: var(--fg-muted);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-s);
    min-height: 40px;
    padding: var(--token-space-100) var(--token-space-250);
    border: 1px solid transparent;
    border-radius: var(--border-radius-s);
    font-family: inherit;
    font-size: 1.4rem;
    line-height: 2rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
    color: var(--btn-primary-fg);
    background: var(--btn-primary-bg);
}

.btn-primary:hover {
    color: var(--btn-primary-fg);
    background: var(--btn-primary-hover-bg);
}

.btn-outline {
    color: var(--btn-outline-fg);
    background: var(--btn-outline-bg);
    border-color: var(--btn-outline-border);
}

.btn-outline:hover {
    color: var(--btn-outline-fg);
    background: var(--btn-outline-hover-bg);
}

/* Variants for use on the navy brand background */
.btn-brand {
    color: var(--gs-navy);
    background: var(--gs-yellow);
}

.btn-brand:hover {
    color: var(--gs-navy);
    background: var(--orange-40);
}

.btn-on-dark {
    color: var(--white);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.48);
}

.btn-on-dark:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--white);
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--gs-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: var(--space-s);
    color: var(--white);
    font-weight: 600;
    font-size: 1.6rem;
    text-decoration: none;
    letter-spacing: -0.1px;
}

.wordmark:hover {
    color: var(--white);
}

.wordmark__mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-s);
    background: var(--gs-yellow);
    color: var(--gs-navy);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.site-nav a {
    display: inline-block;
    padding: var(--space-s) var(--token-space-150);
    border-radius: var(--border-radius-s);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.4rem;
    line-height: 2rem;
    font-weight: 500;
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.site-nav .nav-cta {
    color: var(--gs-navy);
    background: var(--gs-yellow);
    font-weight: 600;
}

.site-nav .nav-cta:hover {
    color: var(--gs-navy);
    background: var(--orange-40);
}

@media (max-width: 639px) {
    .site-nav .nav-secondary {
        display: none;
    }
}

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

.hero {
    position: relative;
    overflow: hidden;
    background: var(--gs-navy);
    color: var(--fg-emphasis);
    padding: var(--token-space-800) 0 var(--token-space-600);
}

@media (min-width: 768px) {
    .hero {
        padding: var(--token-space-1000) 0 var(--token-space-800);
    }
}

/* Subtle grid texture in the background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 90%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 90%);
    pointer-events: none;
}

.hero .container {
    position: relative;
}

.hero__role {
    display: inline-flex;
    align-items: center;
    gap: var(--space-s);
    padding: var(--space-xs) var(--token-space-150);
    border-radius: 999px;
    background: rgba(255, 211, 92, 0.12);
    color: var(--gs-yellow);
    font-size: 1.2rem;
    line-height: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero__role::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gs-yellow);
}

.hero h1 {
    margin-top: var(--space-l);
    max-width: 820px;
    font-size: 3.6rem;
    line-height: 4.4rem;
    font-weight: 600;
    letter-spacing: -0.8px;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 5.6rem;
        line-height: 6.4rem;
        letter-spacing: -1.4px;
    }
}

.hero h1 .accent {
    color: var(--gs-yellow);
}

.hero__intro {
    margin-top: var(--space-l);
    max-width: 640px;
    font-size: 1.8rem;
    line-height: 2.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
    margin-top: var(--space-xl);
}

.hero__stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-m);
    margin-top: var(--token-space-800);
    padding-top: var(--space-l);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 640px) {
    .hero__stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-l);
    }
}

.hero__stats dt {
    font-size: 3.2rem;
    line-height: 4rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.5px;
}

.hero__stats dd {
    margin: 0;
    font-size: 1.4rem;
    line-height: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

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

.work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-l);
}

@media (min-width: 768px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Earlier work: three across on wide screens */
@media (min-width: 1024px) {
    .work-grid--compact {
        grid-template-columns: repeat(3, 1fr);
    }

    .work-grid--compact .work-card__title {
        font-size: 1.8rem;
        line-height: 2.4rem;
    }

    .work-grid--compact .work-card__summary {
        font-size: 1.4rem;
        line-height: 2.2rem;
    }
}

/* A second header further down a section */
.section-header--sub {
    margin-top: var(--token-space-800);
    padding-top: var(--token-space-600);
    border-top: 1px solid var(--border-muted);
}

.section-header h3 {
    font-size: 2.4rem;
    line-height: 3.2rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.work-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-muted);
    border-radius: var(--border-radius-m);
    background: var(--bg-default);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.work-card:hover {
    color: inherit;
    border-color: var(--border-primary);
    box-shadow: var(--shadow-popup);
    transform: translateY(-2px);
}

.work-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-muted);
}

.work-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: var(--space-m);
    object-fit: contain;
}

.work-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    padding: var(--space-l);
}

.work-card__title {
    font-size: 2rem;
    line-height: 2.8rem;
    font-weight: 600;
}

.work-card__summary {
    color: var(--fg-muted);
    font-size: 1.5rem;
    line-height: 2.4rem;
}

.work-card__more {
    margin-top: var(--space-s);
    color: var(--fg-primary);
    font-size: 1.4rem;
    font-weight: 600;
}

/* Tags (Label M from the guide) */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tag {
    display: inline-block;
    padding: 0 var(--space-s);
    border-radius: var(--border-radius-xs);
    background: var(--bg-primary);
    color: var(--blue-80);
    font-size: 1.1rem;
    line-height: 2rem;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
}

.tag--highlight {
    background: var(--bg-highlight);
    color: var(--purple-80);
}

.tag--neutral {
    background: var(--bg-subtle);
    color: var(--grey-70);
}

/* ---------- About ---------- */

.about {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xxl);
}

@media (min-width: 960px) {
    .about {
        grid-template-columns: 5fr 6fr;
        gap: var(--token-space-800);
    }
}

.about__copy p + p {
    margin-top: var(--space-m);
}

.about__copy p {
    font-size: 1.7rem;
    line-height: 2.8rem;
}

.principles {
    display: grid;
    gap: var(--space-m);
}

.principle {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: var(--space-m);
    padding: var(--space-l);
    border: 1px solid var(--border-muted);
    border-radius: var(--border-radius-m);
    background: var(--bg-default);
}

.principle__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-m);
    background: var(--bg-primary);
    color: var(--blue-60);
}

.principle__icon svg {
    width: 20px;
    height: 20px;
}

.principle:nth-child(2) .principle__icon {
    background: var(--bg-highlight);
    color: var(--purple-70);
}

.principle:nth-child(3) .principle__icon {
    background: var(--bg-success);
    color: var(--green-80);
}

.principle:nth-child(4) .principle__icon {
    background: var(--bg-warning);
    color: var(--orange-80);
}

.principle h3 {
    font-size: 1.6rem;
    line-height: 2.4rem;
    font-weight: 600;
}

.principle p {
    margin-top: var(--space-xs);
    color: var(--fg-muted);
    font-size: 1.4rem;
    line-height: 2.2rem;
}

/* ---------- Experience ---------- */

.timeline {
    position: relative;
    border-left: 2px solid var(--border-muted);
    margin-left: 7px;
    padding: 0;
    list-style: none;
}

.timeline__item {
    position: relative;
    padding: 0 0 var(--space-xl) var(--space-xl);
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-default);
    border: 2px solid var(--grey-30);
}

.timeline__item--current::before {
    background: var(--gs-yellow);
    border-color: var(--gs-navy);
}

.timeline__dates {
    font-size: 1.2rem;
    line-height: 1.6rem;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--fg-muted);
}

.timeline__role {
    margin-top: var(--space-xs);
    font-size: 1.8rem;
    line-height: 2.4rem;
    font-weight: 600;
}

.timeline__org {
    color: var(--fg-muted);
    font-size: 1.5rem;
}

.timeline__note {
    margin-top: var(--space-s);
    max-width: 640px;
    font-size: 1.5rem;
    line-height: 2.4rem;
}

.timeline__item .tags {
    margin-top: var(--space-s);
}

.timeline__list {
    margin-top: var(--space-s);
    max-width: 680px;
    padding-left: var(--space-l);
    list-style: disc;
    font-size: 1.5rem;
    line-height: 2.4rem;
}

.timeline__list li + li {
    margin-top: var(--space-xs);
}

/* ---------- Credentials ---------- */

.credentials {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-l);
}

@media (min-width: 960px) {
    .credentials {
        grid-template-columns: 2fr 1fr;
    }
}

.panel {
    border: 1px solid var(--border-muted);
    border-radius: var(--border-radius-m);
    background: var(--bg-default);
    overflow: hidden;
}

.panel + .panel {
    margin-top: var(--space-l);
}

.panel__header {
    padding: var(--space-m) var(--space-l);
    background: var(--bg-table-header);
    border-bottom: 1px solid var(--border-muted);
    font-size: 1.2rem;
    line-height: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--fg-muted);
}

.list-rows li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-xs) var(--space-m);
    padding: var(--space-m) var(--space-l);
    border-bottom: 1px solid var(--border-muted);
}

.list-rows li:last-child {
    border-bottom: 0;
}

.list-rows__title {
    font-size: 1.5rem;
    line-height: 2.2rem;
    font-weight: 500;
}

.list-rows__title a {
    color: var(--fg-default);
    text-decoration: none;
}

.list-rows__title a:hover {
    color: var(--fg-primary);
    text-decoration: underline;
}

.list-rows__meta {
    font-size: 1.3rem;
    line-height: 2rem;
    color: var(--fg-muted);
    white-space: nowrap;
}

.list-rows__sub {
    flex-basis: 100%;
    font-size: 1.3rem;
    line-height: 2rem;
    color: var(--fg-muted);
}

.quote {
    margin: 0;
    padding: var(--space-m) var(--space-l);
}

.quote p {
    font-size: 1.6rem;
    line-height: 2.4rem;
    font-weight: 500;
}

.quote footer {
    margin-top: var(--space-xs);
    font-size: 1.3rem;
    line-height: 2rem;
    color: var(--fg-muted);
}

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

.contact {
    background: var(--gs-navy);
    color: var(--fg-emphasis);
}

.contact .eyebrow {
    color: var(--gs-yellow);
}

.contact h2 {
    max-width: 720px;
    font-size: 2.8rem;
    line-height: 3.6rem;
    font-weight: 600;
    letter-spacing: -0.4px;
}

@media (min-width: 768px) {
    .contact h2 {
        font-size: 4rem;
        line-height: 4.8rem;
        letter-spacing: -0.8px;
    }
}

.contact p {
    margin-top: var(--space-m);
    max-width: 600px;
    color: rgba(255, 255, 255, 0.8);
}

.contact .hero__actions {
    margin-top: var(--space-xl);
}

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

.site-footer {
    background: var(--bg-footer);
    color: rgba(255, 255, 255, 0.64);
    padding: var(--space-l) 0;
    font-size: 1.3rem;
    line-height: 2rem;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-s) var(--space-l);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
}

.site-footer a:hover {
    color: var(--white);
}

/* ---------- Case study pages ---------- */

.case-hero {
    position: relative;
    overflow: hidden;
    background: var(--gs-navy);
    color: var(--fg-emphasis);
    padding: var(--token-space-800) 0 var(--token-space-600);
}

/* Same grid texture as the homepage hero, fading out down the page */
.case-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 70%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 70%);
    pointer-events: none;
}

.case-hero .container {
    position: relative;
}

.case-hero__back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.4rem;
    text-decoration: none;
}

.case-hero__back:hover {
    color: var(--white);
}

.case-hero h1 {
    margin-top: var(--space-l);
    max-width: 820px;
    font-size: 3.2rem;
    line-height: 4rem;
    font-weight: 600;
    letter-spacing: -0.6px;
}

@media (min-width: 768px) {
    .case-hero h1 {
        font-size: 4.8rem;
        line-height: 5.6rem;
        letter-spacing: -1px;
    }
}

.case-hero__summary {
    margin-top: var(--space-m);
    max-width: 680px;
    font-size: 1.8rem;
    line-height: 2.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.case-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-m) var(--space-l);
    margin-top: var(--space-xl);
    padding-top: var(--space-l);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 768px) {
    .case-meta {
        grid-template-columns: repeat(4, 1fr);
    }
}

.case-meta dt {
    font-size: 1.1rem;
    line-height: 1.6rem;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gs-yellow);
}

.case-meta dd {
    margin: var(--space-xs) 0 0;
    font-size: 1.5rem;
    line-height: 2.2rem;
    color: var(--white);
}

.prose {
    max-width: 720px;
}

.prose h2 {
    margin-top: var(--token-space-600);
    font-size: 2.4rem;
    line-height: 3.2rem;
    font-weight: 600;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin-top: var(--space-xl);
    font-size: 1.8rem;
    line-height: 2.4rem;
    font-weight: 600;
}

.prose p,
.prose ul,
.prose ol {
    margin-top: var(--space-m);
    font-size: 1.7rem;
    line-height: 2.8rem;
}

.prose ul {
    list-style: disc;
    padding-left: var(--space-l);
}

.prose ol {
    padding-left: var(--space-l);
}

.prose li + li {
    margin-top: var(--space-xs);
}

.prose figure {
    margin: var(--space-xl) 0;
}

.prose figure img {
    border: 1px solid var(--border-muted);
    border-radius: var(--border-radius-m);
}

.prose figcaption {
    margin-top: var(--space-s);
    font-size: 1.3rem;
    line-height: 2rem;
    color: var(--fg-muted);
}

.callout {
    margin-top: var(--space-l);
    padding: var(--space-m) var(--space-l);
    border-left: 4px solid var(--alert-information-border);
    border-radius: var(--border-radius-s);
    background: var(--alert-information-bg);
    font-size: 1.6rem;
    line-height: 2.6rem;
}

.callout--outcome {
    border-left-color: var(--alert-success-border);
    background: var(--alert-success-bg);
}

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

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

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}

/* ---------- Password lock (js/unlock.js) ---------- */

.lock {
    max-width: 560px;
}

.lock--inline {
    padding: var(--space-xl);
    border: 1px solid var(--border-muted);
    border-radius: var(--border-radius-m);
    background: var(--bg-subtlest);
}

.lock__title {
    font-size: 2.4rem;
    line-height: 3.2rem;
    font-weight: 600;
}

.lock--inline .lock__title {
    font-size: 1.8rem;
    line-height: 2.4rem;
}

.lock__text {
    margin-top: var(--space-s);
    color: var(--fg-muted);
}

.lock__form {
    margin-top: var(--space-l);
}

.lock__form[hidden],
.lock__error[hidden] {
    display: none;
}

.lock__label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: 1.2rem;
    line-height: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.lock__row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
}

.lock__input {
    flex: 1 1 220px;
    min-height: 40px;
    padding: var(--space-s) var(--token-space-150);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-s);
    font: inherit;
    font-size: 1.6rem;
    color: var(--input-fg);
    background: var(--white);
}

.lock__input:focus {
    outline: none;
    border-color: var(--input-border-active);
    box-shadow: var(--shadow-primary);
}

.lock__error {
    margin-top: var(--space-s);
    font-size: 1.4rem;
    line-height: 2rem;
    color: var(--fg-danger);
}

.lock-page {
    min-height: 100vh;
    background: var(--bg-subtlest);
}

.lock-page__main {
    padding: var(--token-space-800) 0;
}

.lock-page--framed .lock-page__main {
    padding: var(--space-xl) 0;
}

.btn:disabled {
    color: var(--btn-disabled-fg);
    background: var(--btn-disabled-bg);
    cursor: progress;
}

/* A full-screen screenshot fills the card edge to edge */
.work-card__media--screen img {
    padding: 0;
    object-fit: cover;
    object-position: top left;
}

/* A card without a screenshot: a typographic panel instead */
.work-card__media--type {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: var(--space-xs);
    padding: var(--space-l);
    background: var(--gs-navy);
    color: #fff;
}

.work-card__media--type .work-card__kicker {
    font-size: 1.2rem;
    line-height: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--gs-yellow);
}

.work-card__media--type .work-card__headline {
    font-size: 2.4rem;
    line-height: 3rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}

/* ---------- Motion (js/motion.js) ---------- */

/* Hero: soft glows that drift slowly behind the grid */
.hero__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero__glow::before,
.hero__glow::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    will-change: transform;
}

.hero__glow::before {
    top: -20%;
    right: -10%;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(255, 211, 92, 0.16), transparent 70%);
    animation: hero-drift 18s ease-in-out infinite alternate;
}

.hero__glow::after {
    bottom: -30%;
    left: -15%;
    width: 640px;
    height: 640px;
    background: radial-gradient(circle, rgba(120, 160, 255, 0.14), transparent 70%);
    animation: hero-drift 24s ease-in-out infinite alternate-reverse;
}

@keyframes hero-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-60px, 40px, 0) scale(1.12); }
}

/* Hero: parallax layers, driven by --hero-scroll (px scrolled, set by js/motion.js) */
.hero::before,
.case-hero::before {
    transform: translate3d(0, calc(var(--hero-scroll, 0) * 0.35px), 0);
}

.hero__glow {
    transform: translate3d(0, calc(var(--hero-scroll, 0) * 0.2px), 0);
}

.hero .container,
.case-hero .container {
    transform: translate3d(0, calc(var(--hero-scroll, 0) * -0.08px), 0);
}

/* Hero: content rises in on load */
.hero .hero__role,
.hero h1,
.hero .hero__intro,
.hero .hero__actions,
.hero .hero__stats {
    animation: rise-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.case-hero .case-hero__back,
.case-hero .case-hero__client,
.case-hero h1,
.case-hero .case-hero__summary,
.case-hero .case-meta,
.case-hero .demo-hero {
    animation: rise-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.case-hero .case-hero__client { animation-delay: 0.05s; }
.case-hero h1 { animation-delay: 0.1s; }
.case-hero .case-hero__summary { animation-delay: 0.18s; }
.case-hero .case-meta { animation-delay: 0.26s; }
.case-hero .demo-hero { animation-delay: 0.36s; }

.hero h1 { animation-delay: 0.08s; }
.hero .hero__intro { animation-delay: 0.16s; }
.hero .hero__actions { animation-delay: 0.24s; }
.hero .hero__stats { animation-delay: 0.32s; }

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translate3d(0, 16px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Work card screenshots ease in a touch on hover */
.work-card__media img {
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.work-card:hover .work-card__media img {
    transform: scale(1.03);
}

/* Scroll reveal: only hidden once js/motion.js has confirmed it can show them again */
.motion-ready [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0s);
}

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

/* Once revealed, cards go back to their quick hover transition */
.motion-ready .work-card[data-reveal].is-settled {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
    .hero__glow::before,
    .hero__glow::after,
    .hero .hero__role,
    .hero h1,
    .hero .hero__intro,
    .hero .hero__actions,
    .hero .hero__stats,
    .case-hero .case-hero__back,
    .case-hero .case-hero__client,
    .case-hero h1,
    .case-hero .case-hero__summary,
    .case-hero .case-meta,
    .case-hero .demo-hero {
        animation: none;
    }

    .hero::before,
    .case-hero::before,
    .hero__glow,
    .hero .container,
    .case-hero .container {
        transform: none;
    }
}

/* ---------- Hero illustration: from customer call to working prototype ----------
 * Decorative, wide screens only. Three cards float on the right of the homepage hero:
 * a call with a highlighted quote, the insight it led to, and a prototype assembling.
 */

.hero__visual {
    display: none;
}

@media (min-width: 1100px) {
    .hero h1 {
        max-width: 620px;
    }

    .hero__intro {
        max-width: 560px;
    }

    .hero__visual {
        display: block;
        position: absolute;
        top: 0;
        right: var(--space-l);
        width: 400px;
        height: 440px;
        translate: 0 calc(var(--hero-scroll, 0) * -0.06px);
        animation: rise-in 0.9s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }
}

.hv-route {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.hv-route path {
    fill: none;
    stroke: rgba(255, 211, 92, 0.35);
    stroke-width: 1.5;
    stroke-dasharray: 4 6;
}

.hv-route circle {
    fill: var(--gs-yellow);
    filter: drop-shadow(0 0 6px rgba(255, 211, 92, 0.8));
}

.hv-card {
    position: absolute;
    border-radius: var(--border-radius-m);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    animation: hv-float 7s ease-in-out infinite alternate;
}

.hv-label {
    display: flex;
    align-items: center;
    gap: var(--space-s);
    font-size: 1.1rem;
    line-height: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* 1. The customer call */
.hv-call {
    top: 0;
    left: 0;
    width: 250px;
    padding: var(--space-m);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.86);
}

.hv-call .hv-label {
    color: rgba(255, 255, 255, 0.6);
}

.hv-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6b6b;
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.6);
    animation: hv-pulse 2s ease-out infinite;
}

.hv-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 28px;
    margin-top: var(--space-s);
}

.hv-wave i {
    flex: 1;
    height: 100%;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
    transform-origin: center;
    animation: hv-wave 1.2s ease-in-out infinite alternate;
}

.hv-wave i:nth-child(3n) { animation-duration: 0.9s; }
.hv-wave i:nth-child(3n + 1) { animation-duration: 1.4s; animation-delay: -0.3s; }
.hv-wave i:nth-child(4n) { animation-delay: -0.6s; }
.hv-wave i:nth-child(5n) { animation-duration: 1.1s; animation-delay: -0.9s; }

.hv-quote {
    margin-top: var(--space-s);
    font-size: 1.4rem;
    line-height: 2.1rem;
}

.hv-quote mark {
    color: inherit;
    background: linear-gradient(rgba(255, 211, 92, 0.45), rgba(255, 211, 92, 0.45)) no-repeat 0 85% / 0% 40%;
    animation: hv-mark 8s ease-in-out infinite;
}

/* 2. The insight */
.hv-note {
    top: 124px;
    right: 0;
    width: 190px;
    padding: var(--space-m);
    background: var(--gs-yellow);
    color: var(--gs-navy);
    rotate: 3deg;
    animation-delay: -2s;
}

.hv-note p {
    margin-top: var(--space-xs);
    font-size: 1.4rem;
    line-height: 2rem;
    font-weight: 600;
}

/* 3. The prototype, assembling */
.hv-proto {
    top: 236px;
    left: 24px;
    width: 320px;
    overflow: hidden;
    background: var(--white);
    color: var(--fg-default);
    animation-delay: -4s;
}

.hv-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    background: #2a303b;
}

.hv-bar > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}

.hv-prompt {
    display: flex;
    align-items: center;
    margin-left: var(--space-s);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.1rem;
    line-height: 1.6rem;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.hv-prompt b {
    margin-right: 6px;
    color: var(--gs-yellow);
    font-weight: 400;
}

.hv-prompt span {
    display: inline-block;
    overflow: hidden;
    width: 22ch;
    animation: hv-type 8s steps(22) infinite;
}

.hv-prompt::after {
    content: '';
    width: 6px;
    height: 12px;
    margin-left: 2px;
    background: var(--gs-yellow);
    animation: hv-blink 1s steps(1) infinite;
}

.hv-ui {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.hv-ui > * {
    animation: hv-build 8s ease-out infinite;
}

.hv-ui > :nth-child(2) { animation-delay: 0.15s; }
.hv-ui > :nth-child(3) { animation-delay: 0.3s; }
.hv-ui > :nth-child(4) { animation-delay: 0.45s; }
.hv-ui > :nth-child(5) { animation-delay: 0.6s; }

.hv-title {
    width: 45%;
    height: 10px;
    border-radius: 3px;
    background: #282f33;
}

.hv-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.hv-tiles i {
    height: 34px;
    border-radius: 4px;
    background: #e7f5fd;
    border: 1px solid #93d0f6;
}

.hv-tiles i:nth-child(2) {
    background: #fff5e6;
    border-color: #ffd58f;
}

.hv-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 18px;
}

.hv-row::before {
    content: '';
    flex: 1;
    height: 7px;
    border-radius: 3px;
    background: #dadee2;
}

.hv-row i {
    width: 42px;
    height: 14px;
    border-radius: 999px;
    background: #e9fbf2;
    border: 1px solid #9fefc6;
}

.hv-row--warn i {
    background: #fff5e6;
    border-color: #ffd58f;
}

.hv-button {
    justify-self: end;
    width: 84px;
    height: 22px;
    border-radius: 4px;
    background: #0f74b3;
}

@keyframes hv-float {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(0, -10px, 0); }
}

@keyframes hv-wave {
    from { transform: scaleY(0.25); }
    to { transform: scaleY(1); }
}

@keyframes hv-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.6); }
    100% { box-shadow: 0 0 0 8px rgba(255, 107, 107, 0); }
}

@keyframes hv-mark {
    0%, 10% { background-size: 0% 40%; }
    25%, 90% { background-size: 100% 40%; }
    100% { background-size: 0% 40%; }
}

@keyframes hv-type {
    0%, 8% { width: 0; }
    30%, 92% { width: 22ch; }
    100% { width: 0; }
}

@keyframes hv-blink {
    50% { opacity: 0; }
}

@keyframes hv-build {
    0%, 32% { opacity: 0; transform: translate3d(0, 6px, 0); }
    40%, 92% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero__visual,
    .hv-card,
    .hv-live,
    .hv-wave i,
    .hv-quote mark,
    .hv-prompt span,
    .hv-prompt::after,
    .hv-ui > * {
        animation: none;
    }

    .hero__visual {
        translate: none;
    }

    .hv-quote mark {
        background-size: 100% 40%;
    }

    .hv-route circle {
        display: none;
    }
}
