/* Dawn Designs style quiz (/style-quiz/). Mirrors /ai-design/ai-design.css so both tools feel like the same site:
   colours and type from /css/tokens.css (DM Serif Display + DM Sans), Fraunces only for the opening headline. */

:root {
  --gutter: clamp(16px, 4vw, 56px);
  --hair: color-mix(in srgb, var(--ink) 16%, transparent);
  --dawn-text: color-mix(in srgb, var(--dawn) 55%, var(--ink));
  --paper: color-mix(in srgb, var(--linen) 55%, white);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--linen); padding: 10px 14px; z-index: 10; }
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--dawn); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

/* ------------------------------------------------------------------ top bar */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--hair);
}
.top__brand img { width: 96px; height: auto; }
.top__nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); font-weight: 600; font-size: 14px; }
.top__nav a { text-decoration: none; }
.top__nav a:hover { color: var(--dawn-text); }
.top__cta { border: 1px solid var(--ink); border-radius: 999px; padding: 9px 18px; white-space: nowrap; }
.top__cta:hover { background: var(--ink); color: var(--linen) !important; }
@media (max-width: 420px) { .top__nav a[href="/"] { display: none; } }

/* ------------------------------------------------------------------ type */
.eyebrow {
  display: flex; align-items: center; gap: 12px; margin: 0 0 18px;
  font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--dawn-text);
}
.eyebrow .rule { width: 32px; height: 1px; background: currentColor; }
.display {
  font-family: var(--font-display); font-weight: 400; letter-spacing: -.015em; line-height: 1.02; margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
}
.intro .display { font-family: 'Fraunces', Georgia, serif; font-weight: 340; font-variation-settings: 'opsz' 144; letter-spacing: -.025em; font-size: clamp(3rem, 8vw, 6.2rem); }
.intro .display em { font-weight: 300; }
.display em { font-style: italic; color: var(--dawn); }
.display--md { font-size: clamp(2rem, 4.4vw, 3.6rem); }
.display--sm { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.lede { max-width: 40rem; font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--ink-soft); margin: 22px 0 0; }
.note { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }
.kicker { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--dawn-text); }

/* ------------------------------------------------------------------ layout */
main { padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1px solid var(--ink);
  font: 700 15px/1.2 var(--font-body); text-decoration: none; cursor: pointer; text-align: center;
  transition: background .2s, color .2s, opacity .2s, border-color .2s;
}
.btn--solid { background: var(--ink); color: var(--linen); }
.btn--solid:hover { background: var(--dawn); border-color: var(--dawn); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--linen); }
.btn[disabled] { opacity: .5; cursor: wait; }
.link { background: none; border: 0; padding: 0; font: 600 14px var(--font-body); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link[disabled] { opacity: .35; cursor: default; text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 24px; }
@media (max-width: 599px) { .actions .btn { width: 100%; } .actions .link { margin: 6px auto 0; } }

/* ------------------------------------------------------------------ 1 · intro */
.intro {
  display: grid; gap: clamp(36px, 5vw, 72px); align-items: center;
  padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 96px);
}
@media (min-width: 980px) { .intro { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.how { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.how li { display: flex; align-items: center; gap: 12px; }
.how strong { font-weight: 700; margin-right: 4px; }
.how__icon {
  width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--hair); background: var(--paper);
}
.how__icon svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.how__icon--love svg { fill: var(--dawn); stroke: var(--dawn); }
.intro__actions { margin-top: 32px; }
.intro__actions .note { max-width: 30rem; margin-top: 14px; }

/* three cards fanned out, decorative (filled in by style-quiz.js) */
.fan { position: relative; width: min(86%, 520px); aspect-ratio: 5 / 4; margin: 0 auto; }
@media (min-width: 980px) { .fan { width: min(100%, 520px); } }
.fan:empty { display: none; }
.fan__card {
  position: absolute; inset: 8% 10%; margin: 0; overflow: hidden; border-radius: 16px; background: var(--sand);
  box-shadow: 0 18px 40px -18px rgb(31 26 22 / .45);
  transform-origin: 50% 110%;
}
.fan__card img { width: 100%; height: 100%; object-fit: cover; }
.fan__card:nth-child(1) { transform: rotate(-9deg) translateX(-8%); }
.fan__card:nth-child(2) { transform: rotate(7deg) translateX(9%); }
.fan__card:nth-child(3) { transform: translateY(-3%); }
.fan .tag { left: 12px; bottom: 12px; }

/* the small "AI-generated inspiration" label, on every picture */
.tag {
  position: absolute; left: 14px; bottom: 14px; z-index: 2; pointer-events: none;
  background: rgb(18 22 31 / .72); color: var(--linen); backdrop-filter: blur(6px);
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1;
  padding: 7px 11px; border-radius: 999px;
}

/* ------------------------------------------------------------------ 2 · quiz */
.quiz { max-width: 760px; margin: 0 auto; padding: clamp(16px, 3vw, 32px) 0 clamp(40px, 6vw, 72px); }
.quiz__bar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.quiz__count { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; font-variant-numeric: tabular-nums; }
.quiz__progress { flex: 1; height: 1px; background: var(--hair); position: relative; }
.quiz__progress span { position: absolute; inset: 0 auto 0 0; width: 0; height: 2px; top: -.5px; background: var(--dawn); transition: width .35s var(--ease-out); }

.deck { position: relative; aspect-ratio: 1 / 1; user-select: none; -webkit-user-select: none; }
@media (min-width: 600px) { .deck { aspect-ratio: 4 / 3; } }
.card {
  position: absolute; inset: 0; margin: 0; overflow: hidden; border-radius: 18px; background: var(--sand);
  box-shadow: 0 1px 0 rgb(31 26 22 / .06), 0 22px 44px -26px rgb(31 26 22 / .55);
  touch-action: pan-y; cursor: grab; will-change: transform; transform-origin: 50% 100%;
  transition: transform .45s var(--ease-out), opacity .3s;
}
.card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.card[data-depth="1"] { transform: translateY(14px) scale(.955); cursor: default; }
.card[data-depth="2"] { transform: translateY(28px) scale(.91); cursor: default; opacity: .9; }
.card[data-depth="1"]::after, .card[data-depth="2"]::after { content: ''; position: absolute; inset: 0; background: rgb(243 237 228 / .18); }
.card.is-dragging { transition: none; cursor: grabbing; }
.card.is-leaving { pointer-events: none; transition: transform .42s var(--ease-in-out), opacity .42s; }
.card .tag { left: 14px; bottom: 14px; }

/* "Love it" / "Not for me" stamps that fade in while dragging */
.stamp {
  position: absolute; top: 18px; z-index: 2; padding: 8px 14px; border-radius: 999px; border: 2px solid;
  font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; line-height: 1;
  opacity: 0; pointer-events: none; background: rgb(243 237 228 / .9);
}
.stamp--love { left: 18px; color: var(--dawn-text); border-color: var(--dawn); transform: rotate(-8deg); }
.stamp--nope { right: 18px; color: var(--ink); border-color: var(--ink); transform: rotate(8deg); }

.quiz__controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.vote {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--ink); font: 700 16px/1 var(--font-body); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.vote svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.vote--nope { background: transparent; color: var(--ink); }
.vote--nope:hover { background: var(--ink); color: var(--linen); }
.vote--love { background: var(--ink); color: var(--linen); }
.vote--love svg { fill: var(--dawn); stroke: var(--dawn); }
.vote--love:hover { background: var(--dawn); border-color: var(--dawn); }
.vote--love:hover svg { fill: var(--linen); stroke: var(--linen); }
.vote:active { transform: scale(.97); }
.vote[disabled] { opacity: .5; cursor: default; }
.quiz__hint { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--ink-soft); }
@media (hover: none) { .quiz__hint { display: none; } }

/* ------------------------------------------------------------------ 3 · results */
.results, .none { padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.results__head .lede { max-width: 46rem; }
.results__grid {
  display: grid; gap: clamp(16px, 2vw, 24px); margin-top: clamp(32px, 5vw, 56px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 980px) { .results__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } }
.style-card, .mini { background: var(--paper); border: 1px solid var(--hair); border-radius: 16px; }
.style-card { padding: clamp(22px, 3vw, 36px); }
.style-card__name { font: 400 clamp(2rem, 3.6vw, 3rem)/1.05 var(--font-display); margin: 0 0 14px; }
.style-card__about { margin: 0; font-size: 1.05rem; max-width: 40rem; }
.facts { margin: 24px 0 0; display: grid; gap: 0; }
.facts div { padding: 14px 0; border-top: 1px solid var(--hair); display: grid; gap: 4px; }
@media (min-width: 600px) { .facts div { grid-template-columns: 11rem minmax(0, 1fr); gap: 16px; } }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding-top: 3px; }
.facts dd { margin: 0; color: var(--ink-soft); }
.results__side { display: grid; gap: clamp(16px, 2vw, 24px); }
.mini { padding: 20px 22px; }
.mini p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.mini .kicker { color: var(--dawn-text); font-size: 11px; }
.mini__name { font: 400 1.6rem/1.1 var(--font-display); margin: 0 0 8px; }
.mini--finish { display: flex; gap: 18px; align-items: flex-start; }
.finish-chip {
  width: 64px; height: 78px; flex: none; border-radius: 10px; background: var(--chip, var(--oak)) center / cover;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14);
}
.palette { list-style: none; margin: 10px 0 0; padding: 0; display: flex; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--hair); }
.palette li { flex: 1; min-width: 0; height: 64px; position: relative; background: var(--c); }
.palette span {
  position: absolute; left: 50%; bottom: 6px; translate: -50% 0; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  color: var(--on); white-space: nowrap;
}
@media (max-width: 380px) { .palette span { font-size: 9px; letter-spacing: 0; } }

/* mood board: liked rooms + palette, also drawn to a canvas for "Save my mood board" */
.board-wrap { margin-top: clamp(48px, 7vw, 88px); padding-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--hair); }
.board-wrap__head { display: grid; gap: 8px; margin-bottom: 22px; }
@media (min-width: 980px) { .board-wrap__head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } .board-wrap__head .note { justify-self: end; max-width: 26rem; text-align: right; } }
.board { position: relative; margin: 0; padding: clamp(10px, 1.4vw, 16px); background: var(--paper); border: 1px solid var(--hair); border-radius: 18px; }
/* tile layouts by number of liked rooms (data-n, 1-6): the first room is the big one */
.board__tiles {
  --cols: 2; --row: clamp(104px, 27vw, 200px);
  display: grid; gap: clamp(6px, 1vw, 12px);
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: var(--row);
}
.board__tiles figure { position: relative; margin: 0; overflow: hidden; border-radius: 10px; background: var(--sand); }
.board__tiles img { width: 100%; height: 100%; object-fit: cover; }
.board__tiles figure:first-child { grid-column: span 2; grid-row: span 2; }
.board__tiles[data-n="1"] { --cols: 1; }
.board__tiles[data-n="1"] figure:first-child { grid-column: span 1; }
.board__tiles[data-n="2"] figure { grid-column: span 1; grid-row: span 2; }
.board__tiles[data-n="4"] figure:first-child, .board__tiles[data-n="6"] figure:first-child { grid-column: span 1; grid-row: span 1; }
@media (min-width: 760px) {
  .board__tiles { --cols: 3; --row: clamp(120px, 15vw, 220px); }
  .board__tiles[data-n="1"] { --cols: 1; }
  .board__tiles[data-n="1"] figure:first-child { grid-row: span 3; }
  .board__tiles[data-n="2"] { --cols: 2; }
  .board__tiles[data-n="4"] figure:first-child { grid-column: span 2; grid-row: span 3; }
  .board__tiles[data-n="5"] { --cols: 4; }
  .board__tiles[data-n="6"] figure:first-child { grid-column: span 2; grid-row: span 2; }
}
.board__palette { list-style: none; margin: clamp(6px, 1vw, 12px) 0 0; padding: 0; display: flex; gap: clamp(6px, 1vw, 12px); }
.board__palette li { flex: 1; height: clamp(28px, 4vw, 44px); border-radius: 8px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); }
.board__tag { position: absolute; right: clamp(18px, 2.4vw, 28px); top: clamp(18px, 2.4vw, 28px); left: auto; bottom: auto;
  background: rgb(18 22 31 / .72); color: var(--linen); backdrop-filter: blur(6px);
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1; padding: 7px 11px; border-radius: 999px; }
@media (max-width: 599px) { .board__tag-brand { display: none; } }

/* ------------------------------------------------------------------ 4 · send */
.send {
  display: grid; gap: clamp(24px, 4vw, 56px); padding: clamp(48px, 7vw, 96px) 0;
  border-top: 1px solid var(--hair);
}
@media (min-width: 980px) { .send { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.send__head .display { margin-bottom: 18px; }
.send__head p:last-child { color: var(--ink-soft); max-width: 30rem; }
.enquiry { display: grid; gap: 18px; align-content: start; }
.enquiry .btn { justify-self: start; }
.field { display: grid; }
.field > label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.opt { font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--ink-soft); }
textarea, input {
  width: 100%; font: inherit; color: inherit;
  background: var(--paper);
  border: 1px solid var(--hair); border-radius: 10px; padding: 12px 14px;
}
textarea { resize: vertical; min-height: 88px; }
textarea:focus, input:focus { outline: none; border-color: var(--ink); }
.enquiry .note.is-error { padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--dawn) 12%, var(--linen)); color: var(--ink); font-size: 14px; }
.sent { align-self: start; padding: 22px 24px; border-left: 2px solid var(--dawn); background: color-mix(in srgb, var(--sand) 55%, var(--linen)); }
.sent__title { font: 400 1.8rem/1.1 var(--font-display); margin: 0 0 8px; }
.sent p:last-child { margin: 0; color: var(--ink-soft); }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 22px var(--gutter); border-top: 1px solid var(--hair); font-size: 13px; color: var(--ink-soft);
}
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .card, .card.is-leaving, .quiz__progress span, .btn, .vote { transition: none; }
}
