/* Hand-written overrides on top of the Webflow stylesheet.
   Keep custom changes here so the Webflow CSS can be replaced cleanly. */

/* Hero tagline: comfortable width on desktop, full width on mobile */
.hero-intro-copy .heading-4 {
  text-wrap: balance;
}
.hero-intro-copy .div-is-25:last-child {
  width: auto;
  max-width: 30rem;
}
@media screen and (max-width: 767px) {
  .hero-intro-copy .div-is-25:first-child {
    display: none;
  }
  .hero-intro-copy .div-is-25:last-child {
    width: 100%;
    max-width: none;
  }
  .hero-intro-copy .heading-4 {
    font-size: 1.75rem;
    line-height: 1.25;
  }
}

/* 404 page */
.not-found {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding: 8rem 0 4rem;
}
.not-found h1 {
  font-family: var(--font--display);
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
}
.not-found p {
  max-width: 32rem;
}

/* ---------- Tokens ---------- */
:root {
  --accent: #2b59e8;
  --hairline: rgba(0, 0, 0, 0.12);
  --panel: #f3f3f2;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Reveal on scroll (blur + rise) ---------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  filter: blur(12px);
  transform: translate3d(0, 1.5rem, 0);
  transition:
    opacity 0.9s var(--ease-out) var(--reveal-delay, 0ms),
    filter 0.9s var(--ease-out) var(--reveal-delay, 0ms),
    transform 0.9s var(--ease-out) var(--reveal-delay, 0ms);
}
.reveal-ready [data-reveal].is-revealed,
.reveal-all [data-reveal] {
  opacity: 1;
  filter: none;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal] { filter: none; transform: none; transition: opacity 0.3s linear; }
}

/* ---------- Marquees (CSS-driven, seamless) ---------- */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee var(--marquee-duration, 40s) linear infinite;
  will-change: transform;
}
.marquee-group { display: flex; flex-shrink: 0; align-items: center; margin: 0; padding: 0; list-style: none; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* Hero name */
.name-marquee { margin: -50px 0 0; font: inherit; overflow: hidden; }
.name-marquee .xl-heading { display: block; }
@media screen and (max-width: 479px) { .name-marquee .xl-heading { margin-top: 110px; } }

/* Client logos */
.clients { padding: 6rem 0 4rem; }
.clients__label {
  font-size: 0.8125rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--colour--grey); margin: 0 0 2.5rem;
}
.logo-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.logo-marquee:hover .marquee-track { animation-play-state: paused; }
.logo-marquee li { padding-right: clamp(3rem, 6vw, 6rem); display: flex; align-items: center; }
.logo-marquee img {
  display: block; width: auto; max-width: none;
  filter: grayscale(1); opacity: 0.5;
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.logo-marquee img:hover { filter: none; opacity: 1; }
@media screen and (max-width: 479px) {
  .clients { padding: 4rem 0 3rem; }
  .logo-marquee img { transform: scale(0.8); }
  .logo-marquee li { padding-right: 2.25rem; }
}

/* ---------- Work list ---------- */
.work-list { display: flex; flex-direction: column; }
.work-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--hairline);
}
.work-row:last-child { padding-bottom: 0; }
.work-row__info { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.work-row__title {
  font-family: var(--font--display); font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 0.75rem;
}
.work-row__title a { color: inherit; }
.work-row__outcome { font-size: 1.125rem; line-height: 1.45; color: var(--colour--dark-grey); margin: 0 0 0.75rem; max-width: 30rem; }
.work-row__role { color: var(--accent); font-size: 1.125rem; margin: 0 0 1.25rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.tag-list li {
  margin: 0;
  font-size: 0.875rem; line-height: 1.2; color: var(--colour--dark-grey);
  background: rgba(0, 0, 0, 0.05); border-radius: 999px; padding: 0.4rem 0.8rem;
}
.work-row__cta {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 999px; padding: 0.6rem 1.1rem;
  font-size: 0.95rem; transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.work-row__cta:hover { background: #000; color: #fff; border-color: #000; }
.work-row__cta span { transition: transform 0.25s ease; }
.work-row__cta:hover span { transform: translateX(3px); }
.work-row__media {
  position: relative; display: block; background: var(--panel);
  border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 0.75rem;
  padding: clamp(1rem, 5%, 3.5rem) clamp(1rem, 7%, 5rem) clamp(2rem, 7%, 4rem);
}
.work-row__frame {
  display: block; aspect-ratio: 16 / 10; border-radius: 0.5rem; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 18px 40px rgba(0, 0, 0, 0.10);
}
.work-row__frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-out); }
.work-row__media:hover .work-row__frame img { transform: scale(1.03); }
.work-row__year {
  position: absolute; right: 1.25rem; bottom: 0.9rem;
  font-size: 0.8rem; letter-spacing: 0.25em; color: var(--accent);
}
@media screen and (max-width: 767px) {
  .work-row { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem 0 2.5rem; }
  .work-row__media { order: -1; padding: 0.75rem 0.75rem 2.25rem; }
  .work-row__year { right: 0.9rem; bottom: 0.7rem; }
  .work-row__info { gap: 1.5rem; }
}

/* Case-study tag pills sit under the "Project Type" label */
.project-details .tag-list,
.content-wrapper.is-project-details .tag-list { margin-top: 0.25rem; }

/* ---------- Enquiry form ---------- */
.enquiry-form { margin-top: 2.5rem; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; font-weight: 400; }
.field--full { grid-column: 1 / -1; }
.field > span { font-size: 0.875rem; color: var(--colour--dark-grey); }
.field em { font-style: normal; color: var(--colour--grey); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: #000; background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 0.5rem; padding: 0.8rem 1rem;
  width: 100%; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.form-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; }
.form-actions .button { border: 0; cursor: pointer; }
.form-actions .button[disabled] { opacity: 0.5; cursor: progress; }
.form-status { margin: 0; font-size: 0.95rem; }
.form-status.is-error { color: #c62828; }
.enquiry-form.is-sent .form-grid, .enquiry-form.is-sent .form-actions .button { display: none; }
.enquiry-form.is-sent .form-status { font-size: 1.25rem; }
@media screen and (max-width: 479px) { .form-grid { grid-template-columns: 1fr; } }

/* Case-study footer link back to the work list */
.all-work { margin: 2.5rem 0 0; font-size: 1.125rem; }
