/* OXUS, The Artist. A gallery page for Maryam Najvan. Tokens from ~/Oxus/BRIEF.md. Mobile first. */
:root {
  --ivory: #F3EEE5;
  --paper: #FAF7F1;
  --ink: #161513;
  --graphite: #5A564E;
  --stone: #D9D2C5;
  --gold: #A8844E;
  --deep-gold: #7E6136;
  --lapis: #1E2C55;
  --emerald: #1F5B4A;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;

  --gutter: 16px;
  --maxw: 1600px;
  --section: clamp(96px, 12vw, 216px);
  --ease: cubic-bezier(.2, .7, .15, 1);
  --header-h: 64px;
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 40px; --header-h: 76px; } }
@media (min-width: 1200px) { :root { --gutter: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
@media (min-width: 1200px) { body { font-size: 17px; } }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
::selection { background: var(--stone); color: var(--ink); }
:focus-visible { outline: 1px solid var(--deep-gold); outline-offset: 4px; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--ivory); padding: 10px 16px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

/* ---------- type ---------- */
.label { font-family: var(--sans); font-weight: 400; font-size: 11px; line-height: 1.6; letter-spacing: .18em; text-transform: uppercase; color: var(--graphite); }
@media (min-width: 1200px) { .label { font-size: 12px; } }
.dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; vertical-align: middle; margin: 0 .7em; opacity: .55; transform: translateY(-1px); }
.display, .h2, .h3 { font-family: var(--serif); font-weight: 300; letter-spacing: -.005em; color: inherit; }
.display em, .h2 em, .h3 em { font-weight: 300; }
.h2 { font-size: clamp(40px, 2rem + 3.4vw, 92px); line-height: 1.02; }
.h3 { font-size: clamp(30px, 1.4rem + 2vw, 56px); line-height: 1.06; }
.body { max-width: 34em; color: var(--graphite); }
.body + .body { margin-top: 1.1em; }
.cap { font-family: var(--sans); font-size: 11px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); margin-top: 12px; line-height: 1.6; }
.room-no { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.room-no span { font-family: var(--serif); font-size: 16px; letter-spacing: .04em; color: var(--deep-gold); text-transform: none; }
.room-no::after { content: ""; flex: 0 0 40px; height: 1px; background: var(--gold); opacity: .7; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  border: 1px solid var(--ink); color: var(--ink); background: transparent; text-decoration: none;
  font-family: var(--sans); font-size: 12px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase;
  transition: background .6s var(--ease), color .6s var(--ease), border-color .6s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--ivory); }
.btn--light { border-color: rgba(243,238,229,.55); color: var(--ivory); }
.btn--light:hover { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.link-quiet {
  font-family: var(--sans); font-size: 12px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase;
  color: inherit; text-decoration: none; padding: 14px 0; display: inline-block;
  background-image: linear-gradient(var(--gold), var(--gold)); background-size: 100% 1px; background-position: 0 calc(100% - 10px); background-repeat: no-repeat;
  transition: background-size .8s var(--ease);
}
.link-quiet:hover { background-size: 0 1px; background-position: 100% calc(100% - 10px); }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); transition: background .8s var(--ease), transform .8s var(--ease), box-shadow .8s var(--ease); }
.site-header__inner { height: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 16px; }
.site-header__mark { color: var(--ink); display: block; padding: 8px 0; }
.site-header__mark .letters { width: 88px; height: 18px; }
@media (min-width: 768px) { .site-header__mark .letters { width: 116px; height: 24px; } }
.site-header__here { display: none; }
@media (min-width: 640px) { .site-header__here { display: block; padding-left: 20px; border-left: 1px solid rgba(168,132,78,.5); } }
.site-header__cta { margin-left: auto; font-size: 11px; padding: 12px 0; }
.site-header.is-solid { background: rgba(243,238,229,.94); box-shadow: 0 1px 0 rgba(22,21,19,.07); }
@supports (backdrop-filter: blur(1px)) { .site-header.is-solid { background: rgba(243,238,229,.82); backdrop-filter: saturate(1.1) blur(14px); -webkit-backdrop-filter: saturate(1.1) blur(14px); } }
.site-header.is-hidden { transform: translateY(-100%); }

/* ---------- media ---------- */
.media { position: relative; overflow: hidden; background: var(--stone); }
.media > img, .media > video { width: 100%; height: 100%; object-fit: cover; }
.media--45 { aspect-ratio: 4 / 5; }
.media--1 { aspect-ratio: 1 / 1; }
.media--916 { aspect-ratio: 9 / 16; }
.media--34 { aspect-ratio: 3 / 4; }
.panel { background: var(--paper); aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; }
.panel img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.panel--wide img { width: 100%; height: auto; }

/* ---------- reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- 0. opening ---------- */
.hero { display: grid; }
.hero__media { height: min(124vw, 78svh); min-height: 420px; }
.hero__media img { object-position: 30% 40%; }
.hero__text { padding: 40px var(--gutter) 8px; }
.hero__kicker { margin-bottom: 22px; }
.hero__title { font-size: clamp(54px, 15vw, 132px); line-height: .94; letter-spacing: -.012em; }
.hero__title em span { display: block; }
.hero__title em { display: block; font-size: .5em; line-height: 1.15; margin-top: 14px; color: var(--graphite); }
.hero__lede { margin-top: 26px; max-width: 30em; color: var(--graphite); }
.hero__index { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.hero__index a { text-decoration: none; color: var(--ink); }
.hero__index a span { color: var(--deep-gold); font-family: var(--serif); font-size: 15px; letter-spacing: .02em; margin-right: 6px; text-transform: none; }
@media (min-width: 1024px) {
  .hero { grid-template-columns: 7fr 5fr; min-height: 100svh; }
  .hero__media { height: 100svh; min-height: 640px; position: sticky; top: 0; }
  .hero__text { align-self: end; padding: calc(var(--header-h) + 64px) var(--gutter) clamp(48px, 5vw, 96px); }
  .hero__title { font-size: clamp(64px, 7.4vw, 124px); }
}

/* ---------- 1. who ---------- */
.who__grid { display: grid; gap: 48px; }
.who__quote { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 1.2rem + 3.6vw, 72px); line-height: 1.08; }
.who__quote em { color: var(--deep-gold); }
.who__figure { max-width: 420px; }
@media (min-width: 900px) {
  .who__grid { grid-template-columns: 1.2fr 1fr 300px; align-items: end; gap: clamp(40px, 5vw, 96px); }
}

/* ---------- 2. record ---------- */
.record { background: var(--lapis); color: var(--ivory); }
.record .label { color: rgba(243,238,229,.66); }
.record__head { margin-bottom: 48px; }
.record__head .h2 { margin-top: 18px; }
.record__list { border-top: 1px solid rgba(168,132,78,.5); }
.record__row { display: grid; gap: 6px; padding: 24px 0 26px; border-bottom: 1px solid rgba(168,132,78,.5); }
.record__when { font-family: var(--sans); font-size: 11px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: rgba(243,238,229,.66); }
.record__what { font-family: var(--serif); font-size: clamp(26px, 1.1rem + 1.6vw, 44px); line-height: 1.12; }
.record__what em { color: #C9AE80; }
.record__note { color: rgba(243,238,229,.72); font-size: 15px; max-width: 34em; }
@media (min-width: 900px) {
  .record__row { grid-template-columns: 180px 1fr 1fr; align-items: baseline; gap: 40px; padding: 34px 0 36px; }
}

/* ---------- rooms ---------- */
.room__head { display: grid; gap: 22px; margin-bottom: clamp(48px, 7vw, 112px); }
.room__head .body { font-size: 1.0625em; }
@media (min-width: 900px) { .room__head { grid-template-columns: 1fr 1fr; align-items: end; gap: 64px; } }

.hang { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 12px; align-items: start; }
.hang > figure { min-width: 0; }
.hang .w2 { grid-column: span 2; }
.hang .offset { margin-top: 56px; }
@media (min-width: 768px) {
  .hang { grid-template-columns: repeat(12, 1fr); gap: 72px 24px; }
  .hang .w2 { grid-column: auto; }
  .hang .c-7 { grid-column: span 7; }
  .hang .c-5 { grid-column: span 5; }
  .hang .c-6 { grid-column: span 6; }
  .hang .c-4 { grid-column: span 4; }
  .hang .c-3 { grid-column: span 3; }
  .hang .c-8 { grid-column: span 8; }
  .hang .push-1 { grid-column-start: 2; }
  .hang .offset { margin-top: 120px; }
}

/* dark room for ink and charcoal */
.room--dark { background: var(--ink); color: var(--ivory); }
.room--dark .body { color: rgba(243,238,229,.72); }
.room--dark .cap { color: rgba(243,238,229,.66); }
.room--dark .room-no span { color: #C9AE80; }
.room--dark .media { background: #24221f; }

/* ---------- palms ---------- */
.palms { position: relative; }
.palms__media { height: min(125vw, 92svh); }
.palms__media img { object-position: 50% 30%; }
.palms__text { padding: 56px var(--gutter) 0; max-width: var(--maxw); margin-inline: auto; display: grid; gap: 22px; }
.palms__line { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(32px, 1.2rem + 3.4vw, 76px); line-height: 1.08; max-width: 16em; }
@media (min-width: 1024px) {
  .palms { display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
  .palms__media { height: 100svh; }
  .palms__text { padding: 0 var(--gutter) clamp(64px, 8vw, 120px); }
}

/* ---------- the river ---------- */
.river { background: var(--lapis); color: var(--ivory); text-align: center; overflow: hidden; }
.river .label { color: rgba(243,238,229,.66); }
.river__title { font-size: clamp(64px, 18vw, 200px); line-height: .9; margin-top: 22px; }
.river__title em { color: #C9AE80; }
.river__text { margin: 28px auto 0; max-width: 28em; color: rgba(243,238,229,.78); font-size: 1.0625em; }
.river__line { width: 100%; max-width: 980px; height: 80px; margin: 48px auto 0; color: var(--gold); }
.river__line path { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.js .river__line path { stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 5s var(--ease); }
.js .river__line.is-in path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .js .river__line path { stroke-dashoffset: 0; transition: none; } }
.river__meta { margin-top: 40px; }

/* ---------- pairings ---------- */
.pairs { display: grid; gap: clamp(88px, 12vw, 176px); }
.pair { display: grid; gap: 0; }
.pair__frames { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.pair__frames figure { min-width: 0; }
.pair__frames .cap { font-size: 10px; letter-spacing: .14em; }
.pair__text { margin-top: 26px; display: grid; gap: 12px; }
.pair__name { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 1.1rem + 1.4vw, 40px); line-height: 1.1; }
.pair__spec { color: var(--deep-gold); }
.pair__line { color: var(--graphite); max-width: 30em; }
.pair__arrow { display: flex; align-items: center; gap: 12px; color: var(--deep-gold); }
.pair__arrow::before { content: ""; flex: 0 0 28px; height: 1px; background: var(--gold); }
@media (min-width: 900px) {
  .pair { grid-template-columns: 7fr 4fr; gap: clamp(40px, 5vw, 96px); align-items: center; }
  .pair__frames { gap: 24px; }
  .pair--rev .pair__frames { order: 2; }
  .pair__text { margin-top: 0; }
}

/* ---------- close ---------- */
.close { background: var(--ink); color: var(--ivory); text-align: center; }
.close__mono { width: 72px; height: 72px; margin: 0 auto 40px; color: var(--gold); }
.close__title { font-size: clamp(42px, 2rem + 4vw, 104px); line-height: 1.02; }
.close__lede { margin: 26px auto 0; max-width: 28em; color: rgba(243,238,229,.74); }
.close__actions { margin-top: 44px; display: grid; justify-items: center; gap: 12px; }
.close__links { margin-top: 56px; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; }
.close__links a { color: rgba(243,238,229,.8); }

.foot { background: var(--ink); color: rgba(243,238,229,.6); border-top: 1px solid rgba(168,132,78,.3); padding: 36px 0 calc(36px + env(safe-area-inset-bottom)); }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot .label { color: rgba(243,238,229,.6); }
.foot__mark { color: var(--ivory); }
.foot__mark .letters { width: 92px; height: 19px; }
.foot__line span { display: inline-block; }
@media (max-width: 479px) { .foot__line .dot { display: none; } .foot__line span:not(.dot) { display: block; } }
