/* =====================================================================
   Voldebug home page, third design ("wide type"). Loaded after v2.css.
   One idea carried through the page: Archivo's width axis. Lines of type
   start narrow and widen until they fill their column; the script
   (home3.js) drives that from the scroll position. Everything here reads
   correctly with the script off.
   ===================================================================== */

/* the shared big line: client names, the three services, the closing line */
.h3-fitbox { display: block; flex: 1 1 0; min-width: 0; }
.h3-big { display: inline-block; width: max-content; max-width: none; white-space: nowrap; vertical-align: top; font-weight: 800; text-transform: uppercase;
          letter-spacing: -.02em; line-height: .9; font-stretch: 84%; color: var(--ink); font-size: clamp(34px, 6.4vw, 96px); }
.h3-live .h3-big { font-stretch: 62%; }

/* ------------------------------ headline ---------------------------- */
.h3-hero { padding-top: calc(var(--hd) + clamp(18px, 3vw, 40px)); overflow-x: clip; }
.h3-hero__who { font-size: 15px; color: var(--mute); }
.h3-hero__title { position: relative; margin-top: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; line-height: .84; --h3-fs: clamp(44px, 13.4vw, 186px); }
.h3-hero__lines { display: block; max-width: 100%; }
.h3-line { position: relative; z-index: 1; display: block; width: max-content; max-width: none; white-space: nowrap; font-size: var(--h3-fs); font-stretch: 100%; color: var(--ink); }
.h3-line--b { z-index: 3; margin-left: auto; }
.h3-hero__for { position: relative; z-index: 3; display: block; margin-top: .55em; font-size: clamp(20px, 3vw, 44px); line-height: 1.05; font-weight: 650; font-stretch: 112%;
                text-transform: none; letter-spacing: -.015em; color: var(--ink); }
.h3-hero__art { position: absolute; z-index: 2; right: -4%; top: 42%; width: min(40%, 66vh, 560px); aspect-ratio: 1 / 1; transform: translateY(-50%); pointer-events: none; }
.h3-hero__art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.h3-hero__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px clamp(24px, 5vw, 80px); align-items: end; margin-top: clamp(20px, 2.6vw, 36px); }
.h3-hero__foot .intro__lede, .h3-hero__foot .intro__actions { margin-top: 0; }
.h3-hero .facts { margin-top: clamp(36px, 5vw, 72px); }
/* the lines wait, narrow, for the script to open them; if it never runs they show anyway */
.motion .h3-line { opacity: 0; animation: h3-show 0s 3.2s forwards; }
@keyframes h3-show { to { opacity: 1; } }

/* ------------------------------ clients ----------------------------- */
.h3-roll__list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.h3-roll__row { display: flex; align-items: baseline; gap: 24px; padding: clamp(10px, 1.3vw, 18px) 0; }
.h3-roll__what { flex: none; font-size: 15px; color: var(--mute); text-align: right; }

/* ---------------------------- recognition --------------------------- */
.h3-rec__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.h3-rec__stick { position: sticky; top: calc(var(--hd) + 28px); }
.h3-rec__frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper); }
.h3-rec__fig { position: absolute; inset: 0; margin: 0; clip-path: inset(100% 0 0 0); transition: clip-path .8s var(--ease); }
.h3-rec__fig.is-in { clip-path: inset(0 0 0 0); }
.h3-rec__fig img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.08); transition: transform 1.4s var(--ease); }
.h3-rec__fig.is-in img { transform: none; }
.h3-rec__fig--plate { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: clamp(20px, 3vw, 40px); background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }
.h3-rec__fig--plate span { font-size: 15px; color: var(--mute); }
.h3-rec__fig--plate b { font-size: clamp(34px, 4.6vw, 68px); line-height: .92; font-weight: 800; font-stretch: 70%; text-transform: uppercase; letter-spacing: -.02em; color: var(--ink); }
.h3-rec__list { border-bottom: 0; padding-top: clamp(0px, 6vw, 96px); }
.h3-rec .h3-award { grid-template-columns: 1fr; padding: clamp(26px, 4.6vh, 52px) 0; transition: opacity .5s; }
.h3-rec .h3-award .award__when { padding-top: 0; }
.h3-rec .h3-award .award__what strong { font-size: clamp(22px, 2.3vw, 33px); line-height: 1.16; }
.h3-rec.is-live .h3-award:not(.is-on) { opacity: .34; }
.h3-rec .awards__sis { margin-top: clamp(40px, 5vw, 72px); }

/* ------------------------------ services ---------------------------- */
.h3-pillars { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.h3-pillar a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 27%) auto; align-items: center; gap: 12px clamp(20px, 3vw, 48px); padding: clamp(16px, 2vw, 28px) 0; text-decoration: none; }
.h3-pillar .h3-big { font-size: clamp(46px, 9.4vw, 140px); transition: color .25s; }
.h3-pillar__txt { font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.h3-pillar__price { display: block; margin-bottom: 4px; font-size: clamp(18px, 1.5vw, 22px); font-weight: 650; color: var(--ink); }
.h3-pillar .ico { width: 22px; height: 22px; color: var(--mute); }
.h3-pillar a:hover .h3-big, .h3-pillar a:hover .ico { color: var(--green-d); }
.h3-pillar a:hover .ico { transform: translateX(6px); }
.h3-more { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 26px; font-size: 16px; }

/* -------------------------------- work ------------------------------ */
.h3-wall__foot { display: flex; align-items: center; gap: 24px; margin-top: 28px; }
.h3-wall__foot .work__bar { flex: 1; margin-top: 0; }
.h3-wall__foot .link { font-size: 16px; white-space: nowrap; }
.h3-wall__nav { display: none; gap: 8px; }
.h3-wall__nav button { width: 46px; height: 46px; border: 1px solid var(--rule); background: transparent; color: var(--ink); font-size: 19px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.h3-wall__nav button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* flat: a strip you scroll sideways */
.h3-wall:not(.is-3d) .work__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.h3-wall:not(.is-3d) .work__viewport::-webkit-scrollbar { display: none; }
.h3-wall:not(.is-3d) .proj { scroll-snap-align: center; }
.h3-wall:not(.is-3d) .work__bar { display: none; }
/* curved: the projects stand on the inside of a wide drum that turns with the scroll (class set by the script) */
.h3-wall.is-3d { padding: 0; height: calc(100svh + var(--n) * 44vh); }
.h3-wall.is-3d .h3-wall__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; }
.h3-wall.is-3d .work__head { flex: none; position: relative; z-index: 3; margin-bottom: 0; padding-top: calc(var(--hd) + 18px); pointer-events: none; }
.h3-wall.is-3d .work__viewport { flex: 1 1 0; min-height: 0; position: relative; overflow: visible; perspective: var(--wall-p, 2000px); perspective-origin: 50% 50%; }
.h3-wall.is-3d .work__track { position: absolute; left: 50%; top: 50%; width: 0; height: 0; display: block; padding: 0; transform-style: preserve-3d; will-change: transform; }
.h3-wall.is-3d .proj { position: absolute; left: calc(var(--wall-w) / -2); top: calc((var(--wall-w) * .625 + 104px) / -2); width: var(--wall-w); cursor: pointer; }
.h3-wall.is-3d .proj.is-front { cursor: default; }
.h3-wall.is-3d .proj__img img { transform: none; filter: brightness(calc(1 - var(--d, 0) * .55)); }
.h3-wall.is-3d .proj__meta { opacity: calc(1 - var(--d, 0) * .9); margin-top: 14px; }
.h3-wall.is-3d .proj__meta p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h3-wall.is-3d .proj__n { opacity: calc(1 - var(--d, 0)); }
.h3-wall.is-3d .h3-wall__foot { flex: none; position: relative; z-index: 3; margin: 0; padding-bottom: clamp(16px, 3vh, 30px); padding-right: max(var(--pad), 200px); }
.h3-wall.is-3d .h3-wall__nav { display: flex; }

/* ------------------------------- people ----------------------------- */
/* plain: a strip of portraits; the one under the pointer opens */
.h3-ring:not(.is-ring) .h3-ring__stage { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.h3-people { display: flex; gap: 6px; height: clamp(300px, 40vw, 540px); }
.h3-person { position: relative; display: block; flex: 1 1 0; min-width: 0; overflow: hidden; background: var(--paper-2); text-decoration: none; transition: flex-grow .65s var(--ease); }
.h3-person img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: grayscale(1) brightness(.55); transition: filter .5s; }
.h3-person__cap { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 40px 16px 14px; white-space: nowrap; opacity: 0; transition: opacity .3s;
                  background: linear-gradient(180deg, transparent, rgba(12, 13, 11, .88)); }
.h3-person__cap b { font-size: 18px; font-weight: 650; color: var(--ink); }
.h3-person__cap span { font-size: 14px; color: var(--ink-2); }
.h3-people:hover .h3-person:hover, .h3-people:not(:hover) .h3-person:first-child { flex-grow: 3.4; }
.h3-people:hover .h3-person:hover img, .h3-people:not(:hover) .h3-person:first-child img { filter: none; }
.h3-people:hover .h3-person:hover .h3-person__cap, .h3-people:not(:hover) .h3-person:first-child .h3-person__cap { opacity: 1; transition-delay: .2s; }
.h3-ring__title { display: none; }
.h3-ring__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: clamp(24px, 3vw, 40px); }
.h3-ring__foot p { max-width: 30em; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--ink-2); }

/* the ring: the same one as on the team page, turning slowly (class set by the script) */
.h3-ring.is-ring { padding-top: clamp(40px, 5vw, 72px); overflow: hidden; }
.h3-ring.is-ring .h3-ring__head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.h3-ring.is-ring .h3-ring__stage { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.h3-ring.is-ring .h3-ring__stage.is-drag { cursor: grabbing; }
.h3-ring.is-ring .h3-ring__scene { position: absolute; inset: 0; perspective: var(--ring-p, 1700px); perspective-origin: 50% var(--ring-y, 60%); }
.h3-ring.is-ring .h3-ring__world { position: absolute; left: 50%; top: var(--ring-y, 60%); width: 0; height: 0; transform-style: preserve-3d; }
.h3-ring.is-ring .h3-ring__wheel { display: block; position: absolute; left: 0; top: 0; width: 0; height: 0; margin: 0; padding: 0; overflow: visible !important; transform-style: preserve-3d; will-change: transform; }
.h3-ring.is-ring .h3-ring__card { position: absolute; left: calc(var(--ring-w) / -2); top: calc(var(--ring-w) * -.625); width: var(--ring-w); height: calc(var(--ring-w) * 1.25);
                                  background: #151713; box-shadow: 0 0 0 1px rgba(239, 236, 228, .16); transition: none; }
.h3-ring.is-ring .h3-ring__wheel .h3-ring__card.h3-person img { filter: grayscale(var(--g, 1)) brightness(var(--b, .3)); transition: none; }
.h3-ring.is-ring .h3-person__cap { display: none; }
.h3-ring.is-ring .h3-ring__title { display: block; position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.h3-ring__title span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; text-align: center; font-weight: 800; text-transform: uppercase;
                       letter-spacing: -.02em; line-height: .82; color: var(--ink); font-stretch: 100%; opacity: 0;
                       transition: opacity .35s var(--ease), font-stretch .8s cubic-bezier(.2, .7, .1, 1); }
.h3-ring__title span.is-on { opacity: 1; }
.h3-ring__title span.is-out { opacity: 0; font-stretch: 62%; }

/* ------------------------------- contact ---------------------------- */
.h3-contact__title { margin: 0 0 clamp(28px, 4vw, 56px); }
.h3-contact__title .h3-big { font-size: clamp(40px, 9.6vw, 146px); line-height: .88; }
.h3-contact__lede { max-width: 22em; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.45; color: var(--ink-2); }

/* ---------------------------- small screens -------------------------- */
@media (max-width: 899.98px) {
    .h3-hero__foot { grid-template-columns: 1fr; }
    .h3-hero__art { right: -11%; top: 36%; width: min(50%, 270px); }
    .h3-rec__grid { grid-template-columns: 1fr; }
    .h3-rec__stick { position: static; }
    .h3-rec__frame { display: none; }
    .h3-rec__list { padding-top: 0; }
    .h3-rec.is-live .h3-award:not(.is-on) { opacity: 1; }
    .h3-pillar a { grid-template-columns: minmax(0, 1fr) auto; }
    .h3-pillar .h3-fitbox { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    /* long names wrap instead of widening */
    .h3-roll .h3-big { width: auto; white-space: normal; font-size: clamp(30px, 9.4vw, 60px); font-stretch: 70%; line-height: .94; }
    .h3-roll__row { flex-direction: column; gap: 4px; padding: 14px 0; }
    .h3-roll__what { text-align: left; }
}
@media (hover: none), (max-width: 760px) {
    /* no pointer to open a portrait with: a strip you swipe */
    .h3-people { height: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-right: calc(var(--pad) * -1); padding-right: var(--pad); }
    .h3-people::-webkit-scrollbar { display: none; }
    .h3-person, .h3-people:not(:hover) .h3-person:first-child, .h3-people:hover .h3-person:hover { flex: 0 0 min(58vw, 260px); aspect-ratio: 4 / 5; scroll-snap-align: start; }
    .h3-person img { filter: none; }
    .h3-person .h3-person__cap { opacity: 1; white-space: normal; }
    .h3-ring.is-ring .h3-ring__wheel { margin: 0; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .h3-line { opacity: 1 !important; animation: none !important; }
}
