/* ==========================================================================
   USEN EFIK feedback survey
   Palette: warm night + Efik gold (taken from the 2024 results deck)
   ========================================================================== */
:root {
  --bg: #120e09;
  --bg-2: #1b1510;
  --card: #241b11;
  --line: rgba(240, 216, 150, .16);
  --line-strong: rgba(240, 216, 150, .42);
  --gold: #d6b25e;
  --gold-2: #f0d896;
  --gold-deep: #a8842f;
  --cream: #f7efdc;
  --muted: #b8aa8c;
  --terra: #d4623f;
  --ok: #4aa37a;
  --err: #ffa58d;
  --radius: 18px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--cream);
  font: 400 1.0625rem/1.55 var(--font-body);
  overflow-x: hidden;
}

/* ---------- Background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(214, 178, 94, .20), transparent 62%),
    radial-gradient(760px 560px at -12% 108%, rgba(212, 98, 63, .15), transparent 62%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23d6b25e' stroke-opacity='.075'%3E%3Cpath d='M32 4 60 32 32 60 4 32Z'/%3E%3Cpath d='M32 19 45 32 32 45 19 32Z'/%3E%3C/g%3E%3C/svg%3E"),
    var(--bg);
}

.confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* ---------- Layout ---------- */
.app {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: max(20px, env(safe-area-inset-top)) 0 8px;
}

.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-mark { color: var(--gold); font-size: .9rem; }
.brand-name { font-weight: 600; letter-spacing: .22em; font-size: .8rem; text-transform: uppercase; }
.brand-name b { color: var(--gold-2); font-weight: 600; }

.progress { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 320px; margin-left: auto; }
.progress-track { flex: 1; height: 8px; border-radius: 99px; background: rgba(240, 216, 150, .14); overflow: hidden; }
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-2));
  transition: width .5s var(--ease);
}
.progress-text { min-width: 4.6em; text-align: right; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 0 132px;
}
.survey { width: 100%; }

.foot { padding: 16px 0 28px; text-align: center; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(184, 170, 140, .55); }

/* ---------- Screens (everything is visible without JS; the stepper only exists with JS) ---------- */
.screen { padding: 22px 0 8px; }
.screen + .screen { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 34px; }

.js .screen { display: none; border: 0; margin: 0; padding-top: 22px; }
.js .screen.is-active { display: block; }
.js .screen.from-fwd  { animation: in-fwd .5s var(--ease) both; }
.js .screen.from-back { animation: in-back .5s var(--ease) both; }

@keyframes in-fwd  { from { opacity: 0; transform: translateX(36px); }  to { opacity: 1; transform: none; } }
@keyframes in-back { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }

.js-only { display: none; }
.js .actions.js-only { display: flex; }
.js .stepnav.js-only { display: flex; }
.js .counter.js-only { display: block; }

/* ---------- Type ---------- */
.eyebrow, .q-count {
  margin: 0 0 14px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.q-count span { color: var(--muted); letter-spacing: .14em; }

.hero-title {
  margin: 0 0 18px;
  font: 800 clamp(2.3rem, 9vw, 4rem)/1.04 var(--font-display);
  letter-spacing: -.02em;
  outline: none;
}
.hero-title em { font-style: italic; font-weight: 600; color: var(--gold-2); }
.hero-title--sm { font-size: clamp(2.2rem, 8vw, 3.4rem); }

.lead { margin: 0 0 22px; font-size: 1.15rem; color: #e6dcc3; max-width: 36em; }

.q-title {
  margin: 0 0 10px;
  font: 700 clamp(1.6rem, 5.6vw, 2.5rem)/1.16 var(--font-display);
  letter-spacing: -.012em;
  outline: none;
  text-wrap: balance;
}
.q-hint { margin: 0 0 6px; color: var(--muted); }
.fine { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }

.callout {
  margin: 0 0 22px;
  padding: 18px 20px;
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(214, 178, 94, .12), rgba(214, 178, 94, .02));
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout h2 { margin: 0 0 6px; font: 600 1.25rem var(--font-display); color: var(--gold-2); }
.callout p { margin: 0; color: #e6dcc3; }

.benefits-title { margin: 0 0 8px; color: var(--muted); }
.benefits { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.benefits li { position: relative; padding-left: 30px; }
.benefits li::before {
  content: '';
  position: absolute; left: 2px; top: .38em;
  width: 16px; height: 9px;
  border-left: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold);
  transform: rotate(-45deg) scale(.9);
}
.thanks-line { margin: 0 0 26px; color: var(--muted); }

/* ---------- Answer options ---------- */
.opts { display: grid; gap: 12px; margin-top: 22px; }
.opts--chips { grid-template-columns: 1fr; }
@media (min-width: 600px) { .opts--chips { grid-template-columns: 1fr 1fr; } }

.opt { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.opt-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }

.opt-face {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 14px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .25s;
}
.opt:hover .opt-face { border-color: var(--line-strong); transform: translateY(-2px); }
.opt:active .opt-face { transform: scale(.985); }
.opt-input:focus-visible + .opt-face { outline: 3px solid var(--gold-2); outline-offset: 3px; }
.opt-input:checked + .opt-face {
  border-color: var(--gold);
  background: linear-gradient(180deg, #3b2d17, #2b2113);
  box-shadow: 0 0 0 1px var(--gold), 0 14px 34px -14px rgba(214, 178, 94, .55);
}

.opt-ico { font-size: 1.7rem; line-height: 1; flex: none; transition: transform .3s var(--ease); }
.opt-input:checked + .opt-face .opt-ico { animation: pop .5s var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(-6deg); } 100% { transform: scale(1.1); } }

.opt-label { font-weight: 500; font-size: 1.08rem; }
.opt-key {
  margin-left: auto;
  min-width: 24px; padding: 1px 7px;
  text-align: center;
  font-size: .75rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px;
}
@media (hover: none) { .opt-key { display: none; } }

/* tick bubble: round for single choice, rounded square for multi */
.opt-check {
  order: -1;
  flex: none;
  width: 24px; height: 24px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.opts--chips .opt-check { border-radius: 8px; }
.opt-check::after {
  content: '';
  width: 11px; height: 6px;
  margin-top: -2px;
  border-left: 2.5px solid #1a1206; border-bottom: 2.5px solid #1a1206;
  transform: rotate(-45deg) scale(0);
  transition: transform .25s var(--ease);
}
.opt-input:checked + .opt-face .opt-check { background: var(--gold); border-color: var(--gold); }
.opt-input:checked + .opt-face .opt-check::after { transform: rotate(-45deg) scale(1); }

/* emoji scale cards: rows on phones, columns on wider screens, no tick bubble */
.opts--scale .opt-check { display: none; }
.opts--scale .opt-ico { order: -1; }
@media (min-width: 600px) {
  .opts--scale.n4 { grid-template-columns: repeat(4, 1fr); }
  .opts--scale.n5 { grid-template-columns: repeat(5, 1fr); }
  .opts--scale .opt-face { flex-direction: column; justify-content: center; text-align: center; min-height: 148px; gap: 10px; padding: 18px 8px; }
  .opts--scale .opt-ico { font-size: 2.4rem; }
  .opts--scale .opt-label { font-size: 1rem; }
  .opts--scale .opt-key { position: absolute; top: 9px; right: 9px; margin: 0; }
}

/* "Other" text box */
.other-wrap { margin-top: 14px; }
.js .other-wrap { display: none; }
.js .other-wrap.is-open { display: block; animation: in-fwd .35s var(--ease) both; }

/* ---------- Fields ---------- */
.field { display: block; margin-top: 18px; position: relative; }
.field-label { display: block; margin-bottom: 8px; font-weight: 500; }
.field-label i { color: var(--muted); font-style: normal; font-weight: 400; }
.field-row { display: grid; gap: 0 18px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }

input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 14px 16px;
  color: var(--cream);
  font: inherit;
  background: rgba(0, 0, 0, .28);
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 130px; }
input::placeholder, textarea::placeholder { color: rgba(184, 170, 140, .6); }
input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(214, 178, 94, .22);
}
.counter { display: none; margin-top: 6px; text-align: right; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Errors ---------- */
.err { margin: 14px 0 0; color: var(--err); font-weight: 500; }
.err:empty { display: none; }
.screen.has-error .opts { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.banner {
  margin: 0 0 18px; padding: 14px 18px;
  background: rgba(212, 98, 63, .16);
  border: 1.5px solid rgba(212, 98, 63, .55);
  border-radius: 14px; color: #ffd9cd;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 13px 26px;
  border: 0; border-radius: 999px;
  font: 600 1rem var(--font-body);
  cursor: pointer;
  transition: transform .2s var(--ease), filter .2s, box-shadow .2s, background .2s;
}
.btn--primary {
  color: #1a1206;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 12px 28px -12px rgba(214, 178, 94, .75);
}
.btn--primary:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn--primary:active { transform: translateY(0) scale(.98); }
.btn--ghost { color: var(--cream); background: rgba(0, 0, 0, .25); border: 1.5px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--gold); }
.btn--lg { min-height: 56px; padding: 15px 32px; font-size: 1.08rem; margin-top: 22px; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn:focus-visible, .link-btn:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; }

.link-btn {
  background: none; border: 0; padding: 6px 2px;
  color: var(--gold-2); font: 500 .95rem var(--font-body);
  text-decoration: underline; text-underline-offset: 4px;
  cursor: pointer;
}
.actions { flex-direction: column; align-items: flex-start; gap: 10px; }
.hint { margin: 0; color: var(--muted); font-size: .92rem; }

/* fixed Back / Next bar */
.stepnav {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: 780px; margin: 0 auto;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  justify-content: space-between; gap: 12px;
  background: linear-gradient(to top, var(--bg) 62%, rgba(18, 14, 9, 0));
  z-index: 10;
}

/* ---------- Thank-you ---------- */
.screen--thanks { text-align: center; padding-top: 30px; }
.screen--thanks .lead { margin-left: auto; margin-right: auto; }
.tick { display: block; margin: 0 auto 18px; }
.tick-ring { stroke: var(--gold); stroke-dasharray: 214; stroke-dashoffset: 214; animation: draw .8s .1s var(--ease) forwards; }
.tick-mark { stroke: var(--gold-2); stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .65s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.js .screen--thanks.is-active { display: block; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .tick-ring, .tick-mark { stroke-dashoffset: 0; }
}

/* typed-answer questions */
.field--answer { margin-top: 22px; }
