/* ============================================================
   Universal site chrome — the Daymaker marketing header + footer.

   This is the single source of truth for the announcement bar,
   sticky nav, and footer that appear on every public marketing
   page. Markup is injected by /scripts/site-chrome.js into the
   <div id="dm-site-header"></div> and <div id="dm-site-footer"></div>
   placeholders; this file styles it.

   Brand color tokens are scoped to the chrome containers so the
   header/footer render correctly even on a page that hasn't defined
   the global :root palette. Layout tokens (--pad, --maxw) are left
   to the page so the footer gutter can stay responsive; the footer
   padding declaration carries its own fallbacks.
   ============================================================ */

.site-header,
footer.tail {
  --cream: #F4F0E8;
  --ink: #0A0A0A;
  --muted: #6B6358;
  --pink: #FF4FA3;
  --rule: rgba(10, 10, 10, 0.10);
}

/* ============ STICKY HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: transparent;
  padding-bottom: 0;
  transition: padding-bottom 0.3s ease;
}

/* --- shrink state (added on scroll) --- */
.site-header.shrink { padding-bottom: 0; }
.site-header.shrink nav.top {
  margin-top: 6px;
  padding-top: 6px;
  padding-bottom: 6px;
  box-shadow: 4px 4px 0 var(--ink);
}
.site-header.shrink .wordmark img { height: 28px; }
.site-header.shrink .nav-links,
.site-header.shrink .nav-right { font-size: 14px; }

/* ============ ANNOUNCEMENT BAR ============ */
.announce {
  background: #fff;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 20px;
  letter-spacing: 0.01em;
  border-bottom: 2.5px solid var(--ink);
}
.announce-link {
  color: var(--ink);
  text-decoration: none;
}
.announce-link .u {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.announce-link:hover .u { text-decoration-thickness: 3px; }
@media (max-width: 600px) {
  .announce { font-size: 13px; padding: 10px 14px; }
}

/* ============ NAV ============ */
nav.top {
  padding: 14px 20px 14px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 10px auto 0;
  position: relative;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 99px;
  box-shadow: 6px 6px 0 var(--ink);
  transition: padding 0.3s ease, margin-top 0.3s ease, box-shadow 0.3s ease;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
}
.nav-links a:hover { color: var(--muted); }
.wordmark { display: inline-flex; align-items: center; line-height: 0; }
.wordmark img { height: 48px; transition: height 0.3s ease; }
.nav-right {
  display: flex;
  gap: 38px;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
}
.nav-right > a, .dropdown-trigger {
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
/* The Full-send pill. Self-contained so it renders correctly on
   any page using the shared chrome — we can't rely on each page's
   own .btn base (some define it, some don't, some define it
   transparent). Pink fill, white text, ink border + 4px stamped
   shadow drop = same look as the landing page. */
.btn.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--pink);
  color: #FFFFFF;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.btn.nav-cta:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); color: #FFFFFF; }
.btn.nav-cta:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

/* ============ "Make money" CTA — cash burst hover ============
   A money-themed hover for the primary "Make money" buttons: the
   button gives a springy lift while a little burst of gold "$" coins
   pops up out of it and arcs away. Coins are CSS-drawn (gold disc +
   ink ring) to match the brutalist brand. The .money-cta__coins
   container + .coin particles are injected by site-chrome.js. Works
   on both the large inline buttons and the compact header pill. */
.btn.money-cta {
  position: relative;
  overflow: visible;
  transition:
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn.money-cta .money-cta__label,
.btn.money-cta .money-cta__arrow {
  position: relative;
  z-index: 1;
}
.btn.money-cta .money-cta__arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn.money-cta:hover {
  transform: translate(-2px, -3px) scale(1.04);
  box-shadow: 8px 10px 0 var(--ink);
}
.btn.money-cta:hover .money-cta__arrow {
  transform: translateX(5px);
}
.btn.money-cta:active {
  transform: translate(2px, 2px) scale(0.99);
  box-shadow: 2px 2px 0 var(--ink);
  transition:
    transform 0.06s ease,
    box-shadow 0.06s ease;
}

/* ---- coin burst ---- */
.money-cta__coins {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  pointer-events: none;
  z-index: 0;
}
.money-cta__coins .coin {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 17px;
  height: 17px;
  margin-left: -8.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFE9A8 0%, #F4B73D 62%, #D98E25 100%);
  border: 1.5px solid var(--ink);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  color: var(--ink);
  font: 800 10px/1 'Inter', system-ui, sans-serif;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translate(0, 0) scale(0.2);
}
.money-cta__coins .coin::before { content: "$"; }
/* Each coin flies on its own arc; vars set per nth-child below. */
.btn.money-cta:hover .coin,
.btn.money-cta.is-bursting .coin {
  animation: cash-pop 0.72s cubic-bezier(0.18, 0.7, 0.3, 1) both;
}
.money-cta__coins .coin:nth-child(1) { --tx: -42px; --rot: -52deg; animation-delay: 0s; }
.money-cta__coins .coin:nth-child(2) { --tx: -22px; --rot: -22deg; animation-delay: 0.04s; }
.money-cta__coins .coin:nth-child(3) { --tx: 0px;   --rot: 8deg;   --ty: -52px; animation-delay: 0.02s; }
.money-cta__coins .coin:nth-child(4) { --tx: 22px;  --rot: 26deg;  animation-delay: 0.06s; }
.money-cta__coins .coin:nth-child(5) { --tx: 42px;  --rot: 54deg;  animation-delay: 0.01s; }

@keyframes cash-pop {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.2) rotate(0deg);
  }
  18% {
    opacity: 1;
    transform: translate(calc(var(--tx) * 0.25), -12px) scale(1) rotate(calc(var(--rot) * 0.3));
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty, -44px)) scale(0.85) rotate(var(--rot));
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn.money-cta,
  .btn.money-cta .money-cta__arrow { transition: none; }
  .btn.money-cta:hover,
  .btn.money-cta.is-bursting { transform: translate(-1px, -1px); }
  .btn.money-cta:hover .money-cta__arrow { transform: none; }
  .btn.money-cta:hover .coin,
  .btn.money-cta.is-bursting .coin { animation: none; }
}

.dropdown { position: relative; }
.dropdown-trigger::after {
  content: ' \25BE';
  font-size: 10px;
  color: var(--muted);
  margin-left: 4px;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 22px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 8px 0;
  min-width: 300px;
  box-shadow: 12px 12px 0 var(--ink);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.dropdown.open .dropdown-menu { opacity: 1; pointer-events: auto; }
/* transparent bridge over the gap so the cursor can travel to the menu */
.dropdown-menu::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -22px;
  height: 22px;
}
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px; height: 14px;
  background: white;
  border-left: 2px solid var(--ink);
  border-top: 2px solid var(--ink);
}
.dropdown-menu .item {
  display: block;
  padding: 12px 22px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  position: relative;
}
.dropdown-menu .item:hover { background: var(--cream); }
.dropdown-menu .item .desc {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 400;
}
.dropdown-menu .item .pd {
  display: none;
}

/* ============ FOOTER ============ */
footer.tail {
  width: 100%;
  margin: 0;
  background: #fff;
  border-top: 2.5px solid var(--ink);
  padding: 64px max(var(--pad, 24px), calc((100% - var(--maxw, 1400px)) / 2 + var(--pad, 24px))) 80px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--muted);
}
.tail-grid {
  display: grid;
  grid-template-columns: 1.3fr 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--rule);
}
.tail-brand .wordmark img { height: 26px; }
.tail-brand p { margin-top: 14px; font-size: 13px; line-height: 1.55; max-width: 320px; }
.tail-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 18px;
}
.tail-col ul { list-style: none; padding: 0; margin: 0; }
.tail-col li { margin-bottom: 10px; }
.tail-col a { color: var(--muted); text-decoration: none; }
.tail-col a:hover { color: var(--ink); }

/* footer: bakeries + partner logos */
.tail-addr {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 250px;
}
.tail-pin {
  flex: none;
  width: 10px; height: 10px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 2px 2px 0 var(--ink);
}
.tail-powered {
  margin: 18px 0 11px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.tail-partners {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px 16px;
}
.tail-partners li { line-height: 0; }
.tail-partners a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.tail-partners img {
  max-height: 24px;
  width: auto;
  max-width: 94px;
  object-fit: contain;
}
.tail-partners a:hover { opacity: 1; transform: translateY(-1px); }

/* footer: socials row */
.tail-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  padding: 32px 0 30px;
}
.tail-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.tail-social svg { width: 17px; height: 17px; flex: none; }
.tail-social a:hover { color: var(--ink); }

/* "Add your bakery to the list" CTA — same shape language as the
   landing's "Full send" button: filled pink squircle, white bold copy,
   2.5px ink border, ink stamped-shadow drop. Selector pinned through
   `footer.tail .tail-col` so it beats both the generic
   `.tail-col a { color: --muted }` above AND VC's inline
   `footer.tail .tail-col a { color: --muted }` rule (0,0,3,2 vs 0,0,2,2). */
footer.tail .tail-col a.tail-bakery-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 14px 24px;
  background: #FFFFFF;
  color: var(--ink, #0A0A0A);
  border: 2.5px solid var(--ink, #0A0A0A);
  border-radius: 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink, #0A0A0A);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
footer.tail .tail-col a.tail-bakery-cta:hover {
  color: var(--ink, #0A0A0A);
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--ink, #0A0A0A);
}
footer.tail .tail-col a.tail-bakery-cta:active {
  color: var(--ink, #0A0A0A);
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink, #0A0A0A);
}

/* Right-aligned orders cluster inside the tail-social flex row. */
.tail-social__orders {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.tail-social__orders-label { font-weight: 500; }
.tail-social__orders a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-underline-offset: 3px;
  padding: 0;
}
.tail-social__orders a:hover { color: var(--pink); }
.tail-social__sep { opacity: 0.45; }
@media (max-width: 600px) {
  .tail-social__orders { margin-left: 0; width: 100%; }
}

/* footer: legal + org */
.tail-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 30px;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  border-top: 1px solid var(--rule);
}
.tail-bottom .pd {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--pink);
  border-radius: 50%;
  margin: 0 6px 1px;
  vertical-align: middle;
}
.tail-org {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.85;
}
.tail-sign {
  margin-top: 50px;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--ink);
  font-weight: 700;
}

/* ============ FOOTER REVEAL ANIMATION ============ */
/* On-brand "stamp" reveal: a pink accent sweeps across the top ink border,
   then the rows rise + fade in with a staggered delay (like the footer being
   pressed onto the page). Driven by `.tail--in`, added via IntersectionObserver
   in site-chrome.js. All motion is gated behind prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  footer.tail { position: relative; }

  /* one-time pink glow that travels across the ink border, then exits */
  footer.tail::before {
    content: "";
    position: absolute;
    top: -2.5px;
    left: -28%;
    width: 28%;
    height: 2.5px;
    background: linear-gradient(90deg, transparent, var(--pink), transparent);
    opacity: 0;
    pointer-events: none;
  }
  footer.tail.tail--in::before {
    animation: tail-sweep 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  }
  @keyframes tail-sweep {
    0%   { left: -28%; opacity: 0; }
    18%  { opacity: 1; }
    82%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
  }

  /* staggered rise-in for the major footer rows */
  .tail-grid > *,
  .tail-social,
  .tail-bottom,
  .tail-org {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }
  footer.tail.tail--in .tail-grid > *,
  footer.tail.tail--in .tail-social,
  footer.tail.tail--in .tail-bottom,
  footer.tail.tail--in .tail-org {
    opacity: 1;
    transform: translateY(0);
  }
  footer.tail.tail--in .tail-grid > *:nth-child(1) { transition-delay: 0.12s; }
  footer.tail.tail--in .tail-grid > *:nth-child(2) { transition-delay: 0.20s; }
  footer.tail.tail--in .tail-grid > *:nth-child(3) { transition-delay: 0.28s; }
  footer.tail.tail--in .tail-grid > *:nth-child(4) { transition-delay: 0.36s; }
  footer.tail.tail--in .tail-social { transition-delay: 0.44s; }
  footer.tail.tail--in .tail-bottom { transition-delay: 0.52s; }
  footer.tail.tail--in .tail-org    { transition-delay: 0.58s; }

  /* playful wiggle on the social icons */
  .tail-social svg { transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .tail-social a:hover svg { transform: translateY(-2px) rotate(-8deg); }
}

/* ============ FOOTER "ADD YOUR BAKERY" GIF TEXT ============ */
/* Animated GIF revealed through the label via background-clip: text. The box
   itself stays pink (set above); only the text shows the GIF. */
footer.tail .tail-col a.tail-bakery-cta .bakery-cta-text {
  background-image: url("https://framerusercontent.com/images/byCMylKU6RQ8oaA7tX9IhqyXS4.gif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* A GIF can't be paused via CSS, so reduced-motion users get plain white text. */
@media (prefers-reduced-motion: reduce) {
  footer.tail .tail-col a.tail-bakery-cta .bakery-cta-text {
    background-image: none;
    -webkit-text-fill-color: var(--ink, #0A0A0A);
    color: var(--ink, #0A0A0A);
  }
}

/* ============ RESPONSIVE (chrome only) ============ */
@media (max-width: 760px) {
  nav.top { padding: 11px 14px 11px 20px; margin: 10px 14px 0; box-shadow: 4px 4px 0 var(--ink); }
  .nav-links, .btn.nav-cta { display: none; }
  .tail-grid { grid-template-columns: 1fr 1fr; }
}

/* Minimal legal-page header (terms/privacy) — just the Daymaker logo
   on the left, linked back to /. The pages are intentionally
   no-frills, so the full shared chrome is too loud for them. */
.legal-mini-header {
  padding: 24px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.legal-mini-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.legal-mini-header__logo img {
  height: 36px;
  width: auto;
  display: block;
}
@media (max-width: 540px) {
  .legal-mini-header { padding: 18px 22px; }
  .legal-mini-header__logo img { height: 28px; }
}
