:root {
  --bg: #f5f5f5;
  --card: #ffffff;
  --field: #ffffff;
  --ink: #0c0c0c;
  --muted: #6b6b6b;
  --line: #e3e3e3;
  --line-hi: #b9b9b9;
  --accent: #0c0c0c;
  --accent-soft: #f0f0f0;
  --on-accent: #ffffff;
  --err: #d32f2f;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Faint, greyed-out video behind everything */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg); }
.bg video { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); opacity: 0; transition: opacity 1.6s ease; }
.bg video.on { opacity: .14; }
.bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(245, 245, 245, .3), rgba(245, 245, 245, .55)); }

.shell { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 16px; }

/* Sticky header with the progress bar */
.stick { position: sticky; top: 0; z-index: 20; margin: 0 -16px; padding: 0 16px; background: rgba(245, 245, 245, .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 10px; padding-top: max(12px, env(safe-area-inset-top)); }
.brand img { display: block; height: 32px; width: auto; }
.right { display: flex; align-items: center; gap: 12px; }
.count { font-weight: 700; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lang { display: inline-flex; background: #e6e6e6; border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: transparent; padding: 8px 14px; min-height: 34px; border-radius: 999px; font-weight: 700; font-size: 13px; letter-spacing: .04em; color: var(--muted); min-width: 46px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.progress { height: 3px; background: #e3e3e3; margin: 0 -16px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--ink); transition: width .4s ease; }

main { flex: 1; display: flex; flex-direction: column; padding-bottom: 8px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 14px 0 max(18px, env(safe-area-inset-bottom)); }

.step { flex: 1; display: flex; flex-direction: column; animation: rise .4s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Welcome page */
.form { display: grid; gap: 14px; padding: 24px 0 10px; animation: rise .4s ease both; }
.hero { overflow: hidden; border-radius: 28px; margin-top: 10px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1.5px solid var(--line); animation: rise .5s ease both; }
.hero-photo { aspect-ratio: 3 / 2; background: #111; }
.hero-photo.is-video { width: 100%; aspect-ratio: 5 / 4; max-height: 46vh; }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-photo video { display: block; width: 100%; height: 100%; object-fit: contain; background: #111; }
.hero-in { padding: 26px 22px 26px; text-align: center; }
h1 { font-size: clamp(28px, 8.4vw, 44px); line-height: 1.1; margin: 0 0 14px; letter-spacing: 0; font-weight: 800; text-transform: uppercase; }
.lead { color: #3a3a3a; font-size: 17px; margin: 0 auto 16px; max-width: 34em; }
.meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 14px; font-weight: 600; margin: 0 0 22px; justify-content: center; }
.meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.hero-cta { width: 100%; }

/* Question cards */
.qcard { background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1.5px solid var(--line); border-radius: 22px; padding: 24px 20px; scroll-margin-top: 100px; transition: border-color .25s, opacity .55s ease, transform .55s ease; }
.qcard.reveal { opacity: 0; transform: translateY(22px); }
.qcard.reveal.in { opacity: 1; transform: none; }
.qcard.answered { border-color: var(--ink); }
.qcard.invalid { border-color: var(--err); }
.qcard h2 { font-size: clamp(19px, 5vw, 23px); line-height: 1.3; margin: 0 0 8px; letter-spacing: -.01em; }
.qnum { color: var(--muted); margin-right: 8px; font-weight: 800; }
.opt { font-weight: 600; font-size: 12px; color: var(--muted); background: #efefef; border-radius: 999px; padding: 2px 9px; vertical-align: middle; margin-left: 6px; letter-spacing: 0; }
.hint { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.card { background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1.5px solid var(--line); border-radius: 24px; padding: 28px 22px; flex: 1; }
.eyebrow { color: var(--muted); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
h2 { font-size: clamp(22px, 5.4vw, 28px); line-height: 1.2; margin: 0 0 8px; letter-spacing: -.015em; }

/* Choices */
.choices { display: grid; gap: 10px; margin-top: 12px; }
.choice { position: relative; display: flex; align-items: center; gap: 14px; padding: 15px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--field); cursor: pointer; min-height: 56px; transition: border-color .15s, background .15s, transform .15s; -webkit-tap-highlight-color: transparent; }
.choice:hover { border-color: var(--line-hi); }
.choice:active { transform: scale(.99); }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice .mark { flex: none; width: 22px; height: 22px; border: 2px solid #a8a8a8; border-radius: 50%; display: grid; place-items: center; transition: .15s; }
.choice.multi .mark { border-radius: 6px; }
.choice .mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--on-accent); transform: scale(0); transition: transform .15s; }
.choice.multi .mark::after { width: 6px; height: 11px; border-radius: 0; background: none; border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0) translate(-1px, -1px); }
.choice.checked { border-color: var(--ink); background: var(--accent-soft); }
.choice.checked .mark { background: var(--ink); border-color: var(--ink); }
.choice.checked .mark::after { transform: scale(1); }
.choice.multi.checked .mark::after { transform: rotate(45deg) scale(1) translate(-1px, -1px); }
.choice input:focus-visible ~ .mark { outline: 3px solid var(--ink); outline-offset: 3px; }
.choice .label { font-weight: 500; line-height: 1.3; }

/* Rating stars */
.stars { display: flex; justify-content: space-between; gap: 6px; margin: 18px 0 8px; }
.star { flex: 1; border: 0; background: transparent; padding: 6px 0; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.star svg { width: min(56px, 15vw); height: auto; fill: #dcdcdc; transition: fill .15s, transform .15s; }
.star.on svg { fill: var(--ink); }
.star:active svg { transform: scale(.88); }
.scale-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }

/* 0-10 scale */
.nps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 18px 0 10px; }
.nps button { aspect-ratio: 1; min-height: 48px; border: 1.5px solid var(--line); background: var(--field); border-radius: 12px; font-weight: 700; font-size: 18px; transition: .15s; }
.nps button:hover { border-color: var(--line-hi); }
.nps button.on { background: var(--ink); color: var(--on-accent); border-color: var(--ink); }
@media (min-width: 560px) { .nps { grid-template-columns: repeat(11, 1fr); gap: 6px; } .nps button { font-size: 16px; min-height: 0; } }

/* Rating grid */
.matrix { display: grid; gap: 4px; margin-top: 10px; }
.mrow { padding: 12px 0; border-top: 1px solid var(--line); }
.mrow:first-child { border-top: 0; }
.mrow .name { font-weight: 600; margin-bottom: 8px; }
.dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.dots button { height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--field); font-weight: 700; transition: .15s; }
.dots button:hover { border-color: var(--line-hi); }
.dots button.on { background: var(--ink); color: var(--on-accent); border-color: var(--ink); }

/* Fields */
.field { display: block; margin-top: 16px; }
.field span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.input, textarea.input { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--field); color: var(--ink); font-size: 17px; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: #767676; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0, 0, 0, .1); }
textarea.input { min-height: 140px; resize: vertical; line-height: 1.45; margin-top: 10px; }
.qcard textarea.comment-box { min-height: 96px; margin-top: 14px; }
.other-input { margin-top: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--err); font-weight: 600; font-size: 14px; min-height: 22px; margin: 12px 0 0; }
.center-text { text-align: center; }
.submit-row { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 4px; }
.submit-row .btn { width: 100%; }

/* Buttons */
.btn { border: 0; border-radius: 999px; min-height: 58px; padding: 0 28px; font-weight: 800; font-size: 18px; background: var(--ink); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; transition: transform .1s, background .15s, opacity .15s; }
.btn:hover { background: #2a2a2a; }
.btn:active { transform: scale(.98); }
.btn.grow { flex: 1; }
.btn[disabled] { opacity: .6; cursor: wait; }
.hero-cta .arrow { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .hero-cta .arrow { animation: none; } .qcard.reveal { opacity: 1; transform: none; } .step, .hero, .form { animation: none; } }

/* Thank-you and message screens */
.center { text-align: center; display: grid; place-items: center; align-content: center; gap: 4px; }
.badge { width: 84px; height: 84px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 14px; box-shadow: 0 0 0 10px rgba(0, 0, 0, .04); }
.badge svg { width: 40px; height: 40px; stroke: var(--ink); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.loading { margin: 80px auto; width: 34px; height: 34px; border: 4px solid #ddd; border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confetti i { position: absolute; top: -24px; width: 10px; height: 16px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(112vh) rotate(720deg); } }

@media (min-width: 640px) { .qcard { padding: 28px 30px; } .hero-in { padding: 30px 32px 32px; } .card { padding: 40px 38px; } }
