/* ============================================================
   FORGE SHARED CHROME  ·  single source of truth
   Announcement banner + Top nav (logo, links, Sprints mega menu,
   mobile burger/accordion) + Footer + Contact FAB.
   All classes are namespaced with the fc- prefix so they never
   collide with page CSS or Tailwind utilities.
   Mobile-first. No horizontal overflow at 360 / 390px.
   ============================================================ */

/* Design tokens, defined here as a FALLBACK so the chrome renders
   correctly even on a page that forgot to define them. Pages that
   define :root tokens simply override these identical values. */
:root {
  --ink:   #1a1a1f;
  --card:  #242428;
  --elev:  #2c2c32;
  --line:  #3a3a42;
  --paper: #f8f7f4;
  --mute:  #c8c5be;
  --red:   #FF0000;
}

/* The shared chrome owns the top inset. JS sets --fc-banner-h after
   the banner renders so the nav always sits exactly below the banner
   and the page body clears the fixed banner + nav. */
:root { --fc-banner-h: 38px; --fc-nav-h: 57px; }

#fc-chrome *, #fc-chrome *::before, #fc-chrome *::after { box-sizing: border-box; }

/* ============================================================
   ANNOUNCEMENT BANNER
   ============================================================ */
#fc-banner {
  background: var(--red);
  color: var(--paper);
  text-align: center;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  z-index: 100;
  position: fixed;
  top: 0; left: 0; right: 0;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.15);
  line-height: 1.4;
}
#fc-banner .fc-banner-dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--paper); border-radius: 50%;
  animation: fc-pulse 1.5s infinite; flex-shrink: 0;
}
#fc-banner-countdown {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; letter-spacing: 0.04em;
  padding: 1px 7px; border: 1px solid rgba(255,255,255,0.4);
  border-radius: 5px; white-space: nowrap;
}
#fc-banner-cta {
  color: var(--paper); text-decoration: underline;
  font-weight: 700; text-transform: uppercase; white-space: nowrap;
}
@keyframes fc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.88); }
}

/* ============================================================
   TOP NAV
   ============================================================ */
#fc-nav {
  position: fixed; left: 0; right: 0; top: var(--fc-banner-h);
  z-index: 50;
  background: rgba(26, 26, 31, 0.85);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  font-family: 'Inter', sans-serif;
}
.fc-nav-inner {
  max-width: 80rem; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.fc-logo { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.fc-logo img { height: 30px; width: auto; display: block; }

.fc-nav-links { display: none; align-items: center; gap: 26px; font-size: 14px; color: var(--mute); }
.fc-nav-links > a { color: var(--mute); text-decoration: none; transition: color 0.15s ease; white-space: nowrap; }
.fc-nav-links > a:hover { color: var(--paper); }
.fc-nav-links > a.fc-active { color: var(--paper); }

.fc-nav-cta { display: none; }
.fc-nav-cta.fc-btn-red {
  display: none; align-items: center; gap: 8px;
  background: var(--red); color: var(--paper);
  font-weight: 600; font-size: 14px;
  border: 1px solid var(--red); border-radius: 8px;
  padding: 9px 18px; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fc-nav-cta.fc-btn-red:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(255,0,0,0.22); }

/* Burger */
.fc-burger {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--paper);
  cursor: pointer; padding: 2px; flex-shrink: 0;
}

/* ===== Desktop dropdown / mega menu ===== */
.fc-dd { position: relative; }
.fc-dd > .fc-dd-trigger {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  background: none; border: none; font: inherit; color: var(--mute); padding: 0;
  transition: color 0.15s ease;
}
.fc-dd > .fc-dd-trigger:hover { color: var(--paper); }
.fc-dd > .fc-dd-trigger .fc-caret {
  width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); margin-top: -3px; transition: transform 0.2s ease; opacity: 0.8;
}
.fc-dd.fc-dd-open > .fc-dd-trigger .fc-caret,
.fc-dd:focus-within > .fc-dd-trigger .fc-caret { transform: rotate(225deg); margin-top: 2px; }

.fc-mega { position: static; }
.fc-mega-panel {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(6px);
  width: min(920px, calc(100vw - 32px));
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; box-shadow: 0 22px 50px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease; z-index: 60;
}
.fc-mega.fc-dd-open > .fc-mega-panel,
.fc-mega:focus-within > .fc-mega-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
/* Invisible full-width hover bridge so moving the cursor from the trigger
   into the panel never crosses an empty gap that would close it. */
.fc-mega-panel::before { content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 18px; }
.fc-mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fc-mega-col { background: var(--ink); border: 1px solid var(--line); border-radius: 11px; padding: 14px; display: flex; flex-direction: column; }
.fc-mega-col.fc-locked { opacity: 0.6; }
.fc-mega-col-head { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 13.5px; color: var(--paper); line-height: 1.25; margin-bottom: 3px; }
.fc-mega-col-head .fc-mega-stack { display: block; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.08em; color: var(--red); text-transform: uppercase; margin-top: 4px; }
.fc-mega-ed { display: block; text-decoration: none; border-radius: 8px; padding: 8px 9px; margin-top: 8px; border: 1px solid var(--line); transition: border-color 0.15s ease, background 0.15s ease; }
.fc-mega-ed:hover { border-color: var(--red); background: rgba(255,0,0,0.06); }
.fc-mega-ed .fc-mega-ed-t { display: block; font-size: 12.5px; font-weight: 600; color: var(--paper); }
.fc-mega-ed .fc-mega-ed-m { display: block; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--mute); margin-top: 2px; letter-spacing: 0.04em; }
.fc-mega-ed .fc-mega-ed-m .fc-st-open { color: var(--red); }
.fc-mega-links { margin-top: auto; padding-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }
.fc-mega-links a { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); text-decoration: none; padding-top: 8px; border-top: 1px solid transparent; transition: color 0.15s ease; }
.fc-mega-links a:hover { color: var(--red); }
.fc-mega-lock { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--mute); margin-top: 10px; }

/* ===== Mobile menu ===== */
#fc-mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(26, 26, 31, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
#fc-mobile-menu.fc-open { display: block; }
.fc-mobile-inner { padding: 16px 24px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--mute); }
.fc-mobile-inner > a { color: var(--mute); text-decoration: none; padding: 4px 0; }
.fc-mobile-inner > a:hover { color: var(--paper); }
.fc-m-group-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); margin: 14px 0 4px; }
.fc-mobile-inner a.fc-m-sub { padding-left: 14px; font-size: 13.5px; }

.fc-acc { border: 1px solid var(--line); border-radius: 10px; margin: 4px 0; overflow: hidden; }
.fc-acc > summary { list-style: none; cursor: pointer; padding: 11px 14px; font-size: 14px; color: var(--paper); display: flex; align-items: center; justify-content: space-between; }
.fc-acc > summary::-webkit-details-marker { display: none; }
.fc-acc > summary::after { content: '+'; color: var(--red); font-weight: 700; font-size: 18px; line-height: 1; }
.fc-acc[open] > summary::after { content: '\2212'; }
.fc-acc-body { padding: 4px 14px 12px; }
.fc-acc-col { padding: 8px 0; border-top: 1px dashed var(--line); }
.fc-acc-col:first-child { border-top: none; }
.fc-acc-col .fc-acc-h { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.fc-acc-col a { display: block; font-size: 13px; color: var(--mute); padding: 4px 0; text-decoration: none; }
.fc-acc-col a:hover { color: var(--paper); }
.fc-acc-col a.fc-locked { pointer-events: none; opacity: 0.6; }

/* Reveal desktop layout, hide mobile-only controls at >=768px */
@media (min-width: 768px) {
  .fc-nav-links { display: flex; }
  .fc-nav-cta.fc-btn-red { display: inline-flex; }
  .fc-burger { display: none; }
  #fc-mobile-menu { display: none !important; }
}
@media (max-width: 1100px) {
  .fc-mega-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   FOOTER
   ============================================================ */
#fc-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  margin-top: 54px;
  font-family: 'Inter', sans-serif;
  background: var(--ink);
  color: var(--paper);
}
.fc-footer-inner { max-width: 80rem; margin: 0 auto; padding: 0 24px; }
.fc-footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 40px;
}
@media (min-width: 768px) { .fc-footer-grid { grid-template-columns: repeat(4, 1fr); } }
.fc-footer-brand-logo { height: 36px; width: auto; display: block; margin-bottom: 14px; }
.fc-footer-brand-line { font-size: 13px; color: var(--mute); line-height: 1.6; }
.fc-footer-addr { font-style: normal; font-size: 13px; color: var(--mute); line-height: 1.6; margin-top: 14px; }
.fc-footer-col-h { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 14px; }
.fc-footer-list { font-size: 14px; display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; margin: 0; }
.fc-footer-list a { color: var(--paper); text-decoration: none; transition: color 0.15s ease; }
.fc-footer-list a:hover { color: var(--red); }

.fc-social-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.fc-social-row a {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--mute);
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.fc-social-row a:hover { color: var(--red); border-color: var(--red); transform: translateY(-1px); }
.fc-social-row a svg { width: 18px; height: 18px; }

.fc-footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--mute);
  display: flex; flex-direction: column; gap: 8px;
}
@media (min-width: 768px) { .fc-footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.fc-footer-bottom .fc-mono { font-family: 'JetBrains Mono', monospace; }

/* ============================================================
   CONTACT FAB
   ============================================================ */
#fc-fab-root { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40; font-family: 'Inter', sans-serif; }
.fc-fab-card {
  position: absolute; right: 0; bottom: 72px;
  width: auto; min-width: 240px; max-width: min(320px, calc(100vw - 28px));
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,0,0,.06);
  transform-origin: bottom right; opacity: 0; visibility: hidden; overflow: visible;
  transform: perspective(800px) rotateX(-14deg) scale(.86) translateY(8px);
  transition: opacity .22s ease, transform .28s cubic-bezier(.34,1.56,.64,1), visibility .22s;
}
#fc-fab-root.fc-open .fc-fab-card { opacity: 1; visibility: visible; transform: perspective(800px) rotateX(0) scale(1) translateY(0); }
.fc-fab-card-h { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin: 2px 4px 10px; display: flex; align-items: center; gap: 7px; }
.fc-fab-card-h .fc-fab-hdot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px rgba(255,0,0,.6); }
.fc-fab-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--ink); text-decoration: none; margin-top: 9px; transition: border-color .15s ease, transform .12s ease; }
.fc-fab-row:first-of-type { margin-top: 0; }
.fc-fab-row:hover { border-color: var(--red); transform: translateY(-1px); }
.fc-fab-ic { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,0,0,.1); color: var(--red); }
.fc-fab-tx { min-width: 0; flex: 1; }
.fc-fab-tx .fc-fab-t { font-size: 13px; font-weight: 600; color: var(--paper); line-height: 1.2; white-space: nowrap; }
.fc-fab-btn {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: radial-gradient(circle at 36% 32%, #ff4d4d 0%, #ff0000 56%, #c50000 100%);
  box-shadow: 0 10px 22px rgba(255,0,0,.32), 0 4px 10px rgba(0,0,0,.4), inset 0 -4px 10px rgba(0,0,0,.28), inset 0 4px 10px rgba(255,255,255,.22);
  transform-style: preserve-3d; transition: transform .14s cubic-bezier(.25,1,.5,1), box-shadow .18s ease;
  animation: fc-fab-float 3.6s ease-in-out infinite; position: relative; margin-left: auto;
}
.fc-fab-btn:hover { box-shadow: 0 16px 34px rgba(255,0,0,.42), 0 6px 14px rgba(0,0,0,.45), inset 0 -4px 10px rgba(0,0,0,.28), inset 0 4px 10px rgba(255,255,255,.22); }
.fc-fab-btn:active { transform: scale(.9) translateY(2px); box-shadow: 0 5px 12px rgba(255,0,0,.4), inset 0 -3px 8px rgba(0,0,0,.4); }
.fc-fab-btn svg { transition: transform .25s ease; pointer-events: none; }
#fc-fab-root.fc-open .fc-fab-btn { animation: none; }
#fc-fab-root.fc-open .fc-fab-btn .fc-fab-i-chat { display: none; }
#fc-fab-root.fc-open .fc-fab-btn .fc-fab-i-close { display: block; }
.fc-fab-btn .fc-fab-i-close { display: none; }
@keyframes fc-fab-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (max-width: 768px) { #fc-fab-root { right: max(14px, env(safe-area-inset-right)); bottom: max(86px, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) {
  .fc-fab-btn { animation: none !important; transition: box-shadow .18s ease; }
  .fc-fab-btn:active { transform: none; }
  .fc-fab-card { transition: opacity .15s ease, visibility .15s; }
  #fc-fab-root.fc-open .fc-fab-card { transform: none; }
  #fc-banner .fc-banner-dot { animation: none; }
}
