/* Luigi Meli — portfolio. Tokens in DESIGN.md */

@font-face {
    font-family: 'Archivo';
    src: url("../fonts/archivo-var.de2f1fe81758.woff2") format('woff2');
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
}

:root {
    --bg: oklch(0.975 0.004 262);
    --bg-2: oklch(0.94 0.008 262);
    --ink: oklch(0.2 0.035 262);
    --ink-2: oklch(0.42 0.03 262);
    --line: oklch(0.2 0.035 262 / 0.14);
    --cobalt: oklch(0.47 0.2 262);
    --cobalt-deep: oklch(0.38 0.18 262);
    --on-cobalt: oklch(0.975 0.004 262);
    --on-cobalt-2: oklch(0.87 0.05 262);
    --cherry: oklch(0.6 0.22 25);

    --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-quint: cubic-bezier(0.22, 1, 0.36, 1);

    --gutter: clamp(1rem, 4vw, 3.5rem);
    --section: clamp(5rem, 12vw, 10rem);

    --z-nav: 30;
    --z-menu: 40;
    --z-preview: 20;
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
    font-family: var(--font);
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    font-stretch: 100%;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; line-height: 1.05; }
p { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--cherry); outline-offset: 3px; }

.skip {
    position: fixed; left: 1rem; top: -4rem; z-index: var(--z-menu);
    background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; border-radius: 99px;
    transition: top 0.2s var(--ease-out);
}
.skip:focus { top: 1rem; }

.i { width: 1.1em; height: 1.1em; flex: none; }

.dot {
    display: inline-block;
    width: 0.2em; height: 0.2em;
    margin-left: 0.06em;
    background: var(--cherry);
    vertical-align: baseline;
}

/* ---------- Buttons & links ---------- */

.btn {
    display: inline-flex; align-items: center; gap: 0.6em;
    padding: 0.95em 1.5em;
    border-radius: 99px;
    font-weight: 600; font-size: 1rem; line-height: 1;
    text-decoration: none;
    border: 0; cursor: pointer;
    transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), scale 0.15s var(--ease-out);
}
.btn .i { transition: translate 0.3s var(--ease-out); }
.btn:hover .i { translate: 0.25em 0; }
.btn:active { scale: 0.96; }
.btn--light { background: var(--on-cobalt); color: var(--cobalt-deep); }
.btn--light:hover { background: var(--cherry); color: var(--on-cobalt); }
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ink:hover { background: var(--cobalt); }
.btn--cobalt { background: var(--cobalt); color: var(--on-cobalt); }
.btn--cobalt:hover { background: var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.link {
    display: inline-flex; align-items: center; gap: 0.45em;
    font-weight: 600; text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
    padding-bottom: 0.15em;
    transition: background-size 0.4s var(--ease-out);
}
.link:hover { background-size: 0% 2px; background-position: 100% 100%; }
.link--light { color: var(--on-cobalt); }

/* ---------- Nav ---------- */

.nav {
    position: fixed; inset: 0 0 auto; z-index: var(--z-nav);
    display: flex; align-items: center; gap: 1.5rem;
    padding: 1rem var(--gutter);
    color: var(--ink);
    transition: color 0.3s var(--ease-out), background-color 0.3s var(--ease-out), translate 0.4s var(--ease-out);
}
.nav[data-surface="cobalt"], .nav[data-surface="ink"] { color: var(--on-cobalt); }
.nav.is-scrolled[data-surface="light"] { background: oklch(0.975 0.004 262 / 0.94); }
.nav.is-scrolled[data-surface="cobalt"] { background: var(--cobalt); }
.nav.is-scrolled[data-surface="ink"] { background: var(--ink); }
.nav.is-hidden { translate: 0 -100%; }

.nav__brand {
    font-weight: 800; font-stretch: 115%; font-size: 1.15rem;
    text-decoration: none; text-transform: uppercase; letter-spacing: 0.01em;
}
.nav__status {
    display: inline-flex; align-items: center; gap: 0.5em;
    font-size: 0.875rem; font-weight: 500;
    padding: 0.35em 0.8em; border: 1px solid currentColor; border-radius: 99px;
}
.nav__status i, .pulse {
    width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--cherry); flex: none;
    animation: pulse 2s var(--ease-out) infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 oklch(0.6 0.22 25 / 0.6); }
    100% { box-shadow: 0 0 0 0.6rem oklch(0.6 0.22 25 / 0); }
}

.nav__links { margin-left: auto; display: flex; align-items: center; gap: 2rem; }
.nav__links a { text-decoration: none; font-weight: 500; position: relative; }
.nav__links a:not(.nav__cta)::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -0.2em; height: 2px;
    background: currentColor; scale: 0 1; transform-origin: right;
    transition: scale 0.35s var(--ease-out);
}
.nav__links a:not(.nav__cta):hover::after { scale: 1 1; transform-origin: left; }
.nav__cta { padding: 0.55em 1.1em; border-radius: 99px; border: 1.5px solid currentColor; transition: background-color 0.25s, color 0.25s; }
.nav__cta:hover { background: var(--cherry); border-color: var(--cherry); color: var(--on-cobalt); }

.nav__toggle {
    display: none; margin-left: auto;
    background: none; border: 1.5px solid currentColor; border-radius: 99px;
    padding: 0.5em 1.1em; font-weight: 600; cursor: pointer;
}

.menu {
    position: fixed; inset: 0; z-index: var(--z-menu);
    background: var(--cobalt); color: var(--on-cobalt);
    display: flex; align-items: flex-end;
    padding: 6rem var(--gutter) 3rem;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.6s var(--ease-out);
}
.menu nav { display: grid; gap: 0.25rem; }
.menu a {
    font-size: clamp(2.5rem, 12vw, 4.5rem); font-weight: 800; font-stretch: 120%;
    text-transform: uppercase; text-decoration: none; line-height: 1.05;
    opacity: 0; translate: 0 1em;
    transition: opacity 0.4s var(--ease-out), translate 0.6s var(--ease-out);
}
.menu-open .menu { clip-path: inset(0 0 0 0); }
.menu-open .menu a { opacity: 1; translate: 0 0; }
.menu-open .menu a:nth-child(2) { transition-delay: 0.05s; }
.menu-open .menu a:nth-child(3) { transition-delay: 0.1s; }
.menu-open .menu a:nth-child(4) { transition-delay: 0.15s; }
.menu-open .menu a:nth-child(5) { transition-delay: 0.2s; }
.menu-open .nav { color: var(--on-cobalt); z-index: calc(var(--z-menu) + 1); background: none; }
.menu-open .nav__status { visibility: hidden; }

@media (max-width: 860px) {
    .nav__links { display: none; }
    .nav__toggle { display: block; }
}
@media (max-width: 480px) {
    .nav__status { display: none; }
}

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

.hero {
    position: relative;
    min-height: 100svh;
    display: grid; grid-template-rows: 1fr auto; grid-template-columns: minmax(0, 1fr);
    background: var(--cobalt); color: var(--on-cobalt);
    overflow: hidden;
}
.hero__inner {
    display: grid; align-content: end; gap: clamp(1.5rem, 3vw, 2.5rem);
    padding: 7rem var(--gutter) clamp(2rem, 5vw, 4rem);
}
.hero__kicker { font-weight: 500; color: var(--on-cobalt-2); }
.hero__name {
    /* Deliberately past the 6rem display ceiling: the name is the logo (see DESIGN.md). */
    font-size: clamp(3.5rem, 18.5vw, 10rem);
    font-weight: 900; font-stretch: 125%;
    line-height: 0.86; letter-spacing: -0.02em;
    text-transform: uppercase;
}
.hero__line { display: block; }
.hero__line .char { display: inline-block; }
.dot--hero { width: 0.22em; height: 0.22em; }
.hero__foot { display: grid; gap: 1.75rem; justify-items: start; }
@media (min-width: 1360px) {
    .hero__inner { grid-template-columns: auto minmax(0, 27rem); justify-content: space-between; align-items: end; column-gap: 4rem; }
    .hero__kicker { grid-column: 1 / -1; }
    .hero__foot { padding-bottom: 0.6rem; }
}
.hero__lede { max-width: 34ch; font-size: clamp(1.15rem, 1rem + 0.8vw, 1.6rem); line-height: 1.35; font-weight: 500; }
.hero__lede strong { font-weight: 800; font-stretch: 112%; }
.hero__cta { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }

.ticker {
    border-top: 1px solid oklch(0.975 0.004 262 / 0.25);
    padding-block: 0.6rem;
    font-size: clamp(1.75rem, 4.6vw, 3.75rem);
    font-weight: 800; font-stretch: 125%; text-transform: uppercase; line-height: 1.1;
    user-select: none;
}
.ticker__row { overflow: hidden; }
.ticker__track {
    display: flex; width: max-content; will-change: transform;
    animation: ticker 40s linear infinite;
}
.ticker__row--rev .ticker__track { animation-direction: reverse; animation-duration: 46s; }
.ticker__row--rev { color: transparent; -webkit-text-stroke: 1.5px oklch(0.975 0.004 262 / 0.55); }
.ticker__row:first-child { color: oklch(0.975 0.004 262 / 0.9); }
.ticker span { padding-right: 0.5em; }
.ticker span::after { content: '/'; padding-left: 0.5em; color: var(--cherry); -webkit-text-stroke: 0; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Section scaffolding ---------- */

.h2 {
    font-size: clamp(2rem, 8.6vw, 5rem);
    font-weight: 900; font-stretch: 125%; text-transform: uppercase;
    letter-spacing: -0.015em; line-height: 0.95;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li {
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
    padding: 0.3em 0.75em; border-radius: 99px;
    border: 1px solid var(--line); color: var(--ink-2);
}

.meta { font-weight: 600; color: var(--ink-2); font-size: 0.95rem; }

/* ---------- Now ---------- */

.now { padding: var(--section) var(--gutter); display: grid; gap: clamp(3rem, 8vw, 6rem); }
.now__statement {
    font-size: clamp(1.6rem, 1rem + 2.6vw, 3.25rem);
    font-weight: 600; line-height: 1.18; letter-spacing: -0.01em;
    max-width: 30ch;
}
.mark { color: inherit; padding: 0 0.08em; font-weight: 800; font-stretch: 115%; }
.mark--cherry { --mark: var(--cherry); }
.mark--cobalt { --mark: var(--cobalt); }
.mark {
    background: linear-gradient(var(--mark), var(--mark)) 0 0 / 100% 100% no-repeat;
    color: var(--on-cobalt);
    transition: background-size 0.8s var(--ease-out), color 0.5s var(--ease-out);
}
/* With motion on, the highlight wipes in when the reader reaches it. */
.motion .mark:not(.is-lit) { background-size: 0% 100%; color: inherit; }

.now__facts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    border-top: 2px solid var(--ink);
}
.fact { padding: clamp(1.5rem, 3vw, 2.5rem) 0; display: grid; gap: 1rem; align-content: start; }
.fact + .fact { border-top: 1px solid var(--line); }
@media (min-width: 760px) {
    .fact + .fact { border-top: 0; border-left: 1px solid var(--line); padding-left: clamp(1.5rem, 4vw, 3rem); }
}
.fact__big {
    display: flex; align-items: baseline; gap: 0.1em;
    font-size: clamp(4.5rem, 12vw, 6rem); font-weight: 900; font-stretch: 125%;
    line-height: 0.9; color: var(--cobalt); font-variant-numeric: tabular-nums;
}
.fact__of { font-size: 0.4em; color: var(--ink-2); font-stretch: 100%; }
.fact__big .pulse { width: 0.14em; height: 0.14em; align-self: center; }
.fact__label { max-width: 36ch; color: var(--ink-2); }

.now__about {
    display: grid; gap: 2rem; justify-items: start;
    max-width: 62ch; margin-left: auto;
    font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
}

/* ---------- Path (timeline) ---------- */

.path { background: var(--ink); color: var(--on-cobalt); }
.path__pin { padding: var(--section) 0; min-height: 100svh; display: grid; align-content: center; gap: clamp(2.5rem, 5vw, 4rem); }
.path__head { padding-inline: var(--gutter); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; }
.path__intro { color: var(--on-cobalt-2); max-width: 32ch; }
.path__viewport { overflow-x: auto; scrollbar-width: none; }
.path__viewport::-webkit-scrollbar { display: none; }
.path__track { will-change: transform; display: flex; gap: clamp(1rem, 3vw, 2rem); padding-inline: var(--gutter); width: max-content; }
.path__item {
    width: min(82vw, 27rem);
    display: grid; align-content: start; gap: 1rem;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border: 1px solid oklch(0.975 0.004 262 / 0.18);
    border-radius: 4px;
}
.path__item.is-now { background: var(--cobalt); border-color: var(--cobalt); }
.path__year {
    font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 900; font-stretch: 110%;
    line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
    color: transparent; -webkit-text-stroke: 1.5px var(--on-cobalt);
}
.path__item.is-now .path__year, .path__item:hover .path__year { color: var(--on-cobalt); }
.path__title { font-size: 1.35rem; font-weight: 800; font-stretch: 110%; }
.path__text { color: var(--on-cobalt-2); font-size: 0.98rem; }
.path__item.is-now .path__text { color: var(--on-cobalt); }
.path .tags li { border-color: oklch(0.975 0.004 262 / 0.25); color: var(--on-cobalt-2); }
.path__item.is-now .tags li { color: var(--on-cobalt); }
.path__progress { margin-inline: var(--gutter); height: 2px; background: oklch(0.975 0.004 262 / 0.18); }
.path__progress span { display: block; height: 100%; background: var(--cherry); transform-origin: left; }
.path__year { transition: color 0.5s var(--ease-out); }
.path__item.is-active .path__year { color: var(--on-cobalt); }
@media (max-width: 899px) {
    .path__viewport { scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); }
    .path__item { scroll-snap-align: start; }
}

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

.work { padding: var(--section) var(--gutter); display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }
.work__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; }

.feature { display: grid; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
@media (min-width: 980px) {
    .feature { grid-template-columns: 1.45fr 1fr; }
    .feature--flip { grid-template-columns: 1fr 1.45fr; }
    .feature--flip .feature__media { order: 2; }
}
.feature + .feature { margin-top: clamp(1rem, 4vw, 3rem); }
.feature__media, .case__media { position: relative; isolation: isolate; }
.feature__media::after, .case__media::after {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: var(--cobalt); transform-origin: 50% 0;
    transform: scaleY(0); pointer-events: none;
    transition: transform 1.1s var(--ease-quint) 0.15s;
}
.motion .feature__media:not(.is-in)::after, .motion .case__media:not(.is-in)::after { transform: scaleY(1); transition: none; }
.feature__media {
    display: block; position: relative;
    border-radius: 6px; overflow: hidden; background: var(--ink);
    aspect-ratio: 16 / 10;
}
.feature__media video, .feature__media img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.8s var(--ease-out); }
.feature__media:hover video, .feature__media:hover img { scale: 1.03; }
.feature__body { display: grid; gap: 1.25rem; justify-items: start; }
.feature__title { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 900; font-stretch: 115%; letter-spacing: -0.01em; }
.feature__text { color: var(--ink-2); max-width: 60ch; }
.actions { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; margin-top: 0.5rem; }

.rows { border-top: 1px solid var(--line); }
.rows:empty { display: none; }
.row {
    display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1.5rem; align-items: center;
    padding: 1.5rem 0; border-bottom: 1px solid var(--line); text-decoration: none;
    transition: color 0.3s var(--ease-out);
}
.row__title { font-size: clamp(1.5rem, 3.5vw, 2.5rem); font-weight: 800; font-stretch: 110%; transition: font-stretch 0.4s var(--ease-out); }
.row__meta, .row__tech { color: var(--ink-2); font-size: 0.95rem; }
.row__arrow { grid-row: 1 / 3; grid-column: 2; width: 1.75rem; height: 1.75rem; transition: translate 0.4s var(--ease-out); }
.row:hover { color: var(--cobalt); }
.row:hover .row__title { font-stretch: 125%; }
.row:hover .row__arrow { translate: 0.4rem 0; }
@media (min-width: 760px) {
    .row { grid-template-columns: 1.5fr 0.6fr 1fr auto; }
    .row__arrow { grid-row: auto; grid-column: auto; }
}
.preview {
    position: fixed; left: 0; top: 0; z-index: var(--z-preview);
    width: 18rem; aspect-ratio: 4 / 3; object-fit: cover;
    pointer-events: none; border-radius: 4px; background: var(--bg-2);
    opacity: 0; scale: 0.8;
    transition: opacity 0.25s var(--ease-out), scale 0.4s var(--ease-out);
}
.preview.is-on { opacity: 1; scale: 1; }

.quotes { padding: 0 var(--gutter) var(--section); display: flex; gap: 2rem; overflow-x: auto; scroll-snap-type: x mandatory; }
.quote { flex: 0 0 min(88%, 40rem); scroll-snap-align: start; display: grid; gap: 1.25rem; border-top: 2px solid var(--ink); padding-top: 1.5rem; }
.quote blockquote { font-size: clamp(1.3rem, 1rem + 1.2vw, 2rem); font-weight: 600; line-height: 1.3; }
.quote figcaption { color: var(--ink-2); }

/* ---------- Skills ---------- */

.skills { padding: 0 var(--gutter) var(--section); display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.skills__row { display: grid; gap: 0.75rem 3rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
@media (min-width: 760px) { .skills__row { grid-template-columns: 12rem 1fr; } }
.skills__cat { font-size: 1rem; font-weight: 600; color: var(--ink-2); padding-top: 0.6em; }
.skills__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; }
.skills__legend { color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.9rem; }
.skills__legend b { color: var(--ink); font-size: 1.15rem; }
.skills__words { display: flex; flex-wrap: wrap; gap: 0 0.2em; font-size: clamp(1.75rem, 4.6vw, 3.5rem); line-height: 1.12; }
.skills__words li { cursor: default; transition: color 0.25s var(--ease-out); }
.skills__words li:not(:last-child)::after { content: ','; color: var(--cherry); font-stretch: 100%; }
.skills__words li:hover { color: var(--cobalt); }
/* Level is encoded in the variable font axes: wide/black → condensed/light. */
.lv-a { font-weight: 900; font-stretch: 125%; }
.lv-i { font-weight: 650; font-stretch: 100%; }
.lv-b { font-weight: 400; font-stretch: 75%; color: var(--ink-2); }
.lv-none { font-weight: 600; font-stretch: 100%; font-size: 0.62em; align-self: center; }
.skills__words:has(.lv-none) { gap: 0.15em 0.3em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.work__facts {
    flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
    color: var(--ink-2); font-weight: 500;
}
.work__facts b { color: var(--ink); font-weight: 900; font-stretch: 125%; font-size: 1.4em; font-variant-numeric: tabular-nums; margin-right: 0.15em; }

/* ---------- Method ---------- */

.method { padding: 0 var(--gutter) var(--section); display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.method__steps {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    border-top: 2px solid var(--ink); counter-reset: step;
}
.step { display: grid; align-content: start; gap: 0.75rem; padding: 1.5rem clamp(1rem, 2vw, 1.75rem) 2rem 0; position: relative; }
.step::before {
    content: ''; position: absolute; top: -2px; left: 0; right: 0; height: 2px;
    background: var(--cobalt); transform-origin: left; scale: var(--fill, 1) 1;
}
.step__n { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 900; font-stretch: 125%; line-height: 1; color: var(--cobalt); font-variant-numeric: tabular-nums; }
.step__title { font-size: 1.35rem; font-weight: 800; font-stretch: 112%; }
.step p { color: var(--ink-2); }
.step__time { font-size: 0.85rem; font-weight: 600; justify-self: start; padding: 0.25em 0.7em; border-radius: 99px; background: var(--bg-2); }

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

.contact {
    background: var(--cobalt); color: var(--on-cobalt);
    padding: var(--section) var(--gutter);
    display: grid; gap: clamp(3rem, 6vw, 5rem);
}
@media (min-width: 1020px) {
    .contact { grid-template-columns: 1fr 1fr; align-items: start; }
    .contact__intro { display: contents; }
    .contact__title { grid-column: 1 / -1; }
    .contact__intro > :not(.contact__title) { grid-column: 1; }
    .form { grid-column: 2; grid-row: 2 / span 4; }
}
.contact__intro { display: grid; gap: 1.5rem; justify-items: start; }
.contact__title {
    font-size: clamp(2rem, 8.4vw, 7rem); font-weight: 900; font-stretch: 125%;
    text-transform: uppercase; line-height: 0.9; letter-spacing: -0.02em;
    white-space: nowrap;
}
.contact__text { max-width: 40ch; color: var(--on-cobalt-2); font-size: 1.15rem; }
.contact__mail {
    font-size: clamp(1.15rem, 0.8rem + 1.8vw, 2rem); font-weight: 700;
    text-decoration: none; overflow-wrap: anywhere;
    background: linear-gradient(var(--cherry), var(--cherry)) 0 100% / 100% 3px no-repeat;
    transition: background-size 0.45s var(--ease-out);
}
.contact__mail:hover { background-size: 100% 100%; }
.contact__meta { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 1rem; }
.contact__meta dt { font-size: 0.85rem; color: var(--on-cobalt-2); }
.contact__meta dd { font-weight: 600; }

.form { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .form { grid-template-columns: 1fr 1fr; } .field--wide, .form__end { grid-column: 1 / -1; } }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field label span { font-weight: 400; color: var(--on-cobalt-2); }
.field input, .field textarea {
    width: 100%; padding: 0.8em 0;
    background: transparent; border: 0; border-bottom: 1.5px solid oklch(0.975 0.004 262 / 0.45);
    border-radius: 0; resize: vertical; font-size: 1.1rem;
    transition: border-color 0.25s var(--ease-out);
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--on-cobalt); box-shadow: 0 2px 0 0 var(--on-cobalt); }
.field .is-invalid { border-bottom-color: var(--cherry); animation: shake 0.35s var(--ease-out); }
@keyframes shake { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }
.form__end { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 0.5rem; }
.form__status { font-weight: 600; }
.form__status.is-error { color: var(--on-cobalt); background: var(--cherry); padding: 0.3em 0.7em; }

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

.foot {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
    padding: 1.75rem var(--gutter);
    background: var(--ink); color: var(--on-cobalt-2); font-size: 0.95rem;
}
.foot .link { color: var(--on-cobalt); }

/* ---------- Inner pages ---------- */

.page-head {
    padding: clamp(8rem, 16vw, 11rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
    display: grid; gap: 1.5rem; justify-items: start;
}
.page-head__title {
    font-size: clamp(2.75rem, 8vw, 6rem); font-weight: 900; font-stretch: 125%;
    text-transform: uppercase; line-height: 0.92; letter-spacing: -0.02em; max-width: 16ch;
}
.page-head__lede { max-width: 58ch; color: var(--ink-2); font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); }
.back { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.back .i { rotate: 180deg; transition: translate 0.3s var(--ease-out); }
.back:hover { color: var(--cobalt); }
.back:hover .i { translate: -0.25em 0; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 var(--gutter) 2rem; }
.chips a {
    padding: 0.5em 1em; border-radius: 99px; border: 1px solid var(--line);
    text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.chips a:hover { border-color: var(--ink); }
.chips a.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.list { padding: 0 var(--gutter) var(--section); }
.empty { padding: 3rem 0; color: var(--ink-2); font-size: 1.15rem; }
.pager { display: flex; gap: 1.5rem; align-items: center; padding-top: 2rem; }

.case { padding: 0 var(--gutter) var(--section); display: grid; gap: clamp(3rem, 6vw, 5rem); }
.case__media { border-radius: 6px; overflow: hidden; background: var(--ink); aspect-ratio: 16 / 10; }
.case__media video, .case__media img { width: 100%; height: 100%; object-fit: cover; }
.case__media--logo { background: var(--bg-2); display: grid; place-items: center; }
.case__media--logo img { width: min(60%, 26rem); height: auto; object-fit: contain; }
.case__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 900px) { .case__grid { grid-template-columns: 1fr 18rem; align-items: start; } }
.case__body { display: grid; gap: 2.5rem; max-width: 68ch; }
.case__block h2 { font-size: 1.5rem; font-weight: 800; font-stretch: 112%; margin-bottom: 0.75rem; }
.case__block p + p { margin-top: 1em; }
.case__facts { display: grid; gap: 1.25rem; border-top: 2px solid var(--ink); padding-top: 1.25rem; }
@media (min-width: 900px) { .case__facts { position: sticky; top: 6rem; } }
.case__facts dt { font-size: 0.85rem; color: var(--ink-2); }
.case__facts dd { font-weight: 600; }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.gallery img { border-radius: 4px; width: 100%; }

.error {
    min-height: 100svh; display: grid; align-content: center; justify-items: start; gap: 1.5rem;
    padding: 7rem var(--gutter) 4rem;
    background: var(--cobalt); color: var(--on-cobalt);
}
.error__code { font-size: clamp(5rem, 22vw, 6rem); font-weight: 900; font-stretch: 125%; line-height: 0.85; }
.error p { max-width: 40ch; color: var(--on-cobalt-2); font-size: 1.2rem; }

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

/* Pre-hide only what JS will reveal on load (class set in <head>, removed if GSAP fails). */
.anim .hero__name, .anim .hero__kicker, .anim .hero__foot { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .ticker__track { animation: none; }
}

.link--btn { border: 0; background-color: transparent; cursor: pointer; }
.share { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.contact--short { grid-template-columns: 1fr; }
.contact--short .contact__title { font-size: clamp(2.75rem, 8vw, 5rem); }
.error .h2 { max-width: 14ch; }
@media (max-width: 480px) { .lv-a { font-stretch: 112%; } }

.motion .ticker__track { animation: none; } /* GSAP drives it so speed can follow scroll */
