/* NO ASTERISK — small usability and finishing details.
   Keep the established Outfit, forest, peach and cream identity intact. */

:root {
  --up-right-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19 19 5M8 5h11v11' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Keep the primary navigation available as this long portfolio scrolls. */
.site-header {
  position: sticky;
  top: 0;
}

.skip-link {
  position: fixed;
  z-index: 1002;
  top: 10px;
  left: 12px;
  background: var(--paper);
  color: var(--forest);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 800;
  border: 2px solid var(--forest);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.primary-nav a[aria-current="location"]:not(.nav-cta) { color: var(--forest); }
.primary-nav a[aria-current="location"]:not(.nav-cta)::after { right: 0; }

/* Inline SVG mask ensures the up-right icon renders reliably even on devices
   where the unicode arrow falls back to a missing-glyph square. */
.nav-cta > span[aria-hidden="true"],
.button > span[aria-hidden="true"],
.film-feature-link > span[aria-hidden="true"],
.story-inline-link > span[aria-hidden="true"],
.ui-arrow,
.direct-email-arrow {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  font-size: 0 !important;
  line-height: 0 !important;
  vertical-align: middle;
  background: currentColor;
  -webkit-mask: var(--up-right-icon) center / contain no-repeat;
  mask: var(--up-right-icon) center / contain no-repeat;
}
.nav-cta > span[aria-hidden="true"] { margin-left: 9px; }
.form-head .ui-arrow { width: 23px; height: 23px; flex-basis: 23px; }
.footer-wordmark > span {
  display: inline-block;
  width: .32em;
  height: .32em;
  margin-left: .21em;
  vertical-align: top;
  font-size: inherit;
  color: var(--peach);
  background: currentColor;
  -webkit-mask: var(--up-right-icon) center / contain no-repeat;
  mask: var(--up-right-icon) center / contain no-repeat;
  line-height: 0;
  overflow: hidden;
  text-indent: -999px;
}

.benefit-arrow,
.graphic-target i,
.charity-arrow,
.engineering-growth-label span[aria-hidden="true"],
.story-voice-no span[aria-hidden="true"],
.step:nth-child(3) .step-icon {
  display: inline-block;
  font-size: 0;
  line-height: 0;
  background: currentColor;
  -webkit-mask: var(--up-right-icon) center / contain no-repeat;
  mask: var(--up-right-icon) center / contain no-repeat;
}
.benefit-arrow { width: 25px; height: 25px; }
.graphic-target i { width: 85px; height: 85px; }
.charity-arrow { width: 104px; height: 104px; }
.engineering-growth-label span[aria-hidden="true"] { width: 25px; height: 25px; margin-top: 9px; }
.story-voice-no span[aria-hidden="true"] { width: 14px; height: 14px; }
.step:nth-child(3) .step-icon { width: 67px; height: 67px; }
.film-video-label .ui-arrow,
.story-hero-image figcaption .ui-arrow,
.about-photo-note .ui-arrow,
.story-source-links .ui-arrow,
.story-video-bottom .ui-arrow { width: 12px; height: 12px; flex-basis: 12px; margin-left: 4px; }

/* Keep the direct email visible as a fallback to the connected enquiry form. */
.contact-copy .direct-email {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0,1fr) 20px;
  column-gap: 16px;
  row-gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin-top: 36px;
  padding: 17px 0 16px;
  border-top: 1.5px solid var(--forest);
  border-bottom: 1.5px solid var(--forest);
  transition: padding-left .2s ease;
}
.contact-copy .direct-email:hover { padding-left: 7px; }
.direct-email > span:first-child {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
.direct-email strong {
  grid-column: 1;
  font-size: clamp(16px,1.65vw,21px);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.direct-email .direct-email-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.metrics-method summary:focus-visible {
  outline: 3px solid var(--peach);
  outline-offset: 5px;
}

/* Preserve strong heading contrast on the light case-study sections. */
.case-study-page .story-brief h2 em,
.case-study-page .story-heritage h2 em,
.case-study-page .ei-history h2 em,
.case-study-page .story-delivery h2 em,
.case-study-page .story-next h2 em {
  color: var(--forest);
}

@media (hover: hover) {
  .ticker:hover .ticker-track { animation-play-state: paused; }
}

@media (max-width: 980px) {
  .primary-nav { max-height: calc(100dvh - 77px); overflow-y: auto; }
}

@media (max-width: 650px) {
  .contact-copy .direct-email { margin-top: 27px; }
  .direct-email strong { font-size: 17px; }

  /* Let mobile CTAs breathe and wrap instead of clipping long project names. */
  .hero-na .hero-actions { align-items: flex-start; gap: 17px; }
  .film-feature-link { width: 100%; max-width: 100%; line-height: 1.45; text-align: left; }
  .film-feature-link > span[aria-hidden="true"] { flex-shrink: 0; }
  .story-next-actions { width: 100%; max-width: 100%; }
  .story-next-actions .button {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    line-height: 1.45;
    text-align: left;
    justify-content: space-between;
    overflow-wrap: anywhere;
  }
  .story-next-actions .button > span[aria-hidden="true"] { flex-shrink: 0; }

  /* The number and explanatory label need different amounts of room on a phone. */
  .engineering-illustration { flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; padding-block: 22px; }
  .engineering-growth-label { text-align: left; }
  .engineering-growth-label span[aria-hidden="true"] { vertical-align: middle; margin-left: 6px; margin-top: 0; }

  .case-top, .story-hero-image figcaption { flex-wrap: wrap; row-gap: 7px; }
  .story-hero-image figcaption > span:last-child { overflow-wrap: anywhere; }
  .contact-form input, .contact-form textarea { min-height: 48px; }
  .section-top { align-items: flex-start; }
  .section-top .section-right { line-height: 1.45; }
}

@media (max-width: 380px) {
  .story-next-actions .button { padding-inline: 15px; gap: 9px; }
  .ei-history-timeline > div { grid-template-columns: 1fr; gap: 8px; }
  .impact-metric { padding-inline: 11px; }
  .contact-form { padding: 20px; }
  .hero-na .hero-proof-index { white-space: normal; }
}
