/* ==========================================================================
   LISS event quiz — brand tokens taken from the live lissproducts.com theme
   ========================================================================== */

@font-face {
  font-family: 'Marcellus';
  src: url('/fonts/marcellus-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Marcellus';
  src: url('/fonts/marcellus-latin-ext.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Karla';
  src: url('/fonts/karla-latin.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Karla';
  src: url('/fonts/karla-latin-ext.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --brand:        #3B0F24;
  --brand-hover:  #781F49;
  --cream:        #FAF6F1;
  --sand:         #E6DDD4;
  --gold:         #B49A6B;
  --gold-soft:    #C9AE7C;
  --ink:          #241A1D;
  --ink-muted:    rgb(36 26 29 / 0.62);
  --ink-subtle:   rgb(36 26 29 / 0.42);
  --white:        #FFFFFF;
  --error:        #8B0000;

  --font-heading: 'Marcellus', Garamond, Baskerville, serif;
  --font-body:    'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgb(59 15 36 / 0.06);
  --shadow:    0 4px 20px rgb(59 15 36 / 0.08);
  --shadow-lg: 0 12px 40px rgb(59 15 36 / 0.14);

  --tap: 48px;
  --wrap: 34rem;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Kill the iOS rubber-band / double-tap-zoom that ruins kiosk use */
  overscroll-behavior-y: none;
  touch-action: manipulation;
}

/* Warm paper texture: two very soft radial washes, no image request */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 12% -10%, rgb(180 154 107 / 0.16), transparent 60%),
    radial-gradient(50rem 36rem at 100% 105%, rgb(59 15 36 / 0.10), transparent 62%);
  pointer-events: none;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

button, input, textarea { font: inherit; color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--cream);
  padding: 0.75rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------------ shell */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding:
    env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgb(180 154 107 / 0.34);
  background: rgb(250 246 241 / 0.86);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__logo {
  height: 30px;
  width: auto;
  display: block;
}

.langswitch {
  display: flex;
  border: 1px solid var(--gold);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--white);
}

.langswitch__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.42rem 0.78rem;
  min-height: 32px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.langswitch__btn.is-active {
  background: var(--brand);
  color: var(--cream);
}

/* --------------------------------------------------------------- progress */

.progress {
  flex: none;
  padding: 0.9rem 1.15rem 0.2rem;
}

.progress__track {
  display: flex;
  gap: 5px;
}

.progress__seg {
  height: 4px;
  flex: 1;
  border-radius: var(--radius-pill);
  background: rgb(180 154 107 / 0.28);
  overflow: hidden;
  position: relative;
}
.progress__seg::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.42s var(--ease);
}
.progress__seg.is-done::after,
.progress__seg.is-current::after { transform: scaleX(1); }
.progress__seg.is-current::after { background: var(--gold); }

.progress__label {
  margin-top: 0.5rem;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

/* ------------------------------------------------------------------ main */

.main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.screen {
  display: none;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.screen.is-active {
  display: flex;
  animation: screen-in 0.36s var(--ease) backwards;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------------- intro */

.screen--intro { justify-content: center; }

.intro {
  width: min(100%, var(--wrap));
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  text-align: center;
}

.intro__crest {
  width: 92px;
  height: auto;
  margin: 0 auto 1.4rem;
  display: block;
  animation: crest-in 0.7s var(--ease) backwards;
}

@keyframes crest-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.intro__title {
  font-size: clamp(1.9rem, 7.5vw, 2.6rem);
  color: var(--brand);
  margin-bottom: 0.9rem;
}

.intro__body {
  color: var(--ink-muted);
  max-width: 28rem;
  margin: 0 auto 1.4rem;
}

.intro__prize {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--white);
  border: 1px solid rgb(180 154 107 / 0.5);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.05rem 0.55rem 0.8rem;
  font-size: 0.9rem;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.9rem;
  text-align: left;
}

.prize-mark {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgb(180 154 107 / 0.22);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgb(180 154 107 / 0.22); }
  50%      { box-shadow: 0 0 0 8px rgb(180 154 107 / 0.06); }
}

/* ------------------------------------------------------------- questions */

.qwrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.question {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: min(100%, var(--wrap));
  margin: 0 auto;
  padding: 1.25rem 1.15rem 0;
  animation: screen-in 0.34s var(--ease) backwards;
}
.question.is-back { animation-name: screen-in-back; }

@keyframes screen-in-back {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

.question__title {
  font-size: clamp(1.35rem, 5.4vw, 1.75rem);
  color: var(--brand);
  margin-bottom: 0.45rem;
}

.question__hint {
  font-size: 0.88rem;
  color: var(--ink-subtle);
  margin-bottom: 1.15rem;
}

.question__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  /* Fades the list edge so it reads as scrollable */
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 20px), transparent 100%);
}

/* Scent chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.25rem 0 0;
}

.chip {
  appearance: none;
  cursor: pointer;
  border: 1px solid rgb(180 154 107 / 0.7);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 0.68rem 1.05rem;
  min-height: var(--tap);
  font-size: 0.97rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition:
    background 0.18s var(--ease),
    color 0.18s var(--ease),
    border-color 0.18s var(--ease),
    transform 0.12s var(--ease);
}

.chip::before {
  content: '';
  width: 15px;
  height: 15px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: transparent;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.chip[aria-pressed='true'] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--cream);
  box-shadow: 0 3px 12px rgb(59 15 36 / 0.24);
}
.chip[aria-pressed='true']::before {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  box-shadow: inset 0 0 0 3px var(--brand);
}
.chip:active { transform: scale(0.96); }

/* Big single-choice cards */

.cards {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.card {
  appearance: none;
  cursor: pointer;
  text-align: left;
  border: 1px solid rgb(180 154 107 / 0.6);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition:
    background 0.18s var(--ease),
    color 0.18s var(--ease),
    border-color 0.18s var(--ease),
    transform 0.12s var(--ease),
    box-shadow 0.18s var(--ease);
}

.card__radio {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  transition: background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.card__label {
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.card[aria-pressed='true'] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--cream);
  box-shadow: var(--shadow);
}
.card[aria-pressed='true'] .card__radio {
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 4px var(--brand);
  border-color: var(--gold-soft);
}
.card:active { transform: scale(0.985); }

/* Compact single-choice list (source question) */

.cards--compact .card { min-height: var(--tap); padding: 0.75rem 1rem; }
.cards--compact .card__label { font-family: var(--font-body); font-size: 1rem; }
.cards--compact .card__radio { width: 18px; height: 18px; }
.cards--compact .card[aria-pressed='true'] .card__radio { box-shadow: inset 0 0 0 3px var(--brand); }

/* Fields */

.field { margin-bottom: 1.1rem; }

.field__label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 0.42rem;
}

.input, .textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
  min-height: var(--tap);
  font-size: 1rem; /* never below 16px, or iOS zooms on focus */
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.textarea { min-height: 8rem; resize: vertical; line-height: 1.55; }

.input::placeholder, .textarea::placeholder { color: var(--ink-subtle); }

.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(59 15 36 / 0.12);
}
.input.is-invalid { border-color: var(--error); }

.privacy {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-subtle);
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgb(180 154 107 / 0.3);
}

.newsletter__label {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.65rem;
}

.choices--inline { display: flex; gap: 0.6rem; }
.choices--inline .card { flex: 1; justify-content: center; min-height: var(--tap); padding: 0.7rem 1rem; }
.choices--inline .card__label { font-family: var(--font-body); }

/* Errors */

.error {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--error);
  font-size: 0.86rem;
  margin-top: 0.7rem;
  animation: shake 0.32s var(--ease);
}
.error[hidden] { display: none; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

.counter {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  min-height: 1.2em;
}

/* ----------------------------------------------------------------- nav */

.qnav {
  flex: none;
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.85rem 0 calc(0.85rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--cream) 62%, rgb(250 246 241 / 0));
}

.btn {
  appearance: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  padding: 0.85rem 1.6rem;
  min-height: var(--tap);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.12s var(--ease),
    opacity 0.2s var(--ease);
}
.btn:active { transform: scale(0.975); }
.btn[disabled] { opacity: 0.55; cursor: default; }

.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--cream);
  box-shadow: var(--shadow);
  flex: 1;
}
.btn--primary:hover:not([disabled]) { background: var(--brand-hover); border-color: var(--brand-hover); }

.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; width: 100%; }

.btn--secondary {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand);
  flex: none;
  padding-inline: 1.15rem;
}
.btn--secondary:hover { background: rgb(59 15 36 / 0.06); }

.btn--ghost {
  background: transparent;
  border-color: var(--gold);
  color: var(--brand);
}
.btn--ghost:hover { background: rgb(180 154 107 / 0.12); }

.btn:focus-visible,
.chip:focus-visible,
.card:focus-visible,
.langswitch__btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgb(250 246 241 / 0.35);
  border-top-color: var(--cream);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- thanks */

.screen--thanks { justify-content: center; }

.thanks {
  width: min(100%, var(--wrap));
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  text-align: center;
}

.thanks__seal {
  width: 84px;
  height: 84px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--gold-soft);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 8px rgb(180 154 107 / 0.18);
  animation: seal-in 0.55s var(--ease) backwards;
}

@keyframes seal-in {
  from { opacity: 0; transform: scale(0.7); }
  60%  { transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}

.thanks__seal svg path {
  stroke-dasharray: 44;
  stroke-dashoffset: 44;
  animation: draw 0.5s var(--ease) 0.25s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.thanks__title {
  font-size: clamp(1.9rem, 7vw, 2.5rem);
  color: var(--brand);
  margin-bottom: 0.8rem;
}

.thanks__body {
  color: var(--ink-muted);
  max-width: 26rem;
  margin: 0 auto 1.8rem;
}

.thanks__countdown {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 1rem;
}
.thanks__countdown[hidden] { display: none; }

/* --------------------------------------------------------------- footer */

.footer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.footer__dot { opacity: 0.5; }
.footer__offline { color: var(--error); font-weight: 600; }
.footer__offline[hidden] { display: none; }

/* Questions screen keeps its own sticky nav, so hide the chrome footer there */
body.is-question .footer { display: none; }

/* ------------------------------------------------------------ responsive */

@media (min-width: 700px) {
  .topbar { padding: 1rem 2rem; }
  .topbar__logo { height: 34px; }
  .progress { padding: 1.1rem 2rem 0.2rem; }
  .question { padding: 2rem 2rem 0; }
  .chips { gap: 0.65rem; }
  .chip { font-size: 1rem; padding: 0.72rem 1.15rem; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards--compact, .choices--inline { grid-template-columns: 1fr; }
  .cards--compact { display: grid; }
  .qnav { padding-bottom: 1.5rem; }
  .btn--primary { flex: none; min-width: 12rem; margin-left: auto; }
  .btn--lg { width: auto; min-width: 16rem; }
}

/* Kiosk: bigger everything, the tablet is arm's length away */
body.is-kiosk {
  --tap: 56px;
  font-size: 1.06rem;
}
body.is-kiosk .chip { font-size: 1.05rem; padding: 0.8rem 1.25rem; }
body.is-kiosk .card__label { font-size: 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
