/* ============================================================
   Boothbunny custom overrides (managed via Claude Code / git)
   Design source: design_handoff_boothbunny_shopify/README.md
   ============================================================ */


/* ---------- Announcement bar: upright + centered, don't clip descenders ---------- */
.announcement-bar__slide,
.announcement-bar__text {
  line-height: 1.5 !important;
  text-align: center !important;
}
.announcement-bar__text,
.announcement-bar__text em {
  font-style: normal;
}
.announcement-bar__text {
  margin-inline: auto;
}

/* ---------- Header nav (about / shop / socials) ----------
   Design: 13.5px / 500, lowercase, gap via Horizon padding.
   Inactive #6d6579 · Hover #ff5fb2 · Active #141216 + pink underline */

header-component .menu-list__link {
  font-size: 13.5px !important;
  font-weight: 500;
  text-transform: lowercase;
  color: #6d6579 !important;
  transition: color 0.15s ease;
}

header-component .menu-list__list-item:where(:hover, :focus-within) .menu-list__link {
  color: #ff5fb2 !important;
}

header-component .menu-list__link--active {
  color: #141216 !important;
}

/* underline hugs the text (not the padded box) */
header-component .menu-list__link--active .menu-list__link-title {
  text-decoration: underline;
  text-decoration-color: #ff5fb2;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-skip-ink: none;
}

/* ---------- "support me" gradient button ---------- */

.bb-support-btn {
  display: inline-flex;
  align-items: center;
  color: #fff !important;
  font-family: 'Unbounded', var(--font-heading--family, sans-serif);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 5px 18px;
  background: linear-gradient(90deg, #b478e8, #ff5fb2);
  clip-path: polygon(
    0 0,
    calc(100% - 9px) 0,
    100% 9px,
    100% 100%,
    9px 100%,
    0 calc(100% - 9px)
  );
  white-space: nowrap;
  transition: filter 0.15s ease;
}

.bb-support-btn:hover {
  filter: brightness(1.08);
}

/* ---------- Boxed layout ----------
   Full-bleed backgrounds, content constrained to Horizon's page width.
   Section backgrounds stay full-width; each boothbunny section centers
   its content via padding-inline (see the section stylesheets).
   The hero photo intentionally stays full-bleed (it is designed to run
   off the right edge and blend into the lilac via the gradient fade). */

/* Hero text: align to the same page-width column as every other section.
   Uses !important so it wins over the inline paddingLeft the hero's JS
   sets (that JS can't find Horizon's logo and otherwise leaves text flush
   left). box-sizing keeps the padding from overflowing the container. */
.bb-hero-inner {
  box-sizing: border-box;
  /* Bezugsgroesse fuer die Ueberschrift: cqw misst die echte Innenbreite
     (ohne Innenabstand), anders als 100vw. Aendert sich der Abstand, waechst
     die Schrift nicht mehr aus der Zeile. */
  container-type: inline-size;
  padding-inline: max(24px, calc((100% - var(--page-width)) / 2)) !important;
  padding-left: max(24px, calc((100% - var(--page-width)) / 2 + 40px)) !important;
}

/* ---------- Home page entrance animations ----------
   Hero zooms + rotates in, the release-rave window glitches in, the rest
   (products + support) flies in from the right when scrolled into view. */
@media (prefers-reduced-motion: no-preference) {
  .bb-home #MainContent { overflow-x: clip; }

  /* above the fold — play on load */
  .bb-home .bb-hero {
    animation: bbHeroFade 0.9s ease-out backwards;
  }
  .bb-home .bb-hero h1 {
    transform-origin: left center;
    animation: bbHeroTextIn 1.35s cubic-bezier(0.16, 0.84, 0.3, 1) backwards;
  }
  .bb-home .bb-rave {
    animation: bbRaveZapIn 0.62s cubic-bezier(0.2, 0.9, 0.3, 1) 0.15s backwards;
  }

  /* below the fold — collection rows fly in on load (staggered), support on scroll.
     The worn band opts out: it unrolls on scroll instead. */
  .bb-js .bb-home .bb-collection-row-section:not(:has(.bb-crow--worn)),
  .bb-js .bb-home .bb-support-section {
    opacity: 0;
    transform: translateX(80px);
  }
  .bb-home .bb-collection-row-section.bb-in,
  .bb-home .bb-support-section.bb-in {
    animation: bbFlyInRight 0.72s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
}

@keyframes bbHeroFade {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes bbHeroTextIn {
  0%   { opacity: 0; transform: scale(2.7) rotate(-5deg); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
/* retro CRT power-on: a bright horizontal line that snaps open vertically */
@keyframes bbRaveZapIn {
  0%   { opacity: 0; transform: scale(1.35, 0.006); filter: brightness(3.6); }
  38%  { opacity: 1; transform: scale(1.32, 0.02); filter: brightness(3); }
  56%  { transform: scale(1.02, 1.06); filter: brightness(1.7); }
  74%  { transform: scale(0.995, 0.97); filter: brightness(1.2); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}
@keyframes bbFlyInRight {
  0%   { opacity: 0; transform: translateX(80px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ---------- Hero "cute" bunny ears (on the last e) ---------- */
.bb-ear-letter {
  position: relative;
  display: inline-block;
  transform-origin: bottom center;
}
/* on hover the ears keep twitching; the whole letter does two quick bunny hops */
.bb-ear-letter:hover {
  animation: bbEHop 0.66s ease-out;
}
@keyframes bbEHop {
  0%   { transform: translateY(0) scaleY(1); }
  14%  { transform: translateY(-0.32em) scaleY(1.06); }
  30%  { transform: translateY(0) scaleY(0.9); }
  34%  { transform: translateY(0) scaleY(0.97); }
  48%  { transform: translateY(-0.22em) scaleY(1.05); }
  64%  { transform: translateY(0) scaleY(0.94); }
  78%  { transform: translateY(0) scaleY(1); }
  100% { transform: translateY(0) scaleY(1); }
}
/* the "e" glyph carries its own (matching) gradient so it can sit ABOVE the
   ears — a plain nested glyph would lose the clipped gradient of its parent. */
.bb-ear-glyph {
  position: relative;
  z-index: 2;
  background-image: linear-gradient(90deg, #b478e8, #ff5fb2, #b478e8);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: bbGradientFlow 5s linear infinite;
}
.bb-ears {
  position: absolute;
  left: 50%;
  bottom: 0.56em;
  transform: translateX(-50%);
  width: 0.48em;
  height: 0.32em;
  pointer-events: none;
  z-index: 1; /* behind the .bb-ear-glyph (z-index 2) */
}
.bb-ear {
  position: absolute;
  bottom: 0;
  width: 0.2em;
  height: 0.32em;
  /* fill comes from the shared viewport-anchored hero gradient (seamless) */
  /* short, pointed boothbunny-style ear */
  clip-path: polygon(50% 0%, 70% 14%, 78% 46%, 68% 82%, 55% 100%, 45% 100%, 32% 82%, 22% 46%, 30% 14%);
  transform-origin: bottom center;
}
.bb-ear--l { left: 0.04em; transform: rotate(-13deg); animation: bbEarTwitchL 4.8s ease-in-out infinite, bbGradientFlow 5s linear infinite; }
.bb-ear--r { right: 0.04em; transform: rotate(13deg); animation: bbEarTwitchR 5.6s ease-in-out infinite, bbGradientFlow 5s linear infinite; }

@keyframes bbEarTwitchL {
  0%, 100% { transform: rotate(-13deg); }
  30%      { transform: rotate(-18deg); }
  60%      { transform: rotate(-9deg); }
}
@keyframes bbEarTwitchR {
  0%, 100% { transform: rotate(13deg); }
  35%      { transform: rotate(18deg); }
  65%      { transform: rotate(9deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bb-ear--l, .bb-ear--r { animation: none; }
}

/* ---------- Hero heading: mobile-only line arrangement + bigger type ----
   Desktop: "get your paws / on something cute" (bb-mbr hidden).
   Mobile:  get / your / paws on / something / cute (bb-dbr hidden). */
/* Horizon setzt global `p, h1..h6 { overflow-wrap: break-word }`. Dadurch
   bricht die Hero-Zeile mitten im Wort um ("somethin / g"), sobald es knapp
   wird, statt nur knapp zu bleiben. Fuer diese Ueberschrift abschalten. */
.bb-hero h1,
.bb-hero h1 span {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.bb-hero h1 br.bb-mbr { display: none; }

@media (max-width: 749px) {
  .bb-hero h1 br.bb-mbr { display: inline; }
  .bb-hero h1 br.bb-dbr { display: none; }
  .bb-home .bb-hero h1 {
    font-size: clamp(40px, 12.2vw, 60px);
    line-height: 1.04;
  }
  /* Shop-Hero: die Groesse steht inline in page.shop.json und blieb auf dem
     Handy am 32px-Boden von clamp(32px, 5vw, 54px) haengen. `body` davor,
     damit die Regel die spaetere Inline-Deklaration schlaegt.
     Begrenzend ist das laengste Wort ("something"): gemessen 6,93px Breite je
     1px Schriftgroesse, dazu 2x24px Innenabstand. Der Teiler 7 laesst etwas
     Luft, damit die Zeile nicht umbricht. */
  body .bb-hero h1 {
    /* "something" ist das laengste Wort und misst 6,93px je 1px Schriftgroesse,
       passt also bis 14,4cqw. 12,4cqw laesst Luft fuer Geraete, die Text
       zusaetzlich vergroessern. */
    font-size: min(60px, 12.4cqw);
    line-height: 1.04;
    /* verhindert, dass Safari und Chrome die Zeile eigenmaechtig aufblasen */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  /* "on" in black on mobile (paints over the clipped gradient) */
  .bb-home .bb-hero h1 .bb-on {
    color: #141216;
    -webkit-text-fill-color: #141216;
  }
  /* no subtitle on mobile — gilt für beide Heroes (Landing und Shop-Seite),
     sonst laeuft die Zeile auf der Shop-Seite ins Foto und ist unlesbar */
  .bb-hero p { display: none; }
}

/* ---------- Header: subtle bottom shadow on mobile ---------- */
@media (max-width: 749px) {
  #header-component {
    box-shadow: 0 2px 10px rgba(20, 10, 30, 0.08);
  }
}

/* ---------- Header: search + cart pink on hover ---------- */
.search-action:hover,
.search-action:hover .header-actions__action,
.search-action:hover .svg-wrapper svg,
.header-actions__action:has(cart-icon):hover,
.header-actions__cart-icon:hover {
  color: #ff5fb2 !important;
}

/* ---------- Header logo: pink gradient + glitch on hover ----------
   Overlay a gradient-masked copy of the wordmark on top of the black logo;
   reveal + glitch it on hover.

   Der Overlay haengt am Bildcontainer, nicht am Link: der Link ist auf dem
   Handy deutlich groesser als das Logo, und eine inset:0-Maske darauf hat
   die Wortmarke beim Antippen riesig aufgezogen. Zusaetzlich laeuft der
   ganze Effekt nur auf Geraeten mit echtem Zeigegeraet, damit ein Tap auf
   dem Handy kein haengendes :hover ausloest. */
@media (hover: hover) and (pointer: fine) {
  .bb-logo-link .header-logo__image-container--original {
    position: relative;
    display: inline-flex;
  }

  .bb-logo-link .header-logo__image-container--original::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #b478e8, #ff5fb2, #b478e8);
    background-size: 200% auto;
    -webkit-mask: url('/assets/img/bb-wordmark.svg') center / contain no-repeat;
    mask: url('/assets/img/bb-wordmark.svg') center / contain no-repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
  }

  .bb-logo-link:hover .header-logo__image-container--original::after {
    opacity: 1;
    animation: bbGradientFlow 4s linear infinite, bbLogoWobble 0.4s ease-in-out infinite;
  }

  .bb-logo-link:hover .header-logo__image {
    opacity: 0;
  }
}

@keyframes bbLogoWobble {
  0%, 100% { transform: translate(0, 0) skewX(0); }
  25%      { transform: translate(-1.5px, 0) skewX(-2deg); }
  50%      { transform: translate(1.5px, 0) skewX(1.5deg); }
  75%      { transform: translate(-1px, 0) skewX(-1deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bb-logo-link:hover .header-logo__image-container--original::after {
    animation: none;
  }
}

/* ---------- Animated color fades (fonts + buttons) ----------
   Continuously flow the brand gradient. Uses background-image (not the
   `background` shorthand) so it never resets background-clip:text on the
   gradient-text elements. Symmetric 3-stop gradient + 200% size loops
   seamlessly. */
@keyframes bbGradientFlow {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

/* purple -> pink brand gradient (headline, counter, taglines, hearts, buttons) */
/* hero heading: viewport-anchored gradient shared by the word spans AND the
   bunny ears — every element samples the exact same gradient position, so
   the ears blend seamlessly into "cute" */
.bb-hero h1 span,
.bb-hero .bb-ear {
  background-image: linear-gradient(90deg, #b478e8, #ff5fb2, #b478e8) !important;
  background-attachment: fixed !important;
  background-size: 200vw auto !important;
  animation: bbGradientFlow 5s linear infinite;
}

.bb-num,
.bb-gradient-text,
.bb-nl__heart,
.bb-nl__submit,
.bb-subscribe__submit {
  background-image: linear-gradient(90deg, #b478e8, #ff5fb2, #b478e8) !important;
  background-size: 200% auto !important;
  animation: bbGradientFlow 5s linear infinite;
}

/* LUNE name (lilac -> pink) */
.bb-about-name--lune {
  background-image: linear-gradient(90deg, #d9b8ff, #ffa7d8, #d9b8ff) !important;
  background-size: 200% auto !important;
  animation: bbGradientFlow 5s linear infinite;
}

/* NOIR name (silver) */
.bb-about-name--noir {
  background-image: linear-gradient(90deg, #eceaf0, #66626f, #eceaf0) !important;
  background-size: 200% auto !important;
  animation: bbGradientFlow 6s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .bb-hero h1 span,
  .bb-num,
  .bb-gradient-text,
  .bb-nl__heart,
  .bb-nl__submit,
  .bb-subscribe__submit,
  .bb-about-name--lune,
  .bb-about-name--noir {
    animation: none !important;
  }
}

/* ---------- maskierte Mail-Adresse (snippets/bb-mail.liquid) ---------- */
.bb-mail {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.bb-mail:hover {
  opacity: 0.75;
}

/* ---------- Kopfzeile am Handy ----------
   Seit der Menueknopf dort weggefallen ist, traegt nur noch das Logo die
   Hoehe, und die Leiste war auf 28px zusammengeschrumpft. */
@media screen and (max-width: 749px) {
  .header__row--top {
    min-height: 60px;
  }
}
