/*
 * The NeuroFly app shell (views/partials/layouts/neurofly-layout.ejs): base
 * type, the header, the footer and the closing call to action. The Labs type
 * scale and variables are stackfire-labs.css; the page itself is
 * neurofly-lab.css. On the platform these came from the site theme
 * (styles.css, styles-page.css); this file carries only what the page needs.
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.nf-app {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Geist', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.nf-app img, .nf-app svg { max-width: 100%; }
.nf-app a { color: inherit; }
.nf-app :focus-visible { outline: 2px solid var(--sfl-accent); outline-offset: 2px; }

.nf-app-skip { position: absolute; left: -9999px; top: 0; z-index: 100; padding: .6rem 1rem; background: var(--sfl-accent); color: #000; }
.nf-app-skip:focus { left: 1rem; top: 1rem; }

.nf-app-header { position: sticky; top: 0; z-index: 50; background: rgba(0, 0, 0, .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--sfl-line); }
.nf-app-header-inner { max-width: 1280px; margin: 0 auto; padding: .75rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nf-app-brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.nf-app-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--sfl-accent-deep); color: var(--sfl-accent); font-weight: 800; font-size: .95rem; letter-spacing: -.03em; }
.nf-app-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nf-app-brand-text strong { color: var(--sfl-text); font-size: 1rem; }
.nf-app-brand-text span { color: var(--sfl-muted); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.nf-app-nav { display: flex; gap: 1.1rem; }
.nf-app-nav a { color: var(--sfl-muted); text-decoration: none; font-size: .92rem; }
.nf-app-nav a:hover { color: var(--sfl-text); }

.nf-app-main { flex: 1 0 auto; }

.nf-app-footer { border-top: 1px solid var(--sfl-line); background: #000; color: var(--sfl-muted); }
.nf-app-footer-inner { max-width: 1280px; margin: 0 auto; padding: 2rem 1.25rem 2.5rem; display: grid; gap: .9rem; }
.nf-app-footer-note { margin: 0; max-width: 60ch; font-size: .9rem; }
.nf-app-footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.nf-app-footer-links a { color: var(--sfl-text); text-decoration: none; font-size: .9rem; }
.nf-app-footer-links a:hover { color: var(--sfl-accent); }
.nf-app-footer-copy { margin: 0; font-size: .8rem; color: var(--sfl-muted2); }

.nf-app-missing { min-height: 50vh; }

/* Closing call to action: the platform's .sf-cta-* rules (styles-page.css);
   stackfire-labs.css applies the dark Labs variant under .sf-labs-body. */
.sf-cta-final { max-width: 1180px; margin: 5rem auto 4.5rem; padding: 0 1.25rem; }
.sf-cta-inner {
  position: relative; overflow: hidden;
  border: 1px solid #e7ecf2; border-radius: 22px; background: #fff;
  padding: clamp(2.6rem, 6vw, 4.6rem) clamp(1.6rem, 4vw, 3.6rem);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.sf-cta-inner::before,
.sf-cta-inner::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 1px; pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, #e7ecf2 0 7px, transparent 7px 14px);
}
.sf-cta-inner::before { left: 33.33%; }
.sf-cta-inner::after { left: 66.66%; }
.sf-cta-title {
  position: relative; z-index: 1; margin: 0; flex: 1 1 auto; min-width: 0;
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.02; font-weight: 500;
  letter-spacing: -.035em; color: #0f1115;
}
.sf-cta-actions { position: relative; z-index: 1; flex: 0 0 auto; margin-left: auto; display: flex; gap: .75rem; flex-wrap: wrap; }
.sf-cta-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  font-size: 1rem; font-weight: 400; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.sf-cta-btn--primary { background: #0f1115; color: #fff; }
.sf-cta-btn--primary:hover { background: #000; transform: translateY(-2px); }
.sf-cta-btn--ghost { background: #fff; color: #0f1115; border-color: #d7deea; }
.sf-cta-btn--ghost:hover { border-color: #0f1115; transform: translateY(-2px); }

@media (max-width: 720px) {
  .sf-cta-inner { flex-direction: column; align-items: flex-start; gap: 1.6rem; }
  .sf-cta-inner::before, .sf-cta-inner::after { display: none; }
  .sf-cta-actions { width: 100%; }
  .sf-cta-btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .sf-cta-btn { transition: none; }
  .sf-cta-btn:hover { transform: none; }
}
