/* Brand overrides for the copied theme build (appended, not replacing). */
#header-logo {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
}

.hx-wordmark {
  display: inline-flex;
  align-items: center;
  height: 27px;
  font-family: InstrumentSerif, Switzer, system-ui, sans-serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1;
  text-transform: uppercase;
  color: currentColor;
  white-space: nowrap;
}

/* Display type.
   The theme set every heading in one geometric grotesque, which is the reference
   studio's voice. Display is now an editorial serif: high stroke contrast, tight
   descenders, and a completely different silhouette from a grotesque at the same
   size. Body copy and UI stay on Switzer; labels stay on IBM Plex Mono, so the
   serif only appears where a page is making a statement. */
@font-face {
  font-family: InstrumentSerif;
  src: url(/assets/fonts/InstrumentSerif-Regular.woff2) format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: InstrumentSerif;
  src: url(/assets/fonts/InstrumentSerif-Italic.woff2) format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

h1,
h2,
h3,
h4,
h5,
[id$='-title'],
[id*='-title-'],
#projects-main-title,
#projects-main-title-wrapper,
#projects-main-title-project-number,
#about-who-title-left,
#about-who-title-right,
#about-who-subsection-details,
#about-clients-title,
#about-capability-title,
#end-section-title,
#scroll-nav-text,
#footer-newsletter-header,
#header-menu-newsletter-title,
.about-award-header-title,
.about-capability-card-header-letter,
.project-item-line-2,
.home-reel-title-line,
.end-section-title-line {
  font-family: InstrumentSerif, Switzer, system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: -0.015em;
}

/* The serif has a smaller x-height and a much higher contrast than the grotesque
   it replaces, so the all-caps display lines need a little more air between them
   than the theme's -0.04em tracking. */
[id*='-title-line'],
#about-who-title-left,
#about-who-title-right {
  letter-spacing: 0.005em;
}

/* The home "reel" band.
   The reference studio's showreel lived here as a WebGL video plane plus a clipped
   frame around it. The plane is hidden and the frame is gone; the band is now this
   site's process statement, with its own generated plate where the reel frame was.
   The plate is a DOM image on purpose: it paints above the shared canvas, so it
   cannot be cropped by the video mesh's UVs. */
#home-reel-container-inner {
  display: none !important;
}

#home-reel-thumb {
  overflow: hidden;
  border-radius: 10px;
}

.hx-reel-plate {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The cursor is the theme's own drawn disc; recolouring it is enough to make it
   read as this site's without touching the interaction model. */
#cursor,
.cursor,
#cursor-inner,
#cursor-outer {
  mix-blend-mode: normal;
}

#header.--menu-opened .hx-wordmark {
  /* inherits the header's own colour; the reference keeps it black on the
     white ground even while the menu is open. */
  color: currentColor;
}

/* Both talk pills are real anchors now (they used to be buttons wrapping an empty
   overlay link). Keep the pill geometry and drop the link underline. */
#header-right-talk-btn,
#header-menu-talk {
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* The reference's loading graphic — its pixel word, the progress bar and the elbow
   wipe that sweeps the page away — is the reference studio's visual language, and
   the elbow reads as a stray "L" beside this site's mark. The canvas that draws it
   is hidden, so the preloader shows only the H and the counter. The rule is
   important because the bundle sets display on the canvas inline. */
#transition-overlay {
  display: none !important;
}

/* With the canvas gone, the preloader's own background would go transparent at
   "is-ready" and leave the mark floating over the page while the counter finishes.
   Keep the ground solid until the bundle hides the preloader, so the mark sits on
   black and the page arrives on a clean cut.

   The bundle hides the preloader only once its own load progress reaches 1, so a
   slow or stalled load (large media, weak GPU, throttled connection) would
   otherwise strand a visitor on an opaque black screen. The release animation is
   the net: it is inert whenever the bundle wins the race, and it is the only path
   that lets the page through when the loader never finishes. */
html.is-ready #preloader {
  background-color: var(--color-black) !important;
  animation: hx-preloader-release 700ms cubic-bezier(0.22, 1, 0.36, 1) 8s forwards;
}

@keyframes hx-preloader-release {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

/* The reference preloader shows only rolled digits. The mark sits above them —
   nothing else, no wordmark — so the first thing a visitor sees is the H. */
#preloader-brand {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: hx-preloader-in 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#preloader-brand-mark {
  display: block;
  width: clamp(56px, 6vw, 84px);
  height: clamp(56px, 6vw, 84px);
}

#preloader-brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes hx-preloader-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 10px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 812px) {
  #preloader-brand {
    top: 38%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #preloader-brand {
    animation: none;
  }
}

/* The client-logo wall becomes the real stack. Chips inherit the section colour
   (the About clients section is off-white on black) and the rows get a text
   rhythm instead of the reference's 12vw logo tiles. */
.hx-stack-chip {
  display: inline-flex;
  align-items: center;
  height: 44px;
  margin-right: clamp(20px, 3vw, 56px);
  color: inherit;
  font-family: IBMPlexMono, ui-monospace, monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.85;
}

#about-clients .about-clients-carousel-line {
  min-height: 4.4em;
}

#about-clients .about-clients-carousel-line-wrapper:not(:first-child) {
  margin-top: 0.4em;
}

@media (max-width: 812px) {
  .hx-wordmark {
    height: 20px;
    font-size: 27px;
    letter-spacing: -0.03em;
  }
}
