/* Section surfaces: contained chapters alternating with open content.
   Keep this layer after refined.css; content, card grids and motion stay shared. */
:root {
  --section-edge: clamp(16px, 3.5vw, 72px);
  --section-radius: clamp(20px, 2.2vw, 32px);
  --section-pad: clamp(28px, 4.5vw, 64px);
  --section-pad-block: clamp(44px, 5.5vw, 80px);
  --section-space: clamp(72px, 7.5vw, 120px);
  --detail-radius: 5px;
}

/* Original-color logos on fixed positions, with an unlimited paged collection. */
.clients {
  padding: clamp(44px, 4vw, 60px) var(--wide-inset) !important;
  border: 0;
  background: #fff;
  gap: 28px;
  overflow: visible;
}

.clients__label {
  width: 100%;
  max-width: 1160px;
  align-self: center !important;
  margin: 0 !important;
  font-size: .75rem !important;
  letter-spacing: 0 !important;
  text-align: center;
}

.clients__grid {
  --clients-page-size: 4;
  --clients-gap: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px var(--clients-gap);
  width: 100%;
  max-width: 960px;
  min-height: 96px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.clients .client-mark {
  --brand-width: 130px;
  --brand-height: 48px;
  display: flex;
  flex: 0 0 calc((100% - (var(--clients-page-size) - 1) * var(--clients-gap)) / var(--clients-page-size));
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 96px;
  margin: 0;
  padding: 0;
}

.clients .client-mark[hidden],
.clients__controls[hidden] {
  display: none !important;
}

.clients__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.clients__controls button {
  border: 0;
  padding: 8px 10px;
  min-height: 36px;
  color: var(--muted);
  background: transparent;
  font: 400 .75rem/1.5 Arial, sans-serif;
  cursor: pointer;
  transition: color 200ms ease;
}

.clients__controls button:hover { color: var(--ink); }
.clients__controls button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

.clients__page {
  min-width: 38px;
  text-align: center;
  font: 400 .6875rem/1.5 Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.clients__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  margin: -1px;
}

.clients .client-mark img {
  width: var(--brand-width);
  height: var(--brand-height);
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  filter: none;
  opacity: 1;
}

.clients .client-mark--bilia { --brand-width: 90px; --brand-height: 36px; }
.clients .client-mark--follestad { --brand-width: 138px; --brand-height: 30px; }
.clients .client-mark--vestland { --brand-width: 145px; --brand-height: 38px; }
.clients .client-mark--gullruten { --brand-width: 58px; --brand-height: 70px; }
.clients .client-mark--deguy { --brand-width: 104px; --brand-height: 30px; }
.clients .client-mark--bergen { --brand-width: 92px; --brand-height: 92px; }
.clients .client-mark--caprice {
  font-size: .9375rem !important;
  letter-spacing: .035em;
}

@media (max-width: 900px) {
  .clients__grid {
    --clients-page-size: 3;
    --clients-gap: 24px;
    max-width: 780px;
  }
}

@media (max-width: 560px) {
  .clients__grid {
    --clients-page-size: 2;
    max-width: 360px;
  }
}

/* A full-width blue chapter, with open copy and a contained photograph. */
.apex-choice {
  padding: clamp(56px, 6vw, 88px) var(--wide-inset);
  background: var(--accent);
  color: var(--ink);
}

.apex-choice__panel {
  width: 100%;
  max-width: 1240px;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 104px);
  align-items: center;
  margin: 0 auto;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.apex-choice__image {
  min-height: 0;
  aspect-ratio: auto;
  overflow: visible;
}

.apex-choice__photo {
  position: relative;
  width: 100%;
  height: clamp(360px, 36vw, 500px);
  overflow: hidden;
  border: 1px solid #11111155;
  border-radius: 4px;
}

.apex-choice__photo img {
  object-position: center 40%;
  transition: transform 900ms cubic-bezier(.22, 1, .36, 1);
}

.apex-choice__image figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 13px;
  color: #3f494b;
  font-size: .6875rem;
  line-height: 1.5;
}

.apex-choice__copy {
  padding: 0;
  align-self: center;
}

.apex-choice .apex-choice__copy h2 {
  max-width: 12ch;
  color: var(--ink);
  font-size: clamp(2.625rem, 4vw, 3.75rem);
  line-height: 1.1;
  text-wrap: balance;
}

.apex-choice .apex-choice__copy .apex-choice__promise {
  margin-top: 20px;
  color: var(--ink);
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
}

.apex-choice__copy p:not(.apex-choice__promise) {
  max-width: 36ch;
  margin: 24px 0 30px;
  color: #3f494b;
  line-height: 1.7;
  text-wrap: pretty;
}

.apex-choice .apex-choice__copy a {
  color: white;
  background: var(--ink);
  border: 1px solid var(--ink);
  font-size: .875rem;
}

.apex-choice .apex-choice__copy a:hover {
  background: #303536;
  border-color: #303536;
  color: white;
}

.apex-choice__copy a span {
  transition: transform 400ms cubic-bezier(.22, 1, .36, 1);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .apex-choice__photo:hover img {
    transform: scale(1.025);
  }

  .apex-choice__copy a:hover span {
    transform: translate(2px, -2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .apex-choice__photo img,
  .apex-choice__copy a span {
    transition: none;
  }
}

/* The four disciplines stay on the open page in their existing two-by-two grid. */
.services {
  padding-block: var(--section-space) !important;
}

.services__intro {
  padding-bottom: 44px;
}

.service-grid {
  gap: 24px;
}

.service-card,
.service-card:hover,
.service-card.is-active {
  padding: 30px 32px !important;
  border-radius: var(--detail-radius) !important;
}

.service-card__arrow {
  top: 24px;
  right: 26px;
}

.service-card p {
  max-width: 44ch;
  line-height: 1.7;
  text-wrap: pretty;
}

.services__footer {
  margin-top: 32px;
}

/* Give the whole portfolio a frame; the photographs remain the same size. */
.selected-work--canva {
  width: calc(100% - var(--section-edge) - var(--section-edge));
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--section-pad-block) var(--section-pad) !important;
  border: 0;
  border-radius: var(--section-radius);
  background: var(--paper) !important;
}

.selected-work--canva .selected-work__inner {
  width: 100%;
  max-width: none;
}

.work-heading-row {
  margin-bottom: 36px;
}

.work-caption {
  padding-top: 20px;
}

.canva-work__cta-wrap {
  margin-top: 36px !important;
  padding-top: 28px;
}

.editorial-break {
  margin-top: var(--section-space);
  border-radius: var(--section-radius);
}

.team-story {
  padding-block: clamp(80px, 7vw, 112px) !important;
}

.team-story__intro {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start;
  gap: clamp(28px, 3vw, 40px) !important;
}

.team-story__heading {
  max-width: none;
  font-size: clamp(1.875rem, 3.3vw, 3rem) !important;
  line-height: 1.18 !important;
  letter-spacing: -.035em;
  text-wrap: pretty;
}

.team-story__heading-break {
  display: block;
}

.team-story__heading em {
  font-family: var(--serif);
  letter-spacing: -.035em;
}

.team-story__copy {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  max-width: none;
  min-width: 0;
  padding-bottom: 0;
}

.team-story__lead {
  max-width: 56ch;
  color: var(--muted);
}

.team-story__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  align-items: stretch;
}

.team-story .team-story__button {
  width: 100%;
  min-height: 48px;
  padding: 12px 22px;
  justify-content: center;
  border: 1px solid #11111140;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: none;
  transform: none;
  transition: background-color 300ms ease, border-color 300ms ease;
}

.team-story .team-story__button:hover,
.team-story .team-story__button:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.team-story .team-story__button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.team-story__gallery {
  --team-gallery-gap: 20px;
  margin-top: 64px;
}

.team-story__viewport {
  padding: 0;
}

.team-story__frame {
  flex: none;
  width: clamp(230px, 23vw, 290px);
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scroll-snap-align: start;
}

.team-story__photo {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
}

.team-story__frame .team-story__image {
  width: 100%;
  height: 100%;
  border-radius: 0;
  translate: none;
  transform: none;
  box-shadow: none;
  transition: none;
}

.team-story__frame .team-story__image image {
  transform: none;
  transition: none;
}

@media (max-width: 1000px) {
  .team-story__copy {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .team-story__actions {
    width: fit-content;
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .team-story__heading-break {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-story .team-story__button {
    transition: none;
  }
}

.service-index {
  padding-block: clamp(72px, 6vw, 96px) !important;
}

.service-index__grid {
  margin-top: 44px;
}

.apex-contact {
  padding-bottom: var(--section-space);
}

.apex-contact .contact-layout {
  max-width: 1120px;
  border-radius: 0;
}

.apex-contact .contact-content,
.apex-contact .person-panel {
  padding: clamp(26px, 3vw, 40px);
}

.apex-contact .label {
  margin-bottom: 10px;
}

.apex-contact h2 {
  font-size: clamp(1.65rem, 2.2vw, 2.125rem);
}

.apex-contact .contact-content > p {
  margin: 12px 0 16px;
  font-size: .9375rem;
}

.apex-contact .people {
  margin-bottom: 20px;
}

.apex-contact .person {
  min-height: 44px;
  padding: 8px 14px;
}

.apex-contact .contact-form {
  gap: 12px;
}

.apex-contact input,
.apex-contact textarea {
  padding: 10px 12px;
  margin-top: 6px;
}

.apex-contact input {
  min-height: 44px;
}

.apex-contact textarea {
  min-height: 80px;
}

.apex-contact .person-panel {
  justify-content: center;
  gap: 24px;
}

.apex-contact .portrait-initial {
  font-size: clamp(4rem, 6vw, 6rem);
  margin: 16px 0 0;
}

.apex-contact .person-panel h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.apex-contact .person-panel p {
  font-size: .9375rem;
}

.apex-contact .person-panel .photo-note {
  font-size: .75rem;
}

.apex-contact .selected-note {
  margin-top: 18px;
}

/* One restrained treatment for primary actions throughout the page. */
.apex-choice__copy a,
.services__cta,
.canva-work__cta,
.service-index__cta,
.apex-contact .button {
  border-radius: var(--detail-radius);
  min-height: 50px;
  padding: 14px 20px;
  line-height: 1.4;
}

@media (max-width: 760px) {
  :root {
    --section-pad: clamp(22px, 5vw, 36px);
    --section-pad-block: 40px;
    --section-space: 64px;
  }

  .clients {
    padding: 40px var(--section-edge) !important;
    gap: 22px;
  }

  .apex-choice {
    padding: 48px var(--wide-inset);
  }

  .apex-choice__panel {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .apex-choice__image {
    min-height: 0;
    aspect-ratio: auto;
  }

  .apex-choice__copy {
    padding: 0;
  }

  .apex-choice .apex-choice__copy h2 {
    max-width: none;
    font-size: clamp(2.25rem, 6.5vw, 3rem);
  }

  .apex-choice__photo {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .services {
    padding-block: 72px !important;
  }

  .services__intro {
    padding-bottom: 32px;
  }

  .service-grid {
    gap: 18px;
  }

  .service-card,
  .service-card:hover,
  .service-card.is-active {
    padding: 26px !important;
  }

  .work-heading-row {
    margin-bottom: 28px;
  }

  .team-story,
  .service-index {
    padding-block: 64px !important;
  }

  .team-story__gallery {
    --team-gallery-gap: 14px;
    margin-top: 40px;
  }

  .team-story__frame {
    width: clamp(220px, 62vw, 270px);
  }

  .service-index__grid {
    margin-top: 32px;
  }

  .apex-contact {
    padding-inline: var(--section-edge);
  }

  .apex-contact .person-panel {
    gap: 16px;
  }

  .apex-contact .portrait-initial {
    font-size: 4rem;
    margin: 0;
  }
}

/* Narrow screens retain useful text and image space inside the larger panels. */
@media (max-width: 420px) {
  :root {
    --section-edge: 12px;
    --section-radius: 18px;
    --section-pad: 22px;
  }

  .apex-choice__photo {
    aspect-ratio: 1;
  }

  .selected-work--canva {
    padding-inline: 18px !important;
  }

  .team-story__actions {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .apex-contact .contact-content,
  .apex-contact .person-panel {
    padding: 26px 22px;
  }
}
