:root {
  --paper: #eaeaea;
  --ink: #151515;
  --muted: #505050;
  --accent: #fd4d2d;
  --gutter: clamp(24px, 5vw, 72px);
  --header-gutter: clamp(24px, 3vw, 40px);
  --brand-width: clamp(52px, 5.15vw, 74px);
  --media-gap: clamp(9px, 1.2vw, 19px);
  --intro-gap: clamp(32px, 7vw, 110px);
  --content: 1440px;
  --radius: clamp(7px, 0.75vw, 12px);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-weight: 500;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 6px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--header-gutter);
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

.site-header a {
  pointer-events: auto;
}

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

.brand img {
  width: var(--brand-width);
  height: auto;
}

.site-header nav a,
.text-link,
footer a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-header nav a:hover,
.text-link:hover,
footer a:hover {
  border-bottom-color: currentColor;
}

main {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.manifesto {
  min-height: min(62vh, 620px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  margin-left: calc(var(--header-gutter) + var(--brand-width) - var(--gutter));
  padding: clamp(145px, 18vh, 180px) 0 clamp(72px, 8vw, 110px);
}

.manifesto h1 {
  width: 66.667vw;
  max-width: none;
  margin: 0 0 34px;
  color: var(--accent);
  font-family: "Noto Serif Display", serif;
  font-size: clamp(2.3rem, 3.8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.text-link {
  font-size: 1rem;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: clamp(65px, 8vw, 125px);
  scroll-margin-top: 110px;
  margin-right: calc(var(--header-gutter) - var(--gutter));
  margin-left: calc(var(--header-gutter) - var(--gutter));
  padding: 4vh 0 clamp(140px, 16vw, 240px);
}

.project-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.project h2 {
  width: calc((100% - var(--media-gap)) * 0.444445);
  max-width: none;
  margin: 0 0 clamp(21px, 2.5vw, 38px);
  margin-left: var(--brand-width);
  color: #303030;
  font-family: "Noto Serif Display", serif;
  font-size: clamp(1.15rem, 2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-align: left;
}

.project-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--intro-gap);
  width: calc((100% - var(--media-gap)) * 0.666667);
  margin-left: var(--brand-width);
  margin-bottom: clamp(14px, 2vw, 27px);
  color: #303030;
}

.project-intro p {
  margin: 0;
  font-size: 16px;
  line-height: 1.1;
}

.project-question {
  font-weight: 700;
}

.project-description {
  font-weight: 500;
}

.media-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--media-gap);
  align-items: start;
}

.video-shell,
.media-row > img {
  width: 100%;
  border-radius: var(--radius);
  background: #d6d6d6;
  object-fit: cover;
}

.video-shell {
  height: auto;
  aspect-ratio: 8 / 3;
}

.media-row > img {
  height: auto;
  aspect-ratio: 4 / 3;
}

.video-shell {
  position: relative;
  overflow: hidden;
}

.video-shell .video-poster,
.video-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
}

.video-shell .video-poster {
  object-fit: cover;
}

.video-shell iframe {
  z-index: 1;
  inset: auto;
  top: 50%;
  left: 50%;
  height: 150%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.video-shell.is-loaded iframe {
  opacity: 1;
}

.project-link:hover h2 {
  color: #111;
}

.project-cta {
  display: inline-block;
  margin-top: 34px;
  margin-left: var(--brand-width);
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid transparent;
}

.project-link:hover .project-cta {
  border-bottom-color: currentColor;
}

.closing-mark {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: clamp(28px, 3vw, 44px);
  width: 100%;
  padding: 0 var(--gutter) clamp(80px, 9vw, 140px);
}

.closing-mark img {
  display: block;
  width: clamp(160px, 16vw, 240px);
  height: auto;
}

.closing-contact {
  display: block;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

.closing-contact p {
  margin: 0;
}

.closing-contact span,
.closing-contact a {
  display: block;
}

.closing-contact a {
  width: fit-content;
  margin-top: 6px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.closing-contact a:hover {
  border-bottom-color: currentColor;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px var(--gutter);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

footer nav {
  display: flex;
  gap: 18px;
}

@media (max-width: 820px) {
  :root {
    --intro-gap: 36px;
  }

  .manifesto {
    min-height: auto;
    padding: 96px 0 140px;
  }

  .manifesto h1 {
    font-size: clamp(2.3rem, 6vw, 3.6rem);
  }

  .projects {
    gap: 70px;
  }

  .project h2 {
    font-size: clamp(1.25rem, 2.9vw, 1.7rem);
  }

}

@media (max-width: 640px) {
  :root {
    --gutter: 24px;
    --radius: 7px;
  }

  .site-header {
    padding: 24px;
  }

  .manifesto {
    margin-left: 0;
    padding: 120px 0 70px;
  }

  .manifesto h1 {
    width: 100%;
    margin-bottom: 28px;
    font-size: clamp(2.3rem, 10vw, 3.2rem);
    line-height: 1.06;
  }

  .projects {
    gap: 60px;
    padding-top: 10px;
    padding-bottom: 140px;
  }

  .project h2 {
    width: 100%;
    margin-left: 0;
    margin-bottom: 17px;
    font-size: clamp(1.7rem, 7.3vw, 2.3rem);
    line-height: 1.08;
  }

  .project-intro {
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
    margin-left: 0;
    margin-bottom: 14px;
  }

  .project-cta {
    margin-left: 0;
  }

  .project-intro p {
    font-size: 1rem;
  }

  .closing-mark {
    gap: 40px;
    padding-bottom: 64px;
  }

  .closing-contact {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .media-row {
    grid-template-columns: 1fr;
  }

  .video-shell,
  .media-row > img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .video-shell iframe {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }

  .media-row > img {
    display: none;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }
}

@media (orientation: landscape) and (max-height: 1024px) and (hover: none) and (pointer: coarse) {
  .manifesto h1 {
    line-height: 1.06;
  }

  .project h2 {
    font-size: clamp(1.53rem, 2.667vw, 3.13rem);
  }

  .project-intro {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--intro-gap);
    width: calc(100% - (2 * var(--brand-width)));
    margin-left: var(--brand-width);
    margin-bottom: 14px;
  }
}

@media (orientation: landscape) and (min-height: 600px) and (max-height: 1024px) and (hover: none) and (pointer: coarse) {
  .project h2 {
    width: calc(100% - (2 * var(--brand-width)));
    margin-left: var(--brand-width);
  }
}

@media (orientation: portrait) and (min-width: 641px) and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .manifesto h1 {
    line-height: 1.06;
  }

  .project h2 {
    width: 100%;
    margin-left: 0;
    margin-bottom: 17px;
    font-size: clamp(1.7rem, 7.3vw, 2.3rem);
    line-height: 1.08;
  }

  .project-intro {
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
    margin-left: 0;
    margin-bottom: 14px;
  }

  .project-cta {
    margin-left: 0;
  }

  .media-row {
    grid-template-columns: 1fr;
  }

  .video-shell,
  .media-row > img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .video-shell iframe {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }

  .media-row > img {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .video-shell iframe {
    display: none;
  }
}
