/* ==========================================================================
   Creating a website: the conversation, inside the building.

   Left: the questions, written straight onto the plaster wall.
   Right (or on top, on a phone): the hall and its window. The mist outside the
   window lifts a little with every answer.
   ========================================================================== */

body.page-flow { --window: clamp(19rem, 31vw, 36rem); background: var(--plaster); }
html:has(body.page-flow) { background: var(--plaster); }

/* The window -------------------------------------------------------------- */
.window { position: fixed; inset: 0 0 0 auto; width: var(--window); overflow: hidden; background: #6d4a38; container-type: size; view-transition-name: window; z-index: 1; }
/* The photograph covers the panel whatever its shape, so the mist can sit exactly on the glass. */
.window__view { position: absolute; left: 50%; top: 50%; width: max(100cqw, 100cqh * 9 / 16); height: max(100cqh, 100cqw * 16 / 9); transform: translate(-50%, -50%); }
.window__view img { width: 100%; height: 100%; object-fit: cover; }
.window__mist {
  position: absolute; left: 34.5%; right: 34.5%; top: 26%; bottom: 30.5%;
  background: linear-gradient(180deg, #f3f2f1 0%, #e9e9ea 55%, #eeeeef 100%);
  opacity: calc(0.96 - var(--clear) * 0.0096); transition: opacity 1.6s var(--ease-out);
}
/* Progress: a hairline down the window's edge, lit as far as the visitor has come. */
.window::before, .window::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; z-index: 2; }
.window::before { bottom: 0; background: rgb(244 241 235 / 0.28); }
.window::after { width: 3px; height: calc(var(--clear) * 1%); background: var(--lamp-soft); transition: height 1.2s var(--ease-out); }

/* The top bar sits over both halves: ink on the plaster, light on the photograph. */
.page-flow .topbar { z-index: 60; position: absolute; }
.page-flow .topbar .wordmark { justify-self: start; grid-column: 2; }
.page-flow .topbar { grid-template-columns: auto 1fr auto; gap: 1.2rem; }
.page-flow .topbar__action { color: #f4f1eb; }

/* The conversation ------------------------------------------------------------ */
.ob-stage { position: relative; min-height: 100svh; padding: calc(var(--bar) + clamp(2rem, 9vh, 6.5rem)) calc(var(--window) + var(--gutter)) 5rem var(--gutter); }
.ob-question { max-width: 41rem; view-transition-name: step; }
.ob-question--wide { max-width: 68rem; }
::view-transition-old(step) { animation: step-out 0.28s var(--ease-in-out) both; }
::view-transition-new(step) { animation: step-in 0.7s var(--ease-out) 0.12s both; }
@keyframes step-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes step-in { from { opacity: 0; transform: translateY(22px); } }

.ob-count { display: flex; align-items: center; gap: 0.5em; }
.ob-count b { color: var(--fg); font-weight: 600; }
.ob-saved { margin-left: 1.4em; display: inline-flex; align-items: center; gap: 0.7em; }
.ob-saved::before { content: ""; width: 3px; height: 0.9em; background: var(--lamp); }
.ob-title { margin-top: 1.4rem; font-size: var(--step-3); font-weight: 500; letter-spacing: -0.042em; line-height: 1.02; max-width: 17ch; }
.ob-question--wide .ob-title { max-width: 22ch; }
.ob-lead { margin-top: 1.1rem; font-size: var(--step-1); line-height: 1.42; letter-spacing: -0.01em; color: var(--muted); max-width: 46ch; }
.ob-form { margin-top: clamp(2rem, 5vh, 3.2rem); }

/* Fields: a caption, then words typed onto the wall over one hairline. */
.ob-field { display: grid; gap: 0.55rem; }
.ob-field + .ob-field { margin-top: 2.2rem; }
.ob-field fieldset { display: grid; gap: 0.9rem; }
.ob-field input:is([type="text"], [type="url"], [type="tel"], [type="email"]), .ob-field textarea, .ob-field select {
  width: 100%; padding: 0.55rem 0 0.8rem; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: transparent;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.7rem); letter-spacing: -0.025em; line-height: 1.3; color: var(--fg);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.ob-field textarea { resize: none; min-height: 5.5rem; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); letter-spacing: -0.015em; line-height: 1.45; }
.ob-field :is(input, textarea, select):focus { outline: none; border-bottom-color: var(--fg); box-shadow: 0 1px 0 0 var(--fg); }
.ob-field.has-error :is(input, textarea) { border-bottom-color: var(--danger); }
.page-flow .errorlist { margin-top: 0.2rem; }
.ob-subsection { margin-top: 2.6rem; }

/* Choices. Small ones are square tags; bigger ones are lines with the slot. */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.5rem 1rem; border: 1px solid var(--line-strong); font-size: 0.98rem; cursor: pointer; transition: background-color 0.25s, color 0.25s, border-color 0.25s; }
.chip:hover { border-color: var(--fg); }
.chip:has(input:checked) { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip input, .choice-card input, .mood-card input { position: absolute; opacity: 0; pointer-events: none; }
:is(.chip, .choice-card, .mood-card):has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.choice-cards, .mood-grid { display: grid; border-top: 1px solid var(--line-strong); }
.mood-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 4vw, 3.5rem); border-top: 0; }
.choice-card, .mood-card { position: relative; display: grid; gap: 0.2rem; padding: 0.95rem 0 1rem; border-bottom: 1px solid var(--line); cursor: pointer; transition: padding 0.45s var(--ease-out), opacity 0.3s; }
.mood-grid .mood-card { border-top: 1px solid var(--line); border-bottom: 0; }
.choice-card::before, .mood-card::before { content: ""; position: absolute; left: 0; top: 0.95rem; bottom: 1rem; width: 0; background: var(--lamp); transition: width 0.45s var(--ease-out); }
.choice-card:hover, .mood-card:hover { padding-left: 0.9rem; }
.choice-card:hover::before, .mood-card:hover::before { width: 2px; }
:is(.choice-card, .mood-card):has(input:checked) { padding-left: 1.15rem; }
:is(.choice-card, .mood-card):has(input:checked)::before { width: 6px; }
.choice__label { font-size: 1.3rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.choice__hint { font-size: 0.9rem; color: var(--muted); }
:is(.choice-card, .mood-card):not(:has(input:checked)) .choice__label { color: color-mix(in srgb, var(--fg) 78%, transparent); }
/* The languages of the first screen: two columns of names, each written in its own language. */
.language-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 4vw, 3.5rem); border-top: 0; }
.language-grid .choice-card { border-top: 1px solid var(--line); border-bottom: 0; align-content: start; }
.language-note { margin: 2.2rem 0 0.9rem; color: var(--muted); }
.language-grid--more .choice__label { font-size: 1.05rem; font-weight: 400; }
.language-grid--more .choice-card { padding: 0.7rem 0 0.75rem; }
.language-grid--more .choice-card::before { top: 0.7rem; bottom: 0.75rem; }
.mood-card.is-disabled { opacity: 0.35; cursor: default; }
.mood-card.is-disabled:hover { padding-left: 0; }
.mood-card.is-disabled:hover::before { width: 0; }

/* Back / Continue */
.ob-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: clamp(2.4rem, 6vh, 4rem); padding-top: 1.4rem; border-top: 1px solid var(--line); }
.ob-actions--plain { border-top: 0; padding-top: 0; }
.ob-back { display: inline-flex; align-items: center; gap: 0.6em; min-height: 44px; color: var(--muted); font-size: 0.95rem; transition: color 0.25s; }
.ob-back:hover { color: var(--fg); }

/* What you have: links and words under the uploader */
.material { margin-top: 1rem; }
.material__group { margin-top: 3rem; }
.material__title { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.035em; margin-bottom: 1.6rem; }
.inspiration-rows { display: grid; gap: 1.2rem; margin-top: 2.2rem; }
.inspiration-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.2rem; align-items: start; }
.inspiration-row__num { padding-top: 1.75rem; color: var(--muted); }
.inspiration-row .ob-field + .ob-field { margin-top: 0; }
.inspiration-row .ob-field input { font-size: 1.1rem; }

/* The assistant's questions: Wizo speaks in grey, the visitor answers in ink. */
.clarify { margin-top: clamp(1.6rem, 4vh, 2.6rem); }
.clarify__opening { font-size: var(--step-1); line-height: 1.42; color: var(--muted); max-width: 44ch; }
.clarify__list { margin-top: 2.2rem; }
.clarify__q { display: grid; gap: 0.7rem; transition: opacity 0.18s, transform 0.18s; }
.clarify__q.is-leaving { opacity: 0; transform: translateY(-10px); }
.clarify__question { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.035em; line-height: 1.12; max-width: 24ch; }
.clarify__why { color: var(--muted); font-size: 0.95rem; max-width: 52ch; margin-bottom: 0.8rem; }
.clarify__count { color: var(--muted); font-stretch: 86%; font-size: 0.82rem; font-variant-numeric: tabular-nums; margin-left: auto; margin-right: 0.6rem; }
.clarify__ready { margin-top: 1.4rem; font-size: var(--step-1); }
.clarify--error .ob-actions { justify-content: flex-start; }
/* Thinking: three slots breathing. */
.clarify__dots { display: inline-flex; gap: 5px; margin-right: 0.9em; vertical-align: -0.1em; }
.clarify__dots i { width: 3px; height: 1em; background: var(--lamp); animation: slot-breathe 1.2s var(--ease-in-out) infinite; }
.clarify__dots i:nth-child(2) { animation-delay: 0.15s; }
.clarify__dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes slot-breathe { 0%, 100% { transform: scaleY(0.35); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* Reading it back: a specification sheet. */
.review { margin-top: clamp(2rem, 5vh, 3rem); display: grid; gap: 2.6rem; }
.review__title { font-stretch: 84%; font-weight: 600; font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); padding-bottom: 0.7rem; border-bottom: 1px solid var(--line-strong); }
.review__row { display: grid; grid-template-columns: minmax(8rem, 0.32fr) minmax(0, 1fr) auto; gap: 1.2rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.review__row dt { color: var(--muted); font-size: 0.92rem; }
.review__row dd { margin: 0; }
.review__edit { padding-inline: 0.6rem; margin-inline: -0.6rem; font-size: 0.86rem; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 0.25em; min-height: 44px; display: inline-flex; align-items: center; margin-block: -0.7rem; }
.review__edit:hover { color: var(--fg); }

/* The estimate: a title block. One figure, in ink, with the lamp beside it. */
.estimate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); margin-top: clamp(2rem, 5vh, 3rem); padding-block: 2rem; border-block: 1px solid var(--line-strong); }
.estimate__total { position: relative; margin-top: 0.8rem; padding-left: 1.4rem; font-size: clamp(3.6rem, 2rem + 6vw, 7rem); font-weight: 500; letter-spacing: -0.055em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.estimate__total::before { content: ""; position: absolute; left: 0; top: 0.12em; bottom: 0.1em; width: 6px; background: var(--lamp); }
.estimate__currency { font-size: 0.32em; letter-spacing: 0; margin-left: 0.35em; color: var(--muted); }
.estimate__range { margin-top: 1.2rem; color: var(--muted); max-width: 34ch; font-size: 0.95rem; }

/* The offer in two beats: what you pay to see the website, and what you pay to keep it. */
.twostep { display: grid; gap: 2.2rem; }
.twostep__later { padding-top: 1.8rem; border-top: 1px solid var(--line); }
.twostep__rest { margin-top: 0.7rem; padding-left: 1.4rem; font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--muted); }
.twostep__note { margin-top: 0.9rem; color: var(--muted); max-width: 34ch; font-size: 0.95rem; }
.twostep .caption { color: var(--fg); }
.register__terms { margin-top: 1rem; color: var(--muted); max-width: 42ch; }
.estimate__included ul { margin-top: 0.8rem; display: grid; }
.estimate__included li { padding: 0.62rem 0; border-bottom: 1px solid var(--line); font-size: 0.97rem; }
.estimate__creator { margin-top: 1rem; }
.register { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: end; margin-top: clamp(2rem, 5vh, 3.2rem); }
.register__title { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.035em; margin-bottom: 0.6rem; }
.register__form { display: flex; gap: 0.8rem; align-items: end; }
.register__form .input { flex: 1; font-size: 1.2rem; }
.register__alt { grid-column: 1 / -1; }

/* Registered */
.next-steps { margin-top: clamp(2rem, 5vh, 3rem); display: grid; border-top: 1px solid var(--line-strong); }
.next-steps li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0.6rem; padding: 0.95rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.next-steps li .mono { color: var(--accent-text); padding-top: 0.12em; }
.next-steps b { color: var(--fg); font-weight: 550; }
.promise { margin-top: 2.6rem; padding-left: 1.4rem; border-left: 6px solid var(--lamp); }
.promise__title { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; max-width: 22ch; }
.promise__examples { margin-top: 1rem; display: grid; gap: 0.3rem; color: var(--muted); }
.registered__estimate { margin-top: 2rem; }
.registered__actions { margin-top: 1.6rem; }
.registered__mail { margin-top: 1.4rem; }

/* Phones and narrow screens: the window becomes a band across the top. ------------- */
@media (max-width: 999px) {
  .window { position: relative; inset: auto; width: auto; height: clamp(10.5rem, 27svh, 16rem); }
  .window__view { top: 40%; }
  .window::before { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 1px; }
  .window::after { top: auto; bottom: 0; height: 3px; width: calc(var(--clear) * 1%); transition: width 1.2s var(--ease-out); }
  .page-flow .topbar { color: #f4f1eb; }
  .ob-stage { min-height: 0; padding: clamp(1.8rem, 5vh, 2.6rem) var(--gutter) 4rem; }
  .ob-title { margin-top: 1rem; }
  .mood-grid { grid-template-columns: 1fr; }
  .estimate, .register { grid-template-columns: 1fr; }
  .register__form { flex-wrap: wrap; }
  .register__form .input { flex-basis: 100%; }
  .inspiration-row { grid-template-columns: 1.6rem minmax(0, 1fr); }
  .inspiration-row .ob-field:last-child { grid-column: 2; }
  .review__row { grid-template-columns: minmax(0, 1fr) auto; }
  .review__row dt { grid-column: 1 / -1; }
  .ob-actions .btn { flex: 1; max-width: 16rem; }
}

/* How much should it move? Two opening screens, side by side. -------------------- */
.motion { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); }
.motion__option { position: relative; display: grid; gap: 1rem; align-content: start; }
.motion__input { position: absolute; opacity: 0; pointer-events: none; }
.motion__label { position: absolute; inset: 0; cursor: pointer; z-index: 3; }
.motion__body { position: relative; display: grid; gap: 0.3rem; padding-left: 0; transition: padding 0.45s var(--ease-out); }
.motion__body::before { content: ""; position: absolute; left: 0; top: 0.1rem; bottom: 0.1rem; width: 0; background: var(--lamp); transition: width 0.45s var(--ease-out); }
.motion__option:hover .motion__body { padding-left: 0.9rem; }
.motion__option:hover .motion__body::before { width: 2px; }
.motion__option:has(.motion__input:checked) .motion__body { padding-left: 1.15rem; }
.motion__option:has(.motion__input:checked) .motion__body::before { width: 6px; }
.motion__option:has(.motion__input:focus-visible) .mdemo { outline: 2px solid var(--accent-text); outline-offset: 4px; }
.motion__option:has(.motion__input:checked) .mdemo { outline: 2px solid var(--lamp); outline-offset: 4px; }
.motion__name { font-size: var(--step-2); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.motion__hint { color: var(--muted); font-size: 0.95rem; max-width: 38ch; }
.motion__price { margin-top: 0.4rem; color: var(--fg); }
.motion__recommended { color: var(--accent-text); }
.motion__tip { margin-top: 1.4rem; }

/* The demonstration: the visitor's own name on the opening screen of a site. */
.mdemo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #cfd1d4; container-type: inline-size; }
.mdemo__still, .mdemo__live { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
/* Clicks go through to the option's label; the engine listens on the whole option for the ripples. */
.mdemo__live { opacity: 0; transition: opacity 0.8s var(--ease-out); pointer-events: none; }
.mdemo.is-live .mdemo__live { opacity: 1; }
.mdemo__site { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-rows: auto 1fr; padding: 6cqw; color: var(--ink); pointer-events: none; }
.mdemo__brand { font-weight: 600; letter-spacing: -0.03em; font-size: clamp(0.62rem, 4.2cqw, 1.1rem); }
.mdemo__title { align-self: start; margin-top: 3cqw; font-size: clamp(0.8rem, 8.4cqw, 2.6rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.mdemo__title span { display: block; overflow: hidden; padding-bottom: 0.1em; }
.mdemo__title i { display: block; font-style: normal; }
/* Refined: the picture breathes, the words fade in softly. Nothing else. */
.mdemo--refined .mdemo__still { animation: refined-breathe 12s var(--ease-in-out) infinite alternate; }
.mdemo--refined .mdemo__title i { animation: refined-words 9s var(--ease-out) infinite; }
.mdemo--refined .mdemo__title span:nth-child(2) i { animation-delay: 0.25s; }
@keyframes refined-breathe { from { transform: scale(1); } to { transform: scale(1.045); } }
@keyframes refined-words { 0% { opacity: 0; transform: translateY(0.35em); } 12%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
/* Immersive: the place itself is alive (drawn by the engine); the words rise out of a mask. */
.mdemo--immersive .mdemo__title i { animation: immersive-words 9s var(--ease-out) infinite; }
.mdemo--immersive .mdemo__title span:nth-child(2) i { animation-delay: 0.12s; }
@keyframes immersive-words { 0% { transform: translateY(110%); } 14%, 84% { transform: none; } 96%, 100% { transform: translateY(-110%); } }

/* Help me choose */
.helper { margin-top: 2.4rem; border-top: 1px solid var(--line); }
.helper__toggle { display: flex; align-items: center; gap: 0.7em; min-height: 3.4rem; font-size: 1.05rem; font-weight: 500; letter-spacing: -0.02em; }
.helper__toggle span { transition: transform 0.4s var(--ease-out); }
.helper[data-open] .helper__toggle span { transform: rotate(180deg); }
.helper__panel { padding-bottom: 1.6rem; }
.helper__questions { display: grid; gap: 1.6rem; }
.helper__q { display: grid; gap: 0.7rem; }
.helper__question { font-weight: 500; letter-spacing: -0.015em; }
.helper__result { margin-top: 2rem; padding-left: 1.2rem; border-left: 6px solid var(--lamp); display: grid; gap: 0.35rem; }
.helper__verdict { font-size: var(--step-1); letter-spacing: -0.02em; }
.helper__why { color: var(--muted); max-width: 52ch; }


.page-flow .callout { margin-top: 1.6rem; }

@media (max-width: 999px) {
  .motion { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
  .motion__name { font-size: 1.3rem; }
  .motion__hint { font-size: 0.86rem; }
}
