/* Begin a commission, after chnlsync.com/start (William's pick, Oct 26, 2026): one question at a time in the middle of the
   page, answered with taps. The first step hangs a painting in a gold frame for each kind of work; house pills for the
   rest, the house underlined fields for the name and email. A five-part hairline shows how far along you are. Soft rises between steps, as on the homepage. */

.ob { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; max-width: 1080px; margin: 0 auto;
  padding: calc(var(--bar-h) + clamp(24px, 3vw, 40px)) var(--m) 0; overflow-x: clip; }   /* the frames' picture light never widens the page */

/* ---------- top: back, and how far along ---------- */
.ob__top { position: relative; display: flex; justify-content: center; min-height: 44px; }
.ob__progress { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ob__count { margin: 0; color: var(--mute); font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.ob__meter { display: flex; gap: 6px; }
.ob__meter i { width: 36px; height: 2px; border-radius: 2px; background: var(--hair); transition: background-color .6s var(--ease-out); }
.ob__meter i.is-on { background: var(--ink); }
.ob__back { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 12px;
  border: 1px solid var(--hair); border-radius: 999px; background: none; color: var(--ink); cursor: pointer;
  transition: border-color .3s var(--ease-out), opacity .3s var(--ease-out), visibility .3s; }
.ob__back:hover { border-color: var(--ink); }
.ob__top.is-first .ob__back { opacity: 0; visibility: hidden; }
.ob__top.is-done { visibility: hidden; }

/* ---------- the question ---------- */
.ob__form { width: 100%; }
.ob-step { display: flex; flex-direction: column; align-items: center; padding-top: clamp(24px, 3vw, 36px); text-align: center; }
.ob-step[hidden] { display: none; }
.ob-q { max-width: 16em; margin: 0; font-size: clamp(36px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -.036em; font-weight: 400; text-wrap: balance; outline: none; }
.ob-sub { max-width: 32em; margin: calc(var(--u) * 2) 0 0; font-size: 17px; line-height: 27px; letter-spacing: -.003em; color: var(--mute); text-wrap: pretty; }

/* ---------- step 1: a painting for each kind of work, hung in the house's gold frames ----------
   Will's pick (Oct 26, 2026, over rounded cards): "i like the frames". The Baroque frame for the 4:3 paintings and the
   hero's Florentine for the wide ones; both have the same outer shape, so the rows line up. The paintings come whole and
   are framed by object-position, so the living loop can fade in over the still while you hover without a jump.
   --fw keeps both rows on the first screen, whatever its height. */
.ob-cards { --fw: clamp(170px, calc((100vh - 490px) * .67), 300px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 40px;
  width: 100%; max-width: 1000px; margin-top: clamp(28px, 3.2vw, 40px); }
.ob-cards { --fw: clamp(170px, calc((100svh - 490px) * .67), 300px); }
.ob-card { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: none;
  color: var(--ink); font: inherit; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ob-card::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -14%; width: calc(var(--fw) * 1.5); aspect-ratio: 4 / 3; translate: -50% 0;   /* the picture light */
  background: radial-gradient(closest-side, rgba(255, 252, 243, .95), rgba(255, 252, 243, .45) 55%, rgba(255, 252, 243, 0)); opacity: 0; transition: opacity .6s var(--ease-out); pointer-events: none; }
.ob-pic { position: relative; display: block; width: min(100%, var(--fw)); aspect-ratio: 2400 / 1792;
  filter: drop-shadow(0 14px 18px rgba(30, 22, 10, .26)) drop-shadow(0 3px 4px rgba(30, 22, 10, .18)); transition: transform .6s var(--ease), filter .6s var(--ease-out); }
.ob-pic__win { position: absolute; left: var(--ox); top: var(--oy); width: var(--ow); height: var(--oh); overflow: hidden; background: #1c150f; }
.ob-pic__win > img, .ob-pic__win > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%);
  transition: transform 1.2s var(--ease), opacity .6s var(--ease-out); }
.ob-pic__win > video { opacity: 0; }
.ob-pic__win > video.is-playing { opacity: 1; }
.ob-pic__win::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;   /* the lip of the frame shades the panel */
  box-shadow: inset 0 10px 14px -6px rgba(16, 10, 4, .55), inset 8px 0 12px -6px rgba(16, 10, 4, .4), inset -6px 0 10px -6px rgba(16, 10, 4, .25), inset 0 -6px 10px -6px rgba(16, 10, 4, .25); }
.ob-pic__gilt { position: absolute; inset: 0; z-index: 2; background: center / 100% 100% no-repeat; pointer-events: none; }
[data-frame="baroque"] { --ox: 12.3%; --oy: 16.55%; --ow: 75.3%; --oh: 66.65%; }
[data-frame="baroque"] .ob-pic__gilt { background-image: url("/assets/img/frame-founder-gold-600.webp"); }
[data-frame="florentine"] { --ox: 18.1%; --oy: 24.3%; --ow: 63.7%; --oh: 52%; }
[data-frame="florentine"] .ob-pic__gilt { background-image: url("/assets/img/frame-florentine-600.webp"); }
.ob-card__t { margin-top: 18px; font-size: 17px; line-height: 24px; letter-spacing: -.01em; }
.ob-card__d { margin-top: 2px; padding: 0 10px; color: var(--mute); font-size: 14px; line-height: 20px; text-wrap: balance; }
.ob-card__t { text-decoration: underline transparent 1px; text-underline-offset: 5px; transition: text-decoration-color .3s var(--ease-out); }
.ob-card:hover::before, .ob-card[aria-pressed="true"]::before { opacity: 1; }
.ob-card:hover .ob-pic, .ob-card[aria-pressed="true"] .ob-pic { transform: translateY(-5px);
  filter: drop-shadow(0 24px 26px rgba(30, 22, 10, .3)) drop-shadow(0 5px 7px rgba(30, 22, 10, .2)); }
.ob-card:hover .ob-pic__win > * { transform: scale(1.04); }
.ob-card:active .ob-pic { transform: translateY(-2px) scale(.985); }
.ob-card[aria-pressed="true"] .ob-card__t { text-decoration-color: currentColor; }

/* ---------- chips: the house pills; the ones you can choose many of grow a tick ---------- */
.ob-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--u); max-width: 880px; margin-top: clamp(32px, 4vw, 44px); }
.ob-break { flex-basis: 100%; height: 0; }                              /* the budget's ranges on one line, the other answers on the next */
.ob-chips[hidden], .ci-chip[hidden] { display: none; }
.ci-chip {
  position: relative; display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border: 1px solid var(--hair); border-radius: 999px;
  color: var(--ink); font-size: 16px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: border-color .35s var(--ease-out), color .35s var(--ease-out), background-color .35s var(--ease-out), transform .2s var(--ease-out);
}
.ci-chip input { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
.ci-chip:hover { border-color: rgba(18, 18, 17, .36); }
.ci-chip:active { transform: scale(.97); }
.ci-chip:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.ci-chip:has(input:focus-visible) { outline: 1px solid var(--ink); outline-offset: 3px; }
.ci-tick { display: inline-block; flex: 0 0 auto; width: 0; height: 14px; margin-right: 0; opacity: 0; overflow: hidden; transition: width .4s var(--ease), margin-right .4s var(--ease), opacity .3s var(--ease-out); }
.ci-tick::before { content: ""; display: block; width: 9px; height: 5px; margin: 3px 0 0 2px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.ci-chip:has(input:checked) .ci-tick { width: 13px; margin-right: 8px; opacity: 1; }
.ob-chips--one .ci-chip { height: 52px; padding: 0 26px; font-size: 17px; }       /* one tap answers */
.ob-also { display: flex; flex-direction: column; align-items: center; margin-top: clamp(28px, 3.5vw, 40px); }
.ob-also__label { margin: 0; color: var(--mute); }
.ob-also .ob-chips { margin-top: 14px; }
.ob-also .ci-chip { height: 40px; padding: 0 16px; font-size: 15px; color: var(--mute); }
.ob-also .ci-chip:hover, .ob-also .ci-chip:has(input:checked) { color: var(--ink); }
.ob-also .ci-chip:has(input:checked) { color: var(--paper); }

/* ---------- buttons ---------- */
.ob-btns { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; margin-top: clamp(36px, 4.5vw, 52px); }
.ob-next > span { display: inline-block; transition: transform .45s var(--ease-out); }
.ob-next:hover > span { transform: translateX(4px); }
.ob-skip { padding: 8px 4px; border: 0; background: none; color: var(--mute); font: inherit; cursor: pointer; transition: color .2s; }
.ob-skip:hover { color: var(--ink); }

/* ---------- fields: a hairline that draws itself in ink while you type ---------- */
.ob-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; width: 100%; max-width: 640px; margin-top: 36px; text-align: left; }
.ob-field--wide { width: 100%; max-width: 640px; margin-top: clamp(32px, 4vw, 44px); text-align: left; }
.ci-label { display: block; color: var(--mute); }
.ci-field { position: relative; }
.ci-field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); opacity: 0; transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s var(--ease), opacity .2s; pointer-events: none; }
.ci-field:focus-within::after { opacity: 1; transform: scaleX(1); }
.ci-input {
  display: block; width: 100%; padding: 8px 0 12px; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; background: none;
  color: var(--ink); font: inherit; font-size: 20px; line-height: 30px; letter-spacing: -.012em; outline: none; -webkit-appearance: none; appearance: none;
}
.ci-input::placeholder { color: rgba(18, 18, 17, .28); opacity: 1; }
.ci-input[aria-invalid="true"] { border-bottom-color: #a33a22; }
textarea.ci-input { min-height: 50px; resize: none; overflow: hidden; }

/* the last step: what you chose, then where to reply */
.ob-review { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; width: 100%; max-width: 640px; margin-top: clamp(28px, 3.5vw, 40px);
  padding: 16px 20px 18px; border: 1px solid var(--hair); border-radius: 16px; background: rgba(255, 253, 248, .45); text-align: left; }
.ob-review__k { display: block; color: var(--mute); font-size: 13px; line-height: 18px; }
.ob-review__v { margin: 4px 0 0; font-size: 16px; line-height: 24px; text-wrap: pretty; }
.ob-edit { flex: 0 0 auto; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; border-bottom: 1px solid var(--hair); cursor: pointer; transition: border-color .2s; }
.ob-edit:hover { border-bottom-color: var(--ink); }
.ob-more { width: 100%; max-width: 640px; margin-top: 28px; text-align: left; }
.ob-more summary { display: inline-flex; align-items: center; gap: 10px; color: var(--mute); cursor: pointer; list-style: none; transition: color .2s; }
.ob-more summary::-webkit-details-marker { display: none; }
.ob-more summary:hover, .ob-more[open] summary { color: var(--ink); }
.ob-more summary em { font-style: normal; opacity: .6; }
.ob-more__x { position: relative; width: 11px; height: 11px; }
.ob-more__x::before, .ob-more__x::after { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: currentColor; }
.ob-more__x::after { transform: rotate(90deg); transition: transform .5s var(--ease); }
.ob-more[open] .ob-more__x::after { transform: rotate(0deg); }
.ob-more .ob-fields { margin-top: 20px; }
.ci-error { min-height: 24px; margin: 20px 0 0; color: #a33a22; }
.ci-error + .ob-btns { margin-top: 16px; }

/* ---------- the quiet line at the foot of the flow ---------- */
.ob__foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: auto 0 0; padding: clamp(56px, 7vw, 96px) 0 28px; color: var(--mute); text-align: center; }
.ob__foot a, .ci-fine a { color: var(--ink); border-bottom: 1px solid var(--hair); transition: border-color .2s; }
.ob__foot a:hover, .ci-fine a:hover { border-bottom-color: var(--ink); }

/* ---------- moving between steps: the old step lifts away, the new one rises in line by line ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ob-step.is-leaving { opacity: 0; transform: translateY(-12px); transition: opacity .32s var(--ease-out), transform .32s var(--ease-out); }
  .ob-step.is-entering > * { animation: ciRise .95s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
  .ob-step.is-entering.is-back > * { animation-name: ciFall; }
}
@keyframes ciRise { from { opacity: 0; transform: translateY(18px); } }
@keyframes ciFall { from { opacity: 0; transform: translateY(-14px); } }

/* ---------- the letter: the answers, ruled like a ledger, arriving one line at a time ---------- */
.ci-letter { width: 100%; max-width: 640px; margin-top: clamp(32px, 4vw, 44px); border-top: 1px solid var(--ink); text-align: left; }
.ci-letter__head { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); color: var(--mute); }
.ci-line { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.ci-line b { font-weight: 400; color: var(--mute); }
@media (prefers-reduced-motion: no-preference) {
  .ci-line { opacity: 0; transform: translateY(8px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
  .ci-line.is-in { opacity: 1; transform: none; }
}
.ci-fine { margin: 24px 0 0; color: var(--mute); }
.ci-fine a + a { margin-left: 14px; }

@media (max-width: 900px) {
  .ob-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ob { padding-top: calc(var(--bar-h) + 20px); }
  .ob__top { min-height: 36px; }
  .ob__back { height: 32px; padding: 0 12px 0 10px; font-size: 14px; }
  .ob__count { font-size: 12px; }
  .ob__meter i { width: 24px; }
  .ob-step { padding-top: 28px; }
  .ob-q { font-size: 34px; line-height: 1.08; }
  .ob-sub { font-size: 16px; line-height: 25px; }
  .ob-cards { gap: 22px 18px; margin-top: 28px; }
  .ob-card::before { display: none; }
  .ob-pic { width: 100%; }
  .ob-card__t { margin-top: 12px; font-size: 16px; line-height: 22px; }
  .ob-card__d { display: none; }
  .ob-chips { margin-top: 28px; }
  .ob-chips--one { flex-direction: column; align-items: stretch; width: 100%; }
  .ob-break { display: none; }
  .ob-chips--one .ci-chip { justify-content: center; }
  .ob-btns { flex-direction: column; align-items: stretch; width: 100%; }
  .ob-btns .pill { justify-content: center; }
  .ob-fields { grid-template-columns: 1fr; gap: 24px; }
  .ci-input { font-size: 18px; line-height: 28px; }
  .ob__foot { flex-direction: column; gap: 6px; }
  .ci-line { grid-template-columns: 1fr; gap: 2px; }
}
