/* =========================================================
   Summertime in Prague — character-fit quiz
   Builds on ../css/styles.css (tokens: --paper, --ink,
   --ink-soft, --ink-faint, --wine, --line, --serif, --sans, --ease)
   ========================================================= */

.quiz { background: var(--paper); color: var(--ink); min-height: 100vh; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- NAV (solid on paper) ---------- */
.pnav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  /* Clear the phone status bar / notch (safe-area) and keep breathing room. */
  padding: calc(1.5rem + env(safe-area-inset-top, 0px))
           clamp(1.25rem, 5vw, 3.5rem) 1.5rem;
  color: var(--ink);
}
.pnav__home {
  font-family: var(--sans); font-weight: 500;
  letter-spacing: 0.42em; text-indent: 0.42em; font-size: 1.05rem;
}
.pnav__tag {
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Buttons (shared look with the beta page) ---------- */
.pbtn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 1rem 2rem; border-radius: 100px; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  text-decoration: none;
}
.pbtn--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pbtn--dark:hover { background: var(--wine); border-color: var(--wine); transform: translateY(-2px); }
.pbtn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ---------- Layout ---------- */
.qwrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(6rem, 14vh, 9rem) clamp(1.25rem, 5vw, 3.5rem) clamp(3rem, 8vh, 5rem);
}
.qcard { width: 100%; max-width: 640px; margin: 0 auto; }

/* Each step fades in when shown */
.qstep { animation: qIn 0.6s var(--ease) both; }
@keyframes qIn { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .qstep { animation: none; } }

/* ---------- Shared type ---------- */
.qeyebrow {
  font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 1.1rem;
}
.qtitle {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: 0.98; letter-spacing: -0.02em;
}
.qlead {
  color: var(--ink-soft); font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  line-height: 1.6; margin-top: 1.4rem; max-width: 52ch;
}

/* ---------- Intro form ---------- */
.qintro { margin-top: 2.4rem; }
.qfield { display: grid; gap: 0.5rem; margin-bottom: 1.5rem; }
.qfield label, .qfield__label {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint);
}
.qfield input {
  font-family: var(--sans); font-size: 1.05rem; font-weight: 300; color: var(--ink);
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  padding: 0.55rem 0; border-radius: 0;
}
.qfield input:focus { outline: none; border-bottom-color: var(--ink); }

.qstatus { min-height: 1.2em; margin: 0.2rem 0 1rem; font-size: 0.9rem; color: var(--wine); }
.qbegin { width: 100%; }

/* ---------- Preference step ---------- */
.qprefs { display: grid; gap: 0.7rem; margin-top: 0.4rem; }
.qpref {
  display: flex; flex-direction: column; gap: 0.3rem; width: 100%; text-align: left;
  background: transparent; border: 1px solid var(--line); border-radius: 14px;
  padding: 1.1rem 1.3rem; cursor: pointer; color: var(--ink);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.qpref:hover { border-color: var(--ink-faint); background: rgba(25,21,18,0.02); }
.qpref.is-picked { border-color: var(--wine); background: rgba(122,46,43,0.06); }
.qpref__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
.qnote {
  margin: 1.5rem 0 0; font-size: 0.85rem; line-height: 1.6; color: var(--ink-faint); max-width: 48ch;
}

/* ---------- Question step ---------- */
.qprogress { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.qprogress__count {
  font-size: 0.72rem; letter-spacing: 0.22em; color: var(--ink-faint); white-space: nowrap;
}
.qprogress__track { flex: 1; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.qprogress__track span {
  position: absolute; left: 0; top: 0; bottom: 0; background: var(--wine);
  transition: width 0.5s var(--ease);
}
.qquestion {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.16; letter-spacing: -0.01em;
  margin-bottom: 1.8rem;
}

.qoptions { display: grid; gap: 0.7rem; }
.qopt {
  display: flex; align-items: flex-start; gap: 0.9rem; width: 100%; text-align: left;
  background: transparent; border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.15rem; cursor: pointer; color: var(--ink);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.qopt:hover { border-color: var(--ink-faint); background: rgba(25,21,18,0.02); }
.qopt.is-picked { border-color: var(--wine); background: rgba(122,46,43,0.06); }
.qopt__key {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--ink-faint); margin-top: 0.05rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.qopt.is-picked .qopt__key { background: var(--wine); color: var(--paper); border-color: var(--wine); }
.qopt__text { font-size: 1rem; line-height: 1.45; color: var(--ink-soft); }
.qopt.is-picked .qopt__text { color: var(--ink); }

.qnav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.qlink {
  background: none; border: none; cursor: pointer; color: var(--ink-faint);
  font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.06em; padding: 0.4rem 0;
  transition: color 0.3s var(--ease);
}
.qlink:hover { color: var(--ink); }
.qcontinue { min-width: 180px; }

/* ---------- Result ---------- */
.qresult__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.08; letter-spacing: -0.015em;
  margin: 0.4rem 0 2rem;
}
.qmatches { display: grid; gap: 1rem; }
.qmatch {
  display: grid; grid-template-columns: 92px 1fr; gap: 1.2rem; align-items: center;
  border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; background: var(--paper-2);
}
.qmatch--top { border-color: var(--wine); }
.qmatch__art {
  width: 92px; height: 116px; border-radius: 10px; overflow: hidden;
  background: rgba(25,21,18,0.05); box-shadow: 0 12px 30px -22px rgba(0,0,0,0.6);
}
.qmatch__art img { width: 100%; height: 100%; object-fit: cover; }
.qmatch__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.qmatch__name { font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.qmatch__pct { font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--wine); }
.qmatch__meter { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin: 0.6rem 0 0.7rem; }
.qmatch__meter span { display: block; height: 100%; background: var(--wine); border-radius: 2px; }
.qmatch--top .qmatch__meter span { background: var(--ink); }
.qmatch__line { font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); }

.qresult__note { margin: 1.8rem 0 0; font-size: 0.92rem; line-height: 1.55; color: var(--wine); font-weight: 500; max-width: 52ch; }
.qresult__actions { display: flex; align-items: center; gap: 1.4rem; margin-top: 2rem; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  /* More breathing room below the status bar on phones */
  .pnav { padding-top: calc(2rem + env(safe-area-inset-top, 0px)); }
  .qwrap { padding-top: calc(7rem + env(safe-area-inset-top, 0px)); }
  .qmatch { grid-template-columns: 70px 1fr; gap: 0.95rem; padding: 0.85rem 1rem; }
  .qmatch__art { width: 70px; height: 90px; }
  .qnav { flex-direction: row; }
  .qcontinue { min-width: 0; flex: 1; }
}
