/* ============================================================
   Липки Premium — quiz landing
   Standalone style. Independent of Alpiysky theme.
   ============================================================ */

:root {
  --bg: #f6f3ec;
  --bg-soft: #ece7dc;
  --surface: #ffffff;
  --ink: #1a1d1a;
  --ink-soft: #5a5f57;
  --muted: #8a8f86;
  --line: #e0dccf;
  --line-strong: #cfcab9;
  --brand: #2e4a3a;
  --brand-strong: #233a2d;
  --brand-soft: #e8efe7;
  --accent: #b89b5e;
  --danger: #b54b3a;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 22, 0.04), 0 1px 1px rgba(20, 30, 22, 0.03);
  --shadow: 0 8px 24px rgba(20, 30, 22, 0.07);
  --shadow-lg: 0 18px 50px rgba(20, 30, 22, 0.12);
  --font-sans: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Layout ---------- */

.lp-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lp-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 22px;
}

.lp-header {
  padding: 22px 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.lp-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}

.lp-logo:hover {
  text-decoration: none;
}

.lp-logo__img {
  display: block;
  height: 46px;
  width: auto;
  max-width: min(260px, 82vw);
}

/* ---------- Progress ---------- */

.lp-progress {
  padding: 26px 0 8px;
}

.lp-progress__label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.lp-progress__bar {
  height: 6px;
  width: 100%;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
}

.lp-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Main / steps ---------- */

.lp-main {
  flex: 1;
  padding: 24px 0 64px;
}

.lp-step {
  display: none;
  animation: lp-fade 0.35s ease both;
}

.lp-step.is-active {
  display: block;
}

@keyframes lp-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lp-step__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 18px 0 12px;
  color: var(--ink);
}

.lp-step__subtitle {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin: 0 0 26px;
  line-height: 1.55;
}

.lp-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 6px 0 30px;
  background: var(--bg-soft);
  aspect-ratio: 16 / 9;
}

.lp-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Option cards ---------- */

.lp-options {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.lp-options--rooms {
  grid-template-columns: repeat(2, 1fr);
}

.lp-options--rooms .lp-option:last-child:nth-child(odd) {
  grid-column: span 2;
  max-width: 50%;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .lp-options--rooms {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .lp-options--rooms .lp-option:last-child:nth-child(odd) {
    max-width: 70%;
  }
}

.lp-option {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-align: left;
}

.lp-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lp-option:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.lp-option.is-selected,
.lp-option input:checked + .lp-option__body,
.lp-option:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(46, 74, 58, 0.12), var(--shadow);
  background: #fbfaf5;
}

.lp-option__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-soft);
}

.lp-option__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lp-option__label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--bg-soft);
}

.lp-option--text .lp-option__label {
  padding: 18px 18px;
  background: transparent;
  font-size: 16px;
}

.lp-option__letter {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.lp-option:has(input:checked) .lp-option__letter {
  background: var(--brand);
  color: #fff;
}

/* ---------- Form / contact step ---------- */

.lp-form {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.lp-field {
  position: relative;
}

.lp-field input,
.lp-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 18px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none;
}

.lp-field input:focus,
.lp-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46, 74, 58, 0.12);
}

.lp-field--phone .lp-field__input-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}

.lp-field--phone .lp-field__input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46, 74, 58, 0.12);
}

.lp-field__prefix {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 18px;
  color: var(--ink);
  font-weight: 600;
  background: var(--bg-soft);
  border-right: 1px solid var(--line);
  flex: 0 0 auto;
  white-space: nowrap;
}

.lp-field__flag {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  overflow: hidden;
  background: linear-gradient(to bottom, #0057b7 0 50%, #ffd700 50% 100%);
  flex-shrink: 0;
}

.lp-field--phone input {
  border: none;
  background: transparent;
  flex: 1;
  padding: 18px 16px 18px 12px;
}

.lp-field--phone input:focus {
  box-shadow: none;
}

.lp-policy {
  font-size: 12.5px;
  color: var(--muted);
  margin: 4px 2px 0;
  line-height: 1.55;
}

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

.lp-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  margin-top: 6px;
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  padding: 17px 22px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  width: 100%;
  text-align: center;
  letter-spacing: 0.01em;
}

.lp-btn:active {
  transform: translateY(1px);
}

.lp-btn--primary {
  background: var(--brand);
  color: #fff;
}

.lp-btn--primary:hover {
  background: var(--brand-strong);
}

.lp-btn--ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}

.lp-btn--ghost:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.lp-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.lp-back {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
}

.lp-back:hover {
  color: var(--ink);
}

.lp-back[hidden] {
  display: none;
}

/* ---------- Thank-you ---------- */

.lp-success {
  text-align: center;
  padding: 30px 12px 10px;
}

.lp-success__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  margin: 0 auto 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lp-success__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 8px;
}

.lp-success__text {
  color: var(--ink-soft);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ---------- Footer ---------- */

.lp-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 28px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--bg);
}

.lp-footer__inner {
  display: flex;
  justify-content: center;
  text-align: center;
}

/* ---------- Errors ---------- */

.lp-shake {
  animation: lp-shake 0.35s ease;
}

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

.lp-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--danger);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.lp-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  .lp-step__title {
    font-size: 36px;
  }
  .lp-progress {
    padding-top: 36px;
  }
  .lp-main {
    padding-top: 32px;
  }
  .lp-actions {
    flex-direction: row-reverse;
    justify-content: flex-start;
  }
  .lp-btn {
    width: auto;
    min-width: 220px;
  }
  .lp-btn--primary {
    margin-left: auto;
  }
}
