/* Archive-specific styles. Header, footer, buttons and the showreel modal
   come from /shared.css so they match the homepage exactly. */

img { max-width: 100%; height: auto; display: block; }

main { margin: 0 auto; }

/* ---------- Password gate ---------- */
.gate { display: none; }

html.gated .gate {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(3rem, 14vh, 8rem) var(--page-pad) 6rem;
}

html.gated main,
html.gated .site-footer { display: none; }

.gate__card { width: 100%; max-width: 26rem; }

.gate__title {
  font-weight: 400;
  font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
}

.gate__text {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 1.5rem;
}

.gate__row { display: flex; gap: 0.6rem; }

.gate__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.65rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  transition: border-color 0.2s ease;
}

.gate__input::placeholder { color: rgba(255, 255, 255, 0.4); }
.gate__input:focus { outline: none; border-color: rgba(255, 255, 255, 0.7); }

.gate__error {
  min-height: 1.4em;
  margin: 0.9rem 0 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- Index ---------- */
.index {
  max-width: var(--page-max);
  padding: clamp(2rem, 5vh, 3.5rem) var(--page-pad) 4rem;
}

.page-title {
  font-weight: 400;
  font-size: clamp(3.5rem, 2.4rem + 5.2vw, 6.25rem);
  line-height: 1.03;
  letter-spacing: 0.003em;
  margin: 0 0 0.5rem;
}

.page-sub {
  font-size: clamp(1.25rem, 1.1rem + 0.55vw, 1.625rem);
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 clamp(2.5rem, 5vw, 3.5rem);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}

.card {
  display: block;
  text-decoration: none;
  color: #fff;
  transition: filter 0.35s ease;
}

.card__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #1b1730;
}

.card__title {
  display: block;
  margin-top: 0.95rem;
  font-size: clamp(1.375rem, 1.2rem + 0.55vw, 1.75rem);
}

/* Hover: keep the hovered card sharp, blur + dim the rest */
.grid:hover .card { filter: brightness(0.5) blur(4px); }
.grid:hover .card:hover { filter: none; }

@media (max-width: 40rem) {
  .grid { grid-template-columns: 1fr; }
}

/* ---------- Case study ---------- */
.case {
  max-width: var(--page-max);
  padding: clamp(3.5rem, 9vh, 7rem) var(--page-pad) 4rem;
}

/* Images span the full container; text sits in a narrower, indented column. */
.case > .back,
.case > h1,
.case > .lead,
.case > p,
.case > h2 {
  max-width: 52rem;
  margin-left: clamp(0rem, 4vw, 6rem);
  margin-right: 0;
}

/* Plain text link above the title, styled like the footer links. */
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  font-size: 1rem;
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  transition: text-decoration-color 0.2s ease;
}

.back:hover, .back:focus-visible { text-decoration-color: #fff; outline: none; }

.back .arrow { width: 1rem; height: 0.75rem; flex: none; }

.case h1 {
  font-weight: 400;
  font-size: clamp(3rem, 2.2rem + 4vw, 5rem);
  line-height: 1.05;
  margin-top: 0;
  margin-bottom: 1rem;
}

.lead {
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);
  line-height: 1.4;
  color: #fff;
  margin-bottom: 2.5rem;
}

.case h2 {
  font-weight: 400;
  font-size: clamp(1.75rem, 1.45rem + 1.2vw, 2.375rem);
  line-height: 1.2;
  margin-top: clamp(3rem, 5vw, 4rem);
  margin-bottom: 1rem;
}

.case p {
  font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.15rem;
}

.case a:not(.btn) {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}
.case a:not(.btn):hover { text-decoration-color: #fff; }

/* Wide images, generous space against the text */
.shot {
  width: 100%;
  margin: clamp(3rem, 7vw, 6rem) 0;
}

.embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: clamp(3rem, 7vw, 6rem) 0;
}
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Prev / next pager — spans the full image container width */
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.pager .btn { max-width: 48%; }
.pager .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chev { width: 0.5rem; height: 0.75rem; }
.btn .chev { width: 0.5rem; height: 0.75rem; }

@media (max-width: 40rem) {
  .case > h1, .case > .lead, .case > p, .case > h2 { margin-left: 0; }
}

/* ---------- Load animation: header stays, content rises in sequentially ---------- */
@media (prefers-reduced-motion: no-preference) {
  .anim-item {
    opacity: 0;
    animation: rise-in 0.5s cubic-bezier(0.2, 0.75, 0.25, 1) both;
    animation-delay: calc(var(--i, 0) * 0.055s + 0.04s);
  }
  @keyframes rise-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }
}
