/* Hero options B and C (24 Sept, round 2), on with ?hero=b / ?hero=c.
   See assets/js/hero-options.js for the idea of each. Same H1 in all. */

/* ---------- Shared: the logo band (C) ---------- */
.hero-logos { border-top: 1px solid var(--ed-line); border-bottom: 1px solid var(--ed-line); padding-block: 1.5rem 1.75rem; }
.hero-logos__caption { font-size: .9375rem; color: var(--ed-muted); }
html[data-hero] .home-editorial .hero-logos .hero__clients { margin-top: 1.25rem; max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem 2rem; }
html[data-hero] .home-editorial .hero-logos .hero__client-logo { height: calc(var(--logo-h, 1.4rem) * .9); max-width: none; }

@media (min-width: 1024px) {
  /* ---------- B · Pixels (round 3) ---------- */
  /* Text column: the headline, one sentence, the buttons. The proof line and
     the logos step out (the logos stay in the markup for crawlers). */
  /* The hero and the logo band fill the first screen but a sliver: the
     showreel only just shows at the fold. 125px = the CII bar + navbar,
     8rem = the logo band. */
  html[data-hero="b"] .home-editorial .hero__inner { grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: clamp(2.5rem, 4vw, 4.5rem); padding-block: 3rem 2.5rem; align-items: center; min-height: clamp(34rem, calc(100svh - 125px - 8rem - .75rem), 44rem); }
  html[data-hero="b"] .home-editorial .hero__proof { flex-wrap: nowrap; white-space: nowrap; }
  html[data-hero="b"] .home-editorial .hero__body { gap: 1.875rem; }
  /* Side by side, on one line. */
  html[data-hero="b"] .home-editorial .hero__actions { flex-direction: row; flex-wrap: nowrap; align-items: center; }
  html[data-hero="b"] .home-editorial .hero__actions .ed-button { flex: 0 0 auto; white-space: nowrap; }
  html[data-hero="b"] .home-editorial .hero__body .hero__clients { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  html[data-hero="b"] .home-editorial .hero__title { font-size: clamp(2.375rem, 3.3vw, 3.25rem); line-height: 1.06; }
  html[data-hero="b"] .home-editorial .hero__media { height: auto; width: 100%; }
}
.hero-cluster { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 8px; aspect-ratio: 6 / 4; }
.hero-cluster__tile { position: relative; overflow: hidden; min-width: 0; min-height: 0; animation: cluster-in 700ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 70ms); }
.hero-cluster__tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 13 Oct 2026: the app tile is a card on the project's dream plate (the
   AI_Bg package, Brosam), the client's mark white at the top under a light
   veil, Lena's phones fanned on the ground. Cards slide up at each change. */
.hero-cluster__tile--app { background: #dfe8ff; }
.hero-cluster__tile .hero-app { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.hero-cluster__tile .hero-app__ground { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The project's photograph on the upper half, dissolving down into the plate (Hulusi: real imagery and the dream plate together). */
.hero-cluster__tile .hero-app__photo { position: absolute; inset: 0 0 auto; width: 100%; height: 58%; object-fit: cover; object-position: 50% 30%; -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent); mask-image: linear-gradient(180deg, #000 35%, transparent); }
.hero-app::before { content: ""; position: absolute; inset: 0 0 55%; z-index: 1; background: linear-gradient(180deg, rgb(6 14 40 / .55), rgb(6 14 40 / 0)); pointer-events: none; }
.hero-cluster__tile .hero-app__logo { position: absolute; left: 10%; top: 6%; z-index: 2; width: auto; height: clamp(.75rem, 1vw, 1.125rem); max-width: 80%; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
/* The tile is twice as tall as wide: the two phones sit on one diagonal, the second a step lower and to the right, both bleeding off the edges a little. */
.hero-cluster__tile .hero-app__phone { position: absolute; z-index: 2; width: auto; height: 60%; object-fit: contain; filter: drop-shadow(0 18px 26px rgb(0 10 60 / .45)); }
.hero-cluster__tile .hero-app__phone[data-phones="1"] { left: 50%; top: 24%; translate: -50% 0; height: 66%; }
.hero-cluster__tile .hero-app__phone--1[data-phones="2"] { left: -8%; top: 20%; }
.hero-cluster__tile .hero-app__phone--2[data-phones="2"] { right: -10%; top: 42%; }
.hero-cluster__tile .hero-app__still { position: absolute; inset: auto 6% 10%; width: 88%; height: auto; max-height: 72%; object-fit: contain; z-index: 2; filter: drop-shadow(0 16px 24px rgb(0 10 60 / .35)); }
/* One upright phone at a time, whole, centred on the plate. */
.hero-cluster__tile--app .hero-app { opacity: 0; transform: translateY(6px); transition: opacity 900ms ease, transform 1200ms cubic-bezier(.2, .8, .2, 1); }
.hero-cluster__tile--app .hero-app.is-on { opacity: 1; transform: none; }
.hero-cluster__tile--kpi { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0; background: #0b2a8a; color: #fff; }
/* 13 Oct 2026: each figure on the plate of its project, a veil at the foot for the white text. */
.hero-cluster__tile--kpi > div { position: relative; isolation: isolate; }
.hero-cluster__tile .hero-kpi__ground { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-cluster__tile--kpi > div::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(6 14 40 / .08), rgb(6 14 40 / .62)); }
.hero-cluster__tile--kpi > div { grid-area: 1 / 1; display: grid; align-content: end; gap: .125rem; padding: .75rem; opacity: 0; transform: translateY(6px); transition: opacity 500ms ease-out, transform 600ms cubic-bezier(.2, .8, .2, 1); }
.hero-cluster__tile--kpi > div.is-on { opacity: 1; transform: none; }
.hero-cluster__tile--kpi small { font-size: .8125rem; opacity: .7; }
/* The photos breathe: a very slow drift, out of phase. */
.hero-cluster__tile--photo img { animation: cluster-drift 16s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -3s); }
@keyframes cluster-drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.08) translate(-1.5%, -1%); } }
.hero-cluster__tile--kpi b { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1; letter-spacing: -.03em; font-weight: 500; }
.hero-cluster__tile--kpi span { font-size: .8125rem; line-height: 1.25; opacity: .9; }
/* Loose pixels: a half-cell square hanging off the cluster's steps. */
.hero-cluster__tile--px { overflow: visible; }
.hero-cluster__tile--px::after { content: ""; position: absolute; width: 46%; aspect-ratio: 1; background: var(--brand); }
.hero-cluster__tile--tr::after { left: 0; bottom: 0; }
.hero-cluster__tile--bl::after { right: 0; top: 0; }
.hero-cluster__tile--soft::after { left: 0; top: 0; background: #dbe5ff; }
@keyframes cluster-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .hero-cluster__tile, .hero-cluster__tile--photo img { animation: none; } .hero-cluster__tile--app .hero-app, .hero-cluster__tile--kpi > div { transition: none; } }

/* ---------- The logo band under hero B ---------- */
.hero-marquee { padding-block: 1rem 2.25rem; overflow: hidden; }
.hero-marquee__head p { font-size: .9375rem; color: var(--ed-muted); }
.hero-marquee__track { display: flex; width: max-content; animation: hero-marquee 48s linear infinite;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.hero-marquee:hover .hero-marquee__track { animation-play-state: paused; }
.home-editorial .hero-marquee .hero-marquee__list { display: flex; align-items: center; gap: 4.5rem; padding-right: 4.5rem; margin: 0; list-style: none; max-width: none; }
.home-editorial .hero-marquee .hero__client-logo { height: calc(var(--logo-h, 1.4rem) * 1.25); width: auto; max-width: none; filter: brightness(0); opacity: .58; }
.home-editorial .hero-marquee .hero__client-logo[data-logo-tone="detail"] { filter: grayscale(1) contrast(1.15) brightness(.7); opacity: .7; }
@keyframes hero-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .hero-marquee__track { animation: none; width: auto; mask-image: none; -webkit-mask-image: none; }
  .hero-marquee__track > [aria-hidden] { display: none; }
  .home-editorial .hero-marquee .hero-marquee__list { flex-wrap: wrap; justify-content: center; gap: 1.5rem 3rem; padding-inline: var(--ed-gutter); }
}

@media (min-width: 1024px) {
  /* ---------- C · Clair ---------- */
  html[data-hero="c"] .home-editorial .hero__inner { grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: clamp(3rem, 5vw, 5rem); padding-block: 3rem 2.5rem; align-items: center; min-height: clamp(34rem, calc(100svh - 125px - 8rem - .75rem), 44rem); }
  html[data-hero="c"] .home-editorial .hero__body { gap: 1.875rem; }
  html[data-hero="c"] .home-editorial .hero__title { font-size: clamp(2.375rem, 3.3vw, 3.25rem); line-height: 1.06; }
  html[data-hero="c"] .home-editorial .hero__proof { flex-wrap: nowrap; white-space: nowrap; }
  html[data-hero="c"] .home-editorial .hero__body .hero__clients { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  html[data-hero="c"] .home-editorial .hero__actions { flex-direction: row; flex-wrap: nowrap; }
  html[data-hero="c"] .home-editorial .hero__actions .ed-button { flex: 0 0 auto; white-space: nowrap; }
  html[data-hero="c"] .home-editorial .hero__media { height: auto; width: 100%; }
}
/* One picture, 5:4, the bottom-left corner stepped out in three pixel
   squares: the cut is filled with cobalt, not left as white holes. */
.hero-clean { --p: clamp(1.5rem, 2.6vw, 2.25rem); position: relative; aspect-ratio: 5 / 4; }
.hero-clean__frame {
  position: absolute; inset: 0; overflow: hidden; border-radius: 6px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, calc(var(--p) * 3) 100%, calc(var(--p) * 3) calc(100% - var(--p)), calc(var(--p) * 2) calc(100% - var(--p)), calc(var(--p) * 2) calc(100% - var(--p) * 2), var(--p) calc(100% - var(--p) * 2), var(--p) calc(100% - var(--p) * 3), 0 calc(100% - var(--p) * 3));
}
.hero-clean__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 1200ms ease-in-out, transform 6s ease-out; }
.hero-clean__frame img.is-on { opacity: 1; transform: scale(1); }
.hero-clean__px { position: absolute; width: var(--p); height: var(--p); background: var(--brand); }
.hero-clean__px--1 { left: 0; bottom: 0; }
.hero-clean__px--2 { left: var(--p); bottom: var(--p); background: #7ea6ff; }
.hero-clean__px--3 { left: calc(var(--p) * 2); bottom: 0; background: #dbe5ff; }
@media (prefers-reduced-motion: reduce) { .hero-clean__frame img { transition: none; transform: none; } }

/* ---------- The living mosaic (B, round 6) ---------- */
/* Each tile is placed from its grid cell: --c/--r (0-based) and --w/--h
   (spans) on a 6 x 4 grid with an 8px gap. Moving between layouts eases
   left/top/width/height, so pictures reframe (object-fit) rather than
   stretch. A tile that leaves folds to nothing where it stood. */
.hero-cluster--live { position: relative; display: block; aspect-ratio: 6 / 4; --g: 8px; }
.hero-cluster--live .hero-cluster__tile {
  position: absolute; animation: none; overflow: hidden;
  /* One duration, one easing, no delay: shared edges move as one. */
  transition: left 1600ms cubic-bezier(.45, .05, .25, 1), top 1600ms cubic-bezier(.45, .05, .25, 1), width 1600ms cubic-bezier(.45, .05, .25, 1), height 1600ms cubic-bezier(.45, .05, .25, 1);
}
.hero-cluster--live .hero-cluster__tile--photo img { animation: none; }
.hero-cluster__layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1000ms ease 600ms; }
.hero-cluster__layer.is-on { opacity: 1; }
.hero-cluster__layer > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-cluster__layer > .hero-cluster__tile--quote { position: absolute; inset: 0; }
@media (prefers-reduced-motion: reduce) { .hero-cluster--live .hero-cluster__tile, .hero-cluster__layer { transition: none; } }
/* Quote and logo tiles: contents crossfade inside a still tile. */
.hero-cluster__tile--quote { background: #f2f5ff; color: var(--ed-ink); }
.hero-cluster__tile--quote figure { position: absolute; inset: 0; margin: 0; padding: 1.125rem 1.25rem; display: grid; align-content: space-between; opacity: 0; transition: opacity 900ms ease; }
.hero-cluster__tile--quote figure.is-on { opacity: 1; }
.hero-cluster__tile--quote .quote-logo { height: 1.625rem; width: auto; max-width: 7.5rem; object-fit: contain; object-position: left center; filter: grayscale(1); opacity: .8; mix-blend-mode: multiply; }
.hero-cluster__tile--quote figure { grid-template-rows: auto 1fr auto; align-content: stretch; gap: .5rem; padding: 1rem 1.125rem; }
.hero-cluster__tile--quote blockquote { margin: 0; align-self: center; font-size: clamp(.875rem, .95vw, 1.0625rem); line-height: 1.38; letter-spacing: -.01em; }
.hero-cluster__tile--quote figcaption { display: grid; font-size: .8125rem; color: var(--ed-muted); line-height: 1.35; }
.hero-cluster__tile--quote figcaption b { font-weight: 500; color: var(--ed-ink); }
.hero-cluster__tile--logo { background: #fff; outline: 1px solid var(--ed-line); outline-offset: -1px; }
.hero-cluster__tile--logo img { position: absolute; inset: 0; margin: auto; max-width: 64%; max-height: 38%; width: auto; height: auto; filter: brightness(0); opacity: 0; transition: opacity 900ms ease; }
.hero-cluster__tile--logo img.is-on { opacity: .58; }
.hero-cluster__tile--logo img[data-logo-tone="detail"] { filter: grayscale(1) contrast(1.15) brightness(.7); }
.hero-cluster__tile--logo img[data-logo-tone="detail"].is-on { opacity: .7; }
.hero-cluster--live .hero-cluster__tile--photo img { animation: none; transition: transform 6s ease-out; }
@media (prefers-reduced-motion: reduce) { .hero-cluster--live .hero-cluster__tile { transition: none; } }

/* Logos (round 6): larger, and closer under the hero. */
html[data-hero="b"] .home-editorial .hero-marquee { padding-block: 0 2rem; margin-top: -.75rem; }
html[data-hero="b"] .home-editorial .hero-marquee .hero__client-logo { height: calc(var(--logo-h, 1.4rem) * 1.5); }
html[data-hero="b"] .home-editorial .hero-marquee .hero-marquee__list { gap: 5.5rem; padding-right: 5.5rem; }

/* Large screens (Hulusi's 27-inch): the hero grows with the room instead of
   floating small in it. Wider column, larger type and pictures; the height
   stays capped above so the fold keeps its rhythm. */
@media (min-width: 1800px) {
  html[data-hero="b"] .home-editorial .hero__inner.container { width: min(100% - 10rem, 112rem); max-width: 112rem; }
  html[data-hero="b"] .home-editorial .hero__inner { min-height: max(40rem, calc(100svh - 125px - 10rem)); gap: 6rem; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  html[data-hero="b"] .hero-marquee { padding-block: 1.5rem 3rem; }
  html[data-hero="b"] .home-editorial .hero__title { font-size: clamp(3.25rem, 3.4vw, 4.75rem); }
  html[data-hero="b"] .home-editorial .hero__lede { font-size: 1.3125rem; max-width: 34rem; }
  html[data-hero="b"] .home-editorial .hero__proof, html[data-hero="b"] .home-editorial .hero__chip-value, html[data-hero="b"] .home-editorial .hero__chip-label { font-size: 1rem; }
  html[data-hero="b"] .home-editorial .hero__actions .ed-button { min-height: 3.5rem; padding-inline: 1.75rem; font-size: 1.0625rem; }
  .hero-cluster { gap: 10px; }
  .hero-cluster__tile--kpi b { font-size: 2.5rem; }
  .hero-cluster__tile--kpi span, .hero-cluster__tile--kpi small { font-size: .9375rem; }
  html[data-hero="b"] .home-editorial .hero-marquee .hero__client-logo { height: calc(var(--logo-h, 1.4rem) * 1.75); }
}

/* The option switch, localhost only. */
.hero-switch { position: fixed; left: 1rem; bottom: 4.25rem; z-index: 90; display: flex; background: #fff; border: 1px solid #d8dce1; font-size: .875rem; }
.hero-switch a { padding: .625rem .875rem; color: #51565e; text-decoration: none; }
.hero-switch a[aria-current="true"] { background: #121417; color: #fff; }
.hero-cluster__tile--kpi span { overflow-wrap: anywhere; hyphens: auto; }


/* ---------- Changes inside a pane (round 11) ---------- */
/* Fades for photos, figure and testimonials: the old one fades out, the new
   one fades in after it, never both visible at once. */
.hero-cluster--live .hero-cluster__layer,
.hero-cluster--live .hero-cluster__tile--kpi > div,
.hero-cluster--live .hero-cluster__tile--quote figure { opacity: 0; transform: none; transition: opacity 700ms ease; }
.hero-cluster--live .hero-cluster__layer.is-on,
.hero-cluster--live .hero-cluster__tile--kpi > div.is-on,
.hero-cluster--live .hero-cluster__tile--quote figure.is-on { opacity: 1; transition: opacity 800ms ease 700ms; }
/* In step with the pane's 1.6 s resize: out in the first half, in the second. */
/* The phone slides: out the top, the next one up from the bottom. */
.hero-cluster--live .hero-cluster__tile--app .hero-app { opacity: 1; visibility: hidden; transform: translateY(115%); transition: none; }
.hero-cluster--live .hero-cluster__tile--app .hero-app.is-on { visibility: visible; transform: none; transition: transform 1000ms cubic-bezier(.65, 0, .35, 1); }
.hero-cluster--live .hero-cluster__tile--app .hero-app.from-up { visibility: visible; transform: translateY(115%); transition: none; }
.hero-cluster--live .hero-cluster__tile--app .hero-app.to-up { visibility: visible; transform: translateY(-115%); transition: transform 1000ms cubic-bezier(.65, 0, .35, 1); }
.hero-cluster--live .hero-cluster__tile--app .hero-app.is-parked { transition: none; }
/* Testimonials: larger words, the card's space used. */
.hero-cluster--live .hero-cluster__tile--quote blockquote { font-size: clamp(1rem, 1.2vw, 1.25rem); line-height: 1.32; }
.hero-cluster--live .hero-cluster__tile--quote figure { padding: 1.25rem 1.375rem; }
@media (prefers-reduced-motion: reduce) { .hero-cluster--live * { transition: none !important; } }
