/* ЯВА — современный лендинг с лёгким ретро-намёком (teal + yellow) */

:root {
  --bg: #f4f8f8;
  --bg-deep: #0c3d42;
  --surface: #ffffff;
  --ink: #102428;
  --muted: #5a7074;
  --teal: #0d8a8a;
  --teal-deep: #066666;
  --yellow: #f5d547;
  --yellow-hot: #ffcc00;
  --line: rgba(12, 61, 66, 0.12);
  --radius: 18px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Space Grotesk", system-ui, sans-serif;
}

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

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

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(13, 138, 138, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(245, 213, 71, 0.22), transparent 50%),
    linear-gradient(180deg, #eef6f6 0%, var(--bg) 40%, #e8f2f2 100%);
  line-height: 1.5;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a:hover {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- topbar --- */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--bg-deep);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--teal-deep);
}

.logo__star {
  color: var(--yellow-hot);
  margin-left: 2px;
  text-shadow: 0 0 0 transparent;
}

.topbar__phone {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
}

.topbar__phone:hover {
  color: var(--teal);
  text-decoration: none;
}

/* --- hero: text left / photo right --- */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  min-height: calc(100vh - 180px);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink);
}

.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1.1rem;
  color: var(--bg-deep);
}

.hero__desc {
  margin: 0 0 1.5rem;
  max-width: 34rem;
  font-size: 1.05rem;
  color: var(--muted);
}

.checks {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: grid;
  gap: 0.65rem;
}

.checks li {
  position: relative;
  padding-left: 1.7rem;
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1rem;
  height: 1rem;
  border-radius: 3px;
  background: var(--teal);
  box-shadow: 2px 2px 0 var(--yellow);
}

.checks li::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.52rem;
  width: 0.35rem;
  height: 0.55rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cta,
.btn-next,
.btn_send {
  appearance: none;
  border: 2px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 1.6rem;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cta:hover,
.btn-next:hover,
.btn_send:hover {
  background: var(--yellow-hot);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.cta:active,
.btn-next:active,
.btn_send:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-ghost {
  appearance: none;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal-deep);
}

.btn_send:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* photo right */
.hero__media {
  position: relative;
}

.hero__frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--teal);
  background: #d7e8e8;
}

.hero__frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero__tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3rem 0.65rem;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 4px;
}

/* --- footer --- */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
}

.footer__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.footer__brand {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-weight: 600;
  color: #fff;
}

.footer p {
  margin: 0.25rem 0;
}

.footer a {
  color: var(--yellow);
}

.footer__nav {
  margin-top: 0.85rem;
}

/* --- quiz fullscreen --- */
.quiz {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 35, 38, 0.72);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
}

.quiz.is-open {
  display: flex;
}

.quiz__panel {
  position: relative;
  width: min(560px, 100%);
  margin: auto;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 20px;
  box-shadow: 10px 10px 0 var(--teal);
  padding: 1.75rem 1.5rem 1.5rem;
}

.quiz__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.quiz__close:hover {
  border-color: var(--ink);
  background: var(--yellow);
}

.quiz__progress {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
}

.quiz__title {
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0 0 1.1rem;
  color: var(--bg-deep);
}

.quiz__sub {
  margin: -0.4rem 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.quiz-step {
  display: none;
}

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

.quiz-options {
  display: grid;
  gap: 0.55rem;
}

.quiz-opt {
  display: block;
  cursor: pointer;
}

.quiz-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quiz-opt span {
  display: block;
  padding: 0.9rem 1rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.quiz-opt:hover span {
  border-color: var(--teal);
}

.quiz-opt.is-selected span,
.quiz-opt input:checked + span {
  border-color: var(--ink);
  background: rgba(245, 213, 71, 0.35);
  box-shadow: 3px 3px 0 var(--teal);
}

.quiz__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.form-row {
  margin: 0 0 0.9rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.form-row input[type="text"],
.form-row input[type="tel"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-family: var(--font);
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}

.form-row input:focus {
  outline: none;
  border-color: var(--teal);
}

.form-row input.error {
  border-color: #d64545;
  background: #fff5f5;
}

.iti {
  width: 100%;
  display: block;
}

.consent {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

/* --- legal / thank pages --- */
.page {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--teal-deep);
  text-decoration: none;
}

.page__title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 1.25rem;
  color: var(--bg-deep);
}

.legal-content {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 rgba(13, 138, 138, 0.35);
  padding: 1.5rem 1.35rem;
}

.legal-content h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 1.5rem 0 0.65rem;
  color: var(--bg-deep);
}

.legal-content p,
.legal-content li {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.6;
}

.legal-content dl {
  margin: 0.75rem 0;
  padding: 1rem;
  background: #f0f7f7;
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
}

.legal-content dt {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--teal-deep);
  margin-top: 0.55rem;
}

.legal-content dd {
  margin: 0.15rem 0 0.4rem;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 0.75rem 0;
}

.legal-content th,
.legal-content td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.legal-content th {
  background: rgba(245, 213, 71, 0.45);
}

.legal-meta {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.thank {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.thank__card {
  width: min(480px, 100%);
  text-align: center;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 20px;
  box-shadow: 8px 8px 0 var(--teal);
  padding: 2.5rem 1.75rem;
}

.thank__card h1 {
  font-family: var(--display);
  font-size: 1.75rem;
  margin: 0 0 0.75rem;
  color: var(--bg-deep);
}

.thank__card p {
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.thank__card .cta {
  margin-top: 1.5rem;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(16, 36, 40, 0.25);
  border-radius: 50%;
  border-top-color: var(--ink);
  animation: spin 1s ease-in-out infinite;
  vertical-align: middle;
  margin-right: 5px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 1.75rem;
    padding-top: 0.5rem;
  }

  .hero__media {
    order: -1;
  }

  .hero__frame {
    box-shadow: 5px 5px 0 var(--teal);
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 1rem;
  }

  .hero {
    padding: 1rem 1rem 2.5rem;
  }

  .quiz__panel {
    box-shadow: 5px 5px 0 var(--teal);
    padding: 1.4rem 1rem 1.15rem;
  }

  .quiz__actions {
    flex-direction: column;
  }

  .quiz__actions .btn-next,
  .quiz__actions .btn_send,
  .quiz__actions .btn-ghost {
    width: 100%;
  }
}
