/* =========================================================================
   BRITTLE ARCHIVE HEADER  [brittle_archive_header]
   Shop · categories · tags · search
   "body:not(#bah)" gives the rules an id's weight so Elementor's site-wide
   link and heading colours can't override them.
   ========================================================================= */

body:not(#bah) .bah {
  --bah-plum: #3B203D;
  --bah-coral: #E99A8A;
  --bah-coral-tint: #FBEAE6;
  --bah-yellow-tint: #FBEAC0;
  --bah-cream: #F7F2E8;
  --bah-paper: #FFFDF9;
  --bah-muted: #756B73;
  --bah-line: rgba(59, 32, 61, 0.12);

  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  width: 100%;
  margin: 0;
  padding: 32px 40px;
  overflow: hidden;
  border: 1px solid var(--bah-line);
  border-radius: 28px;
  background: linear-gradient(120deg, var(--bah-paper) 0%, var(--bah-coral-tint) 100%);
  color: var(--bah-plum);
  font-family: "Outfit", sans-serif;
}

body:not(#bah) .bah:not(.bah--char) {
  grid-template-columns: minmax(0, 1fr);
  background: linear-gradient(120deg, var(--bah-paper) 0%, var(--bah-coral-tint) 100%);
}

body:not(#bah) .bah__main {
  min-width: 0;
}

/* ---- breadcrumb: a small pill ---- */

body:not(#bah) .bah-crumbs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--bah-line);
  border-radius: 999px;
  background: var(--bah-paper);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--bah-muted);
}

body:not(#bah) .bah-crumbs a {
  color: var(--bah-muted) !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

body:not(#bah) .bah-crumbs a:hover {
  color: var(--bah-plum) !important;
}

/* a little house before "Home" */
body:not(#bah) .bah-crumbs__item:first-child a::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: -2px 6px 0 0;
  vertical-align: middle;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11l8-7 8 7'/%3E%3Cpath d='M6 9.5V20h12V9.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11l8-7 8 7'/%3E%3Cpath d='M6 9.5V20h12V9.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* the page you're on */
body:not(#bah) .bah-crumbs__item:last-child {
  color: var(--bah-plum);
  font-weight: 600;
}

body:not(#bah) .bah-crumbs__sep {
  flex: none;
  color: var(--bah-coral);
}

/* ---- title + count ---- */

body:not(#bah) .bah__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

body:not(#bah) .bah .bah__title {
  margin: 0 !important;
  padding: 0 !important;
  font-family: "Outfit", sans-serif !important;
  font-size: clamp(32px, 4.2vw, 52px) !important;
  font-weight: 600 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
  color: var(--bah-plum) !important;
}

body:not(#bah) .bah__count {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bah-plum);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

body:not(#bah) .bah .bah__text {
  max-width: 560px;
  margin: 12px 0 0 !important;
  font-size: 16px;
  line-height: 1.5;
  color: var(--bah-muted);
}

/* ---- category chips ---- */

body:not(#bah) .bah-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}

body:not(#bah) .bah-chips a.bah-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--bah-line);
  border-radius: 999px;
  background: var(--bah-paper);
  color: var(--bah-plum) !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body:not(#bah) .bah-chips a.bah-chip:hover {
  border-color: var(--bah-coral);
  background: var(--bah-coral-tint);
}

body:not(#bah) .bah-chips a.bah-chip.is-on {
  border-color: var(--bah-plum);
  background: var(--bah-plum);
  color: #ffffff !important;
}

/* ---- Mallow on his yellow circle ---- */

body:not(#bah) .bah__art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 220px;
}

body:not(#bah) .bah__art::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--bah-yellow-tint);
}

body:not(#bah) .bah .bah__img {
  position: relative;
  display: block;
  width: 190px !important;
  height: 190px !important;
  max-width: none !important;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(59, 32, 61, 0.18));
  animation: bah-bob 4s ease-in-out infinite;
}

@keyframes bah-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---- tablets ---- */

@media (max-width: 1024px) {
  body:not(#bah) .bah {
    gap: 20px;
    padding: 28px;
  }

  body:not(#bah) .bah__art {
    width: 170px;
    height: 170px;
  }

  body:not(#bah) .bah .bah__img {
    width: 150px !important;
    height: 150px !important;
  }
}

/* ---- phones: Mallow tucks into the top-right corner, chips scroll sideways ---- */

@media (max-width: 640px) {
  body:not(#bah) .bah {
    display: block;
    padding: 20px 18px 22px;
    border-radius: 22px;
    background: linear-gradient(140deg, var(--bah-paper) 0%, var(--bah-coral-tint) 100%);
  }

  body:not(#bah) .bah:not(.bah--char) {
    background: linear-gradient(140deg, var(--bah-paper) 0%, var(--bah-coral-tint) 100%);
  }

  body:not(#bah) .bah__art {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 80px;
    height: 80px;
  }

  body:not(#bah) .bah .bah__img {
    width: 76px !important;
    height: 76px !important;
  }

  /* keep the breadcrumb and title clear of Mallow */
  body:not(#bah) .bah--char .bah-crumbs,
  body:not(#bah) .bah--char .bah__head {
    margin-right: 84px;
  }

  /* the breadcrumb is plain text on phones (a pill wraps badly in a narrow space) */
  body:not(#bah) .bah-crumbs {
    margin-bottom: 12px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 12px;
  }

  body:not(#bah) .bah .bah__title {
    font-size: 30px !important;
  }

  body:not(#bah) .bah .bah__text {
    margin-top: 8px !important;
    font-size: 14px;
  }

  body:not(#bah) .bah-chips {
    flex-wrap: nowrap;
    margin: 16px -18px 0;
    padding: 0 18px 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body:not(#bah) .bah-chips::-webkit-scrollbar {
    display: none;
  }

  body:not(#bah) .bah-chips a.bah-chip {
    flex: none;
    min-height: 34px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(#bah) .bah .bah__img {
    animation: none;
  }
}

/* =========================================================================
   ANIMATED BACKGROUND  (v1.1.0)
   The same soft moving circles as the cart / checkout header band:
   two drifting glows, a slow dashed ring and a breathing ring around
   Mallow, and three floating dots. Purely decorative — no clicks,
   hidden from screen readers, still for anyone who prefers reduced motion.
   ========================================================================= */

body:not(#bah) .bah {
  isolation: isolate;
}

body:not(#bah) .bah__main {
  position: relative;
  z-index: 1;
}

body:not(#bah) .bah__art {
  z-index: 1;
}

body:not(#bah) .bah__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

body:not(#bah) .bah__bg .bah-orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  will-change: transform;
}

/* two big soft glows */
body:not(#bah) .bah-orb--1 {
  top: -130px;
  left: -90px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle at 40% 40%, rgba(251, 234, 192, 0.95) 0%, rgba(251, 234, 192, 0) 70%);
  animation: bah-drift-a 18s ease-in-out infinite;
}

body:not(#bah) .bah-orb--2 {
  right: 22%;
  bottom: -180px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle at 50% 50%, rgba(233, 154, 138, 0.34) 0%, rgba(233, 154, 138, 0) 68%);
  animation: bah-drift-b 22s ease-in-out infinite;
}

/* a big dashed ring circling Mallow, turning slowly */
body:not(#bah) .bah-orb--ring {
  top: 50%;
  right: 0;
  width: 300px;
  height: 300px;
  margin-top: -150px;
  border: 1.5px dashed rgba(59, 32, 61, 0.2);
  animation: bah-spin 70s linear infinite;
}

/* a fine ring that slowly breathes in and out */
body:not(#bah) .bah-orb--halo {
  top: 50%;
  right: 22px;
  width: 256px;
  height: 256px;
  margin-top: -128px;
  border: 1px solid rgba(233, 154, 138, 0.45);
  animation: bah-breathe 9s ease-in-out infinite;
}

/* without Mallow the rings sit a little further in */
body:not(#bah) .bah:not(.bah--char) .bah-orb--ring {
  right: -120px;
}

body:not(#bah) .bah:not(.bah--char) .bah-orb--halo {
  right: -80px;
}

/* little dots floating around */
body:not(#bah) .bah-orb--dot1 {
  top: 18%;
  left: 46%;
  width: 14px;
  height: 14px;
  background: #E99A8A;
  opacity: 0.55;
  animation: bah-float 7s ease-in-out infinite;
}

body:not(#bah) .bah-orb--dot2 {
  top: 14%;
  right: 30%;
  width: 10px;
  height: 10px;
  background: #3B203D;
  opacity: 0.22;
  animation: bah-float 9s ease-in-out infinite -3s;
}

body:not(#bah) .bah-orb--dot3 {
  bottom: 16%;
  right: 34%;
  width: 18px;
  height: 18px;
  background: #F4C95D;
  opacity: 0.45;
  animation: bah-float 11s ease-in-out infinite -6s;
}

@keyframes bah-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 30px) scale(1.08); }
}

@keyframes bah-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-70px, -24px) scale(1.06); }
}

@keyframes bah-spin {
  to { transform: rotate(360deg); }
}

@keyframes bah-breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes bah-float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(14px, -12px); }
  66% { transform: translate(-10px, 8px); }
}

/* tablets: Mallow is smaller, so are his rings */
@media (max-width: 1024px) {
  body:not(#bah) .bah-orb--ring {
    right: -12px;
    width: 250px;
    height: 250px;
    margin-top: -125px;
  }

  body:not(#bah) .bah-orb--halo {
    right: 8px;
    width: 210px;
    height: 210px;
    margin-top: -105px;
  }
}

/* phones: Mallow sits in the top-right corner — the rings follow him there */
@media (max-width: 640px) {
  body:not(#bah) .bah-orb--1 {
    top: -90px;
    left: -70px;
    width: 220px;
    height: 220px;
  }

  body:not(#bah) .bah-orb--2 {
    right: -100px;
    bottom: -110px;
    width: 260px;
    height: 260px;
  }

  body:not(#bah) .bah-orb--ring,
  body:not(#bah) .bah:not(.bah--char) .bah-orb--ring {
    top: -39px;
    right: -39px;
    width: 170px;
    height: 170px;
    margin-top: 0;
  }

  body:not(#bah) .bah-orb--halo,
  body:not(#bah) .bah:not(.bah--char) .bah-orb--halo {
    top: -14px;
    right: -14px;
    width: 120px;
    height: 120px;
    margin-top: 0;
  }

  body:not(#bah) .bah-orb--dot1 { top: 12%; left: 62%; }
  body:not(#bah) .bah-orb--dot2 { top: auto; bottom: 30%; right: 10%; }
  body:not(#bah) .bah-orb--dot3 { bottom: 10%; right: 40%; }
}

@media (prefers-reduced-motion: reduce) {
  body:not(#bah) .bah__bg .bah-orb {
    animation: none !important;
  }
}
