/* ==========================================================================
   Home page. Shared tokens, header, buttons and footer live in site.css.
   Two themes (dark by default, light on request) come from those tokens, so
   nothing here names a colour directly except the brand gradient's light.
   Order: intro, hero, ethos, studio, capabilities, work, process, why, contact.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Intro: particles gather into the wordmark, which flies into the header logo.
   The pre-paint script in <head> sets html.intro-on; intro.js adds, in order,
   intro-nav (header fades in), intro-ready (hero rises), intro-landed (the
   header's own wordmark appears) and intro-done. Every gated element also has a
   timed fallback, so a script failure can never leave the page hidden.
   -------------------------------------------------------------------------- */

.intro {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--bg);
}

html.intro-on .intro {
    display: block;
    animation: intro-failsafe 0.01s linear 9s forwards;
}

.intro.is-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s var(--ease-out) 0.15s;
}

html.intro-on:not(.intro-done) body {
    overflow: hidden;
    animation: intro-unlock 0.01s linear 9s forwards;
}

.intro-canvas,
.intro-mark {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100lvh;
}

.intro-mark {
    --ease-io: cubic-bezier(0.76, 0, 0.18, 1);
    display: none;
    z-index: 110;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

html.intro-on .intro-mark {
    display: block;
    animation: intro-failsafe 0.01s linear 9s forwards;
}

.intro-mark.is-flying {
    transition: transform 1.15s var(--ease-io), opacity 0.3s linear;
}

.intro-skip {
    position: absolute;
    top: 22px;
    right: max(22px, var(--safe-r));
    min-height: 44px;
    padding: 0 12px;
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.2s var(--ease);
}

.intro-skip:hover {
    color: var(--ink);
}

@keyframes intro-failsafe {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

@keyframes intro-unlock {
    to {
        overflow: visible;
    }
}

@keyframes intro-reveal {
    to {
        opacity: 1;
    }
}

/* The header waits for the intro, then the wordmark lands in it */
html.intro-on:not(.intro-nav) .topnav {
    opacity: 0;
    animation: intro-reveal 0.01s linear 9s forwards;
}

html.intro-on:not(.intro-landed) .topnav .nav-brand .wordmark {
    opacity: 0;
    animation: intro-reveal 0.01s linear 9s forwards;
}

.topnav .nav-brand .wordmark {
    transition: opacity 0.25s linear;
}

/* --------------------------------------------------------------------------
   The particle world (particle-world.js): one fixed layer of light behind the
   page. Content sits above it; sections leave their backgrounds clear.
   -------------------------------------------------------------------------- */

.world {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    height: 100lvh;
    pointer-events: none;
}

#main,
.site-footer {
    position: relative;
    z-index: 1;
}

.top-anchor {
    position: absolute;
    top: 0;
    left: 0;
}

/* --------------------------------------------------------------------------
   Hero: the galaxy of light on the right, one line of type on the left
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--nav-h) + clamp(40px, 8vh, 96px)) 0 0;
    overflow: hidden;
    background:
        radial-gradient(60% 50% at 80% 8%, rgba(var(--field-hot), calc(0.1 * var(--field-boost))), transparent 70%),
        radial-gradient(50% 40% at 6% 96%, rgba(123, 108, 255, calc(0.08 * var(--field-boost))), transparent 70%);
}

.hero-inner {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-bottom: clamp(24px, 4vh, 48px);
}

.hero-title {
    margin: 26px 0 30px;
    max-width: 22ch;
    font-size: clamp(40px, 6vw, 88px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

/* Each line rises out of its own slot */
.mask {
    display: block;
    overflow: hidden;
    padding-bottom: 0.12em;
    margin-bottom: -0.12em;
}

.hero-title .line {
    display: block;
}

.shimmer {
    padding-bottom: 0.1em;
    background: linear-gradient(100deg, var(--ink-3) 20%, var(--ink) 45%, var(--ink-3) 70%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: normal;
    animation: shimmer 7s ease-in-out 2.5s infinite;
}

@keyframes shimmer {
    0%,
    100% {
        background-position: 100% 0;
    }
    50% {
        background-position: 0 0;
    }
}

.hero-lede {
    max-width: 52ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 32px;
    margin-top: 40px;
}

.hero-cta {
    min-height: 52px;
    padding: 0 26px;
    font-size: 15px;
    font-weight: 700;
}

/* Entrance: each piece rises in, in reading order (held back while the intro plays) */
.hero-in {
    animation: hero-rise 1.2s var(--ease-out) both;
    animation-delay: calc(0.12s + var(--i, 0) * 0.09s);
}

.line-in {
    animation: mask-up 1.2s var(--ease-out) both;
    animation-delay: calc(0.05s + (var(--i, 1) - 1) * 0.13s);
}

html.intro-on:not(.intro-ready) .hero-in,
html.intro-on:not(.intro-ready) .line-in {
    animation: intro-reveal 0.01s linear 9s forwards;
    opacity: 0;
}

@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
}

@keyframes mask-up {
    from {
        transform: translateY(108%);
    }
}

/* A slow ribbon of what we build, along the foot of the hero */
.hero-strip {
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.strip-track {
    display: flex;
    width: max-content;
    animation: strip 64s linear infinite;
}

.hero-strip:hover .strip-track {
    animation-play-state: paused;
}

.strip-track span {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    padding: 22px 28px 22px 0;
    color: var(--ink-3);
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.strip-track span::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cyan-ink);
    opacity: 0.7;
}

@keyframes strip {
    to {
        transform: translateX(-50%);
    }
}

/* --------------------------------------------------------------------------
   Ethos
   -------------------------------------------------------------------------- */

.manifesto {
    max-width: 26ch;
    margin: 28px 0 clamp(56px, 8vw, 112px);
    color: var(--ink);
    font-size: clamp(28px, 3.6vw, 48px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.15;
    text-wrap: balance;
}

.manifesto em {
    font-style: normal;
    background: var(--grad-bright);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 0.08em;
}

.manifesto .soft {
    color: var(--ink-3);
}

/* Read in light: each word starts faint and brightens as the line scrolls through the screen (home.js) */
.manifesto.is-reading .mw {
    opacity: 0.16;
    transition: opacity 0.5s var(--ease);
}

.manifesto.is-reading .mw.is-lit {
    opacity: 1;
}

.principles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 64px);
    counter-reset: none;
}

.principles li {
    position: relative;
    padding-top: 26px;
    border-top: 1px solid var(--line-strong);
}

/* The rule above each principle fills with the accent as it arrives */
.principles li::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    width: 100%;
    height: 1px;
    background: var(--grad-bright);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.4s var(--ease-out) 0.25s;
}

.principles li.is-in::before {
    transform: scaleX(1);
}

.p-num {
    display: block;
    margin-bottom: 18px;
    color: var(--cyan-ink);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
}

.principles h3 {
    margin-bottom: 12px;
    color: var(--ink);
    font-size: clamp(19px, 1.6vw, 24px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.principles p {
    color: var(--ink-2);
    font-size: 16px;
    line-height: 1.65;
}

/* Ethos layout: the manifesto on the left, a drafting-table canvas on the right */
.ethos-top {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(32px, 5vw, 96px);
    align-items: center;
    margin-bottom: clamp(56px, 8vw, 112px);
}

.ethos-top .manifesto {
    margin-bottom: 0;
}

.blank-canvas {
    --cx: 50%;
    --cy: 50%;
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 5 / 4;
    overflow: hidden;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-md);
    background: color-mix(in srgb, var(--surface) 55%, transparent);
    color: var(--cyan-ink);
    cursor: crosshair;
}

.bc-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 12.5% 12.5%;
    -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000 30%, transparent 100%);
    mask-image: radial-gradient(80% 80% at 50% 50%, #000 30%, transparent 100%);
}

.bc-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 0 solid var(--ink-3);
}

.bc-corner.tl { left: 10px; top: 10px; border-left-width: 1px; border-top-width: 1px; }
.bc-corner.tr { right: 10px; top: 10px; border-right-width: 1px; border-top-width: 1px; }
.bc-corner.bl { left: 10px; bottom: 10px; border-left-width: 1px; border-bottom-width: 1px; }
.bc-corner.br { right: 10px; bottom: 10px; border-right-width: 1px; border-bottom-width: 1px; }

.bc-label {
    position: absolute;
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

.bc-label.tl { left: 32px; top: 12px; }
.bc-label.tr { right: 32px; top: 12px; }
.bc-label.bl { left: 32px; bottom: 12px; }
.bc-label.br { right: 32px; bottom: 12px; color: var(--cyan-ink); }

.bc-axis {
    position: absolute;
    background: var(--cyan-ink);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    pointer-events: none;
}

.bc-x { left: 0; right: 0; top: var(--cy); height: 1px; }
.bc-y { top: 0; bottom: 0; left: var(--cx); width: 1px; }

.bc-dot {
    position: absolute;
    left: var(--cx);
    top: var(--cy);
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    border-radius: 50%;
    background: var(--cyan-ink);
    box-shadow: 0 0 0 5px rgba(var(--field-hot), 0.18), 0 0 18px rgba(var(--field-hot), 0.55);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    pointer-events: none;
}

.blank-canvas.is-live .bc-axis { opacity: 0.35; }
.blank-canvas.is-live .bc-dot { opacity: 1; }

/* The sketch draws itself, line by line, when the figure arrives */
.bc-sketch {
    position: absolute;
    inset: 8% 6%;
    width: 88%;
    height: 84%;
    color: var(--ink-2);
    opacity: 0.85;
}

.bc-sketch > * {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

.blank-canvas.is-in .bc-sketch > * {
    animation: bc-draw 1.6s var(--ease-out) forwards;
    animation-delay: calc(0.4s + var(--n, 0) * 0.35s);
}

.bc-sketch > :nth-child(2) { --n: 1; }
.bc-sketch > :nth-child(3) { --n: 2; }
.bc-sketch > :nth-child(4) { --n: 3; }
.bc-sketch > :nth-child(5) { --n: 4; }
.bc-sketch > :nth-child(6) { --n: 5; }

@keyframes bc-draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Without JS the sketch is simply drawn (with reduced motion the animation is instant) */
html:not(.js) .bc-sketch > * {
    stroke-dashoffset: 0;
}

/* Hovering one principle or reason steps the others back, as the services list does */
@media (hover: hover) {
    .principles:hover li:not(:hover) > *,
    .reasons:hover article:not(:hover) > * {
        opacity: 0.45;
    }
}

.principles li > *,
.reasons article > * {
    transition: opacity 0.35s var(--ease);
}

/* --------------------------------------------------------------------------
   Studio figures
   -------------------------------------------------------------------------- */

.studio-copy {
    display: grid;
    gap: 18px;
}

.figures {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line-strong);
}

.figures > div {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 14px;
    padding: 32px 24px 8px 0;
}

.figures > div + div {
    padding-left: 24px;
    border-left: 1px solid var(--line);
}

.figures dt {
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.figures dd {
    transition: color 0.4s var(--ease);
    color: var(--ink);
    font-family: var(--font-head);
    font-size: clamp(40px, 4.8vw, 72px);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    line-height: 0.95;
}

.figures > div:hover dd {
    color: var(--cyan-ink);
}

.figures dd small {
    margin-left: 0;
    color: inherit;
    font-size: 1em;
    font-weight: inherit;
    letter-spacing: inherit;
    vertical-align: baseline;
}

.figures .figure-word {
    font-size: clamp(30px, 3vw, 46px);
    letter-spacing: -0.035em;
    line-height: 1.02;
}


/* --------------------------------------------------------------------------
   Capabilities: an index. Hover one row and the rest step back.
   -------------------------------------------------------------------------- */

.cap-list {
    border-top: 1px solid var(--line-strong);
}

.cap {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr) 44px;
    gap: 0 clamp(20px, 3.5vw, 56px);
    align-items: start;
    padding: clamp(28px, 3.2vw, 44px) 8px;
    border-bottom: 1px solid var(--line);
    outline-offset: -2px;
}

/* Padding and tint ease on hover; the reveal's own opacity and rise are kept alongside */
.js .cap[data-reveal] {
    transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out), padding 0.5s var(--ease-out),
        background 0.4s var(--ease);
}

.cap > * {
    transition: opacity 0.35s var(--ease);
}

.cap:hover,
.cap:focus-visible {
    padding-left: clamp(16px, 2vw, 28px);
    background: linear-gradient(90deg, rgba(var(--field-hot), calc(0.09 * var(--field-boost))), transparent 70%);
}

@media (hover: hover) {
    .cap-list:hover .cap:not(:hover) > * {
        opacity: 0.38;
    }
}

.cap-num {
    padding-top: 10px;
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.12em;
    transition: color 0.3s var(--ease), opacity 0.35s var(--ease);
}

.cap:hover .cap-num,
.cap:focus-visible .cap-num {
    color: var(--cyan-ink);
}

.cap h3 {
    color: var(--ink);
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    text-wrap: balance;
}

.cap-body {
    padding-top: 6px;
}

.cap-body p {
    max-width: 48ch;
    color: var(--ink-2);
    font-size: 16px;
    line-height: 1.65;
}

/* The specifics fold open under the sentence; on touch and small screens they simply stay open */
.cap-more {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.5s var(--ease-out), opacity 0.4s var(--ease);
}

.cap-more .chips {
    min-height: 0;
    overflow: hidden;
    row-gap: 0;
}

.cap-more .chips li {
    margin-top: 8px;
}

.cap:hover .cap-more,
.cap:focus-visible .cap-more,
.cap:focus-within .cap-more {
    grid-template-rows: 1fr;
    opacity: 1;
}

@media (hover: none) {
    .cap-more {
        grid-template-rows: 1fr;
        opacity: 1;
    }
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chips li {
    padding: 6px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--surface);
    color: var(--ink-2);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.cap:hover .chips li {
    border-color: var(--btn-hover-line);
}

.cap h3 a {
    color: inherit;
}

.cap {
    cursor: pointer;
}

/* The arrow is a real button: tinted, so it reads as the thing to press, with a ring of light that pulses out of
   it every few seconds (staggered down the list). Hovering the row fills it and swaps the arrow. */
.cap-go {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-top: 2px;
    border: 1px solid color-mix(in srgb, var(--cyan-ink) 55%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--cyan-ink) 9%, transparent);
    color: var(--cyan-ink);
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease),
        box-shadow 0.4s var(--ease-out), transform 0.5s var(--ease-out), opacity 0.35s var(--ease);
}

.cap-go .arr {
    width: 20px;
    height: 20px;
}

.cap-go::after {
    content: '';
    position: absolute;
    inset: -1px;
    border: 1px solid var(--cyan-ink);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: cap-ping 3.8s var(--ease-out) infinite;
    animation-delay: calc(1.4s + var(--i, 0) * 0.55s);
}

@keyframes cap-ping {
    0% {
        opacity: 0.85;
        transform: scale(1);
    }
    42%,
    100% {
        opacity: 0;
        transform: scale(1.75);
    }
}

.cap:hover .cap-go,
.cap-go:focus-visible {
    border-color: transparent;
    background: var(--grad);
    color: var(--on-grad);
    box-shadow: var(--shadow-accent);
    transform: scale(1.06);
}

.cap:hover .cap-go::after,
.cap-list.is-learned .cap-go::after {
    animation: none;
}

.cap-note {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 14px;
    margin-top: 40px;
    color: var(--ink-3);
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   Work: a window into the gallery
   -------------------------------------------------------------------------- */

.work {
    background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--surface-2) 55%, transparent) 100%);
}

.work-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(40px, 6vw, 104px);
    align-items: center;
}

.work-copy .h-section {
    margin: 22px 0 26px;
}

.work-copy .body {
    max-width: 48ch;
}

.work-copy .chips {
    margin: 28px 0 36px;
}

.work-window {
    --rx: 0deg;
    --ry: 0deg;
    --gx: 50%;
    --gy: 0%;
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--r-lg);
    background: var(--surface-3);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 50px 90px -50px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line);
    transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform 0.9s var(--ease-out), box-shadow 0.6s var(--ease-out);
}

/* A sheen that follows the pointer across the glass */
.work-window::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 50% at var(--gx) var(--gy), rgba(255, 255, 255, 0.28), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s var(--ease);
    pointer-events: none;
}

.work-window:hover::after {
    opacity: 1;
}

.work-window img {
    width: 100%;
    height: auto;
    aspect-ratio: 1600 / 1202;
    object-fit: cover;
    transition: transform 1.6s var(--ease-out);
}

.work-window:hover img {
    transform: scale(1.035);
}

/* Sits in the ceiling of the picture, clear of the guide waving in the foreground */
.work-label {
    position: absolute;
    top: 20px;
    right: 20px;
    width: min(320px, calc(100% - 40px));
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 16px;
    padding: 14px 14px 14px 20px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-2);
}

.work-label-kicker {
    color: var(--cyan-ink);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.work-label-title {
    grid-column: 1;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.work-label-go {
    grid-column: 2;
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--grad);
    color: var(--on-grad);
    box-shadow: var(--shadow-accent);
    transition: transform 0.5s var(--ease-out);
}

.work-window:hover .work-label-go {
    transform: rotate(45deg);
}

.work-window:focus-visible {
    outline-offset: 6px;
}

/* --------------------------------------------------------------------------
   Process
   -------------------------------------------------------------------------- */

.steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(24px, 3vw, 48px);
}

/* The thread that runs through the four steps */
.steps::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 27px;
    height: 1px;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--violet) 100%);
    opacity: 0.55;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 2.2s cubic-bezier(0.65, 0, 0.35, 1) 0.2s;
}

.steps.is-drawn::before {
    transform: scaleX(1);
}

.steps.is-drawn .step-num {
    animation: step-lit 1.1s var(--ease-out) backwards;
    animation-delay: calc(0.3s + var(--d, 0) * 0.55s);
}

@keyframes step-lit {
    0% {
        border-color: var(--line-strong);
        box-shadow: 0 0 0 0 rgba(var(--field-hot), 0);
    }
    35% {
        border-color: var(--cyan-ink);
        color: var(--cyan-ink);
        box-shadow: 0 0 0 8px rgba(var(--field-hot), 0.16), 0 0 26px rgba(var(--field-hot), 0.35);
    }
    100% {
        border-color: var(--line-strong);
        box-shadow: 0 0 0 0 rgba(var(--field-hot), 0);
    }
}

.step-num {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 30px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    transition: border-color 0.4s var(--ease), color 0.4s var(--ease), background 0.4s var(--ease);
}

.steps li:hover .step-num {
    border-color: transparent;
    background: var(--grad);
    color: var(--on-grad);
}

.steps h3 {
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.steps p {
    color: var(--ink-2);
    font-size: 16px;
    line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Why Habrix
   -------------------------------------------------------------------------- */

.reasons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line-strong);
}

.reasons article {
    padding: 36px clamp(20px, 3vw, 44px) 12px 0;
}

.reasons article + article {
    padding-left: clamp(20px, 3vw, 44px);
    border-left: 1px solid var(--line);
}

.reasons h3 {
    margin-bottom: 14px;
    color: var(--ink);
    font-size: clamp(19px, 1.6vw, 24px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.reasons p {
    max-width: 48ch;
    color: var(--ink-2);
    font-size: 16px;
    line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Contact: the one dark surface
   -------------------------------------------------------------------------- */

.contact {
    padding: clamp(24px, 4vw, 48px) 0 clamp(72px, 10vw, 140px);
}

.contact-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(40px, 6vw, 96px);
    padding: clamp(36px, 6vw, 88px);
    overflow: hidden;
    border-radius: 28px;
    background: var(--panel-bg);
    color: #C9D2DD;
    box-shadow: 0 0 0 1px var(--panel-line), 0 60px 120px -60px rgba(0, 0, 0, 0.8);
    isolation: isolate;
}

/* Brand light pooling in the corners of the panel */
.contact-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(48% 60% at 0% 0%, rgba(0, 191, 208, 0.22), transparent 70%),
        radial-gradient(50% 60% at 100% 100%, rgba(123, 108, 255, 0.24), transparent 70%);
}

.contact .eyebrow {
    color: #9AA8B8;
}

.contact .eyebrow .idx {
    color: var(--cyan-hi);
}

.contact .eyebrow::before {
    background: linear-gradient(to right, var(--cyan-hi), transparent);
}

.contact-title {
    margin: 26px 0 24px;
    color: #fff;
    font-size: clamp(30px, 3.8vw, 52px);
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.contact-title .accent-text {
    background: linear-gradient(135deg, #5EEAF5 0%, #A79CFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.contact-lede {
    max-width: 56ch;
    margin-bottom: 36px;
    color: #B6C1CE;
    font-size: clamp(18px, 1.4vw, 21px);
    line-height: 1.6;
}

.contact-mail {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    max-width: 100%;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: clamp(16px, 1.6vw, 21px);
    font-weight: 600;
    overflow-wrap: anywhere;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.contact-mail .material-symbols-outlined {
    flex: none;
    transition: transform 0.35s var(--ease-out);
}

.contact-mail:hover {
    border-color: var(--cyan-hi);
    color: var(--cyan-hi);
}

.contact-mail:hover .material-symbols-outlined {
    transform: translate(3px, -3px);
}

.contact-form {
    display: grid;
    gap: 20px;
    align-content: start;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact .field {
    color: #9AA8B8;
}

.contact .field-float {
    position: relative;
    display: block;
    gap: 0;
}

.contact .field-float .input {
    min-height: 56px;
    padding: 24px 16px 10px;
}

.contact .field-float .input::placeholder {
    color: transparent;
}

.contact .field-float-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8492A3;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    pointer-events: none;
    transform-origin: left center;
    transition:
        top 0.18s var(--ease-out),
        transform 0.18s var(--ease-out),
        font-size 0.18s var(--ease-out),
        color 0.18s var(--ease);
}

.contact .field-float .input:focus ~ .field-float-label,
.contact .field-float .input:not(:placeholder-shown) ~ .field-float-label {
    top: 11px;
    transform: translateY(0);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #B6C1CE;
}

.contact .field-float .input:focus ~ .field-float-label {
    color: var(--cyan-hi);
}

.contact .input {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.contact .input::placeholder {
    color: #8492A3;
}

.contact .input:hover {
    border-color: rgba(255, 255, 255, 0.28);
}

.contact .input:focus {
    border-color: var(--cyan-hi);
    box-shadow: 0 0 0 4px rgba(94, 234, 245, 0.16);
    background: rgba(255, 255, 255, 0.07);
}

.contact :focus-visible {
    outline-color: var(--cyan-hi);
}

/* The message box: a clear button sits inside it once there is something to clear, and the box glows briefly when a
   service chosen above lands in it */
.contact .area {
    position: relative;
}

.contact .area .input {
    padding-right: 52px;
}

.clear-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
    color: #C9D2DD;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.3s var(--ease-out);
}

.clear-btn svg {
    width: 14px;
    height: 14px;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: rotate(90deg);
}

.contact .field-message.is-filled .input {
    animation: field-flash 1.6s var(--ease-out);
}

@keyframes field-flash {
    0% {
        border-color: var(--cyan-hi);
        box-shadow: 0 0 0 0 rgba(94, 234, 245, 0.55);
    }
    35% {
        border-color: var(--cyan-hi);
        box-shadow: 0 0 0 7px rgba(94, 234, 245, 0.18);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(94, 234, 245, 0);
    }
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.contact-send {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-top: 6px;
}

.contact-send .g-btn {
    min-height: 52px;
    padding: 0 26px;
}

.contact .status {
    color: #B6C1CE;
}

.contact .status.is-ok {
    color: #7EE2B8;
}

.contact .status.is-error {
    color: #FF9C8F;
}


/* The headline lifts away and fades as the page scrolls past the hero (browsers with scroll-driven animations) */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: scroll()) {
        .hero-inner {
            animation: hero-away linear both;
            animation-timeline: scroll(root block);
            animation-range: 0 75vh;
        }

        @keyframes hero-away {
            to {
                opacity: 0;
                transform: translateY(-48px);
            }
        }
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .figures {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .figures > div:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

    .figures > div:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 56px;
    }

    .steps::before {
        display: none;
    }
}

@media (max-width: 860px) {
    .ethos-top {
        grid-template-columns: 1fr;
        margin-bottom: 56px;
    }

    .blank-canvas {
        justify-self: start;
        max-width: 420px;
        aspect-ratio: 16 / 11;
    }

    .hero-title {
        margin: 20px 0 22px;
        font-size: clamp(34px, 9.5vw, 52px);
    }

    .principles,
    .reasons {
        grid-template-columns: 1fr;
    }

    .reasons article,
    .reasons article + article {
        padding: 28px 0 24px;
        border-left: 0;
    }

    .reasons article + article {
        border-top: 1px solid var(--line);
    }

    .cap {
        grid-template-columns: 36px minmax(0, 1fr) 40px;
        gap: 0 14px;
    }

    .cap-body {
        grid-column: 2 / 4;
        grid-row: 2;
        padding-top: 14px;
    }

    .cap-go {
        grid-column: 3;
        grid-row: 1;
        width: 40px;
        height: 40px;
    }

    .cap-more {
        grid-template-rows: 1fr;
        opacity: 1;
    }

    .cap-num {
        padding-top: 8px;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    .work-window {
        order: -1;
    }

    .contact-panel {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }
}

@media (max-width: 560px) {
    .figures {
        grid-template-columns: 1fr 1fr;
    }

    .figures > div,
    .figures > div + div {
        padding: 24px 14px 6px 0;
    }

    .figures > div:nth-child(even) {
        padding-left: 14px;
    }

    .steps {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }

    .contact-row {
        grid-template-columns: 1fr;
    }

    .contact-panel {
        padding: 32px 22px;
        margin: 0 -6px;
    }

    .work-label {
        top: 12px;
        right: 12px;
        width: calc(100% - 24px);
        padding: 10px 10px 10px 14px;
    }

    .work-label-title {
        font-size: 16px;
    }

    .work-label-go {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .strip-track,
    .shimmer {
        animation: none;
    }

    .cap-more {
        grid-template-rows: 1fr;
        opacity: 1;
    }

    .contact .field-float-label {
        transition: none;
    }
}
