/* Behrang Mortazavian — site styles */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/vazirmatn-arabic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/vazirmatn-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #E9EBE6;
  --ink: #18232A;
  --muted: #4B575D;
  --rule: #C3C8C1;
  --signal: #A3202B;
  --screen: #18232A;
  --screen-2: #22333B;
  --screen-text: #E9EBE6;
  --screen-muted: #A9B4B6;
  --screen-rule: #34464E;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-fa: "Vazirmatn", Tahoma, sans-serif;
  --wide: 1200px;
  --gutter: clamp(16px, 4.5vw, 56px);
  --measure: 64ch;
  --section: clamp(64px, 10vw, 136px);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="fa"] body {
  font-family: var(--font-fa);
  line-height: 1.95;
  font-size: 1.0625rem;
}

.fa { font-family: var(--font-fa); font-stretch: normal; }
.en { font-family: var(--font); }

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--signal); }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
.screen :focus-visible { outline-color: var(--screen-text); }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

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

.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 64px;
}
.brand {
  font-weight: 700; font-stretch: 75%; font-size: 1.05rem; letter-spacing: 0.01em;
  text-decoration: none;
}
html[lang="fa"] .brand { font-weight: 800; font-stretch: normal; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); }
.nav .lang { color: var(--ink); font-weight: 600; }
.nav .lang.fa { font-weight: 700; }

@media (max-width: 720px) {
  .nav .section-link { display: none; }
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  padding-top: clamp(48px, 9vw, 120px);
  padding-bottom: clamp(40px, 6vw, 72px);
}
.hero.no-portrait { grid-template-columns: minmax(0, 1fr); }

.name {
  margin: 0;
  display: grid;
  font-weight: 850;
  font-stretch: 62%;
  font-size: clamp(3.6rem, 16vw, 10rem);
  line-height: 0.86;
  letter-spacing: -0.005em;
  --cut-top: 73%;
  --cut-bottom: 83%;
  --shift: 0.06em;
}
html[lang="fa"] .name {
  font-weight: 900; font-stretch: normal;
  font-size: clamp(3.2rem, 15vw, 8.6rem);
  line-height: 1.12;
  --cut-top: 71%;
  --cut-bottom: 81%;
  --shift: -0.06em;
}
.name .cut { grid-area: 1 / 1; display: block; }
.name .cut-top { clip-path: inset(0 0 calc(100% - var(--cut-top)) 0); }
.name .cut-band {
  clip-path: inset(var(--cut-top) -1em calc(100% - var(--cut-bottom)) -1em);
  transform: translateX(var(--shift));
  animation: jump 900ms steps(1, end) 250ms both;
}
.name .cut-bottom { clip-path: inset(var(--cut-bottom) 0 0 0); }

@keyframes jump {
  0% { transform: translateX(calc(var(--shift) * 4)); }
  100% { transform: translateX(var(--shift)); }
}

.alt-name {
  margin: 18px 0 0;
  font-family: var(--font-fa);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--muted);
}
html[lang="fa"] .alt-name { font-family: var(--font); font-stretch: 80%; font-weight: 600; }
html[lang="fa"] .lede { margin: 10px 0 0; max-width: 54ch; font-size: 1.05rem; }
html[lang="fa"] cite { font-style: normal; }
.statement { max-width: 46ch; }
html[lang="fa"] cite, html[lang="fa"] em, html[lang="fa"] i { font-style: normal; }

.role {
  margin: 28px 0 0;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 600;
  font-stretch: 85%;
  line-height: 1.3;
}
html[lang="fa"] .role { font-weight: 700; font-stretch: normal; line-height: 1.7; }
.statement {
  margin: 10px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.portrait {
  margin: 0;
  width: clamp(150px, 22vw, 300px);
  aspect-ratio: 4 / 5;
  background: var(--screen-2);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .portrait { order: -1; width: 132px; }
}

/* ---------- Awards strip ---------- */

.wins { border-top: 2px solid var(--ink); padding: 22px 0 clamp(56px, 8vw, 96px); }
.wins h2 {
  margin: 0 0 22px; font-size: 1rem; font-weight: 600; font-stretch: 100%; line-height: 1.4;
}
html[lang="fa"] .wins h2 { font-weight: 700; }
.wins ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px clamp(20px, 3vw, 40px);
}
.wins li { display: flex; flex-direction: column; gap: 4px; }
.wins .award { font-weight: 700; font-stretch: 82%; font-size: 1.2rem; line-height: 1.2; }
html[lang="fa"] .wins .award { font-stretch: normal; font-size: 1.1rem; line-height: 1.6; }
.wins .fest { line-height: 1.35; }
.wins .year { color: var(--muted); font-size: 0.95rem; }
.wins .more { margin: 26px 0 0; font-size: 0.95rem; }

@media (max-width: 900px) { .wins ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .wins ul { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Section basics ---------- */

.section { padding: var(--section) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-title {
  margin: 0 0 clamp(28px, 4vw, 44px);
  font-weight: 750;
  font-stretch: 70%;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1;
}
html[lang="fa"] .section-title { font-weight: 800; font-stretch: normal; line-height: 1.4; font-size: clamp(1.8rem, 4vw, 2.6rem); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 5vw, 72px);
}
.split > .section-title { margin-bottom: 0; }
@media (max-width: 820px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > .section-title { margin-bottom: 4px; }
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Films (dark band) ---------- */

.screen { background: var(--screen); color: var(--screen-text); }
.screen a:hover { text-decoration-color: var(--screen-text); }
.screen .muted { color: var(--screen-muted); }

.film { display: grid; gap: clamp(24px, 3.5vw, 40px); }
.film + .film { margin-top: clamp(64px, 9vw, 112px); padding-top: clamp(40px, 6vw, 64px); border-top: 1px solid var(--screen-rule); }

.frame {
  margin: 0;
  background: var(--screen-2);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.frame.has-img:not(.crop) { aspect-ratio: auto; }
.frame.has-img:not(.crop) img { height: auto; }
.frame.card {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 24px;
}
.card-title {
  font-weight: 800; font-stretch: 62%;
  font-size: clamp(2.2rem, 7vw, 5.6rem); line-height: 0.92;
  color: var(--screen-text);
}
html[lang="fa"] .card-title { font-family: var(--font-fa); font-stretch: normal; font-weight: 900; line-height: 1.3; font-size: clamp(2rem, 6.4vw, 5rem); }
.card-sub {
  margin-top: 14px; color: var(--screen-muted); font-size: clamp(0.95rem, 1.6vw, 1.15rem);
}
.card-sub.fa { font-weight: 600; }
.frame.small .card-title { font-size: clamp(2rem, 4.6vw, 3.6rem); }
.frame.portrait-ratio { aspect-ratio: 2 / 3; }
.frame.four-three { aspect-ratio: 4 / 3; }

.film-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(20px, 5vw, 72px);
}
@media (max-width: 820px) { .film-body { grid-template-columns: minmax(0, 1fr); } }

.film-title {
  margin: 0;
  font-weight: 800; font-stretch: 66%;
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 0.95;
}
html[lang="fa"] .film-title { font-stretch: normal; font-weight: 900; line-height: 1.35; font-size: clamp(2rem, 4.4vw, 3rem); }

.facts {
  margin: 20px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px;
  font-size: 0.98rem;
}
.facts dt { color: var(--muted); }
.screen .facts dt { color: var(--screen-muted); }
.facts dd { margin: 0; }

.logline { margin: 0; font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.5; max-width: 52ch; }
html[lang="fa"] .logline { line-height: 1.95; }
.credit { margin: 16px 0 0; color: var(--screen-muted); max-width: 56ch; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin: 24px 0 0; padding: 0; list-style: none; }
.actions a { font-weight: 600; }
.actions .primary a {
  display: inline-block; padding: 9px 16px; border: 1.5px solid currentColor; text-decoration: none;
}
.actions .primary a:hover { background: var(--screen-text); color: var(--screen); }
.paper .actions .primary a:hover, main > .wrap .actions .primary a:hover { background: var(--ink); color: var(--paper); }

.film.compact {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(20px, 5vw, 72px);
}
@media (max-width: 820px) { .film.compact { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Press ---------- */

.pull {
  margin: 0;
  font-weight: 750; font-stretch: 68%;
  font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.02;
  max-width: 18ch;
}
html[lang="fa"] .pull { font-stretch: normal; font-weight: 800; line-height: 1.5; font-size: clamp(1.7rem, 4vw, 2.8rem); max-width: 22ch; }
.pull-cite { display: block; margin-top: 14px; font-size: 1rem; font-weight: 500; font-stretch: 100%; color: var(--muted); }
.press-item h3 { margin: 32px 0 6px; font-size: 1.15rem; font-weight: 650; line-height: 1.35; }
.press-item p { margin: 0 0 12px; color: var(--muted); max-width: 60ch; }

/* ---------- Essays / lists ---------- */

.plain-list { list-style: none; margin: 0; padding: 0; }
.essay { padding: 22px 0; border-top: 1px solid var(--rule); }
.essay:last-child { border-bottom: 1px solid var(--rule); }
.essay a { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 650; font-stretch: 92%; line-height: 1.3; }
html[lang="fa"] .essay a { font-stretch: normal; font-weight: 700; line-height: 1.7; }
.essay p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.after-list { margin: 22px 0 0; }

/* ---------- Contact ---------- */

.email {
  display: inline-block;
  font-family: var(--font);
  font-weight: 750; font-stretch: 70%;
  font-size: clamp(1.6rem, 5.4vw, 3.4rem); line-height: 1.1;
  word-break: break-word;
}
.profiles { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 28px 0 0; padding: 0; list-style: none; }
.contact-note { margin: 18px 0 0; color: var(--muted); max-width: 52ch; }

/* ---------- Film page ---------- */

.film-hero { padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(40px, 6vw, 64px); }
.film-hero .film-title { font-size: clamp(3rem, 10vw, 7.5rem); line-height: 0.88; }
html[lang="fa"] .film-hero .film-title { font-size: clamp(2.6rem, 8vw, 6rem); line-height: 1.25; }
.film-hero .alt-name { margin-top: 14px; }
.film-hero .facts { margin-top: 28px; }
.breadcrumb { margin: 0 0 22px; font-size: 0.95rem; color: var(--muted); }

.gallery {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(12px, 2vw, 20px);
}
.gallery .stills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 20px); align-content: start; }
.gallery.single { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 720px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery .frame.portrait-ratio { max-width: 320px; }
}

.credits { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 28px; margin: 0; }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; }
@media (max-width: 520px) {
  .credits { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .credits dd { margin-bottom: 12px; }
}

.honours h3 { margin: 0 0 12px; font-size: 1.1rem; font-weight: 700; }
.honours h3:not(:first-child) { margin-top: 36px; }
.honours ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.honours li {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 2fr) auto;
  gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--rule);
}
.honours .award { font-weight: 600; }
.honours .country, .honours .year { color: var(--muted); }
@media (max-width: 720px) {
  .honours li { grid-template-columns: minmax(0, 1fr) auto; }
  .honours .award { grid-column: 1 / -1; }
  .honours .fest { grid-column: 1 / 2; }
  .honours .country { display: none; }
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-size: 0.92rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer a { color: var(--ink); }

/* ---------- 404 ---------- */

.lost { padding: clamp(80px, 14vw, 180px) 0; }
.lost p { margin: 12px 0 0; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .name .cut-band { animation: none; }
}

@media print {
  .site-header .nav, .skip { display: none; }
  .screen { background: none; color: #000; }
}
