/*
 * FM Digital Solutions — Global Styles
 * Reset, base, nav, footer, shared utilities.
 * Imported after tokens.css on every page.
 */


/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  background:            var(--bg);
  color:                 var(--fg);
  font-family:           var(--font-body);
  font-size:             15px;
  line-height:           1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x:            hidden;
}
img   { max-width: 100%; display: block; }
a     { color: inherit; }

/* ── Progress bar ── */
#fmds-progress {
  position:   fixed;
  top:        0;
  left:       0;
  height:     2px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  z-index:    200;
  width:      0%;
  transition: width .08s linear;
}

/* ── Layout wrapper ── */
.wrap {
  max-width:     1160px;
  margin:        0 auto;
  padding-left:  max(24px, env(safe-area-inset-left,  0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (min-width: 1024px) {
  .wrap {
    padding-left:  max(56px, env(safe-area-inset-left,  0px));
    padding-right: max(56px, env(safe-area-inset-right, 0px));
  }
}

/* ── Keyframes ── */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse   { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.75); } }
@keyframes blink   { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes float   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin    { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── Site nav ── */
.fmds-nav {
  position:      fixed;
  top:           0;
  left:          0;
  right:         0;
  z-index:       100;
  height:        var(--nav-h);
  background:    rgba(12, 14, 18, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display:       flex;
  align-items:   center;
}
.nav-inner {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  width:           100%;
}
.nav-id {
  display:         flex;
  align-items:     center;
  gap:             10px;
  text-decoration: none;
}
.nav-avatar {
  width:           32px;
  height:          32px;
  border-radius:   50%;
  background:      var(--purple-dim);
  display:         flex;
  align-items:     center;
  justify-content: center;
  border:          1.5px solid var(--border-mid);
  flex-shrink:     0;
}
.nav-avatar span {
  font-family:  var(--font-head);
  font-weight:  800;
  font-size:    11px;
  color:        #fff;
}
.nav-name {
  font-family:     var(--font-head);
  font-size:       14px;
  font-weight:     700;
  color:           #fff;
  letter-spacing: -.01em;
}
.nav-sub {
  font-family:    var(--font-mono);
  font-size:      9.5px;
  color:          var(--fg-subtle);
  letter-spacing: .04em;
  line-height:    1;
}
.nav-links {
  display:    none;
  gap:        .25rem;
  list-style: none;
}
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a {
  color:           var(--fg-muted);
  text-decoration: none;
  font-size:       12.5px;
  font-weight:     500;
  padding:         .3rem .65rem;
  border-radius:   var(--radius-sm);
  transition:      color .15s, background .15s;
}
.nav-links a:hover  { color: #fff; background: rgba(255,255,255,.05); }
.nav-links a.active { color: #fff; position: relative; }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--lime); border-radius: 1px;
}
.nav-cta {
  display:         inline-flex;
  align-items:     center;
  gap:             5px;
  background:      var(--purple);
  color:           #fff;
  font-family:     var(--font-head);
  font-size:       12px;
  font-weight:     700;
  letter-spacing:  .03em;
  text-transform:  uppercase;
  text-decoration: none;
  padding:         0 1rem;
  height:          34px;
  border-radius:   var(--radius-sm);
  white-space:     nowrap;
  transition:      background .15s;
}
.nav-cta:hover { background: var(--purple-light); }

/* ── Shared buttons ── */
.btn-primary {
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  background:      var(--purple);
  color:           #fff;
  font-family:     var(--font-head);
  font-size:       14px;
  font-weight:     700;
  letter-spacing:  .02em;
  text-decoration: none;
  padding:         .75rem 1.5rem;
  border-radius:   var(--radius-sm);
  transition:      background .15s, transform .15s;
  border:          none;
  cursor:          pointer;
}
.btn-primary:hover { background: var(--purple-light); transform: translateY(-1px); }

.btn-ghost {
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  background:      transparent;
  color:           var(--fg-muted);
  font-family:     var(--font-head);
  font-size:       14px;
  font-weight:     600;
  text-decoration: none;
  padding:         .75rem 1.25rem;
  border-radius:   var(--radius-sm);
  border:          1px solid var(--border-mid);
  transition:      color .15s, border-color .15s;
  cursor:          pointer;
}
.btn-ghost:hover { color: #fff; border-color: var(--fg-subtle); }

/* ── Shared section label (mono eyebrow) ── */
.sec-label {
  font-family:    var(--font-mono);
  font-size:      10px;
  font-weight:    600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color:          var(--fg-subtle);
  margin-bottom:  .65rem;
}

/* ── Nav logo SVG ────────────────────────── */
.nav-logo-svg { display: block; flex-shrink: 0; }

/* ── Footer logo SVG ─────────────────────── */
.footer-logo-svg { display: block; flex-shrink: 0; margin-top: 2px; }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.fmds-footer { background: var(--surface); border-top: 1px solid var(--border); }

.footer-inner {
  display: grid; grid-template-columns: auto 1fr; gap: 80px; align-items: start;
  padding-top: 48px; padding-bottom: 40px;
}
.footer-brand { display: flex; align-items: flex-start; gap: 10px; flex-shrink: 0; }
.footer-logo-img  { width: 28px; height: 28px; object-fit: contain; margin-top: 2px; }
.footer-logo-mark {
  width: 28px; height: 28px; border-radius: 5px;
  background: var(--purple); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 10px; color: #fff;
  flex-shrink: 0; margin-top: 2px;
}
.footer-name    { font-family: var(--font-head); font-size: .9375rem; font-weight: 700; color: var(--fg); }
.footer-tagline { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-subtle); margin-top: 3px; }

.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.footer-col   { display: flex; flex-direction: column; gap: 10px; }
.footer-col-head {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg-subtle); margin-bottom: 4px;
}
.footer-link {
  font-size: .8125rem; color: var(--fg-muted); text-decoration: none;
  transition: color .15s;
}
.footer-link:hover { color: var(--fg); }
.footer-li { display: flex; align-items: center; gap: 6px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
/* Footer spacing must beat the homepage .wrap padding shorthand (padding: 0 24px) */
.fmds-footer .footer-inner { padding-top: 56px; padding-bottom: 48px; }
.fmds-footer .footer-bottom-inner { padding-top: 0; padding-bottom: 0; }
@media (max-width: 860px) {
  .fmds-footer .footer-inner { padding-top: 40px; padding-bottom: 36px; }
}
.footer-bottom-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.footer-copy     { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-subtle); }
.footer-location { font-size: 10.5px; }


/* ── Shared tag chips ── */
.tag {
  display:        inline-block;
  font-family:    var(--font-mono);
  font-size:      9.5px;
  font-weight:    600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding:        .2rem .55rem;
  border-radius:  20px;
  border:         1px solid;
}
.tag-lime   { color: var(--lime);   border-color: rgba(190,216,45,.3);  background: rgba(190,216,45,.07); }
.tag-cyan   { color: var(--cyan);   border-color: rgba(71,214,255,.3);  background: rgba(71,214,255,.07); }
.tag-orange { color: var(--orange); border-color: rgba(249,115,22,.3);  background: rgba(249,115,22,.07); }
.tag-purple { color: #b48fe6;       border-color: rgba(107,61,150,.4);  background: rgba(107,61,150,.12); }
.tag-amber  { color: var(--amber);  border-color: rgba(245,158,11,.3);  background: rgba(245,158,11,.07); }

/* ── WordPress admin bar compensation ── */
.admin-bar .fmds-nav { top: var(--wp-admin--admin-bar--height, 32px); }

/* ── WP alignment helpers (keep Gutenberg happy) ── */
.alignnone  { margin: 5px 20px 20px 0; }
.aligncenter { display: block; margin: 0 auto 20px; }
.alignright { float: right; margin: 0 0 20px 20px; }
.alignleft  { float: left;  margin: 5px 20px 20px 0; }

/* ═══ Site nav (shared by every page; moved from front-page.css) ═══ */
/* ── Progress bar ───────────────────────────── */
#fmds-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--purple); z-index: 9999; transition: width .2s;
}

/* ── Nav ────────────────────────────────────── */
.fmds-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  background: rgba(12, 14, 18, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 100%; display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo-img { width: 32px; height: 32px; object-fit: contain; }
.nav-logo-mark {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--purple); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 11px; color: #fff; letter-spacing: .04em;
}
.nav-wordmark {
  font-family: var(--font-head); font-weight: 700; font-size: 11.5px;
  line-height: 1.2; color: var(--fg);
}
.nav-studio-badge {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--purple-light); background: rgba(107,61,150,.15);
  border: 1px solid rgba(107,61,150,.3); border-radius: 3px;
  padding: 2px 6px;
}
.nav-links {
  display: flex; list-style: none; margin: 0; padding: 0; gap: 28px;
  align-items: center; flex: 1;
}
.nav-links a {
  font-size: 13px; color: var(--fg-muted); text-decoration: none;
  transition: color .15s;
}
.nav-links a:hover { color: var(--fg); }
.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* ── CTA Button ─────────────────────────────── */
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--purple); color: #fff;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 10px 18px; border-radius: 6px;
  border: none; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn-cta:hover { background: var(--purple-light); transform: translateY(-1px); }
.btn-cta:active { transform: translateY(0); }

/* ── Hamburger / Mobile menu ────────────────── */
.hamburger {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--fg-muted); border-radius: 1px; }

.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 850;
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 24px 24px;
  gap: 4px;
}
.mobile-menu a {
  font-size: 15px; color: var(--fg-muted); text-decoration: none;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu-cta {
  margin-top: 8px; background: var(--purple); color: #fff !important;
  border-radius: 6px; padding: 12px 16px !important;
  font-family: var(--font-mono); font-size: 12px !important;
  border: none !important; text-align: center;
}


/* [hidden] must win over display:flex, and the drawer never shows on desktop */
.mobile-menu[hidden] { display: none; }
@media (min-width: 861px) { .mobile-menu { display: none !important; } }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* Small phones: the drawer already has "Start a Project", so the header button would only wrap */
@media (max-width: 520px) {
  .nav-right .btn-cta { display: none; }
  .nav-studio-badge { display: none; }
}

/* Footer responsive */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ═══ FOOTER v2: one strip, CTA left, terminal links right ═══ */
.fmds-footer { background: #0b0b10; border-top: 1px solid var(--border); }
.fmds-footer .ft2 { padding-top: 56px; padding-bottom: 20px; }
.ft2-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: stretch; }
.ft2-status { display: flex; align-items: center; gap: 8px; color: #4ade80; font-size: 12px; margin: 0; flex-wrap: wrap; }
.ft2-sep { color: #9a9ab4; }
.ft2-status #ft2-clock { color: #9a9ab2; }
.ft2-pulse { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: ft2p 1.6s infinite; }
@keyframes ft2p { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); } 100% { box-shadow: 0 0 0 9px rgba(74,222,128,0); } }
.ft2-big { font-family: var(--font-head); font-size: clamp(2.2rem, 4.2vw, 3.4rem); line-height: 1.04; font-weight: 800; letter-spacing: -.03em; color: #fff; margin: 14px 0 16px; }
.ft2-big em { font-style: normal; color: var(--purple-light, #a78bfa); }
.ft2-ask { color: #8a8aa3; font-size: 12px; margin: 0; }
.ft2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.ft2-chip { font-family: var(--font-mono); font-size: 11.5px; padding: 8px 13px; border: 1px solid #34344a; border-radius: 999px; background: transparent; color: #cfcfe0; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.ft2-chip:hover { border-color: var(--purple-light, #a78bfa); color: #fff; }
.ft2-chip.on { background: var(--purple, #6d4cc9); border-color: var(--purple, #6d4cc9); color: #fff; }
.ft2-chip:focus-visible, .ft2-top:focus-visible { outline: 2px solid var(--purple-light, #a78bfa); outline-offset: 2px; }
.ft2-term { border: 1px solid #26263a; border-radius: 12px; background: #101018; display: flex; flex-direction: column; }
.ft2-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #26263a; font-size: 11px; color: #9a9ab4; }
.ft2-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.ft2-bar i:nth-child(2) { background: #febc2e; }
.ft2-bar i:nth-child(3) { background: #28c840; }
.ft2-bar span { margin-left: auto; }
.ft2-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 18px 16px 16px; flex: 1; }
.ft2-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ft2-h { color: #9a9ab4; font-size: 11px; margin-bottom: 6px; }
.ft2-col a { font-family: var(--font-mono); font-size: 12.5px; color: #b9b9cc; text-decoration: none; padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.ft2-col a:hover, .ft2-col a:focus-visible { color: #4ade80; }
.ft2-col a:hover::before, .ft2-col a:focus-visible::before { content: "> "; color: #4ade80; }
.ft2-legal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid #26263a; font-family: var(--font-mono); font-size: 11px; color: #7d7d96; }
.ft2-brand { display: inline-flex; align-items: center; gap: 10px; }
.ft2-legal-links { display: inline-flex; flex-wrap: wrap; gap: 16px; }
.ft2-legal-links a { color: #9a9ab2; text-decoration: none; }
.ft2-legal-links a:hover { color: #fff; }
@media (max-width: 860px) {
  .ft2-strip { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .fmds-footer .ft2 { padding-top: 40px; }
}
@media (max-width: 520px) { .ft2-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* footer v2 refinements: narrower container, wider terminal, bigger type, left column matches terminal height */
.fmds-footer .ft2 { max-width: 1040px; }
.ft2-strip { grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr); gap: 32px; }
.ft2-cta { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.ft2-status { font-size: 13px; }
.ft2-big { font-size: clamp(2.8rem, 5.4vw, 4.4rem); margin: 0; }
.ft2-pitch { font-size: 1.0625rem; line-height: 1.6; color: #a9a9c0; max-width: 34ch; margin: 0; }
.ft2-h { font-size: 12px; }
.ft2-col a { font-size: 14.5px; padding: 4px 0; }
.ft2-bar { font-size: 12px; }
.ft2-pulse { animation-duration: 2.4s; }
@media (max-width: 860px) { .ft2-strip { grid-template-columns: minmax(0, 1fr); } .ft2-cta { gap: 14px; } }

/* footer v2 compact pass */
.fmds-footer .ft2 { max-width: 960px; padding-top: 34px; padding-bottom: 12px; }
.ft2-strip { gap: 24px; }
.ft2-cta { gap: 12px; }
.ft2-status { font-size: 12px; }
.ft2-big { font-size: clamp(2.1rem, 3.8vw, 3rem); }
.ft2-pitch { font-size: .9rem; line-height: 1.5; max-width: 36ch; }
.ft2-bar { padding: 8px 12px; }
.ft2-cols { padding: 12px 14px 10px; gap: 12px; }
.ft2-h { margin-bottom: 4px; }
.ft2-col { gap: 0; }
.ft2-col a { font-size: 13px; padding: 2px 0; }
.ft2-legal { margin-top: 18px; padding-top: 12px; }
@media (max-width: 860px) { .fmds-footer .ft2 { padding-top: 28px; } }

/* footer v2: stretch wider, keep height */
.fmds-footer .ft2 { max-width: 1280px; padding-left: 40px; padding-right: 40px; }
.ft2-strip { grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: 48px; }
.ft2-pitch { max-width: 46ch; }
@media (max-width: 860px) { .fmds-footer .ft2 { padding-left: 20px; padding-right: 20px; } .ft2-strip { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* Mobile top bar: hidden on desktop (shown by mobile.css) */
.fm-mbar{display:none}

/* a11y contrast (all viewports) */
.chip-purple{color:#D2B4EE}
a.f-mono,.f-mono[style]{color:#C9A3EA !important}
