/* Fresh Baked — shared marketing site styles.
   Page-specific layout lives inline on each page (that markup is the design
   as it came out of the brand kit). Everything here is shared chrome:
   the reset, brand tokens, the reveal/hover motion vocabulary, the header,
   the mobile menu and the footer. */

/* ---------- Brand tokens ---------- */
:root {
  --fb-navy: #0E2530;
  --fb-navy-deep: #091C26;
  --fb-navy-hero: #0E2233;
  --fb-blue-800: #1C4C66;
  --fb-blue-700: #235B79;
  --fb-blue-500: #2E86C0;
  --fb-blue-400: #4C9BD4;
  --fb-amber: #FCB040;
  --fb-cream: #EFE9DF;
  --fb-ink: #22303A;
  --fb-page: #FFFCF6;

  /* Plan colours — shared with the in-app subscription modal. */
  --fb-tracking: #8FBF2E;
  --fb-tracking-dark: #6E9B1F;
  --fb-science: #3BB8EF;

  --fb-display: "Gabarito", system-ui, sans-serif;
  --fb-body: "Instrument Sans", system-ui, sans-serif;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fb-page);
  color: var(--fb-ink);
  font-family: var(--fb-body);
  -webkit-font-smoothing: antialiased;
}

p, li, dd, figcaption { text-wrap: pretty; }

a { color: var(--fb-blue-500); text-decoration: none; }
a:hover { color: var(--fb-blue-700); }

img, video { max-width: 100%; }

::selection { background: #FCE0AE; }

:focus-visible {
  outline: 3px solid var(--fb-amber);
  outline-offset: 2px;
  border-radius: 4px;
}

.fb-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link — visible only once focused. */
.fb-skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 0 0 12px 12px;
  background: var(--fb-blue-700);
  color: #fff;
  font-weight: 700;
  transition: top .18s ease;
}
.fb-skip:focus { top: 0; color: #fff; }

/* ---------- Motion vocabulary ---------- */
@keyframes fb-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fb-bob  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes fb-drift { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes fb-popin {
  0%   { opacity: 0; transform: translateY(20px) scale(.7); }
  60%  { opacity: 1; transform: translateY(-6px) scale(1.06); }
  100% { opacity: 1; transform: none; }
}
@keyframes fb-ping {
  0%   { transform: scale(.5); opacity: .85; }
  70%  { transform: scale(2); opacity: 0; }
  100% { transform: scale(2); opacity: 0; }
}

/* Scroll reveal */
.fb-rev {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.75,.3,1), transform .8s cubic-bezier(.2,.75,.3,1);
}
.fb-rev.fb-in { opacity: 1; transform: none; }

/* Lift on hover */
.fb-card { transition: transform .3s, box-shadow .3s; }
.fb-card:hover { transform: translateY(-7px); box-shadow: 0 34px 60px -34px rgba(35,91,121,.5); }

/* Merch image zoom inside a lifting card */
.fb-mimg { transition: transform .55s cubic-bezier(.2,.75,.3,1); }
.fb-card:hover .fb-mimg { transform: scale(1.07); }

/* Pill buttons */
.fb-badge { transition: transform .2s, box-shadow .2s; }
.fb-badge:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -16px rgba(0,0,0,.5); }

/* Reaction emoji stagger-pop */
.fb-react { transition: transform .25s; }
.fb-react:hover { transform: translateY(-8px) scale(1.08); }
.fb-pop { opacity: 0; transform: translateY(20px) scale(.7); }
.fb-pop.fb-popin { animation: fb-popin .62s cubic-bezier(.34,1.56,.44,1) forwards; }

/* Phone bezel.
   height:auto is load-bearing — the screenshots carry width/height attributes
   for aspect-ratio/CLS, and without this the height attribute wins and the
   phone renders full-resolution tall. */
.fb-phone {
  border-radius: 34px;
  border: 7px solid #05131F;
  box-shadow: 0 40px 80px -34px rgba(0,0,0,.55);
  overflow: hidden;
  background: #fff;
  display: block;
  width: 100%;
  height: auto;
}

/* Street Team pulse pin */
.fb-pin {
  position: absolute;
  width: 13px; height: 13px;
  border-radius: 50%;
}
.fb-pin-ping { animation: fb-ping 2.6s ease-out infinite; }

/* FAQ accordion */
.fb-q { list-style: none; cursor: pointer; }
.fb-q::-webkit-details-marker { display: none; }
details[open] .fb-plus { transform: rotate(45deg); }

/* ---------- Header ---------- */
.fb-topbar {
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, #235B79 0%, #2E86C0 32%, #4C9BD4 55%, #FCB040 100%);
  position: relative;
  z-index: 70;
}

#fb-head {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(10px);
  background: rgba(255,252,246,.72);
  border-bottom: 1px solid rgba(35,91,121,.1);
  transition: background .3s, box-shadow .3s;
}

.fb-head-in {
  max-width: 1240px;
  margin: 0 auto;
  padding: 11px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.fb-logo { display: flex; align-items: center; flex: none; }
.fb-logo img { height: 50px; width: auto; object-fit: contain; display: block; }

#fb-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 14.5px;
  font-weight: 600;
  color: #3B4C57;
}
#fb-nav a { padding: 8px 13px; border-radius: 9px; color: #3B4C57; }
#fb-nav a:hover { background: rgba(35,91,121,.07); color: var(--fb-blue-700); }
#fb-nav a[aria-current="page"] { color: var(--fb-blue-700); background: rgba(35,91,121,.08); }

.fb-cta-sub {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--fb-amber);
  color: #0E2233 !important;
  font-weight: 800;
  margin-left: 14px;
  box-shadow: 0 10px 22px -12px rgba(252,176,64,.95);
}
.fb-cta-sub:hover { background: #FFC062; }

.fb-cta-in {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--fb-blue-700);
  color: #fff !important;
  font-weight: 700;
  margin-left: 8px;
}
.fb-cta-in:hover { background: #1C4C66; }

/* Mobile: compact CTAs + a hamburger that opens the full menu.
   The desktop nav is the only path to About / The App / Merch, so the
   burger has to exist — without it those pages are footer-only on a phone. */
#fb-mobcta { display: none; align-items: center; gap: 8px; }
#fb-mobcta .fb-cta-sub,
#fb-mobcta .fb-cta-in { margin-left: 0; padding: 10px 16px; font-size: 14px; }

.fb-burger {
  display: none;
  width: 44px; height: 44px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1.5px solid rgba(35,91,121,.22);
  background: rgba(255,255,255,.6);
  color: var(--fb-blue-700);
  cursor: pointer;
  padding: 0;
}
.fb-burger:hover { background: #fff; }
.fb-burger span {
  display: block;
  position: relative;
  width: 19px; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s ease, background .1s ease;
}
.fb-burger span::before,
.fb-burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 19px; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s ease, top .25s ease;
}
.fb-burger span::before { top: -6px; }
.fb-burger span::after { top: 6px; }
body.fb-menu-open .fb-burger span { background: transparent; }
body.fb-menu-open .fb-burger span::before { top: 0; transform: rotate(45deg); }
body.fb-menu-open .fb-burger span::after { top: 0; transform: rotate(-45deg); }

#fb-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(14,34,51,.97);
  backdrop-filter: blur(6px);
  display: none;
  flex-direction: column;
  padding: 92px 30px 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
body.fb-menu-open #fb-menu { display: flex; animation: fb-fade .2s both; }
body.fb-menu-open { overflow: hidden; }

#fb-menu a {
  display: block;
  padding: 17px 4px;
  font-family: var(--fb-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -.01em;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
#fb-menu a:hover { color: var(--fb-amber); }
#fb-menu .fb-menu-cta {
  margin-top: 28px;
  border-bottom: 0;
  border-radius: 999px;
  text-align: center;
  font-size: 17px;
  padding: 16px 24px;
  background: var(--fb-amber);
  color: #0E2233;
}
#fb-menu .fb-menu-cta.alt {
  margin-top: 12px;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.4);
  color: #fff;
}

/* ---------- Signed-in state ----------
   Both CTAs are always in the markup; which one shows is decided by a class the
   inline head script stamps on <html> from the fb_signedin cookie. Rendering both
   and hiding one (rather than rewriting the link in JS) is what keeps it from
   flashing "Sign In" on every load for a member. Signed out is the default, so a
   browser with no cookie — and any crawler — sees the sign-in link. */
.fb-when-in { display: none !important; }
:root.fb-signed-in .fb-when-in { display: inline-flex !important; }
:root.fb-signed-in .fb-when-out { display: none !important; }
/* The footer column stacks its links, so that one has to stay block. */
:root.fb-signed-in .fb-foot-col .fb-when-in { display: block !important; }
:root.fb-signed-in #fb-menu .fb-when-in { display: block !important; }

/* ---------- Footer ---------- */
.fb-footer { background: var(--fb-navy-hero); color: #fff; }
.fb-foot {
  max-width: 1240px;
  margin: 0 auto;
  padding: 58px 30px 22px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
}
.fb-foot-brand img { height: 40px; width: auto; object-fit: contain; margin-bottom: 18px; display: block; }
.fb-foot-blurb { margin: 0 0 16px; font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,.7); max-width: 34ch; }
.fb-foot h2 {
  margin: 0 0 16px;
  font-family: var(--fb-display);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  font-weight: 800;
}
.fb-foot-col a {
  display: block;
  font-size: 14.5px;
  color: rgba(255,255,255,.82);
  margin-bottom: 11px;
}
.fb-foot-col a:last-child { margin-bottom: 0; }
.fb-foot-col a:hover { color: var(--fb-amber); }

.fb-social { display: flex; gap: 11px; }
.fb-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
  transition: border-color .2s, color .2s, background .2s;
}
.fb-social a:hover { border-color: var(--fb-amber); color: var(--fb-amber); background: rgba(252,176,64,.1); }

.fb-foot-legal {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 30px 30px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255,255,255,.5);
}

/* ---------- Share row ---------- */
.fb-foot-share {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 30px 0;
}

.fb-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.fb-share-label {
  font-family: var(--fb-display);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(255,255,255,.55);
  margin-right: 4px;
}
.fb-share a, .fb-share button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform .2s, border-color .2s, color .2s, background .2s;
}
.fb-share a:hover, .fb-share button:hover {
  transform: translateY(-3px);
  border-color: var(--fb-amber);
  color: var(--fb-amber);
  background: rgba(252,176,64,.1);
}
.fb-copied {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fb-amber);
  opacity: 0;
  transition: opacity .2s;
}
.fb-copied.on { opacity: 1; }

/* ---------- Video modal ---------- */
#fb-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8,14,20,.9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#fb-modal.on { display: flex; animation: fb-fade .25s both; }
.fb-modal-in { position: relative; width: 100%; max-width: 960px; }
.fb-modal-close {
  position: absolute;
  top: -48px; right: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.4);
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-modal-close:hover { background: rgba(255,255,255,.12); }
.fb-modal-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  box-shadow: 0 50px 100px -30px rgba(0,0,0,.8);
}
.fb-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Breakpoints (shared chrome only) ---------- */
@media (max-width: 960px) {
  #fb-nav { display: none !important; }
  #fb-mobcta { display: flex !important; }
  .fb-burger { display: inline-flex; }
  .fb-logo img { height: 42px; }
  .fb-head-in { padding: 9px 18px; gap: 12px; }
}

@media (max-width: 640px) {
  .fb-foot { grid-template-columns: 1fr 1fr !important; }
  .fb-head-in { padding: 9px 14px; }
}

@media (max-width: 560px) {
  #fb-mobcta .fb-cta-in { display: none; }
}

/* ---------- Reduced motion ----------
   The design leans hard on drift, bob, ping and pop. Honour the OS setting:
   keep everything visible, stop everything moving. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .fb-rev { opacity: 1 !important; transform: none !important; }
  .fb-pop { opacity: 1 !important; transform: none !important; }
}

/* ---------- Print ---------- */
@media print {
  #fb-head, #fb-menu, #fb-modal, .fb-topbar, .fb-share { display: none !important; }
  .fb-rev { opacity: 1 !important; transform: none !important; }
  body { background: #fff; }
}
