/* The pill nav and the flower footer, shared by every page. Ported from the
 * Figma Make build (alias-needle-65654172.figma.site); values are its own. */

:where(.fm-nav, .fm-footer) :where(p, h2, nav, div, span) { margin: 0; padding: 0; }
:where(.fm-nav, .fm-footer) { line-height: 1.5; font-family: 'Inter', system-ui, sans-serif; }

/* ---------- nav ---------- */
.fm-nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.82); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(167,139,250,0.2); border-radius: 100px; padding: 7px 8px 7px 12px;
  box-shadow: 0 4px 24px rgba(167,139,250,0.15); transition: background 0.3s; white-space: nowrap;
}
.fm-nav.scrolled { background: rgba(255,255,255,0.95); }
.fm-logo { display: flex; align-items: center; text-decoration: none; margin-right: 20px; }
.fm-logo img { width: 44px; height: 44px; object-fit: contain; display: block; }
.fm-links { display: flex; align-items: center; }
.fm-links a { font-size: 13px; color: #4b3f72; text-decoration: none; padding: 0 10px; transition: color 0.15s; }
.fm-links a:hover, .fm-links a[aria-current="page"] { color: #a78bfa; }
.fm-nav-cta {
  margin-left: 8px; display: flex; align-items: center; gap: 6px; background: #a78bfa; color: #fff !important;
  font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 100px; text-decoration: none; transition: background 0.15s;
}
.fm-nav-cta:hover { background: #9061f9; }
.fm-burger { display: none; margin-left: 6px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(167,139,250,0.3); background: #fff; color: #4b3f72; cursor: pointer; align-items: center; justify-content: center; padding: 0; }

/* the wallet pill, on pages that have one */
.fm-nav .wallet-menu { margin-left: 6px; }
.fm-nav .wallet-pill {
  font: 500 12.5px/1 'JetBrains Mono', monospace; color: #4b3f72; background: #fff; cursor: pointer;
  border: 1px solid rgba(167,139,250,0.35); border-radius: 100px; padding: 9px 14px; transition: background 0.15s;
}
.fm-nav .wallet-pill:hover { background: #f5f0ff; }
.fm-nav .wallet-pill.connect { font-family: 'Inter', system-ui, sans-serif; font-weight: 600; font-size: 13px; color: #4b3f72; }
.fm-nav .wallet-drop { top: calc(100% + 14px); border-radius: 16px; border-color: #ede9fe; box-shadow: 0 12px 40px rgba(167,139,250,0.22); white-space: normal; }

/* ---------- buttons (the footer's, and the home page's) ---------- */
.fm-btn {
  display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding: 11px 22px; border-radius: 100px;
  text-decoration: none; transition: background 0.15s, transform 0.12s;
}
.fm-btn.primary { background: #a78bfa; color: #fff; border: 1px solid rgba(167,139,250,0.3); box-shadow: 0 4px 20px rgba(167,139,250,0.35); }
.fm-btn.primary:hover { background: #9061f9; transform: translateY(-1px); }
.fm-btn.primary img { width: 18px; height: 18px; object-fit: contain; }
.fm-btn.ghost { background: #fff; color: #4b3f72; border: 1px solid rgba(167,139,250,0.35); }
.fm-btn.ghost:hover { background: #f5f0ff; transform: translateY(-1px); }
.fm-btn.big { padding: 12px 22px; border: 0; box-shadow: 0 4px 20px rgba(167,139,250,0.4); transition: background 0.15s; }
.fm-btn.big:hover { transform: none; }

/* ---------- footer ---------- */
/* Never shorter than the flower image (1672x941) at full width, or wide screens crop its top. */
.fm-footer {
  position: relative; background: #fff; overflow: hidden; height: max(980px, calc(100vw * 941 / 1672));
  display: flex; flex-direction: column; max-width: none; margin: 0; border: 0;
}
.fm-foot-bg { position: absolute; bottom: 0; left: 0; width: 100% !important; max-width: none !important; display: block; pointer-events: none; }
.fm-foot-cta { flex: 1; position: relative; z-index: 2; text-align: center; padding: 100px 24px 364px; } /* 390 in Figma; our tagline is one line longer */
.fm-foot-cta h2 { font-family: 'Poppins', sans-serif; font-size: clamp(2.5rem, 4.5vw, 4.2rem); font-weight: 400; line-height: 1.05; letter-spacing: -1.5px; color: #a78bfa; margin-bottom: 20px; }
.fm-foot-cta h2 span { font-style: italic; }
.fm-foot-cta p { font-size: 15px; color: rgba(74,63,114,0.55); line-height: 1.7; max-width: 380px; margin: 0 auto 36px; }
.fm-foot-actions { display: flex; gap: 10px; justify-content: center; }
/* Three columns with equal outer tracks, so the links sit on the true centre however wide the logo and copyright are. */
.fm-foot-row { position: relative; z-index: 2; padding: 24px 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px; border-top: 1px solid rgba(167,139,250,0.15); }
.fm-foot-row > :first-child { justify-self: start; }
.fm-foot-row > .fm-copy { justify-self: end; text-align: right; }
.fm-foot-row > div { display: flex; align-items: center; gap: 10px; }
.fm-foot-logo { width: 71px; height: 64px; object-fit: contain; display: block; }
.fm-foot-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.fm-footer .fm-foot-links a { font-size: 12px; color: #fff; text-decoration: none; transition: opacity 0.15s; text-shadow: 0 1px 8px rgba(10,4,24,0.7); }
.fm-footer .fm-foot-links a:hover { opacity: 0.75; }
.fm-copy { font-size: 11px; color: #fff; text-shadow: 0 1px 8px rgba(10,4,24,0.7); font-family: 'JetBrains Mono', monospace; }
.fm-legal { position: relative; z-index: 2; padding: 0 48px 32px; text-align: center; }
.fm-legal p { font-size: 10px; color: rgba(255,255,255,0.7); text-shadow: 0 1px 6px rgba(10,4,24,0.8); line-height: 1.7; max-width: 860px; margin: 0 auto; font-family: 'JetBrains Mono', monospace; }

/* ---------- smaller screens ---------- */
@media (max-width: 1040px) {
  .fm-nav.with-wallet .fm-links { display: none; }
  .fm-nav.with-wallet .fm-burger { display: flex; }
}
@media (max-width: 860px) {
  .fm-links { display: none; }
  .fm-burger { display: flex; }
}
@media (max-width: 1040px) {
  .fm-nav.open { border-radius: 22px; flex-wrap: wrap; justify-content: space-between; width: calc(100vw - 28px); }
  .fm-nav.open .fm-links { display: flex; flex-direction: column; align-items: stretch; width: 100%; order: 3; padding: 8px 0 4px; }
  .fm-nav.open .fm-links a { padding: 10px 8px; font-size: 14px; }
  .fm-nav.open .fm-logo { margin-right: auto; }
}
.fm-links .only-small { display: none; }
@media (max-width: 480px) {
  .fm-nav .fm-nav-cta { display: none; }
  .fm-nav.open .fm-links .only-small { display: block; }
  .fm-nav .wallet-pill { padding: 8px 11px; font-size: 12px; }
}
@media (max-width: 768px) {
  .fm-footer { height: auto; background: linear-gradient(to bottom, #fff 0, #fff 420px, #120a1f 420px); }
  .fm-foot-bg { top: 300px; bottom: auto; }
  .fm-foot-cta { padding: 80px 20px 200px; }
  .fm-foot-row { padding: 24px 20px; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .fm-foot-row > :first-child, .fm-foot-row > .fm-copy { justify-self: center; text-align: center; }
  .fm-foot-links { justify-content: center; gap: 12px 18px; }
  .fm-legal { padding: 0 20px 32px; }
}

/* ---------- loading spinner, shared ---------- */
@keyframes tithe-spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 8px;
  border: 2.5px solid rgba(167,139,250,0.25); border-top-color: #a78bfa; animation: tithe-spin .8s linear infinite;
}
.spinner.big { width: 36px; height: 36px; border-width: 3.5px; margin: 0; }
.rc-loading { text-align: center; color: rgba(74,63,114,0.7); font-size: 14px; padding: 40px 0; }
.page-loader { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 90px 20px; color: #4b3f72; font-size: 14px; text-align: center; }
.page-loader small { color: rgba(74,63,114,0.6); font-size: 12.5px; max-width: 360px; }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
/* hidden means hidden, even on elements given display: flex or grid above. */
[hidden] { display: none !important; }


/* X logo in the footer links */
.fm-footer .fm-foot-links a.fm-foot-x { display: inline-flex; align-items: center; filter: drop-shadow(0 1px 6px rgba(10,4,24,0.7)); }
.fm-foot-x svg { display: block; }

/* "Official": Tithe's own coin -- the reserved name, launched by an official wallet
   (reserved-name.js isOfficial). Shown beside the name on cards and the coin page. */
.official-badge {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
  padding: 2px 8px 2px 6px; border-radius: 999px;
  font-family: 'Poppins', system-ui, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.5;
  color: #fff; background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  box-shadow: 0 2px 8px rgba(124,58,237,0.35); white-space: nowrap;
}
.official-badge::before {
  content: ''; width: 10px; height: 10px; flex: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M10 1.5l2.3 1.7 2.8-.2.9 2.7 2.3 1.6-.9 2.7.9 2.7-2.3 1.6-.9 2.7-2.8-.2L10 18.5l-2.3-1.7-2.8.2-.9-2.7-2.3-1.6.9-2.7-.9-2.7 2.3-1.6.9-2.7 2.8.2z'/%3E%3Cpath d='M8.6 13.2L5.8 10.4l1.1-1.1 1.7 1.7 4.5-4.5 1.1 1.1z' fill='%237c3aed'/%3E%3C/svg%3E");
}
h1 .official-badge { font-size: 13px; padding: 3px 10px 3px 8px; }
h1 .official-badge::before { width: 12px; height: 12px; }

/* ---------- $TITHE contract address bar (ca-banner.js), every page ---------- */
.ca-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110; height: 38px;
  display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 16px;
  background: linear-gradient(90deg, #6d28d9 0%, #8b5cf6 50%, #6d28d9 100%); color: #fff;
  font-family: 'Inter', system-ui, sans-serif; font-size: 13px; white-space: nowrap;
  box-shadow: 0 2px 12px rgba(109,40,217,0.25);
}
.ca-banner a { color: #fff; text-decoration: none; }
.ca-banner-label { display: inline-flex; align-items: center; gap: 6px; }
.ca-banner-label b { font-weight: 700; letter-spacing: 0.01em; }
.ca-banner-live { opacity: 0.85; }
.ca-banner-addr {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: #fff;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.28); border-radius: 999px; padding: 4px 6px 4px 12px;
  transition: background 0.15s ease;
}
.ca-banner-addr:hover { background: rgba(255,255,255,0.24); }
.ca-banner-copy { font-family: 'Inter', system-ui, sans-serif; font-size: 11px; font-weight: 600; background: #fff; color: #6d28d9; border-radius: 999px; padding: 2px 9px; }
.ca-short { display: none; }
.ca-banner-view { font-weight: 600; opacity: 0.95; }
.ca-banner-view:hover { opacity: 1; text-decoration: underline; }
/* Make room: the page and the floating nav pill both move down by the bar. */
html.has-ca-banner body { padding-top: 38px; }
html.has-ca-banner .fm-nav { top: 52px; }
@media (max-width: 720px) {
  .ca-banner { gap: 8px; font-size: 12px; }
  .ca-banner-live, .ca-full { display: none; }
  .ca-short { display: inline; }
}
@media (max-width: 380px) { .ca-banner-view { display: none; } }
