/* Responsive additions to the original Crafted Digital design. */

.form-helper {
  max-width: 420px;
  color: #b8c0c4;
  font-size: 13px;
  line-height: 1.7;
  margin: 22px 0 0;
}
.form-helper a { color: #d59a81; text-decoration: underline; text-underline-offset: 4px; }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #9ba8ae; opacity: 1; }

html { scroll-padding-top: 22px; }

/* A restrained copy panel, extending to the edge of the original hero. */
.hero {
  --hero-gutter: clamp(22px, 4vw, 68px);
  overflow: hidden;
}

/* Centre the stepped headline between the left gutter and the copy panel. */
.hero > .hero-copy { min-width: 0; }
.hero .hero-title-art {
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  font-size: clamp(66.64px, 8.33vw, 133.28px);
}
.hero .eyebrow { justify-content: center; text-align: center; }

@media (max-width: 650px) {
  .hero .hero-title-art { font-size: clamp(55.86px, 17.64vw, 74.48px); }
  .hero .eyebrow { letter-spacing: .09em; }
  .hero .eyebrow > span { display: none; }
}

@media (min-width: 901px) {
  .hero > .hero-copy { width: calc(100% + 8vw); }
}

.hero .hero-statement {
  min-width: 0;
  width: 100%;
  max-width: none;
}

.hero-statement-panel {
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: clamp(28px, 3vw, 42px) clamp(24px, 2.6vw, 38px);
}

.hero-statement-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(-1 * var(--hero-gutter)) 0 0;
  background: rgba(15, 29, 38, .62);
  border: 1px solid rgba(242, 239, 232, .24);
  border-left-color: rgba(217, 151, 123, .65);
  pointer-events: none;
}

.hero-statement-panel .hero-statement-body {
  max-width: 43ch;
  color: #d1d9dc;
}

.hero-statement-panel .hero-statement-body + .hero-statement-body { margin-top: 18px; }

.hero-statement-body strong {
  color: var(--white, #fbfaf7);
  font-weight: 600;
}

.hero .hero-statement.reveal {
  transform: translateX(clamp(40px, 8vw, 120px));
  transition-property: opacity, transform;
  transition-duration: 1s, 1.25s;
  transition-delay: .28s;
  transition-timing-function: cubic-bezier(.16, .78, .24, 1);
}

.hero .hero-statement.reveal.is-visible { transform: none; }

@media (max-width: 900px) {
  .hero .hero-statement { margin-inline: 0; }
  .hero-statement-panel { padding: 28px; }
  .hero-statement-panel .hero-statement-body { max-width: 60ch; }
}

@media (max-width: 650px) {
  .hero { --hero-gutter: 22px; }
  .hero-statement-panel { padding: 24px 22px; }
  .hero-statement-panel .hero-statement-body { font-size: 16px; line-height: 1.7; }
  .hero-statement-panel .hero-statement-body + .hero-statement-body { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .hero-statement.reveal { opacity: 1; transform: none; transition: none; }
}

/* The archive now presents two experience cards. */
.experience-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* A compact report preview in the original paper, navy and copper palette. */
.reporting-mini {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(40px, 5vw, 64px) clamp(22px, 4vw, 68px);
  background: var(--paper-2, #e7e2d8);
  border-block: 1px solid var(--line, rgba(23, 33, 38, .22));
}

.reporting-mini > * { min-width: 0; }

.reporting-mini h2 {
  margin: 14px 0 0;
  font-family: var(--font-head, "Manrope", sans-serif);
  font-size: clamp(26px, 2.8vw, 36px);
  font-style: normal;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.reporting-mini-copy > p {
  max-width: 520px;
  margin: 20px 0 0;
  color: #566168;
  font-size: 16px;
  line-height: 1.7;
}

.reporting-mini .report-card {
  width: calc(100% - 8px);
  max-width: 680px;
  justify-self: end;
  margin: 0 8px 8px 0;
  padding: clamp(22px, 2.5vw, 32px);
  box-shadow: 8px 8px 0 var(--copper, #a85f45);
  translate: none;
  will-change: auto;
}

.reporting-mini .report-head { gap: 16px; padding-bottom: 20px; }
.reporting-mini .report-head h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.1; }
.reporting-mini .report-head > span { flex-shrink: 0; }
.reporting-mini .report-chart { height: 144px; padding-block: 20px; }
.reporting-mini .report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px 0 0; }
.reporting-mini .report-metrics b { font-size: clamp(13px, 1.2vw, 16px); font-weight: 500; }
.reporting-mini .report-note { color: #b8c2c7; text-align: left; font-size: 9px; line-height: 1.7; margin-top: 20px; letter-spacing: .06em; }

/* Checkerboard at rest, with contrasting colours on hover and keyboard focus. */
#services .service-card { display: block; }

#services .service-card:focus-visible {
  outline: 2px solid #d9977b;
  outline-offset: -7px;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-size: 12px;
  font-weight: 500;
}

.service-card-link > span { transition: transform .25s ease; }
.service-card:hover .service-card-link > span,
.service-card:focus-visible .service-card-link > span { transform: translate(3px, -3px); }

#services .service-grid > .service-card:is(:nth-child(4n + 1), :nth-child(4n)) {
  --service-active-background: var(--copper, #a85f45);
  --service-active-copy: var(--white, #fbfaf7);
  --service-active-icon: var(--navy, #152531);
  background: var(--navy, #152531);
  color: var(--paper, #f2efe8);
  border-right-color: rgba(242, 239, 232, .18);
  border-bottom-color: rgba(242, 239, 232, .18);
}

#services .service-grid > .service-card:is(:nth-child(4n + 1), :nth-child(4n)) p { color: #c8ced0; }

#services .service-grid > .service-card:is(:nth-child(4n + 1), :nth-child(4n)) .service-icon {
  background: var(--copper, #a85f45);
  border-color: rgba(242, 239, 232, .72);
}

#services .service-grid > .service-card:is(:nth-child(4n + 2), :nth-child(4n + 3)) {
  --service-active-background: var(--navy, #152531);
  --service-active-copy: #c8ced0;
  --service-active-icon: var(--copper, #a85f45);
  background: var(--paper-2, #e7e2d8);
  color: var(--ink, #172126);
  border-right-color: var(--line, rgba(23, 33, 38, .22));
  border-bottom-color: var(--line, rgba(23, 33, 38, .22));
}

#services .service-grid > .service-card:is(:nth-child(4n + 2), :nth-child(4n + 3)) p { color: #566168; }

#services .service-grid > .service-card:is(:nth-child(4n + 2), :nth-child(4n + 3)) .service-icon {
  background: transparent;
  border-color: var(--ink, #172126);
}

#services .service-card p { transition: color .4s; }

#services .service-grid > .service-card:focus-visible {
  background: var(--service-active-background);
  color: var(--white, #fbfaf7);
  border-color: rgba(251, 250, 247, .35);
  outline-color: var(--white, #fbfaf7);
}

#services .service-grid > .service-card:focus-visible p { color: var(--service-active-copy); }
#services .service-grid > .service-card:focus-visible li { opacity: 1; }
#services .service-grid > .service-card:focus-visible::after { transform: scale(1.45); }
#services .service-grid > .service-card:focus-visible .service-icon {
  background: var(--service-active-icon);
  color: var(--white, #fbfaf7);
  border-color: rgba(251, 250, 247, .72);
}

@media (hover: hover) and (pointer: fine) {
  #services .service-grid > .service-card:hover {
    background: var(--copper, #a85f45);
    color: var(--white, #fbfaf7);
    border-color: rgba(251, 250, 247, .35);
  }
  #services .service-grid > .service-card:hover p { color: var(--white, #fbfaf7); }
  #services .service-grid > .service-card:hover li { opacity: 1; }
  #services .service-grid > .service-card:hover .service-icon {
    background: var(--navy, #152531);
    color: var(--white, #fbfaf7);
    border-color: rgba(251, 250, 247, .72);
  }
}

/* Make archive image links visible on touch devices and smaller previews. */
@media (hover: none), (pointer: coarse), (max-width: 900px) {
  .platform-image-link::after,
  .social-shot > a::after,
  .experience-card figure > a::after {
    opacity: 1;
    transform: none;
  }
}

/* Show complete project captures at tablet sizes as well as on phones. */
@media (max-width: 900px) {
  .hero { min-height: auto; gap: 28px; }
  .hero-statement { margin-top: 12px; padding-top: 8px; }

  .experience-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-art {
    display: flex;
    flex-direction: column;
    min-height: 0;
    aspect-ratio: auto !important;
  }

  .project-art .project-capture,
  .project.reveal.is-visible .project-capture {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: top;
    animation: none;
    transform: none;
    filter: saturate(.92) brightness(.98);
  }

  .project-tag {
    position: static;
    max-width: 100%;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, .18);
    padding: 12px 14px;
    background: #1c2e3a;
    color: var(--paper, #f2efe8);
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: .1em;
    backdrop-filter: none;
  }

  .project:hover .project-art,
  .project:focus-visible .project-art {
    transform: none;
  }

  .reporting-mini {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .reporting-mini .report-card { justify-self: start; }
}

@media (max-width: 400px) {
  .reporting-mini .report-head { flex-wrap: wrap; gap: 12px; }
  .reporting-mini .report-chart { height: 128px; gap: 6px; }
  .reporting-mini .report-metrics { gap: 8px; }
  .reporting-mini .report-metrics small { font-size: 7px; letter-spacing: .1em; }
}

@media (max-width: 650px) {
  .projects {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Navy and warm off-white at rest; orange is reserved for interaction. */
#services .service-grid > .service-card:nth-child(n) {
  --service-rest-background: var(--paper-2, #e7e2d8);
  --service-rest-copy: var(--ink, #172126);
  --service-rest-paragraph: #566168;
  --service-rest-border: var(--line, rgba(23, 33, 38, .22));
  --service-rest-icon: transparent;
  --service-rest-icon-copy: var(--ink, #172126);
  --service-active-background: var(--copper, #a85f45);
  --service-active-copy: var(--white, #fbfaf7);
  --service-active-icon: var(--navy, #152531);
  background: var(--service-rest-background);
  color: var(--service-rest-copy);
  border-color: var(--service-rest-border);
  outline-color: currentColor;
}
#services .service-grid > .service-card:is(:nth-child(4n + 1), :nth-child(4n)) {
  --service-rest-background: var(--navy, #152531);
  --service-rest-copy: var(--white, #fbfaf7);
  --service-rest-paragraph: #c8ced0;
  --service-rest-border: rgba(251, 250, 247, .25);
  --service-rest-icon: var(--paper-2, #e7e2d8);
  --service-rest-icon-copy: var(--navy, #152531);
}
#services .service-grid > .service-card:nth-child(n) p { color: var(--service-rest-paragraph); }
#services .service-grid > .service-card:nth-child(n) li { opacity: 1; }
#services .service-grid > .service-card:nth-child(n) .service-icon {
  background: var(--service-rest-icon);
  color: var(--service-rest-icon-copy);
  border-color: currentColor;
}
/* The stacked phone layout always reads navy, off-white, navy, off-white. */
@media (max-width: 650px) {
  #services .service-grid > .service-card:nth-child(n) {
    --service-rest-background: var(--paper-2, #e7e2d8);
    --service-rest-copy: var(--ink, #172126);
    --service-rest-paragraph: #566168;
    --service-rest-border: var(--line, rgba(23, 33, 38, .22));
    --service-rest-icon: transparent;
    --service-rest-icon-copy: var(--ink, #172126);
  }
  #services .service-grid > .service-card:nth-child(odd) {
    --service-rest-background: var(--navy, #152531);
    --service-rest-copy: var(--white, #fbfaf7);
    --service-rest-paragraph: #c8ced0;
    --service-rest-border: rgba(251, 250, 247, .25);
    --service-rest-icon: var(--paper-2, #e7e2d8);
    --service-rest-icon-copy: var(--navy, #152531);
  }
}

/* Match the two landscape project covers in this row. */
@media (min-width: 901px) {
  #work .case-lighthouse,
  #work .case-relytech {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

#work .case-relytech { background: #f5f6f8; }
#work .case-relytech .project-capture {
  object-fit: contain;
  object-position: center;
  filter: none;
  animation: none;
  transform: none;
}


/* Frame the featured BeautySouthAfrica website without covering its masthead. */
#work .case-beauty {
  display: flex;
  flex-direction: column;
  min-height: 0;
  aspect-ratio: auto;
}
#work .case-beauty .project-capture {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top;
  filter: none;
  animation: none;
  transform: none;
}
#work .case-beauty .project-tag {
  position: static;
  max-width: 100%;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding: 12px 14px;
  background: #1c2e3a;
  color: var(--paper, #f2efe8);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .1em;
  backdrop-filter: none;
}


/* Keep the Dent & Paint cover crisp and focus its central content on phones. */
#work .case-mv-cars .project-capture {
  object-fit: contain;
  object-position: center;
  filter: none;
  animation: none;
  transform: none;
}
@media (max-width: 650px) {
  #work .case-mv-cars .project-capture,
  body[data-theme="mv-cars"] .mv-cars-hero img {
    aspect-ratio: 5 / 3;
    height: auto;
    object-fit: cover;
    object-position: center top;
  }
}

/* Restore the original, compact service-card proportions. */
#services .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#services .service-grid > .service-card {
  grid-column: auto;
  display: block;
  min-width: 0;
  width: 100%;
  aspect-ratio: auto;
}
#services .service-card .card-no { padding-right: 52px; line-height: 1.6; }
@media (hover: hover) and (pointer: fine) {
  #services .service-grid > .service-card:nth-child(n):hover {
    background: var(--copper, #a85f45);
    color: #fff;
    border-color: rgba(251, 250, 247, .35);
  }
  #services .service-grid > .service-card:nth-child(n):hover p { color: #fff; }
  #services .service-grid > .service-card:nth-child(n):hover .service-icon {
    background: var(--navy, #152531);
    color: #fff;
    border-color: currentColor;
  }
}
@media (max-width: 650px) {
  #services .service-grid { grid-template-columns: minmax(0, 1fr); }
}

#services .service-grid > .service-card:nth-child(n):focus-visible {
  background: var(--copper, #a85f45);
  color: var(--white, #fbfaf7);
  border-color: rgba(251, 250, 247, .35);
  outline-color: var(--white, #fbfaf7);
}
#services .service-grid > .service-card:nth-child(n):focus-visible p { color: var(--white, #fbfaf7); }
#services .service-grid > .service-card:nth-child(n):focus-visible .service-icon {
  background: var(--navy, #152531);
  color: var(--white, #fbfaf7);
  border-color: currentColor;
}
