:root {
  --wine: #3d0c20;
  --wine-2: #561431;
  --gold: #c9a057;
  --gold-soft: #e6cf9f;
  --ivory: #fbf5ea;
  --sand: #f1e6d3;
  --ink: #2a1219;
  --ink-2: #6e5258;
  --line: rgba(42, 18, 25, .14);
  --line-d: rgba(251, 245, 234, .2);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --serif: 'Bodoni Moda', 'Times New Roman', serif;
  --sans: 'Jost', system-ui, sans-serif;
  --pad: clamp(16px, 4vw, 64px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 17px/1.55 var(--sans); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.05; letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wordmark { font: 400 1.6rem/1 var(--serif); letter-spacing: .02em; text-decoration: none; }
.wordmark--lg { font-size: clamp(3.4rem, 9vw, 6.5rem); color: var(--gold-soft); }

.btn { display: inline-block; padding: 15px 30px; background: linear-gradient(var(--gold), var(--gold)) no-repeat 50% 100% / 0 2px, var(--wine); color: var(--ivory); text-decoration: none; text-align: center; letter-spacing: .02em; transition: background-size .5s var(--ease), background-color .3s var(--ease), color .3s var(--ease); }
.btn:hover { background-color: var(--wine-2); background-size: 100% 2px; }
.btn--ghost { background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--ivory); }
.btn--sm { padding: 9px 18px; font-size: .95rem; }
.btn--full { display: block; width: 100%; }
.link { display: block; margin-top: 12px; text-align: center; text-underline-offset: 4px; font-size: .95rem; }

/* curtain */
.curtain { position: fixed; inset: 0; z-index: 60; background: var(--wine); display: grid; place-items: center; transition: transform 1.2s cubic-bezier(.76, 0, .24, 1), border-radius 1.2s cubic-bezier(.76, 0, .24, 1); }
.curtain.is-up { transform: translateY(-104%); border-radius: 0 0 50% 50% / 0 0 14vh 14vh; }
.curtain__in { display: grid; justify-items: center; gap: 16px; text-align: center; transition: opacity .5s ease, transform .9s var(--ease); }
.curtain.is-up .curtain__in { opacity: 0; transform: translateY(-40px); }
.curtain .wordmark span { display: inline-block; animation: letter 1s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 100ms); }
@keyframes letter { from { opacity: 0; transform: translateY(.45em) rotate(4deg); filter: blur(6px); } }
.curtain__in::after { content: ''; order: 1; width: 120px; height: 1px; background: var(--gold); transform: scaleX(0); animation: rule 1.1s .55s var(--ease) forwards; }
@keyframes rule { to { transform: scaleX(1); } }
.curtain__line { order: 2; color: var(--ivory); letter-spacing: .14em; text-transform: uppercase; font-size: .82rem; animation: rise 1s .8s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px var(--pad); transition: background .4s var(--ease), box-shadow .4s var(--ease); }
.nav.is-solid { background: rgba(251, 245, 234, .94); box-shadow: 0 1px 0 var(--line); }
.nav__links { display: flex; gap: 28px; }
.nav__links a { text-decoration: none; font-size: .98rem; }
.nav__links a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* arch: the portrait's frame, from the arches of Rajasthani palaces in Avaran's own photos */
.arch { position: relative; overflow: hidden; border-radius: 999px 999px 0 0; background: linear-gradient(180deg, #efe0c6, #e2cdaa); }
.arch .pt { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.pt--hold, .pt--old { pointer-events: none; }
.pt--old { animation: dissolve .8s ease forwards; }
@keyframes dissolve { to { opacity: 0; } }

/* hero entrance after the curtain lifts */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w > span { display: inline-block; transform: translateY(105%); }
.is-in .w > span { transform: none; transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 60ms + 350ms); }
.hero__copy p, .hero__cta { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.is-in .hero__copy p { opacity: 1; transform: none; transition-delay: .9s; }
.is-in .hero__cta { opacity: 1; transform: none; transition-delay: 1.05s; }
.hero__stage .arch { clip-path: inset(100% 0 0 0 round 999px 999px 0 0); }
.hero__stage .arch .pt { transform: scale(1.12); transform-origin: 50% 30%; }
.is-in .hero__stage .arch { clip-path: inset(0 0 0 0 round 999px 999px 0 0); transition: clip-path 1.5s .25s cubic-bezier(.76, 0, .24, 1); }
.is-in .hero__stage .arch .pt { transform: none; transition: transform 2.2s .25s var(--ease); }
.hero__cap { opacity: 0; transition: opacity .8s 1.4s ease; }
.is-in .hero__cap { opacity: 1; }

/* sections rising into view */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0ms); }
.rv.is-vis { opacity: 1; transform: none; }

/* hero */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 4vw, 72px); align-items: end; padding: 84px var(--pad) 0; background: var(--ivory); overflow: hidden; }
.thread { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.thread path { fill: none; stroke: var(--gold); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-in .thread path { animation: draw 2.8s .3s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero__copy { position: relative; align-self: center; padding-bottom: 48px; }
.hero h1 { font-size: clamp(3rem, 7vw, 7rem); line-height: .98; letter-spacing: -.02em; color: var(--wine); }
.hero h1 em { color: var(--gold); font-style: italic; }
.hero__copy p { max-width: 34em; margin-top: 22px; font-size: 1.15rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__stage { position: relative; height: min(84svh, 860px); display: flex; flex-direction: column; }
.hero__stage .arch { flex: 1; min-height: 0; }
.hero__cap { padding: 8px 0 12px; font-size: .95rem; color: var(--ink-2); text-align: center; }

/* studio */
.studio { display: grid; grid-template-columns: minmax(270px, 1fr) minmax(0, 1.05fr) minmax(290px, 1fr); gap: clamp(16px, 2.2vw, 36px); height: 100svh; min-height: 620px; padding: 72px var(--pad) 0; background: var(--wine); color: var(--ivory); }
.studio__ctl { min-height: 0; overflow-y: auto; padding-bottom: 20px; scrollbar-width: thin; scrollbar-color: var(--line-d) transparent; }
.studio h2 { font-size: clamp(1.9rem, 2.6vw, 2.6rem); }
.demo { margin-top: 6px; font-size: .9rem; color: var(--gold-soft); }
.studio__stage { min-height: 0; display: flex; }
.arch--studio { flex: 1; }
fieldset { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: .98rem; }
.val { color: var(--gold-soft); margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 38px; padding: 6px 14px; box-shadow: inset 0 0 0 1px var(--line-d); font-size: .95rem; transition: background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease); }
.chip:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.chip[aria-pressed=true] { background: var(--gold-soft); color: var(--wine); box-shadow: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 36px; height: 36px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.sw:hover { transform: scale(1.08); }
.sw[aria-pressed=true] { box-shadow: 0 0 0 2px var(--wine), 0 0 0 4px var(--gold-soft); }
.tabs { display: none; }
.models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.model { display: grid; gap: 6px; padding: 4px; font-size: .88rem; text-align: center; box-shadow: inset 0 0 0 1px var(--line-d); transition: box-shadow .25s var(--ease); }
.model img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; transition: transform .6s var(--ease); }
.model { overflow: hidden; }
.model:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.model[aria-pressed=true] { box-shadow: inset 0 0 0 2px var(--gold-soft); color: var(--gold-soft); }
#colour .sw--orig { background: conic-gradient(#a11a2c, #c8891f, #0f5c49, #1e3a7a, #54256f, #a11a2c); }

.tray { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: var(--line-d) transparent; }
.pc-card { display: grid; grid-template-rows: 70px auto; gap: 4px; padding: 6px; text-align: left; font-size: .78rem; line-height: 1.2; background: rgba(251, 245, 234, .96); color: var(--ink); box-shadow: 0 0 0 0 var(--gold); transition: box-shadow .25s var(--ease); }
.pc-card img { width: 100%; height: 70px; object-fit: contain; transition: transform .5s var(--ease); }
.pc-card:hover img { transform: scale(1.1); }
.pc-card[aria-pressed=true] { box-shadow: 0 0 0 3px var(--gold); }
.look { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-d); }
.look__note { min-height: 3em; color: var(--gold-soft); font-size: .98rem; line-height: 1.4; }
.look__list { list-style: none; margin: 8px 0 12px; padding: 0; font-size: .92rem; }
.look__list li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.look__list li span:last-child { white-space: nowrap; }
.look .btn { background: var(--gold-soft); color: var(--wine); }
.look .btn:hover { background: var(--ivory); }

/* see it on me */
.onme { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 72px); align-items: start; padding: clamp(56px, 8vw, 110px) var(--pad); background: var(--sand); }
.onme > * { min-width: 0; }
.onme__copy > p { margin-top: 12px; max-width: 34em; }
.onme__pick { position: relative; margin-top: 20px; cursor: pointer; }
.onme__pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.onme__pick:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.onme .onme__status { min-height: 1.5em; color: var(--wine-2); }
.onme__tray { margin-top: 6px; }
.onme__label { margin: 10px 0 6px; font-size: .95rem; }
.onme__row { display: grid; grid-auto-flow: column; grid-auto-columns: 128px; gap: 6px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.onme__row .pc-card { scroll-snap-align: start; }
.onme .pc-card { background: var(--ivory); }
.onme__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.chip--ink { box-shadow: inset 0 0 0 1px var(--line); }
.chip--ink[aria-pressed=true] { background: var(--wine); color: var(--ivory); }
.onme__tools .btn { padding: 8px 18px; }
.onme__tools .btn:disabled { opacity: .45; cursor: not-allowed; background: none; color: var(--ink); }
.demo--ink { color: var(--ink-2); }
.onme__dress { margin-top: 6px; }
.onme__hint { margin-left: 6px; color: var(--ink-2); font-size: .88rem; }
#onmeDress .sw[aria-pressed=true] { box-shadow: 0 0 0 2px var(--sand), 0 0 0 4px var(--wine); }
#onmeDress .sw--orig { background: conic-gradient(#a11a2c, #c8891f, #0f5c49, #1e3a7a, #54256f, #a11a2c); }
.onme__stage { position: sticky; top: 72px; display: grid; place-items: center; min-height: 320px; background: var(--wine); }
#onmeCanvas { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100svh - 90px); touch-action: none; cursor: grab; }
#onmeCanvas:active { cursor: grabbing; }
#onmeCanvas { transition: opacity .7s var(--ease), transform .9s var(--ease); }
.onme:not(.has-photo) #onmeCanvas { opacity: 0; transform: scale(.97); pointer-events: none; }

/* how */
.how { padding: clamp(72px, 10vw, 150px) var(--pad); }
.how__steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: clamp(20px, 4vw, 64px); }
.how__steps span { font: italic 400 1.1rem var(--serif); color: var(--gold); }
.how__steps h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); margin: 4px 0 8px; color: var(--wine); }

/* pieces */
.pieces { padding: clamp(56px, 8vw, 110px) var(--pad); background: var(--sand); }
.pieces__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 40px; margin-bottom: 36px; }
.pieces__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 44%), 1fr)); gap: clamp(10px, 1.6vw, 24px); }
.piece { display: flex; flex-direction: column; text-align: left; }
.piece__img { display: block; aspect-ratio: 4 / 5; padding: 12%; background: var(--wine); overflow: hidden; }
.piece__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .7s var(--ease); }
.piece:hover .piece__img img { transform: scale(1.1); }
.piece__name { margin-top: 10px; font: 400 1.1rem/1.25 var(--serif); }
.piece__price { margin-top: 4px; font-size: .98rem; }
.piece__price small { display: block; color: var(--ink-2); font-size: .85rem; }

/* book */
.book { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 96px); padding: clamp(64px, 9vw, 130px) var(--pad); }
.book__copy p { margin-top: 16px; max-width: 30em; }
address { margin-top: 28px; font-style: normal; color: var(--ink-2); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 4px; font-size: .95rem; }
.form__wide { grid-column: 1 / -1; }
input, textarea { width: 100%; padding: 12px 2px; font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; }
input:focus, textarea:focus { outline: 0; border-bottom: 2px solid var(--gold); }
.form__status { min-height: 1.5em; font-size: .95rem; color: var(--wine-2); }

.ftr { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 32px; padding: 28px var(--pad); background: var(--wine); color: var(--ivory); font-size: .92rem; }

/* laptops with short screens */
@media (max-height: 800px) and (min-width: 1101px) {
  fieldset { margin-top: 10px; }
  legend { margin-bottom: 5px; }
  .chip { min-height: 32px; padding: 3px 11px; font-size: .9rem; }
  .sw { width: 30px; height: 30px; }
  .models { grid-template-columns: repeat(3, 92px); }
  .model { font-size: .8rem; gap: 3px; }
  .pc-card { grid-template-rows: 50px auto; font-size: .74rem; }
  .pc-card img { height: 50px; }
  .look { margin-top: 10px; padding-top: 8px; }
  .look__note { min-height: 0; font-size: .92rem; }
  .btn--full { padding: 11px 20px; }
  .look__list { margin: 4px 0 8px; font-size: .85rem; }
}

/* tablets and phones: portrait stays in view while the controls scroll under it */
@media (max-width: 1100px) {
  .nav__links { display: none; }
  .studio { display: flex; flex-direction: column; height: auto; min-height: 0; padding: 0 0 24px; gap: 0; }
  .studio__stage { order: -1; position: sticky; top: 0; z-index: 5; height: 50svh; justify-content: center; background: var(--wine); padding-top: 58px; }
  .arch--studio { flex: 0 1 auto; aspect-ratio: 4 / 5; height: 100%; }
  .studio__ctl { overflow: visible; padding: 16px var(--pad) 0; }
  .studio__ctl--her { padding-top: 20px; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; box-shadow: inset 0 0 0 1px var(--line-d); }
  .tab { padding: 11px; }
  .tab[aria-selected=true] { background: var(--gold-soft); color: var(--wine); }
  .studio[data-tab=jewels] [data-pane=her], .studio[data-tab=her] [data-pane=jewels] { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .thread { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 72px; align-items: start; }
  .hero__copy { padding-bottom: 8px; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 4rem); }
  .hero__copy p { font-size: 1.05rem; margin-top: 14px; }
  .hero__cta { margin-top: 18px; }
  .hero__cta .btn { flex: 1; padding: 13px 12px; }
  .hero__stage { height: 62svh; width: min(100%, 360px); margin-inline: auto; }
  .onme { grid-template-columns: 1fr; }
  .onme__stage { order: -1; position: static; }
  .onme:not(.has-photo) .onme__stage { display: none; }
  .onme__row { grid-auto-columns: 112px; }
  .how__steps, .book { grid-template-columns: 1fr; }
  .how__steps { margin-top: 28px; }
  .form { grid-template-columns: 1fr; }
  .chip { min-height: 42px; }
  .sw { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .hero__copy p, .hero__cta, .hero__cap { opacity: 1; transform: none; }
  .hero__stage .arch { clip-path: none; }
  .hero__stage .arch .pt { transform: none; }
  .thread path { stroke-dashoffset: 0; }
}
