/* Roots Daily — components.css
 * Shared components: nav, hamburger overlay, footer, buttons, sticky CTA.
 * Loaded on every page.
 *
 * Responsive strategy:
 *   < 900px : hamburger menu, sticky CTA visible
 *   >= 900px : horizontal nav links, hamburger hidden, sticky CTA hidden
 */

/* ===== Top nav ===== */
.nav {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 0 18px;
  pointer-events: none;
}

.navin {
  max-width: 1180px;
  margin: auto;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 30px 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 42px rgba(16, 25, 54, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 17px;
}

.brand img {
  width: 100px;
  height: 50px;
  max-width: 100%;
  display: block;
}

.mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal), var(--pink));
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 900;
  transform: rotate(-5deg);
}

/* Desktop horizontal nav links — hidden by default, shown >= 900px */
.navLinks {
  display: none;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.navLinks a {
  transition: color 0.2s ease;
}

.navLinks a:hover,
.navLinks a.active {
  color: var(--teal);
}

.navCTA {
  display: none;
}

/* Hamburger button — shown by default, hidden >= 900px */
.menuBtn {
  width: 40px;
  height: 40px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: background 0.2s ease;
}

.menuBtn:active,
.menuBtn:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}

@media (min-width: 900px) {
  .navLinks {
    display: flex;
  }

  .navCTA {
    display: inline-flex;
  }

  .menuBtn {
    display: none;
  }
}

/* ===== Full-screen menu overlay (mobile/tablet) ===== */
.menuOverlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ivory);
  transform: translateY(-100%);
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  visibility: hidden;
}

.menuOverlay.open {
  transform: translateY(0);
  visibility: visible;
}

.menuInner {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom, 0px));
}

.menuTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 14px;
  background: white;
  border-radius: 999px;
  box-shadow: 0 14px 42px rgba(16, 25, 54, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.closeBtn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--paper);
  color: var(--navy);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.menuLinks {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 10px;
  gap: 2px;
}

.menuLinks a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 300;
  color: var(--navy);
  transition: color 0.2s ease, padding-left 0.25s ease;
}

.menuLinks a:hover,
.menuLinks a:active {
  color: var(--teal);
  padding-left: 12px;
}

.menuLinks .ma {
  font-size: 20px;
  color: var(--teal);
  opacity: 0.5;
  font-weight: 400;
}

.menuLinks a:hover .ma,
.menuLinks a:active .ma {
  opacity: 1;
}

.menuCTA {
  padding: 8px 10px 4px;
}

.menuOverlay.open .menuLinks a {
  animation: menuItemIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.menuOverlay.open .menuLinks a:nth-child(1) { animation-delay: 0.08s; }
.menuOverlay.open .menuLinks a:nth-child(2) { animation-delay: 0.14s; }
.menuOverlay.open .menuLinks a:nth-child(3) { animation-delay: 0.20s; }
.menuOverlay.open .menuLinks a:nth-child(4) { animation-delay: 0.26s; }
.menuOverlay.open .menuLinks a:nth-child(5) { animation-delay: 0.32s; }

.menuOverlay.open .menuCTA {
  animation: menuItemIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.38s backwards;
}

@keyframes menuItemIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Menu overlay is mobile-only — hide on desktop in case it's somehow opened */
@media (min-width: 900px) {
  .menuOverlay {
    display: none;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 15px 22px !important;
  font-weight: 900;
  font-family: var(--sans);
  cursor: pointer;
  transition: 0.25s ease;
  white-space: nowrap;
  text-decoration: none;
  min-height: 50px;
  font-size: 14px;
}

.btn:hover {
  transform: translateY(-2px);
}

.primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 16px 42px rgba(196, 109, 125, 0.25);
}

.primary:hover {
  background: #b25e6e;
}

.soft {
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(16, 25, 54, 0.08);
  color: var(--navy);
}

.mango {
  background: var(--saffron);
  color: var(--navy);
}

.btns {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 15px 95px !important;
  font-weight: 900;
  font-family: var(--sans);
  cursor: pointer;
  transition: 0.25s ease;
  white-space: nowrap;
  text-decoration: none;
  min-height: 50px;
  font-size: 14px;
}

.btns:hover {
  transform: translateY(-2px);
}

/* Gold CTA on dark/saffron sections (used on .dark and .final) */
.dark .btn.primary,
.final .btn.primary {
  background: #e3b15a;
  color: #24364b;
  box-shadow: 0 16px 42px rgba(227, 177, 90, 0.25);
}

.dark .btn.primary:hover,
.final .btn.primary:hover {
  background: #d09f47;
}

/* ===== Sticky bottom CTA — mobile + tablet only ===== */
.sticky {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  padding: 9px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 60px rgba(16, 25, 54, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sticky span {
  font-weight: 900;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.25;
}

.sticky .btn {
  width: 100%;
}

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

/* Below 900px the sticky bottom CTA appears, so hide the hero "Join on
 * WhatsApp…" button to avoid showing two CTAs at once. The "See how it
 * works" button next to it stays visible. */
@media (max-width: 899px) {
  [data-cta="hero"] {
    display: none;
  }
}

/* ===== Site footer ===== */
.siteFooter {
  background: var(--paper);
  padding: 42px 0 36px;
  position: relative;
}

.siteFooter .container {
  max-width: 680px;
}

.footerHead {
  text-align: center;
  margin-bottom: 26px;
}

.footerBrand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin-bottom: 12px;
}

.footerBrand img {
  width: 100px;
  height: 50px;
  max-width: 100%;
  display: block;
}

.footerTag {
  font-size: 14px;
  color: var(--muted);
  margin: 0 auto;
  max-width: 300px;
  line-height: 1.55;
}

.footerLinks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.footerLinks a {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  transition: color 0.2s ease;
}

.footerLinks a:hover {
  color: var(--teal);
}

.footerEnd {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
