/* Qamara design for Divi. Everything is scoped to body.qamara. */
body.qamara {
  --bg: #FBF7F4;
  --surface: #FFFFFF;
  --text: #2A1F2B;
  --muted: #6B5D69;
  --plum: #5B2A55;
  --plum-deep: #3A1C3E;
  --rose: #C74B6D;
  --rose-soft: #F7DDE3;
  --cream: #FFF3E3;
  --line: #E9DFE3;
  --teal: #2E9C93;
  --teal-soft: #D5EFEC;
  --ring-base: #EADFE5;
  background: var(--bg);
  color: var(--text);
  font-family: "Figtree", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}
body.qamara #page-container, body.qamara #main-content, body.qamara .et_pb_section { background-color: var(--bg); }
body.qamara h1, body.qamara h2, body.qamara h3, body.qamara h4, body.qamara .et_pb_module_header {
  font-family: "Fraunces", Georgia, serif; font-weight: 600; color: var(--text); line-height: 1.15; text-wrap: balance;
}
body.qamara h1 { font-size: clamp(40px, 6vw, 64px); }
body.qamara h2 { font-size: clamp(30px, 4vw, 44px); padding-bottom: 12px; }
body.qamara p, body.qamara li { color: var(--muted); }
body.qamara a { color: var(--rose); }
body.qamara .et_pb_section { padding: 56px 0; }
body.qamara .et_pb_row.qm-row { max-width: 1120px; width: 90%; padding: 12px 0; }
body.qamara .section-head { max-width: 640px; }
body.qamara .section-head p { font-size: 19px; }

/* Buttons */
body.qamara .et_pb_button.qm-btn, body.qamara .qm-btn .et_pb_button {
  font-family: "Figtree", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: 0;
  background: var(--text); color: var(--bg) !important; border: 0; border-radius: 16px; padding: 14px 24px !important;
}
body.qamara .et_pb_button.qm-btn:hover { padding: 14px 24px !important; opacity: 0.9; }
body.qamara .et_pb_button.qm-btn::after { display: none; }
body.qamara .et_pb_button.qm-btn-secondary { background: transparent; color: var(--text) !important; border: 1.5px solid var(--line); }
body.qamara .et_pb_button_module_wrapper { display: inline-block; margin: 8px 12px 0 0; }

/* Hero */
body.qamara .qm-hero .eyebrow { display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rose); margin-bottom: 12px; }
body.qamara .qm-hero .lede { font-size: 21px; max-width: 34ch; }
body.qamara .promise { display: flex; flex-wrap: wrap; gap: 20px; padding: 0; list-style: none; font-size: 16px; }
body.qamara .promise li { display: flex; align-items: center; gap: 8px; }
body.qamara .promise svg, body.qamara .privacy-list svg { color: var(--rose); flex-shrink: 0; }

/* Try it: the cycle ring */
body.qamara .tryit { background: var(--surface); border: 1px solid var(--line); border-radius: 32px; padding: 28px; display: grid; gap: 20px; justify-items: center; }
body.qamara .ring-wrap { position: relative; width: min(260px, 100%); aspect-ratio: 1; }
body.qamara #ring { width: 100%; height: 100%; display: block; }
body.qamara .seg { fill: none; stroke-width: 22; transition: stroke 0.25s ease; }
body.qamara .seg-base { stroke: var(--ring-base); }
body.qamara .seg-period { stroke: var(--rose); }
body.qamara .seg-fertile { stroke: var(--teal-soft); }
body.qamara .seg-ovulation { stroke: var(--teal); }
body.qamara .marker { fill: var(--cream); stroke: var(--plum-deep); stroke-width: 3; }
body.qamara .ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
body.qamara .ring-big { font-family: "Fraunces", Georgia, serif; font-size: 64px; line-height: 1; color: var(--text); }
body.qamara .ring-small { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
body.qamara .try-form { width: 100%; display: grid; gap: 8px; }
body.qamara .try-title { font-weight: 700; color: var(--text); margin: 0; padding: 0; }
body.qamara .try-form label { font-size: 15px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
body.qamara .try-form output { color: var(--text); font-weight: 700; }
body.qamara .try-form input[type="date"] { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 44px; width: 100%; }
body.qamara body.qamara .try-results { width: 100%; margin: 0; display: grid; gap: 10px; }
body.qamara .try-results div { display: flex; justify-content: space-between; gap: 12px; }
body.qamara .try-results dt { display: flex; align-items: center; gap: 10px; color: var(--muted); }
body.qamara .try-results dd { margin: 0; font-weight: 700; color: var(--text); }
body.qamara .key { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
body.qamara .key-period { background: var(--rose); }
body.qamara .key-fertile { background: var(--teal-soft); border: 1px solid var(--teal); }
body.qamara .key-ovulation { background: var(--teal); }
body.qamara .try-note { font-size: 14px; margin: 0; padding: 0; }

/* Feature blurbs */
body.qamara .qm-feature { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; height: 100%; }
body.qamara .qm-feature .et_pb_module_header { font-size: 22px; padding-bottom: 8px; }
body.qamara .qm-feature p { font-size: 17px; }

/* App screens */
body.qamara .showcase { display: grid; gap: 24px; justify-items: center; }
body.qamara .tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
body.qamara .tabs button { touch-action: manipulation; font: inherit; font-weight: 600; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 20px; min-height: 44px; cursor: pointer; }
body.qamara .tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
body.qamara .showcase-body { display: grid; gap: 16px; justify-items: center; }
body.qamara .showcase-caption { max-width: 40ch; text-align: center; margin: 0; }
body.qamara .phone { width: min(300px, 80vw); border-radius: 46px; padding: 10px; background: var(--plum-deep); box-shadow: 0 30px 60px -20px rgba(58, 28, 62, 0.45); }
body.qamara .phone img { border-radius: 36px; display: block; width: 100%; height: auto; }

/* Privacy band */
body.qamara .qm-privacy.et_pb_section { background: var(--bg); }
body.qamara .privacy-band { background: var(--plum-deep); border-radius: 36px; padding: 56px; }
body.qamara .privacy-band h2 { color: var(--cream); }
body.qamara .privacy-band p { color: #D9C9D6; }
body.qamara .privacy-band a { color: #F08AA4; }
body.qamara .privacy-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; padding: 0 !important; margin: 24px 0; list-style: none; }
body.qamara .privacy-list li { display: flex; gap: 12px; align-items: flex-start; color: #F5ECEF; }
body.qamara .privacy-list svg { color: #F08AA4; margin-top: 4px; }

/* Story */
body.qamara .story { max-width: 720px; }
body.qamara .story p { font-size: 20px; }
body.qamara .story .sign { font-family: "Fraunces", serif; font-style: italic; }

/* FAQ toggles */
body.qamara .qm-faq.et_pb_toggle { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px; margin-bottom: 12px; max-width: 820px; }
body.qamara .qm-faq .et_pb_toggle_title { font-family: "Figtree", sans-serif; font-weight: 700; font-size: 18px; color: var(--text); }
body.qamara .qm-faq .et_pb_toggle_title::before { color: var(--rose); }

/* Privacy policy page */
body.qamara .qm-policy .doc { max-width: 760px; }
body.qamara .qm-policy .doc h2 { font-size: 28px; padding-top: 24px; }

/* Header and footer */
body.qamara #main-header { box-shadow: none; border-bottom: 1px solid var(--line); }
body.qamara #top-menu a { font-family: "Figtree", sans-serif; font-weight: 500; color: var(--muted); }
body.qamara #main-footer { background: var(--plum-deep); }

@media (max-width: 980px) {
  body.qamara .privacy-band { padding: 36px 24px; border-radius: 28px; }
  body.qamara .privacy-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { body.qamara .seg { transition: none; } }
body.qamara :focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }

/* ---- Header and footer: Qamara's replace Divi's (as on Mihrabi) ---- */
#top-header, #main-header, .et_search_outer, #main-footer { display: none !important; }
#page-container { padding-top: 0 !important; margin-top: 0 !important; }
.qm-header { position: sticky; top: 0; z-index: 9999; background: rgba(251, 247, 244, 0.92); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid #E9DFE3; }
body.admin-bar .qm-header { top: 32px; }
.qm-header__inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; gap: 28px; }
.qm-brand { display: inline-flex; align-items: center; gap: 10px; color: #2A1F2B !important; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 22px; }
.qm-brand img { width: 36px; height: 36px; border-radius: 9px; }
.qm-nav { display: flex; gap: 26px; margin-left: auto; }
.qm-nav a { color: #6B5D69 !important; font-weight: 600; font-size: 15px; }
.qm-nav a:hover { color: #C74B6D !important; }
.qm-cta { background: #2A1F2B; color: #FBF7F4 !important; font-weight: 700; font-size: 14px; padding: 9px 18px; border-radius: 999px; white-space: nowrap; }
.qm-cta:hover { opacity: 0.9; }
.qm-footer { background: #3A1C3E; color: rgba(255, 255, 255, 0.75); text-align: center; padding: 48px 20px 40px; font-size: 15px; }
.qm-footer__icon { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 14px; }
.qm-footer nav { display: flex; gap: 10px; justify-content: center; margin-bottom: 6px; }
.qm-footer nav a { color: #FFFFFF; font-weight: 600; }
.qm-footer nav span { color: rgba(255, 255, 255, 0.5); }
.qm-footer p { padding: 0; margin-bottom: 18px; color: rgba(255, 255, 255, 0.75); }
.qm-footer__novita { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.6) !important; }
.qm-footer__novita img { height: 18px; width: auto; }
.qm-footer .qm-footer__note { max-width: 560px; margin: 18px auto 0; font-size: 13px; color: rgba(255, 255, 255, 0.55); }
#get, #download, #features, #privacy, #faq, #support { scroll-margin-top: 90px; }
html { scroll-behavior: smooth; }
@media (max-width: 782px) { body.admin-bar .qm-header { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .qm-header { top: 0; } }
@media (max-width: 640px) {
  .qm-header__inner { padding: 0 16px; height: 60px; gap: 14px; }
  .qm-brand span { display: none; }
  .qm-nav { gap: 16px; }
  .qm-nav a { font-size: 14px; }
  .qm-cta { padding: 8px 14px; font-size: 13px; }
}

/* ---- Store badges ---- */
body.qamara .soon { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rose); padding-bottom: 10px !important; margin: 0; }
body.qamara .badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
body.qamara .badge { display: inline-flex; }
body.qamara .badge img { height: 54px; width: auto; display: block; }
body.qamara .badge--soon img { opacity: 0.5; }
body.qamara a.badge { transition: transform 0.15s ease; }
body.qamara a.badge:hover { transform: translateY(-2px); }
body.qamara .hero-link { font-weight: 600; margin-top: 8px; }

/* − / + steppers for cycle and period length */
body.qamara .stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
body.qamara .stepper-row label { margin: 0; }
body.qamara .stepper { display: inline-flex; align-items: center; gap: 6px; }
body.qamara .stepper button {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--rose); font: inherit; font-size: 24px; font-weight: 700; line-height: 1; cursor: pointer; touch-action: manipulation;
}
body.qamara .stepper button:active { background: var(--rose-soft); }
body.qamara .stepper input {
  width: 2.6em; text-align: center; font: inherit; font-weight: 700; font-size: 20px; color: var(--text);
  border: 0; background: transparent; -moz-appearance: textfield; appearance: textfield; padding: 0;
}
body.qamara .stepper input::-webkit-outer-spin-button, body.qamara .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body.qamara .stepper span { color: var(--muted); font-size: 15px; margin-right: 4px; }

/* ---- Phone layout polish ---- */
@media (max-width: 560px) {
  body.qamara .badges { gap: 10px; flex-wrap: nowrap; }
  body.qamara .badge img { height: 46px; }
  body.qamara .tabs { gap: 6px; flex-wrap: nowrap; }
  body.qamara .tabs button { padding: 0 14px; font-size: 15px; }
  body.qamara .qm-feature { padding: 20px; }
  body.qamara .et_pb_section { padding: 40px 0; }
}
@media (max-width: 360px) { body.qamara .badge img { height: 40px; } }

/* Feature icons: Divi fades blurb images in on scroll and sometimes never shows them. */
body.qamara .qm-feature .et_pb_main_blurb_image { margin-bottom: 18px; text-align: left; }
body.qamara .qm-feature .et_pb_main_blurb_image img { width: 48px; height: 48px; opacity: 1 !important; }
body.qamara .qm-feature .et-waypoint { opacity: 1 !important; }
@media (max-width: 560px) {
  body.qamara .qm-feature .et_pb_blurb_content { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; align-items: center; text-align: left; }
  body.qamara .qm-feature .et_pb_main_blurb_image { margin: 0; }
  body.qamara .qm-feature .et_pb_blurb_container { display: contents; }
  body.qamara .qm-feature .et_pb_module_header { padding-bottom: 0; }
  body.qamara .qm-feature .et_pb_blurb_description { grid-column: 1 / -1; margin-top: 10px; }
}
