/* BE Solutions homepage: hero, the demo tabs + stage, the phone demo sheet, "made for you".
   Tokens, nav, buttons, form and footer come from /welcome/styles.css and /welcome/sections.css. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- hero ---------- */
.home-hero { padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); }
.home-hero h1 { font-size: clamp(40px, 6.4vw, 84px); font-weight: 700; margin: 20px 0 0; max-width: 14em; }
.home-hero h1 .serif { font-size: 1.06em; }
.home-hero__lede { margin-top: 22px; max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); }
.home-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.js .home-hero .reveal { opacity: 1; transform: none; transition: none; animation: rise-in 0.8s var(--ease-out) var(--d, 0ms) backwards; }
.home-hero .reveal:nth-child(2) { --d: 80ms; }
.home-hero .reveal:nth-child(3) { --d: 160ms; }
.home-hero .reveal:nth-child(4) { --d: 240ms; }

/* ---------- demo tabs ---------- */
.demos { scroll-margin-top: 68px; }
section.demos { padding-top: clamp(20px, 3vw, 32px); }
.demo-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.demo-tab {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass);
  color: var(--ink-2); font: inherit; text-align: left; cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s, transform 0.16s var(--ease-out);
}
.demo-tab .ico { width: 26px; height: 26px; color: var(--muted); transition: color 0.2s; }
.demo-tab span { display: grid; min-width: 0; }
.demo-tab b { font-weight: 600; font-size: 16px; color: var(--ink); }
.demo-tab small { font: 12px/1.3 var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-tab:active { transform: scale(0.98); }
.demo-tab[aria-selected='true'] { border-color: var(--accent); background: rgba(255, 198, 41, 0.08); }
.demo-tab[aria-selected='true'] .ico { color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .demo-tab:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); }
  .demo-tab[aria-selected='true']:hover { border-color: var(--accent); }
}

/* ---------- panel + stage ---------- */
.demo-panel { margin-top: 18px; }
.demo-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.demo-head h3 { font-size: clamp(22px, 2.4vw, 30px); }
.demo-head__pitch { margin-top: 6px; max-width: 46em; color: var(--ink-2); }
.demo-head__tools { display: flex; align-items: center; gap: 14px; }
.demo-head__note { font-size: 12px; color: var(--muted); }

.demo-stage {
  position: relative; height: 640px; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: 22px; background: var(--night-2);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}
/* The demo root fills the stage. Undo /welcome's small ".demo" card styles, which share the class name. */
.demo-stage > .demo, .demo-sheet__body > .demo { position: absolute; inset: 0; height: auto; margin: 0; padding: 0; }
.demo-stage > .demo::before, .demo-sheet__body > .demo::before { content: none; }
.demo-stage__msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font: 14px var(--mono); }
.demo-stage__msg[hidden] { display: none; }
.demo-stage__msg a { color: var(--ink); }

/* Phone: the stage is replaced by a poster that opens the demo full screen. */
.demo-poster { display: none; }
@media (max-width: 759px) {
  .demo-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-tab { min-height: 58px; padding: 10px 12px; gap: 10px; }
  .demo-tab .ico { width: 22px; height: 22px; }
  .demo-tab b { font-size: 15px; }
  .demo-head__tools { display: none; }
  .demo-stage { display: none; }
  .demo-poster {
    display: grid; justify-items: center; gap: 16px; padding: 30px 20px 24px; text-align: center;
    border: 1px solid var(--line-strong); border-radius: 22px; background: var(--night-2);
  }
  .demo-poster__icon { width: 56px; height: 56px; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
  .demo-poster p { font-size: 13px; color: var(--ink-2); max-width: 30em; }
}

/* ---------- phone sheet ---------- */
.demo-sheet { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: 56px minmax(0, 1fr); background: var(--night); }
.demo-sheet[hidden] { display: none; }
.demo-sheet__bar {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px;
  padding: 0 max(4px, env(safe-area-inset-right)) 0 max(4px, env(safe-area-inset-left));
  padding-top: env(safe-area-inset-top); box-sizing: content-box; height: 56px;
  border-bottom: 1px solid var(--line); background: var(--night-2);
}
.demo-sheet__bar b { text-align: center; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-sheet__btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-size: 22px; cursor: pointer; }
.demo-sheet__btn:active { background: var(--glass); }
.demo-sheet__body { position: relative; min-height: 0; overflow: hidden; padding-bottom: env(safe-area-inset-bottom); }
.demo-sheet .demo-stage__msg { position: absolute; }
body.sheet-open { overflow: hidden; }

/* ---------- made for you ---------- */
.fit__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.fit__grid li { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass); }
.fit__grid .ico { width: 28px; height: 28px; color: var(--accent); }
.fit__grid h3 { margin-top: 14px; font-size: 20px; }
.fit__grid p { margin-top: 8px; color: var(--ink-2); }
.fit__grid li:nth-child(2) { --d: 80ms; }
.fit__grid li:nth-child(3) { --d: 160ms; }
.fit__more { margin-top: 24px; }
.fit__more a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; text-underline-offset: 4px; }
@media (max-width: 860px) { .fit__grid { grid-template-columns: minmax(0, 1fr); } }
