/**
 * AKIBEMAG responsive visual system.
 *
 * Website design and development by Henry Zacharia.
 * @author Henry Zacharia
 * @copyright 2026 Henry Zacharia
 */

/* Shared responsive media primitives. */
.akb-service-visual,
.akb-service-visual__image {
  display: block;
  width: 100%;
  height: 100%;
}

.akb-service-visual__image {
  object-fit: cover;
}

.akb-dynamic-service-visual,
.akb-service-profile__visual,
.akb-product-dossier__visual,
.akb-catalogue-family__visual,
.akb-about-visual-story figure,
.akb-about-compliance__visual,
.akb-contact-hero__media,
.akb-contact-next__visual {
  margin: 0;
  overflow: hidden;
}

.akb-dynamic-service-visual figcaption,
.akb-service-profile__visual figcaption,
.akb-product-dossier__visual figcaption,
.akb-catalogue-family__visual figcaption,
.akb-about-compliance__visual figcaption,
.akb-contact-hero__media figcaption,
.akb-contact-next__visual figcaption {
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Homepage service rows now retain responsive picture sources. */
.akb-v2-service figure .akb-service-visual {
  height: 100%;
}

/* Solutions directory: remove duplicate CSS backgrounds and use real images. */
.akb-solution-route__art,
.akb-service-hero__art {
  background-image: none !important;
}

.akb-solution-route__art {
  position: relative;
  margin: 0;
  background: #151a22;
}

.akb-solution-route__art .akb-service-visual,
.akb-solution-route__art .akb-service-visual__image {
  position: absolute;
  inset: 0;
}

.akb-solution-route__art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 46%, rgba(5, 8, 15, 0.28));
  content: "";
  pointer-events: none;
}

.akb-solution-route__art figcaption {
  position: absolute;
  z-index: 2;
  right: 1.5rem;
  bottom: 1.2rem;
  color: rgba(255, 255, 255, 0.74);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Dynamic service and product heroes. */
.akb-service-hero > .wp-block-shortcode,
.akb-product-hero > .wp-block-shortcode,
.akb-service-hero > .akb-dynamic-service-visual,
.akb-product-hero > .akb-dynamic-service-visual {
  position: absolute;
  z-index: -2;
  inset: 0;
  margin: 0;
}

.akb-service-hero .akb-dynamic-service-visual,
.akb-product-hero .akb-dynamic-service-visual,
.akb-service-hero .akb-service-visual,
.akb-product-hero .akb-service-visual,
.akb-service-hero .akb-service-visual__image,
.akb-product-hero .akb-service-visual__image {
  width: 100%;
  height: 100%;
}

.akb-service-hero .akb-service-visual__image,
.akb-product-hero .akb-service-visual__image {
  object-position: center;
}

.akb-service-hero .akb-dynamic-service-visual figcaption,
.akb-product-hero .akb-dynamic-service-visual figcaption {
  position: absolute;
  z-index: 2;
  right: clamp(1.5rem, 4vw, 5rem);
  bottom: 1.35rem;
  color: rgba(255, 255, 255, 0.58);
}

.akb-product-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 15, 0.99) 0%, rgba(5, 8, 15, 0.91) 40%, rgba(5, 8, 15, 0.26) 75%, rgba(5, 8, 15, 0.08) 100%),
    linear-gradient(0deg, rgba(5, 8, 15, 0.86), transparent 56%);
  content: "";
}

/* Service body visual chapter. */
.akb-service-profile__visual,
.akb-product-dossier__visual {
  position: relative;
  margin-top: clamp(3.5rem, 6vw, 6rem);
  background: #10151e;
  clip-path: polygon(0 0, 96% 0, 100% 10%, 100% 100%, 0 100%);
}

.akb-service-profile__visual .akb-service-visual,
.akb-product-dossier__visual .akb-service-visual {
  aspect-ratio: 3 / 2;
  max-height: 35rem;
}

.akb-service-profile__visual figcaption,
.akb-product-dossier__visual figcaption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--akb-x-ink, #090b10);
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
}

.akb-service-profile__visual figcaption span {
  color: var(--akb-x-gold, #f5b51b);
}

/* Catalogue archive: five visual families without one long image-free index. */
.akb-cat-hero__mosaic {
  position: absolute;
  z-index: -2;
  inset: 0;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr 0.75fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.22rem;
  margin: 0 !important;
  background: #090b10;
}

.akb-cat-hero__mosaic::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 15, 0.995) 0%, rgba(5, 8, 15, 0.94) 34%, rgba(5, 8, 15, 0.48) 63%, rgba(5, 8, 15, 0.16) 100%),
    linear-gradient(0deg, rgba(5, 8, 15, 0.78), transparent 58%);
  content: "";
  pointer-events: none;
}

.akb-cat-hero__mosaic > .wp-block-shortcode,
.akb-cat-hero__mosaic > .akb-dynamic-service-visual {
  min-width: 0;
  min-height: 0;
  margin: 0;
}

.akb-cat-hero__mosaic > .wp-block-shortcode:first-child,
.akb-cat-hero__mosaic > .akb-dynamic-service-visual:first-child {
  grid-row: 1 / -1;
}

.akb-cat-hero__mosaic .akb-dynamic-service-visual,
.akb-cat-hero__mosaic .akb-service-visual,
.akb-cat-hero__mosaic .akb-service-visual__image {
  width: 100%;
  height: 100%;
}

.akb-cat-hero__mosaic figcaption {
  display: none;
}

.akb-catalogue-family-nav {
  position: static;
  top: auto;
}

.akb-catalogue-family__visual {
  position: relative;
  aspect-ratio: 16 / 6;
  margin-bottom: 1.25rem;
  background: #141922;
}

.akb-catalogue-family__visual .akb-service-visual,
.akb-catalogue-family__visual .akb-service-visual__image {
  width: 100%;
  height: 100%;
}

.akb-catalogue-family__visual figcaption {
  position: absolute;
  right: 1rem;
  bottom: 0.85rem;
  padding: 0.35rem 0.5rem;
  background: rgba(5, 8, 15, 0.72);
  color: rgba(255, 255, 255, 0.78);
}

/* About: a purposeful visual narrative instead of empty colour fields. */
.akb-about-visual-story {
  padding: clamp(6rem, 10vw, 11rem) 0;
  background: #090b10;
  color: #fff;
}

.akb-about-visual-story__inner {
  width: var(--akb-x-frame, min(91vw, 120rem));
  margin-inline: auto;
}

.akb-about-visual-story header {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(19rem, 0.55fr);
  gap: 1.5rem clamp(3rem, 8vw, 9rem);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

.akb-about-visual-story header > p:first-child {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--akb-x-gold, #f5b51b);
  font: 850 0.66rem/1 Manrope, sans-serif;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.akb-about-visual-story header > p:first-child span {
  margin-right: 1rem;
}

.akb-about-visual-story h2 {
  max-width: 12ch;
  margin: 0;
  color: #fff;
  font: 650 clamp(3rem, 6.5vw, 7.4rem)/0.88 Manrope, sans-serif;
  letter-spacing: -0.07em;
}

.akb-about-visual-story header > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 1.04rem;
  line-height: 1.65;
}

.akb-about-visual-story__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
}

.akb-about-visual-story__item {
  position: relative;
  grid-column: span 5;
  aspect-ratio: 3 / 2;
  background: #141922;
}

.akb-about-visual-story__item--wide {
  grid-column: span 7;
}

.akb-about-visual-story__item .akb-service-visual,
.akb-about-visual-story__item .akb-service-visual__image {
  width: 100%;
  height: 100%;
}

.akb-about-visual-story__item::after {
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(5, 8, 15, 0.84));
  content: "";
  pointer-events: none;
}

.akb-about-visual-story__item figcaption {
  position: absolute;
  z-index: 2;
  right: 1.3rem;
  bottom: 1.2rem;
  left: 1.3rem;
  display: flex;
  gap: 1rem;
  align-items: baseline;
  color: #fff;
  font: 750 clamp(0.86rem, 1.2vw, 1.05rem)/1.35 Manrope, sans-serif;
}

.akb-about-visual-story__item figcaption span {
  color: var(--akb-x-gold, #f5b51b);
  font-size: 0.68rem;
}

.akb-about-compliance__visual {
  position: relative;
  aspect-ratio: 3 / 2;
  margin-top: clamp(2rem, 4vw, 4rem);
  background: #071329;
}

.akb-about-compliance__visual figcaption,
.akb-contact-next__visual figcaption {
  position: absolute;
  right: 0.8rem;
  bottom: 0.7rem;
  left: 0.8rem;
  padding: 0.45rem 0.6rem;
  background: rgba(5, 8, 15, 0.72);
  color: rgba(255, 255, 255, 0.78);
}

/* Contact: a human operational context with the graphic system retained. */
.akb-contact-hero__media {
  position: absolute;
  z-index: -3;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(59vw, 78rem);
  background: #10151e;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
}

.akb-contact-hero__media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 11, 16, 0.93), rgba(9, 11, 16, 0.12) 56%), linear-gradient(0deg, rgba(9, 11, 16, 0.68), transparent 54%);
  content: "";
}

.akb-contact-hero__media .akb-service-visual,
.akb-contact-hero__media .akb-service-visual__image {
  width: 100%;
  height: 100%;
}

.akb-contact-hero__media figcaption {
  position: absolute;
  z-index: 2;
  right: 1.5rem;
  bottom: 1.2rem;
  color: rgba(255, 255, 255, 0.68);
}

.akb-contact-hero__meta {
  display: flex;
  gap: 0.75rem 1.5rem;
  align-items: center;
  margin: 1rem 0 0;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.86rem;
}

.akb-contact-hero__meta a {
  color: #fff;
  font-weight: 750;
}

.akb-contact-hero__meta span::before {
  margin-right: 0.7rem;
  color: var(--akb-x-gold, #f5b51b);
  content: "◆";
  font-size: 0.5rem;
}

.akb-contact-next__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(24rem, 1.22fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: end;
}

.akb-contact-next__visual {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #061329;
}

.akb-contact-next__inner > ol {
  grid-column: 1 / -1;
  width: 100%;
}

/* RFQ: useful visual orientation without a sticky obstruction. */
.akb-rfq-aside > .wp-block-shortcode,
.akb-rfq-aside > .akb-dynamic-service-visual {
  margin: -2rem -2rem 2rem;
}

.akb-rfq-aside .akb-dynamic-service-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #111824;
  clip-path: polygon(0 0, calc(100% - 1.8rem) 0, 100% 1.8rem, 100% 100%, 0 100%);
}

.akb-rfq-aside .akb-dynamic-service-visual figcaption {
  position: absolute;
  right: 0.8rem;
  bottom: 0.7rem;
  left: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
}

.akb-rfq-mobile-visual {
  display: none;
}

.akb-service-quote-card,
.akb-product-quote-card,
.akb-rfq-aside,
.akb-contact-brief header {
  position: static;
  top: auto;
}

@media (max-width: 1040px) {
  .akb-about-visual-story header,
  .akb-contact-next__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .akb-about-visual-story header > p:first-child,
  .akb-contact-next__inner > ol {
    grid-column: 1;
  }

  .akb-about-compliance__visual {
    max-height: 34rem;
  }

  .akb-contact-hero__media {
    width: 68vw;
  }
}

@media (max-width: 760px) {
  .akb-rfq-mobile-visual {
    display: block;
    margin-block: 1.25rem 0;
  }

  .akb-rfq-mobile-visual .akb-dynamic-service-visual,
  .akb-rfq-mobile-visual .akb-service-visual {
    min-height: 13rem;
  }

  .akb-rfq-aside > .wp-block-shortcode:first-child,
  .akb-rfq-aside > .akb-dynamic-service-visual:first-child {
    display: none;
  }

  .akb-solution-route__art .akb-service-visual,
  .akb-solution-route__art .akb-service-visual__image {
    position: static;
  }

  .akb-solution-route__art .akb-service-visual {
    height: 18rem;
  }

  .akb-service-hero .akb-service-visual__image,
  .akb-product-hero .akb-service-visual__image {
    object-position: 62% center;
  }

  .akb-product-hero::before {
    background: linear-gradient(0deg, rgba(5, 8, 15, 0.99) 0%, rgba(5, 8, 15, 0.86) 64%, rgba(5, 8, 15, 0.28) 100%);
  }

  .akb-cat-hero__mosaic {
    display: block;
  }

  .akb-cat-hero__mosaic > .wp-block-shortcode:not(:first-child),
  .akb-cat-hero__mosaic > .akb-dynamic-service-visual:not(:first-child) {
    display: none;
  }

  .akb-cat-hero__mosaic > .wp-block-shortcode:first-child,
  .akb-cat-hero__mosaic > .akb-dynamic-service-visual:first-child,
  .akb-cat-hero__mosaic .akb-dynamic-service-visual,
  .akb-cat-hero__mosaic .akb-service-visual,
  .akb-cat-hero__mosaic .akb-service-visual__image {
    width: 100%;
    height: 100%;
  }

  .akb-cat-hero__mosaic::after {
    background: linear-gradient(0deg, rgba(5, 8, 15, 0.99) 0%, rgba(5, 8, 15, 0.88) 64%, rgba(5, 8, 15, 0.32) 100%);
  }

  .akb-catalogue-family__visual {
    aspect-ratio: 3 / 2;
  }

  .akb-service-profile__visual,
  .akb-product-dossier__visual {
    clip-path: none;
  }

  .akb-service-profile__visual figcaption,
  .akb-product-dossier__visual figcaption {
    grid-template-columns: minmax(0, 1fr);
  }

  .akb-about-visual-story__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .akb-about-visual-story__item,
  .akb-about-visual-story__item--wide {
    grid-column: 1;
  }

  .akb-contact-hero__media {
    inset: 0;
    width: 100%;
    clip-path: none;
  }

  .akb-contact-hero__media::after {
    background: linear-gradient(0deg, rgba(9, 11, 16, 0.995) 0%, rgba(9, 11, 16, 0.88) 68%, rgba(9, 11, 16, 0.32) 100%);
  }

  .akb-contact-hero__media .akb-service-visual__image {
    object-position: 56% center;
  }

  .akb-contact-hero__route,
  .akb-contact-hero__word {
    opacity: 0.11;
  }
}

@media (prefers-reduced-motion: reduce) {
  .akb-solution-route__art,
  .akb-service-visual__image {
    transition: none !important;
  }
}
