@font-face {
  font-family: "Cinzel";
  src: url("/fonts/Cinzel-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("/fonts/Cinzel-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Flex";
  src: url("/fonts/RobotoFlex.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-cinzel: "Cinzel", serif;
  --font-roboflex: "Roboto Flex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg-body: #ffffff;
  --panel-bg: #ffffff;
  --text-primary: #0a0a0a;
  --text-muted: #5d5d5d;
  --text-secondary: #5d5d5d;
  --border: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --shadow-card: 0 24px 68px rgba(0, 0, 0, 0.22);
  --container-max: 1200px;
  --grid-gap: 24px;
  --hero-pad-y: 64px;
  --hero-gap: 64px;
  --type-hero-title: 64px;
  --type-hero-title-line: 1;
  --type-hero-body: 28px;
  --type-hero-body-line: 1.4;
  --type-cta: 18px;
}

html,
body {
  height: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font-roboflex);
  display: flex;
  justify-content: center;
}

body.has-hero {
  overflow: hidden;
}

body.quiz.quiz-loading-active {
  overflow: hidden;
}

@media (min-width: 1024px) {
  body:not(.has-hero) {
    justify-content: flex-start;
    align-items: stretch;
    width: 100vw;
  }
}

.quiz .app {
  width: 100%;
  max-width: 1200px;
  margin: 48px auto 80px;
  padding: 40px 48px 80px;
}

body.has-hero .app {
  margin: 0;
  padding: 0;
}

.hero-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  background: #fff;
  color: #000;
  overflow: hidden;
}

.hero-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--hero-gap);
  align-items: stretch;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 32px;
}

.hero-title {
  font-family: var(--font-cinzel);
  font-weight: 400;
  font-size: var(--type-hero-title);
  line-height: var(--type-hero-title-line);
  letter-spacing: 0.05em;
  margin: 0;
  max-width: none;
  text-transform: uppercase;
}

.hero-title span {
  display: inline-block;
  white-space: normal;
}

.hero-title span:first-child::first-letter {
  font-size: 1.3em;
}

.hero-subtitle {
  font-family: "Roboto Flex", sans-serif;
  font-weight: 400;
  font-variation-settings: "wght" 400;
  font-optical-sizing: auto;
  font-size: var(--type-hero-body);
  line-height: var(--type-hero-body-line);
  max-width: none;
  margin: 0;
  color: var(--text-primary);
}

.hero-subtitle.ua-text {
  font-weight: 400;
  font-variation-settings: "wght" 400;
}

.hero-subtitle p {
  margin: 0;
}

.hero-subtitle p + p {
  margin-top: 8px;
}

.hero-button {
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: var(--type-cta);
  padding: 14px 32px;
  border-radius: 999px;
  background: #e7e7e7;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-button:hover {
  background: #d5d5d5;
}

.hero-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  text-align: right;
  gap: 24px;
}

.hero-img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  margin: 0;
}

@media (max-width: 1023px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .quiz .app {
    padding: 32px 24px 64px;
  }

  .hero-subtitle {
    font-size: 16px;
    line-height: 1.5;
    max-width: 100%;
  }
}

#quiz-section {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

@media (min-width: 1024px) {
  body.quiz:not(.has-hero) {
    overflow-y: auto;
  }

  body.quiz:not(.has-hero) .app {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  body.quiz:not(.has-hero) #quiz-section {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 100vh;
    padding: 60px 10vw 80px;
    display: block;
    background: transparent;
    box-shadow: none;
  }

body.quiz:not(.has-hero) #pairs-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: block;
}

body.quiz:not(.has-hero) .step {
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

body.quiz.quiz-loading-active .app {
  height: 100vh;
}

body.quiz.quiz-loading-active #quiz-section {
  padding: 0;
  min-height: 100vh;
  height: 100vh;
}

body.quiz.quiz-loading-active #pairs-container {
  width: 100%;
  max-width: none !important;
  margin: 0;
  height: 100%;
}

body.quiz.quiz-loading-active #quiz-section .actions {
  display: none !important;
}
}

body.quiz-results {
  overflow: hidden;
  background: #ffffff;
}

body.quiz-results .app {
  display: none;
}

.results-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #ffffff;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.results-full-image {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  display: block;
}

.step {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 40px 36px;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 80px);
  overflow: hidden;
}

.step.step--love {
  width: 100%;
  max-width: 1100px;
  margin: 24px auto 32px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  max-height: none;
  overflow: visible;
}

.love-top {
  position: relative;
  width: 100%;
  height: 55vh;
  min-height: 320px;
  max-height: 520px;
  overflow: hidden;
}

.love-top__bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/love and no love/love aromat.jpg");
  background-size: cover;
  background-position: center;
  filter: brightness(0.9);
}

.love-top__content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 40px 56px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.love-top__index {
  position: absolute;
  top: 32px;
  right: 56px;
  font-family: var(--font-cinzel);
  font-size: 28px;
}

.love-top__texts {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.love-top__title {
  font-family: "Roboto Flex", system-ui, sans-serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.4;
}

.love-top__subtitle {
  font-family: "Roboto Flex", system-ui, sans-serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.4;
}

.love-bottom {
  flex: 1 1 auto;
  background: #fff;
  padding: 32px 56px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.love-form,
.no-love-form {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}

.love-form__label {
  display: block;
  font-family: "Roboto Flex", system-ui, sans-serif;
  font-weight: 400;
  font-size: 18px;
  margin-bottom: 4px;
}

.love-form__hint {
  font-family: "Roboto Flex", system-ui, sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: #7e7e7e;
  margin-bottom: 12px;
}

.love-form__input {
  width: 100%;
  min-height: 80px;
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid #e2e2e2;
  font-family: "Roboto Flex", system-ui, sans-serif;
  font-size: 16px;
  resize: vertical;
  background: #fff;
  color: var(--text-primary);
}

.love-form__input:focus {
  outline: 2px solid rgba(0, 0, 0, 0.2);
  border-color: transparent;
}

.love-form__example {
  margin-top: 14px;
  font-family: "Roboto Flex", system-ui, sans-serif;
  font-weight: 400;
  font-size: 18px;
  text-align: center;
}

.love-nav {
  margin-top: 12px;
}

.step.step--no-step .quiz-step-main {
  gap: 32px;
}

.no-step-indicator {
  align-self: flex-end;
  margin-bottom: 8px;
}

.no-step-top {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 260px;
  align-items: flex-start;
  gap: 40px;
  max-width: 1100px;
  width: 100%;
  padding: 0 16px;
  margin: 0 auto 32px;
}

.no-step-photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.no-step-copy {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.no-step-title {
  font-family: var(--font-cinzel);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 18px;
  text-transform: none;
}

.no-step-text {
  font-family: "Roboto Flex", system-ui, sans-serif;
  font-weight: 300;
  font-size: 24px;
  line-height: 1.5;
  margin: 0;
}

.no-step-form {
  width: min(680px, 100%);
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0 16px;
}

.no-step-label {
  font-family: "Roboto Flex", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.3;
  color: #000;
  margin-bottom: 4px;
}

.no-step-helper {
  font-family: "Roboto Flex", system-ui, sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.3;
  color: #777;
  margin: 8px 0 12px;
}

.no-step-input {
  width: 100%;
  min-height: 44px;
  height: 44px;
  max-height: 44px;
  border-radius: 4px;
  border: 1px solid #d8d8d8;
  padding: 10px 16px;
  font-family: "Roboto Flex", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.2;
  resize: none;
  overflow: hidden;
  transition: none;
  background: #fff;
  color: var(--text-primary);
  box-sizing: border-box;
  margin-top: 16px;
  white-space: nowrap;
}

.no-step-input:focus {
  outline: none;
  border-color: rgba(0, 0, 0, 0.55);
}

.no-love-textarea {
  width: 100%;
  min-height: 44px;
  height: 44px;
  max-height: 44px;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  transition: none;
  white-space: nowrap;
}

.no-step-example {
  width: min(680px, 100%);
  margin: 16px auto 0;
  font-family: "Roboto Flex", system-ui, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  color: #000;
  padding: 0 16px;
}

.step--no-step .quiz-step-main {
  align-items: center;
  gap: 32px;
}

.no-step-footer-btn {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.loading-screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.loading-screen-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  display: block;
}

.loading-screen-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 24px;
}

.loading-title {
  font-family: var(--font-cinzel, "Cinzel", serif);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #ffffff;
  text-align: center;
  margin: 0 0 32px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  box-sizing: border-box;
  animation: duhi-spin 3s linear infinite;
}

.quiz-step-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: flex-start;
  overflow: hidden;
}

.quiz-step-footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  gap: 0;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 32px;
}

.quiz-header-titles {
  flex: 1 1 auto;
  text-align: center;
}

.quiz-title-en {
  font-family: var(--font-cinzel);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.quiz-title-ua {
  font-family: "Roboto Flex", sans-serif;
  font-weight: 400;
  font-variation-settings: "wght" 400;
  font-optical-sizing: auto;
  font-size: 24px;
  line-height: 1.4;
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-primary);
}

.quiz-step-indicator {
  font-family: var(--font-cinzel);
  font-size: 32px;
  line-height: 1;
  text-align: right;
  padding-top: 8px;
  min-width: 40px;
  color: var(--text-primary);
}

.quiz-options-row {
  max-width: 1200px;
  margin: 0 auto 16px auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
}

.quiz-option {
  position: relative;
  padding: 0;
  width: 100%;
  background: #ffffff;
  border-radius: 0;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quiz-option img,
.quiz-option .choice-img {
  display: block;
  width: 100%;
  aspect-ratio: 39 / 44;
  height: auto;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

.quiz-option:hover {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.1);
}

.quiz-option--selected {
  transform: translateY(-6px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
  border: none;
}

.quiz-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  text-align: center;
}

.quiz-progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.15);
  opacity: 0.7;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.quiz-progress-dot.is-active {
  background-color: rgba(0, 0, 0, 0.85);
  transform: scale(1.4);
  opacity: 1;
}

.quiz-progress-dot:disabled {
  cursor: default;
  opacity: 0.4;
}

.nav-btn,
.duhi-nav-btn,
.pair-nav .nav-btn {
  font-family: var(--font-cinzel);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  margin: 0;
  box-shadow: none;
}

.nav-btn:hover,
.nav-btn:focus,
.duhi-nav-btn:hover,
.duhi-nav-btn:focus {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.quiz-footer-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 16px;
}

.quiz-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  margin-top: 24px;
  position: static;
}

.nav-back,
.nav-next {
  min-width: 90px;
  text-align: center;
  position: static;
}

.actions {
  margin-top: 32px;
  text-align: center;
}

#calculate-btn {
  font-family: var(--font-cinzel);
  font-size: 16px;
  letter-spacing: 0.1em;
  padding: 14px 36px;
  border-radius: 999px;
  border: 1px solid #111;
  background: transparent;
  cursor: pointer;
}

.error-text {
  min-height: 20px;
  color: #d64545;
  margin-top: 12px;
}

.result-slide img {
  width: 100%;
  border-radius: 12px;
}

.loader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.loader.hidden {
  display: none;
}

.loader-inner {
  text-align: center;
  color: #fff;
  font-family: var(--font-cinzel);
}

.loader-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

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

@keyframes duhi-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.screen-transition {
  animation: screenBlurIn 0.7s ease-out forwards;
  will-change: filter, opacity;
}

@keyframes screenBlurIn {
  0% {
    filter: blur(14px);
    opacity: 0;
  }
  100% {
    filter: blur(0);
    opacity: 1;
  }
}

@keyframes resultsReveal {
  0% {
    filter: blur(14px);
    opacity: 0;
  }
  100% {
    filter: blur(0);
    opacity: 1;
  }
}

.hidden { display: none !important; }

.is-hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .step {
    padding: 24px 24px 28px;
    margin: 24px auto 32px;
    max-width: 100%;
    max-height: none;
    overflow: visible;
  }

  .love-top {
    height: 50vh;
    min-height: 280px;
  }

  .love-top__content {
    padding: 32px 24px 40px;
  }

  .love-top__index {
    top: 24px;
    right: 24px;
    font-size: 24px;
  }

  .love-top__title,
  .love-top__subtitle {
    font-size: 22px;
  }

  .love-bottom {
    padding: 24px 24px 28px;
  }

  .no-step-top {
    grid-template-columns: 1fr;
    max-width: 600px;
    gap: 24px;
  }

  .no-step-photo--left,
  .no-step-photo--right {
    max-width: 260px;
    margin: 0 auto;
  }

  .no-step-text {
    font-size: 20px;
  }

  .no-step-form {
    max-width: 600px;
    padding: 0 16px;
  }

  .no-step-title {
    font-size: 26px;
  }

}

@media (max-width: 920px) {
  .quiz-options-row {
    grid-template-columns: 1fr;
    column-gap: 32px;
    row-gap: 32px;
  }

}

@media (max-width: 768px) {
  .step {
    padding: 20px 16px 24px;
    margin: 16px auto 24px;
  }

  body.quiz.quiz-pairs-step .app {
    margin-top: 0;
    padding-top: 0;
  }

  body.quiz.quiz-pairs-step .step {
    margin-top: 0;
  }

  .step.step--love {
    margin: 0 auto;
  }

  .love-top {
    height: 45vh;
    min-height: 240px;
  }

  .love-top__title,
  .love-top__subtitle {
    font-size: 18px;
  }

  .love-form__label,
  .love-form__example {
    font-size: 16px;
  }

  .loading-title {
    font-size: 22px;
  }

  .loading-spinner {
    width: 28px;
    height: 28px;
  }

  .step.step--no-step {
    padding: 24px 20px 24px;
  }

  .step--no-step .quiz-step-footer {
    gap: 12px;
  }

  .no-step-title {
    font-size: 24px;
  }

  .no-step-text {
    font-size: 18px;
  }

  .no-step-form {
    max-width: 100%;
    padding: 0 20px;
  }

  .quiz-title-en {
    font-size: 28px;
  }

  .quiz-title-ua {
    font-size: 18px;
  }

  .quiz-step-indicator {
    font-size: 24px;
  }

  .quiz-header {
    flex-direction: column;
    align-items: center;
  }

  .quiz-step-indicator {
    text-align: center;
    padding-top: 0;
  }
}

@media (max-width: 768px) {
  html,
  body {
    height: 100%;
  }

  body.is-loading,
  body.is-results {
    overflow: hidden;
  }

  .loading-screen,
  .results-screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1000;
  }

  .loading-screen {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .loading-screen-bg {
    object-fit: cover;
    background: #fff;
  }

  .loading-title {
    color: #ffffff;
  }

  .loading-spinner {
    border-color: rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
  }

  .results-full-image {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
  }

  .results-screen.results-reveal {
    animation: resultsReveal 1s ease-out forwards;
  }
}

@media (max-width: 640px) {
  .no-step-text {
    font-size: 16px;
  }

  .no-step-photo--left,
  .no-step-photo--right {
    max-width: 200px;
  }
}

.ua-text {
  font-family: "Roboto Flex", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 300;
  font-variation-settings: "wght" 300;
  font-optical-sizing: auto;
}
/* SAVE_TEST: 1 */
