/* ============================================================
   Antonio Serafini — case study pages
   Paper, ink, Caslon. The page after the ad.
   ============================================================ */

:root {
  --paper: #f3ead6;
  --paper-deep: #e9dfc7;
  --ink: #1b1712;
  --ink-soft: rgba(27, 23, 18, 0.72);
  --rule: rgba(27, 23, 18, 0.18);
  --max: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--ink); color: var(--paper); }

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

a { color: inherit; }

/* ============ MASTHEAD ============ */
.mast {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mast a { text-decoration: none; opacity: 0.75; transition: opacity 0.18s ease; }
.mast a:hover { opacity: 1; }
.mast-name { opacity: 1 !important; }

/* ============ LAYOUT ============ */
.case {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.4rem 2rem 4rem;
}

/* ============ FILM ============ */
.film {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0b09;
  border: 1px solid var(--rule);
}

.film-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.4s ease;
}

.film:hover .film-poster { transform: scale(1.015); }

.film-play {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--paper);
  z-index: 2;
}

.film-play-ring {
  width: 4.6rem; height: 4.6rem;
  border: 2px solid var(--paper);
  border-radius: 50%;
  position: relative;
  transition: background-color 0.18s ease, transform 0.18s ease;
  background: rgba(0,0,0,0.18);
}

.film-play-ring::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-42%, -50%);
  border-left: 1.05rem solid var(--paper);
  border-top: 0.65rem solid transparent;
  border-bottom: 0.65rem solid transparent;
}

.film-play:hover .film-play-ring { background: rgba(0,0,0,0.45); transform: scale(1.06); }

.film-play-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.film-frame { position: absolute; inset: 0; z-index: 3; }
.film-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.film.is-playing .film-play,
.film.is-playing .film-poster { display: none; }

/* ============ HEAD ============ */
.case-head { margin: 3.2rem 0 2.4rem; }

.eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

.title {
  font-family: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 5.4vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 24ch;
  text-wrap: balance;
}

/* ============ BODY ============ */
.body {
  font-size: clamp(1.1rem, 1.35vw, 1.3rem);
  line-height: 1.5;
  column-count: 2;
  column-gap: 3.4rem;
  column-rule: 1px solid var(--rule);
  max-width: 1100px;
}

.body p { margin: 0 0 1.1em; break-inside: avoid; }

.body .lead {
  font-variant: small-caps;
  font-feature-settings: "smcp";
  letter-spacing: 0.07em;
  font-weight: 600;
}

/* ============ NAV BETWEEN WORKS ============ */
.case-nav {
  margin-top: 4.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  font-family: 'Libre Caslon Display', Georgia, serif;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  line-height: 1.15;
}

.case-nav a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: opacity 0.18s ease;
}

.case-nav a:hover { opacity: 0.6; }
.case-nav a:last-child { text-align: right; align-items: flex-end; }
.case-nav-all { text-align: center; align-items: center; }

.case-nav span {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============ FOOTER ============ */
.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem 2rem 2rem;
  display: flex;
  justify-content: space-between;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.foot a { text-decoration: none; }
.foot-privacy { font-weight: 500; opacity: 0.8; text-align: center; }

/* ============ RESPONSIVE ============ */
@media (max-width: 820px) {
  .body { column-count: 1; }
  .case-nav { grid-template-columns: 1fr; gap: 1.4rem; }
  .case-nav a:last-child { text-align: left; align-items: flex-start; }
  .case-nav-all { text-align: left; align-items: flex-start; }
}

@media (max-width: 600px) {
  .mast { padding: 1.2rem 1.2rem 0; font-size: 0.66rem; }
  .mast-name { display: none; }
  .case { padding: 1.4rem 1.2rem 3rem; }
  .case-head { margin: 2.2rem 0 1.6rem; }
  .film-play-label { display: none; }
  .foot { flex-direction: column; gap: 0.5rem; padding: 1rem 1.2rem 1.6rem; }
  .foot-privacy { text-align: left; }
}

/* ============ WORKS INDEX ============ */
.works-head { margin: 2rem 0 3rem; max-width: 900px; }

.works-intro {
  margin-top: 1.4rem;
  font-size: clamp(1.1rem, 1.35vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 620px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3.4rem 2.6rem;
}

.work { text-decoration: none; display: block; }

.work-poster {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #0d0b09;
  margin-bottom: 1.1rem;
}

.work-poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.work:hover .work-poster img { transform: scale(1.03); }

.work .eyebrow { margin-bottom: 0.55rem; }

.work-title {
  font-family: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

@media (max-width: 820px) {
  .works-grid { grid-template-columns: 1fr; gap: 2.6rem; }
}


/* ============ CLIENT PAGES (one page per client, works stacked) ============ */
.client-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

.work-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 5rem 0 4.2rem;
}

.films { display: grid; gap: 1.4rem 1.2rem; }
.films-2 { grid-template-columns: repeat(2, 1fr); }
.films-3 { grid-template-columns: repeat(3, 1fr); }

.film.small .film-play-ring { width: 3.4rem; height: 3.4rem; }
.film.small .film-play-ring::after { border-left-width: 0.8rem; border-top-width: 0.5rem; border-bottom-width: 0.5rem; }
.film.small .film-play-label { display: none; }

.film-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.55rem 0.8rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  z-index: 2;
  pointer-events: none;
}

/* Typographic poster: used until the film still arrives */
.film-typo {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: 1.4rem 1.6rem;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(243,234,214,0.10), rgba(243,234,214,0) 55%),
    linear-gradient(160deg, #2a2219 0%, #15110d 55%, #0d0b09 100%);
  color: var(--paper);
  font-family: 'Libre Caslon Display', Georgia, serif;
  font-size: clamp(1.4rem, 2.4vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.film.small .film-typo { font-size: clamp(1.05rem, 1.5vw, 1.35rem); padding: 1rem 1.1rem 2.4rem; }
.film-typo span { max-width: 14ch; opacity: 0.92; }

.film.no-video { cursor: default; }
.film.no-video:hover .film-poster { transform: none; }
.film-soon {
  position: absolute;
  top: 0.9rem; right: 1rem;
  z-index: 2;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.6;
}

/* ============ WORKS INDEX — client cards ============ */
.work-card { text-decoration: none; display: block; }
.work-card:hover .work-poster img { transform: scale(1.03); }
.work-card .eyebrow { margin-bottom: 0.5rem; }
.work-line {
  margin-top: 0.45rem;
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  color: var(--ink-soft);
}
.work-typo {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(160deg, #2a2219 0%, #15110d 55%, #0d0b09 100%);
  color: var(--paper);
  font-family: 'Libre Caslon Display', Georgia, serif;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.05;
}
.work-poster { position: relative; }

@media (max-width: 820px) {
  .films-2, .films-3 { grid-template-columns: 1fr; }
  .film.small .film-play-label { display: none; }
  .client-label { flex-direction: column; gap: 0.3rem; }
  .work-rule { margin: 3.4rem 0 2.8rem; }
}


/* ============ LANGUAGE SWITCH ============ */
.mast-right { display: flex; align-items: baseline; gap: 1.3rem; }
.lang-switch {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 0.18rem 0.42rem 0.14rem;
  line-height: 1;
  opacity: 0.7;
}
.lang-switch:hover { opacity: 1; }
