@font-face {
  font-family: "Questrial";
  src: url("assets/fonts/questrial/Questrial-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

html {
  scrollbar-gutter: auto !important;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

@font-face {
  font-family: "Bebas Neue";
  src: url("assets/fonts/bebas-neue/BebasNeue-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #f2e9da;
  --poster-red: #9b111e;
  --surface: #050809;
  /* Shared with frame.css: the landing's final header must finish exactly
     where the persistent header begins. */
  /* Final landing frame and persistent header share these coordinates. */
  --header-side: clamp(72px, calc(8vw + 28px), 140px);
  --brand-right-offset: 50px;
  --brand-width: 353px;
  --brand-menu-gap: 64px;
}

/* Let the pointer-light settle into the exact header state instead of
   switching colour when the landing hands over to the framed pages. */
@property --title-light-x {
  syntax: "<length>";
  inherits: false;
  initial-value: -300px;
}

@property --title-light-y {
  syntax: "<length>";
  inherits: false;
  initial-value: -300px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
}

html[dir="rtl"] {
  /* Same final coordinates and Persian spacing as the persistent header. */
  --brand-menu-gap: 182px;
}

html { scrollbar-gutter: auto; }

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.reveal-hero {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
  cursor: crosshair;
  touch-action: none;
}

.reveal-hero__canvas,
.reveal-hero__fallback {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.reveal-hero__canvas--light {
  z-index: 1;
  pointer-events: none;
}

.reveal-hero__shade {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .2), transparent 35%, rgba(0, 0, 0, .1)),
    linear-gradient(0deg, rgba(0, 0, 0, .28), transparent 38%);
}

.reveal-hero__language {
  position: absolute;
  z-index: 4;
  top: max(20px, env(safe-area-inset-top));
  left: clamp(18px, 3vw, 48px);
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(242, 233, 218, .72);
  font: inherit;
  font-size: .7rem;
  letter-spacing: .16em;
}

.reveal-hero__language:hover,
.reveal-hero__language:focus-visible {
  color: var(--poster-red);
  outline: 1px solid var(--poster-red);
  outline-offset: 2px;
}

.reveal-hero__identity {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 0;
  left: 0;
  width: 100%;
  padding-inline: clamp(72px, 8vw, 112px);
  color: var(--poster-red);
  text-align: right;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .8);
  transform: translateY(clamp(48px, 8vh, 82px));
  transition: top 1520ms cubic-bezier(.22, 1, .36, 1), transform 1520ms cubic-bezier(.22, 1, .36, 1), opacity 720ms ease;
}

.reveal-hero.is-menu-open .reveal-hero__identity {
  top: clamp(28px, 6vh, 64px);
  transform: none;
}

.reveal-hero.is-menu-open {
  touch-action: pan-y;
}

.reveal-hero__identity h1 {
  margin: 0;
  white-space: nowrap;
  font-size: clamp(1.35rem, 3.2vw, 3.8rem);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: .09em;
  line-height: 1;
  -webkit-text-stroke: 0;
  color: transparent;
  background:
    radial-gradient(circle 190px at var(--title-light-x, -300px) var(--title-light-y, -300px), #ff6a72 0%, #e13a49 34%, #b92a39 66%, #861725 100%);
  background-clip: text;
  -webkit-background-clip: text;
  transform-origin: right center;
  animation: identity-in 1800ms cubic-bezier(.22, 1, .36, 1) both;
  filter:drop-shadow(0 2px 16px rgba(0,0,0,.82));
  transition:
    transform 1520ms cubic-bezier(.22, 1, .36, 1),
    filter 480ms ease,
    --title-light-x 1520ms cubic-bezier(.22, 1, .36, 1),
    --title-light-y 480ms cubic-bezier(.22, 1, .36, 1);
}

.reveal-hero__header {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

html[dir="rtl"] .reveal-hero__header {
  flex-direction: row;
}

html[dir="ltr"] .reveal-hero__header {
  flex-direction: row-reverse;
}

.reveal-hero__nav {
  position: absolute;
  top: calc(100% + clamp(.7rem, 1.5vh, 1.25rem));
  right: 0;
  display: flex;
  width: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .65rem 1.25rem;
  margin: 0;
  opacity: 0;
  transform: translateY(0) translateX(58px);
  transition:
    transform 1360ms cubic-bezier(.22, 1, .36, 1) 1600ms,
    opacity 760ms ease 1700ms;
}

.reveal-hero.is-menu-open .reveal-hero__nav {
  position: static;
  top: auto;
  right: auto;
  flex: 1 1 auto;
  width: auto;
  justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(.5rem, 1.15vw, 1.15rem);
  opacity: 1;
  transform: none;
}

html[dir="rtl"] .reveal-hero.is-menu-open .reveal-hero__nav {
  justify-content: flex-start;
  gap: clamp(.75rem, 1.55vw, 1.5rem);
}

html[dir="rtl"] .reveal-hero.is-menu-open .reveal-hero__nav a { font-size: 13px; }

/* Final motion frame: use the persistent header's exact menu geometry. */
@media (min-width: 701px) {
  .reveal-hero.is-menu-open .reveal-hero__nav {
    position: fixed;
    top: calc(clamp(2rem, 6vh, 3rem) + 2.25px);
    right: calc(var(--header-side) + var(--brand-width) + var(--brand-menu-gap));
    width: min(47vw, 595px);
    height: 36px;
    flex: none;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: nowrap;
    gap: clamp(.5rem, 1.15vw, 1.15rem);
  }

  html[lang="en"] .reveal-hero.is-menu-open .reveal-hero__nav {
    top: calc(clamp(2rem, 6vh, 3rem) + 5.78px);
    height: 29.375px;
  }

  .reveal-hero.is-menu-open .reveal-hero__nav a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: .15rem 0;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: clamp(.88rem, 1vw, 1rem);
    letter-spacing: 0;
    line-height: 1.25;
  }

  html[lang="en"] .reveal-hero.is-menu-open .reveal-hero__nav a {
    min-height: 29.375px;
    height: 29.375px;
    padding: 0;
    font-family: "Questrial", "Century Gothic", "Avenir Next", Arial, sans-serif;
    letter-spacing: .08em;
  }

  html[lang="en"] .reveal-hero.is-menu-open .reveal-hero__identity {
    right:calc(var(--header-side) + var(--brand-right-offset));
  }
}

.reveal-hero__nav a {
  position: relative;
  padding: .45rem 0;
  color: rgba(242, 233, 218, .76);
  font-size: clamp(.88rem, 1vw, 1rem);
  font-weight: 400;
  letter-spacing: .08em;
  white-space: nowrap;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition:
    color 480ms ease,
    opacity 840ms ease calc(1900ms + var(--order) * 110ms);
}

.reveal-hero.is-menu-open .reveal-hero__nav a {
  opacity: 1;
  pointer-events: auto;
}

.reveal-hero__nav a[aria-current="page"] {
  color: var(--ink);
}

.reveal-hero__nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.reveal-hero__bio {
  display: flex;
  width: min(760px, 100%);
  height: calc(100svh - clamp(180px, 25vh, 225px));
  min-height: 360px;
  flex-direction: column;
  margin: clamp(18px, 3vh, 34px) 0 0 auto;
  padding: clamp(18px, 2.5vw, 30px) 0;
  border: 0;
  background: transparent;
  color: rgba(242, 233, 218, .84);
  text-align: left;
  text-shadow: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(143, 36, 36, .65) transparent;
  scrollbar-width: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(34px);
  transition:
    opacity 1040ms ease 640ms,
    transform 1360ms cubic-bezier(.22, 1, .36, 1) 500ms;
}

.reveal-hero__bio::-webkit-scrollbar{
  display:none;
  width:0;
  height:0;
}

html[dir="rtl"] .reveal-hero__bio-section p,
html[dir="rtl"] .reveal-hero__bio-section h2,
html[dir="rtl"] .reveal-hero__bio-label,
html[dir="rtl"] .reveal-hero__nav a,
html[dir="rtl"] .social-placeholder{
  font-family:"Helvetica Neue",Arial,Tahoma,sans-serif;
  letter-spacing:0;
}

html[lang="en"] .reveal-hero__identity h1,
html[lang="en"] .reveal-hero__nav,
html[lang="en"] .reveal-hero__language,
html[lang="en"] .reveal-hero__bio-label,
html[lang="en"] .reveal-hero__bio-section h2,
html[lang="en"] .reveal-hero__bio-actions,
html[lang="en"] .reveal-hero__hint {
  font-family: "Questrial", "Century Gothic", "Avenir Next", Arial, sans-serif;
}

/* The artist name is a distinct display face in both language modes. */
html[lang="en"] .reveal-hero__identity h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
}

.reveal-hero.is-menu-open .reveal-hero__bio {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reveal-hero__bio-label {
  margin: 0 0 1rem;
  color: var(--poster-red);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.reveal-hero__bio #landingBioText {
  display: grid;
  gap: clamp(2.5rem, 6vh, 4.5rem);
}

.reveal-hero__bio-section h2 {
  margin: 0 0 1.4rem;
  color: var(--poster-red);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.reveal-hero__bio-section {
  display: flex;
  min-height: clamp(310px, 48vh, 440px);
  flex-direction: column;
  justify-content: center;
  padding-block: 1.5rem;
}

.reveal-hero__bio-section div {
  display: grid;
  gap: clamp(1.25rem, 3vh, 2.1rem);
}

.reveal-hero__bio-section p {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(1rem, 1.35vw, 1.24rem);
  line-height: 1.65;
}

.reveal-hero__bio-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1.5rem;
  margin-top: clamp(2.5rem, 6vh, 4.5rem);
  padding-bottom: clamp(1rem, 4vh, 3rem);
}

.reveal-hero__bio-actions > a,
.social-placeholder {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  font-size: .68rem;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}

html[dir="rtl"] .reveal-hero__bio {
  text-align: right;
}

html[dir="rtl"] .reveal-hero__identity h1 {
  transform-origin: right top;
}

.reveal-hero__bio-actions > a:hover,
.reveal-hero__bio-actions > a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--poster-red);
  text-underline-offset: 5px;
}

.social-placeholder {
  color: rgba(242, 233, 218, .42);
  cursor: default;
}


.reveal-hero__nav a::after {
  position: absolute;
  right: 0;
  bottom: .22rem;
  left: 0;
  height: 1px;
  background: var(--poster-red);
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 520ms cubic-bezier(.22, 1, .36, 1), opacity 360ms ease;
}

.reveal-hero__nav a:hover,
.reveal-hero__nav a:focus-visible {
  color: var(--ink);
}

.reveal-hero__nav a:hover::after,
.reveal-hero__nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.reveal-hero__nav a:focus-visible {
  outline: 1px solid var(--poster-red);
  outline-offset: 5px;
}

.reveal-hero__hint {
  position: absolute;
  z-index: 3;
  left: clamp(18px, 3vw, 48px);
  bottom: max(18px, env(safe-area-inset-bottom));
  margin: 0;
  color: rgba(242, 233, 218, .6);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 1000ms ease;
}

.reveal-hero__hint.is-hidden {
  opacity: 0;
}

.reveal-hero__fallback {
  object-fit: cover;
}

@media (max-width: 640px) {
  .reveal-hero__identity {
    top: 46%;
    right: 20px;
    width: calc(100vw - 40px);
  }

  .reveal-hero.is-menu-open .reveal-hero__identity {
    top: max(18px, env(safe-area-inset-top));
    right: 20px;
    width: calc(100vw - 40px);
    transform: translateY(0);
  }

  .reveal-hero__identity h1 {
    font-size: clamp(1.2rem, 7vw, 2rem);
    line-height: 1.15;
  }

  .reveal-hero.is-menu-open .reveal-hero__identity h1 {
    transform: scale(.84);
  }

  .reveal-hero__nav {
    position:static;
    max-width: 310px;
    width:auto;
    gap: .35rem 1rem;
    margin-top: .75rem;
    transform:none;
  }

  .reveal-hero.is-menu-open .reveal-hero__nav { transform:none; }

  .reveal-hero.is-menu-open .reveal-hero__header {
    display: block;
    width: 100%;
  }

  .reveal-hero__bio {
    width: 100%;
    height: calc(100svh - 205px);
    min-height: 280px;
    max-height: calc(100svh - 190px);
    overflow-y: auto;
    padding: 16px 0;
  }

  .reveal-hero__bio-section {
    min-height: clamp(280px, 52vh, 410px);
  }

  .reveal-hero__nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: .78rem;
  }

  .reveal-hero__hint::before {
    content: "Touch to reveal · Swipe up for biography";
  }

  .reveal-hero__hint {
    font-size: 0;
  }

  .reveal-hero__hint::before {
    font-size: .65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-hero__identity h1,
  .reveal-hero__nav,
  .reveal-hero__nav a,
  .reveal-hero__identity,
  .reveal-hero__bio {
    animation: none;
    transition: none;
  }

  .reveal-hero__hint {
    transition: none;
  }
}

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

.reveal-hero__nav a[data-menu="biography"] { order: 1; }
.reveal-hero__nav a[data-menu="works"] { order: 2; }
.reveal-hero__nav a[data-menu="exhibitions"] { order: 3; }
.reveal-hero__nav a[data-menu="awards"] { order: 4; }
.reveal-hero__nav a[data-menu="media"] { order: 5; }
.reveal-hero__nav a[data-menu="contact"] { order: 6; }

@media (prefers-reduced-motion: reduce) {
  .reveal-hero__identity,
  .reveal-hero__identity h1,
  .reveal-hero__nav,
  .reveal-hero__nav a,
  .reveal-hero__nav a::after,
  .reveal-hero__bio,
  .reveal-hero__hint {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 700px) {
  .reveal-hero.is-menu-open .reveal-hero__identity {
    transform: none;
  }

  .reveal-hero.is-menu-open .reveal-hero__nav {
    position: fixed;
    top: 4.15rem;
    left: 6vw;
    right: auto;
    width: calc(100% - 12vw);
    height: auto;
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: .2rem .75rem;
    margin: 0;
  }

  .reveal-hero.is-menu-open .reveal-hero__nav a {
    min-height: 30px;
    padding: .15rem 0;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: .66rem;
    letter-spacing: 0;
    line-height: 1.25;
  }

  html[lang="en"] .reveal-hero.is-menu-open .reveal-hero__nav a {
    font-family: "Questrial", "Century Gothic", "Avenir Next", Arial, sans-serif;
    letter-spacing: .08em;
  }
}

/* Keep these desktop coordinates last: the staged animation rules above also
   set top/right while the menu is entering. */
@media (min-width: 701px) {
  .reveal-hero.is-menu-open .reveal-hero__nav {
    position: fixed;
    top: calc(clamp(2rem, 6vh, 3rem) + 2.25px);
    right: calc(var(--header-side) + var(--brand-width) + var(--brand-menu-gap));
  }

  html[lang="en"] .reveal-hero.is-menu-open .reveal-hero__nav {
    top: calc(clamp(2rem, 6vh, 3rem) + 5.78px);
  }
}
