/* ============ ByteLedgers - richer software pages (added 2026-11-20) ============
   Used by construction-accounting-software.html, school-management-software.html
   and restaurant-pos-software.html:
   1. .ap-   live app preview (3 screens that change every 5 seconds, demo data)
   2. .ba-   problem text beside a "Without / With ByteLedgers" comparison
   3. .demo-band  "book a demo" band in the middle of the page
   4. .bl-clients  client logo strip (same as the homepage) */

/* ---------- 1. App preview ---------- */
.ap-section { background: linear-gradient(180deg, var(--grey-light) 0%, #fff 100%); }
.ap-head { text-align: center; max-width: 720px; margin: 0 auto 26px; }
.ap-head h2 { margin: 6px 0 8px; }
.ap-head p { color: var(--grey); margin: 0; }

.ap-tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 0 auto 18px; }
.ap-tab { position: relative; overflow: hidden; padding: 8px 16px; border-radius: 999px; background: #fff;
  border: 1px solid #dfe5ee; font-size: .85rem; font-weight: 600; color: var(--grey); }
.ap-tab::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--blue); transform: scaleX(0); transform-origin: left; }

.ap-frame { max-width: 980px; margin: 0 auto; }
.ap-win { position: relative; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 70px -25px rgba(21, 24, 61, .45), 0 0 0 1px rgba(30, 37, 48, .06); }
.ap-bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: #f6f7fa;
  border-bottom: 1px solid #e9edf3; }
.ap-bar i { width: 10px; height: 10px; border-radius: 50%; background: #dfe3ea; }
.ap-bar i:nth-child(1) { background: #ff6b5f; } .ap-bar i:nth-child(2) { background: #ffbd2e; } .ap-bar i:nth-child(3) { background: #28c840; }
.ap-url { margin-left: 12px; padding: 3px 12px; border-radius: 6px; background: #fff; border: 1px solid #e6e9ef;
  font: 500 .72rem/1.4 "JetBrains Mono", ui-monospace, monospace; color: #8a93a2; }
.ap-stage { position: relative; height: 400px; }
.ap-scene { position: absolute; inset: 0; display: flex; opacity: 0; }
.ap-side { width: 190px; flex: none; background: var(--navy); color: rgba(255,255,255,.72); padding: 18px 12px;
  display: flex; flex-direction: column; gap: 4px; font-size: .8rem; }
.ap-side b { color: #fff; font-size: .92rem; margin: 0 6px 12px; display: flex; align-items: center; gap: 8px; }
.ap-side b::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--c, var(--teal)); }
.ap-side span { padding: 7px 10px; border-radius: 6px; }
.ap-side span.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.ap-main { flex: 1; min-width: 0; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.ap-title { display: flex; justify-content: space-between; align-items: center; }
.ap-title h4 { margin: 0; font-size: 1rem; color: var(--ink); }
.ap-title small { color: #8a93a2; font-size: .75rem; }
.ap-btn { padding: 6px 12px; border-radius: 6px; background: var(--blue); color: #fff; font-size: .75rem; font-weight: 600; }

.ap-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ap-kpi { border: 1px solid #e9edf3; border-radius: 10px; padding: 10px 12px; }
.ap-kpi small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #8a93a2; }
.ap-kpi strong { font-size: 1.25rem; color: var(--ink); letter-spacing: -.01em; }
.ap-kpi strong.g { color: #12895f; } .ap-kpi strong.r { color: #c0392b; }

.ap-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.ap-table th { text-align: left; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: #8a93a2; padding: 6px 8px; border-bottom: 1px solid #e9edf3; }
.ap-table td { padding: 8px; border-bottom: 1px solid #f1f3f7; color: var(--ink); white-space: nowrap; }
.ap-table .n { text-align: right; font-family: "JetBrains Mono", ui-monospace, monospace; }

.ap-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .68rem; font-weight: 600; }
.ap-pill.ok { background: #e3f6ee; color: #12895f; } .ap-pill.wa { background: #fff3db; color: #a96b00; }
.ap-pill.bl { background: #e8eeff; color: var(--blue-dark); } .ap-pill.bad { background: #fde8e6; color: #c0392b; }

.ap-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ap-tile { border: 1px solid #e9edf3; border-radius: 10px; padding: 10px 12px; font-size: .78rem; color: var(--grey); }
.ap-tile strong { display: block; color: var(--ink); font-size: .9rem; margin-bottom: 2px; }
.ap-tile ul { margin: 6px 0 8px; padding-left: 16px; }

.ap-bars { display: flex; flex-direction: column; gap: 9px; }
.ap-barrow { display: grid; grid-template-columns: 150px 1fr 90px; gap: 10px; align-items: center; font-size: .78rem; color: var(--ink); }
.ap-track { height: 10px; background: #eef1f6; border-radius: 6px; overflow: hidden; }
.ap-fill { height: 100%; border-radius: 6px; background: var(--blue); transform-origin: left; }
.ap-fill.t { background: var(--teal); } .ap-fill.w { background: #f0a92e; }

.ap-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ap-field small { display: block; font-size: .68rem; color: #8a93a2; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .05em; }
.ap-field div { border: 1px solid #dfe5ee; border-radius: 6px; padding: 7px 10px; font-size: .82rem; color: var(--ink); min-height: 33px; }
.ap-note { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: #e3f6ee;
  color: #12895f; font-size: .8rem; font-weight: 600; }

.ap-caption { text-align: center; color: #8a93a2; font-size: .8rem; margin: 14px 0 0; }

/* 3 scenes x 5 s. Each scene, its tab and its rows run on the same 15 s loop. */
.ap-scene { animation: apScene 15s infinite; }
.ap-scene:nth-child(2), .ap-tab:nth-child(2), .ap-tab:nth-child(2)::after { animation-delay: 5s; }
.ap-scene:nth-child(3), .ap-tab:nth-child(3), .ap-tab:nth-child(3)::after { animation-delay: 10s; }
.ap-tab { animation: apTab 15s infinite; }
.ap-tab::after { animation: apTabBar 15s infinite linear; }
@keyframes apScene { 0% { opacity: 0; } 2%, 31% { opacity: 1; } 33.4%, 100% { opacity: 0; } }
@keyframes apTab { 0%, 33.3% { color: var(--blue); border-color: #bfd0ff; background: #f3f6ff; } 33.4%, 100% { color: var(--grey); border-color: #dfe5ee; background: #fff; } }
@keyframes apTabBar { 0% { transform: scaleX(0); } 33.3% { transform: scaleX(1); } 33.4%, 100% { transform: scaleX(0); } }

.ap-in { opacity: 0; animation: apIn 15s infinite; }
@keyframes apIn { 0%, 1% { opacity: 0; transform: translateY(6px); } 4%, 31% { opacity: 1; transform: none; } 33.4%, 100% { opacity: 0; } }
.ap-grow { transform: scaleX(0); animation: apGrow 15s infinite cubic-bezier(.2,.7,.2,1); }
@keyframes apGrow { 0%, 2% { transform: scaleX(0); } 10%, 31% { transform: scaleX(var(--v, 1)); } 33.4%, 100% { transform: scaleX(0); } }
.ap-scene:nth-child(2) .ap-in, .ap-scene:nth-child(2) .ap-grow { animation-delay: calc(5s + var(--d, 0s)); }
.ap-scene:nth-child(3) .ap-in, .ap-scene:nth-child(3) .ap-grow { animation-delay: calc(10s + var(--d, 0s)); }
.ap-scene:nth-child(1) .ap-in, .ap-scene:nth-child(1) .ap-grow { animation-delay: var(--d, 0s); }

/* ---------- 2. Problem + Without / With ---------- */
.ba-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.ba-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid #e9edf3; }
.ba-cols { display: grid; grid-template-columns: 1fr 1fr; }
.ba-col { padding: 22px 22px 24px; }
.ba-col h3 { font-size: .95rem; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.ba-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ba-col li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: .9rem; line-height: 1.45; color: var(--ink); }
.ba-col li::before { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.ba-col--before { background: #fbf6f5; }
.ba-col--before h3 { color: #b23b2e; }
.ba-col--before li { color: #5a4a48; }
.ba-col--before li::before { content: "\2715"; background: #fde3df; color: #c0392b; }
.ba-col--after h3 { color: #12895f; }
.ba-col--after li::before { content: "\2713"; background: #dcf4ea; color: #12895f; }

/* ---------- 3. Demo band ---------- */
.demo-band { background: var(--navy); color: #fff; padding: 46px 0; position: relative; overflow: hidden; }
.demo-band::after { content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20,184,166,.35), transparent 65%); }
.demo-band .container { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.demo-band h2 { color: #fff; margin: 0 0 6px; font-size: 1.6rem; }
.demo-band p { margin: 0; color: rgba(255,255,255,.75); max-width: 560px; }
.demo-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn--whatsapp { background: #25d366; color: #fff; border: 0; display: inline-flex; align-items: center; gap: 8px; }
.btn--whatsapp:hover { background: #1fb457; color: #fff; }

/* ---------- 4. Client logos (same as homepage) ---------- */
.bl-clients{background:#fff;padding:48px 0 52px;overflow:hidden}
.bl-clients__title{text-align:center;font-size:13px;letter-spacing:.12em;text-transform:uppercase;color:#6b7280;margin:0 0 30px}
.bl-clients__viewport{overflow:hidden;max-width:1600px;margin:0 auto;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);
          mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
.bl-clients__track{display:flex;align-items:center;width:max-content;animation:bl-marquee 88s linear infinite}
.bl-clients__viewport:hover .bl-clients__track{animation-play-state:paused}
.bl-logo{flex:0 0 auto;width:220px;height:80px;padding:0 30px;display:flex;align-items:center;justify-content:center;box-sizing:border-box}
.bl-logo picture{display:contents}
.bl-logo img{max-width:100%;max-height:64px;width:auto;height:auto;object-fit:contain;display:block;transition:transform .3s}
.bl-logo:hover img{transform:scale(1.06)}
@keyframes bl-marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* ---------- Feature boxes: 3 per row so 6 features sit in two even rows ---------- */
@media (min-width: 901px) {
  .service-tiles { grid-template-columns: repeat(3, 1fr); max-width: 1100px; margin-left: auto; margin-right: auto; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .service-tiles { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Phones and tablets ---------- */
@media (max-width: 900px) {
  .ba-grid { grid-template-columns: 1fr; gap: 28px; }
  .ap-side { display: none; }
  .ap-stage { height: 470px; }
  .ap-main { padding: 14px; }
  .ap-tiles { grid-template-columns: 1fr 1fr; }
  .ap-tiles .ap-tile:nth-child(n+5) { display: none; }
  .ap-barrow { grid-template-columns: 100px 1fr 70px; font-size: .72rem; }
  .ap-form { grid-template-columns: 1fr; }
  .ap-form .ap-field:nth-child(n+5) { display: none; }
  .ap-table td, .ap-table th { padding: 6px 5px; font-size: .74rem; }
  .ap-table .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .ba-cols { grid-template-columns: 1fr; }
  .ap-kpis { grid-template-columns: 1fr 1fr; }
  .ap-kpis .ap-kpi:nth-child(3) { display: none; }
  .ap-stage { height: 380px; }
  .ap-tab { padding: 6px 11px; font-size: .78rem; }
  .ap-form .ap-field:nth-child(n+3) { display: none; }
  .ap-url { display: none; }
  .demo-band h2 { font-size: 1.35rem; }
  .bl-logo{width:150px;height:60px;padding:0 18px}
  .bl-logo img{max-height:46px}
  .bl-clients__track{animation-duration:62s}
}

/* ---------- Visitors who turn animations off: show the first screen, still ---------- */
@media (prefers-reduced-motion: reduce) {
  .ap-scene, .ap-tab, .ap-tab::after, .ap-in, .ap-grow { animation: none !important; }
  .ap-scene:first-child, .ap-in { opacity: 1; }
  .ap-grow { transform: scaleX(var(--v, 1)); }
  .ap-tab:first-child { color: var(--blue); border-color: #bfd0ff; background: #f3f6ff; }
  .bl-clients__track{animation:none;flex-wrap:wrap;justify-content:center;width:auto}
  .bl-logo[aria-hidden="true"]{display:none}
}
