/* ============================================================
   HADIS BAHRAMI — 2026 art direction
   Near-black ground · Cormorant display · Hanken information
   ============================================================ */
:root {
  --bg:      #0E0E10;
  --bg-2:    #131316;
  --ink:     #F2EEE7;
  --ink-2:   rgba(242,238,231,0.72);
  --ink-3:   rgba(242,238,231,0.50);
  --ink-4:   rgba(242,238,231,0.20);
  --rule:    rgba(242,238,231,0.11);
  --accent:  #C9835C;
  --accent-soft: rgba(201,131,92,0.12);
  --serif: 'Cormorant Garamond', 'Hanken Grotesk', Georgia, serif;
  --sans:  'Hanken Grotesk', "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-sans: var(--sans);
  --texture-opacity: 0;
  --nav-h: 84px;
  --margin: clamp(20px, 4.4vw, 76px);
  --max-w: 1560px;
  --ease-hx: cubic-bezier(0.16, 0.84, 0.28, 1);
}
body { background: var(--bg); color: var(--ink); font-family: var(--sans); }
body::before, body::after { display: none !important; }

/* ---------- reveals ---------- */
.hx-rev { opacity: 0; transform: translateY(26px); transition: opacity 1100ms var(--ease-hx), transform 1100ms var(--ease-hx); }
.hx-rev.is-in { opacity: 1; transform: none; }
.hx-rev.d1 { transition-delay: 90ms; } .hx-rev.d2 { transition-delay: 190ms; } .hx-rev.d3 { transition-delay: 290ms; }

.hx-mask { position: relative; overflow: hidden; display: block; }
.hx-mask img { display: block; width: 100%; height: 100%; object-fit: contain;
  clip-path: inset(0 0 100% 0); transform: scale(1.07);
  transition: clip-path 1500ms var(--ease-hx), transform 1900ms var(--ease-hx); }
.hx-rev.is-in .hx-mask img, .hx-mask.is-in img { clip-path: inset(0 0 0 0); transform: scale(1); }

.hx-page { animation: hxPage 620ms var(--ease-hx) both; }
@keyframes hxPage { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- type ---------- */
.hx-display { font-family: var(--serif); font-weight: 300; line-height: 1.02; letter-spacing: -0.018em; margin: 0; color: var(--ink); }
.hx-h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3.9vw, 62px); line-height: 1.08; letter-spacing: -0.016em; margin: 0; }
.hx-quote { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(26px, 3.4vw, 54px); line-height: 1.24; letter-spacing: -0.012em; margin: 0; }
.hx-label { font-family: var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-3); }
.hx-meta  { font-family: var(--sans); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.hx-body  { font-family: var(--sans); font-size: 16px; line-height: 1.85; color: var(--ink-2); }
.hx-link {
  display: inline-flex; align-items: center; gap: 14px; cursor: pointer;
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink);
  padding-bottom: 9px; position: relative;
}
.hx-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink-4);
  transform-origin: left; transition: transform 700ms var(--ease-hx), background 700ms var(--ease-hx); }
.hx-link:hover::after { background: var(--ink); }
.hx-link .hx-arrow { transition: transform 700ms var(--ease-hx); }
.hx-link:hover .hx-arrow { transform: translateX(8px); }

.hx-wrap { max-width: var(--max-w); margin: 0 auto; padding-inline: var(--margin); }
.hx-sec  { padding-block: clamp(96px, 15vh, 220px); }
/* the portrait is shown whole, like the paintings */
.hx-artist .hx-mask { display: flex; justify-content: center; }
.hx-artist .hx-mask img { position: static; width: auto; height: auto; max-width: 100%; max-height: 80svh; object-fit: contain; }

/* ---------- navigation ---------- */
.hx-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 120; height: var(--nav-h);
  display: flex; align-items: center; padding: 0 var(--margin); mix-blend-mode: normal;
  transition: background 700ms var(--ease-hx), border-color 700ms var(--ease-hx);
  border-bottom: 1px solid transparent; }
.hx-nav.is-past { background: rgba(14,14,16,0.82); backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px); border-bottom-color: var(--rule); }
.hx-wordmark { display: flex; align-items: center; gap: 14px; cursor: pointer; font-size: 11.5px;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink); font-weight: 400; }
.hx-wordmark img { width: 22px; height: 22px; object-fit: contain; filter: brightness(0) invert(1); opacity: .9; }
.hx-links { margin-left: auto; display: flex; gap: clamp(22px, 2.6vw, 46px); align-items: center; }
.hx-navlink { font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3);
  cursor: pointer; transition: color 500ms var(--ease-hx); }
.hx-navlink:hover, .hx-navlink.is-on { color: var(--ink); }
.hx-burger { margin-left: auto; display: none; width: 28px; height: 14px; position: relative; cursor: pointer; background: none; border: 0; padding: 0; }
.hx-burger span { position: absolute; left: 0; right: 0; height: 1px; background: var(--ink); transition: transform 600ms var(--ease-hx), opacity 400ms var(--ease-hx); }
.hx-burger span:first-child { top: 0; } .hx-burger span:last-child { bottom: 0; }
.hx-burger.is-open span:first-child { transform: translateY(6.5px) rotate(45deg); }
.hx-burger.is-open span:last-child { transform: translateY(-6.5px) rotate(-45deg); }

.hx-menu { position: fixed; inset: 0; z-index: 110; background: var(--bg); display: flex; flex-direction: column;
  justify-content: center; padding: var(--nav-h) var(--margin) clamp(40px, 8vh, 90px);
  opacity: 0; pointer-events: none; transition: opacity 620ms var(--ease-hx); }
.hx-menu.is-open { opacity: 1; pointer-events: auto; }
.hx-menu-item { font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 9vw, 68px); line-height: 1.22;
  letter-spacing: -0.02em; color: var(--ink); cursor: pointer; opacity: 0; transform: translateY(18px);
  transition: opacity 700ms var(--ease-hx), transform 700ms var(--ease-hx), color 400ms var(--ease-hx); }
.hx-menu.is-open .hx-menu-item { opacity: 1; transform: none; }
.hx-menu-item:hover { color: var(--accent); }
.hx-menu-foot { margin-top: auto; padding-top: clamp(30px, 6vh, 60px); display: flex; gap: 26px; flex-wrap: wrap; }

/* ---------- hero ---------- */
.hx-hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: #08080A; }
/* out-of-focus ground so a vertical film never sits on empty black */
.hx-hero-amb { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover;
  filter: blur(64px) saturate(1.06) brightness(0.40); transform: scale(1.06);
  opacity: 0; animation: hxIn 2400ms var(--ease-hx) 200ms forwards; }
.hx-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,8,10,0.55) 0%, rgba(8,8,10,0.10) 26%, rgba(8,8,10,0.20) 60%, rgba(8,8,10,0.78) 100%); }
@keyframes hxIn { to { opacity: 1; } }

.hx-hero-stage { position: absolute; inset: 0; z-index: 3; display: grid;
  grid-template-columns: minmax(220px, 440px) auto; justify-content: center; align-items: center;
  gap: clamp(38px, 6.5vw, 120px);
  padding: calc(var(--nav-h) + clamp(10px, 1.6vh, 22px)) var(--margin) clamp(56px, 8vh, 92px); }
.hx-hero-words { width: 100%; max-width: none; min-width: 0; }
.hx-hero-name { font-size: clamp(38px, 5vw, 92px); }
.hx-hero-plate { margin: 0; position: relative; }
/* the film, whole - never cropped on desktop */
.hx-hero-video { display: block; height: min(78vh, 980px); width: auto; max-width: min(46vw, 600px);
  object-fit: contain; background: #08080A; box-shadow: 0 54px 140px rgba(0,0,0,0.62);
  opacity: 0; animation: hxIn 1800ms var(--ease-hx) 260ms forwards; }
.hx-hero-cap { position: absolute; top: 100%; right: 0; margin-top: 16px; white-space: nowrap;
  text-align: right; font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(242,238,231,0.46); line-height: 1.9; }
.hx-scroll { position: absolute; left: 50%; bottom: clamp(24px, 4vh, 40px); transform: translateX(-50%); z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hx-scroll-line { width: 1px; height: 44px; background: linear-gradient(rgba(242,238,231,0.5), transparent); animation: hxPulse 2.6s var(--ease-hx) infinite; transform-origin: top; }
@keyframes hxPulse { 0% { transform: scaleY(0); opacity: 0; } 40% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- selected work ---------- */
.hx-sel { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(28px, 4vw, 64px) clamp(18px, 2.4vw, 40px); }
.hx-sel-item { cursor: pointer; }
.hx-sel-item .hx-mask { background: var(--bg-2); }
.hx-sel-cap { margin-top: clamp(18px, 1.8vw, 26px); }
.hx-sel-title { font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 2.3vw, 34px); letter-spacing: -0.014em; margin: 0; transition: color 600ms var(--ease-hx); }
.hx-sel-item:hover .hx-sel-title { color: var(--accent); }
.hx-sel-meta { margin-top: 10px; }

/* ---------- archive ---------- */
.hx-filters { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.4vw, 34px); }
.hx-filter { font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); cursor: pointer;
  padding-bottom: 7px; border-bottom: 1px solid transparent; transition: color 500ms var(--ease-hx), border-color 500ms var(--ease-hx); }
.hx-filter:hover { color: var(--ink-2); }
.hx-filter.is-on { color: var(--ink); border-bottom-color: var(--ink); }
.hx-archive { display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(56px, 9vw, 150px) clamp(18px, 2.6vw, 44px); margin-top: clamp(56px, 8vw, 120px); }
.hx-art { cursor: pointer; }
.hx-art .hx-mask, .hx-sel .hx-mask { background: transparent; }
.hx-art-title { font-family: var(--serif); font-weight: 300; font-size: clamp(19px, 1.9vw, 27px); letter-spacing: -0.012em;
  margin: clamp(16px, 1.6vw, 24px) 0 0; transition: color 600ms var(--ease-hx); }
.hx-art:hover .hx-art-title { color: var(--accent); }
.hx-art-meta { margin-top: 9px; }

/* ---------- single work ---------- */
.hx-plate { display: flex; justify-content: center; }
.hx-plate img { max-height: 86svh; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.hx-work-info { display: grid; grid-template-columns: 1fr auto; gap: clamp(24px, 4vw, 70px); align-items: end;
  padding-top: clamp(30px, 4vw, 56px); margin-top: clamp(44px, 6vw, 84px); border-top: 1px solid var(--rule); }
.hx-work-title { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3.4vw, 50px); letter-spacing: -0.018em; margin: 0; }
.hx-work-note { max-width: 58ch; margin-top: clamp(30px, 4vw, 54px); }
.hx-pager { display: flex; justify-content: space-between; gap: 24px; margin-top: clamp(70px, 10vw, 140px);
  padding-top: clamp(26px, 3vw, 40px); border-top: 1px solid var(--rule); }

/* ---------- editorial rows ---------- */
.hx-row { display: grid; grid-template-columns: 120px 1fr auto; gap: clamp(16px, 3vw, 52px); align-items: baseline;
  padding: clamp(22px, 2.6vw, 36px) 0; border-top: 1px solid var(--rule); }
.hx-row-title { font-family: var(--serif); font-weight: 300; font-size: clamp(18px, 1.8vw, 26px); letter-spacing: -0.01em; margin: 0; }

/* ---------- artist / contact ---------- */
.hx-artist { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 6vw, 110px); align-items: center; }
.hx-artist .hx-mask { aspect-ratio: auto; background: transparent; }
.hx-end { display: flex; justify-content: space-between; align-items: flex-end; gap: clamp(28px, 5vw, 80px); flex-wrap: wrap; }

/* ---------- footer ---------- */
.hx-foot { border-top: 1px solid var(--rule); padding: clamp(46px, 6vw, 78px) var(--margin) clamp(34px, 4vw, 52px); }
.hx-foot-in { max-width: var(--max-w); margin: 0 auto; display: flex; justify-content: space-between; gap: 26px; flex-wrap: wrap; align-items: baseline; }
.hx-foot a { cursor: pointer; color: var(--ink-3); transition: color 500ms var(--ease-hx); }
.hx-foot a:hover { color: var(--ink); }

/* ---------- mobile art direction ---------- */
@media (max-width: 900px) {
  .hx-links { display: none; }
  .hx-burger { display: block; }
  .hx-hero-amb { display: block; }
  .hx-hero-stage { display: block; padding: 0; }
  /* the figure collapses on mobile, so the film must anchor to the stage, not to it */
  .hx-hero-plate { position: static; }
  .hx-hero-video { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100%; height: auto; aspect-ratio: 1080 / 1920;   /* reserve the frame before it loads */
    max-width: 100%; max-height: 100%;
    object-fit: contain; background: transparent; box-shadow: none; }
  .hx-hero-words { position: absolute; left: var(--margin); right: var(--margin);
    bottom: clamp(78px, 13vh, 128px); z-index: 4; max-width: none; }
  .hx-hero-name { font-size: clamp(38px, 10.5vw, 66px); }
  .hx-hero-cap { position: absolute; right: var(--margin); bottom: clamp(34px, 6vh, 56px); z-index: 4; margin: 0; }
  .hx-sel, .hx-archive { grid-template-columns: 1fr; }
  .hx-sel-item, .hx-art { grid-column: 1 / -1 !important; }
  .hx-archive { gap: clamp(48px, 12vw, 80px) 0; }
  .hx-artist { grid-template-columns: 1fr; }
  .hx-work-info { grid-template-columns: 1fr; align-items: start; gap: 18px; }
  .hx-row { grid-template-columns: 1fr; gap: 8px; }
  .hx-plate img { max-height: 72svh; }
  .hx-sec { padding: clamp(72px, 11vh, 120px) 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-rev, .hx-mask img, .hx-page, .hx-hero-img { transition: none !important; animation: none !important; opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* ---------- legacy pages (CV, Contact, Texts, Book) adopt the new voice ---------- */
.display, .statement-text, .work-title, .practice-h, .book-title, .overlay-title, .mus-lead, .mus-close, .mus-line, .jg-lead, .jg-big, .jg-card-title, .mus-explore-lbl {
  font-family: var(--serif) !important; font-weight: 300;
}
.display { letter-spacing: -0.018em; }
.eyebrow, .meta, .cv-label, .cv-year, .cv-secondary, .field-label, .seg-tab, .navlink { font-family: var(--sans); }
.cv-primary { font-family: var(--serif); font-size: clamp(17px, 1.7vw, 23px); font-weight: 300; }
.cv-row { border-color: var(--rule); }
.frame, .work-card { background: transparent; }

/* threshold: one work shown whole, centred */
.hx-thresh { display: block; cursor: pointer; max-width: 940px; margin: 0 auto; }

/* ---------- cursor: a dot that tracks, a ring that trails ---------- */
.hx-has-cursor, .hx-has-cursor * { cursor: none !important; }
.hx-has-cursor input, .hx-has-cursor textarea, .hx-has-cursor select { cursor: text !important; }
.hx-cur-dot, .hx-cur-ring {
  position: fixed; top: 0; left: 0; z-index: 100000; pointer-events: none;
  border-radius: 50%; will-change: transform; opacity: 0;
  transition: opacity 500ms var(--ease-hx);
  mix-blend-mode: difference;
}
.hx-cur-dot  { width: 7px;  height: 7px;  background: #F2EEE7; margin: -3.5px 0 0 -3.5px; }
.hx-cur-ring { width: 34px; height: 34px; border: 1px solid rgba(242,238,231,0.7); margin: -17px 0 0 -17px; }
.hx-cur-on .hx-cur-dot, .hx-cur-on .hx-cur-ring { opacity: 1; }
.hx-cur-hidden .hx-cur-dot, .hx-cur-hidden .hx-cur-ring { opacity: 0 !important; }
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .hx-cur-dot, .hx-cur-ring { display: none !important; }
  .hx-has-cursor, .hx-has-cursor * { cursor: auto !important; }
  .hx-has-cursor a, .hx-has-cursor button { cursor: pointer !important; }
}

/* ---------- hero sound toggle ---------- */
.hx-sound {
  position: absolute; left: var(--margin); bottom: clamp(30px, 5vh, 54px); z-index: 5;
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 11px 18px 11px 15px; border-radius: 999px;
  background: rgba(14,14,16,0.55); border: 1px solid rgba(242,238,231,0.38);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: rgba(242,238,231,0.92);
  font-family: var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  transition: color 400ms var(--ease-hx), border-color 400ms var(--ease-hx), background 400ms var(--ease-hx);
}
.hx-sound:hover { color: #fff; border-color: rgba(242,238,231,0.85); background: rgba(14,14,16,0.75); }
.hx-sound-ico { display: inline-flex; }
.hx-sound-txt { padding-top: 1px; }

/* while muted it breathes once every few seconds, so the sound is noticed */
.hx-sound::after {
  content: ""; position: absolute; inset: -1px; border-radius: 999px;
  border: 1px solid rgba(242,238,231,0.75); opacity: 0; pointer-events: none;
  animation: hxSoundPulse 3.4s var(--ease-hx) 1.5s infinite;
}
.hx-sound.is-on::after, .hx-sound:hover::after { animation: none; opacity: 0; }
@keyframes hxSoundPulse {
  0%   { opacity: 0.85; transform: scale(1); }
  55%  { opacity: 0;    transform: scale(1.28); }
  100% { opacity: 0;    transform: scale(1.28); }
}
.hx-sound.is-on { border-color: rgba(242,238,231,0.6); }
.hx-sound.is-on .hx-wave { animation: hxWave 1.6s var(--ease-hx) infinite; transform-origin: 14px 12px; }
@keyframes hxWave { 0%,100% { opacity: 0.45; } 50% { opacity: 1; } }

@media (max-width: 900px) {
  .hx-sound { bottom: clamp(18px, 3vh, 34px); padding: 10px 15px 10px 13px; font-size: 10px; letter-spacing: 0.16em; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-sound::after, .hx-sound.is-on .hx-wave { animation: none !important; opacity: 0; }
}

/* ---------- installation views (exhibitions page) ---------- */
.hx-inst-block { grid-template-columns: 1fr; gap: clamp(20px, 2.4vw, 30px); }
.hx-inst-block .cv-label { padding-top: 0; }
.hx-inst-group + .hx-inst-group { margin-top: clamp(34px, 4.2vw, 56px); }
.hx-inst-title {
  margin: 0 0 16px; font-family: var(--sans); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
}
.hx-inst-grid { display: flex; flex-wrap: wrap; gap: clamp(12px, 1.4vw, 20px); }
.hx-inst-fig { margin: 0; flex: 0 1 auto; max-width: 100%; }
.hx-inst-img {
  display: block; height: clamp(190px, 21vw, 300px); width: auto; max-width: 100%;
  background: var(--bg-deep); border: 1px solid var(--rule);
}
.hx-inst-cap {
  margin-top: 10px; font-family: var(--sans); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
}
@media (max-width: 720px) {
  .hx-inst-grid { display: grid; grid-template-columns: 1fr; }
  .hx-inst-fig { flex: none; }
  .hx-inst-img { height: auto; width: 100%; }
}

/* lead installation photograph at the head of the exhibitions page */
.hx-lead-fig { margin: 0 0 clamp(44px, 5.5vw, 84px); }
.hx-lead-img {
  display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover;
  object-position: 50% 100%; background: var(--bg-deep); border: 1px solid var(--rule);
}
@media (max-width: 720px) {
  .hx-lead-img { aspect-ratio: 3 / 2; }
}
