/* =========================================================
   Sandra Haller – Landing page
   Design system: black/white, one grotesque (Helvetica Neue),
   huge display type vs. tiny UI type.
   Colour comes only from the images.
   ========================================================= */

:root {
  --bg: #000;
  --fg: #fff;
  --line: #333;
  --muted: rgba(255, 255, 255, 0.6);

  /* Helvetica Neue is a system font on Mac/iOS; other systems fall back to Helvetica/Arial */
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ui: 12px;
  --section-title: 10vw;

  --pad: 16px;
  --gap: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, figure {
  margin: 0;
  padding: 0;
  font-weight: 400;
}

ul { list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* Hidden visually, still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 4px;
}

/* Arrow icon from shaller.at (points up-right by default) */
.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: none;
  transition: translate 0.4s var(--ease);
}

.icon--right { transform: rotate(45deg); }
.icon--left  { transform: rotate(-135deg); }

/* Fine underline on hover */
.link { position: relative; }

.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Menu and footer-bottom links: outline on hover, like the "More about me" button.
   Negative margins keep the text where it was. */
.site-header .link,
.footer__row .link,
.footer__bottom .link {
  margin: -6px -12px -5px;
  padding: 6px 12px 5px;
  border: 1px solid transparent;
  border-radius: 99px;
  transition: border-color 0.25s;
}

.site-header .link::after,
.footer__row .link::after,
.footer__bottom .link::after { content: none; }

.site-header .link:hover,
.footer__row .link:hover,
.footer__bottom .link:hover,
.site-header .link[aria-current="page"] {
  border-color: currentColor;
}

/* Text link with arrow and underline (like "more about me" on shaller.at) */
/* Outlined pill link with arrow (e.g. "More about me") */
.more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 6px;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-size: var(--ui);
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background-color 0.25s, color 0.25s;
}

.more .icon {
  width: 9px;
  height: 9px;
}

.more:hover {
  background: var(--fg);
  color: var(--bg);
}

.more:hover .icon { translate: 3px 0; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--pad);
  font-size: var(--ui);
  line-height: 1;
  text-transform: uppercase;
  mix-blend-mode: difference; /* stays readable on top of images */
}

.site-nav {
  display: flex;
  gap: 32px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 72px var(--pad) var(--pad);
  overflow: hidden;
}

/* "More about me" sits bottom left, next to the last row */
/* Next to "Art Director" – the exact position is set by script.js */
.hero__meta {
  position: absolute;
  left: var(--pad);
  bottom: calc(var(--pad) + 0.6vw);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.2;
  animation: fade-in 0.8s var(--ease) 0.8s both;
}

/* Aligns with the text inside the pill below */
.hero__meta p { padding-left: 15px; }

/* Staggered headline: words alternate left/right across the full width.
   script.js scales the font size so the widest row fills the width exactly. */
.hero__title {
  display: flex;
  flex-direction: column;
  font-size: 11vw; /* fallback without JavaScript */
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.4em; /* minimum space between the parts of a row */
}

.hero__row:nth-child(3) { justify-content: flex-end; }

/* Each word slides up out of a mask on page load */
.hero__mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  /* room for letters that reach past their box (e.g. the final "A"), so the mask does not cut them */
  padding-right: 0.08em;
  margin-right: -0.08em;
}

.hero__mask > span {
  display: block;
  animation: word-in 1.1s var(--ease) both;
}

.hero__row:nth-child(1) .hero__mask:first-child > span { animation-delay: 0.15s; }
.hero__row:nth-child(1) .hero__mask:last-child > span  { animation-delay: 0.25s; }
.hero__row:nth-child(2) .hero__mask > span { animation-delay: 0.35s; }
.hero__row:nth-child(3) .hero__mask > span { animation-delay: 0.45s; }

@keyframes word-in {
  from { transform: translateY(105%); }
  to   { transform: none; }
}

.hero__row:first-child {
  position: relative;
  gap: 1.3em; /* room between "Hi," and "I'm Sandra" for the image fan */
}

.hero__mask { position: relative; z-index: 1; }

/* Image fan, centred in the first row behind the words; follows the mouse slightly */
.hero__stack {
  position: absolute;
  left: 50%;
  bottom: 0.15em;
  width: 1.8em;
  margin-left: -0.9em;
  aspect-ratio: 3 / 4;
  translate: calc(var(--mx, 0) * 10px) calc(var(--my, 0) * 8px);
  rotate: calc(var(--mx, 0) * 3deg);
  transition: translate 0.6s var(--ease), rotate 0.6s var(--ease);
}

.hero__card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-origin: 50% 100%; /* fanned from the bottom – cards peek out top right */
  transition: translate 0.8s var(--ease), rotate 0.8s var(--ease);
  animation: card-in 1.2s var(--ease) both;
}

.hero__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark gradient at the bottom keeps the white words readable on the photo */
.hero__card--front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 60%);
}

.hero__card--back   { translate: 0 -3%; rotate: 11deg; animation-delay: 0.1s; }
.hero__card--middle { translate: 0 -1%; rotate: 5deg;  animation-delay: 0.25s; }
.hero__card--front  { animation-delay: 0.4s; }

/* On hover the fan opens further */
.hero__stack:hover .hero__card--back   { translate: 4% -5%; rotate: 17deg; }
.hero__stack:hover .hero__card--middle { translate: 2% -2%; rotate: 9deg; }
.hero__stack:hover .hero__card--front  { rotate: -2deg; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(12%) rotate(-4deg); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Sections ---------- */

.section {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 72px; /* room for the fixed header */
}

/* Section end: hairline, big number left, huge title right.
   Comes first in the HTML (for screen readers), moved to the end via order. */
.section-end {
  order: 2;
  margin-top: auto;
  padding: 14px var(--pad) var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--gap);
  border-top: 1px solid var(--line);
  font-size: var(--section-title);
  line-height: 0.8;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.section-end__num { padding-top: 0.15em; }

.section-end__title {
  font-size: inherit;
  text-align: right;
}

/* ---------- Work / slider ---------- */

.slider { order: 1; }

.slider__track {
  --visible: 4.4; /* visible cards – the cut-off one shows there is more */
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pad);
  padding-inline: var(--pad);
  scrollbar-width: none;
}

.slider__track::-webkit-scrollbar { display: none; }

.card {
  flex: 0 0 calc((100% - 4 * var(--gap)) / var(--visible));
  scroll-snap-align: start;
}

.card a { display: block; }

.card__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #111;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.card__media--top img { object-position: 50% 0; }

.card a:hover img,
.card a:focus-visible img {
  transform: scale(1.04);
}

.card__title {
  margin-top: 14px;
  font-size: var(--ui);
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.card__meta {
  margin-top: 4px;
  font-size: var(--ui);
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

.works { min-height: auto; }

.slider { position: relative; }

/* Hold & drag with the mouse */
.slider__track.is-draggable { cursor: grab; }
.slider__track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.slider__track.is-dragging a { pointer-events: none; }

.slider__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px var(--pad) 72px;
}

/* Scrollbar: shows the position, can be dragged or clicked */
.slider__bar {
  position: relative;
  flex: 1;
  height: 21px;
  margin-right: 24px;
  cursor: pointer;
  touch-action: none;
}

.slider__bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 1px;
  background: var(--line);
}

.slider__thumb {
  position: absolute;
  top: 9px;
  left: 0;
  height: 3px;
  background: var(--fg);
  transition: height 0.2s, top 0.2s;
}

.slider__bar:hover .slider__thumb,
.slider__bar.is-dragging .slider__thumb {
  top: 8px;
  height: 5px;
}

.slider__btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--fg);
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  font-size: 12px; /* icon size */
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, opacity 0.25s;
}

.slider__btn:hover:not(:disabled) {
  background: var(--fg);
  color: var(--bg);
}

.slider__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ---------- About (about.html) ---------- */

.about__grid {
  order: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding: 0 var(--pad);
  align-items: center;
}

/* About page: content centred in the viewport, same space above and below */
.about {
  justify-content: center;
  padding-bottom: 72px;
}

/* Contact links in the footer: pill on hover, needs a bit more line spacing */
.footer__row .link {
  display: inline-block;
  line-height: 1.3;
}

.footer__row > div > p { line-height: 1.9; }

.about__portrait {
  grid-column: 1 / span 4;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__content {
  grid-column: 6 / -1;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.about__lead {
  font-size: clamp(26px, 3.2vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.about__text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  color: rgba(255, 255, 255, 0.85);
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.facts__title {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: var(--ui);
  color: var(--muted);
  text-transform: uppercase;
}

.facts li {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--ui);
  line-height: 1.35;
  text-transform: uppercase;
}

.facts li span:first-child { color: var(--muted); }

/* ---------- Footer (adapted from shaller.at) ---------- */

.site-footer {
  padding: 96px var(--pad) var(--pad);
}

.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--gap);
  font-size: 17px;
  line-height: 1.3;
}

.footer__label {
  margin-bottom: 40px;
  font-size: 32px;
  font-weight: 300;
}

.footer__more { text-align: right; }

/* "Things I like" as on shaller.at: video appears next to the text on hover,
   on touch devices a tap opens/closes it (play icon turns into a close icon) */
.things {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.things__icon {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.things__icon--close,
.things.is-open .things__icon--play { display: none; }
.things.is-open .things__icon--close { display: block; }

.things__media {
  position: absolute;
  right: 260px;
  bottom: -100px;
  z-index: 3;
  width: 300px;
  height: 375px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

.things.is-open .things__media {
  visibility: visible;
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .things:hover .things__media {
    visibility: visible;
    opacity: 1;
  }
}

.things__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Big "Let's talk" with thick underline and arrow */
.talk {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 80px;
  padding-bottom: 0.08em;
  font-size: clamp(56px, 11vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.talk::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: currentColor;
  clip-path: inset(0);
  transition: clip-path 0.5s var(--ease);
}

.talk .icon {
  width: 0.45em;
  height: 0.45em;
  margin-bottom: 0.12em;
}

.talk:hover .icon { translate: 0.06em -0.06em; }
.talk:hover::after { clip-path: inset(0 0 0 100%); }

.footer__bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  padding-top: 24px;
  font-size: var(--ui);
  line-height: 1;
  text-transform: uppercase;
}

.footer__bottom > :last-child { justify-self: end; }

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
  .slider__track { --visible: 2.6; }

  .about__portrait { grid-column: 1 / span 5; }
  .about__content  { grid-column: 7 / -1; gap: 40px; }
  .about__text,
  .facts { grid-template-columns: 1fr; }
}

/* ---------- Phone ---------- */

@media (max-width: 760px) {
  :root {
    --ui: 11px;
    --section-title: 13vw;
    --gap: 12px;
  }

  .site-nav { gap: 16px; }

  /* Headline: "I'm Sandra" and "Director" move to their own lines */
  .hero__title { font-size: 15.5vw; }
  .hero__row:first-child { flex-wrap: wrap; gap: 0; }

  .footer__bottom {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .footer__bottom > :last-child { justify-self: start; }
  .hero__row:first-child .hero__mask:last-child {
    flex-basis: 100%;
    text-align: right;
  }
  .hero__row:nth-child(2) .hero__mask { white-space: normal; }
  .hero__row:nth-child(3) .hero__mask { white-space: normal; text-align: right; }
  .hero__stack {
    position: relative;
    left: auto;
    bottom: auto;
    top: 0.55em; /* reaches down behind "I'm Sandra" */
    width: 1.8em;
    margin: 0 8vw 0 0;
  }

  .hero__meta {
    position: static;
    align-self: flex-start;
    margin-top: 28px;
  }

  .things__media {
    left: 0;
    right: auto;
    bottom: calc(100% + 16px);
    width: 240px;
    height: 300px;
  }

  .section { min-height: auto; }

  .slider__track { --visible: 1.45; }

  .about__grid {
    grid-template-columns: 1fr;
    padding-bottom: 64px;
  }

  .about__portrait,
  .about__content { grid-column: auto; }

  .about__portrait { width: 75%; }

  .footer__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .footer__more {
    align-items: flex-start;
    text-align: left;
  }

  .slider__bar { margin-right: 8px; }
}

/* Less motion if set in the system */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   Case study page (e.g. future-fit-festival.html)
   ========================================================= */

.case-hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
}

.case-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: settle 1.6s var(--ease) both;
}

/* Darkens top and bottom so header and title stay readable */
.case-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.7));
}

@keyframes settle {
  from { transform: scale(1.08); }
  to   { transform: none; }
}

.case-hero__meta {
  position: absolute;
  z-index: 1;
  top: 64px;
  left: var(--pad);
  right: var(--pad);
  display: flex;
  justify-content: space-between;
  font-size: var(--ui);
  text-transform: uppercase;
}

/* Title fills the full width (script.js scales it via data-fit) */
.case-hero__title {
  position: absolute;
  z-index: 1;
  left: var(--pad);
  right: var(--pad);
  bottom: var(--pad);
  font-size: 8.4vw;
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.case-hero__title span {
  display: inline-block;
  animation: word-in 1.1s var(--ease) 0.2s both;
}

.case-hero__title,
.case-hero__title span { overflow: visible; }

/* Facts and tags */
.case-info {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding: 96px var(--pad) 0;
}

.case-facts {
  grid-column: 1 / span 6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px var(--gap);
  margin: 0;
}

.case-facts dt,
.case-label {
  margin-bottom: 8px;
  font-size: var(--ui);
  color: var(--muted);
  text-transform: uppercase;
}

.case-facts dd {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.case-tags {
  grid-column: 8 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 7px 14px 6px;
  border: 1px solid #555;
  border-radius: 99px;
  font-size: var(--ui);
  line-height: 1.2;
  text-transform: uppercase;
}

/* About the project: words light up while scrolling (script.js) */
.case-about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding: 160px var(--pad);
}

.case-about .case-label { grid-column: 1 / span 3; }

.case-about__text {
  grid-column: 4 / -1;
  font-size: clamp(26px, 3.4vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.case-about__text .word {
  opacity: 0.2;
  transition: opacity 0.4s ease-out;
}

.case-about__text .word.is-lit { opacity: 1; }

/* Image sequence */
.case-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: 0 var(--pad);
}

.case-media {
  overflow: hidden;
  border-radius: 6px;
  background: #111;
}

.case-media img {
  width: 100%;
  height: auto;
}

.case-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.case-row--portrait .case-media { aspect-ratio: 4 / 5; }

.case-row--portrait img {
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

.case-result {
  align-self: flex-end;
  max-width: 18em;
  padding: 120px 0 160px;
  font-size: clamp(24px, 2.6vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

/* Next project: text only, between two fine lines */
.case-next {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 300px;
  padding: var(--pad);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-next__label {
  font-size: var(--ui);
  text-transform: uppercase;
}

.case-next__title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--gap);
  font-size: min(7.5vw, 150px);
  line-height: 0.85;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.case-next__title .icon {
  width: 0.5em;
  height: 0.5em;
  margin-bottom: 0.08em;
}

.case-next:hover .case-next__title .icon { translate: 0.06em -0.06em; }

/* Three portrait images side by side (e.g. social media posts) */
.case-row--three { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 760px) {
  .case-row--three { grid-template-columns: 1fr 1fr; }
  .case-next { height: 220px; }
}

@media (max-width: 760px) {
  .case-info,
  .case-about { grid-template-columns: 1fr; }

  .case-facts,
  .case-tags,
  .case-about .case-label,
  .case-about__text { grid-column: auto; }

  .case-info { padding-top: 64px; gap: 48px; }
  .case-about { padding: 96px var(--pad); }
  .case-row { grid-template-columns: 1fr; }
  .case-result { padding: 72px 0 96px; }
}

/* ---------- Text page (imprint) ---------- */

.text-page {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding: 160px var(--pad) 120px;
}

.text-page__title {
  grid-column: 1 / -1;
  margin-bottom: 64px;
  font-size: clamp(48px, 9vw, 160px);
  line-height: 0.85;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.text-page__body {
  grid-column: 4 / span 7;
  max-width: 44em;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

.text-page__body h2 {
  margin: 56px 0 16px;
  font-size: 26px;
  line-height: 1.15;
  color: var(--fg);
}

.text-page__body h3 {
  margin: 32px 0 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
}

.text-page__body p,
.text-page__body ul { margin-bottom: 14px; }

.text-page__body ul {
  padding-left: 1.2em;
  list-style: disc;
}

.text-page__body a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1024px) {
  .text-page__body { grid-column: 1 / -1; }
}

/* ---------- Case study additions ---------- */

.case-row--four { grid-template-columns: repeat(4, 1fr); }

.case-media video {
  display: block;
  width: 100%;
  height: auto;
}

/* Award badge next to the tags */
.case-award {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--ui);
  text-transform: uppercase;
}

.case-award img {
  width: 56px;
  height: 56px;
}

/* ---------- More work page ---------- */

.work-intro {
  padding: 160px var(--pad) 96px;
}

.work-intro__title {
  font-size: 15vw;
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.work-intro__title span { display: inline-block; }

.work-intro__text {
  max-width: 22em;
  margin: 40px 0 0 auto;
  font-size: clamp(22px, 2.2vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

/* Free arrangement: each project sits in its own columns (--c, --s)
   and is shifted down by --y; images keep their original format */
.free-list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 120px var(--gap);
  align-items: start;
  padding: 40px var(--pad) 200px;
}

.free-item {
  grid-column: var(--c) / span var(--s);
  margin-top: var(--y);
}

.free-item__inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.free-item--right .free-item__inner { flex-direction: row-reverse; }

.free-item__label {
  flex: none;
  width: 9.5em;
  font-size: var(--ui);
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--muted);
}

.free-item__label span,
.free-item__label strong {
  display: block;
  font-weight: 400;
  color: var(--fg);
}

.free-item__label strong { margin: 6px 0 4px; }

.free-item__label .free-item__visit {
  display: inline-block;
  margin-top: 8px;
  color: var(--fg);
}

.free-item img {
  flex: 1;
  min-width: 0;
  height: auto;
  transition: transform 0.7s var(--ease), filter 0.5s;
}

.free-item a:hover img { transform: scale(1.02); }

/* Photography: masonry columns, images keep their format */
.photo-section {
  padding: 0 var(--pad) 160px;
}

.photo-grid {
  margin-top: 24px;
  columns: 4;
  column-gap: var(--gap);
}

.photo-grid img {
  width: 100%;
  height: auto;
  margin-bottom: var(--gap);
  border-radius: 6px;
  break-inside: avoid;
}

@media (max-width: 1024px) {
  .photo-grid { columns: 3; }
  .case-row--four { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .free-list { display: flex; flex-direction: column; gap: 64px; padding-bottom: 96px; }
  .free-item { margin-top: 0; }
  .free-item__inner { flex-direction: column; }
  .free-item--right .free-item__inner { flex-direction: column; }
  .free-item__label { width: auto; }
  .photo-grid { columns: 2; }
  .work-intro { padding: 120px var(--pad) 64px; }
}

/* ---------- Scroll reveal (project pages, More Work) ----------
   script.js adds .reveal only when motion is allowed, so without
   JavaScript or with reduced motion everything is simply visible. */

.reveal {
  opacity: 0;
  transform: translateY(56px);
  clip-path: inset(16% 0 0 0);
  transition:
    opacity 0.9s var(--ease),
    transform 1.2s var(--ease),
    clip-path 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  clip-path: inset(0);
}

/* The picture inside zooms back gently while it is uncovered */
.reveal img,
.reveal video {
  transform: scale(1.12);
  transition: transform 1.6s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.is-visible img,
.reveal.is-visible video { transform: none; }

/* Single images in the photography grid */
img.reveal { transform: translateY(56px); }
img.reveal.is-visible { transform: none; }

/* Photography on "More Work": free arrangement like the projects */
.free-list--photos { padding: 24px 0 0; }

.free-photo {
  grid-column: var(--c) / span var(--s);
  margin: var(--y) 0 0;
}

.free-photo figcaption {
  margin-bottom: 8px;
  font-size: var(--ui);
  color: var(--muted);
}

.free-photo img {
  width: 100%;
  height: auto;
}

@media (max-width: 760px) {
  .free-list--photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 12px;
    padding-bottom: 0;
  }

  .free-photo {
    grid-column: auto;
    margin-top: 0;
  }

  .free-photo:nth-child(even) { margin-top: 48px; }
}
