/* ==========================================================
   Yu Sleep - responsive custom theme
   Primary brand purple #5a2b86; promotional CTA buttons remain yellow.
   ========================================================== */
:root {
  --primary: #5a2b86;
  --primary-light: #7b45a8;
  --primary-dark: #3d1a5e;
  --accent: #ffe145;
  --accent-dark: #f5c900;
  --off-white: #faf7fd;
  --light-grey: #f3edf8;
  --text-dark: #1f2933;
  --text-mid: #52606d;
  --text-light: #7b8794;
  --border: #e1d6ed;
  --shadow: 0 8px 28px rgba(31, 41, 51, .10);
  --jb-font: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --jb-yellow: linear-gradient(180deg, #ffe864, #ffd91a);
  --jb-bar: linear-gradient(135deg, #7b45a8 0%, #5a2b86 55%, #3d1a5e 100%);
}

body, body * { font-family: var(--jb-font) !important; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-size: 17px; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.015em; }
p, li { line-height: 1.7; }

/* ---------- Navbar (purple brand gradient) ---------- */
.nav {
  background: linear-gradient(180deg, #7b45a8 0%, #5a2b86 100%);
  border-bottom: 0;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .16);
}
.nav-logo { color: #fff; font-weight: 700; font-size: 1.85rem; letter-spacing: -.01em; }
.nav-logo span { color: #ffe145; }
.nav-links a { color: #fff; font-weight: 500; text-transform: none; font-size: 1rem; letter-spacing: 0; opacity: .95; }
.nav-links a:hover { color: #fff; opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.hamburger span { background: #fff; }
.nav .nav-cta, .nav-links .nav-cta {
  background: var(--jb-yellow) !important;
  color: #3d3200 !important;
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(80, 40, 0, .25);
}
.nav .nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(80, 40, 0, .3); text-decoration: none; }
@media (max-width: 900px) {
  .nav-links.open, #menu-toggle:checked ~ .nav-links { background: #4b226f; border-top: 1px solid rgba(255,255,255,.2); }
}

/* ---------- Buttons (yellow, dark text) ---------- */
.review-official-btn, .cta-btn, .callout-btn {
  background: var(--jb-yellow) !important;
  color: #3d3200 !important;
  border: 1px solid #f0c800;
  border-radius: 10px !important;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(120, 80, 0, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.review-official-btn:hover, .cta-btn:hover, .callout-btn:hover {
  background: linear-gradient(180deg, #ffe14d, #f5c900) !important;
  color: #3d3200 !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(120, 80, 0, .28);
}
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }

/* ---------- Hero / page headers ---------- */
.hero, .page-hero, .article-hero, .edu-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f2eafb 60%, #faf5ff 100%) !important;
}
.hero::before, .page-hero::before, .article-hero::before, .edu-hero::before {
  background: radial-gradient(circle, rgba(90, 43, 134, .10) 0%, transparent 70%) !important;
}
.hero h1 span, .page-hero h1 span, .article-hero h1 span, .edu-hero h1 span { color: var(--primary); }
.hero-badge, .page-badge, .edu-hero-badge { background: var(--primary); letter-spacing: .06em; }
.hero-img-wrap img { filter: drop-shadow(0 22px 28px rgba(0, 0, 0, .2)); }
.hero-glow { background: radial-gradient(ellipse, rgba(0, 0, 0, .18) 0%, transparent 70%); }
.hero-perk::before { background: var(--primary); }

/* ---------- Trust bar = purple heading bar ---------- */
.trust-bar { background: var(--jb-bar); border-top: 1px solid rgba(255, 255, 255, .18); }
.trust-item { font-weight: 500; font-size: 1rem; text-shadow: 0 1px 2px rgba(0, 0, 0, .18); }

/* ---------- Sections ---------- */
.section-alt { background: var(--off-white); }
.section-label { color: var(--primary); letter-spacing: .14em; }
.section-title { font-weight: 700; }
.divider { background: linear-gradient(90deg, var(--primary), #ffd91a); }
.what-is-img img, .pricing-img-link img { box-shadow: 0 18px 44px rgba(31, 41, 51, .16) !important; border-radius: 16px; }
.pricing-img-link img:hover { box-shadow: 0 24px 54px rgba(31, 41, 51, .22) !important; }

/* cards: halka border + soft shadow + purple accent */
.how-card, .care-card, .bonus-card, .edu-card, .faq-item, .reviews-summary-box, .guarantee-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(31, 41, 51, .06) !important;
}
.how-card:hover, .care-card:hover, .bonus-card:hover, .edu-card:hover {
  border-color: #d0b3e6;
  box-shadow: 0 14px 30px rgba(31, 41, 51, .12) !important;
}
.edu-tag, .ing-badge, .best-badge { background: var(--primary); color: #fff; }
.faq-q:hover { color: var(--primary); }

/* tables */
.ingredients-table tbody tr:hover, .pricing-table tbody tr:hover { background: #f1e8fa; }
.ingredients-table-wrap, .pricing-table-wrap { border-radius: 14px; box-shadow: 0 8px 26px rgba(31, 41, 51, .08); }

/* ---------- Footer ---------- */
.footer { background: #1f2933 !important; }
.footer a:hover { color: #ffe145; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .nav-logo { font-size: 1.5rem; }
  .section { padding: 56px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================
   Responsive + accessibility (mobile / tablet / desktop)
   ========================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, iframe, table { max-width: 100%; }
main { display: block; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 2000;
  background: #fff; color: #1f2933; padding: 10px 16px; border-radius: 8px; font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: top .15s ease;
}
.skip-link:focus { top: 12px; }
section[id], [id].section { scroll-margin-top: 84px; }   /* sticky navbar ke neeche heading na chhupe */

/* tables: mobile par side scroll, desktop par full width */
.ingredients-table-wrap, .pricing-table-wrap, .table-wrap, .comp-table-wrap, .data-table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.ingredients-table { min-width: 640px; }

/* touch-friendly targets */
.nav-links a, .edu-link, .footer a, .toc-list li a, .faq-q { min-height: 44px; display: inline-flex; align-items: center; }
.hamburger { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }

/* large desktop */
@media (min-width: 1400px) {
  body { font-size: 18px; }
  .nav-inner, .hero-inner, .section-inner, .trust-bar-inner, .footer-inner { max-width: 1280px; }
}

/* tablet */
@media (max-width: 1024px) {
  .hero { padding: 64px 24px 48px; }
  .what-is-grid { gap: 36px; }
}

/* mobile */
@media (max-width: 768px) {
  .hero { padding: 36px 18px 40px; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .hero-desc { margin-left: auto; margin-right: auto; font-size: 1.05rem; }
  .hero-perks { align-items: flex-start; max-width: 360px; margin-left: auto; margin-right: auto; }
  .hero-perk { text-align: left; justify-content: flex-start; }
  .hero-content .nav-cta { display: block; width: 100%; max-width: 360px; margin: 0 auto; text-align: center; padding: 15px 20px; font-size: 1.05rem; }
  .what-is-grid, .how-grid, .care-grid, .bonuses-grid, .edu-grid, .proscons-grid { grid-template-columns: 1fr !important; }
  .trust-bar-inner { gap: 14px 22px; justify-content: flex-start; }
  .section-title { font-size: clamp(1.6rem, 6.5vw, 2rem); }
  .review-official-btn, .cta-btn, .callout-btn { display: block; text-align: center; }
  .footer-inner { grid-template-columns: 1fr !important; gap: 28px; }
}
@media (max-width: 380px) {
  .nav-inner { padding: 0 14px; }
  .nav-logo { font-size: 1.35rem; }
  .section { padding: 44px 16px; }
}

/* images: kabhi container se bahar na nikle */
.pricing-img-link { display: block; }
.pricing-img-link img, .what-is-img img, .hero-img-wrap img { width: auto; max-width: 100%; height: auto; }
.pricing-img-link img { margin: 0 auto; }
@media (max-width: 480px) {
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* Site-wide responsive hardening (non-content changes). */
:root { color-scheme: light; }
html, body { max-width: 100%; overflow-x: clip; }
.hero-inner, .what-is-grid, .footer-inner, .section-inner { min-width: 0; }
.hero-content, .hero-img-wrap, .how-card, .care-card, .bonus-card, .edu-card { min-width: 0; }
.hero h1 { overflow-wrap: break-word; }
.nav-links a:focus-visible, .nav-cta:focus-visible { outline: 3px solid #f7c948; outline-offset: 3px; }
@media (max-width: 380px) {
  .hero-inner { gap: 22px; }
  .hero h1 { font-size: clamp(1.85rem, 7.5vw, 2.3rem); }
}

/* Mobile hero: meaningful copy first, product artwork after the CTA and benefits. */
@media (max-width: 768px) {
  .hero-inner { display: flex; flex-direction: column; gap: 28px; }
  .hero-content { order: 1; width: 100%; }
  .hero-img-wrap { order: 2 !important; width: 100%; }
  .hero-img-wrap img { max-height: 280px; margin-inline: auto; }
  .hero { padding-top: 32px; }
}


/* ==============================================================
   Yu Sleep - 22px reading typography (2026-11-16)
   Body copy is 22px on all devices; headings scale responsively.
   Navigation, CTA labels, promotional badges and small-print retain
   their prior styles so buttons and compact UI remain usable.
   ============================================================== */
body { font-size: 22px; }
main :is(p, li, td, th, .faq-a, .faq-q, .idv, .ing-card-body, .review-point, .pathway-content, .checklist-item, .science-callout, .ing-detail-item, .article-body) {
  font-size: 22px;
  line-height: 1.65;
  overflow-wrap: break-word;
}
/* Some site sections use text in plain divs rather than p tags. */
main :is(.what-is-content, .care-card, .how-card, .bonus-card, .edu-card, .ingredient-card, .concept-card, .synergy-card, .compare-box, .intro-box, .sidebar-box) {
  font-size: 22px;
  line-height: 1.65;
}
/* Content hyperlinks should match the copy they sit inside. */
main :is(p, li, td, th, .faq-a) a:not(.cta-btn):not(.callout-btn):not(.review-official-btn):not(.nav-cta) { font-size: inherit; }
/* Readable headline hierarchy at large and small widths. */
main :is(.hero h1, .page-hero h1, .article-hero h1, .edu-hero h1) {
  font-size: clamp(36px, 4.1vw, 56px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
main h2, main .section-title {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.25;
  overflow-wrap: break-word;
  text-wrap: balance;
}
main h3 { font-size: clamp(26px, 2.25vw, 32px); line-height: 1.3; overflow-wrap: break-word; }
main h4 { font-size: clamp(23px, 1.9vw, 28px); line-height: 1.35; overflow-wrap: break-word; }
/* Expanded FAQs must not clip their answers after increasing font size. */
main .faq-item[open] .faq-a { max-height: none; overflow: visible; }
@media (max-width: 768px) {
  main :is(.hero h1, .page-hero h1, .article-hero h1, .edu-hero h1) { font-size: clamp(33px, 8vw, 39px); line-height: 1.18; }
  main h2, main .section-title { font-size: clamp(29px, 6.8vw, 35px); }
  main h3 { font-size: clamp(25px, 5.7vw, 30px); }
  main h4 { font-size: 23px; }
  main :is(p, li, td, th, .faq-a, .faq-q, .idv, .ing-card-body, .review-point, .pathway-content, .checklist-item, .science-callout, .ing-detail-item, .article-body) { line-height: 1.6; }
  /* Avoid rigid word breaks in the expanded 22px card text. */
  .faq-item, .section-inner, .section-inner-narrow, .content-wrap, .article-body { min-width: 0; }
}


/* ==============================================================
   Yu Sleep - 60-day guarantee display repair + responsive redesign
   The old section inherited white text while pro.css overwrote the
   card's purple background with white. Explicit text contrast here
   keeps guarantee copy visible on every viewport.
   ============================================================== */
.guarantee-section {
  background: linear-gradient(180deg, #ffffff 0%, #faf6ff 100%);
  padding-block: clamp(56px, 7vw, 100px);
}
.guarantee-inner { max-width: 1180px; margin-inline: auto; }
main .guarantee-box {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(275px, .9fr);
  align-items: center;
  gap: clamp(26px, 4.5vw, 60px);
  max-width: none;
  margin: 0 auto;
  padding: clamp(28px, 4.5vw, 62px);
  text-align: left;
  color: #241735;
  background: #ffffff;
  border: 1px solid #e9dcf3;
  border-radius: 26px;
  box-shadow: 0 22px 65px rgba(60, 28, 90, .11) !important;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
main .guarantee-box::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%; height: 7px;
  border-radius: 26px 26px 0 0;
  background: linear-gradient(90deg, #5a2b86 0%, #8957b8 65%, #baa0d4 100%);
}
.guarantee-copy { min-width: 0; position: relative; z-index: 1; }
main .guarantee-box h2 {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.2;
  color: #5a2b86;
  font-weight: 700;
  margin: 0 0 22px;
  letter-spacing: -.015em;
  max-width: 14em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
main .guarantee-box p {
  color: #342540;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.65;
  opacity: 1;
  max-width: 62ch;
  margin: 0;
  text-align: left;
  overflow-wrap: break-word;
}
main .guarantee-art {
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: clamp(18px, 3vw, 32px);
  aspect-ratio: 1 / 1;
  border: 1px solid #efe4f8;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 38%, #ffffff 3%, #f7efff 68%, #efe2fb 100%);
}
main .guarantee-art img {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 13px 16px rgba(29, 22, 43, .13));
}
@media (max-width: 840px) {
  main .guarantee-box {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: clamp(24px, 5vw, 42px);
  }
  main .guarantee-art {
    aspect-ratio: auto;
    min-height: 0;
    padding: 24px;
    order: -1;
  }
  main .guarantee-art img { max-width: 330px; }
}
@media (max-width: 480px) {
  .guarantee-section { padding: 50px 16px; }
  main .guarantee-box { padding: 22px 20px 26px; gap: 24px; border-radius: 20px; }
  main .guarantee-box::before { border-radius: 20px 20px 0 0; }
  main .guarantee-box h2 { font-size: clamp(29px, 7vw, 34px); line-height: 1.2; margin-bottom: 16px; }
  main .guarantee-box p { font-size: 22px; line-height: 1.58; }
  main .guarantee-art { padding: 12px; border-radius: 16px; }
  main .guarantee-art img { max-width: 280px; }
}

/* Keep the guarantee headline phrase together for natural line breaks. */
main .guarantee-box h2 .guarantee-nowrap { white-space: nowrap; }
