/* ==========================================================================
   YU SLEEP - Main Stylesheet
   Optimized for conversion, performance & accessibility
   ========================================================================== */

:root {
  --primary: #4a1f8c;
  --primary-dark: #2d1259;
  --primary-light: #6a3fb5;
  --accent: #ffc107;
  --accent-dark: #f5a623;
  --success: #28a745;
  --success-dark: #1e7e34;
  --text: #1a1a2e;
  --text-light: #555;
  --text-muted: #777;
  --bg: #ffffff;
  --bg-soft: #faf8ff;
  --bg-card: #ffffff;
  --border: #e6e3f0;
  --shadow-sm: 0 2px 8px rgba(74, 31, 140, 0.08);
  --shadow-md: 0 6px 24px rgba(74, 31, 140, 0.12);
  --shadow-lg: 0 12px 40px rgba(74, 31, 140, 0.18);
  --radius: 12px;
  --radius-lg: 20px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  --font-head: "Georgia", "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--accent-dark); }
.logo::before { content: "🌙"; font-size: 1.4rem; }

.nav-menu {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-menu a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  padding: 6px 0;
  position: relative;
}
.nav-menu a:hover { color: var(--primary); }
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}
.nav-menu a:hover::after { width: 100%; }

.header-cta {
  background: var(--accent);
  color: var(--text);
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(255,193,7,0.35);
  transition: all 0.2s;
}
.header-cta:hover { background: var(--accent-dark); color: var(--text); transform: translateY(-2px); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #2d1259 0%, #4a1f8c 50%, #6a3fb5 100%);
  color: #fff;
  padding: 60px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1), transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(255,193,7,0.08), transparent 50%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,193,7,0.2);
  border: 1px solid rgba(255,193,7,0.5);
  color: #ffd54f;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 16px;
  font-weight: 700;
}
.hero h1 .hl { color: var(--accent); }
.hero .subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.92);
  margin-bottom: 24px;
  line-height: 1.5;
}
.hero-benefits {
  list-style: none;
  margin-bottom: 28px;
}
.hero-benefits li {
  padding: 8px 0;
  font-size: 1.05rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.hero-benefits li::before {
  content: "✓";
  background: var(--accent);
  color: var(--primary-dark);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 3px;
  font-size: 0.85rem;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-image {
  text-align: center;
  position: relative;
}
.hero-image img {
  max-width: 100%;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.45));
  animation: floaty 4s ease-in-out infinite;
}
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px 18px;
  border-radius: 50px;
  margin-top: 20px;
  font-size: 0.95rem;
}
.stars { color: #ffd54f; letter-spacing: 2px; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--text);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: none;
}
.btn-secondary:hover { background: #fff; color: var(--primary); }
.btn-large { padding: 18px 40px; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; }

/* ===== Sections ===== */
section { padding: 70px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: linear-gradient(135deg, #1a0d3a, #2d1259); color: #fff; }

.section-title {
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--primary-dark);
  margin-bottom: 14px;
  line-height: 1.2;
}
.section-dark .section-title { color: #fff; }
.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto 50px;
}
.section-dark .section-subtitle { color: rgba(255,255,255,0.85); }

/* ===== Trust Badges ===== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 30px;
}
.trust-card {
  background: #fff;
  padding: 30px 20px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
}
.trust-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.trust-card img {
  height: 90px;
  width: auto;
  margin: 0 auto 16px;
  object-fit: contain;
}
.trust-card h4 {
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-size: 1.1rem;
}
.trust-card p { color: var(--text-light); font-size: 0.95rem; }

/* ===== Reviews ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}
.review-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.25s;
}
.review-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.review-card img.review-photo { width: 100%; height: 220px; object-fit: cover; }
.review-content { padding: 24px; }
.review-stars { color: var(--accent-dark); font-size: 1.1rem; letter-spacing: 2px; margin-bottom: 8px; }
.verified {
  display: inline-block;
  background: #e8f5e9;
  color: var(--success-dark);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.review-text {
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 14px;
  font-size: 0.98rem;
}
.review-author { font-weight: 600; color: var(--primary); font-size: 0.9rem; }

/* ===== What Is / How It Works ===== */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.feature-block.reverse > div:first-child { order: 2; }
.feature-block img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.feature-block h2 {
  font-family: var(--font-head);
  font-size: 2.2rem;
  color: var(--primary-dark);
  margin-bottom: 20px;
  line-height: 1.2;
}
.feature-block p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

/* ===== Ingredients ===== */
.ingredients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.ingredient-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px;
  border-left: 5px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s;
}
.ingredient-card:hover { transform: translateX(5px); }
.ingredient-card h3 {
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ingredient-card h3 .ico {
  background: var(--bg-soft);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.ingredient-card p { color: var(--text-light); font-size: 0.96rem; }

/* ===== Benefits Timeline ===== */
.benefits-timeline {
  max-width: 850px;
  margin: 40px auto 0;
  position: relative;
}
.benefit-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-bottom: 20px;
  border-left: 5px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.benefit-item h3 {
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-size: 1.2rem;
}
.benefit-item p { color: var(--text-light); }

/* ===== Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}
.price-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.price-card.popular {
  border-color: var(--accent-dark);
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
  background: linear-gradient(180deg, #fff, #faf8ff);
}
.popular-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent-dark);
  color: #fff;
  padding: 5px 18px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.price-card h3 {
  color: var(--primary-dark);
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.price-discount {
  color: var(--success-dark);
  font-weight: 600;
  margin-bottom: 18px;
  font-size: 0.95rem;
}
.price-card .bottles-img {
  height: 140px;
  width: auto;
  margin: 0 auto 18px;
  object-fit: contain;
}
.price-tag { margin: 18px 0; }
.price-old {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-right: 8px;
}
.price-new {
  color: var(--primary-dark);
  font-size: 2.4rem;
  font-weight: 800;
}
.price-per { color: var(--text-muted); font-size: 0.9rem; }
.price-features {
  list-style: none;
  margin: 18px 0;
  text-align: left;
}
.price-features li {
  padding: 6px 0;
  color: var(--text-light);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-features li::before { content: "✓"; color: var(--success-dark); font-weight: 700; }
.price-total { color: var(--text); font-weight: 600; margin: 14px 0; font-size: 0.95rem; }
.price-guarantee {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: 12px;
}

/* ===== Guarantee ===== */
.guarantee-block {
  background: linear-gradient(135deg, #faf8ff, #fff);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 30px;
}
.guarantee-block img { width: 100%; max-width: 200px; }
.guarantee-block h3 {
  color: var(--primary-dark);
  font-size: 1.6rem;
  margin-bottom: 14px;
  font-family: var(--font-head);
}
.guarantee-block p { color: var(--text-light); font-size: 1.05rem; }

/* ===== FAQ ===== */
.faq-list { max-width: 820px; margin: 40px auto 0; }
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-body);
}
.faq-question::after {
  content: "+";
  font-size: 1.6rem;
  color: var(--accent-dark);
  transition: transform 0.25s;
  flex-shrink: 0;
}
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
  color: var(--text-light);
  line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 500px; padding: 0 24px 22px; }

/* ===== CTA Strip ===== */
.cta-strip {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  padding: 50px 0;
  text-align: center;
}
.cta-strip h2 {
  font-family: var(--font-head);
  color: var(--primary-dark);
  font-size: 2rem;
  margin-bottom: 14px;
}
.cta-strip p { color: var(--text); font-size: 1.1rem; margin-bottom: 22px; }
.cta-strip .btn-primary {
  background: var(--primary-dark);
  color: #fff;
}
.cta-strip .btn-primary:hover { background: var(--primary); color: #fff; }

/* ===== Blog ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}
.blog-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.blog-image {
  height: 180px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.4rem;
  text-align: center;
  padding: 20px;
}
.blog-card-content { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 10px; }
.blog-card h3 { color: var(--primary-dark); margin-bottom: 12px; font-size: 1.2rem; line-height: 1.3; }
.blog-card p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 16px; flex: 1; }
.blog-card .read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: auto;
}
.blog-card .read-more::after { content: " →"; transition: margin-left 0.2s; }
.blog-card:hover .read-more::after { margin-left: 4px; }

/* ===== Footer ===== */
.site-footer {
  background: #1a0d3a;
  color: rgba(255,255,255,0.85);
  padding: 60px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 {
  color: #fff;
  margin-bottom: 18px;
  font-size: 1.05rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--accent); }
.footer-logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-logo::before { content: "🌙"; }
.footer-col p {
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
  line-height: 1.6;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}
.footer-bottom p { margin-bottom: 6px; }
.disclaimer {
  background: rgba(0,0,0,0.25);
  padding: 18px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 24px;
  color: rgba(255,255,255,0.65);
}

/* ===== Article / Blog Post ===== */
.article-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 70px 0 50px;
  text-align: center;
}
.article-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  max-width: 850px;
  margin: 0 auto 16px;
  line-height: 1.2;
}
.article-meta {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 50px 20px;
}
.article-body h2 {
  font-family: var(--font-head);
  color: var(--primary-dark);
  font-size: 1.7rem;
  margin: 36px 0 16px;
  line-height: 1.3;
}
.article-body h3 {
  color: var(--primary-dark);
  font-size: 1.3rem;
  margin: 28px 0 12px;
}
.article-body p {
  color: var(--text);
  margin-bottom: 18px;
  font-size: 1.08rem;
  line-height: 1.8;
}
.article-body ul, .article-body ol {
  margin: 0 0 22px 22px;
  color: var(--text);
}
.article-body li { margin-bottom: 10px; line-height: 1.7; }
.article-body blockquote {
  border-left: 4px solid var(--accent);
  background: var(--bg-soft);
  padding: 20px 24px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-light);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.toc {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 30px 0;
}
.toc h4 { color: var(--primary-dark); margin-bottom: 12px; font-size: 1.05rem; }
.toc ul { list-style: none; margin: 0; }
.toc li { margin-bottom: 8px; }
.toc a { color: var(--primary); font-size: 0.96rem; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 14px 0;
  background: var(--bg-soft);
  font-size: 0.88rem;
  color: var(--text-light);
}
.breadcrumb a { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; color: var(--text-muted); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 20px; gap: 0; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); }
  .nav-menu.open { display: flex; }
  .nav-menu li { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-menu li:last-child { border-bottom: none; }
  .menu-toggle { display: block; }
  .header-cta { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .hero-benefits li { justify-content: flex-start; text-align: left; }
  .hero-ctas { justify-content: center; }
  .feature-block { grid-template-columns: 1fr; gap: 30px; }
  .feature-block.reverse > div:first-child { order: 0; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .reviews-grid, .pricing-grid, .blog-grid { grid-template-columns: 1fr; }
  .price-card.popular { transform: none; }
  .guarantee-block { grid-template-columns: 1fr; text-align: center; gap: 24px; padding: 36px 24px; }
  .guarantee-block img { margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  section { padding: 50px 0; }
  .hero { padding: 40px 0 60px; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .btn { padding: 12px 22px; font-size: 0.92rem; }
  .btn-large { padding: 16px 28px; font-size: 1rem; }
}

/* ===== Accessibility ===== */
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
