/* Slovianka quiz — brand styles (colors from sloviankahair.pl). Mobile-first. */
:root {
  --ink: #2E2F2E;
  --ink-2: #5E5A58;
  --ink-3: #8C8582;
  --accent: #A45756;
  --accent-dark: #8E4746;
  --rose: #E2BBB2;
  --blush: #F5EDEC;
  --bg: #F8F5F5;
  --card: #FFFFFF;
  --line: #EADFDD;
  --ok: #4F7A5B;
  --err: #B5403A;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(46, 47, 46, .04), 0 8px 24px rgba(46, 47, 46, .06);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: 56px;
  padding: 0 8px;
  padding-top: env(safe-area-inset-top);
  background: rgba(248, 245, 245, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.topbar__back {
  grid-column: 1;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: transparent;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--ink);
}
.topbar__back:hover { background: var(--blush); }
.topbar__brand {
  grid-column: 2;
  text-align: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .28em;
  padding-left: .28em;
}
.topbar__step {
  position: absolute;
  right: 16px;
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}
body[data-screen^="p"] .topbar__brand { font-size: 17px; }
.progress {
  position: absolute;
  left: 16px; right: 16px; bottom: 0;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--rose), var(--accent));
  transition: width .45s cubic-bezier(.2, .8, .2, 1);
}

/* ---------- stage & screens ---------- */
.stage { flex: 1; padding: 20px 16px 40px; }
.screen { animation: screen-in .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn--block { display: flex; width: 100%; }
.btn--lg { min-height: 58px; font-size: 16px; }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 13px; }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(164, 87, 86, .28); }
.btn--accent:hover { background: var(--accent-dark); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--rose); }
.btn__arrow { font-size: 18px; line-height: 1; }
.btn.is-loading { opacity: .7; pointer-events: none; }
.btn.is-loading .btn__arrow { animation: pulse 1s infinite; }
.btn[disabled] { opacity: .7; }
@keyframes pulse { 50% { opacity: .2; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- avatar & speech ---------- */
.avatar { flex: none; border-radius: 50%; object-fit: cover; }
.avatar--sm { width: 36px; height: 36px; }
.avatar--md { width: 44px; height: 44px; }
.avatar--lg { width: 56px; height: 56px; }
.avatar--mono {
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--rose), var(--accent));
  color: #fff;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
}
.avatar--lg.avatar--mono { font-size: 26px; }
.say { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0; }
.say__body {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px var(--radius) var(--radius) var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.say__name { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.say__name span { font-weight: 500; color: var(--ink-3); }
.say__text { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.say--big .say__text { font-size: 16px; color: var(--ink); }
.say--reply { animation: pop .35s cubic-bezier(.2, .8, .2, 1) both; margin-top: 16px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- hook ---------- */
.screen--hook { margin: -20px -16px 0; }
.hero { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--blush); }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(to bottom, rgba(248, 245, 245, 0), var(--bg));
}
.hero__badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 1;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(6px);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 1.3;
}
.hero__badge b { display: block; color: var(--accent); font-size: 15px; letter-spacing: .14em; }
.hook { padding: 0 16px; margin-top: -28px; position: relative; z-index: 1; }
.hook .btn--accent { margin-top: 18px; }
.hook .say { margin-top: 22px; }
.hook__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0 0 12px;
}
.hook__sub { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }
.proof { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.proof li {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blush);
  color: var(--ink);
}
.stars { color: #D9A13B; margin-right: 4px; }
.hook__trust { text-align: center; font-size: 13px; color: var(--ink-3); margin: 12px 0 0; }

/* ---------- question ---------- */
.q__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 29px;
  line-height: 1.12;
  margin: 6px 0 18px;
}
.q__hint { margin: -10px 0 16px; font-size: 13px; color: var(--ink-3); }
.opts { display: grid; gap: 10px; }
.opts.is-locked .opt:not(.is-selected) { opacity: .45; }
.opts.is-locked { pointer-events: none; }
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .12s, opacity .25s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.opt:hover { border-color: var(--rose); }
.opt:active { transform: scale(.985); }
.opt.is-selected { border-color: var(--accent); background: var(--blush); box-shadow: 0 0 0 3px rgba(164, 87, 86, .12); }
.opt__icon { font-size: 22px; width: 28px; text-align: center; flex: none; }
.opt__text { flex: 1; display: flex; flex-direction: column; }
.opt__label { font-weight: 600; font-size: 15px; line-height: 1.35; }
.opt__sub { font-size: 13px; color: var(--ink-3); }
.opt__check {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  transition: all .2s;
}
.opt.is-selected .opt__check {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* length cards */
.opts--length { grid-template-columns: repeat(3, 1fr); }
.opt--length { flex-direction: column; justify-content: flex-end; text-align: center; gap: 4px; padding: 14px 6px 12px; }
.opt--length .opt__label { font-size: 14px; }
.opt--length .opt__sub { font-size: 12px; }
.lenfig { display: block; }

/* effect cards */
.opts--effect { gap: 12px; }
.opt--effect { flex-direction: row; align-items: stretch; padding: 8px; gap: 12px; }
.eff__img { position: relative; flex: none; width: 112px; border-radius: 12px; overflow: hidden; background: var(--blush); }
.eff__img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1134 / 1186; }
.eff__tags { position: absolute; left: 0; right: 0; bottom: 5px; display: flex; justify-content: space-around; }
.eff__tags i {
  font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255, 255, 255, .88); color: var(--ink); padding: 1px 6px; border-radius: 6px;
}
.eff__body { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-right: 6px; }
.eff__label { font-weight: 700; font-size: 15px; line-height: 1.25; }
.eff__grams { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--accent); line-height: 1.1; }
.eff__sub { font-size: 12.5px; color: var(--ink-3); }
.opt--plain { justify-content: center; min-height: 52px; border-style: dashed; }
.opt--plain .opt__label { font-weight: 600; font-size: 14px; color: var(--ink-2); }

/* ---------- tip (value drop) ---------- */
.tip { background: var(--blush); border-radius: 24px; padding: 20px 16px 4px; margin-bottom: 20px; }
.tip__kicker { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.tip .say { margin: 14px 0 16px; }

/* ---------- form ---------- */
.form { display: grid; gap: 16px; }
.field__label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: #B9B1AE; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(164, 87, 86, .12); }
.phone { display: flex; gap: 8px; }
.input--prefix { width: 78px; flex: none; text-align: center; padding: 0 8px; }
.field.is-invalid .input, .consent.is-invalid .consent__box { border-color: var(--err); }
.field.is-valid .input { border-color: var(--ok); }
.field__err { color: var(--err); font-size: 12.5px; margin-top: 4px; min-height: 0; }
.field__err:empty { display: none; }
.consent { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 10px; cursor: pointer; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.consent input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; cursor: pointer; }
.consent__box {
  width: 24px; height: 24px;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  transition: all .2s;
}
.consent input:checked + .consent__box {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.consent input:focus-visible + .consent__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent .field__err { grid-column: 2; }
.form__note { text-align: center; font-size: 12.5px; color: var(--ink-3); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- result ---------- */
.screen--result { display: grid; gap: 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px 18px;
  box-shadow: var(--shadow);
}
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.15; margin: 0 0 8px; }
.card p { margin: 0 0 10px; font-size: 14.5px; color: var(--ink-2); }
.card__fine { font-size: 12px !important; color: var(--ink-3) !important; margin: 8px 0 0 !important; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pill { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--blush); color: var(--ink-2); white-space: nowrap; }

.card--variant { background: linear-gradient(160deg, #fff 0%, var(--blush) 100%); border-color: var(--rose); }
.variant__kicker { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.variant__title { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.05; margin: 4px 0 10px; color: var(--accent); }
.variant__text { font-size: 15px !important; color: var(--ink) !important; }
.spec { margin: 14px 0 8px; border-top: 1px solid var(--line); }
.spec__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-size: 13.5px; color: var(--ink-2); }
.spec dd { margin: 0; font-weight: 700; font-size: 17px; text-align: right; }
.spec small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-3); }
.spec--table dt { font-weight: 600; color: var(--ink); }
.spec--table dd { font-size: 15px; }
.variant__inst { font-size: 13px !important; font-weight: 600; color: var(--ok) !important; margin: 4px 0 6px !important; }
.variant__note { font-size: 13px !important; background: rgba(255, 255, 255, .7); border-radius: 10px; padding: 8px 10px; }

.card--next .say { margin: 6px 0 12px; }
.card--next .btn { margin-top: 10px; }
.card--offer { border: 1.5px solid var(--accent); }
.offer__tag {
  display: inline-block; margin-bottom: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 5px 10px; border-radius: 8px;
}
.ticks { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 6px; }
.ticks li { position: relative; padding-left: 26px; font-size: 14px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blush) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23A45756' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.offer__price { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px dashed var(--rose); font-size: 14px; }
.offer__price b { font-size: 18px; }
.code b { font-family: ui-monospace, Menlo, monospace; letter-spacing: .08em; background: var(--blush); padding: 3px 8px; border-radius: 6px; font-size: 15px; }

.card--fear blockquote { margin: 12px 0 0; padding: 12px 14px; background: var(--blush); border-radius: 14px; font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.35; }
.card--fear cite { display: block; margin-top: 6px; font-family: var(--sans); font-style: normal; font-size: 12px; color: var(--ink-3); }
.fear__img { border-radius: 14px; margin-top: 6px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

.photo__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.card--photo .btn { margin-top: 6px; }
.photo__preview img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; margin: 4px 0 8px; }
.photo__status { font-size: 13px !important; margin: 8px 0 0 !important; }
.photo__status:empty { display: none; }
.photo__status.is-done { color: var(--ok) !important; font-weight: 600; }
.photo__status.is-error { color: var(--err) !important; }

.trust { text-align: center; padding: 6px 0 10px; }
.trust ul { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.trust li { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--blush); }
.trust p { font-size: 12.5px; color: var(--ink-3); margin: 0; }

/* ---------- cookies ---------- */
.cookies {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: 456px;
  margin: 0 auto;
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(46, 47, 46, .18);
}
.cookies p { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-2); }
.cookies__btns { display: flex; gap: 8px; }
.cookies__btns .btn { flex: 1; }

@media (min-width: 520px) {
  .stage { padding-top: 28px; }
  .screen--hook { margin: -28px 0 0; }
  .hero { border-radius: 0 0 28px 28px; }
  .hook__title { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .screen { opacity: 1; transform: none; }
}
