/*
  Expressive layer. Loaded after the Webflow CSS and embeds.css, so it only
  restyles layout, type and motion; page structure and copy are unchanged.

  Motion is one system: a single easing and duration, and only opacity and a
  short rise, so nothing competes with the headline letter reveal. Reveals
  only apply once MotionLayer has added .fx-on to <html>, so without
  JavaScript or with reduced motion everything shows as normal.

  Sizing aims for several things per screen: banners and blocks are capped
  well below the viewport height so the next section always peeks in.
*/

/* ---------- Type and spacing ----------
   Scale follows what established studio sites use (Pentagram, Collins,
   MassiveMusic, Antfood): body 16–19px, headlines 40–60px, section titles
   28–40px, small uppercase labels. Only the logo is oversized. */
:root {
  --heading--xxl: clamp(2.25rem, 1.6rem + 2vw, 3.75rem);
  --heading--xl: clamp(1.625rem, 1.3rem + 1.1vw, 2.5rem);
  --heading--l: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --heading--m: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --heading--s: clamp(1rem, 0.96rem + 0.15vw, 1.0625rem);
  --spacing--xxl: clamp(4rem, 2.5rem + 5vw, 8rem);
  --spacing--xl: clamp(2.5rem, 1.8rem + 2.5vw, 4.5rem);
  --fx-max: 90rem;
  --fx-gap: clamp(1rem, 0.6rem + 1.2vw, 1.75rem);
  --text-size--tiny: 0.9rem;
  --fx-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fx-duration: 0.8s;
  --fx-measure: 36rem;
  /* Standard height for the image-and-text rows: big imagery, but the next
     section still shows below it. */
  --fx-block: clamp(24rem, 38vw, 40rem);
}

.heading-style-h1 {
  letter-spacing: -0.03em;
  line-height: 1;
  text-wrap: balance;
}

.heading-style-h2 {
  letter-spacing: -0.025em;
  line-height: 1;
  text-wrap: balance;
}

.heading-style-h3 {
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* Body copy: comfortable size, line height and line length. The Webflow grey
   (#a3a3a3) was below readable contrast on white, so copy now takes a softened
   version of its section's own text colour: dark grey on light, light on dark. */
.rich-text-custom p {
  color: color-mix(in srgb, currentColor 74%, transparent);
}

.rich-text-custom p,
.copy-medium {
  font-size: var(--heading--s);
  line-height: 1.55;
  max-width: var(--fx-measure);
  text-wrap: pretty;
}

.video-spot-content .copy-medium,
.hero-content-wrapper .copy-medium {
  font-size: var(--heading--m);
  line-height: 1.4;
}

.hero-content-wrapper .copy-medium {
  margin-inline: auto;
}

.section-hero.is-right-aligned .hero-content-wrapper .copy-medium {
  margin-inline: auto 0;
}

/* Small uppercase labels: the numbered teaser index on Home. */
.fx-index {
  display: flex;
  gap: 0.75em;
  align-items: baseline;
  margin: 0 0 var(--spacing--md);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--_color---copy-grey);
}

.fx-index span {
  color: var(--_color---accent-color-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- Headline reveal: letters rise out of a mask ---------- */
.reveal-word {
  overflow: clip;
  overflow-clip-margin: 0.05em;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  vertical-align: bottom;
}

.reveal-text.is-armed .reveal-letter {
  opacity: 1;
  transform: translateY(110%) rotate(6deg);
  transform-origin: 0 100%;
}

.reveal-text.is-armed.is-revealed .reveal-letter {
  transform: none;
  transition: transform 0.9s var(--fx-ease);
}

/* ---------- Nav: frosted, tucks away on scroll down ---------- */
.navbar {
  background-color: color-mix(in srgb, var(--_color---white) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}

.header {
  transition:
    transform 0.5s var(--fx-ease),
    opacity 0.25s ease;
}

.header.is-tucked {
  transform: translateY(-100%);
}

/* Bigger tap targets and an underline that draws in. */
.navbar-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.15rem;
}

.navbar-link::after {
  content: "";
  position: absolute;
  left: 0.15rem;
  right: 0.15rem;
  bottom: 10px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--fx-ease);
}

.navbar-link:hover::after,
.navbar-link.w--current::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- Focus: visible for keyboards, never for mouse clicks ---------- */
:where(a, button, [role="button"], input, summary, label):focus-visible {
  outline: 2px solid var(--_color---accent-color-1);
  outline-offset: 3px;
}

.video-spot-button:focus-visible,
.cta-link-full-cover:focus-visible {
  outline-offset: -6px;
}

::selection {
  background: var(--_color---accent-color-3);
  color: var(--_color---copy-bright);
}

/* ---------- CTA links: a line that stretches, an arrow that slides ---------- */
.cta-link {
  gap: 0.6em;
  min-height: 44px;
  padding-left: 2.6rem;
  transition: padding 0.5s var(--fx-ease);
}

.cta-link-line {
  width: 2rem;
  opacity: 1;
  transform: none;
  transition: width 0.5s var(--fx-ease);
}

.cta-link-text::after {
  content: "→";
  display: inline-block;
  margin-left: 0.5em;
  transition: transform 0.5s var(--fx-ease);
}

@media (hover: hover) and (pointer: fine) {
  .cta-link:hover,
  .cta-panel:hover .cta-link {
    padding-left: 3.1rem;
  }

  .cta-link:hover .cta-link-line,
  .cta-panel:hover .cta-link .cta-link-line {
    width: 2.5rem;
    opacity: 1;
    transform: none;
  }

  .cta-link:hover .cta-link-text::after,
  .cta-panel:hover .cta-link-text::after {
    transform: translateX(0.2em);
  }
}

/* ---------- Home ---------- */

/* Intro and "Why blut": the question gets more room than the answer, and
   both start on the same line. */
.section-home-intro ._2-column-grid,
.section-home-about ._2-column-grid {
  gap: var(--spacing--xl);
  align-items: flex-start;
}

.section-home-intro .grid-item:first-child,
.section-home-about .grid-item:first-child {
  flex: 1.5;
}

.section-home-intro .spacer-xl-start,
.section-home-about .spacer-xl-start {
  padding-top: clamp(4rem, 3rem + 4vw, 7.5rem);
  padding-bottom: clamp(4rem, 3rem + 4vw, 7.5rem);
}

.section-home-intro .rich-text-custom p,
.section-home-about .rich-text-custom p {
  font-size: var(--heading--m);
  line-height: 1.45;
}

/* Teaser panels: full-width photo and black panel pairs, as before, but one
   standard block tall with the headline a step down so the photo leads. */
.cta-panel .item-inner {
  min-height: var(--fx-block);
  padding: clamp(1.5rem, 1rem + 2vw, 3rem);
}

.cta-panel .item-top {
  padding-bottom: var(--spacing--l);
}

.cta-panel .heading-style-h1 {
  font-size: var(--heading--xl);
  line-height: 1.1;
}

/* ---------- Work: rows ---------- */
.item-inner.is-case-study {
  padding: clamp(1.5rem, 1rem + 2.5vw, 4rem);
}

.item-inner.is-case-study .heading-style-h2 {
  font-size: var(--heading--xl);
}

/* ---------- Sizing: nothing fills the whole screen ---------- */

/* Banners: about half the screen, so the content below is already visible. */
.section-hero {
  height: clamp(24rem, 58svh, 36rem);
  max-height: none;
}

.section-home-stage.is-banner .home-stage-wrapper {
  height: clamp(26rem, 68svh, 44rem);
}

/* Full-width film stills: 16:9, but never taller than ~70% of the screen. */
.video-spot-media {
  aspect-ratio: auto;
  height: min(56.25vw, 72svh);
}

/* Strategy film: full width, cropped to about two thirds of the screen. */
.section-project-video-after-quote .media-frame {
  max-height: 66svh;
  overflow: hidden;
}

/* Content never stretches past a comfortable reading width on big screens. */
.container-large {
  max-width: var(--fx-max);
  margin-inline: auto;
}

/* Small uppercase section labels (About: Mission Statement, Contact, Offices). */
.fx-label,
.fx-index {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

.offices-title {
  font-size: var(--heading--xl);
  margin-top: var(--spacing--sm);
}

/* Two-column rows (Work, Strategy) take one standard block, not 43rem. */
@media screen and (min-width: 992px) {
  .item-inner {
    min-height: var(--fx-block);
  }
}

/* ---------- Scroll reveals (armed by MotionLayer) ---------- */
/* Media fades in; copy fades in with a short rise, a beat later. */
.fx-on .fx-media,
.fx-on .fx-copy {
  opacity: 0;
  transition:
    opacity var(--fx-duration) var(--fx-ease),
    translate var(--fx-duration) var(--fx-ease);
}

.fx-on .fx-copy {
  translate: 0 0.75rem;
  transition-delay: 0.12s;
}

.fx-on .fx-media.is-in,
.fx-on .fx-copy.is-in {
  opacity: 1;
  translate: 0 0;
}

/* ---------- Tablets and phones: columns stack ---------- */
@media screen and (max-width: 991px) {
  .section-home-intro ._2-column-grid,
  .section-home-about ._2-column-grid {
    align-items: stretch;
  }

  .section-home-intro .grid-item:first-child,
  .section-home-about .grid-item:first-child {
    flex: none;
  }

  .section-hero {
    height: auto;
    min-height: clamp(20rem, 50svh, 28rem);
  }

  /* Webflow fixes the text panel to the photo's 1.2 aspect ratio, which the
     headlines can overflow. Let it grow with its copy instead. */
  .cta-panel .item-inner {
    aspect-ratio: auto;
    min-height: 0;
    padding-block: var(--spacing--xl);
  }


}

/* ---------- Phones ---------- */
@media screen and (max-width: 767px) {
  .section-home-intro ._2-column-grid,
  .section-home-about ._2-column-grid {
    gap: var(--spacing--md);
  }

  .cta-panel .item-top {
    padding-bottom: var(--spacing--l);
  }



  /* The logo is small on a phone, so the stage doesn't need most of the screen. */
  .section-home-stage.is-banner .home-stage-wrapper {
    height: clamp(20rem, 50svh, 28rem);
  }

  .navbar-link::after {
    bottom: 8px;
  }
}
