/* ImmerShift design tokens
 * ------------------------------------------------------------------
 * Values are counted from the Claude Design export, not from a token
 * file. DESIGN/_ds/tokens/colors.css disagrees on the navy — it is a
 * parallel exploration and is not used. The pages use #000975.
 *
 * Authority order: DESIGN/CLAUDE.md, then the pages themselves.
 * Never introduce a colour or font outside this file.
 * ------------------------------------------------------------------ */

@font-face {
  font-family: 'gallery_modernregular';
  src: url('../fonts/gallerymodern-webfont.woff2') format('woff2'),
       url('../fonts/gallerymodern-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- Core palette, with usage counts from the 58 designs --------- */
  --ims-navy:        #000975;  /* 122x  the brand navy                */
  --ims-stabilo:     #EADD23;  /*  66x  neon highlight, tags, pills   */
  --ims-white:       #FFFFFF;  /*  46x                                */
  --ims-body:        #5D5D63;  /*  29x  body copy                     */
  --ims-space:       #020027;  /*  23x  deep space, dark sections     */
  --ims-navy-tint:   #C7C9E0;  /*  21x  muted navy on dark            */
  --ims-hairline:    #EAEAEB;  /*  18x  borders, rules                */
  --ims-ground:      #F4F4F4;  /*  16x  light section ground          */
  --ims-orange:      #E68226;  /*  14x  secondary / hover             */
  --ims-on-dark:     #F5F7F5;  /*  13x  text on navy                  */
  --ims-ink:         #1E1E1E;  /*   9x  button label on light fill    */
  --ims-grey:        #353536;  /*   4x  cosmic dirt grey              */
  --ims-sun:         #F69126;  /*   3x  sunset sun                    */
  --ims-burnt:       #A8500C;  /*   3x  small orange text on light    */
  --ims-ghost:       #E5E1E7;  /*   2x  ghost white                   */
  --ims-muted:       #8D90B4;  /*   1x  footer copyright, on dark only */

  /* --- Home hero wash ----------------------------------------------
   * Two stacked radial gradients. The design shipped a blue layer and a
   * lilac/pink layer; the lilac and pink are not in the brand palette,
   * so they are tokens rather than literals. Change these four values
   * and the whole hero changes with them.
   *
   * Design originals, for reference:
   *   layer 1  rgba(214,229,255,.95) -> rgba(198,205,246,.72)
   *   layer 2  rgba(233,214,240,.80) -> rgba(246,226,236,.42)   <- the
   *            lilac and pink that read as purple-red
   *
   * Current values pull layer 2 onto the brand's own navy tint. */
  --ims-hero-1a: rgba(214, 229, 255, .95);  /* blue core        */
  --ims-hero-1b: rgba(198, 205, 246, .72);  /* blue falloff     */
  --ims-hero-2a: rgba(199, 201, 224, .80);  /* was lilac        */
  --ims-hero-2b: rgba(229, 225, 231, .42);  /* was pink         */

  /* --- Typography -------------------------------------------------
   * Marcellus ships one weight only. Never faux-bold it.
   * gallery_modern is the accent face, used sparingly.               */
  --ims-font-display: 'Marcellus', Georgia, serif;
  --ims-font-body:    'Poppins', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --ims-font-accent:  'gallery_modernregular', 'Marcellus', Georgia, serif;

  --ims-weight-display: 400;

  /* Display */
  --ims-size-display-1: clamp(40px, 5.6vw, 64px);
  --ims-size-display-2: clamp(32px, 4.2vw, 48px);
  --ims-lh-display: 1.04;
  --ims-ls-display: -0.012em;

  /* Headings */
  --ims-size-h1: clamp(30px, 3.6vw, 40px);
  --ims-size-h2: clamp(25px, 2.9vw, 32px);
  --ims-size-h3: 24px;
  --ims-size-h4: 20px;

  /* Body */
  --ims-size-body-lg: 18px;  --ims-lh-body-lg: 1.72;
  --ims-size-body:    16px;  --ims-lh-body:    1.75;
  --ims-size-body-sm: 14px;  --ims-lh-body-sm: 1.62;

  /* Eyebrow — the uppercase wide-tracked label above every section */
  --ims-size-eyebrow: 13px;
  --ims-ls-eyebrow: 0.2em;
  --ims-weight-eyebrow: 700;

  /* --- Layout ------------------------------------------------------ */
  --ims-container: 1800px;   /* the design's header/footer max width  */
  --ims-content:   1290px;   /* boxed content width                   */
  --ims-gutter:    clamp(24px, 4vw, 60px);

  /* --- Spacing ----------------------------------------------------- */
  --ims-space-xs:  8px;
  --ims-space-sm:  16px;
  --ims-space-md:  24px;
  --ims-space-lg:  40px;
  --ims-space-xl:  80px;
  --ims-space-2xl: 120px;

  /* --- Motion ------------------------------------------------------
   * One curve for everything, matching reveals.js so GSAP effects and
   * CSS reveals feel like one hand made them.                        */
  --ims-ease:      cubic-bezier(.22, 1, .36, 1);
  --ims-dur-fast:  .3s;
  --ims-dur:       .6s;
  --ims-dur-slow:  .9s;
}

/* ------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------ */

body {
  font-family: var(--ims-font-body);
  font-size: var(--ims-size-body);
  line-height: var(--ims-lh-body);
  color: var(--ims-body);
  background: var(--ims-white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ims-font-display);
  font-weight: var(--ims-weight-display);
  color: var(--ims-navy);
  letter-spacing: var(--ims-ls-display);
}

/* ------------------------------------------------------------------
 * Motion
 *
 * reveals.js owns content visibility and needs NO pre-hidden CSS —
 * its fallback state is visible and it applies inline styles itself.
 * Nothing here may hide content. That is a hard rule from
 * DESIGN/CLAUDE.md, and the reason the split-text effects were cut.
 * ------------------------------------------------------------------ */

.ims-magnetic { display: inline-block; will-change: transform; }

.ims-marquee { overflow: hidden; display: flex; }
.ims-marquee > * { flex: 0 0 auto; }

.ims-pin-scroll { position: relative; overflow: hidden; }

.ims-animating { will-change: transform, opacity; }

/* Custom cursor ring, wide viewports only. */
.ims-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border: 1px solid rgba(0, 9, 117, .45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 200;
  transform: translate3d(-100px, -100px, 0);
}

/* Preloader */
.ims-preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--ims-space);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s ease;
}
.ims-preloader[hidden] { display: none !important; }
.ims-preloader__anim { width: min(460px, 64vw); aspect-ratio: 1 / 1; }

/* ------------------------------------------------------------------
 * Content components — output of the core plugin's shortcodes
 * ------------------------------------------------------------------ */

.ims-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--ims-space-xs); }

/* The design's tag/pill: stabilo fill, navy text, 16px/500, 40px radius. */
.ims-chip {
  font-family: var(--ims-font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  padding: 11px 26px;
  border-radius: 40px;
  background: var(--ims-stabilo);
  color: var(--ims-navy);
  transition: background var(--ims-dur-fast) var(--ims-ease);
}
.ims-chip a { color: inherit; text-decoration: none; display: block; margin: -11px -26px; padding: 11px 26px; border-radius: 40px; }
.ims-chip:hover { background: var(--ims-navy); color: var(--ims-stabilo); }

.ims-child-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--ims-space-sm); }

.ims-child-card {
  position: relative;
  display: block;
  padding: var(--ims-space-md) var(--ims-space-md) calc(var(--ims-space-md) + 12px);
  border: 1px solid var(--ims-hairline);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: var(--ims-white);
  transition: border-color var(--ims-dur-fast) var(--ims-ease),
              transform var(--ims-dur-fast) var(--ims-ease);
}
.ims-child-card:hover { border-color: var(--ims-navy); transform: translateY(-3px); }
.ims-child-card__title { font-family: var(--ims-font-display); font-size: 20px; font-weight: 400; color: var(--ims-navy); margin: 0 0 6px; }
.ims-child-card__text { font-size: 15px; line-height: 1.55; color: var(--ims-body); margin: 0; }
.ims-child-card__go { position: absolute; top: var(--ims-space-md); right: var(--ims-space-md); color: var(--ims-hairline); transition: color var(--ims-dur-fast) var(--ims-ease); }
.ims-child-card:hover .ims-child-card__go { color: var(--ims-navy); }

.ims-metrics { display: flex; flex-wrap: wrap; gap: var(--ims-space-lg); margin: 0; }
.ims-metric__value { font-family: var(--ims-font-display); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 400; line-height: 1; color: var(--ims-navy); margin: 0; }
.ims-metric__label { font-size: 15px; color: var(--ims-body); margin: 6px 0 0; }

/* Placeholder standing in for artwork the client will supply. */
.ims-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: var(--ims-ghost);
  border: 1px dashed var(--ims-navy-tint);
  border-radius: 8px;
  color: var(--ims-navy);
  font-family: var(--ims-font-body);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------ */

.ims-header { position: sticky; top: 0; z-index: 90; background: var(--ims-white); border-bottom: 1px solid var(--ims-hairline); }
.ims-header .elementor-nav-menu--dropdown { z-index: 91; }

/* ------------------------------------------------------------------
 * Reduced motion
 * reveals.js already no-ops here. This covers the GSAP effects.
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .ims-marquee { overflow-x: auto; }
  .ims-magnetic { transform: none !important; }
  .ims-cursor, .ims-preloader { display: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ------------------------------------------------------------------
 * Components
 *
 * Markup comes from the core plugin's shortcodes. Styled here because
 * the shortcode owns the markup and Elementor never sees inside it.
 *
 * Every animation below is decorative CSS. None of it can hide
 * content, which is the rule reveals.js exists to protect.
 * ------------------------------------------------------------------ */

@keyframes ims-cta-cycle {
  0%   { color: var(--ims-sun); }
  25%  { color: var(--ims-orange); }
  50%  { color: var(--ims-stabilo); }
  75%  { color: var(--ims-stabilo); }
  100% { color: var(--ims-sun); }
}

@keyframes ims-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* --- Let's talk band --------------------------------------------- */

.ims-lets-talk {
  position: relative;
  background: var(--ims-space);
  padding: clamp(70px, 10vw, 150px) var(--ims-gutter);
}
.ims-lets-talk__inner { max-width: 1440px; margin: 0 auto; }

.ims-lets-talk__title {
  font-family: var(--ims-font-display);
  font-size: clamp(52px, 10.5vw, 190px);
  font-weight: var(--ims-weight-display);
  line-height: .88;
  letter-spacing: -.022em;
  text-align: center;
  margin: 0;
  /* Each character carries its own animation-delay, set inline by the
     shortcode. The colour comes from the keyframes, so a fallback is
     needed for the moment before animation applies. */
  color: var(--ims-sun);
}

.ims-lets-talk__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 3.4vw, 56px);
  margin-top: clamp(24px, 3.4vw, 48px);
}

.ims-lets-talk__badge {
  flex: 0 0 auto;
  width: clamp(104px, 10.5vw, 152px);
  height: clamp(104px, 10.5vw, 152px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
}
.ims-lets-talk__badge svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; }
.ims-lets-talk__badge-label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.3;
  color: #0A1046;
  text-align: center;
}
.ims-lets-talk__badge:hover svg:first-child { fill: var(--ims-stabilo); }

.ims-lets-talk__body {
  flex: 0 1 540px;
  min-width: 260px;
  font-size: clamp(16px, 1.4vw, 21px);
  line-height: 1.6;
  color: var(--ims-navy-tint);
  margin: 0;
}

/* --- Sibling pages ------------------------------------------------ */

.ims-siblings { padding: clamp(50px, 7vw, 100px) var(--ims-gutter); }
.ims-siblings__inner { max-width: 1440px; margin: 0 auto; }
.ims-siblings__label {
  font-size: var(--ims-size-eyebrow);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6E7194;
  margin: 0 0 clamp(24px, 3vw, 38px);
}
.ims-siblings__grid { display: flex; flex-wrap: wrap; gap: clamp(16px, 2vw, 28px); }
.ims-siblings__item {
  flex: 1 1 calc(25% - 21px);
  min-width: 200px;
  border-top: 1px solid var(--ims-hairline);
  padding-top: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
  transition: border-color var(--ims-dur-fast) var(--ims-ease);
}
.ims-siblings__item:hover { border-color: var(--ims-navy); }
.ims-siblings__item h3 {
  font-family: var(--ims-font-display);
  font-size: clamp(19px, 1.8vw, 25px);
  font-weight: var(--ims-weight-display);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ims-navy);
  margin: 0;
}
.ims-siblings__item svg { margin-top: 6px; }

/* --- Service CTA -------------------------------------------------- */

.ims-service-cta { background: var(--ims-space); padding: clamp(70px, 9vw, 130px) var(--ims-gutter); }
.ims-service-cta__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.ims-service-cta__mark {
  width: clamp(54px, 6vw, 92px);
  height: auto;
  margin-bottom: 6px;
  animation: ims-spin 20s linear infinite;
}
.ims-service-cta__title {
  font-family: var(--ims-font-display);
  font-size: clamp(40px, 6.2vw, 92px);
  font-weight: var(--ims-weight-display);
  line-height: .92;
  letter-spacing: -.028em;
  color: var(--ims-white);
  text-align: center;
  max-width: 18ch;
  margin: 0;
}
.ims-service-cta__actions { padding-top: 10px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* --- Buttons ------------------------------------------------------
 * The design's rule: buttons invert on hover.                        */

.ims-btn {
  font-family: var(--ims-font-body);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .03em;
  border-radius: 40px;
  padding: 15px 30px 14px;
  display: inline-block;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background var(--ims-dur-fast) var(--ims-ease),
              color var(--ims-dur-fast) var(--ims-ease),
              border-color var(--ims-dur-fast) var(--ims-ease);
}
.ims-btn--primary { background: var(--ims-stabilo); color: var(--ims-navy); }
.ims-btn--primary:hover { background: transparent; color: var(--ims-stabilo); border-color: var(--ims-stabilo); }
.ims-btn--ghost { background: transparent; color: rgba(255,255,255,.9); border-color: rgba(255,255,255,.2); }
.ims-btn--ghost:hover { background: var(--ims-white); color: var(--ims-navy); border-color: var(--ims-white); }

@media (prefers-reduced-motion: reduce) {
  .ims-lets-talk__title span { animation: none !important; color: var(--ims-stabilo) !important; }
  .ims-service-cta__mark { animation: none !important; }
}

/* ------------------------------------------------------------------
 * Header chrome
 * ------------------------------------------------------------------ */

.ims-burger {
  background: none;
  border: 0;
  padding: 10px 0 10px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  transition: opacity var(--ims-dur-fast) var(--ims-ease);
}
.ims-burger:hover { opacity: .6; }
.ims-burger span { display: block; width: 34px; height: 2px; background: var(--ims-space); }

/* --- Off-canvas ---------------------------------------------------
 * The panel is server-rendered and carries [hidden], so with no JS the
 * page is unaffected rather than showing a stuck overlay.            */

.ims-offcanvas { position: fixed; inset: 0; z-index: 120; }
.ims-offcanvas[hidden] { display: none; }

.ims-offcanvas__scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 0, 39, .55);
  opacity: 0;
  transition: opacity var(--ims-dur) var(--ims-ease);
}
.ims-offcanvas.is-open .ims-offcanvas__scrim { opacity: 1; }

.ims-offcanvas__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(560px, 92vw);
  background: var(--ims-white);
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4vw, 48px);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--ims-dur) var(--ims-ease);
}
.ims-offcanvas.is-open .ims-offcanvas__panel { transform: translateX(0); }

.ims-offcanvas__close {
  align-self: flex-end;
  background: none;
  border: 1px solid var(--ims-hairline);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  cursor: pointer;
  font-family: var(--ims-font-body);
  font-size: 22px;
  color: var(--ims-ink);
  line-height: 1;
  flex: 0 0 auto;
  transition: border-color var(--ims-dur-fast) var(--ims-ease),
              color var(--ims-dur-fast) var(--ims-ease);
}
.ims-offcanvas__close:hover { border-color: var(--ims-navy); color: var(--ims-navy); }

.ims-offcanvas__body { flex: 1 1 auto; padding: clamp(24px, 4vw, 44px) 0; }

.ims-offcanvas__menu,
.ims-offcanvas__menu ul { list-style: none; margin: 0; padding: 0; }
.ims-offcanvas__menu a {
  display: block;
  padding: 9px 0;
  font-family: var(--ims-font-body);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--ims-navy);
  text-decoration: none;
  transition: color var(--ims-dur-fast) var(--ims-ease);
}
.ims-offcanvas__menu a:hover { color: var(--ims-burnt); }

/* Second and third level step in and drop the uppercase shout. */
.ims-offcanvas__menu ul { padding-left: 18px; }
.ims-offcanvas__menu ul a {
  font-size: 15px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ims-body);
}
.ims-offcanvas__menu ul ul a { font-size: 14px; opacity: .85; }

.ims-offcanvas__foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--ims-hairline);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ims-offcanvas__foot a {
  font-size: 15px;
  color: var(--ims-body);
  text-decoration: none;
}
.ims-offcanvas__foot a:hover { color: var(--ims-navy); }

/* --- Mega menu ---------------------------------------------------- */

.ims-mega [data-ims-mega-image] {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity var(--ims-dur-fast) var(--ims-ease);
}

@media (prefers-reduced-motion: reduce) {
  .ims-offcanvas__panel,
  .ims-offcanvas__scrim { transition: none !important; }
}

/* ------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------ */

/* The design lays a navy-to-space gradient over the wave photograph so
   the top edge reads as brand colour and the wave only shows at the
   bottom. Elementor's overlay control cannot express a multi-stop
   gradient, so it lives here where it is one declaration. */
.ims-footer { position: relative; }
.ims-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    var(--ims-navy) 0%,
    rgba(2, 0, 39, .94) 14%,
    rgba(2, 0, 39, .72) 40%,
    rgba(2, 0, 39, .58) 100%
  );
}
.ims-footer > * { position: relative; }

.ims-flink a {
  color: var(--ims-navy-tint);
  text-decoration: none;
  transition: color var(--ims-dur-fast) var(--ims-ease);
}
.ims-flink a:hover { color: var(--ims-stabilo); }
.ims-flink p { margin: 0 0 12px; }
.ims-flink p:last-child { margin-bottom: 0; }

/* Social: outlined circles that fill with stabilo on hover. */
.ims-social .elementor-social-icon {
  background-color: transparent;
  border: 1px solid rgba(199, 201, 224, .24);
  width: 44px;
  height: 44px;
  transition: background-color var(--ims-dur-fast) var(--ims-ease),
              border-color var(--ims-dur-fast) var(--ims-ease);
}
.ims-social .elementor-social-icon i,
.ims-social .elementor-social-icon svg { color: var(--ims-white); fill: var(--ims-white); }
.ims-social .elementor-social-icon:hover {
  background-color: var(--ims-stabilo);
  border-color: var(--ims-stabilo);
}
.ims-social .elementor-social-icon:hover i,
.ims-social .elementor-social-icon:hover svg { color: var(--ims-navy); fill: var(--ims-navy); }

/* Newsletter: a single field with the submit tucked inside it. */
.ims-newsletter .elementor-field-group { position: relative; max-width: 420px; }
.ims-newsletter input[type="email"] {
  width: 100%;
  font-family: var(--ims-font-body);
  font-size: 16px;
  color: var(--ims-white);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(199, 201, 224, .22);
  border-radius: 40px;
  padding: 17px 62px 17px 24px;
}
.ims-newsletter input[type="email"]::placeholder { color: rgba(199, 201, 224, .7); }
.ims-newsletter input[type="email"]:focus {
  outline: none;
  border-color: var(--ims-stabilo);
}
.ims-newsletter button[type="submit"] {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  width: 46px;
  background: var(--ims-space);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: background var(--ims-dur-fast) var(--ims-ease);
}
.ims-newsletter button[type="submit"]:hover { background: var(--ims-stabilo); }

/* Headings inside a dark band must not inherit the global navy. */
.ims-on-dark h1, .ims-on-dark h2, .ims-on-dark h3,
.ims-on-dark h4, .ims-on-dark h5, .ims-on-dark h6 { color: var(--ims-white); }

/* ------------------------------------------------------------------
 * Loop cards
 * Output of the five loop-item templates.
 * ------------------------------------------------------------------ */

.ims-card { position: relative; }

.ims-card__media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  transition: transform var(--ims-dur) var(--ims-ease);
}
.ims-card:hover .ims-card__media img { transform: scale(1.03); }
/* The scale would otherwise bleed past the rounded corner. */
.ims-card__media { overflow: hidden; border-radius: 8px; }

.ims-card__eyebrow {
  font-size: var(--ims-size-eyebrow);
  font-weight: var(--ims-weight-eyebrow);
  letter-spacing: var(--ims-ls-eyebrow);
  text-transform: uppercase;
}

.ims-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ims-dur-fast) var(--ims-ease);
}
.ims-card__title a:hover { color: var(--ims-burnt); }

.ims-card--service { transition: background var(--ims-dur-fast) var(--ims-ease); }
.ims-card--service:hover { background: var(--ims-ground); }
.ims-card__icon img { width: 72px; height: auto; }

/* Client logos sit quiet until hovered, so the wall reads as one texture. */
.ims-logo-tile img {
  filter: grayscale(1);
  opacity: .55;
  transition: filter var(--ims-dur-fast) var(--ims-ease),
              opacity var(--ims-dur-fast) var(--ims-ease);
}
.ims-card--client:hover .ims-logo-tile img { filter: grayscale(0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .ims-card:hover .ims-card__media img { transform: none; }
}

/* Outline button — the light-ground pairing used on the 404. */
.ims-btn--outline {
  background: transparent;
  color: var(--ims-navy);
  border-color: var(--ims-hairline);
}
.ims-btn--outline:hover {
  background: var(--ims-navy);
  color: var(--ims-white);
  border-color: var(--ims-navy);
}

/* ------------------------------------------------------------------
 * Article prose — the post body, where WordPress emits plain HTML
 * rather than Elementor widgets.
 * ------------------------------------------------------------------ */

.ims-prose { font-size: var(--ims-size-body-lg); line-height: var(--ims-lh-body-lg); color: var(--ims-body); }
.ims-prose > * + * { margin-top: 1.1em; }
.ims-prose h2 { font-size: var(--ims-size-h2); margin-top: 1.8em; }
.ims-prose h3 { font-size: var(--ims-size-h3); margin-top: 1.5em; }
.ims-prose a { color: var(--ims-navy); text-underline-offset: 3px; }
.ims-prose a:hover { color: var(--ims-burnt); }
.ims-prose img { border-radius: 8px; }
.ims-prose blockquote {
  margin: 1.6em 0;
  padding-left: 26px;
  border-left: 3px solid var(--ims-stabilo);
  font-family: var(--ims-font-display);
  font-size: 24px;
  line-height: 1.4;
  color: var(--ims-navy);
}
.ims-prose ul, .ims-prose ol { padding-left: 22px; }
.ims-prose li + li { margin-top: .4em; }
.ims-prose ::selection { background: var(--ims-stabilo); color: var(--ims-navy); }

.ims-project__cover img,
.ims-post__cover img { width: 100%; height: auto; display: block; border-radius: 10px; }


/* ------------------------------------------------------------------
 * Home hero wash
 * Applied via the .ims-hero class so the gradient lives with the tokens
 * rather than inside one Elementor container's settings.
 * ------------------------------------------------------------------ */

.ims-hero {
  background:
    radial-gradient(42% 40% at 44% 42%,
      var(--ims-hero-1a) 0%,
      var(--ims-hero-1b) 34%,
      rgba(255, 255, 255, 0) 72%),
    radial-gradient(38% 42% at 66% 38%,
      var(--ims-hero-2a) 0%,
      var(--ims-hero-2b) 40%,
      rgba(255, 255, 255, 0) 74%);
}

/* ------------------------------------------------------------------
 * Butterfly rows
 * butterfly.js sets the transform; everything else is here so the
 * cards are laid out correctly before the script runs.
 * ------------------------------------------------------------------ */

.ims-butterfly { display: flex; flex-direction: column; gap: clamp(30px, 5vw, 70px); }

.ims-butterfly__row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 44px);
  justify-content: center;
  align-items: center;
}

.ims-butterfly__card {
  flex: 1 1 clamp(260px, 40%, 620px);
  display: block;
  text-decoration: none;
  /* The script animates transform, so the resting tilt lives here and the
     card is never left mid-flight if the script does not run. */
  transition: none;
  will-change: transform;
}
.ims-butterfly__card[data-bf-left]  { transform: rotate(-2deg); }
.ims-butterfly__card[data-bf-right] { transform: rotate(2deg); }

.ims-butterfly__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.ims-butterfly__eyebrow {
  display: block;
  margin-top: 16px;
  font-size: var(--ims-size-eyebrow);
  font-weight: var(--ims-weight-eyebrow);
  letter-spacing: var(--ims-ls-eyebrow);
  text-transform: uppercase;
  color: var(--ims-stabilo);
}

.ims-butterfly__card h3 {
  font-family: var(--ims-font-display);
  font-weight: var(--ims-weight-display);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.1;
  color: var(--ims-on-dark);
  margin: 6px 0 0;
}

@media (max-width: 767px) {
  /* Below the fold width there is no room to converge, and a 500px travel
     would push cards off-screen on a phone. */
  .ims-butterfly__card { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ims-butterfly__card { transition: none !important; }
}
