/* Bye Bye Insomnia - USA Style */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --navy: #0f172a;
  --navy-light: #1e293b;
  --slate: #475569;
  --slate-light: #64748b;
  --white: #ffffff;
  --off-white: #f8fafc;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-soft: #e0f2fe;
  --success: #10b981;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--slate);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Hamburger - hidden on desktop */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
  border-radius: 8px;
  transition: background 0.2s;
}
.menu-toggle:hover {
  background: var(--accent-soft);
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s;
}
body.menu-open .menu-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}
body.menu-open .menu-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 1.5rem 4rem;
  background: linear-gradient(180deg, var(--off-white) 0%, var(--white) 50%);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--slate);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}

.hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Trust Badges */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate);
}

.hero-badges .trust-badge {
  font-size: 0.85rem;
}

.footer-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Exit Popup */
.exit-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.exit-popup.exit-popup-visible {
  opacity: 1;
  visibility: visible;
}

.exit-popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1;
}

.exit-popup-inner {
  position: relative;
  z-index: 2;
  background: var(--white);
  padding: 2rem;
  border-radius: 16px;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.exit-popup-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--slate);
  line-height: 1;
}

.exit-popup-close:hover {
  color: var(--navy);
}

.exit-popup-inner h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
  font-weight: 700;
  text-rendering: optimizeLegibility;
}

.exit-popup-inner p {
  color: var(--slate);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

.exit-popup-cta {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.2s;
}

.exit-popup-cta:hover {
  background: var(--accent-hover);
}

/* Section */
.section {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--slate);
  margin-bottom: 3rem;
}

/* Features */
.features {
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--slate);
  font-size: 0.95rem;
}

/* Products */
.products-section {
  background: var(--off-white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.product-card {
  background: var(--white);
  padding: 1.75rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.product-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.product-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.product-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.product-card p {
  color: var(--slate);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.product-order-btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s;
}

.product-order-btn:hover {
  background: var(--accent-hover);
}

.products-note {
  text-align: center;
  color: var(--slate);
  font-size: 0.95rem;
}

.products-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.products-note a:hover {
  text-decoration: underline;
}

/* Testimonials */
.testimonials-section {
  background: var(--white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  padding: 1.75rem;
  background: var(--off-white);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.testimonial-stars {
  color: #f59e0b;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.testimonial-text {
  color: var(--slate);
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.testimonial-author {
  font-size: 0.85rem;
  color: var(--slate-light);
  font-weight: 500;
}

/* FAQ */
.faq-section {
  background: var(--off-white);
}

.faq-list {
  max-width: 680px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 0;
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
}

.faq-item.faq-open .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.faq-open .faq-answer {
  max-height: 200px;
}

.faq-answer {
  padding: 0 0 1.25rem 0;
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  transition: background 0.2s;
}

.sticky-cta:hover {
  background: var(--accent-hover);
  color: var(--white);
}

.sticky-cta-email {
  opacity: 0.9;
  font-size: 0.85rem;
}

@media (min-width: 769px) {
  .sticky-cta {
    display: none;
  }
}

/* Blog */
.blog {
  background: var(--off-white);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #bae6fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-meta {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-card p {
  color: var(--slate);
  font-size: 0.9rem;
}

.blog-cta-wrap {
  text-align: center;
  margin-top: 2rem;
}

.blog-cta {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--accent);
  border-radius: 10px;
  transition: all 0.2s;
}

.blog-cta:hover {
  background: var(--accent);
  color: var(--white);
}

/* Order / Contact */
.order-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 5rem 1.5rem;
}

.order-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.order-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.order-section p {
  opacity: 0.9;
  margin-bottom: 2rem;
}

.order-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--white);
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s;
  box-shadow: var(--shadow-lg);
}

.order-email:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.2);
}

.order-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.order-note a {
  color: var(--accent-soft);
  text-decoration: underline;
}

/* Contact Form */
.contact-form {
  max-width: 480px;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.contact-form label {
  display: block;
  margin-bottom: 1rem;
}

.contact-form label span {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  opacity: 0.95;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  transition: border-color 0.2s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255,255,255,0.5);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.15);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.form-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.form-submit:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* Info Section */
.info-section {
  background: var(--white);
}

.info-content {
  max-width: 720px;
  margin: 0 auto;
}

.info-content h3 {
  font-size: 1.25rem;
  color: var(--navy);
  margin: 1.5rem 0 0.5rem;
}

.info-content p {
  color: var(--slate);
  margin-bottom: 0.75rem;
}

.info-content ul {
  margin: 1rem 0 1rem 1.5rem;
  color: var(--slate);
}

.info-content li {
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 1.5rem;
  text-align: center;
}

.footer p {
  opacity: 0.8;
  font-size: 0.9rem;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 99;
    padding: 5rem 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  body.menu-open .nav {
    transform: translateX(0);
  }

  body.menu-open .mobile-overlay {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    gap: 0;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
  }

  .hero {
    padding: 6rem 1rem 3rem;
  }

  .section {
    padding: 3rem 1rem;
  }

  body {
    padding-bottom: 60px;
  }
}
