/*
 * assets/css/home-hero.css: the homepage hero (real client sites lying on a tilted table that slides along its rows
 * as the page scrolls) and the two audience cards under it. From the work-showcase concept (Ryan, Dec 2 2026).
 * Loaded by index.php only, plain CSS so the site's Tailwind build doesn't change.
 *
 * One number drives the hero: --p, 0 at the top of the page and 1 once the hero has scrolled away. A scroll-driven
 * animation moves it where the browser supports one; home-hero.js sets it otherwise. With reduced motion it stays 0.
 */
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }

.hs-hero, .hs-two {
  --ink: var(--color-carbon);
  --muted: #5c5c5c;
  --sh-tile: 0 0 0 1px rgba(28,28,28,.06), 0 1px 1px rgba(28,28,28,.05), 0 3px 6px -2px rgba(28,28,28,.07), 0 14px 28px -14px rgba(28,28,28,.22);
  --sh-lift: 0 0 0 1px rgba(28,28,28,.06), 0 2px 2px rgba(28,28,28,.04), 0 8px 14px -6px rgba(28,28,28,.10), 0 34px 60px -26px rgba(28,28,28,.32);
}
.hs-wrap { max-width: 88rem; margin-inline: auto; padding-inline: 1.5rem; }
@media (min-width: 640px) { .hs-wrap { padding-inline: 2.5rem; } }

/* =====================================================================
   HERO
   ===================================================================== */
.hs-hero {
  --p: 0;
  position: relative;
  overflow: clip;
  background: #fff;
  padding-top: clamp(2.5rem, 1rem + 4vw, 5rem);
  /* the table's pose (desktop); Dec 2, Ryan: a flatter bottom-left to top-right diagonal (tilt-z was -21deg) */
  --tilt-x: 55deg; --tilt-z: -15deg; --tilt-s: .55; --tilt-y: -230px; --tilt-z3: -120px;
  /* print width, gap, the table's padding, and how many columns the first screen frames */
  --cw: calc(min(100vw, 88rem) * .17); --gap: 1rem; --pad: 1rem; --vis: 5;
  /* how far it slides by the time the hero has scrolled away (Dec 2, Ryan: a tad slower, 26vw to 18vw) */
  --slide: 18vw;
  /* where the table sits: nudged right of the copy, and dropped below it */
  --shift-x: 8vw; --drop: clamp(8rem, 5rem + 6vw, 12rem);
}
.hs-hero-copy { position: relative; z-index: 3; }
.hs-hero .hs-since { font-size: 15px; color: var(--color-clay-700); letter-spacing: -.005em; }
.hs-hero .hs-since b { font-weight: 600; color: var(--color-brand-600); }
.hs-hero .hs-h1 {
  margin-top: 1rem; max-width: 15ch;
  font-family: var(--font-serif); font-weight: 600; color: var(--ink); text-wrap: balance;
  font-size: min(11.2vw - .336rem, 4.75rem); line-height: 1.02; letter-spacing: -.033em;
}
@media (min-width: 640px) { .hs-hero .hs-h1 { font-size: min(11.2vw - .56rem, 4.75rem); } }
@media (min-width: 1024px) { .hs-hero .hs-h1 { font-size: clamp(3.6rem, 6.8vw, 7rem); } }
.hs-hero .hs-h1 .dot { letter-spacing: 0; }
.hs-lede { margin-top: 1.6rem; max-width: 39rem; font-size: clamp(1.08rem, .98rem + .45vw, 1.3rem); line-height: 1.55; color: var(--color-clay-700); }
.hs-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.1rem; }
.hs-btn { padding: .95rem 1.7rem; font-size: 16px; }
.hs-btn-sm { padding: .8rem 1.35rem; font-size: 15px; }
.hs-from { margin-top: 1.4rem; font-size: 15px; color: var(--color-clay-700); }
.hs-from a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; color: var(--ink); text-decoration: none; transition: color .15s; }
.hs-from a:hover { color: var(--color-brand-600); }
.hs-from a b { font-weight: 700; color: var(--ink); }
.hs-from a::after { content: "\2192"; transition: transform .15s; }
.hs-from a:hover::after { transform: translateX(3px); }
.hs-hero a:focus-visible, .hs-two a:focus-visible { outline: 2px solid var(--color-brand-500); outline-offset: 3px; border-radius: 6px; }

/* the pen sky right of the headline: haze strokes and birds, wide screens only */
.hs-air { position: absolute; z-index: 3; pointer-events: none; display: none; top: clamp(3rem, 1rem + 5vw, 6.5rem); right: max(2.5rem, calc((100% - 88rem) / 2 + 3rem)); width: min(36rem, 38vw); height: auto; overflow: visible; }
@media (min-width: 1024px) { .hs-air { display: block; } }
/* the haze drifts slowly, as the old hero's did */
@media (prefers-reduced-motion: no-preference) {
  .hs-drift { animation: hs-drift 34s ease-in-out infinite alternate; }
  .hs-d2 { animation-duration: 42s; animation-delay: -12s; }
  .hs-d3 { animation-duration: 38s; animation-delay: -25s; }
}
@keyframes hs-drift { from { transform: translateX(-14px); } to { transform: translateX(14px); } }
/* two flocks of the animated margin birds, placed in the same white space */
.hs-hero .hs-birds { position: absolute; z-index: 3; pointer-events: none; display: none; }
.hs-hero .hs-birds svg { overflow: visible; }
@media (min-width: 1024px) { .hs-hero .hs-birds { display: block; } }
.hs-hero .hs-birds-a { top: clamp(7rem, 4rem + 6vw, 11.5rem); right: max(14rem, calc((100% - 88rem) / 2 + 22rem)); }
.hs-birds-a svg { width: 110px; height: auto; }
.hs-hero .hs-birds-b { top: clamp(9.5rem, 6rem + 7vw, 14rem); right: max(3rem, calc((100% - 88rem) / 2 + 5rem)); }
.hs-birds-b svg { width: 72px; height: auto; }

/* white air over the far edge of the table, so the headline always reads */
.hs-haze {
  position: absolute; inset: 0 0 auto 0; height: var(--haze-h, 640px); z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse 54% 74% at 21% 32%, #fff 0 56%, rgba(255,255,255,.88) 66%, rgba(255,255,255,0) 82%),
    linear-gradient(180deg, #fff 0 22%, rgba(255,255,255,0) 46%);
}

.hs-stage {
  position: relative; z-index: 1;
  margin-top: var(--drop);
  /* trimmed so the next section starts closer under the fade (Dec 3, Ryan: less space under the hero) */
  height: calc(2 * var(--cw) * 917 / 880 + var(--gap) + 2 * var(--pad) - var(--stage-trim, 4.5rem));
  perspective: 1500px;
  perspective-origin: 50% -30%;
}
.hs-table {
  position: absolute; top: 0;
  /* the right end hangs two columns past the frame, so the table always runs off the right edge */
  --overhang: calc(2 * (var(--cw) + var(--gap)));
  right: calc((100% - min(100%, 88rem)) / 2 + 2.5rem - var(--overhang));
  padding: var(--pad);
  transform-origin: calc(100% - var(--overhang) - var(--pad) - var(--vis) * (var(--cw) + var(--gap)) / 2) 100%;
  transform-style: preserve-3d;
  /* the pose first, then the slide in the table's own space, so the prints travel along their rows */
  transform:
    translate3d(var(--shift-x), var(--tilt-y), var(--tilt-z3))
    rotateX(var(--tilt-x))
    rotateZ(var(--tilt-z))
    scale(calc(1 + var(--tilt-s)))
    translate3d(calc(var(--p) * var(--slide)), 0, 0);
  will-change: transform;
}
.hs-prints {
  display: grid; grid-template-columns: repeat(16, var(--cw)); gap: var(--gap);
  margin: 0; padding: 0; list-style: none;
  transform-style: preserve-3d;
}
.hs-print {
  position: relative;
  transform-style: preserve-3d;
  transform: translate3d(calc(var(--sx) * 1px), calc(var(--sy) * 1px), 0) rotate(calc(var(--sr) * 1deg));
}
/* each print's shadow lies on the page under it: soft, blurred layers only */
.hs-print::before {
  content: ""; position: absolute; inset: 2%; border-radius: 12px; pointer-events: none;
  box-shadow:
    0 2px 6px rgba(28,28,28,.10),
    calc(var(--sz) * .4px) calc(var(--sz) * .8px + 6px) calc(var(--sz) * 1.2px + 18px) rgba(28,28,28,.12),
    calc(var(--sz) * .8px) calc(var(--sz) * 1.6px + 18px) calc(var(--sz) * 2.4px + 48px) rgba(28,28,28,.12);
}
.hs-print-card { position: relative; margin: 0; transform: translateZ(calc(var(--sz) * 1px)); outline: 1px solid transparent; }
.hs-print-card img { display: block; width: 100%; height: auto; aspect-ratio: 880 / 917; object-fit: cover; object-position: top; border-radius: 10px; outline: 1px solid transparent; }

/* the table fades out at the hero's lower edge instead of ending on a hard cut */
.hs-hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: var(--fade-h, 14rem); z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 85%);
}

@keyframes hs-slide { from { --p: 0; } to { --p: 1; } }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hs-hero { animation: hs-slide linear both; animation-timeline: scroll(root block); animation-range: 0px var(--hs-end, 100vh); }
  }
}
@media (prefers-reduced-motion: reduce) { .hs-hero { --p: 0 !important; } }

@media (max-width: 1023px) {
  .hs-hero { --tilt-x: 52deg; --tilt-z: -10deg; --tilt-s: .38; --tilt-y: -150px; --cw: 30vw; --vis: 3; --slide: 18vw; --shift-x: 9vw; --drop: 11.5rem; --stage-trim: 3.5rem; }
}
@media (max-width: 639px) {
  .hs-hero { --tilt-x: 50deg; --tilt-z: -10deg; --tilt-s: .32; --tilt-y: 10px; --tilt-z3: 0px; --cw: 42vw; --gap: .6rem; --pad: .6rem; --vis: 2; --slide: 17vw; --shift-x: 9vw; --drop: 1.25rem; --fade-h: 7rem; --stage-trim: 2rem; }
  .hs-table { right: calc(1.5rem - var(--overhang)); }
  .hs-haze { background: linear-gradient(180deg, #fff 0 calc(100% - 90px), rgba(255,255,255,0) 100%); }
  .hs-cta .hs-btn { flex: 1 1 auto; }
}

/* the section after the hero starts close under the fade, with no rule between them */
.hs-hero + section { border-top: 0; padding-top: clamp(.5rem, 0rem + 1vw, 1rem); }


/* =====================================================================
   AUDIENCE CARDS: white cards with depth that tilt a little toward the mouse (home-hero.js)
   ===================================================================== */
.hs-two { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .hs-two { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.hs-card {
  position: relative; background: #fff; box-shadow: var(--sh-tile);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .3s;
}
.hs-card.is-tilting { transition: transform .12s linear, box-shadow .3s; box-shadow: var(--sh-lift); --ty: -3px; }
.hs-aud { display: flex; flex-direction: column; overflow: hidden; border-radius: 1.75rem; }
.hs-aud-text { padding: 1.75rem 1.5rem 0; display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
@media (min-width: 640px) { .hs-aud-text { padding: 2.4rem 2.4rem 0; } }
.hs-aud .hs-pill { font-size: 13.5px; }
.hs-aud .hs-pill.hero-pill b { color: var(--ink); }
.hs-aud .hs-h3 { margin-top: 1.25rem; font-family: var(--font-serif); font-weight: 600; color: var(--ink); text-wrap: balance; font-size: clamp(1.6rem, 2.3vw, 2.05rem); line-height: 1.12; letter-spacing: -.015em; }
.hs-aud-text p { margin-top: .8rem; font-size: 16.5px; line-height: 1.6; color: var(--color-clay-700); max-width: 33rem; }
.hs-aud-text .hs-btn { margin-top: 1.6rem; }
.hs-aud-art { position: relative; margin-top: 1.75rem; aspect-ratio: 392 / 150; }
.hs-aud-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hs-two > * { animation: hs-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
}
@keyframes hs-rise { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }

/* =====================================================================
   MIGRATION: heading on the left, three steps under round white medallions (Dec 2, Ryan, from the layered-depth concept)
   ===================================================================== */
.hs-moves { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .hs-moves { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; } }
.hs-move { display: flex; flex-direction: column; align-items: flex-start; }
.hs-move p { margin-top: .6rem; font-size: 15.5px; line-height: 1.6; color: var(--color-clay-700); max-width: 26rem; }
.hs-move .hs-move-cta { margin-top: auto; padding-top: 1.1rem; }
.hs-medal { display: flex; align-items: center; justify-content: center; width: 132px; height: 132px; margin-bottom: 1.4rem; border-radius: 999px; background: #fff;
  box-shadow: 0 0 0 1px #E8E8E8, 0 22px 40px -22px rgba(28, 28, 28, .42); }

/* a section heading on the left with a link on the right, level with the heading's last line (What we do) */
.hs-sec-head { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
@media (min-width: 768px) { .hs-sec-head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 2rem; } .hs-sec-head > a { align-self: flex-end; margin-bottom: .35rem; } }

/* clouds and birds in the white gap between the hero's sites and the More than hosting heading (wide screens) */
#web-department > div { position: relative; }
.hs-gap-sky { position: absolute; z-index: 3; pointer-events: none; display: none; top: -7rem; right: max(1.5rem, 6%); width: min(26rem, 30vw); }
.hs-gap-sky > svg { display: block; width: 100%; height: auto; overflow: visible; }
.hs-gap-birds { position: absolute; top: 8%; right: 6%; }
.hs-gap-birds svg { width: 84px; height: auto; overflow: visible; }
@media (min-width: 1024px) { .hs-gap-sky { display: block; } }
