/* OXUS, The Commission. Engagement and wedding page. Tokens from ~/Oxus/BRIEF.md */
: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: 1480px;
  --section: clamp(96px, 12vw, 200px);
  --ease: cubic-bezier(.2, .7, .15, 1);
  --bar-h: 60px;
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 40px; --bar-h: 72px; } }
@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(--bar-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, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
em { font-style: italic; }
::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); }
.dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; vertical-align: middle; margin: 0 .7em; opacity: .55; transform: translateY(-1px); }
.body { max-width: 32em; color: var(--graphite); }
.body + .body { margin-top: 1.1em; }
.cap { font-family: var(--sans); font-size: 10.5px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--graphite); margin-top: 14px; }
.ch__title { font-family: var(--serif); font-weight: 300; font-size: clamp(36px, 1.6rem + 3vw, 84px); line-height: 1.04; letter-spacing: -.005em; color: var(--ink); margin-bottom: 26px; }
.ch__title em { font-weight: 300; }

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

/* ---------- bar ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--bar-h); transition: background .8s var(--ease), transform .8s var(--ease), box-shadow .8s var(--ease); }
.bar__inner { height: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 18px; }
.bar__mark { color: var(--ink); display: block; padding: 8px 0; }
.bar__mark .letters { width: 84px; height: 18px; }
@media (min-width: 768px) { .bar__mark .letters { width: 112px; height: 23px; } }
.bar__where { display: none; }
@media (min-width: 900px) { .bar__where { display: block; padding-left: 28px; border-left: 1px solid rgba(168,132,78,.45); } }
.bar__cta { margin-left: auto; font-size: 11px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--ink); padding: 10px 0; border-bottom: 1px solid var(--gold); white-space: nowrap; }
.bar.is-solid { background: rgba(243,238,229,.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(22,21,19,.08); }
.bar.is-hidden { transform: translateY(-100%); }

/* ---------- opening ---------- */
.open { display: grid; padding-top: calc(var(--bar-h) + 36px); }
.open__text { padding: 0 var(--gutter) 36px; }
.open__mono { width: 34px; height: 34px; color: var(--gold); margin-bottom: 22px; }
.open .label { margin-bottom: 18px; }
.open__title { font-family: var(--serif); font-weight: 300; font-size: clamp(54px, 2rem + 7vw, 150px); line-height: .96; letter-spacing: -.015em; margin-bottom: 24px; }
.open__title em { font-weight: 300; }
.open__lede { max-width: 26em; color: var(--graphite); font-size: 1.0625em; }
.open__figure { padding: 0 var(--gutter); }
.open__panel { background: var(--paper); aspect-ratio: 1 / 1; overflow: hidden; }
.open__panel img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transform: scale(1.12); transform-origin: 50% 40%; }
.open__cap { margin-top: 14px; font-size: 10px; }
@media (min-width: 1024px) {
  .open { grid-template-columns: 1fr 1.05fr; align-items: center; gap: 0; min-height: 100svh; padding-top: var(--bar-h); max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
  .open__text { padding: 0 6vw 0 0; }
  .open__figure { padding: 0; }
}

/* ---------- chapter index ---------- */
.chapters { padding: 48px var(--gutter) 0; }
.chapters__list { max-width: 760px; margin-inline: auto; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--stone); }
.chapters__list a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 0 6px; text-decoration: none; font-size: 10.5px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--graphite); position: relative; transition: color .4s; }
.chapters__list a::before { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .6s var(--ease); }
.chapters__list a:hover { color: var(--ink); }
.chapters__list a:hover::before { transform: scaleX(1); }
.chapters__list span { font-family: var(--serif); font-size: 17px; letter-spacing: .04em; color: var(--deep-gold); text-transform: none; }

.quote { max-width: 22em; margin: clamp(80px, 11vw, 160px) auto; padding-inline: var(--gutter); text-align: center; font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 1.1rem + 1.8vw, 46px); line-height: 1.24; color: var(--ink); }

/* ---------- chapters ---------- */
.ch { padding-block: clamp(72px, 10vw, 168px); }
.ch__inner { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); display: grid; gap: 40px; }
.ch__no { font-family: var(--serif); font-weight: 300; font-size: 64px; line-height: 1; color: var(--gold); margin-bottom: 18px; }
.ch__kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.ch__kicker::before { content: ""; flex: 0 0 32px; height: 1px; background: var(--gold); opacity: .8; }
@media (min-width: 1024px) {
  .ch__inner { grid-template-columns: 5fr 6fr; gap: 7vw; align-items: center; }
  .ch__inner--rev .ch__text { order: 2; }
  .ch__no { font-size: 88px; }
}

.ch--dark { background: var(--ink); color: var(--ivory); }
.ch--dark .ch__title { color: var(--ivory); }
.ch--dark .body { color: rgba(243,238,229,.74); }
.ch--dark .label, .ch--dark .cap { color: rgba(243,238,229,.66); }
.ch--stone { background: var(--paper); }

.frame { position: relative; overflow: hidden; background: var(--stone); }
.frame img, .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame--34 { aspect-ratio: 3 / 4; }
.frame--1 { aspect-ratio: 1 / 1; }
.frame--916 { aspect-ratio: 9 / 16; }
.frame--cad { aspect-ratio: 896 / 576; background: #000; }
.frame--zoom img { transform: scale(1.5); transform-origin: 46% 45%; }
@media (min-width: 1024px) { .ch__media .frame--34 { max-height: 82svh; aspect-ratio: 3 / 4; margin-inline: auto; } }

/* ---------- the ring ---------- */
.ring { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); display: grid; gap: 40px; }
.paper { background: var(--paper); aspect-ratio: 1 / 1; overflow: hidden; }
.paper img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.paper--detail img { transform: scale(1.9); transform-origin: 54% 24%; }
.ring__film .frame--916 { max-width: 420px; margin-inline: auto; }
.ring__film .cap { text-align: center; }
@media (min-width: 1024px) {
  .ring { grid-template-columns: 1fr 1.3fr .8fr; align-items: end; gap: 4vw; }
  .ring__head { align-self: center; }
  .ring__film .cap { text-align: left; }
}

/* ---------- the hand ---------- */
.hand { background: var(--ink); color: var(--ivory); display: grid; }
.hand__media { background: #000; }
.hand__media img { width: 100%; max-height: 92svh; object-fit: cover; object-position: 50% 62%; aspect-ratio: 4 / 5; }
.hand__text { padding: 56px var(--gutter) 80px; }
.hand .ch__title { color: var(--ivory); }
.hand .body { color: rgba(243,238,229,.74); }
.hand__kicker { color: rgba(243,238,229,.66); margin-bottom: 22px; }
@media (min-width: 1024px) {
  .hand { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
  .hand__media img { aspect-ratio: auto; height: 100%; max-height: none; min-height: 80svh; }
  .hand__text { padding: 80px 8vw; }
}

/* ---------- engagement and wedding ---------- */
.head { max-width: 900px; margin-bottom: clamp(48px, 7vw, 104px); }
.head__kicker { margin-bottom: 22px; }
.head__lede { font-size: 1.0625em; }
.head--center { margin-inline: auto; text-align: center; }
.head--center .head__lede { margin-inline: auto; }
.make__grid { display: grid; gap: 48px; }
.paper--fill img { transform: scale(1.04); }
.make__list li { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; padding: 22px 0; border-top: 1px solid var(--stone); }
.make__list li:last-child { border-bottom: 1px solid var(--stone); }
.make__no { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--deep-gold); grid-row: span 2; line-height: 1.3; }
.make__list h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; margin-bottom: 4px; }
.make__list p { color: var(--graphite); }
@media (min-width: 1024px) { .make__grid { grid-template-columns: 1fr 1fr; gap: 7vw; align-items: center; } }

.inside { margin-top: clamp(80px, 10vw, 150px); text-align: center; }
.inside__label { margin-bottom: 30px; }
.inside__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 8px; max-width: 900px; margin-inline: auto; }
@media (min-width: 768px) { .inside__row { grid-template-columns: repeat(6, 1fr); } }
.inside__row li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.inside__row span { font-size: 36px; line-height: 1; color: var(--ink); height: 72px; display: flex; align-items: center; justify-content: center; }
.inside__row small { font-size: 10px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: var(--graphite); }
.s-fa { font-family: "Noto Nastaliq Urdu", serif; font-size: 30px !important; }
.s-he { font-family: "Frank Ruhl Libre", serif; font-weight: 300; }
.s-hy { font-family: "Noto Serif Armenian", serif; font-weight: 300; }
.s-ar { font-family: "Amiri", serif; }
.s-hi { font-family: "Tiro Devanagari Hindi", serif; }
.s-zh { font-family: "Noto Serif TC", serif; font-weight: 300; }
.inside__note { margin-top: 30px; font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--graphite); padding-inline: 8px; }

/* ---------- traditions ---------- */
.trad { background: var(--paper); }
.trad__list { display: grid; gap: 0; max-width: 1180px; margin-inline: auto; border-top: 1px solid var(--stone); }
.trad__list a { display: block; padding: 26px 0 24px; border-bottom: 1px solid var(--stone); text-decoration: none; }
.trad__list h3 { font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.2; margin-bottom: 6px; }
.trad__list p { color: var(--graphite); max-width: 30em; }
.trad__more { display: inline-block; margin-top: 12px; color: var(--deep-gold); font-size: 10.5px; border-bottom: 1px solid rgba(168,132,78,.5); padding-bottom: 2px; }
.trad__list a:hover h3 { color: var(--deep-gold); }
@media (min-width: 900px) {
  .trad__list { grid-template-columns: repeat(3, 1fr); column-gap: 48px; border-top: 0; }
  .trad__list a { border-top: 1px solid var(--stone); border-bottom: 0; padding: 30px 0 40px; height: 100%; }
}
.trad__close { margin-top: clamp(56px, 7vw, 96px); text-align: center; font-family: var(--serif); font-size: clamp(26px, 1.1rem + 1.4vw, 40px); font-weight: 300; }

/* ---------- appointment ---------- */
.appt__grid { display: grid; gap: 48px; }
.appt__mono { width: 72px; height: 72px; color: var(--gold); margin-top: 40px; }
@media (min-width: 1024px) { .appt__grid { grid-template-columns: 1fr 1fr; gap: 8vw; align-items: start; } }
.meet { margin-bottom: 28px; }
.meet legend { margin-bottom: 14px; }
.meet__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.meet__opt { position: relative; display: block; cursor: pointer; }
.meet__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.meet__opt span { display: flex; flex-direction: column; gap: 4px; min-height: 76px; justify-content: center; padding: 14px 16px; border: 1px solid var(--stone); background: var(--paper); transition: border-color .4s, background .4s; }
.meet__opt strong { font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.15; }
.meet__opt small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }
.meet__opt input:checked + span { border-color: var(--ink); background: var(--ivory); box-shadow: inset 0 0 0 1px var(--ink); }
.meet__opt input:focus-visible + span { outline: 1px solid var(--deep-gold); outline-offset: 3px; }

.field { position: relative; margin-bottom: 18px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--stone); border-radius: 0; padding: 26px 0 10px; -webkit-appearance: none; appearance: none;
  transition: border-color .4s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field label { position: absolute; left: 0; top: 24px; color: var(--graphite); pointer-events: none; transition: transform .4s var(--ease), font-size .4s, top .4s; font-size: 16px; }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select:focus + label, .field select.has-value + label { top: 2px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.field--select::after { content: ""; position: absolute; right: 4px; top: 34px; width: 7px; height: 7px; border-right: 1px solid var(--graphite); border-bottom: 1px solid var(--graphite); transform: rotate(45deg); pointer-events: none; }
.field select { padding-right: 24px; cursor: pointer; }
.opt { font-size: .8em; opacity: .7; margin-left: .3em; }
.field.is-invalid input, .field.is-invalid select { border-bottom-color: #8a3b2e; }
.form__error { min-height: 1.4em; margin: 6px 0 14px; color: #8a3b2e; font-size: 14px; }
.form__note { margin-top: 14px; font-size: 13px; color: var(--graphite); }
.thanks { padding: 40px 0; }
.thanks__mono { width: 56px; height: 56px; color: var(--gold); margin-bottom: 26px; }
.thanks__title { font-family: var(--serif); font-weight: 300; font-size: clamp(34px, 1.4rem + 2vw, 56px); line-height: 1.1; margin-bottom: 16px; }
.thanks__body { margin-bottom: 18px; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--ivory); padding: 80px 0 40px; }
.foot__inner { display: grid; gap: 34px; }
.foot__mark img { width: 170px; height: auto; }
.foot__line { font-family: var(--serif); font-weight: 300; font-size: 24px; line-height: 1.3; color: var(--ivory); }
.foot .label { color: rgba(243,238,229,.66); }
.foot__cols { display: grid; gap: 18px; }
.foot__place { color: rgba(243,238,229,.74); }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot__links a { text-decoration: none; border-bottom: 1px solid rgba(168,132,78,.6); padding-bottom: 2px; }
.foot__legal { border-top: 1px solid rgba(243,238,229,.14); padding-top: 22px; font-size: 10px; }
@media (min-width: 1024px) { .foot__inner { grid-template-columns: auto 1fr; align-items: end; column-gap: 8vw; } .foot__legal { grid-column: 1 / -1; } }

/* ---------- reveals: only when JS is on and motion is allowed ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
  .js [data-reveal="media"] { transform: none; clip-path: inset(6% 0 0 0); transition: opacity 1.6s var(--ease), clip-path 1.8s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}
