/* ==========================================================================
   Bloom Women's Health — Layout: 3D canvas, nav, footer, page shells
   File: assets/css/2-layout.css
   ========================================================================== */

/* ---------- 3D canvas layers ---------- */
#bg3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

html.no-webgl #bg3d {
  display: none;
}

#bg3d-fallback {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: none;
  background: var(--grad-brand-soft);
  background-size: 220% 220%;
  animation: meshDrift 22s ease-in-out infinite;
}

html.no-webgl #bg3d-fallback {
  display: block;
}

@keyframes meshDrift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-brand);
  z-index: var(--z-toast);
  box-shadow: 0 0 14px rgba(236, 92, 141, .6);
  transition: width .08s linear;
}

/* 3D depth ornaments placed inside sections */
.orn {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
  z-index: 0;
  transform-style: preserve-3d;
}

.orn-ring {
  border: 1.5px solid rgba(236, 92, 141, .35);
  background: transparent;
  filter: none;
}

.orn-blob {
  background: radial-gradient(circle at 35% 30%, rgba(255, 231, 239, .95), rgba(236, 92, 141, .35) 55%, transparent 72%);
  border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%;
  filter: blur(6px);
}

.orn-teal {
  background: radial-gradient(circle at 40% 35%, rgba(226, 247, 244, .9), rgba(35, 160, 148, .3) 55%, transparent 72%);
}

/* ---------- Announcement bar ---------- */
.topbar {
  position: relative;
  z-index: calc(var(--z-nav) + 1);
  background: var(--grad-ink);
  color: #fff;
  font-size: var(--t-tiny);
  letter-spacing: .02em;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 38px;
  padding-block: .35rem;
}

.topbar a:hover {
  color: var(--rose-200);
}

.topbar__list {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.topbar__list li {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.topbar__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-300);
  box-shadow: 0 0 0 0 rgba(127, 217, 207, .7);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  70% {
    box-shadow: 0 0 0 9px rgba(127, 217, 207, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(127, 217, 207, 0);
  }
}

@media (max-width: 860px) {

  .topbar__list li.topbar__list--hide,
  .topbar__list--hide {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .topbar__inner {
    min-height: 32px;
    padding-block: .25rem;
    gap: .5rem;
  }

  .topbar__list {
    gap: .5rem;
    font-size: .68rem;
  }

  .topbar__list li {
    gap: .25rem;
    white-space: nowrap;
  }

  .topbar .icon {
    width: 1.15em;
    height: 1.15em;
  }
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  transition: background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
    backdrop-filter var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 249, 251, .72);
  backdrop-filter: blur(0px) saturate(1);
  -webkit-backdrop-filter: blur(0px) saturate(1);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transition: all var(--dur) var(--ease-out);
  z-index: -1;
}

.site-header.is-stuck::after {
  opacity: 1;
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 34px rgba(43, 30, 47, .07);
}

html[data-theme="dark"] .site-header::after {
  background: rgba(22, 16, 26, .78);
}

.site-header.is-hidden {
  transform: translateY(-102%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
}

.brand__mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease-spring);
}

html[data-theme="dark"] .brand__mark {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.brand:hover .brand__mark {
  transform: scale(1.08);
}

.brand__mark svg {
  width: 24px;
  height: 24px;
}

.brand__logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
  /* height: 100%;
  object-fit: contain;
  display: block;
} */

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -.02em;
  color: var(--ink);
}

.brand__tag {
  font-size: .62rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: .15rem;
  padding: .3rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  backdrop-filter: blur(10px);
}

html[data-theme="dark"] .nav__menu {
  background: rgba(255, 255, 255, .06);
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem .95rem;
  border-radius: var(--r-pill);
  font-size: .92rem;
  font-weight: 550;
  color: var(--ink-soft);
  transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--ink);
  background: var(--rose-100);
}

html[data-theme="dark"] .nav__link:hover {
  background: rgba(236, 92, 141, .16);
}

.nav__link[aria-current="page"] {
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 8px 20px rgba(236, 92, 141, .32);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.nav__toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .6);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--dur) var(--ease-out);
}

html[data-theme="dark"] .nav__toggle {
  background: rgba(255, 255, 255, .07);
}

.nav__toggle:hover {
  border-color: var(--rose-300);
}

.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast);
  position: relative;
  top: 30%;
  /* transform-origin: center; */
}


.nav__toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Account dropdown */
.nav__account {
  position: relative;
}

.nav__account .btn {
  gap: .5rem;
  padding-left: .45rem;
}

.nav__account .avatar {
  pointer-events: none;
}

.account-pop {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 268px;
  z-index: calc(var(--z-nav) + 2);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 28px 70px rgba(43, 30, 47, .24);
  padding: .65rem;
  animation: popIn .26s var(--ease-out);
}

.account-pop[hidden] {
  display: none;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.97);
  }
}

.account-pop__head {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .6rem .8rem;
  border-bottom: 1px solid var(--line);
}

.account-pop__head strong {
  display: block;
  font-size: .93rem;
}

.account-pop__links {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .45rem 0;
}

.account-pop__links a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .58rem .6rem;
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-weight: 550;
  color: var(--ink-soft);
  transition: all var(--dur) var(--ease-out);
}

.account-pop__links a svg {
  width: 17px;
  height: 17px;
}

.account-pop__links a:hover {
  background: var(--surface-2);
  color: var(--rose-600);
  transform: translateX(3px);
}

.account-pop__links .chip {
  margin-left: auto;
}

.account-pop__foot {
  border-top: 1px solid var(--line);
  padding-top: .55rem;
}

.nav__drawer-foot {
  margin-top: auto;
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.nav__drawer-foot a {
  align-items: center;
}

/* Mobile drawer */
.nav__drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(390px, 88vw);
  z-index: var(--z-overlay);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -22px 0 60px rgba(43, 30, 47, .22);
  padding: var(--s-6) var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  transform: translateX(101%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .45s var(--ease-out), visibility .45s var(--ease-out);
  overflow-y: auto;
}

.nav__drawer.is-open {
  transform: none;
  visibility: visible;
  pointer-events: auto;
}

.nav__drawer-links {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.nav__drawer-links a {
  padding: .85rem 1rem;
  border-radius: var(--r-md);
  font-weight: 600;
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: all var(--dur) var(--ease-out);
}

.nav__drawer-links a:hover {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
  transform: translateX(4px);
}

.nav__drawer-links a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--rose-600);
  border-color: var(--rose-200);
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(27, 18, 32, .5);
  backdrop-filter: blur(4px);
  z-index: calc(var(--z-overlay) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease-out);
}

.scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1080px) {
  .nav__menu {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }
}

@media (max-width: 620px) {
  .nav__actions .btn--ghost-label {
    display: none;
  }

  .site-header .nav__actions .btn--primary {
    display: none !important;
  }

  .brand__tag {
    display: none;
  }

  .brand {
    gap: .45rem;
  }

  .brand__name {
    font-size: 1.05rem;
  }

  .nav__actions {
    gap: .35rem;
  }

  .nav__toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .site-header .btn--sm {
    padding: .42rem .55rem;
    font-size: .8rem;
  }
}

@media (max-width: 480px) {
  .brand__name {
    font-size: 0.98rem;
  }

  .brand__mark {
    width: 40px;
    height: 40px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  .brand__mark svg {
    width: 20px;
    height: 20px;
  }

  .nav__actions {
    gap: .25rem;
  }

  .nav__toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
}

/* Theme toggle */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .6);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  transition: all var(--dur) var(--ease-out);
}

html[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, .07);
}

.theme-toggle:hover {
  color: var(--rose-600);
  transform: rotate(-14deg) scale(1.06);
  border-color: var(--rose-200);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

.theme-toggle .icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(3rem, 7vw, 6rem);
  background: var(--grad-ink);
  color: rgba(255, 255, 255, .8);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -140px;
  right: -80px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 92, 141, .45), transparent 68%);
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  bottom: -160px;
  left: -60px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 191, 178, .34), transparent 68%);
  pointer-events: none;
}

.site-footer .container {
  position: relative;
  z-index: 1;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: var(--s-6);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--s-6);
}

@media (max-width: 940px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.site-footer .brand__name {
  color: #fff;
}

.site-footer .brand__tag {
  color: rgba(255, 255, 255, .55);
}

.footer__col h4 {
  font-family: var(--font-sans);
  font-size: var(--t-tiny);
  letter-spacing: .17em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--s-4);
}

.footer__col p,
.footer__col a {
  color: rgba(255, 255, 255, .72);
  font-size: .93rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.footer__links a {
  position: relative;
  width: fit-content;
  transition: color var(--dur), transform var(--dur) var(--ease-out);
}

.footer__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--rose-300);
  transition: width var(--dur) var(--ease-out);
}

.footer__links a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer__links a:hover::after {
  width: 100%;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding-block: var(--s-5);
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: var(--t-small);
  color: rgba(255, 255, 255, .6);
}

.footer__bottom a:hover {
  color: #fff;
}

.footer__news {
  display: flex;
  gap: .5rem;
  margin-top: var(--s-4);
}

.footer__news input {
  flex: 1;
  min-width: 0;
  padding: .7rem .9rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: .9rem;
}

.footer__news input::placeholder {
  color: rgba(255, 255, 255, .5);
}

.footer__news input:focus {
  outline: none;
  border-color: var(--rose-300);
  background: rgba(255, 255, 255, .14);
}

.social-row {
  display: flex;
  gap: .5rem;
  margin-top: var(--s-5);
}

.social-row a {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .85);
  transition: all var(--dur) var(--ease-spring);
}

.social-row a:hover {
  background: var(--rose-500);
  border-color: var(--rose-400);
  color: #fff;
  transform: translateY(-4px) rotate(-6deg);
}

.social-row svg {
  width: 17px;
  height: 17px;
}

/* Floating action buttons */
.fab-stack {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: var(--z-nav);
  display: flex;
  flex-direction: column;
  gap: .65rem;
  align-items: flex-end;
}

.fab {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.15rem;
  border-radius: var(--r-pill);
  background: var(--grad-brand);
  color: #fff;
  font-weight: 650;
  font-size: .9rem;
  box-shadow: var(--sh-glow);
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur);
}

.fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 22px 54px rgba(236, 92, 141, .45);
}

.fab svg {
  width: 18px;
  height: 18px;
}

.fab--top {
  width: 46px;
  height: 46px;
  padding: 0;
  justify-content: center;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur) var(--ease-out);
}

.fab--top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.fab--top:hover {
  background: var(--accent-soft);
  color: var(--rose-600);
  border-color: var(--rose-200);
}

@media (max-width: 560px) {
  .fab-stack {
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    gap: .5rem;
  }

  .fab {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .fab .fab__label {
    display: none;
  }

  .fab svg {
    width: 22px;
    height: 22px;
  }

  .fab--top {
    width: 42px;
    height: 42px;
  }
}

/* ---------- Page shell / hero banners ---------- */
.page-hero {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.6rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
}

.page-hero__inner {
  max-width: 780px;
  min-width: 0;
}

.page-hero h1 {
  margin-top: var(--s-3);
}

.page-hero p {
  margin-top: var(--s-4);
  max-width: 62ch;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--t-small);
  color: var(--ink-mute);
  margin-bottom: var(--s-4);
}

.breadcrumb a:hover {
  color: var(--rose-600);
}

.breadcrumb span[aria-hidden] {
  opacity: .5;
}

/* Sticky sub-nav for long legal / dashboard pages */
.subnav {
  position: sticky;
  top: calc(var(--nav-h) + 8px);
  z-index: 20;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(14px);
  box-shadow: var(--sh-2);
  padding: .35rem;
  display: flex;
  gap: .2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav::-webkit-scrollbar {
  display: none;
}

html[data-theme="dark"] .subnav {
  background: rgba(34, 26, 40, .8);
}

.subnav a {
  padding: .5rem .9rem;
  border-radius: var(--r-pill);
  font-size: .86rem;
  font-weight: 550;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: all var(--dur) var(--ease-out);
}

.subnav a:hover {
  background: var(--accent-soft);
  color: var(--rose-600);
}

.subnav a.is-active {
  background: var(--grad-brand);
  color: #fff;
}