/* ==========================================================================
   Alex Camp — 2027
   Patterns borrowed from skyconcepts.co, flipped to white + black with a blue accent.
   ========================================================================== */

:root {
    --blue: #084FC9;
    --blue-ink: #04307E;
    --ink: #0A0A0A;
    --paper: #FFFFFF;
    --surface: #F3F4F6;
    --text: #0A0A0A;
    --text-2: rgba(10, 10, 10, .66);
    --text-3: rgba(10, 10, 10, .48);
    --line: rgba(10, 10, 10, .12);
    --line-2: rgba(10, 10, 10, .24);

    /* used inside dark / blue surfaces */
    --on-dark: #FFFFFF;
    --on-dark-2: rgba(255, 255, 255, .72);
    --on-dark-3: rgba(255, 255, 255, .5);
    --line-dark: rgba(255, 255, 255, .16);
    --line-dark-2: rgba(255, 255, 255, .3);

    --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --serif: 'Instrument Serif', ui-serif, Georgia, serif;
    --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --gutter: clamp(16px, 4vw, 56px);
    --max: 1320px;
    --radius: 32px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

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

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

::selection { background: var(--blue); color: var(--paper); }

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
    border-radius: 6px;
}

.on-dark :focus-visible { outline-color: var(--on-dark); }

em {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -1px;
}

.skip {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 60;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-size: 14px;
}
.skip:focus { top: 16px; }

.eyebrow {
    margin: 0;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.count { color: var(--text-3); }

.dot {
    position: relative;
    flex: none;
    width: 9px;
    height: 9px;
    color: var(--blue);
}

/* a tiny 2x2 grid that assembles one block at a time, holds, then resets.
   The static (reduced-motion) state is the finished grid. */
.dot::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 4px;
    border-radius: 1px;
    background: currentColor;
    box-shadow: 5px 0 0 currentColor, 0 5px 0 currentColor, 5px 5px 0 currentColor;
    animation: build 3.2s steps(1, end) infinite;
}

@keyframes build {
    0%   { box-shadow: 5px 0 0 transparent,  0 5px 0 transparent,  5px 5px 0 transparent; }
    18%  { box-shadow: 5px 0 0 currentColor, 0 5px 0 transparent,  5px 5px 0 transparent; }
    34%  { box-shadow: 5px 0 0 currentColor, 5px 5px 0 currentColor, 5px 5px 0 transparent; }
    50%  { box-shadow: 5px 0 0 currentColor, 5px 5px 0 currentColor, 0 5px 0 currentColor; }
    88%  { box-shadow: 5px 0 0 transparent,  5px 5px 0 transparent,  0 5px 0 transparent; }
    100% { box-shadow: 5px 0 0 transparent,  5px 5px 0 transparent,  0 5px 0 transparent; }
}

.text-link {
    color: var(--text);
    border-bottom: 1px solid var(--line-2);
    padding-bottom: 1px;
    transition: color .3s var(--ease), border-color .3s var(--ease);
}
.text-link:hover { color: var(--blue); border-color: var(--blue); }


/* ---------- Nav: logo + links as separate pills that frost on scroll ---------- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px calc(var(--gutter) - 12px);
    pointer-events: none;
}

.nav-logo,
.nav-links {
    pointer-events: auto;
    display: flex;
    align-items: center;
    height: 50px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background-color .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
}

.nav-logo {
    gap: 10px;
    padding: 0 18px 0 10px;
    font-weight: 500;
    font-size: 17px;
    letter-spacing: -.03em;
}

.nav-logo img {
    width: 30px;
    height: 30px;
    transition: transform .6s var(--ease);
}
.nav-logo:hover img { transform: rotate(-20deg); }

.nav-links {
    gap: 2px;
    padding: 0 6px;
}

.nav.is-scrolled .nav-logo,
.nav.is-scrolled .nav-links {
    background-color: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border-color: var(--line);
    box-shadow: 0 10px 30px -14px rgba(10, 10, 10, .25);
}

.nav-links a {
    font-size: 14px;
    padding: 8px 14px;
    line-height: 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.nav-links a span {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-3);
}

.nav-links a:hover { border-color: var(--line-2); }
.nav-links a[aria-current] { border-color: var(--line-2); }

.nav-links .nav-cta {
    background: var(--blue);
    color: var(--paper);
    font-weight: 500;
    margin-left: 4px;
}
.nav-links .nav-cta:hover { background: var(--blue-ink); border-color: transparent; }


/* ---------- Hero (home) ---------- */

.hero {
    --mx: 0;
    --my: 0;
    position: relative;
    overflow-x: clip; /* keeps the oversized stamp from causing sideways scroll */
    min-height: 100svh;
    max-width: var(--max);
    margin: 0 auto;
    padding: 140px var(--gutter) 120px;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
}

.hero-title,
.page-title {
    margin: 28px 0;
    font-weight: 500;
    font-size: clamp(52px, 7.6vw, 124px);
    line-height: .9;
    letter-spacing: -.055em;
}

.hero-title .line,
.page-title .line {
    display: block;
    padding-bottom: .06em;
}

.hero-title em,
.page-title em {
    font-size: 1.06em;
    letter-spacing: -1px;
    color: var(--blue);
}

.hero-title .line,
.hero-sub,
.hero .eyebrow,
.page-title,
.page-lede,
.page-hero .eyebrow {
    animation: rise 1s var(--ease) both;
}
.hero-title .line:nth-child(1) { animation-delay: .08s; }
.hero-title .line:nth-child(2) { animation-delay: .18s; }
.hero-sub, .page-lede { animation-delay: .32s; }
.page-title { animation-delay: .1s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: none; }
}

.hero-sub,
.page-lede {
    margin: 0;
    max-width: 500px;
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.45;
    color: var(--text-2);
}

/* three project shots floating in a loose constellation */
.hero-shots {
    position: relative;
    isolation: isolate; /* keeps the stamp's negative z-index behind the shots, not the page */
    height: min(560px, 62vh);
}

.float-shot {
    position: absolute;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 22px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 40px 80px -28px rgba(10, 10, 10, .45), 0 0 0 1px var(--line);
    transform:
        translate(calc(var(--mx) * var(--depth) * 1px), calc(var(--my) * var(--depth) * 1px))
        rotate(var(--rot));
    transition: transform .9s var(--ease);
    animation: pop 1.1s var(--ease) both, bob 7s ease-in-out infinite;
    animation-delay: var(--d), var(--bd);
}

.float-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fs-1 { --rot: -6deg; --depth: 30; --d: .25s; --bd: 0s;    width: 70%; top: 2%;  left: 0; }
.fs-2 { --rot: 5deg;  --depth: 56; --d: .4s;  --bd: -2.3s; width: 62%; top: 34%; right: -4%; }
.fs-3 { --rot: -3deg; --depth: 20; --d: .55s; --bd: -4.6s; width: 54%; bottom: 0; left: 10%; }

/* the old badge logo as a blue ink postmark, tilted over the corner of a shot */
.float-stamp {
    --rot: -14deg; --depth: 14; --d: .85s; --bd: -3.4s;
    position: absolute;
    right: -10%;
    bottom: -12%;
    z-index: -1;
    width: 52%;
    opacity: .14;
    height: auto;
    transform:
        translate(calc(var(--mx) * var(--depth) * 1px), calc(var(--my) * var(--depth) * 1px))
        rotate(var(--rot));
    transition: transform .9s var(--ease);
    animation: pop-faint 1.1s var(--ease) both, bob 7s ease-in-out infinite;
    animation-delay: var(--d), var(--bd);
}

/* portrait: a circle in the open top-right corner, floating with the shots */
.float-portrait {
    --rot: 0deg; --depth: 44; --d: .7s; --bd: -1.2s;
    position: absolute;
    top: -8%;
    right: 2%;
    z-index: 2;
    width: 36%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--paper);
    box-shadow: 0 30px 60px -24px rgba(10, 10, 10, .45), 0 0 0 1px var(--line);
    transform: translate(calc(var(--mx) * var(--depth) * 1px), calc(var(--my) * var(--depth) * 1px));
    transition: transform .9s var(--ease);
    animation: pop 1.1s var(--ease) both, bob 7s ease-in-out infinite;
    animation-delay: var(--d), var(--bd);
}

@keyframes bob {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -12px; }
}

/* the stamp fades in to its faint resting opacity, not to full */
@keyframes pop-faint {
    from { opacity: 0; scale: .85; }
    to   { opacity: .14; scale: 1; }
}

@keyframes pop {
    from { opacity: 0; scale: .85; }
    to   { opacity: 1; scale: 1; }
}

.scroll-cue {
    position: absolute;
    left: var(--gutter);
    bottom: 36px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-3);
    transition: opacity .25s linear;
}

.scroll-cue i {
    position: relative;
    width: 56px;
    height: 1px;
    background: var(--line-2);
    overflow: hidden;
}

.scroll-cue i::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--blue);
    transform: translateX(-100%);
    animation: sweep 2.2s var(--ease) infinite;
}

@keyframes sweep { to { transform: translateX(100%); } }


/* ---------- Facts row (hairline columns) ---------- */

.facts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
}

.facts li {
    padding: 20px 20px 0 0;
    font-size: clamp(17px, 1.6vw, 22px);
    line-height: 1.25;
    letter-spacing: -.02em;
}

.facts li + li {
    padding-left: 20px;
    border-left: 1px solid var(--line);
}

.facts span {
    display: block;
    margin-bottom: 6px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-3);
}


/* ---------- Sections ---------- */

.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14vh var(--gutter) 0;
    scroll-margin-top: 40px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding-bottom: 28px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--line);
}

.section-title {
    margin: 0;
    max-width: 16ch;
    font-weight: 500;
    font-size: clamp(32px, 4.2vw, 60px);
    line-height: .98;
    letter-spacing: -.045em;
    text-align: right;
}


/* ---------- Work: sticky stacking cards ---------- */

.stack {
    display: flex;
    flex-direction: column;
    gap: 14vh;
}

/* spacer after the last card: same length as a card, so it pins and recedes like the others before the stack scrolls away */
.stack::after {
    content: "";
    flex: none;
    height: min(720px, calc(100svh - 150px));
}

/* light cards: a hairline + soft top shadow separates each card as the next slides over */
.card {
    --recede: 0;
    position: sticky;
    top: calc(96px + var(--i) * 18px);
    height: min(720px, calc(100svh - 150px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
    gap: 56px;
    padding: 48px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 -20px 50px -28px rgba(10, 10, 10, .28);
    overflow: hidden;
    transform-origin: 50% 0;
    transform: scale(calc(1 - var(--recede) * .05));
    filter: brightness(calc(1 - var(--recede) * .1));
    will-change: transform;
}

.card-index {
    position: absolute;
    top: 40px;
    left: 48px;
    margin: 0;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--text-3);
}

.card-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.card-co {
    margin: 0 0 14px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-2);
}

.card-name {
    margin: 0;
    font-weight: 500;
    font-size: clamp(44px, 5.4vw, 80px);
    line-height: .92;
    letter-spacing: -.05em;
}

.card-tagline {
    margin: 12px 0 18px;
    letter-spacing: -1px;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.15;
}

.card-desc {
    margin: 0 0 24px;
    max-width: 440px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-2);
}

.card-metric {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    width: 100%;
    max-width: 440px;
}

.card-metric strong,
.case-metric strong {
    font-weight: 500;
    letter-spacing: -.05em;
    color: var(--blue);
}

.card-metric strong {
    font-size: clamp(36px, 3.4vw, 52px);
    line-height: 1;
}

.card-metric span {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-2);
}

/* PEAK6: two case studies laddered under one company */
.card-cases {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 440px;
    border-top: 1px solid var(--line);
}

.card-cases a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: baseline;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    transition: color .3s var(--ease);
}

.case-name {
    white-space: nowrap;
    font-weight: 500;
    font-size: 20px;
    letter-spacing: -.02em;
}

.case-metric {
    font-size: 14px;
    color: var(--text-2);
}

.case-metric strong { font-size: 24px; margin-right: 4px; }

.case-arrow {
    width: 32px;
    height: 32px;
    align-self: center;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}

.card-cases a:hover .case-name { color: var(--blue); }
.card-cases a:hover .case-arrow {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--paper);
    transform: rotate(-45deg);
}

.card-media {
    position: relative;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.card-media img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 24px 50px -30px rgba(10, 10, 10, .5);
}

.card-media--pair {
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
}

.card-media--pair a {
    min-height: 0;
    display: block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 50px -30px rgba(10, 10, 10, .5);
    transition: transform .4s var(--ease);
}

.card-media--pair a:hover { transform: translateY(-3px); }

.card-media--pair img {
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
}

/* placeholder panel for work that isn't written up yet */
.card-media--soon {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 36px;
    border-radius: 24px;
    background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%), var(--blue);
    color: var(--on-dark);
}

.soon-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--on-dark-2);
}

.soon-label .dot { color: var(--on-dark); }

.soon-title {
    font-weight: 500;
    font-size: clamp(48px, 6vw, 96px);
    line-height: .9;
    letter-spacing: -.05em;
}


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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 50px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 15px;
    font-weight: 500;
    transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); border-color: var(--ink); }

.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light:hover { background: var(--blue); color: var(--paper); border-color: var(--blue); }

.btn--blue { background: var(--blue); color: var(--paper); border-color: var(--blue); }
.btn--blue:hover { background: var(--blue-ink); border-color: var(--blue-ink); }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}


/* ---------- Builds: full-bleed blue band ---------- */

.band {
    margin-top: 14vh;
    background: var(--blue);
    color: var(--on-dark);
    scroll-margin-top: 0;
}

.band-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14vh var(--gutter);
}

.band .eyebrow { color: var(--on-dark-2); }
.band .count { color: var(--on-dark-3); }
.band .dot { color: var(--on-dark); }
.band .section-head { border-color: var(--line-dark); }

.apps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.app {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .1), transparent 55%), #0644B0;
    border: 1px solid var(--line-dark);
    overflow: hidden;
}

.app-body {
    display: flex;
    flex-direction: column;
    padding: 28px 28px 0;
}

/* full phone sits on the blue below the text; same size on every card */
.app-stage {
    position: relative;
    margin-top: auto;
    padding: 32px 0 36px;
    display: flex;
    justify-content: center;
}

.app-stage::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 80%;
    aspect-ratio: 1;
    translate: -50% -50%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%);
    filter: blur(16px);
}

.app-shot {
    position: relative;
    width: 58%;
    max-width: 260px;
    height: auto;
    filter: drop-shadow(0 20px 30px rgba(2, 20, 60, .45));
    transition: transform .5s var(--ease);
}

.app:hover .app-shot { transform: translateY(-6px); }

.app-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.app-icon {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    box-shadow: 0 12px 24px -10px rgba(2, 20, 60, .6), 0 0 0 1px rgba(255, 255, 255, .14);
}

.app h3 {
    margin: 0;
    font-weight: 500;
    font-size: 26px;
    line-height: 1;
    letter-spacing: -.035em;
}

.app-tag {
    margin: 5px 0 0;
    font-family: var(--serif);
    font-style: italic;
    font-size: 18px;
    line-height: 1.15;
    letter-spacing: -.01em; /* lighter than the headline italics so small text doesn't run together */
    color: var(--on-dark-2);
}

.app-desc {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--on-dark-2);
}

/* links pinned to the bottom so they line up across cards */
.app-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.app-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line-dark-2);
    font-size: 13px;
    color: var(--on-dark);
    transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}

.app-link:hover {
    background: var(--on-dark);
    border-color: var(--on-dark);
    color: var(--blue);
}

.band-note {
    margin: 32px 0 0;
    font-size: 15px;
    color: var(--on-dark-2);
}
.band-note a {
    color: var(--on-dark);
    border-bottom: 1px solid var(--line-dark-2);
}
.band-note a:hover { border-color: var(--on-dark); }


/* ---------- Rows (career, case-study sections) ---------- */

.rows { border-top: 1px solid var(--line); }
.section-head + .rows { border-top: 0; margin-top: -40px; }

.row {
    display: grid;
    grid-template-columns: minmax(0, 160px) minmax(0, 300px) minmax(0, 1fr);
    gap: 32px;
    align-items: baseline;
    padding: 30px 0;
    border-bottom: 1px solid var(--line);
}

.row-meta {
    margin: 0;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.row h3 {
    margin: 0;
    font-weight: 500;
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.05;
    letter-spacing: -.03em;
}

.row h3 a { transition: color .3s var(--ease); }
.row h3 a:hover { color: var(--blue); }

.row h3 small {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text-3);
}

.rows-foot {
    display: flex;
    gap: 16px;
    margin: 20px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-3);
}

.rows-foot span {
    flex: none;
    padding-top: 2px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.row p {
    margin: 0;
    max-width: 62ch;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-2);
}


/* ---------- About + contact ---------- */

.about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
}

.about-lede {
    margin: 0;
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.2;
    letter-spacing: -.03em;
}

.about-body p {
    margin: 0 0 16px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-2);
}

.cta {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14vh var(--gutter) 14vh;
    scroll-margin-top: 40px;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: clamp(16px, 2.4vw, 32px);
    margin: 18px 0 24px;
}

.cta-title {
    font-weight: 500;
    font-size: clamp(48px, 7.4vw, 112px);
    line-height: .95;
    letter-spacing: -.05em;
}

.cta-title em { color: var(--blue); }

.cta-arrow {
    flex: none;
    width: clamp(52px, 5.4vw, 76px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .4s var(--ease), color .4s var(--ease), transform .4s var(--ease), border-color .4s var(--ease);
}

.cta-arrow svg { width: 40%; height: 40%; }

.cta-link:hover .cta-arrow {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--paper);
    transform: rotate(-45deg);
}

.cta-sub {
    margin: 0 0 28px;
    max-width: 52ch;
    font-size: 16px;
    color: var(--text-2);
}


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

html { scrollbar-gutter: stable; }
html:has(.contact-modal[open]) { overflow: hidden; }

.contact-modal {
    position: fixed;
    inset: 0;
    width: min(500px, calc(100vw - 16px));
    max-width: none;
    max-height: calc(100svh - 32px);
    margin: auto 0 auto auto; /* flush to the right edge, vertically centered */
    padding: 0;
    border: 0;
    border-radius: var(--radius) 0 0 var(--radius);
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 40px 90px -30px rgba(10, 10, 10, .45), 0 0 0 1px var(--line);
    overflow: hidden;
}

.contact-modal[open] { animation: drawer-in .55s var(--ease) both; }
.contact-modal.is-closing { animation: drawer-out .35s var(--ease) both; }

.contact-modal::backdrop {
    background: rgba(255, 255, 255, .4);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    backdrop-filter: blur(8px) saturate(120%);
    animation: scrim-in .4s var(--ease) both;
}
.contact-modal.is-closing::backdrop { animation: scrim-out .35s var(--ease) both; }

@keyframes drawer-in  { from { transform: translateX(100%); } to { transform: none; } }
@keyframes drawer-out { from { transform: none; } to { transform: translateX(100%); } }
@keyframes scrim-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrim-out  { from { opacity: 1; } to { opacity: 0; } }

.contact-modal-inner {
    position: relative;
    padding: 48px 48px 52px;
}
.contact-modal-inner:focus { outline: none; } /* takes initial focus so the close button doesn't show a ring on open */

.contact-modal-title {
    margin: 32px 0 16px;
    font-weight: 500;
    font-size: clamp(56px, 6vw, 80px);
    line-height: .95;
    letter-spacing: -.05em;
}

.contact-modal-title em { color: var(--blue); }

.contact-modal-sub {
    margin: 0 0 32px;
    font-size: 17px;
    line-height: 1.5;
    color: var(--text-2);
}

.contact-modal-close {
    position: absolute;
    top: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    background: transparent;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}

.contact-modal-close svg { width: 16px; height: 16px; }

.contact-modal-close:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
    transform: rotate(90deg);
}

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

.footer {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    overflow: hidden;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--text-2);
}

.footer-row p { margin: 0; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.footer-links a { transition: color .3s var(--ease); }
.footer-links a:hover { color: var(--blue); }

.footer-links { align-items: center; }

.footer-note {
    display: inline-flex;
    opacity: .7;
}
.footer-note svg { width: 14px; height: 14px; }
.footer-note:hover { opacity: 1; }

/* oversized wordmark, cropped by the bottom of the page */
.footer-mark {
    display: block;
    margin: 2vw 0 -4.6vw;
    font-weight: 500;
    font-size: 20.5vw;
    line-height: .9;
    letter-spacing: -.07em;
    white-space: nowrap;
    color: var(--ink);
    user-select: none;
}

@media (min-width: 1320px) {
    .footer-mark { font-size: 270px; margin-bottom: -60px; }
}

/* chrome sheen: JS drives --sx/--sa/--sw/--sheen; pure CSS paint, no canvas/WebGL */
@supports (background-clip: text) and (color: color-mix(in srgb, red 50%, blue)) {
    .footer-mark {
        --sx: 50%;
        --sa: 100deg;
        --sw: 1;
        --sheen: 0;
        --k: calc(var(--sheen) * 100%);
        background: linear-gradient(var(--sa),
            var(--ink) calc(var(--sx) - 20% * var(--sw)),
            color-mix(in srgb, #363D4A var(--k), var(--ink)) calc(var(--sx) - 12% * var(--sw)),
            color-mix(in srgb, #6884C4 var(--k), var(--ink)) calc(var(--sx) - 5% * var(--sw)),
            color-mix(in srgb, #C4CBD5 var(--k), var(--ink)) var(--sx),
            color-mix(in srgb, #8C949F var(--k), var(--ink)) calc(var(--sx) + 5% * var(--sw)),
            var(--ink) calc(var(--sx) + 12% * var(--sw)),
            color-mix(in srgb, #4E5560 var(--k), var(--ink)) calc(var(--sx) + 17% * var(--sw)),
            var(--ink) calc(var(--sx) + 25% * var(--sw)));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}


/* ==========================================================================
   Case study pages
   ========================================================================== */

.page-hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: 170px var(--gutter) 56px;
}

.page-title { max-width: 13ch; }
.page-title--wide { max-width: none; }

.page-lede { max-width: 56ch; margin-bottom: 56px; }

.case-cover {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.media {
    margin: 0;
}

.media img,
.media video {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--line);
}

.media figcaption {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-2);
}

.media figcaption strong {
    font-weight: 500;
    color: var(--blue);
}

.media + .media { margin-top: 56px; }

.prose {
    max-width: 62ch;
    margin: 0 0 0 auto;
}

.prose p {
    margin: 0 0 18px;
    font-size: clamp(18px, 1.5vw, 21px);
    line-height: 1.55;
    color: var(--text-2);
}

.prose p:first-child {
    color: var(--text);
}

/* competing constraints */
.constraints {
    list-style: none;
    margin: 40px 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    border-top: 1px solid var(--line);
}

.constraints li {
    padding: 20px 24px 0 0;
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.35;
    letter-spacing: -.015em;
}

.constraints li + li {
    padding-left: 24px;
    border-left: 1px solid var(--line);
}

.constraints span {
    display: block;
    margin-bottom: 8px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--blue);
}

.prose p.prose-label {
    margin-bottom: 8px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* tradeoff options */
.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.option {
    padding: 28px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.option-label {
    margin: 0 0 32px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-3);
}

.option h3 {
    margin: 0 0 10px;
    font-weight: 500;
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.1;
    letter-spacing: -.03em;
}

.option p:last-child {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-2);
}

.option--chosen {
    background: var(--paper);
    border: 2px solid var(--blue);
}
.option--chosen .option-label { color: var(--blue); }

/* placeholders for copy Alex still needs to supply */
.todo,
.option--todo {
    border: 1.5px dashed rgba(8, 79, 201, .45);
    background: rgba(8, 79, 201, .04);
}

.todo {
    padding: 20px 24px;
    border-radius: 16px;
}

.todo-label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--blue);
}

.prose .todo p,
.todo p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-2);
}

.option--todo h3 { color: var(--blue); }

.todo-inline { color: var(--text-2); font-style: normal; }

/* numbered decisions */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.steps li { padding: 8px 32px 0 0; }

.steps li + li {
    padding-left: 32px;
    border-left: 1px solid var(--line);
}

.step-num {
    display: block;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--blue);
    margin-bottom: 48px;
}

.steps h3 {
    margin: 0 0 10px;
    font-weight: 500;
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.1;
    letter-spacing: -.03em;
}

.steps p {
    margin: 0;
    max-width: 36ch;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-2);
}

/* impact numbers */
.metrics {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.metrics li { padding: 0 24px 0 0; }

.metrics li + li {
    padding-left: 24px;
    border-left: 1px solid var(--line);
}

.metrics strong {
    display: block;
    font-weight: 500;
    font-size: clamp(44px, 5.2vw, 80px);
    line-height: 1;
    letter-spacing: -.055em;
    color: var(--blue);
}

.metrics span {
    display: block;
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.4;
    color: var(--text-2);
}

.metrics--5 { grid-template-columns: repeat(5, 1fr); }

.note {
    margin: 40px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    max-width: 72ch;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-3);
}

.crumb {
    color: var(--text);
    border-bottom: 1px solid var(--line-2);
    transition: color .3s var(--ease), border-color .3s var(--ease);
}
.crumb:hover { color: var(--blue); border-color: var(--blue); }

.soon-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    min-height: 460px;
    padding: clamp(28px, 5vw, 64px);
    border-radius: var(--radius);
    background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%), var(--blue);
    color: var(--on-dark);
}

.soon-panel .soon-title { margin-top: auto; }

.soon-panel p {
    margin: 0;
    max-width: 46ch;
    font-size: 17px;
    line-height: 1.55;
    color: var(--on-dark-2);
}

/* ---------- PEAK6: case study tiles ---------- */

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

.case-tile {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}

.case-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -36px rgba(10, 10, 10, .4);
}

.case-tile img {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: cover;
}

.case-tile-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 28px 28px 32px;
}

.case-tile-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-3);
}

.case-tile-name {
    font-weight: 500;
    font-size: clamp(32px, 3.4vw, 48px);
    line-height: 1;
    letter-spacing: -.045em;
}

.case-tile-tag {
    font-family: var(--serif);
    font-style: italic;
    font-size: 22px;
    letter-spacing: -1px;
}

.case-tile-metric {
    margin-top: 10px;
    font-size: 15px;
    color: var(--text-2);
}

.case-tile-metric strong {
    font-weight: 500;
    font-size: 24px;
    letter-spacing: -.04em;
    color: var(--blue);
    margin-right: 4px;
}

.case-tile .cta-arrow {
    position: absolute;
    right: 28px;
    bottom: 32px;
    width: 48px;
}

.case-tile:hover .cta-arrow {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--paper);
    transform: rotate(-45deg);
}

/* ---------- Gallery: horizontal slideshow of extra designs ---------- */

.gallery {
    --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
    padding-top: 14vh;
}

.gallery-head {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.gallery-track {
    position: relative; /* so slide offsetLeft is measured from the track */
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--edge);
    padding: 4px var(--edge) 8px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline-offset: -2px; border-radius: 0; }

/* each slide is as wide as its image; the caption wraps to that width */
.slide {
    flex: none;
    display: inline-grid;
    margin: 0;
    scroll-snap-align: start;
}

.slide img {
    height: clamp(260px, 42vw, 560px);
    width: auto;
    max-width: none;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--line);
}

.slide figcaption {
    width: 0;
    min-width: 100%;
    display: flex;
    gap: 12px;
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-2);
}

.slide-num {
    flex: none;
    padding-top: 2px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--blue);
}

.gallery-controls {
    max-width: var(--max);
    margin: 24px auto 0;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gallery-count {
    margin: 0;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--text-3);
}

.gallery-current { color: var(--text); }

.gallery-btns {
    display: flex;
    gap: 10px;
}

.gallery-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    background: transparent;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), opacity .3s var(--ease);
}

.gallery-btn svg { width: 18px; height: 18px; }

.gallery-btn:hover:not(:disabled) {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--paper);
}

.gallery-btn:disabled { opacity: .3; cursor: default; }

.impact-why { margin-top: 48px; }

.next {
    border-top: 1px solid var(--line);
    margin-top: 14vh;
}


/* ---------- Scroll reveal ---------- */

.reveal {
    opacity: 0;
    translate: 0 36px;
    transition: opacity .9s var(--ease), translate .9s var(--ease);
}
.reveal.in { opacity: 1; translate: 0 0; }

.no-js .reveal { opacity: 1; translate: none; }


/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .card { padding: 40px; gap: 32px; }
    .metrics--5 { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
    .metrics--5 li:nth-child(4) { padding-left: 0; border-left: 0; }
}

@media (max-width: 900px) {
    .nav-links a { padding: 8px 10px; }
    .nav-links a span { display: none; }

    .hero {
        grid-template-columns: 1fr;
        padding-top: 120px;
        padding-bottom: 100px;
        gap: 24px;
    }
    .hero-shots { height: 320px; max-width: 520px; width: 100%; }

    .section-head { flex-direction: column; align-items: flex-start; }
    .section-title { text-align: left; }

    .stack { gap: 16px; }
    .stack::after { display: none; }
    .card {
        position: relative;
        top: auto;
        height: auto;
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px 24px 24px;
        transform: none;
        filter: none;
    }
    .card-index { position: static; margin-bottom: -8px; }
    .card { grid-template-rows: none; }
    .card-media--pair { grid-template-rows: none; }
    .card-media--pair img { height: auto; }
    .card-media--soon { min-height: 280px; padding: 28px; }

    .facts { grid-template-columns: repeat(2, 1fr); }
    .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
    .facts li:nth-child(n+3) { padding-top: 20px; }

    .apps { grid-template-columns: 1fr; max-width: 520px; }
    .case-tiles { grid-template-columns: 1fr; }

    .row { grid-template-columns: 1fr; gap: 10px; }

    .about { grid-template-columns: 1fr; gap: 24px; }

    .page-hero { padding-top: 130px; }
    .prose { margin-left: 0; }

    .steps { grid-template-columns: 1fr; }
    .constraints { grid-template-columns: 1fr 1fr; }
    .constraints li, .constraints li + li { padding: 16px 16px 16px 0; border-left: 0; border-bottom: 1px solid var(--line); }
    .steps li, .steps li + li { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--line); }
    .steps li:first-child { padding-top: 0; }
    .step-num { margin-bottom: 16px; }

    .metrics, .metrics--5 { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
    .metrics li:nth-child(odd) { padding-left: 0; border-left: 0; }
    .metrics li:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }

    .media img, .media video { border-radius: 20px; }
}

@media (max-width: 560px) {
    .nav-logo { padding: 0 14px; height: 44px; font-size: 16px; }
    .nav-links { height: 44px; padding: 0 4px; gap: 0; }
    .nav-links a { font-size: 13px; padding: 6px 9px; }
    .nav-links .hide-sm { display: none; }
    .hero-title, .page-title { font-size: clamp(46px, 14vw, 80px); }
    .hero-shots { height: 250px; }
    .fs-2 { right: 0; }
    .float-stamp { right: 0; bottom: -4%; width: 44%; }
    .slide img { width: 82vw; height: auto; max-height: 70vh; object-fit: contain; }
    .gallery-track { gap: 14px; }
    .card-cases a { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
    .case-metric { grid-row: 2; }
    .case-arrow { grid-column: 2; grid-row: 1 / span 2; }
    .footer-row { flex-direction: column; align-items: flex-start; }
    .metrics strong { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    html { scroll-behavior: auto; }
}
