/* Sola Naturals skin — theme foundation (Batch 1)
   Loads after every legacy stylesheet. Two jobs:
   1. Define the --sn-* primitives. layout.jinja maps the canonical --cd-* tokens onto them,
      and the legacy --ab/--kl/--az/--as/--sf-* aliases follow --cd-*.
   2. Provide namespaced primitives (.sn-*) for new sections: container, section rhythm,
      headings, display type and buttons.
   Fonts: Montserrat + Playfair Display (Latin), IBM Plex Sans Arabic + Amiri (Arabic).
   Breakpoints (from the reference): 1600 · 1100 · 900 · 600 · 360.
   Direction: logical properties only, so LTR and RTL share every rule. */

:root {
  color-scheme: light;

  /* ---------- Palette ---------- */
  --sn-green-900: #213f23; /* footer, dark buttons */
  --sn-green-800: #214232; /* header, brand banner */
  --sn-green-700: #2b5340; /* headings, links, accent */
  --sn-green-500: #6ea460; /* announcement bar, primary button */
  --sn-green-300: #95bd6e; /* light button, kicker */
  --sn-forest: #1d4d3b; /* product titles, forest button */
  --sn-brown: #7b4c3e; /* display headings, outline-brown */
  --sn-terracotta: #a85a48;
  --sn-maroon: #8f3541; /* sale, "not" marks */
  --sn-teal: #44948f; /* "New" tag */
  --sn-gold: #c69c3f;
  --sn-star: #f1d302;
  --sn-cream: #f6f2ec;
  --sn-cream-2: #f1ede1;
  --sn-peach: #f9ecde;
  --sn-blush: #fff8f2;
  --sn-grey: #f4f4f4;
  --sn-ink: #111111;
  --sn-ink-hover: #2a2a2a;
  --sn-muted: #5e6b56; /* body copy on cream */
  --sn-muted-ink: #6b6b63; /* fine print, captions */
  --sn-line: #d9d3c5;
  --sn-line-soft: #e6e2d6;
  --sn-page: #ffffff;
  --sn-surface: #ffffff;

  /* Accent slot consumed through --cd-gold (links, prices, outline buttons, eyebrows) */
  --sn-accent: var(--sn-green-700);
  --sn-accent-hover: var(--sn-green-900);
  --sn-accent-tint: rgba(43, 83, 64, 0.3);
  --sn-accent-soft: rgba(43, 83, 64, 0.1);

  /* ---------- Type ---------- */
  --sn-font-sans:
    "Montserrat", "IBM Plex Sans Arabic", "Helvetica Neue", Arial, sans-serif;
  --sn-font-display: "Playfair Display", "Amiri", Georgia, serif;
  --sn-fs-body: 14px;
  --sn-lh-body: 1.5;
  --sn-fs-small: 12px;
  --sn-fs-lead: 18px;
  --sn-fs-section: 17px; /* section-head h2: bold sans */
  --sn-fs-display: clamp(40px, 4.4vw, 58px); /* serif italic display */
  --sn-fs-display-sm: clamp(34px, 3.4vw, 46px);
  --sn-fs-hero: clamp(38px, 3.8vw, 52px);
  --sn-fs-kicker: clamp(28px, 2.8vw, 38px);

  /* ---------- Layout ---------- */
  --sn-wrap: 1240px;
  --sn-wrap-narrow: 1040px;
  --sn-pad: clamp(20px, 4.6vw, 62px);
  --sn-section-y: clamp(48px, 7vw, 96px);
  --sn-head-gap: clamp(28px, 4vw, 44px);

  /* ---------- Shape & depth ---------- */
  --sn-radius-pill: 999px;
  --sn-radius-card: 2px;
  --sn-radius-sm: 4px;
  --sn-shadow-card: 0 2px 6px rgba(80, 60, 20, 0.08);
  --sn-shadow-lift: 0 10px 22px rgba(20, 40, 25, 0.22);
  --sn-shadow-pop: 0 18px 40px rgba(20, 30, 20, 0.14);
  --sn-focus: 0 0 0 3px rgba(110, 164, 96, 0.45);

  /* ---------- Motion ---------- */
  --sn-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sn-ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ---------- Buttons (also consumed by the legacy button block in cd-bridge.css) ---------- */
  --sn-btn-h: 38px;
  --sn-btn-px: 24px;
  --sn-btn-fs: 13px;
  --sn-btn-fw: 600;
  --sn-btn-ls: 0.02em;
  --sn-btn-tt: uppercase;
  --sn-btn-bw: 1.5px;
  --sn-btn-radius: var(--sn-radius-pill);
  --sn-btn-primary: var(--sn-green-500, #6ea460);
  --sn-btn-primary-hover: #5d9150;
  --sn-btn-fill: var(--sn-btn-primary);
  --sn-btn-fill-hover: var(--sn-btn-primary-hover);
  --sn-btn-transition:
    background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.35s var(--sn-ease-back), box-shadow 0.35s ease;
}

/* Arabic: Plex reads small at 14px, and the Latin tracking/uppercase rules don't apply */
html[lang="ar"] {
  --sn-fs-body: 15px;
  --sn-btn-ls: 0;
  --sn-btn-fs: 14px;
}

@media (min-width: 1600px) {
  :root {
    --sn-wrap: 1400px;
    --sn-fs-body: 15px;
  }
}
@media (max-width: 600px) {
  :root {
    --sn-pad: 20px;
    --sn-section-y: 64px;
    --sn-btn-h: 48px;
    --sn-btn-fs: 15px;
    --sn-fs-section: 28px;
    --sn-fs-display: 40px;
    --sn-fs-display-sm: 34px;
    --sn-fs-hero: 42px;
    --sn-fs-kicker: 24px;
  }
}
@media (max-width: 360px) {
  :root {
    --sn-pad: 16px;
    --sn-fs-section: 24px;
    --sn-fs-display: 34px;
    --sn-fs-display-sm: 30px;
    --sn-fs-hero: 36px;
  }
}

/* ---------- Base ---------- */
body {
  line-height: var(--sn-lh-body);
}
/* cd-bridge.css sets a 300 (light) base weight; the reference reads at 400 and uses 300 only for prose */
body,
.app-content {
  font-weight: 400;
}
/* global.css hardcodes these utilities to Cairo; route them through the theme stacks */
.font-body {
  font-family: var(--cd-font-body, var(--sn-font-sans));
}
.font-display {
  font-family: var(--cd-font-heading, var(--sn-font-sans));
}
:where(
  a,
  button,
  [role="button"],
  input,
  select,
  textarea,
  summary,
  [tabindex]
):focus-visible {
  outline: 2px solid var(--sn-green-700);
  outline-offset: 2px;
}

/* ---------- Container (100% matched to sola-naturals-site/index.html) ---------- */
.sn-wrap,
.wrap,
.container {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: calc(var(--sn-wrap) + var(--sn-pad) * 2) !important;
  margin-inline: auto !important;
  padding-inline: var(--sn-pad) !important;
}
.sn-wrap--narrow,
.wrap-narrow {
  max-width: calc(var(--sn-wrap-narrow) + var(--sn-pad) * 2) !important;
}
@media (max-width: 600px) {
  .wrap:not(.have-padding) {
    padding-inline: 0 !important;
  }
}
/* ---------- Section rhythm ---------- */
.sn-section {
  position: relative;
  padding-block: var(--sn-section-y);
}
.sn-bg-cream {
  background: var(--sn-cream);
}
.sn-bg-cream-2 {
  background: var(--sn-cream-2);
}
.sn-bg-peach {
  background: var(--sn-peach);
}
.sn-bg-blush {
  background: var(--sn-blush);
}
.sn-bg-grey {
  background: var(--sn-grey);
}
.sn-bg-green {
  background: var(--sn-green-800);
  color: #fff;
}

/* Existing Chrono Dial homepage sections share the same vertical rhythm and gutter.
   (The hero is excluded: it sizes itself.) */
.cd-dual-banner,
.cd-story,
.cd-dials,
.cd-cat-slider,
.cd-gift-banner,
.cd-brand-logos {
  padding-block: var(--sn-section-y);
  padding-inline: var(--sn-pad);
}

/* ---------- Headings ---------- */
.sn-section-head {
  text-align: center;
  max-width: 470px;
  margin-inline: auto;
  margin-block-end: var(--sn-head-gap);
}
.sn-section-head__title {
  margin: 0 0 14px;
  font-family: var(--sn-font-sans);
  font-size: var(--sn-fs-section);
  font-weight: 700;
  line-height: 1.15;
  color: var(--sn-ink);
}
.sn-section-head__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}
.sn-eyebrow {
  margin: 0 0 8px;
  font-size: var(--sn-fs-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sn-muted-ink);
}
.sn-display {
  margin: 0;
  font-family: var(--sn-font-display);
  font-size: var(--sn-fs-display);
  font-weight: 400;
  font-style: italic;
  line-height: 1.05;
  color: var(--sn-brown);
}
.sn-display--sm {
  font-size: var(--sn-fs-display-sm);
}
.sn-display em {
  font-style: italic;
}
.sn-kicker {
  margin: 0 0 16px;
  font-family: var(--sn-font-display);
  font-size: var(--sn-fs-kicker);
  font-style: italic;
  line-height: 1.1;
  color: var(--sn-green-300);
}
.sn-rule {
  display: block;
  width: 312px;
  max-width: 70%;
  margin-block: 22px clamp(26px, 4vw, 46px);
  margin-inline: 0;
  border: 0;
  border-block-start: 1px solid var(--sn-brown);
  opacity: 0.75;
}
.sn-prose {
  color: var(--sn-brown);
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.55;
}
.sn-prose > * + * {
  margin-block-start: 20px;
}
.sn-prose strong {
  font-weight: 700;
}
.sn-lead {
  font-size: var(--sn-fs-lead);
  font-weight: 700;
}

/* Arabic display: Amiri reads best upright; uppercase/tracking are Latin-only */
html[lang="ar"] .sn-display,
html[lang="ar"] .sn-kicker {
  font-style: normal;
  line-height: 1.3;
}
html[lang="ar"] .sn-eyebrow {
  letter-spacing: 0;
}

/* ---------- Buttons ---------- */
.sn-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--sn-btn-h);
  padding: 8px var(--sn-btn-px);
  border: var(--sn-btn-bw) solid transparent;
  border-radius: var(--sn-btn-radius);
  background: transparent;
  color: inherit;
  font-family: var(--sn-font-sans);
  font-size: var(--sn-btn-fs);
  font-weight: var(--sn-btn-fw);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--sn-btn-transition);
}
.sn-btn:hover {
  text-decoration: none;
}
.sn-btn:disabled,
.sn-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}
.sn-btn--primary {
  background: var(--sn-btn-primary);
  color: #fff;
  text-transform: var(--sn-btn-tt);
  letter-spacing: var(--sn-btn-ls);
}
.sn-btn--primary:hover {
  background: var(--sn-btn-primary-hover);
  color: #fff;
}
.sn-btn--light {
  background: var(--sn-green-300);
  color: #fff;
  font-size: 17px;
  min-height: 40px;
  padding-inline: 46px;
}
.sn-btn--light:hover {
  background: var(--sn-green-500);
  color: #fff;
}
.sn-btn--dark {
  background: var(--sn-green-900);
  color: #fff;
}
.sn-btn--dark:hover {
  background: var(--sn-forest);
  color: #fff;
}
.sn-btn--forest {
  background: var(--sn-btn-primary);
  color: #fff;
}
.sn-btn--forest:hover {
  background: var(--sn-btn-primary-hover);
  color: #fff;
}
.sn-btn--outline {
  border-color: var(--sn-green-700);
  color: var(--sn-green-700);
}
.sn-btn--outline:hover {
  background: var(--sn-green-700);
  color: #fff;
}
.sn-btn--outline-brown {
  border-color: var(--sn-brown);
  color: var(--sn-brown);
}
.sn-btn--outline-brown:hover {
  background: var(--sn-brown);
  color: #fff;
}
.sn-btn--outline-ink {
  border-color: var(--sn-ink);
  color: var(--sn-ink);
}
.sn-btn--outline-ink:hover {
  background: var(--sn-ink);
  color: #fff;
}
.sn-btn--soft {
  background: var(--sn-cream-2);
  border-color: #8a9a85;
  color: var(--sn-muted);
  font-weight: 500;
}
.sn-btn--sm {
  min-height: 28px;
  padding: 5px 14px;
  font-size: 11px;
}
.sn-btn--block {
  width: 100%;
}
@media (max-width: 600px) {
  .sn-btn {
    white-space: normal;
  }
  .sn-btn--sm {
    min-height: 44px;
    font-size: 12.5px;
    padding-inline: 18px;
  }
}

/* Arrow glyph used inside buttons and links; points forward in either direction */
.sn-arrow {
  position: relative;
  display: inline-block;
  flex: none;
  width: 26px;
  height: 10px;
}
.sn-arrow::before {
  content: "";
  position: absolute;
  inset-inline: 0 1px;
  top: 4px;
  border-block-start: 1.5px solid currentColor;
}
.sn-arrow::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.5px;
  border-block-start: 1.5px solid currentColor;
  border-inline-end: 1.5px solid currentColor;
  transform: rotate(45deg);
}
[dir="rtl"] .sn-arrow::after {
  transform: rotate(-45deg);
}

/* Legacy buttons (.ab-btn / .cd-btn / ATC …) get the pill shape and sizing through the
   --sn-btn-* tokens consumed in cd-bridge.css; nothing to override here. */

/* =====================================================
   Full Interactive Quiz System (.quiz)
   ===================================================== */
.quiz {
  background: var(--sn-cream, #f7f2eb);
  padding-block: clamp(30px, 4vw, 50px);
  overflow: hidden;
  min-height: 80vh;
}
.quiz .wrap,
.quiz-wrap {
  max-width: var(--sn-wrap, 1240px);
  margin-inline: auto;
  padding-inline: clamp(16px, 3.5vw, 40px);
}
.quiz-grid {
  display: grid;
  grid-template-columns: minmax(0, 28fr) minmax(0, 34fr) minmax(0, 28fr);
  gap: clamp(24px, 3.8vw, 60px);
  align-items: start;
}
.quiz-grid.no-art {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
}
.quiz-intro {
  padding-top: clamp(20px, 4vw, 80px);
}
.quiz-intro .squiggle {
  margin: 0 0 24px;
  max-width: 140px;
}
.quiz-intro h1 {
  font-family: var(--sn-font-sans);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 700;
  color: var(--sn-green-900, #213f23);
  margin-bottom: 14px;
}
.quiz-intro p {
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--sn-muted, #5e6b56);
}
.quiz-intro .script {
  width: clamp(150px, 16vw, 190px);
  margin-block-start: clamp(36px, 5vw, 76px);
  margin-inline-start: 40px;
  opacity: 0.9;
}

.progress {
  height: 7px;
  border-radius: 999px;
  background: #dcd6c8;
  position: relative;
  overflow: hidden;
}
.progress i {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  background: var(--sn-green-700, #2b5340);
  border-radius: 999px;
  transition: width 0.4s var(--sn-ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}
.progress-count {
  text-align: end;
  font-size: 11px;
  font-weight: 600;
  color: var(--sn-muted, #5e6b56);
  margin: 8px 0 20px 0;
}
.quiz-q h2 {
  font-family: var(--sn-font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.25;
  color: var(--sn-green-900, #213f23);
  margin-bottom: 8px;
}
html[lang="ar"] .quiz-q h2 {
  font-style: normal;
}
.quiz-q .hint {
  font-size: 13.5px;
  color: var(--sn-muted-ink, #6b6b63);
  margin-bottom: 22px;
}
.answers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.answer {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fbf9f3;
  border: 2px solid #ebe5d9;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.answer:hover {
  border-color: var(--sn-green-500, #6ea460);
  background: #fff;
}
.answer.is-active {
  border-color: var(--sn-forest, #1d4d3b);
  background: #fff;
  box-shadow: 0 4px 12px rgba(29, 77, 59, 0.08);
}
.answer-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #cfc9bb;
  border-radius: 10px;
  color: var(--sn-ink, #141412);
  background: #fff;
  transition: all 0.2s ease;
}
.answer.is-active .answer-icon {
  border-color: var(--sn-forest, #1d4d3b);
  color: #fff;
}
.answer-icon svg {
  width: 22px;
  height: 22px;
}
.answers div {
  flex: 1;
  font-size: 14px;
  line-height: 1.35;
  color: var(--sn-muted, #5e6b56);
}
.answers strong {
  display: block;
  color: var(--sn-ink, #141412);
  font-weight: 600;
}
.answer-caret {
  font-size: 14px;
  color: #999;
  flex: none;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}
.answer:hover .answer-caret,
.answer.is-active .answer-caret {
  color: var(--sn-forest, #1d4d3b);
  transform: translateX(3px);
}
[dir="rtl"] .answer:hover .answer-caret,
[dir="rtl"] .answer.is-active .answer-caret {
  transform: translateX(-3px);
}
.quiz-step {
  display: none;
}
.quiz-step.is-active {
  display: block;
  animation: quizStepFade 0.3s ease;
}
@keyframes quizStepFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--sn-line-soft, #e6e2d6);
}
.quiz-back {
  font-weight: 600;
  font-size: 14px;
  color: var(--sn-muted, #5e6b56);
  text-decoration: none;
  transition: color 0.2s ease;
}
.quiz-back:hover {
  color: var(--sn-green-900, #213f23);
  text-decoration: underline;
}
.quiz-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  color: var(--sn-forest, #1d4d3b);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}
.quiz-next:hover {
  color: var(--sn-green-900, #213f23);
  transform: translateX(2px);
}
[dir="rtl"] .quiz-next:hover {
  transform: translateX(-2px);
}
.quiz-result h2 {
  font-size: clamp(24px, 2.5vw, 32px);
  margin-bottom: 12px;
}
.result-text {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--sn-muted, #5e6b56);
  margin-bottom: 24px;
}
.result-recommendation {
  background: var(--sn-cream, #f6f2ec);
  border: 1.5px solid var(--sn-green-500, #6ea460);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.result-recommendation img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex: none;
}
.result-recommendation h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--sn-forest, #1d4d3b);
}
.result-recommendation p {
  margin: 0;
  font-size: 13px;
  color: var(--sn-muted, #5e6b56);
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.result-actions .sn-btn {
  white-space: nowrap;
}
.quiz-art {
  position: relative;
  margin-top: clamp(20px, 4vw, 78px);
}
.quiz-art .art-img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
}
.quiz-art .sticker {
  position: absolute;
  inset-inline-end: -6%;
  top: 46%;
  width: 32%;
  max-width: 130px;
  animation: sn-float 4s ease-in-out infinite alternate;
}
@keyframes sn-float {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

@media (max-width: 1024px) {
  .quiz-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .quiz-intro {
    padding-top: 10px;
    text-align: center;
  }
  .quiz-intro .squiggle {
    margin-inline: auto;
  }
  .quiz-intro .script {
    margin: 20px auto 0;
  }
  .quiz-art {
    max-width: 420px;
    margin: 24px auto 0;
  }
}

/* =====================================================
   Home: Quiz Teaser Section (.teaser)
   ===================================================== */
.teaser {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  max-width: 1040px;
  margin-inline: auto;
}
.teaser .kicker {
  font-size: 14px;
  text-transform: uppercase;
  color: var(--sn-green-900, #213f23);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  font-weight: 600;
}
.teaser h2 {
  font-family: var(--sn-font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.8vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--sn-green-900, #213f23);
  margin-bottom: 18px;
}
html[lang="ar"] .teaser h2 {
  font-style: normal;
  line-height: 1.25;
}
.teaser p {
  font-size: 15px;
  line-height: 1.45;
  color: var(--sn-muted, #5e6b56);
  max-width: 440px;
  margin-bottom: 26px;
}
.teaser-art {
  position: relative;
  padding-inline-end: 13%;
}
.teaser-art > img:first-child {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
}
.teaser-art .sticker {
  position: absolute;
  inset-inline-end: 0;
  top: 10%;
  width: 28%;
  max-width: 110px;
}
.teaser-art .loop {
  position: absolute;
  inset-inline-end: 9%;
  top: 48%;
  width: 24%;
  max-width: 90px;
}
@media (max-width: 800px) {
  .teaser {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .teaser p {
    margin-inline: auto;
  }
  .teaser-art {
    max-width: 380px;
    margin-inline: auto;
    padding-inline-end: 0;
  }
  .teaser .sn-btn {
    margin-inline: auto;
  }
}
