/* Showcase hero (preview page only: showcase-hero.html). The stage holds one showcase image per section instead of
   a Hairline figure; the headline is the board headline of that section (Seb 2026-11-10). Showcase on the left, text
   on the right (the data-flip layout), section pills, buttons and see-work link as on the live hero. */

/* ---- paper grid over the paper texture, in the coral accent (Seb 2026-11-10). 20px cells on the lattice that
   js/main.js already aligns the copy and stage to, a stronger line every 100px. ---- */
.hero[data-showcase]::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(239, 77, 35, .13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(239, 77, 35, .13) 1px, transparent 1px),
    linear-gradient(to right, rgba(239, 77, 35, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(239, 77, 35, .055) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: var(--gx, 0px) 0;   /* js/showcase-hero.js: a major line through the middle of the screen */
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
          mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.hero[data-showcase] .hero__glow { opacity: .45; }
.hero[data-showcase] .hero__halo { display: none; }

/* ---- the stage: one image per section ---- */
.hero[data-showcase] .hero__figs { inset: 0; }
.hero__show {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center;
  opacity: 0; transform: translate3d(40px, 0, 0) scale(.965);
  transition: opacity .4s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none; user-select: none;   /* no permanent will-change: it kept the showcase rastered at its entrance scale, which blurred it */
}
.hero__show.is-on { opacity: 1; transform: none; transition-delay: .08s, .08s; }
.hero__show.is-out { opacity: 0; transform: translate3d(-32px, 0, 0) scale(.975); transition-duration: .28s, .4s; transition-delay: 0s; }

/* ---- the main button in each section's colour (Seb 2026-11-10 15:36), all with white text at 4.5:1 or more ---- */
.hero[data-showcase] { --cta: #d63d16; --cta-hover: #b22f10; --cta-shadow: rgba(214, 61, 22, .35); }
.hero[data-showcase][data-scene="campaigns"] { --cta: #6d47e6; --cta-hover: #5a32d6; --cta-shadow: rgba(109, 71, 230, .32); }
.hero[data-showcase][data-scene="content"] { --cta: #0f70b8; --cta-hover: #005bad; --cta-shadow: rgba(15, 112, 184, .32); }
.hero[data-showcase][data-scene="digital"] { --cta: #15803d; --cta-hover: #166534; --cta-shadow: rgba(21, 128, 61, .32); }
.hero[data-showcase] .hero__ctas .spcs-btn--primary { background: var(--cta); box-shadow: 0 6px 18px var(--cta-shadow); transition: background-color .35s ease, box-shadow .35s ease, transform .2s ease; }
.hero[data-showcase] .hero__ctas .spcs-btn--primary:hover { background: var(--cta-hover); }

/* ---- the showcase layers and their entrances (Seb 2026-11-10, round 8) ----
   The box still slides in as a whole (above); inside it the parts come in one by one. The resting state of every
   layer is the finished picture, so a section that is leaving, or a reader who prefers less motion, sees it whole.
   Brand: the lines are drawn, then the figures, then colours and borders, then the title block.
   Campaigns: each card slides in from the outer edge it faces, clipped to its own slot.
   Content: the phones come up one after the other while the route between their apps is drawn.
   Digital: each page rises; the line runs to its dot while it does and the dot lands with the page. */
.hero__show .lyr { position: absolute; display: block; max-width: none; margin: 0; }
.hero__show img.lyr, .hero__show .lyr--clip > img { object-fit: fill; }
.hero__show .lyr--clip { overflow: hidden; }
.hero__show .lyr--clip > img { display: block; width: 100%; height: 100%; }
.hero__show .lyr-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hero__show .dr { stroke-dasharray: 1.02 2; }
.hero__show .lyr--line { color: #15803d; overflow: hidden; }
.hero__show .lyr--dot { border-radius: 50%; background: #15803d; }
.hero__show .lyr--dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid #15803d; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  /* one speed for every entrance; Seb 15:15 asked for all of them faster */
  .hero__show { --sh-speed: .6; }
  .hero__show.is-on .a-rise { animation: sh-rise calc(var(--dur, .7s) * var(--sh-speed)) cubic-bezier(.45, 0, .2, 1) calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .a-up { animation: sh-up calc(.6s * var(--sh-speed)) cubic-bezier(.22, 1, .36, 1) calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .a-fade { animation: sh-fade calc(.4s * var(--sh-speed)) ease-out calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .a-wipe { animation: sh-wipe calc(var(--dur, .8s) * var(--sh-speed)) cubic-bezier(.45, 0, .55, 1) calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .a-draw { animation: sh-wipe calc(var(--dur, .6s) * var(--sh-speed)) cubic-bezier(.45, 0, .2, 1) calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .a-pop { animation: sh-pop calc(.45s * var(--sh-speed)) cubic-bezier(.3, 1.6, .5, 1) calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .a-pop::after { animation: sh-ring calc(.6s * var(--sh-speed)) ease-out calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .a-from-top { animation: sh-from-top calc(.9s * var(--sh-speed)) cubic-bezier(.22, 1, .36, 1) calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .a-from-right { animation: sh-from-right calc(.9s * var(--sh-speed)) cubic-bezier(.22, 1, .36, 1) calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .a-from-bottom { animation: sh-from-bottom calc(.9s * var(--sh-speed)) cubic-bezier(.22, 1, .36, 1) calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .a-from-left { animation: sh-from-left calc(.9s * var(--sh-speed)) cubic-bezier(.22, 1, .36, 1) calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .dr { animation: sh-stroke calc(.9s * var(--sh-speed)) cubic-bezier(.45, 0, .3, 1) calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .tx { animation: sh-fade calc(.5s * var(--sh-speed)) ease-out calc(var(--d, 0s) * var(--sh-speed)) both; }
  .hero__show.is-on .ink { animation: sh-fade calc(.6s * var(--sh-speed)) ease-out calc(var(--d, 0s) * var(--sh-speed)) both; }
}
@keyframes sh-rise { from { opacity: 0; transform: translate3d(0, 56px, 0); } 40% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes sh-up { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@keyframes sh-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sh-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sh-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes sh-ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(3.4); } }
@keyframes sh-from-top { from { opacity: 0; transform: translate3d(0, -100%, 0); } 45% { opacity: 1; } to { transform: none; } }
@keyframes sh-from-right { from { opacity: 0; transform: translate3d(100%, 0, 0); } 45% { opacity: 1; } to { transform: none; } }
@keyframes sh-from-bottom { from { opacity: 0; transform: translate3d(0, 100%, 0); } 45% { opacity: 1; } to { transform: none; } }
@keyframes sh-from-left { from { opacity: 0; transform: translate3d(-100%, 0, 0); } 45% { opacity: 1; } to { transform: none; } }
@keyframes sh-stroke { from { stroke-dashoffset: 1.02; } to { stroke-dashoffset: 0; } }

/* ---- the board headlines, stacked in one cell so the block keeps the height of the tallest ---- */
.hero__title--src { position: absolute !important; visibility: hidden; pointer-events: none; }
.hero[data-showcase] .hero__headline {
  letter-spacing: -0.015em;
  display: grid; white-space: normal; text-wrap: balance;
  font-size: 39.2px; line-height: 40px;   /* two rows of the 20px grid per line */
}
@media (min-width: 1100px) { .hero[data-showcase] .hero__headline { font-size: 58.8px; line-height: 60px; } }   /* three rows */
.hero__headline .hl {
  grid-area: 1 / 1; align-self: end; opacity: 0; transform: translate3d(0, 18px, 0);
  transition: opacity .3s cubic-bezier(.22, 1, .36, 1), transform .5s cubic-bezier(.22, 1, .36, 1);
}
.hero__headline .hl.is-on { opacity: 1; transform: none; transition-delay: .06s; }
.hero__headline .hl.is-out { opacity: 0; transform: translate3d(0, -12px, 0); transition-duration: .2s, .32s; transition-delay: 0s; }
/* the key word: Nohemi SemiBold in the service colour, one step heavier than the Medium headline */
.hero__headline .hand { font-family: var(--font-hand); font-weight: 600; letter-spacing: -0.015em; }
.hero__headline [data-tab="brand"] .hand { color: #ef4d23; }
.hero__headline [data-tab="campaigns"] .hand { color: #6d47e6; }
.hero__headline [data-tab="content"] .hand { color: #0f70b8; }
.hero__headline [data-tab="digital"] .hand { color: #16a34a; }

@media (prefers-reduced-motion: reduce) {
  .hero__show, .hero__show.is-out, .hero__headline .hl, .hero__headline .hl.is-out { transform: none; transition: opacity .2s linear; transition-delay: 0s; }
}

/* ---- section eyebrow, part of each headline so it always sits right above it (hidden from screen readers) ---- */
.hero__headline .hl__eb {
  display: block; margin: 0 0 20px; font: 600 12px/1 var(--font-body, 'DM Sans', sans-serif); letter-spacing: .18em;
  text-transform: uppercase; white-space: nowrap;
}
.hero__headline [data-tab="brand"] .hl__eb { color: #d63d16; }
.hero__headline [data-tab="campaigns"] .hl__eb { color: #5a32d6; }
.hero__headline [data-tab="content"] .hl__eb { color: #005bad; }
.hero__headline [data-tab="digital"] .hl__eb { color: #15803d; }
@media (max-width: 767px) { .hero__headline .hl__eb { display: none; } }

/* ---- phones and upright tablets: stage above the headline, a little taller ---- */
.hero[data-showcase][data-layout^="center"] .hero__stage { --fig-h: clamp(240px, 40svh, 360px); width: min(100%, calc(var(--fig-h) * 1.2)); }

@media (min-width: 768px) {
  .hero[data-showcase][data-layout="center-figure-top"] .hero__stage { --fig-h: clamp(320px, 50vh, 480px); width: min(100%, calc(var(--fig-h) * 1.22)); }
  .hero[data-showcase][data-flip] .hero__headline { max-width: 13ch; }

  /* wider section switch: the four sections share a track about half the frame wide */
  /* a multiple of 40px wide and centred, so both ends sit on grid lines */
  .hero[data-showcase][data-layout^="center"] .hero__dots { width: min(100%, 720px); justify-content: space-between; box-sizing: border-box; }
  .hero[data-showcase][data-layout^="center"] .hero__dot { flex: 1 1 0; justify-content: center; }
}
/* full first screen on desktop (same query as "Full first screen" in styles.css): a bigger showcase */
@media (min-width: 768px) and (min-height: 620px) and (min-aspect-ratio: 5/4) {
  .hero[data-showcase][data-layout="center-figure-top"] .hero__stage { --fig-h: clamp(340px, min(70vh, 100vh - 260px), 760px); width: min(100%, calc(var(--fig-h) * 1.22)); }
}
@media (min-width: 1100px) {
  .hero[data-showcase][data-layout^="center"] .hero__dots { width: 800px; }
}
@media (min-width: 768px) and (any-pointer: fine) {
  .hero[data-showcase][data-layout^="center"] .hero__dots { height: 40px; padding: 2px; }
  .hero[data-showcase][data-layout^="center"] .hero__dot { height: 36px; }
}
/* the label itself sits in the middle of its pill, the icon hangs to its left (Seb 15:16): a spacer the width of
   icon + gap on the right of the label balances the icon on its left */
.hero[data-showcase][data-layout^="center"] .hero__dot-label { margin-right: calc(18px + var(--dot-gap, 3px)); }
@media (min-width: 1100px) and (min-height: 620px) and (min-aspect-ratio: 5/4) {
  .hero[data-showcase][data-layout="center-figure-top"][data-flip] .hero__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
}

/* ---- scroll cue: bottom left of the first screen, a line that runs down once every few seconds ---- */
.hero__scroll {
  position: absolute; z-index: 2; left: max(var(--container-pad, 24px), calc((100% - var(--container-max, 1280px)) / 2 + var(--container-pad, 24px)));
  top: calc(100svh - 81px - 112px);
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  min-width: 44px; min-height: 44px; padding: 6px 4px;
  font: 600 11px/1 var(--font-body, 'DM Sans', sans-serif); letter-spacing: .18em; text-transform: uppercase;
  color: var(--fg-muted, #6e6960); text-decoration: none;
}
.hero__scroll span { writing-mode: vertical-rl; transform: rotate(180deg); }
.hero__scroll i { position: relative; display: block; width: 1px; height: 44px; background: rgba(46, 43, 39, .18); overflow: hidden; }
.hero__scroll i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ha, #ef4d23);
  animation: hero-scroll 2.4s cubic-bezier(.22, 1, .36, 1) infinite;
}
.hero__scroll:hover, .hero__scroll:focus-visible { color: var(--studio-neutral-800, #2e2b27); }
@keyframes hero-scroll { 0% { top: -40%; } 60%, 100% { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .hero__scroll i::after { animation: none; top: 30%; } }
@media (max-width: 767px), (max-height: 619px) { .hero__scroll { display: none; } }

/* ---- phones: the whole first screen fits, nav to buttons (Seb 2026-11-10). The stage takes what the text leaves,
   between 150 and 340px tall; the sub-brand note moves out of the hero. ---- */
@media (max-width: 767px) {
  .hero[data-showcase][data-layout^="center"] .hero__stage { --fig-h: clamp(140px, calc(100svh - 480px), 340px); width: min(100%, calc(var(--fig-h) * 1.25)); }
  .hero[data-showcase] .hero__headline { font-size: 34px; line-height: 40px; margin-bottom: 0; }
  .hero[data-showcase] .hero__desc { margin-top: 12px; font-size: 16px; line-height: 1.5; }
  .hero[data-showcase] .hero__dots { margin-top: 16px; }
  .hero[data-showcase] .hero__ctas { margin-top: 16px; gap: 4px; }
  .hero[data-showcase] .hero__ctas .hero__link { min-height: 44px; display: inline-flex; align-items: center; }
  .hero[data-showcase] .hero__note { display: none; }
}
