/*
 * Y2K Digital CH — editorial photographs, 8 October 2026.
 * Load after the existing page stylesheets.
 * Opt-in only: agency-visual-hero, agency-editorial-figure,
 * agency-editorial-grid, agency-example and the compact opt-in variants.
 * Remove hero--photo and photo-visual--full/about-grid--photo-full
 * from the new components: their legacy viewport rules are intentional
 * for other pages and are not changed here.
 */

.hero.agency-visual-hero,
.hero.agency-text-hero,
.media-band.agency-compact-band,
.about-grid.agency-text-grid,
.photo-strip.agency-promo-strip,
.web-hero__visual.agency-web-visual,
.web-offer-layout.agency-web-offer-no-photo,
.web-concept__image.agency-demo-preview,
.demo-preview__poster.agency-demo-poster,
.agency-editorial-figure,
.agency-demo-screenshot,
.about-grid.agency-editorial-grid,
.agency-example {
  --agency-navy: #12384f;
  --agency-ivory: #f7f3eb;
  --agency-paper: #fffdf8;
  --agency-brass: #7b602e;
  --agency-muted: #435b68;
  --agency-line: rgba(18, 56, 79, .18);
  box-sizing: border-box;
}

/* Image-based hero. No image is loaded through a CSS background. */
.hero.agency-visual-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  height: 570px;
  min-height: 480px;
  max-height: 600px;
  margin: 0;
  padding: 96px 0 38px;
  overflow: hidden;
  text-align: left;
  color: var(--agency-navy);
  /* Legacy .hero has an !important background shorthand. */
  background: var(--agency-ivory) !important;
}

.hero.agency-visual-hero::before,
.hero.agency-visual-hero::after {
  content: none;
  display: none;
  animation: none;
}

.hero.agency-visual-hero > canvas,
.hero.agency-visual-hero > .hero-glow {
  display: none;
}

.hero.agency-visual-hero > .agency-hero-media {
  position: absolute;
  z-index: 0;
  inset: 0 0 0 auto;
  width: 72%;
  max-width: 1040px;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero.agency-visual-hero .agency-hero-media picture,
.hero.agency-visual-hero .agency-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.hero.agency-visual-hero .agency-hero-media img {
  object-fit: cover;
  object-position: right center;
  border-radius: 0;
}

.hero.agency-visual-hero > .agency-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(247, 243, 235, .98) 0%,
    rgba(247, 243, 235, .95) 24%,
    rgba(247, 243, 235, .78) 40%,
    rgba(247, 243, 235, .28) 54%,
    rgba(247, 243, 235, 0) 67%);
  pointer-events: none;
}

/* Both existing content families are supported; no container rename needed. */
.hero.agency-visual-hero > .hero-content,
.hero.agency-visual-hero > .hero__content {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: min(1200px, calc(100% - 2 * clamp(24px, 5vw, 64px)));
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  color: var(--agency-navy);
  text-align: left;
}

.hero.agency-visual-hero h1 {
  max-width: min(22ch, 52%);
  margin: 0 0 18px;
  color: var(--agency-navy);
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1.07;
  letter-spacing: 0;
  text-shadow: none;
  overflow-wrap: normal;
}

.hero.agency-visual-hero h1 em {
  color: var(--agency-navy);
}

.hero.agency-visual-hero h1 .metal-text {
  /* The existing .metal-text color is also !important. */
  color: var(--agency-navy) !important;
  text-shadow: none;
}

.hero.agency-visual-hero :is(.badge, .eyebrow) {
  max-width: min(560px, 52%);
  margin: 0 0 16px;
  color: var(--agency-brass);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}

.hero.agency-visual-hero > :is(.hero-content, .hero__content) > p:not(.eyebrow):not(.badge),
.hero.agency-visual-hero .lead {
  max-width: min(56ch, 48%);
  margin: 0 0 24px;
  color: var(--agency-navy);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.55;
  text-shadow: none;
}

.hero.agency-visual-hero :is(.cta-row, .hero__actions) {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  max-width: min(600px, 52%);
  margin: 0;
}

.hero.agency-visual-hero :is(.btn-ghost, .btn--ghost) {
  color: var(--agency-navy);
  border-color: rgba(18, 56, 79, .45);
  background: transparent;
}

.hero.agency-visual-hero :is(.btn-ghost, .btn--ghost):hover {
  color: var(--agency-navy);
  border-color: var(--agency-navy);
  background: rgba(247, 243, 235, .75);
}

.hero.agency-visual-hero > .agency-ai-caption {
  position: absolute;
  z-index: 3;
  right: clamp(20px, 3vw, 40px);
  bottom: 16px;
  width: auto;
  max-width: calc(100% - 40px);
  margin: 0;
  padding: 7px 11px;
  border: 1px solid rgba(18, 56, 79, .15);
  border-radius: 5px;
  background: var(--agency-paper);
  color: var(--agency-navy);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  text-shadow: none;
}

.hero.agency-visual-hero a:focus-visible,
.agency-example :is(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--agency-navy);
  outline-offset: 4px;
  box-shadow: 0 0 0 2px var(--agency-paper);
}

/* Body photograph: natural aspect ratio and an ordinary, readable caption. */
.about-grid.agency-editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(28px, 4vw, 54px);
  align-items: center;
}

.about-grid.agency-editorial-grid > * {
  min-width: 0;
}

.agency-editorial-figure,
.agency-demo-screenshot {
  position: relative;
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  justify-self: end;
  border: 1px solid var(--agency-line);
  border-radius: 16px;
  background: var(--agency-paper);
  overflow: hidden;
}

.agency-editorial-figure picture,
.agency-demo-screenshot picture {
  display: block;
  width: 100%;
  height: auto;
}

.agency-editorial-figure img,
.agency-demo-screenshot img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}

.agency-editorial-figure figcaption,
.agency-demo-screenshot figcaption {
  position: static;
  width: auto;
  margin: 0;
  padding: 12px 16px;
  background: var(--agency-paper);
  color: var(--agency-muted);
  font-size: 13px;
  line-height: 1.55;
  text-shadow: none;
}

/* Native examples: actual HTML text, rather than screenshots of invented UI. */
.agency-example {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 28px 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--agency-line);
  border-radius: 16px;
  background: var(--agency-ivory);
  color: var(--agency-navy);
  overflow-wrap: anywhere;
}

.agency-example > :first-child {
  margin-top: 0;
}

.agency-example > :last-child {
  margin-bottom: 0;
}

.agency-example :is(h3, h4) {
  margin: 0 0 12px;
  color: var(--agency-navy);
  line-height: 1.2;
}

.agency-example h3 {
  font-size: clamp(23px, 2.2vw, 29px);
}

.agency-example h4 {
  font-size: 21px;
}

.agency-example :is(p, li, dt, dd) {
  color: var(--agency-navy);
  line-height: 1.6;
}

.agency-example .agency-example__caption,
.agency-example > figcaption {
  display: block;
  margin: 0 0 15px;
  color: var(--agency-brass);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.agency-example :is(.agency-example__table-wrap, .agency-table-wrap) {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 16px 0;
  border: 1px solid var(--agency-line);
  border-radius: 8px;
  background: var(--agency-paper);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.agency-example table {
  width: 100%;
  min-width: 540px;
  margin: 0;
  border-collapse: collapse;
  color: var(--agency-navy);
  font-size: 14px;
  line-height: 1.5;
}

.agency-example :is(th, td) {
  padding: 12px 14px;
  border-bottom: 1px solid var(--agency-line);
  text-align: left;
  vertical-align: top;
  white-space: normal;
}

.agency-example thead th {
  background: var(--agency-navy);
  color: var(--agency-paper);
  font-weight: 700;
}

.agency-example tbody tr:last-child :is(th, td) {
  border-bottom: 0;
}

.agency-example caption {
  padding: 12px 14px;
  color: var(--agency-muted);
  text-align: left;
  font-size: 13px;
}

.agency-example .agency-example__flow,
.agency-example .agency-example__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.agency-example .agency-example__flow {
  counter-reset: agency-step;
}

.agency-example .agency-example__flow > *,
.agency-example .agency-example__card {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--agency-line);
  border-radius: 10px;
  background: var(--agency-paper);
}

.agency-example .agency-example__flow > *::before {
  counter-increment: agency-step;
  content: counter(agency-step);
  display: block;
  width: 28px;
  height: 28px;
  margin-bottom: 13px;
  border: 1px solid var(--agency-line);
  border-radius: 50%;
  color: var(--agency-navy);
  font-size: 13px;
  line-height: 26px;
  text-align: center;
}

.agency-example .agency-example__flow p,
.agency-example .agency-example__card p {
  margin: 10px 0 0;
  font-size: 14px;
}

.agency-example .agency-example__card dl {
  margin: 12px 0 0;
}

.agency-example .agency-example__card dt {
  margin: 12px 0 3px;
  font-size: 13px;
  font-weight: 700;
}

.agency-example .agency-example__card dd {
  margin: 0;
  font-size: 14px;
}

.agency-example svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

@media (min-width: 1440px) {
  .hero.agency-visual-hero {
    height: 600px;
  }
}

/* Let mobile users read first and then see the complete, uncropped image. */
@media (max-width: 900px) {
  .hero.agency-visual-hero {
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 0;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
  }

  .hero.agency-visual-hero > .hero-content,
  .hero.agency-visual-hero > .hero__content {
    order: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 112px clamp(22px, 5vw, 40px) 32px;
  }

  .hero.agency-visual-hero h1 {
    max-width: 24ch;
    font-size: clamp(36px, 6vw, 50px);
  }

  .hero.agency-visual-hero :is(.badge, .eyebrow),
  .hero.agency-visual-hero > :is(.hero-content, .hero__content) > p:not(.eyebrow):not(.badge),
  .hero.agency-visual-hero .lead,
  .hero.agency-visual-hero :is(.cta-row, .hero__actions) {
    max-width: 100%;
  }

  .hero.agency-visual-hero > .agency-hero-media {
    position: relative;
    inset: auto;
    order: 2;
    width: 100%;
    max-width: none;
    height: auto;
    overflow: visible;
  }

  .hero.agency-visual-hero .agency-hero-media picture,
  .hero.agency-visual-hero .agency-hero-media img {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .hero.agency-visual-hero .agency-hero-media img {
    object-fit: contain;
    object-position: center;
  }

  .hero.agency-visual-hero > .agency-hero-media::after {
    content: none;
    display: none;
  }

  .hero.agency-visual-hero > .agency-ai-caption {
    position: static;
    order: 3;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px clamp(22px, 5vw, 40px);
    border: 0;
    border-top: 1px solid var(--agency-line);
    border-radius: 0;
  }

  .about-grid.agency-editorial-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .agency-editorial-figure,
  .agency-demo-screenshot {
    max-width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 600px) {
  .hero.agency-visual-hero > .hero-content,
  .hero.agency-visual-hero > .hero__content {
    padding-top: 108px;
  }

  .hero.agency-visual-hero h1 {
    font-size: clamp(34px, 8.5vw, 42px);
    line-height: 1.08;
  }

  .hero.agency-visual-hero :is(.cta-row, .hero__actions) {
    flex-direction: column;
    align-items: stretch;
  }

  .hero.agency-visual-hero :is(.cta-row, .hero__actions) .btn {
    width: 100%;
    min-width: 0;
  }

  .agency-example .agency-example__flow,
  .agency-example .agency-example__cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .agency-example .agency-example__flow > *,
  .agency-example .agency-example__card {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero.agency-visual-hero *,
  .agency-editorial-figure *,
  .agency-demo-screenshot *,
  .agency-example * {
    animation: none;
    transition: none;
    scroll-behavior: auto;
  }
}

/* A compact text hero replaces legacy photography on selected pages. */
.hero.agency-text-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: auto;
  min-height: clamp(360px, 29vw, 440px);
  max-height: none;
  margin: 0;
  padding: 132px clamp(22px, 5vw, 64px) 52px;
  overflow: visible;
  color: var(--agency-navy);
  text-align: left;
  /* Required only because the legacy .hero background is !important. */
  background: linear-gradient(120deg, var(--agency-ivory), #edf2f2) !important;
}

.hero.agency-text-hero::before,
.hero.agency-text-hero::after {
  content: none;
  display: none;
  animation: none;
}

.hero.agency-text-hero canvas,
.hero.agency-text-hero .hero-glow {
  display: none;
}

.hero.agency-text-hero > :is(.container, .hero-content, .hero__content) {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.hero.agency-text-hero h1 {
  max-width: 26ch;
  margin: 0 0 20px;
  color: var(--agency-navy);
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1.08;
  text-shadow: none;
}

.hero.agency-text-hero h1 em {
  color: var(--agency-navy);
}

.hero.agency-text-hero .metal-text {
  /* Required only because the legacy .metal-text colour is !important. */
  color: var(--agency-navy) !important;
  -webkit-text-fill-color: currentColor;
}

.hero.agency-text-hero :is(.badge, .eyebrow) {
  color: var(--agency-brass);
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.5;
}

.hero.agency-text-hero p:not(.eyebrow):not(.badge),
.hero.agency-text-hero .lead {
  max-width: 68ch;
  margin: 0 0 24px;
  color: var(--agency-navy);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.6;
  text-shadow: none;
}

.hero.agency-text-hero :is(.cta-row, .hero__actions) {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.hero.agency-text-hero :is(.btn-ghost, .btn--ghost) {
  color: var(--agency-navy);
  border-color: var(--agency-navy);
  background: transparent;
}

.hero.agency-text-hero .promo-note {
  max-width: 76ch;
  margin-top: 22px;
  color: var(--agency-muted);
  font-size: 13px;
  line-height: 1.6;
  text-shadow: none;
}

.hero.agency-text-hero a:focus-visible,
.media-band.agency-compact-band a:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

/* Keep a useful call to action without a large decorative photograph. */
.media-band.agency-compact-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  height: auto;
  margin: 0;
  padding: 28px clamp(22px, 4vw, 48px);
  color: var(--agency-ivory);
  background: var(--agency-navy);
  border: 1px solid rgba(247, 243, 235, .14);
  text-align: center;
}

.media-band.agency-compact-band::before,
.media-band.agency-compact-band::after {
  content: none;
  display: none;
}

.media-band.agency-compact-band .media-band-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  padding: 0;
}

.media-band.agency-compact-band h2 {
  margin: 0 0 18px;
  color: var(--agency-ivory);
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.2;
  text-shadow: none;
}

.media-band.agency-compact-band p {
  color: var(--agency-ivory);
  line-height: 1.6;
  text-shadow: none;
}

/* Removing a figure also removes its former grid column. */
.about-grid.agency-text-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.about-grid.agency-text-grid > * {
  min-width: 0;
  max-width: 100%;
}

/* Two complete promotional illustrations, with captions in normal flow. */
.photo-strip.agency-promo-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  width: 100%;
}

.photo-strip.agency-promo-strip > figure,
.photo-strip.agency-promo-strip > figure:first-child {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: auto;
  margin: 0;
  overflow: hidden;
  background: var(--agency-paper);
}

.photo-strip.agency-promo-strip > figure::after {
  content: none;
  display: none;
}

.photo-strip.agency-promo-strip picture,
.photo-strip.agency-promo-strip img {
  display: block;
  width: 100%;
  max-width: 100%;
}

.photo-strip.agency-promo-strip img {
  height: auto;
  max-height: 330px;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center;
  background: var(--agency-ivory);
}

.photo-strip.agency-promo-strip figcaption {
  position: static;
  width: auto;
  margin: 0;
  padding: 13px 16px;
  color: var(--agency-navy);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  text-shadow: none;
}

/* The specialised website page keeps its layout and shows the full image. */
.web-hero__visual.agency-web-visual {
  min-width: 0;
  margin: 0;
}

.web-hero__visual.agency-web-visual picture {
  display: block;
  width: 100%;
}

.web-hero__visual.agency-web-visual > img,
.web-hero__visual.agency-web-visual > picture > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  background: var(--agency-ivory);
}

.web-hero__visual.agency-web-visual .web-hero__label {
  position: static;
  width: auto;
  margin-top: 14px;
  padding: 16px 20px;
  background: var(--agency-navy);
  box-shadow: none;
}

.web-hero__visual.agency-web-visual figcaption {
  position: static;
  margin: 10px 0 0;
  color: var(--agency-muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  text-shadow: none;
}

.web-offer-layout.agency-web-offer-no-photo {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  grid-template-areas: 'intro price';
  grid-template-rows: auto;
  gap: clamp(28px, 4vw, 54px);
  align-items: start;
}

.web-offer-layout.agency-web-offer-no-photo > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .hero.agency-text-hero {
    min-height: 0;
    padding: 112px clamp(22px, 5vw, 40px) 38px;
  }

  .hero.agency-text-hero h1 {
    max-width: 26ch;
    font-size: clamp(36px, 6vw, 50px);
  }

  .media-band.agency-compact-band {
    min-height: 160px;
    padding: 26px 22px;
  }
}

@media (max-width: 800px) {
  .web-offer-layout.agency-web-offer-no-photo {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'intro' 'price';
    grid-template-rows: auto auto;
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .hero.agency-text-hero {
    padding-top: 108px;
  }

  .hero.agency-text-hero h1 {
    font-size: clamp(34px, 8.5vw, 42px);
  }

  .hero.agency-text-hero :is(.cta-row, .hero__actions) {
    flex-direction: column;
    align-items: stretch;
  }

  .hero.agency-text-hero :is(.cta-row, .hero__actions) .btn {
    width: 100%;
    min-width: 0;
  }

  .photo-strip.agency-promo-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero.agency-text-hero *,
  .media-band.agency-compact-band *,
  .photo-strip.agency-promo-strip *,
  .web-hero__visual.agency-web-visual * {
    animation: none;
    transition: none;
    scroll-behavior: auto;
  }
}

/* Actual demo screenshots remain complete; their names never cover the UI. */
.web-concept__image.agency-demo-preview {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: var(--agency-navy);
}

.web-concept__image.agency-demo-preview::after {
  content: none;
  display: none;
}

.web-concept__image.agency-demo-preview img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1265 / 791;
  object-fit: contain;
  object-position: top center;
  transform: none;
}

.web-concept:hover .web-concept__image.agency-demo-preview img {
  transform: none;
}

.web-concept__image.agency-demo-preview .web-concept__name {
  position: static;
  display: block;
  width: auto;
  margin: 0;
  padding: 14px 20px;
  color: var(--agency-navy);
  background: var(--agency-ivory);
  font-size: clamp(28px, 2.5vw, 38px);
  line-height: 1.15;
  text-shadow: none;
}

/* Change the fallback image only; iframe geometry and loading stay intact. */
.demo-preview__poster.agency-demo-poster {
  object-fit: contain;
  object-position: top center;
  background: var(--agency-navy);
}
