/* ============ Hero ============ */

.hero {
  padding-block: 14px 40px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--space-6);
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.hero__heading {
  font-size: clamp(1.9rem, 1.1rem + 3.4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.hero__heading-accent {
  font-weight: 800;
}

.hero__lead {
  max-width: none;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin-top: 10px;
}

.hero__cta-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}

.hero__cta-group .btn--primary {
  width: 100%;
  padding-block: 13px;
  font-size: 0.9rem;
}

.hero__cta-secondary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__cta-secondary-row .btn {
  flex: 1 1 0;
  padding: 10px 10px;
  font-size: 0.78rem;
}

/* Divider SVG is 1440×100 at full viewport width → its height ≈ 6.9vw.
   Pull the image down through the hero's bottom padding (40px) and the
   whole divider so its bottom edge is fully hidden behind the zigzag. */
.hero__visual-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: calc(-40px - 6.9vw);
}

.hero__visual-img {
  position: relative;
  width: 78%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
  margin-inline: auto;
}

/* Handwritten note in the transparent left part of the illustration
   (same script face as the other notes on the page) */
.hero__note {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 4%;
  font-family: "Segoe Script", "Bradley Hand", "Snell Roundhand", cursive;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #3d3c44;
  transform: rotate(-10deg);
  transform-origin: left top;
  white-space: nowrap;
  pointer-events: none;
}

@media (min-width: 640px) {
  .hero__note {
    left: 4%;
    top: 22%;
    font-size: 1.15rem;
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, clamp(520px, 40%, 560px)) minmax(0, 1fr);
    column-gap: var(--space-5);
    align-items: start;
  }

  .hero__text {
    position: relative;
      top: 12%;
  }

  .hero__cta-group {
    width: 100%;
    max-width: 100%;
  }

  .hero__visual-wrap {
    align-self: end;
    margin-top: -24px;
    overflow: visible;
  }

  /* At 1024 the picture is small: the note sits just above its top-left */
  .hero__note {
    left: 2px;
    top: -12%;
    font-size: 0.9rem;
  }

  .hero__visual-img {
    width: 82%;
    /* Cap height at ~766px while keeping the 1212×1297 aspect ratio */
    max-width: calc(870px * 1212 / 1297);
    margin-inline: 0;
  }
}

@media (min-width: 1280px) {
  .hero__note {
    top: 30%;
    font-size: 1.3rem;
  }
}

@media (min-width: 1440px) {
  .hero__note {
    left: 8px;
    font-size: 1.45rem;
  }
}

/* ============ Portfolio ============ */

.portfolio > .container {
  max-width: calc(1200px + 2 * var(--container-pad));
}

.portfolio__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  margin-bottom: var(--space-5);
}

.portfolio__lead {
  max-width: 474px;
}

.portfolio__controls {
  display: flex;
  gap: var(--space-2);
}

.portfolio__nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--color-line-on-ink);
  color: var(--color-text-on-ink);
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.portfolio__nav:hover:not(:disabled) {
  border-color: var(--color-text-on-ink);
}

.portfolio__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.portfolio__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-inline: calc(var(--container-pad) * -1);
  padding-inline: var(--container-pad);
}

.portfolio__viewport::-webkit-scrollbar {
  display: none;
}

.portfolio__track {
  display: flex;
  gap: var(--space-4);
}

.portfolio__card {
  flex: 0 0 auto;
  width: 62vw;
  max-width: 240px;
  scroll-snap-align: start;
}

.portfolio__media {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #221a2c;
}

.portfolio__media {
  cursor: pointer;
}

.portfolio__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio__play {
  position: absolute;
  z-index: 3;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: rgba(244, 243, 239, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.portfolio__play:hover,
.portfolio__media:hover .portfolio__play {
  transform: scale(1.06);
}

.portfolio__play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--color-ink);
  margin-left: 3px;
}


.portfolio__caption {
  margin-top: var(--space-3);
  font-size: 0.9rem;
  color: var(--color-text-on-ink-muted);
}

.portfolio__noscript {
  color: var(--color-text-on-ink-muted);
}

@media (min-width: 640px) {
  .portfolio__card {
    max-width: 260px;
  }
}

@media (min-width: 1024px) {
  .portfolio__card {
    width: 196px;
  }
}

/* ---- Video modal (one shared <dialog> for all cards) ----
   Reference: ai-avatar-mockup-sections/redisign/redisign-modal.png.
   Title + close, the video frame and an info panel («О проекте» + link to the
   project page). The frame follows the real aspect ratio of the clip; when its
   height is capped the whole clip stays visible (object-fit: contain) over a
   blurred poster. On small screens the dialog scrolls inside itself and the
   head with the close button stays pinned. */

.portfolio-modal {
  --modal-gap: 16px;
  --modal-head: 60px;
  --modal-info: 0px;
  --media-max-h: min(64svh, 560px);
  --modal-max-w: 640px;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  max-height: none;
  overflow: visible;
  color: var(--color-text-on-ink);
}

.portfolio-modal.is-portrait {
  --modal-max-w: 640px;
}

.portfolio-modal.is-square {
  --modal-max-w: 760px;
}

.portfolio-modal.is-landscape {
  --modal-max-w: 1040px;
}

.portfolio-modal::backdrop {
  background: rgba(17, 11, 24, 0.8);
}

.portfolio-modal__dialog {
  width: min(
    var(--modal-max-w),
    calc(100vw - 2 * var(--modal-gap)),
    max(min(560px, calc(100vw - 2 * var(--modal-gap))), calc(var(--media-max-h) * var(--video-ratio, 1.7778) + 32px))
  );
  max-height: calc(100svh - 2 * var(--modal-gap));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 12px 12px;
  border: 1px solid var(--color-line-on-ink);
  border-radius: var(--radius-md);
  background: var(--color-ink);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.portfolio-modal__head {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--modal-head);
  padding: 10px 0 10px 4px;
  background: var(--color-ink);
}

.portfolio-modal__title {
  min-width: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.portfolio-modal__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--color-line-on-ink);
  color: var(--color-text-on-ink);
  font-size: 1.6rem;
  line-height: 1;
  transition: border-color 0.15s ease;
}

.portfolio-modal__close:hover {
  border-color: var(--color-text-on-ink);
}

.portfolio-modal :focus-visible {
  outline-color: var(--color-green);
}

.portfolio-modal__media {
  position: relative;
  width: 100%;
  aspect-ratio: var(--video-aspect-ratio, 16 / 9);
  max-height: var(--media-max-h);
  border: 1px solid var(--color-line-on-ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: #07050b;
  isolation: isolate;
}

.portfolio-modal__backdrop {
  position: absolute;
  z-index: 0;
  inset: -12%;
  width: 124%;
  max-width: none;
  height: 124%;
  object-fit: cover;
  filter: blur(28px) brightness(0.4);
}

.portfolio-modal__poster,
.portfolio-modal__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.portfolio-modal__poster {
  z-index: 2;
}

/* Not focusable/visible until playback is requested */
.portfolio-modal__video {
  z-index: 1;
  visibility: hidden;
  background-color: #07050b;
}

.portfolio-modal__media.is-loading .portfolio-modal__video,
.portfolio-modal__media.is-playing .portfolio-modal__video {
  visibility: visible;
}

.portfolio-modal__play {
  position: absolute;
  z-index: 3;
  inset: 0;
  margin: auto;
  width: 76px;
  height: 76px;
  border: 3px solid var(--color-green);
  border-radius: 50%;
  background-color: rgba(244, 243, 239, 0.94);
  box-shadow: 0 0 0 6px rgba(57, 255, 106, 0.18), 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.portfolio-modal__play:hover {
  transform: scale(1.06);
}

.portfolio-modal__play .portfolio__play-icon {
  border-width: 13px 0 13px 22px;
  margin-left: 5px;
}

.portfolio-modal__media.is-loading .portfolio-modal__play .portfolio__play-icon {
  width: 30px;
  height: 30px;
  margin: 0;
  border: 3px solid rgba(17, 11, 24, 0.25);
  border-top-color: var(--color-ink);
  border-radius: 50%;
  animation: portfolio-spin 0.8s linear infinite;
}

@keyframes portfolio-spin {
  to {
    transform: rotate(360deg);
  }
}

.portfolio-modal__media.is-playing .portfolio-modal__poster,
.portfolio-modal__media.is-playing .portfolio-modal__play,
.portfolio-modal__media.is-playing .portfolio-modal__backdrop {
  display: none;
}

/* Плеер YouTube / VK Видео / RUTUBE: создаётся по клику на карточку, 9:16 или 16:9 */
.portfolio-modal__embed {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background-color: #07050b;
}

.portfolio-modal__media.is-embed .portfolio-modal__video {
  display: none;
}

.portfolio-modal__error {
  position: absolute;
  z-index: 4;
  inset: auto 12px 12px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: rgba(17, 11, 24, 0.9);
  font-size: 0.85rem;
  text-align: center;
}

/* Нижняя панель: описание и кнопка страницы проекта. Длинный текст переносится
   внутри колонки (min-width: 0), горизонтального скролла нет. */
.portfolio-modal__info {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--color-line-on-ink);
  border-radius: var(--radius-sm);
}

.portfolio-modal__info[hidden],
.portfolio-modal__about[hidden],
.portfolio-modal__more[hidden] {
  display: none;
}

.portfolio-modal__about {
  min-width: 0;
  max-width: 62ch;
}

.portfolio-modal__label {
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-on-ink-muted);
}

.portfolio-modal__caption {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text-on-ink);
  overflow-wrap: anywhere;
  white-space: normal;
}

.portfolio-modal__more {
  width: 100%;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  white-space: normal;
}

@media (min-width: 640px) {
  .portfolio-modal {
    --modal-gap: 24px;
    --media-max-h: min(82svh, calc(100svh - 2 * var(--modal-gap) - var(--modal-head) - var(--modal-info) - 16px));
  }

  .portfolio-modal.has-info {
    --modal-info: 140px;
  }

  .portfolio-modal__dialog {
    padding: 0 16px 16px;
  }

  .portfolio-modal__head {
    padding-left: 6px;
  }

  .portfolio-modal__title {
    font-size: 1.25rem;
  }

  .portfolio-modal__info {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 18px 22px;
  }

  .portfolio-modal__more {
    width: auto;
    white-space: nowrap;
  }
}

@media (min-width: 1024px) {
  .portfolio-modal__play {
    width: 88px;
    height: 88px;
  }

  .portfolio-modal__caption {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-modal__media.is-loading .portfolio-modal__play .portfolio__play-icon {
    animation: none;
  }
}

/* ============ Advantages ============ */

/* Reference: 03-advantages.png (desktop at 1440px, shown at 1/2 scale).
   The section owns its own horizontal insets (same scale as .hero-shell)
   so the global .container is untouched. Bottom zigzag is an absolutely
   placed SVG in the next section's colour; its height is 100/1440 of the
   viewport width (≈ 6.944vw). */

.advantages {
  --adv-pad-x: 20px;
  --adv-zigzag: 6.944vw;
  position: relative;
  /* Clip on both axes: whatever of the image drops below the section's
     bottom edge is cut off, and the zigzag covers the rest. */
  overflow: clip;
  padding-top: 32px;
  padding-bottom: calc(24px + var(--adv-zigzag));
}

.advantages__inner {
  padding-inline: var(--adv-pad-x);
}

.advantages__layout {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

.advantages__col {
  min-width: 0;
}

.advantages__heading {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.advantages__lead {
  max-width: 372px;
  margin-top: 12px;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.015em;
  color: #3d3c44;
}

/* ---- Directions: 2×2 cards ---- */

.advantages__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
}

.advantages__card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 166px;
  padding: 22px 20px 16px;
  border-radius: 10px;
  background-color: rgba(247, 246, 242, 0.92);
}

.advantages__card-icon {
  display: block;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  object-fit: contain;
}

.advantages__card-title {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.advantages__card-title::first-letter,
.advantages__benefit-text::first-letter {
  text-transform: uppercase;
}

.advantages__card-text {
  font-size: 0.79rem;
  line-height: 1.3;
  color: var(--color-text-muted);
}

/* ---- Benefits list ---- */

.advantages__benefits-heading {
  font-size: 1.31rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 21px;
}

.advantages__benefits {
  display: flex;
  flex-direction: column;
  gap: 21px;
}

.advantages__benefit {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 53px;
}

.advantages__benefit-mark {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 53px;
  border-left: 3px solid var(--color-green);
  border-radius: 3px 10px 10px 3px;
  background: linear-gradient(90deg, rgba(247, 246, 242, 0.75), rgba(247, 246, 242, 0.2));
  color: var(--color-text);
}

/* Top margin nudges the text ~6px below the mark's centre, as in the reference */
.advantages__benefit-text {
  min-width: 0;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: #37363e;
}

/* ---- Visual: its bottom edge ends at the section's bottom edge, so the
   zigzag (stacked above it) fully hides the image's lower part ---- */

.advantages__visual-wrap {
  position: relative;
  z-index: 1;
  container-type: inline-size;
  width: min(100%, 460px);
  margin: 24px auto calc(-24px - var(--adv-zigzag) - 16px);
  pointer-events: none;
}

.advantages__visual {
  display: block;
  width: 100%;
  height: auto;
}

.advantages__note {
  position: absolute;
  left: 64%;
  top: 26%;
  font-family: "Segoe Script", "Bradley Hand", "Snell Roundhand", cursive;
  font-size: 3.2cqi;
  line-height: 1.3;
  color: #3d3c44;
  transform: rotate(-14deg);
  transform-origin: left top;
  white-space: nowrap;
}

.advantages__divider {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: calc(var(--adv-zigzag) + 1px);
  pointer-events: none;
}

@media (min-width: 640px) {
  .advantages {
    --adv-pad-x: 32px;
  }
}

/* Two columns: intro + image on the left, cards and benefits on the right */
@media (min-width: 900px) {
  .advantages {
    --adv-pad-x: 48px;
    padding-bottom: calc(40px + var(--adv-zigzag));
  }

  .advantages__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 48px;
    row-gap: 32px;
  }

  .advantages__col--intro {
    grid-row: 1 / span 2;
  }

  .advantages__visual-wrap {
    position: absolute;
    left: 6vw;
    bottom: -2.5vw;
    width: 38vw;
    margin: 0;
  }
}

/* Desktop: three columns exactly as in the reference */
@media (min-width: 1280px) {
  .advantages {
    --adv-pad-x: 96px;
    padding-top: 40px;
    padding-bottom: calc(54px + var(--adv-zigzag));
  }

  .advantages__inner {
    padding-right: calc(var(--adv-pad-x) - 16px);
  }

  .advantages__layout {
    grid-template-columns: minmax(0, 510fr) minmax(0, 410fr) minmax(228px, 228fr);
    column-gap: 44px;
  }

  .advantages__col--intro {
    grid-row: auto;
  }

  /* 45px at 1440 — scales down so the heading keeps two lines at 1280 */
  .advantages__heading {
    font-size: min(3.125vw, 2.8rem);
  }

  /* Lead sits a bit lower, closer to the illustration below it */
  .advantages__lead {
    margin-top: 30px;
  }

  .advantages__col--directions {
    padding-top: 50px;
  }

  .advantages__col--benefits {
    padding-top: 35px;
  }
}

@media (min-width: 1440px) {
  /* Content max 1200px; % resolves against the section's full width */
  .advantages {
    --adv-pad-x: max(112px, calc((100% - 1200px) / 2));
  }

  .advantages__inner {
    padding-right: var(--adv-pad-x);
  }

  /* Tied to the content column (6vw at 1440) and capped on wide screens */
  .advantages__visual-wrap {
    left: calc(var(--adv-pad-x) - 34px);
    width: min(38vw, 547px);
  }
}

/* ============ Audience ============ */

/* Reference: 04-audiences.png (desktop at 1440px, shown at 1/2 scale).
   The top zigzag belongs to the Advantages section; the bottom one is an
   absolutely placed SVG in the Blog section's colour, 60/1440 of the
   viewport width high (≈ 4.167vw). */

.audiences {
  --aud-pad-x: 20px;
  --aud-zigzag: 4.167vw;
  position: relative;
  padding-top: 32px;
  padding-bottom: calc(11px + var(--aud-zigzag));
}

.audiences__inner {
  padding-inline: var(--aud-pad-x);
}

.audiences__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.audiences__heading {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.audiences__lead {
  max-width: 330px;
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #3d3c44;
}

.audiences__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.audiences__card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 12px;
  background-color: #ECEBE6;
}

.audiences__visual-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
}

.audiences__visual {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.audiences__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 1px 12px;
}

.audiences__card-heading {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.57;
  text-transform: none;
}

.audiences__nowrap {
  white-space: nowrap;
}

.audiences__text {
  font-size: 0.8rem;
  line-height: 1.33;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

.audiences__divider {
  position: absolute;
  left: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: calc(var(--aud-zigzag) + 1px);
  pointer-events: none;
}

@media (min-width: 640px) {
  .audiences {
    --aud-pad-x: 32px;
  }

  .audiences__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .audiences {
    --aud-pad-x: 48px;
  }

  .audiences__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

/* Desktop: all six cards in one row, as in the reference */
@media (min-width: 1280px) {
  .audiences {
    --aud-pad-x: 96px;
  }

  .audiences__head {
    grid-template-columns: auto minmax(0, 330px);
    justify-content: space-evenly;
    align-items: center;
    column-gap: 54px;
  }

  .audiences__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }

  .audiences__card {
    min-height: 379px;
  }

  .audiences__visual-wrap {
    aspect-ratio: 167 / 196;
  }

  .audiences__card-heading {
    font-size: 0.8rem;
  }

  .audiences__text {
    font-size: 0.75rem;
    letter-spacing: 0;
  }
}

@media (min-width: 1440px) {
  /* Content max 1200px; % resolves against the section's full width */
  .audiences {
    --aud-pad-x: max(112px, calc((100% - 1200px) / 2));
  }

  .audiences__grid {
    gap: 24px;
  }

  .audiences__card-heading {
    font-size: 0.875rem;
  }

  .audiences__text {
    font-size: 0.8rem;
    letter-spacing: 0.02em;
  }
}

/* ============ Blog ============ */

/* Reference: 05-blog.png (desktop at 1440px, shown at 1/2 scale).
   The top zigzag belongs to the Audience section; the bottom one is an
   absolutely placed SVG in the next section's colour, 80/1440 of the
   viewport width high (≈ 5.556vw). */

.blog {
  --blog-pad-x: 20px;
  --blog-zigzag: 5.556vw;
  position: relative;
  padding-top: 16px;
  padding-bottom: calc(15px + var(--blog-zigzag));
}

.blog__inner {
  padding-inline: var(--blog-pad-x);
}

.blog__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 10px;
  margin-bottom: 28px;
}

.blog__heading {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.blog__lead {
  max-width: 310px;
  font-size: 1rem;
  line-height: 1.25;
  color: #3d3c44;
}

.blog__all-link {
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--color-text);
  transition: opacity 0.15s ease;
}

.blog__all-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 1.35em;
  line-height: 1;
  vertical-align: -0.08em;
}

.blog__all-link:hover {
  opacity: 0.7;
}

.blog__track {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 15px;
}

.blog__card {
  min-width: 0;
  border-radius: 12px;
  background-color: #F5F5F2;
}

.blog__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px 13px 24px;
  border-radius: inherit;
}

.blog__link:focus-visible {
  outline-offset: -3px;
}

.blog__cover-wrap {
  aspect-ratio: 370 / 143;
  overflow: hidden;
  border-radius: 8px;
}

.blog__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 0.2s ease;
}

.blog__card:nth-child(2) .blog__cover {
  object-position: center 12%;
}

.blog__link:hover .blog__cover {
  transform: scale(1.03);
}

.blog__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 2px 0;
}

.blog__meta {
  margin-bottom: 6px;
  font-size: 0.78rem;
  line-height: 1.3;
  color: #8a8990;
}

.blog__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-right: var(--space-2);
}

.blog__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.375;
  text-transform: none;
}

.blog__excerpt {
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.blog__divider {
  position: absolute;
  left: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: calc(var(--blog-zigzag) + 1px);
  pointer-events: none;
}

@media (min-width: 640px) {
  .blog {
    --blog-pad-x: 32px;
  }

  .blog__track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .blog {
    --blog-pad-x: 48px;
  }

  .blog__head {
    grid-template-columns: auto minmax(300px, 1fr) auto;
    align-items: center;
    column-gap: 48px;
  }

  .blog__lead {
    margin-top: 8px;
  }

  .blog__all-link {
    justify-self: end;
  }

  .blog__track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .blog {
    --blog-pad-x: 96px;
  }
}

@media (min-width: 1440px) {
  /* Content max 1200px; % resolves against the section's full width */
  .blog {
    --blog-pad-x: max(112px, calc((100% - 1200px) / 2));
  }
}

/* ============ Process / service ============ */

/* Reference: 06-process.png (desktop at 1440px, shown at 1/2 scale).
   The top zigzag belongs to the Blog section; the bottom one is an
   absolutely placed SVG in the Testimonials colour, 50/1440 of the
   viewport width high (≈ 3.472vw). On desktop the illustration sits in
   the right-hand area and slides under that zigzag. */

.service {
  --service-pad-x: 20px;
  --service-zigzag: 3.472vw;
  position: relative;
  overflow: clip;
  padding-top: 20px;
  padding-bottom: calc(24px + var(--service-zigzag));
}

.service__inner {
  position: relative;
  padding-inline: var(--service-pad-x);
}

.service__head {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.service__heading {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.service__lead {
  max-width: 245px;
  font-size: 1.05rem;
  line-height: 1.25;
  color: #3d3c44;
}

/* ---- Steps ---- */

.service__steps {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.service__step {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
  align-content: start;
}

.service__step-index {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--color-blue);
  color: var(--color-text-on-blue);
  font-size: 0.95rem;
  font-weight: 500;
}

.service__step-title {
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
}

.service__step-text {
  min-width: 0;
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--color-text-muted);
}

.service__cta {
  position: relative;
  z-index: 3;
  margin-top: 32px;
  padding: 12px 32px;
  font-size: 1.05rem;
  font-weight: 500;
}

.service__cta::after {
  content: "→";
  font-size: 1.3em;
  line-height: 1;
}

/* ---- Illustration ---- */

.service__visual-wrap {
  position: relative;
  z-index: 1;
  container-type: inline-size;
  width: min(100%, 300px);
  margin: 24px auto calc(-24px - var(--service-zigzag) - 16px);
  pointer-events: none;
}

.service__visual {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Shown from 1280px only: on narrower screens there is no free space to
   the right of the illustration and the note would be cut off. */
.service__note {
  display: none;
  position: absolute;
  left: 78%;
  top: 57%;
  font-family: "Segoe Script", "Bradley Hand", "Snell Roundhand", cursive;
  font-size: 6.2cqi;
  line-height: 1.3;
  color: #3d3c44;
  transform: rotate(-10deg);
  transform-origin: left top;
  white-space: nowrap;
  text-shadow: 0 0 3px #F4F3EF, 0 0 6px #F4F3EF;
}

.service__divider {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: calc(var(--service-zigzag) + 1px);
  pointer-events: none;
}

@media (min-width: 640px) {
  .service {
    --service-pad-x: 32px;
  }

  /* 2 + 2 + 1 */
  .service__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
  }
}

/* Desktop: head row, five steps in one line, illustration on the right */
@media (min-width: 1024px) {
  .service {
    --service-pad-x: 48px;
    padding-top: 20px;
    padding-bottom: calc(26px + var(--service-zigzag));
  }

  .service__head {
    grid-template-columns: minmax(0, 637fr) minmax(0, 579fr);
    align-items: center;
    gap: 0;
  }

  .service__lead {
    margin-top: 6px;
  }

  .service__steps {
    /* Leaves the right-hand area to the illustration */
    width: calc(100% - 20vw);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 0;
    margin-top: 45px;
  }

  .service__step {
    display: flex;
    flex-direction: column;
  }

  /* Connector: from this circle to the next one, through the centres */
  .service__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 18px;
    left: 44px;
    right: -10px;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(44, 92, 255, 0.55), rgba(20, 20, 26, 0.45) 40%);
  }

  .service__step-title {
    margin-top: 16px;
    font-size: 0.95rem;
  }

  .service__step-text {
    font-size: 0.8rem;
  }

  .service__cta {
    margin-top: 52px;
  }

  .service__visual-wrap {
    position: absolute;
    top: -20px;
    right: calc(var(--service-pad-x) - 10px);
    width: 20vw;
    margin: 0;
  }
}

@media (min-width: 1280px) {
  .service {
    --service-pad-x: 96px;
  }

  .service__note {
    display: block;
  }

  .service__steps {
    width: calc(100% - 24vw);
  }

  /* Illustration is centred on the steps row (172px below the inner top)
     and pulled left so that the note, which sticks out to the right of it
     by ≈31.5% of its width, ends at the container's right edge. Width is
     capped so the image never grows taller than the section on wide
     screens (the section clips overflow). */
  .service__visual-wrap {
    --service-visual-w: min(19.5vw, 290px);
    top: 172px;
    right: calc(var(--service-pad-x) + var(--service-visual-w) * 0.315);
    width: var(--service-visual-w);
    transform: translateY(-50%);
  }

  .service__step-title {
    font-size: 1.05rem;
  }

  .service__step-text {
    font-size: 0.875rem;
  }
}

@media (min-width: 1440px) {
  /* Content max 1200px; % resolves against the section's full width */
  .service {
    --service-pad-x: max(112px, calc((100% - 1200px) / 2));
  }
}

/* ============ Testimonials ============ */

/* Reference: 07-testimonials.png (desktop at 1440px, shown at 1/2 scale).
   Horizontal carousel: a native scroll viewport (mouse, trackpad, touch)
   plus Previous/Next buttons from assets/js/testimonials.js. The bottom
   zigzag is an SVG in the Final CTA colour, 64/1440 of the viewport width
   high (≈ 4.444vw). */

.testimonials {
  --testimonials-pad-x: 20px;
  --testimonials-gap: 14px;
  --testimonials-per-view: 1;
  --testimonials-zigzag: 4.444vw;
  position: relative;
  padding-top: 20px;
  padding-bottom: calc(28px + var(--testimonials-zigzag));
}

.testimonials__inner {
  padding-inline: var(--testimonials-pad-x);
}

.testimonials__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.testimonials__heading {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.65rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.testimonials__lead {
  max-width: 365px;
  font-size: 1.02rem;
  line-height: 1.3;
  color: #3d3c44;
}

/* ---- Carousel ---- */

.testimonials__carousel {
  position: relative;
}

.testimonials__viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 10px;
}

.testimonials__viewport::-webkit-scrollbar {
  display: none;
}

.testimonials__viewport:focus-visible {
  outline-offset: 4px;
}

.testimonials__track {
  display: flex;
  gap: var(--testimonials-gap);
}

.testimonials__card {
  flex: 0 0 calc((100% - (var(--testimonials-per-view) - 1) * var(--testimonials-gap)) / var(--testimonials-per-view));
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 22px 24px 22px 28px;
  border-radius: 10px;
  background-color: #F6F4F1;
  scroll-snap-align: start;
}

/* The glyph sits in the top part of its em box; the box is kept just tall
   enough for it and nothing clips overflow, so the marks are never cut. */
.testimonials__quote-mark {
  display: block;
  height: 0.5em;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1;
  color: var(--color-text);
}

.testimonials__text {
  margin-top: 10px;
  font-size: 0.97rem;
  line-height: 1.45;
  color: #2c2b32;
}

/* Name is aligned to the top of the photo and the role always reserves two
   lines, so photos and names line up across cards even if a role wraps. */
.testimonials__author {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.testimonials__photo {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonials__author-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-top: 4px;
}

.testimonials__name {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
}

.testimonials__role {
  min-height: 2.6em;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--color-text-muted);
}

/* ---- Previous / Next ---- */

/* Same buttons as .portfolio__nav, with the colours mirrored for the light
   background (portfolio sits on ink with a 20% light line). */
.testimonials__nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(20, 20, 26, 0.2);
  color: var(--color-text);
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.testimonials__nav:hover:not(:disabled) {
  border-color: var(--color-text);
}

.testimonials__nav:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 3px;
}

.testimonials__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Previous/Next live in the head row, to the right of the lead */
.testimonials__controls {
  display: flex;
  gap: var(--space-2);
}

/* No JS: buttons would do nothing — the viewport stays scrollable instead */
html:not([data-js="enabled"]) .testimonials__controls,
.testimonials[data-scrollable="false"] .testimonials__controls {
  display: none;
}

.testimonials__divider {
  position: absolute;
  left: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: calc(var(--testimonials-zigzag) + 1px);
  pointer-events: none;
}

@media (min-width: 640px) {
  .testimonials {
    --testimonials-pad-x: 32px;
    --testimonials-per-view: 2;
  }
}

/* Desktop: heading left, lead on the right, arrows in the side gutters */
@media (min-width: 900px) {
  .testimonials {
    --testimonials-pad-x: 64px;
  }

  /* heading | lead | arrows (92px) — lead starts at x 813 on 1440 */
  .testimonials__head {
    grid-template-columns: minmax(0, 701fr) minmax(0, 423fr) auto;
    align-items: start;
    gap: 0;
  }

  .testimonials__lead {
    margin-top: 6px;
  }

  .testimonials__controls {
    margin-top: 4px;
  }
}

@media (min-width: 1024px) {
  .testimonials {
    --testimonials-per-view: 3;
  }
}

@media (min-width: 1280px) {
  .testimonials {
    --testimonials-pad-x: 96px;
  }
}

/* Four cards per view only where they stay wide enough to read */
@media (min-width: 1400px) {
  .testimonials {
    --testimonials-per-view: 4;
  }
}

@media (min-width: 1440px) {
  /* Content max 1200px; % resolves against the section's full width */
  .testimonials {
    --testimonials-pad-x: max(112px, calc((100% - 1200px) / 2));
  }
}

/* ============ Final CTA ============ */

/* Reference: 08-final-cta.png (desktop at 1440px, shown at 1/2 scale).
   Text block top-left; the illustration (transparent on its left third)
   is placed on the right and cropped by the section's top and bottom
   edges, as in the reference. Handwritten note sits to its right. */

.final-cta {
  --cta-pad-x: 20px;
  position: relative;
  overflow: clip;
  padding-top: 20px;
  padding-bottom: 0;
}

.final-cta__inner {
  position: relative;
  padding-inline: var(--cta-pad-x);
}

.final-cta__text {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.final-cta__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-green);
}

.final-cta__eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background-color: currentColor;
}

.final-cta__heading {
  margin-top: 28px;
  font-size: clamp(2.1rem, 1.2rem + 2.9vw, 3.33rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text-on-ink);
}

.final-cta__accent {
  color: var(--color-green);
}

.final-cta__lead {
  max-width: 460px;
  margin-top: 26px;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--color-text-on-ink-muted);
}

.final-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 28px;
}

.final-cta__btn {
  min-height: 62px;
  padding: 0 40px;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  border: 1.5px solid transparent;
}

.final-cta__btn-icon {
  flex: 0 0 auto;
}

.final-cta__btn--filled {
  background-color: var(--color-text-on-ink);
  color: var(--color-ink);
}

.final-cta__btn--filled:hover {
  background-color: #ffffff;
  color: var(--color-ink);
}

.final-cta__btn--outline {
  border-color: rgba(244, 243, 239, 0.55);
  color: var(--color-text-on-ink);
}

.final-cta__btn--outline:hover {
  border-color: var(--color-text-on-ink);
  color: var(--color-text-on-ink);
}

.final-cta__btn:focus-visible {
  outline: 3px solid var(--color-green);
  outline-offset: 3px;
}

/* ---- Illustration + note ---- */

/* The left ≈27% of the picture is transparent, so on narrow screens the
   wrap is made wider than the column and shifted left: the girl herself
   ends up centred and fills the width (the section clips the overflow). */
.final-cta__visual-wrap {
  position: relative;
  z-index: 1;
  container-type: inline-size;
  width: 140%;
  margin: 12px 0 0 -38%;
  pointer-events: none;
}

.final-cta__visual {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center bottom;
}

/* Local fonts are display/body only, so the note uses the system script
   face (as the other handwritten notes on the page) with a slight tilt.
   Mobile/tablet: its own line above the picture, clear of the face. */
.final-cta__note {
  position: relative;
  z-index: 2;
  width: calc(100% / 1.4);
  margin: 36px 0 0 27%;
  font-family: "Segoe Script", "Bradley Hand", "Snell Roundhand", cursive;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: rgba(244, 243, 239, 0.9);
  text-align: center;
  transform: rotate(-4deg);
}

/* Four phrases: two per line on mobile, one per line on desktop */
.final-cta__note span {
  white-space: nowrap;
}

@media (min-width: 640px) {
  .final-cta {
    --cta-pad-x: 32px;
  }

  .final-cta__visual-wrap {
    width: 620px;
    margin-left: calc(50% - 391px);
  }
}

/* Desktop: text top-left, large illustration on the right */
@media (min-width: 900px) {
  .final-cta {
    --cta-pad-x: 48px;
    padding-bottom: 82px;
  }

  .final-cta__text {
    max-width: 600px;
  }

  .final-cta__visual-wrap {
    position: absolute;
    /* The hair starts 1.4% of the width below the picture's top edge
       (2.1% of its height, ratio 3:2); the wrap sits 20px below the section
       top, so this keeps the head ≈14px inside the section. */
    top: calc(-6px - 54vw * 0.014);
    left: 36vw;
    width: 54vw;
    margin: 0;
  }

  .final-cta__note {
    position: absolute;
    left: 101%;
    top: 9%;
    width: auto;
    margin: 0;
    font-size: 2.1cqi;
    transform: rotate(-8deg);
  }

  .final-cta__note span {
    display: block;
  }
}

@media (min-width: 1280px) {
  .final-cta {
    --cta-pad-x: 96px;
  }

  .final-cta__visual-wrap {
    top: calc(-6px - 56vw * 0.014);
    left: 32vw;
    width: 56vw;
  }
}

@media (min-width: 1440px) {
  /* Content max 1200px; % resolves against the section's full width */
  .final-cta {
    --cta-pad-x: max(112px, calc((100% - 1200px) / 2));
  }

  /* 891px at 1440 (as in the reference); capped on wider screens so the
     face is not cropped by the section's top edge. Positioned from the
     content column so it follows the 1200px container. */
  .final-cta__visual-wrap {
    top: calc(-6px - min(61.9vw, 900px) * 0.014);
    left: calc(var(--cta-pad-x) + 235px);
    width: min(61.9vw, 900px);
  }
}

/* ============ Blog article page ============ */

.blog-article {
  padding-block: var(--space-7) var(--space-8);
}

.blog-article__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-blue);
  margin-bottom: var(--space-3);
}

.blog-article__meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.blog-article__title {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  margin-bottom: var(--space-4);
}

.blog-article__lead {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-5);
}

.blog-article__inner > p {
  max-width: 60ch;
  margin-bottom: var(--space-4);
}

.blog-article__back {
  display: inline-block;
  margin-top: var(--space-4);
  font-weight: 700;
  color: var(--color-blue);
}

.blog-article__back:hover {
  color: var(--color-blue-hover);
}

/* ============ Footer ============ */

.site-footer {
  background-color: var(--color-bg);
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-line);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.site-footer__line {
  font-weight: 700;
  font-size: 0.9rem;
}

.site-footer__legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.site-footer__pending {
  font-style: italic;
}

@media (min-width: 700px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .site-footer__legal {
    flex-direction: row;
    gap: var(--space-4);
  }
}

/* ---- Landing footer (index.html) ----
   Composition from 09-footer.png (1440px at 1/2 scale): brand on the left,
   the header links in a row, and on the right a narrow column with the
   legal placeholders and the copyright. Scoped with --main so the article
   pages keep their own footer. */

.site-footer--main {
  --footer-pad-x: 20px;
  padding-block: 32px 40px;
  border-top: 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding-inline: var(--footer-pad-x);
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.site-footer__nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  font-size: 0.875rem;
}

.site-footer__nav-list a {
  color: var(--color-text);
  transition: opacity 0.15s ease;
}

.site-footer__nav-list a:hover {
  opacity: 0.65;
}

.site-footer__info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.site-footer__legal-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.site-footer__note {
  font-style: italic;
}

.site-footer__copy {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}
.site-footer__credits {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.site-footer__credits .site-footer__copy {
  margin: 0;
}

.site-developer {
  position: relative;
  display: block;
  width: 180px;
  max-width: 100%;
  aspect-ratio: 1348 / 246;
  overflow: hidden;
  border-radius: 999px;
  transition: opacity 0.15s ease;
}

/* Exclude the PNG's transparent margins from the visible badge layout. */
.site-developer img {
  position: absolute;
  width: 147.1068%;
  max-width: none;
  height: auto;
  left: -23.5905%;
  top: -110.1626%;
  display: block;
}

.site-developer:hover {
  opacity: 0.8;
}

.site-developer:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
@media (min-width: 640px) {
  .site-footer--main {
    --footer-pad-x: 32px;
  }
}

/* One row: brand | links | legal + copyright column on the right */
@media (min-width: 1024px) {
  .site-footer--main {
    --footer-pad-x: 48px;
  }

  .site-footer__grid {
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 300px);
    align-items: start;
    column-gap: 48px;
  }

  .site-footer__brand {
    max-width: 180px;
  }

  .site-footer__nav-list {
    padding-top: 2px;
    gap: 10px 40px;
  }
}

@media (min-width: 1280px) {
  .site-footer--main {
    --footer-pad-x: 96px;
  }
}

@media (min-width: 1440px) {
  /* Content max 1200px; % resolves against the section's full width */
  .site-footer--main {
    --footer-pad-x: max(112px, calc((100% - 1200px) / 2));
  }
}
