/* Index of stackfire.app (views/index.ejs). Self-contained: no theme
   stylesheet is loaded on this page. A near-black studio page with an ember
   to violet accent; the application captures carry the color. Every class is
   prefixed `sfa-`. */

@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/geist/Geist-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --sfa-bg: #07080d;
  --sfa-bg-2: #0d0f17;
  --sfa-card: #11131c;
  --sfa-line: rgba(255, 255, 255, .1);
  --sfa-line-hi: rgba(255, 255, 255, .22);
  --sfa-ink: #f4f5f8;
  --sfa-dim: #a4a9b8;
  --sfa-ember: #ff6a3d;
  --sfa-pink: #ff4d8d;
  --sfa-violet: #8b5cf6;
  --sfa-grad: linear-gradient(95deg, var(--sfa-ember) 0%, var(--sfa-pink) 48%, var(--sfa-violet) 100%);
  --sfa-radius: 16px;
  --sfa-wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body.sfa {
  margin: 0;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--sfa-ink);
  background: var(--sfa-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:where(.sfa) img { max-width: 100%; height: auto; display: block; }
:where(.sfa) a { color: inherit; }
:where(.sfa) :where(h1, h2, h3, p, ul, ol, figure) { margin: 0; }
:where(.sfa) :where(ul, ol) { padding: 0; list-style: none; }
:where(.sfa) svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sfa :focus-visible { outline: 3px solid var(--sfa-pink); outline-offset: 3px; border-radius: 6px; }
.sfa-wrap { width: 100%; max-width: var(--sfa-wrap); margin: 0 auto; padding: 0 24px; }
.sfa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sfa-skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: #fff; color: #0b0c12; padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.sfa-skip:focus { top: 12px; }
.sfa-grad { background: var(--sfa-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.sfa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.sfa-btn svg { font-size: 18px; transition: transform .18s ease; }
.sfa-btn:hover svg { transform: translateX(3px); }
.sfa-btn--sm { min-height: 40px; padding: 0 18px; }
.sfa-btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.sfa-btn--primary { background: #fff; color: #0b0c12; }
.sfa-btn--primary:hover { box-shadow: 0 0 0 4px rgba(255, 255, 255, .16); }
.sfa-btn--ghost { border-color: var(--sfa-line-hi); color: var(--sfa-ink); background: rgba(255, 255, 255, .03); }
.sfa-btn--ghost:hover { background: rgba(255, 255, 255, .09); }

/* ── Header ──────────────────────────────────────────────────────────────── */
.sfa-header { position: sticky; top: 0; z-index: 50; transition: background-color .2s ease, box-shadow .2s ease; }
.sfa-header.is-stuck { background: rgba(7, 8, 13, .82); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--sfa-line); }
.sfa-header__in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.sfa-brand { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; flex: none; }
.sfa-brand img { width: 132px; height: auto; }
.sfa-brand__tld { margin-top: 3px; font-weight: 600; font-size: 19px; line-height: 1; letter-spacing: -.01em; background: var(--sfa-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sfa-nav { display: flex; align-items: center; flex: 1; gap: 24px; }
.sfa-nav__links { display: flex; gap: 4px; margin: 0 auto; }
.sfa-nav__links a { padding: 10px 18px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--sfa-dim); border-radius: 999px; transition: color .15s ease, background-color .15s ease; }
.sfa-nav__links a:hover { color: var(--sfa-ink); background: rgba(255, 255, 255, .07); }
.sfa-burger { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--sfa-line-hi); background: transparent; color: #fff; cursor: pointer; align-items: center; justify-content: center; }
.sfa-burger svg { font-size: 22px; }
.sfa-burger__close { display: none; }
.sfa-burger[aria-expanded='true'] .sfa-burger__open { display: none; }
.sfa-burger[aria-expanded='true'] .sfa-burger__close { display: inline; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.sfa-hero { position: relative; padding: 72px 0 0; text-align: center; isolation: isolate; }
.sfa-hero::before {
  content: ''; position: absolute; inset: -72px 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 380px at 22% 8%, rgba(255, 106, 61, .2), transparent 70%),
    radial-gradient(680px 420px at 78% 0%, rgba(139, 92, 246, .24), transparent 70%),
    radial-gradient(520px 320px at 50% 46%, rgba(255, 77, 141, .1), transparent 70%);
}
.sfa-hero__in { display: flex; flex-direction: column; align-items: center; }
.sfa-eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; border: 1px solid var(--sfa-line-hi); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--sfa-ink); background: rgba(255, 255, 255, .04); }
.sfa-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .18); animation: sfa-pulse 2.4s ease-in-out infinite; }
@keyframes sfa-pulse { 50% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } }
.sfa-hero h1 { margin-top: 26px; font-size: clamp(40px, 7.2vw, 88px); line-height: 1.02; letter-spacing: -.04em; font-weight: 650; text-wrap: balance; }
.sfa-hero__lead { max-width: 680px; margin-top: 24px; font-size: clamp(17px, 1.6vw, 20px); color: var(--sfa-dim); text-wrap: pretty; }
.sfa-hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.sfa-hero__facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 38px; font-size: 14.5px; color: var(--sfa-dim); }
.sfa-hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.sfa-hero__facts svg { font-size: 17px; color: var(--sfa-pink); }

/* The strip of application captures under the hero. */
.sfa-marquee { margin-top: 64px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.sfa-marquee__track { display: flex; gap: 20px; width: max-content; animation: sfa-slide 70s linear infinite; }
.sfa-marquee:hover .sfa-marquee__track { animation-play-state: paused; }
.sfa-marquee__item { flex: none; width: clamp(260px, 30vw, 420px); border-radius: 14px; overflow: hidden; border: 1px solid var(--sfa-line); background: var(--sfa-card); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }
.sfa-marquee__item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
@keyframes sfa-slide { to { transform: translateX(calc(-50% - 10px)); } }

/* ── Sections ────────────────────────────────────────────────────────────── */
.sfa-section { padding: 112px 0; }
.sfa-section--alt { background: var(--sfa-bg-2); border-block: 1px solid var(--sfa-line); }
.sfa-head { max-width: 720px; margin-bottom: 52px; }
.sfa-kicker { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; background: var(--sfa-grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.sfa-head h2 { margin-top: 12px; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.06; letter-spacing: -.035em; font-weight: 650; text-wrap: balance; }
.sfa-head p:last-child { margin-top: 16px; font-size: 18px; color: var(--sfa-dim); text-wrap: pretty; }

/* ── Applications ────────────────────────────────────────────────────────── */
.sfa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.sfa-app { display: flex; flex-direction: column; border: 1px solid var(--sfa-line); border-radius: var(--sfa-radius); background: var(--sfa-card); overflow: hidden; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.sfa-app:hover { border-color: var(--sfa-line-hi); transform: translateY(-4px); box-shadow: 0 30px 60px -34px rgba(139, 92, 246, .55); }
.sfa-app__shot { display: block; overflow: hidden; border-bottom: 1px solid var(--sfa-line); background: #000; }
.sfa-app__shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .5s ease; }
.sfa-app:hover .sfa-app__shot img { transform: scale(1.035); }
.sfa-app__body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.sfa-app__kind { font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sfa-dim); }
.sfa-app h3 { margin-top: 8px; font-size: 24px; letter-spacing: -.02em; font-weight: 650; line-height: 1.15; }
.sfa-app__text { margin-top: 10px; color: var(--sfa-dim); font-size: 15.5px; }
.sfa-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.sfa-chips li { padding: 4px 11px; border: 1px solid var(--sfa-line); border-radius: 999px; font-size: 13px; color: #cfd3de; background: rgba(255, 255, 255, .03); }
.sfa-chips--lg li { padding: 8px 16px; font-size: 15px; color: var(--sfa-ink); }
.sfa-app__link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: auto; padding-top: 22px; font-weight: 600; font-size: 15px; text-decoration: none; }
.sfa-app__link svg { font-size: 17px; color: var(--sfa-pink); transition: transform .18s ease; }
.sfa-app__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.sfa-app__link:hover svg { transform: translate(2px, -2px); }
/* The first application, across the row. */
.sfa-app--lead { flex-direction: row; }
.sfa-app--lead .sfa-app__shot { flex: 1.45; border-bottom: 0; border-right: 1px solid var(--sfa-line); }
.sfa-app--lead .sfa-app__shot img { height: 100%; }
.sfa-app--lead .sfa-app__body { flex: 1; padding: 40px; justify-content: center; }
.sfa-app--lead h3 { font-size: 34px; }
.sfa-app--lead .sfa-app__text { font-size: 17px; }
.sfa-app--lead .sfa-app__link { margin-top: 0; }

/* ── Method ──────────────────────────────────────────────────────────────── */
.sfa-method { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--sfa-line); border: 1px solid var(--sfa-line); border-radius: var(--sfa-radius); overflow: hidden; }
.sfa-method > li { padding: 32px; background: var(--sfa-bg-2); }
.sfa-method__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; font-size: 22px; color: #fff; background: linear-gradient(135deg, rgba(255, 106, 61, .28), rgba(139, 92, 246, .32)); border: 1px solid var(--sfa-line-hi); }
.sfa-method h3 { margin-top: 18px; font-size: 19px; letter-spacing: -.01em; font-weight: 620; }
.sfa-method p { margin-top: 8px; color: var(--sfa-dim); font-size: 15.5px; }

.sfa-flow { margin-top: 56px; }
.sfa-flow figcaption { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sfa-dim); }
.sfa-flow ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 18px; counter-reset: sfa-step; }
.sfa-flow li { position: relative; padding: 18px 18px 20px; border: 1px solid var(--sfa-line); border-radius: 14px; background: var(--sfa-card); counter-increment: sfa-step; }
.sfa-flow li::before { content: '0' counter(sfa-step); display: block; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--sfa-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sfa-flow li b { display: block; margin-top: 6px; font-size: 17px; font-weight: 620; }
.sfa-flow li span { display: block; margin-top: 4px; font-size: 14px; color: var(--sfa-dim); }
.sfa-flow li:last-child { border-color: rgba(61, 220, 132, .45); }

/* ── Stack ───────────────────────────────────────────────────────────────── */
.sfa-stack { border-top: 1px solid var(--sfa-line); }
.sfa-stack__group { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--sfa-line); }
.sfa-stack__group h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.sfa-stack__group .sfa-chips { margin-top: 0; }

/* ── Closing ─────────────────────────────────────────────────────────────── */
.sfa-cta { position: relative; padding: 112px 0; text-align: center; border-top: 1px solid var(--sfa-line); isolation: isolate; overflow: hidden; }
.sfa-cta::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 320px at 50% 100%, rgba(255, 77, 141, .22), transparent 70%), radial-gradient(520px 260px at 20% 110%, rgba(255, 106, 61, .18), transparent 70%), radial-gradient(520px 260px at 80% 110%, rgba(139, 92, 246, .22), transparent 70%); }
.sfa-cta__in { display: flex; flex-direction: column; align-items: center; }
.sfa-cta h2 { max-width: 860px; font-size: clamp(32px, 5vw, 60px); line-height: 1.05; letter-spacing: -.035em; font-weight: 650; text-wrap: balance; }
.sfa-cta p { max-width: 560px; margin-top: 18px; font-size: 18px; color: var(--sfa-dim); }
.sfa-cta__mail a { color: var(--sfa-ink); text-underline-offset: 4px; }

.sfa-footer { border-top: 1px solid var(--sfa-line); padding: 28px 0; font-size: 14.5px; color: var(--sfa-dim); }
.sfa-footer__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.sfa-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.sfa-footer a { text-decoration: none; padding: 6px 0; }
.sfa-footer a:hover { color: var(--sfa-ink); text-decoration: underline; text-underline-offset: 4px; }

/* The 404 page. */
.sfa-missing { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.sfa-missing h1 { margin: 12px 0; font-size: clamp(32px, 6vw, 56px); letter-spacing: -.035em; }
.sfa-missing p { color: var(--sfa-dim); }
.sfa-missing .sfa-btn { margin-top: 28px; }

/* Added by the script: sections fade in as they enter the viewport. */
.sfa-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease, border-color .2s ease, box-shadow .2s ease; }
.sfa-reveal.is-in { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1020px) {
  .sfa-grid, .sfa-method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sfa-app--lead { flex-direction: column; }
  .sfa-app--lead .sfa-app__shot { border-right: 0; border-bottom: 1px solid var(--sfa-line); }
  .sfa-app--lead .sfa-app__body { padding: 28px; }
  .sfa-app--lead .sfa-app__link { margin-top: auto; }
  .sfa-flow ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sfa-stack__group { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 760px) {
  .sfa-burger { display: inline-flex; }
  .sfa-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 12px;
    padding: 12px 24px 24px; background: rgba(7, 8, 13, .97); border-bottom: 1px solid var(--sfa-line);
  }
  .sfa-nav.is-open { display: flex; }
  .sfa-nav__links { flex-direction: column; margin: 0; gap: 2px; }
  .sfa-nav__links a { padding: 14px 8px; font-size: 17px; color: var(--sfa-ink); border-radius: 10px; }
  .sfa-nav .sfa-btn { min-height: 48px; }
  .sfa-hero { padding-top: 40px; }
  .sfa-section, .sfa-cta { padding: 72px 0; }
  .sfa-head { margin-bottom: 36px; }
  .sfa-marquee { margin-top: 44px; }
}
@media (max-width: 620px) {
  .sfa-grid, .sfa-method { grid-template-columns: 1fr; }
  .sfa-flow ol { grid-template-columns: 1fr; }
  .sfa-hero__cta { flex-direction: column; align-self: stretch; }
  .sfa-hero__facts { gap: 8px 18px; }
  .sfa-app--lead h3 { font-size: 28px; }
  .sfa-method > li { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sfa-marquee__track { animation: none; }
  .sfa-dot { animation: none; }
  .sfa *, .sfa *::before { transition: none !important; }
}
