/*
 * "Our role" — What We Offer (html/what-we-offer-modal.html).
 *
 * Opened by the homepage hero CTA inside a full-viewport transparent iframe
 * (see docs/components/offer-suite.md) and also served standalone at
 * /our-role. The document draws its own backdrop and panel.
 *
 * Desktop (top viewport > 1000 × > 700): the approved 1280×720 composition —
 * a 1224×664 panel inside a 28px inset — is frozen and magnified/reduced as
 * one canvas by --offer-scale = min(vw / 1280, vh / 720), set by
 * js/embeds/offer.js together with html.is-fixed-720.
 *
 * Routes (original breakpoints):
 *   ≤1100px                                   tighter inset
 *   ≤767px, or landscape ≤1000×≤700           mobile panel
 *   landscape ≤1000×≤700                      phone-landscape 3×2 grid
 *   ≤767px portrait                           selector grid → single card drilldown
 *
 * Body states: .is-open (entrance), .is-closing (slide-out), .has-selection
 * (portrait drilldown). The card artwork is finished imagery, borders included.
 */

:root {
  --offer-gold: #c99a4a;
  --offer-gold-hi: #e4bd74;
  --offer-ivory: #f0eadf;
  --offer-text: rgba(240, 234, 223, 0.78);
  --offer-line: rgba(211, 163, 82, 0.25);
  --offer-ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --offer-ease-out: cubic-bezier(0.16, 1, 0.28, 1);
  --offer-ease-close: cubic-bezier(0.4, 0, 0.18, 1);
  /* Off-screen resting position of the panel (below the viewport). */
  --offer-panel-away: translateY(calc(100% + clamp(96px, 7.5vw, 144px))) scale(0.92);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: transparent;
  color: var(--offer-text);
  font-family: var(--font-sans);
}

button,
a {
  font: inherit;
}

/* ---- Backdrop & canvas ------------------------------------------------- */

.offer {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(2, 4, 3, 0.38);
  -webkit-backdrop-filter: blur(3px) saturate(0.72);
  backdrop-filter: blur(3px) saturate(0.72);
}

.offer__canvas {
  display: contents;
}

.is-fixed-720 .offer__canvas {
  display: block;
  width: 1224px;
  height: 664px;
  transform: scale(var(--offer-scale, 1));
  transform-origin: center center;
}

/* ---- Panel --------------------------------------------------------------- */

.offer__panel {
  position: relative;
  display: grid;
  grid-template-rows: 124px 1fr 72px;
  width: min(1460px, calc(100vw - 56px));
  height: min(820px, calc(100vh - 56px));
  min-height: min(620px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid rgba(214, 165, 82, 0.58);
  background:
    radial-gradient(ellipse at 8% 0%, rgba(130, 93, 40, 0.15), transparent 31%),
    radial-gradient(ellipse at 92% 8%, rgba(34, 102, 94, 0.11), transparent 36%),
    linear-gradient(115deg, #0b110e 0%, #07100d 48%, #09130f 100%);
  box-shadow:
    0 36px 120px rgba(0, 0, 0, 0.7),
    0 0 72px rgba(159, 111, 45, 0.1),
    inset 0 1px rgba(255, 255, 255, 0.025);
  filter: blur(10px);
  pointer-events: none;
  will-change: transform, opacity;
  transform: var(--offer-panel-away);
  transition:
    transform 820ms var(--offer-ease-out),
    filter 620ms ease,
    box-shadow 820ms ease;
}

.is-fixed-720 .offer__panel {
  width: 1224px;
  height: 664px;
  min-height: 664px;
}

/* Fine vertical rhythm lines and edge tints. */
.offer__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(201, 154, 74, 0.035), transparent 18%, transparent 82%, rgba(69, 169, 159, 0.035)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.008) 0 1px, transparent 1px 54px);
  opacity: 0.65;
}

/* Light sweep played once as the panel arrives. */
.offer__panel::after {
  content: "";
  position: absolute;
  inset: -24% -70%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 32%, rgba(84, 219, 205, 0.04) 39%, rgba(255, 241, 198, 0.22) 47%, rgba(186, 124, 43, 0.12) 54%, transparent 66%);
  opacity: 0;
  transform: translateX(-42%) skewX(-14deg);
}

.is-open .offer__panel {
  transform: none;
  filter: blur(0);
  pointer-events: auto;
  box-shadow:
    0 40px 130px rgba(0, 0, 0, 0.76),
    0 0 82px rgba(159, 111, 45, 0.12),
    inset 0 1px rgba(255, 255, 255, 0.035);
}

.is-open .offer__panel::after {
  animation: offer-panel-sheen 1180ms cubic-bezier(0.19, 1, 0.22, 1) 320ms forwards;
}

.is-closing .offer__panel {
  transform: var(--offer-panel-away);
  opacity: 0;
  filter: none;
  pointer-events: none;
  transition:
    transform 1380ms var(--offer-ease-close),
    opacity 1380ms var(--offer-ease-close);
}

.is-closing .offer__panel::after {
  animation: none;
}

/* Header, cards and footer rise into place after the panel, in sequence. */
.offer__header,
.offer__services,
.offer__footer {
  position: relative;
  z-index: 1;
  filter: blur(8px);
  transform: translateY(clamp(22px, 1.72vw, 33px));
  transition:
    transform 620ms var(--offer-ease-out),
    filter 560ms ease;
}

.is-open .offer__header,
.is-open .offer__services,
.is-open .offer__footer {
  filter: blur(0);
  transform: translateY(0);
}

.is-open .offer__header { transition-delay: 180ms; }
.is-open .offer__services { transition-delay: 340ms; }
.is-open .offer__footer { transition-delay: 560ms; }

@keyframes offer-panel-sheen {
  0% { opacity: 0; transform: translateX(-42%) skewX(-14deg); }
  18% { opacity: 1; }
  72% { opacity: 0.72; }
  100% { opacity: 0; transform: translateX(42%) skewX(-14deg); }
}

/* ---- Header -------------------------------------------------------------- */

.offer__header {
  display: grid;
  grid-template-columns: 1.04fr 1fr 56px;
  align-items: center;
  gap: 30px;
  padding: 20px 24px 18px 34px;
  border-bottom: 1px solid var(--offer-line);
  background: linear-gradient(90deg, rgba(112, 76, 29, 0.075), transparent 42%, rgba(5, 11, 9, 0.32));
}

.offer__eyebrow {
  margin: 0 0 10px;
  color: var(--offer-gold-hi);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.27em;
  text-transform: uppercase;
}

.offer__title {
  margin: 0;
  color: var(--offer-ivory);
  font: 400 clamp(42px, 3.6vw, 58px) / 0.88 var(--font-serif);
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.is-fixed-720 .offer__title {
  font-size: 46.08px;
}

.offer__title span {
  color: var(--offer-gold);
}

.offer__intro {
  max-width: 540px;
  margin: 0;
  padding: 4px 0 4px 28px;
  border-left: 2px solid var(--offer-gold);
  color: rgba(240, 234, 223, 0.86);
  font: 400 16px / 1.24 var(--font-serif);
}

.offer__intro strong {
  color: var(--offer-gold-hi);
  font-weight: 600;
}

.offer__close {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(228, 189, 116, 0.82);
  border-radius: 50%;
  background: rgba(112, 76, 29, 0.12);
  box-shadow: 0 0 0 1px rgba(201, 154, 74, 0.12), 0 0 18px rgba(228, 189, 116, 0.14);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, transform 0.25s;
}

.offer__close:hover {
  border-color: #f0cf8e;
  background: rgba(154, 105, 38, 0.24);
  box-shadow: 0 0 0 1px rgba(240, 207, 142, 0.28), 0 0 25px rgba(228, 189, 116, 0.3);
  transform: rotate(4deg);
}

.offer__close:focus-visible {
  outline: 1px solid var(--offer-gold-hi);
  outline-offset: 4px;
}

.offer__close::before,
.offer__close::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 14px;
  left: 14px;
  height: 1px;
  background: rgba(255, 248, 234, 0.96);
  box-shadow: 0 0 5px rgba(228, 189, 116, 0.34);
}

.offer__close::before { transform: rotate(45deg); }
.offer__close::after { transform: rotate(-45deg); }

/* Back control and selector grid exist only in the portrait drilldown. */
.offer__back,
.offer-selector {
  display: none;
}

/* ---- Service cards ------------------------------------------------------- */

.offer__services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.offer-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  background: #020403;
  transition: background 0.38s var(--offer-ease), box-shadow 0.38s var(--offer-ease);
}

.offer-card:hover {
  background: linear-gradient(125deg, rgba(133, 91, 33, 0.15), rgba(15, 45, 39, 0.13));
  box-shadow: none;
}

.offer-card__link,
.offer-card__link picture,
.offer-card__link img {
  display: block;
  width: 100%;
  height: 100%;
}

.offer-card__link {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.offer-card__link:focus-visible {
  outline: 2px solid var(--offer-gold-hi);
  outline-offset: -4px;
}

/* The exports have slightly different intrinsic ratios: stretch each to its cell. */
.offer-card__link img {
  object-fit: fill;
  transition: filter 0.32s ease;
}

/* Fine optical alignment of individual artwork exports. */
.offer-card:nth-child(2) .offer-card__link img {
  width: calc(100% + 2px);
  height: calc(100% + 6px);
  margin: -3px -1px;
}

.offer-card:nth-child(3) .offer-card__link img {
  height: calc(100% + 1px);
}

.offer-card:nth-child(4) .offer-card__link img {
  width: calc(100% + 1px);
  margin-left: -1px;
}

.offer-card:nth-child(5) .offer-card__link img {
  width: calc(100% + 1px);
  height: calc(100% - 2px);
  margin: 1px 1px 1px 0;
}

.offer-card:nth-child(6) .offer-card__link img {
  width: calc(100% + 1px);
  height: calc(100% + 2px);
  margin-left: -1px;
}

/* Hover: warm wash + a single diagonal shine. */
.offer-card__link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(228, 189, 116, 0.05), rgba(201, 154, 74, 0.14));
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.32s ease;
}

.offer-card__link::after {
  content: "";
  position: absolute;
  inset: -45%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 42%, rgba(255, 224, 159, 0.22) 50%, transparent 58%);
  opacity: 0;
  transform: translateX(-65%);
}

.offer-card__link:hover img,
.offer-card__link:focus-visible img {
  filter: brightness(1.09) saturate(1.06) drop-shadow(0 0 7px rgba(228, 189, 116, 0.25));
}

.offer-card__link:hover::before,
.offer-card__link:focus-visible::before {
  opacity: 0.84;
}

.offer-card__link:hover::after,
.offer-card__link:focus-visible::after {
  animation: offer-card-shine 0.72s var(--offer-ease);
}

@keyframes offer-card-shine {
  0% { opacity: 0; transform: translateX(-65%); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translateX(65%); }
}

/* ---- Footer -------------------------------------------------------------- */

.offer__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px 10px 34px;
  border-top: 1px solid var(--offer-line);
  background: rgba(3, 7, 5, 0.42);
}

.offer__signoff strong {
  display: block;
  font: 400 19px / 1.05 var(--font-serif);
  letter-spacing: 0.015em;
}

.offer__signoff-stage { color: var(--offer-ivory); }
.offer__signoff-several { color: var(--offer-gold-hi); }
.offer__signoff-sequence { color: var(--offer-gold); }

/* "Project enquiry" is finished artwork; the button only frames it. */
.offer__enquire {
  position: relative;
  width: 300px;
  max-width: 100%;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  cursor: pointer;
}

.offer__enquire:focus-visible {
  outline: 2px solid var(--offer-gold-hi);
  outline-offset: 2px;
}

.offer__enquire::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 2%;
  left: 2%;
  z-index: 2;
  height: 52px;
  border-radius: 999px;
  background: linear-gradient(110deg, rgba(228, 189, 116, 0.04), rgba(228, 189, 116, 0.14), rgba(201, 154, 74, 0.05));
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.32s ease;
  pointer-events: none;
}

.offer__enquire img {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(-50%);
  pointer-events: none;
  transition: filter 0.32s ease;
}

.offer__enquire:hover img,
.offer__enquire:focus-visible img {
  filter: brightness(1.13) saturate(1.08) drop-shadow(0 0 8px rgba(228, 189, 116, 0.42));
}

.offer__enquire:hover::after,
.offer__enquire:focus-visible::after {
  opacity: 0.8;
}

/* ---- Reduced motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .offer__panel,
  .offer__header,
  .offer__services,
  .offer__footer {
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }

  .offer__panel::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
  }

  .offer-card__link:hover::after,
  .offer-card__link:focus-visible::after {
    animation: none;
    opacity: 0.14;
    transform: none;
  }
}

/* ---- ≤1100px: tighter inset (tablet portrait) ----------------------------- */

@media (max-width: 1100px) {
  .offer {
    padding: 18px;
  }

  .offer__panel {
    width: calc(100vw - 36px);
    height: calc(100vh - 36px);
  }

  .offer__intro {
    font-size: 14px;
  }
}

/* Site-wide mobile prose baseline (≤860px). */
@media (max-width: 860px) {
  .offer__intro {
    font-size: 18px;
    line-height: 1.55;
  }
}

/* ---- Mobile panel: ≤767px, or phone landscape ----------------------------- */

@media (max-width: 767px), (orientation: landscape) and (max-width: 1000px) and (max-height: 700px) {
  /* Compositor-light: no backdrop blur and no will-change layers. */
  .offer {
    padding: 8px;
    background: rgba(2, 4, 3, 0.62);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .offer__panel {
    width: calc(100vw - 16px);
    height: calc(100svh - 16px);
    min-height: 0;
    grid-template-rows: 104px minmax(0, 1fr) 94px;
    will-change: auto;
  }

  .offer__header {
    grid-template-columns: 1fr 42px;
    gap: 12px;
    padding: 14px 12px 12px 16px;
  }

  .offer__eyebrow {
    margin-bottom: 9px;
    font-size: 14px;
    line-height: 1.25;
    letter-spacing: 0.12em;
  }

  .offer__title {
    font-size: 32px;
    line-height: 0.9;
  }

  .offer__intro {
    display: none;
  }

  .offer__close {
    width: 40px;
    height: 40px;
  }

  .offer__close::before,
  .offer__close::after {
    top: 19px;
    right: 12px;
    left: 12px;
  }

  .offer__services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(118px, 1fr));
    align-content: stretch;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .offer-card {
    min-width: 0;
    transition: background 0.32s var(--offer-ease), box-shadow 0.32s var(--offer-ease), padding 0.32s var(--offer-ease);
  }

  .offer__footer {
    justify-content: center;
    padding: 12px;
  }

  .offer__signoff {
    display: none;
  }

  .offer__enquire {
    height: 68px;
  }
}

/* ---- Phone landscape: the six cards as a 3×2 grid -------------------------- */

@media (orientation: landscape) and (max-width: 1000px) and (max-height: 700px) {
  .offer__panel {
    grid-template-rows: 82px minmax(0, 1fr) 68px;
  }

  .offer__header {
    padding: 10px 12px 9px 16px;
  }

  .offer__eyebrow {
    margin-bottom: 6px;
    font-size: 10px;
    line-height: 1.15;
  }

  .offer__title {
    font-size: 27px;
  }

  .offer__services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }

  .offer-card {
    transition: none;
  }

  .offer__footer {
    padding: 8px 12px;
  }

  .offer__enquire {
    height: 50px;
  }
}

/* ---- Phone portrait: selector grid, then one portrait card ---------------- */

@media (max-width: 767px) and (orientation: portrait) {
  /* Live text and distinct service icons remain readable at phone sizes. */
  .offer__panel {
    grid-template-rows: 104px minmax(0, 1fr);
  }

  .offer__footer { display: none; }

  .offer-selector {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(136px, 1fr));
    gap: 8px;
    padding: 8px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .offer-selector__card {
    --card-tone: 31 58 51;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    min-width: 0;
    min-height: 136px;
    padding: 16px 8px;
    border: 1px solid rgba(228, 189, 116, 0.65);
    border-radius: 12px;
    background:
      radial-gradient(ellipse at 100% 0%, rgb(var(--card-tone) / 0.85), transparent 85%),
      #080e0c;
    color: var(--offer-ivory);
    text-align: left;
    cursor: pointer;
  }

  .offer-selector__card:nth-child(2) { --card-tone: 53 65 82; }
  .offer-selector__card:nth-child(3) { --card-tone: 79 57 36; }
  .offer-selector__card:nth-child(4) { --card-tone: 58 65 43; }
  .offer-selector__card:nth-child(5) { --card-tone: 65 51 76; }
  .offer-selector__card:nth-child(6) { --card-tone: 77 47 44; }

  .offer-selector__card::after {
    content: attr(data-offer-number);
    position: absolute;
    top: 14px;
    right: 12px;
    color: var(--offer-gold-hi);
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .offer-selector__card svg {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--offer-gold-hi);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .offer-selector__title {
    font-family: var(--font-serif);
    font-size: clamp(20px, 6.2vw, 28px);
    font-weight: 700;
    line-height: 1.15;
  }

  .offer-selector__card:focus-visible {
    outline: 2px solid var(--offer-gold-hi);
    outline-offset: -4px;
  }

  /* Layer two: the chosen service's portrait card (keeps its link wiring). */
  .offer__services {
    display: none;
  }

  .has-selection .offer-selector {
    display: none;
  }

  .has-selection .offer__services {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
  }

  .has-selection .offer-card {
    display: none;
  }

  .has-selection .offer-card.is-selected {
    display: block;
    flex: 0 1 480px;
    width: min(100%, 480px);
    max-height: 100%;
    aspect-ratio: 4 / 5;
  }

  .has-selection .offer-card.is-selected .offer-card__link,
  .has-selection .offer-card.is-selected picture,
  .has-selection .offer-card.is-selected img {
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .has-selection .offer-card.is-selected img {
    object-fit: contain;
  }

  /* The Design Consultation portrait is 553×800 (others 640×800): fill its
     frame horizontally without changing the drilldown layout. */
  .has-selection .offer-card:first-child.is-selected {
    flex: 0 0 auto;
    width: min(calc(100% + 2px), 482px);
    height: min(calc(125vw - 52.5px), 600px);
    aspect-ratio: auto;
  }

  .has-selection .offer-card:first-child.is-selected img {
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    margin: -4px;
    object-fit: fill;
    filter: none;
    transition: none;
  }

  .has-selection .offer-card:first-child.is-selected .offer-card__link:focus-visible {
    outline: 0;
  }

  .has-selection .offer-card:first-child.is-selected .offer-card__link::before,
  .has-selection .offer-card:first-child.is-selected .offer-card__link::after {
    display: none;
  }

  .has-selection .offer__header {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 10px;
    padding-left: 12px;
  }

  .has-selection .offer__back {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(228, 189, 116, 0.72);
    border-radius: 50%;
    background: rgba(112, 76, 29, 0.12);
    color: var(--offer-gold-hi);
    cursor: pointer;
  }

  .offer__back::before {
    content: "";
    width: 10px;
    height: 10px;
    border-bottom: 1px solid currentColor;
    border-left: 1px solid currentColor;
    transform: translateX(2px) rotate(45deg);
  }

  .offer__back:focus-visible {
    outline: 1px solid var(--offer-gold-hi);
    outline-offset: 3px;
  }
}

/* Touch layouts use their own viewport instead of the desktop canvas.
   Avoid nested blur passes over the large artwork on tablet GPUs. */
@media (max-width: 900px), (pointer: coarse) and (max-width: 1400px) {
  .offer {
    padding: 8px;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .offer__panel {
    width: min(1040px, calc(100vw - 16px));
    height: auto;
    max-height: calc(100dvh - 24px);
    min-height: 0;
    filter: none;
    opacity: 0;
    transform: translateY(16px);
    will-change: auto;
    transition: transform 280ms var(--offer-ease-out), opacity 220ms ease;
  }

  .is-open .offer__panel { filter: none; opacity: 1; transform: none; }
  .is-closing .offer__panel {
    filter: none;
    opacity: 0;
    transform: translateY(16px);
    transition: transform 280ms var(--offer-ease-close), opacity 220ms ease;
  }
  .offer__panel::after { display: none; }

  .offer__header,
  .offer__services,
  .offer__footer,
  .is-open .offer__header,
  .is-open .offer__services,
  .is-open .offer__footer {
    filter: none;
    transform: none;
    transition: none;
  }

  .offer__close {
    appearance: none;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    aspect-ratio: 1;
    padding: 0;
    align-self: center;
    justify-self: end;
  }

  .offer__close::before,
  .offer__close::after {
    top: 50%;
    left: 50%;
    right: auto;
    width: 18px;
    height: 1px;
  }

  .offer__close::before { transform: translate(-50%, -50%) rotate(45deg); }
  .offer__close::after { transform: translate(-50%, -50%) rotate(-45deg); }

  .offer-card:nth-child(n) .offer-card__link img,
  .has-selection .offer-card.is-selected .offer-card__link img {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
  }

  .offer-card__link:hover img,
  .offer-card__link:focus-visible img { filter: none; }
  .offer-card__link::before,
  .offer-card__link::after { display: none; }
}

@media (min-width: 768px) and (max-width: 900px),
       (min-width: 768px) and (pointer: coarse) and (max-width: 1400px) {
  .offer__panel { grid-template-rows: 96px minmax(0, 1fr) 64px; }
  .offer__header { grid-template-columns: minmax(0, 1fr) 44px; padding: 14px 20px; gap: 16px; }
  .offer__title { font-size: clamp(32px, 4vw, 46px); }
  .offer__intro { display: none; }
  .offer__services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }
  .offer__footer { justify-content: center; padding: 8px 20px; }
  .offer__signoff { display: none; }
}

/* Group proportional artwork into a compact grid instead of leaving large
   blank bands between rows. Short phone landscape retains fitted cells. */
@media (min-width: 768px) and (max-width: 900px) and (min-height: 600px),
       (min-width: 768px) and (pointer: coarse) and (max-width: 1400px) and (min-height: 600px) {
  .offer__services {
    grid-template-rows: repeat(2, max-content);
    align-content: center;
    gap: 8px;
    padding: 8px;
  }
  .offer-card { aspect-ratio: 1000 / 563; min-height: 0; }
}

@media (min-width: 768px) and (max-width: 900px) and (orientation: portrait),
       (pointer: coarse) and (min-width: 768px) and (max-width: 1100px) and (orientation: portrait) {
  .offer__services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, max-content);
  }
}

/* Size the selector and tablet panel around the cards, without empty bands. */
@media (max-width: 767px) and (orientation: portrait) {
  .offer-selector { grid-template-rows: repeat(3, minmax(152px, auto)); }
}
@media (max-width: 767px) and (max-height: 650px) and (orientation: portrait) {
  .offer-selector { grid-template-rows: repeat(3, minmax(136px, auto)); }
  .offer-selector__card { padding-block: 12px; gap: 12px; }
}
@media (min-width: 768px) and (max-width: 900px) and (min-height: 600px),
       (min-width: 768px) and (pointer: coarse) and (max-width: 1400px) and (min-height: 600px) {
  .offer__panel { width: min(1040px, calc(100vw - 40px)); }
  .offer__services { align-content: start; }
}
@media (min-width: 768px) and (max-width: 900px) and (orientation: portrait),
       (pointer: coarse) and (min-width: 768px) and (max-width: 1100px) and (orientation: portrait) {
  .offer__panel { width: min(760px, calc(100vw - 40px)); }
}
