:root {
  color-scheme: light;
  --burgundy: #842a3d;
  --plum: #271619;
  --blush: #fac7cc;
  --sage: #9bae98;
  --forest: #304125;
  --paper: #faf6ef;
  --cream: #f4eee6;
  --bone: #ede6da;
  --graphite: #3b2a2d;
  --ink: var(--plum);
  --paper-deep: var(--bone);
  --accent: var(--burgundy);
  --muted: #6c5a5d;
  --line: rgba(39, 22, 25, 0.2);
  --max: 1180px;
  font-family: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: var(--same-pf-viewport, 100vh);
  margin: 0;
  background: var(--paper);
}

/* Embedded in the Elementor page: the host frame is resized to this document, so the
   inner scrollbar is redundant. Scrolling still works if the host script never runs. */
html.is-embedded {
  scrollbar-width: none;
}

html.is-embedded::-webkit-scrollbar {
  width: 0;
  height: 0;
}

button,
select,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--ink);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  width: min(calc(100% - 2rem), var(--max));
  min-height: 5.25rem;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: inherit;
  font-family: Gloock, Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.06em;
  text-decoration: none;
}

.release-label {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
}

.screen {
  width: min(calc(100% - 2rem), var(--max));
  min-height: calc(var(--same-pf-viewport, 100vh) - 5.25rem);
  margin: auto;
  padding: clamp(3rem, 8vw, 7rem) 0;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.display {
  max-width: 950px;
  margin-bottom: 1.5rem;
  font-family: Gloock, Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 10vw, 8.8rem);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

.intro-copy {
  max-width: 36rem;
  margin-bottom: 2.25rem;
  color: #37352f;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.identity-form,
.delivery-form {
  max-width: 34rem;
  display: grid;
  gap: 0.8rem;
}

.identity-form label,
.delivery-form label {
  font-size: 0.82rem;
  font-weight: 700;
}

.identity-form input,
.delivery-form input {
  width: 100%;
  min-height: 3.4rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
}

.identity-form .button,
.delivery-form .button {
  justify-self: start;
  margin-top: 0.35rem;
}

.privacy-copy,
.form-error,
.result-teaser,
.preview-notice,
.delivery-confirmation {
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.form-error {
  color: var(--burgundy);
  font-weight: 700;
}

.preview-notice {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--sage);
  background: rgba(255, 255, 255, 0.5);
}

.delivery-confirmation {
  color: var(--forest);
  font-weight: 700;
}

.result-teaser {
  margin-top: 3rem;
}

.button {
  min-height: 3.3rem;
  padding: 0.9rem 1.35rem;
  border: 1px solid var(--burgundy);
  border-radius: 0;
  color: var(--paper);
  background: var(--burgundy);
  cursor: pointer;
  font-weight: 700;
}

.button:hover {
  color: var(--paper);
  background: var(--forest);
  border-color: var(--forest);
}

.button.secondary {
  color: var(--ink);
  background: transparent;
}

.button.secondary:hover {
  color: var(--paper);
  background: var(--plum);
  border-color: var(--plum);
}

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

.share-note,
.governance-note {
  max-width: 42rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.45);
  color: #48443d;
  font-size: 0.86rem;
  line-height: 1.5;
}

.quiz-shell {
  max-width: 920px;
}

.progress-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: clamp(3rem, 8vw, 6rem);
}

.progress-number {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.progress-track {
  height: 2px;
  background: var(--line);
}

.progress-track>span {
  display: block;
  height: 100%;
  background: var(--ink);
  transition: width 260ms ease;
}

.question-title {
  max-width: 850px;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  font-family: Gloock, Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4.3rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.03;
}

.question-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  object-fit: cover;
  background: var(--bone);
}

.answers {
  display: grid;
  gap: 0.75rem;
  border: 0;
  padding: 0;
  margin: 0;
}

.answers.has-visuals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.answer {
  width: 100%;
  min-height: 4.5rem;
  display: grid;
  grid-template-columns: 2.3rem 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0;
  color: inherit;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
  text-align: left;
}

.answer:hover,
.answer[aria-checked="true"] {
  border-color: var(--burgundy);
  background: #fff;
}

.answer[aria-checked="true"] {
  box-shadow: inset 5px 0 0 var(--burgundy);
}

.answer-key {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.answer-copy {
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.35;
}

.answer--visual {
  grid-template-columns: 2.3rem 1fr;
  align-content: start;
}

.answer-visual {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bone);
}

.quiz-actions {
  margin-top: 1.5rem;
}

.back-button {
  padding: 0.7rem 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.result-header {
  max-width: 100%;
  margin-bottom: 2.5rem;
  padding: clamp(2rem, 6vw, 5rem);
  color: var(--paper);
  background: var(--burgundy);
}

.result-header .eyebrow {
  color: #fff;
}

.result-name {
  text-transform: uppercase;
}

.character-line {
  max-width: 650px;
  margin-bottom: 2rem;
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  line-height: 1.45;
}

.secondary-reveal {
  max-width: 650px;
  margin: 2.5rem 0 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(250, 246, 239, 0.45);
}

.secondary-reveal strong {
  display: block;
  margin-top: 0.35rem;
  font-family: Gloock, Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
}

.recommendation-heading {
  margin: 5rem 0 1.5rem;
  font-family: Gloock, Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.7rem);
  font-weight: 400;
}

.preference {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 1.5rem 0 2.25rem;
}

.preference span {
  margin-right: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.preference button {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.preference button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--burgundy);
  border-color: var(--burgundy);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.explore-cards {
  margin-top: 1rem;
}

.scent-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: var(--cream);
}

.card-role {
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.product-image {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: contain;
  background: var(--paper-deep);
}

.product-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  background: var(--blush);
  color: var(--burgundy);
  font-family: Gloock, Georgia, serif;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}

.scent-card:nth-child(2) .product-placeholder {
  background: var(--sage);
  color: var(--plum);
}

.scent-card:nth-child(3) .product-placeholder {
  background: var(--bone);
  color: var(--plum);
}

.scent-card h3 {
  margin: 1.25rem 0 0.35rem;
  font-family: Gloock, Georgia, serif;
  font-size: 1.65rem;
  font-weight: 400;
}

.scent-code {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
}

.match-reason {
  flex: 1;
  margin: 1rem 0;
  color: #48443d;
  font-size: 0.92rem;
  line-height: 1.5;
}

.scent-price {
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}

.scent-meta {
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.card-link {
  color: #842a3d;
  font-size: 14px;
  font-weight: 800;
  text-underline-offset: 0.25rem;
}

.unavailable {
  color: var(--muted);
  font-size: 0.78rem;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 3rem;
}

@media (max-width: 760px) {
  .site-header {
    min-height: 4.5rem;
  }

  .release-label {
    max-width: 10rem;
    text-align: right;
  }

  /* The host viewport, never a bare `100vh`. Inside the embed `100vh` is this
     frame's own height, and the host sets that height from the height this
     document reports back to it. A screen measured against it therefore feeds
     itself: the report grows the frame, the taller frame grows the screen, the
     ResizeObserver reports again, and the exchange never settles. Under 760px
     — every phone — that ran away on load and the page stopped accepting
     input. The rule outside this query has always used the variable; this one
     was the only place in the stylesheet that did not. */
  .screen {
    min-height: calc(var(--same-pf-viewport, 100vh) - 4.5rem);
    padding: 3.25rem 0;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .answers.has-visuals {
    grid-template-columns: 1fr;
  }

  .scent-card {
    padding: 1rem;
  }

  .card-role {
    margin-bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------------
   Arabic copy/RTL overlay. Additive only: the English layout above is untouched
   and every rule here is scoped to html[dir="rtl"] or an Arabic-only class.
   --------------------------------------------------------------------------- */

.intro-copy--stacked {
  display: grid;
  gap: 0.85rem;
}

.personality-description {
  max-width: 760px;
  margin-bottom: 2.5rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.85;
}

.availability-note {
  max-width: 42rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .display,
html[dir="rtl"] .question-title {
  letter-spacing: 0;
  line-height: 1.25;
}

html[dir="rtl"] .answer {
  text-align: right;
}

/* SAME codes, answer keys and prices stay left-to-right inside Arabic text. */
html[dir="rtl"] .answer-key,
html[dir="rtl"] .scent-code,
html[dir="rtl"] .scent-card h3,
html[dir="rtl"] [data-code] {
  direction: ltr;
  unicode-bidi: isolate;
}

html[dir="rtl"] .answer[aria-checked="true"] {
  box-shadow: inset -5px 0 0 var(--burgundy);
}

html[dir="rtl"] .share-note,
html[dir="rtl"] .governance-note,
html[dir="rtl"] .preview-notice {
  border-left: 0;
  border-right: 3px solid var(--ink);
}

html[dir="rtl"] .preview-notice {
  border-right-color: var(--sage);
}

html[dir="rtl"] .identity-form .button,
html[dir="rtl"] .delivery-form .button {
  justify-self: start;
}

html[dir="rtl"] input[dir="ltr"] {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

html[dir="rtl"] .preference span {
  margin-right: 0;
  margin-left: 0.5rem;
}

/* The untranslated English fragrance prose is withheld in Arabic, so the price
   carries the stretch that .match-reason provides on the English card. */
html[dir="rtl"] .scent-price {
  margin-top: auto;
  padding-top: 1rem;
}

@media (max-width: 760px) {
  html[dir="rtl"] .preference span {
    flex-basis: 100%;
    margin: 0 0 0.35rem;
  }

  html[dir="rtl"] .result-name {
    font-size: clamp(2.6rem, 13vw, 4.6rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  html[dir="rtl"] .result-header {
    padding-inline: 1.25rem;
  }
}

/* ---------------------------------------------------------------------------
   Typography. The frame is isolated from the theme, so it sets its own faces:
   Quattrocento for English, Tajawal for Arabic — matching the rest of the site.
   The webfont itself is loaded per language from the embed <head>.
   --------------------------------------------------------------------------- */

html:not([dir="rtl"]) body,
html:not([dir="rtl"]) body * {
  font-family: "Quattrocento", Georgia, "Times New Roman", serif !important;
}

html[dir="rtl"] body,
html[dir="rtl"] body * {
  font-family: Tajawal, sans-serif !important;
}
