/* ==========================================================================
   Broken Pie Private Limited — MOBILE LAYOUT
   Loaded via <link media="(max-width: 900px)"> so it only ever applies to
   phones / small tablets. This is a *separate* layout, not a squeezed
   desktop: different navigation (drawer + bottom tab bar), different
   section rhythm, snap-scroll carousels, accordion footer, sticky CTA.
   ========================================================================== */

/* ---------- 1. Token overrides for small screens ---------------------- */
:root {
  --section-y: 56px;
  --radius: 16px;
  --radius-lg: 20px;
  --container: 100%;
  --tabbar-h: 64px;
}

body {
  font-size: 15.5px;
  /* room for the bottom tab bar + sticky CTA */
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}

html { scroll-padding-top: 16px; }   /* nothing pinned at the top on phones */

h1 { font-size: 2.05rem; line-height: 1.14; }
h2 { font-size: 1.62rem; }
h3 { font-size: 1.12rem; }

.wrap { padding-inline: 18px; }

/* ---------- 2. Visibility switches ------------------------------------ */
.only-mobile { display: block !important; }
.only-desktop { display: none !important; }

/* Components that carry .only-mobile need their own display type back —
   higher specificity than the generic switch above. */
.m-header.only-mobile { display: flex !important; }
.m-cta-bar.only-mobile { display: flex !important; }
.m-tabbar.only-mobile { display: grid !important; }
.m-swipe-hint.only-mobile { display: flex !important; }

/* ---------- 3. Kill desktop chrome, build mobile chrome ---------------- */
.site-header { display: none; }

/* Announcement: one tidy line on phones — the long sentence is swapped for a
   short one so it never wraps into a cramped two-line block. */
.announce {
  gap: 8px;
  font-size: .76rem;
  padding: 9px 14px;
  line-height: 1.2;
  white-space: nowrap;
}
.announce .pill { font-size: .58rem; letter-spacing: .09em; padding: 3px 8px; }

/* --- Mobile top bar --- */
/* The top bar is NOT pinned on phones: the fixed bottom tab bar already gives
   persistent access to Home / Software / Demo / Call / Menu, so pinning it too
   only stole 62px and let content slide under the bar. It scrolls away. */
.m-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: static;
  z-index: 950;
  height: 62px;
  padding-inline: 18px;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.m-header .brand__mark { width: 36px; height: 36px; }
.m-header .brand__name { font-size: 1.05rem; }   /* single line — no legal suffix */
.m-header .brand { gap: 10px; }

.m-header__actions { display: flex; align-items: center; gap: 8px; }

.m-iconbtn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}
.m-iconbtn svg { width: 20px; height: 20px; }
.m-iconbtn--call { background: rgba(0, 229, 160, .12); border-color: rgba(0, 229, 160, .3); color: var(--bp-mint); }

/* Burger icon */
.burger { display: grid; place-items: center; gap: 0; }
.burger span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: currentColor; position: relative;
  transition: transform .3s, opacity .25s;
}
.burger span + span { margin-top: 4px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- Slide-in drawer nav --- */
.m-scrim {
  display: block;
  position: fixed; inset: 0; z-index: 980;
  background: rgba(4, 6, 12, .68);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.m-scrim.is-open { opacity: 1; visibility: visible; }

.m-drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 990;
  width: min(86vw, 360px);
  background: linear-gradient(180deg, #101627, #080c17);
  border-left: 1px solid var(--line-strong);
  box-shadow: -30px 0 60px -20px rgba(0, 0, 0, .8);
  transform: translateX(102%);
  transition: transform .38s cubic-bezier(.3, .9, .3, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.m-drawer.is-open { transform: none; }

.m-drawer__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.m-drawer__close {
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  color: var(--ink); display: grid; place-items: center; cursor: pointer;
  font-size: 1.3rem; line-height: 1; padding: 0;
}

.m-nav { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 4px; }
.m-nav a {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 14px;
  border-radius: 14px;
  font-size: 1rem; font-weight: 700; color: var(--ink-2);
  border: 1px solid transparent;
}
.m-nav a svg { width: 19px; height: 19px; color: var(--ink-3); flex: none; }
.m-nav a .chev { margin-left: auto; opacity: .4; width: 16px; height: 16px; }
.m-nav a:active { background: rgba(255, 255, 255, .06); }
.m-nav a.is-active {
  color: var(--ink);
  background: linear-gradient(90deg, rgba(255, 107, 53, .16), rgba(255, 107, 53, .03));
  border-color: rgba(255, 107, 53, .3);
}
.m-nav a.is-active svg { color: var(--bp-orange); }

.m-drawer__foot { margin-top: auto; padding: 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.m-drawer__foot .btn { width: 100%; }
.m-drawer__meta { font-size: .78rem; color: var(--ink-3); text-align: center; line-height: 1.7; }
.m-drawer__meta strong { color: var(--ink-2); }

/* --- Bottom tab bar --- */
.m-tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 940;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(10, 14, 25, .94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.m-tabbar a, .m-tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: none; border: 0; cursor: pointer;
  font-family: inherit;
  font-size: .66rem; font-weight: 700; letter-spacing: .02em;
  color: var(--ink-3);
  padding: 0;
}
.m-tabbar svg { width: 21px; height: 21px; }
.m-tabbar .is-active { color: var(--bp-orange); }

/* --- Sticky mobile CTA (page-level, sits above tab bar) --- */
.m-cta-bar {
  display: flex;
  gap: 10px;
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  z-index: 930;
  padding: 10px 14px;
  background: rgba(10, 14, 25, .93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  transform: translateY(140%);
  transition: transform .35s cubic-bezier(.3, .9, .3, 1);
}
.m-cta-bar.is-visible { transform: none; }
.m-cta-bar .btn { flex: 1; padding: 13px 12px; font-size: .88rem; }
.m-cta-bar .price { display: flex; flex-direction: column; justify-content: center; padding-left: 4px; }
.m-cta-bar .price .l { font-size: .62rem; color: var(--ink-3); line-height: 1.2; }
.m-cta-bar .price .v { font-size: .95rem; font-weight: 800; color: var(--bp-mint); line-height: 1.2; }

body.no-scroll { overflow: hidden; }

/* ---------- 4. Hero — stacked, media first ---------------------------- */
.hero { padding-block: 34px 44px; }
.hero__grid { grid-template-columns: 1fr; gap: 34px; }
.hero__copy { text-align: left; }
.hero__lead { font-size: 1rem; }
.hero .eyebrow { font-size: .66rem; padding: 6px 12px; }

/* Stack the three parts instead of letting "Starting at" wrap mid-phrase */
.hero__price {
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 16px;
  margin-bottom: 24px;
}
.hero__price .amt { font-size: 1.6rem; line-height: 1.15; }
.hero__price .lbl { font-size: .78rem; line-height: 1.35; }

/* USP price block: price on top, proof points beneath */
.usp {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 18px 18px 16px;
  margin-bottom: 26px;
  border-radius: 18px;
}
.usp__amt { font-size: 2.5rem; }
.usp__from { font-size: .66rem; }
.usp__sep { width: auto; height: 1px; align-self: auto; }
.usp__points { gap: 9px; }
.usp__points li { font-size: .86rem; }

.hero__actions { flex-direction: column; gap: 10px; margin-bottom: 28px; }
.hero__actions .btn { width: 100%; padding-block: 15px; }

.hero__stats { grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 22px; }
.hero__stats .n { font-size: 1.25rem; }
.hero__stats .l { font-size: .68rem; line-height: 1.35; }

/* Hero visual: headline leads, the code panel follows the CTAs.
   One scroll region for the whole snippet instead of per-line scrollbars. */
.panel__body {
  padding: 16px;
  font-size: .68rem;
  line-height: 1.85;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.panel__body .line { overflow: visible; }
.hero__float { display: none; }

/* ---------- 5. Sections ------------------------------------------------ */
.head { margin-bottom: 30px; max-width: none; }
.head--center { text-align: left; }
.head p { font-size: .96rem; }

.grid, .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; gap: 14px; }
.card { padding: 22px; }
.card h3 { font-size: 1.08rem; }
.icon-badge { width: 44px; height: 44px; margin-bottom: 15px; }

.section--alt { background: rgba(16, 22, 39, .55); }

/* ---------- 6. Horizontal snap carousels (mobile-only pattern) --------- */
/* Applied to plan / product / demo rows so the page stays short */
.m-snap {
  display: grid !important;
  /* clear the single explicit column set above, or card 1 lands in a 1fr
     track while the rest get the 82% implicit ones */
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-inline: 18px;
  margin-inline: -18px;
  padding-bottom: 8px;
}
.m-snap::-webkit-scrollbar { display: none; }
.m-snap > * { scroll-snap-align: center; }

.m-swipe-hint {
  display: flex; align-items: center; gap: 8px;
  font-size: .74rem; color: var(--ink-3);
  margin-top: 14px;
  font-weight: 600;
}
.m-swipe-hint svg { width: 15px; height: 15px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }

/* Bootstrap rows: tighter gutters on phones */
.row { --bs-gutter-x: 14px; --bs-gutter-y: 14px; }
.row.g-5 { --bs-gutter-x: 22px; --bs-gutter-y: 26px; }

/* ---------- 7. Split blocks stack -------------------------------------- */
.split { grid-template-columns: 1fr; gap: 28px; }
.split--reverse .split__media { order: 0; }
.stat-tiles { gap: 10px; }
.stat-tile { padding: 16px; }
.stat-tile .n { font-size: 1.4rem; }
.stat-tile .l { font-size: .72rem; }

/* ---------- 8. Steps: vertical rail ------------------------------------ */
.steps { grid-template-columns: 1fr; gap: 0; padding-left: 30px; position: relative; }
.steps::before { content: ""; position: absolute; left: 16px; top: 10px; bottom: 24px; width: 2px; background: linear-gradient(180deg, var(--bp-orange), var(--bp-violet), transparent); }
.step { padding: 0 0 26px 12px; }
.step::before { top: 0; left: -30px; width: 32px; height: 32px; font-size: .74rem; }
.step__line { display: none; }
.step h4 { font-size: 1rem; margin-bottom: 5px; }
.step p { font-size: .88rem; }

/* ---------- 9. Timeline ------------------------------------------------ */
.timeline { padding-left: 26px; }
.tl-item::before { left: -26px; width: 13px; height: 13px; border-width: 3px; }
.tl-item { padding-bottom: 26px; }
.tl-item h4 { font-size: 1rem; }
.tl-item p { font-size: .89rem; }

/* ---------- 10. Demo + forms ------------------------------------------- */
.demo-card__top, .demo-card__body { padding-inline: 20px; }
.cred { font-size: .74rem; padding: 10px 12px; }
.demo-actions { flex-direction: column; }
.demo-actions .btn { width: 100%; }

.form-grid { grid-template-columns: 1fr; gap: 14px; }
.field input, .field select, .field textarea { font-size: 16px; padding: 13px 14px; } /* 16px stops iOS zoom */
.field textarea { min-height: 110px; }

/* ---------- 10b. Tables & modules -------------------------------------- */
.tbl-scroll { margin-inline: -18px; border-radius: 0; border-inline: 0; }
.tbl { min-width: 620px; font-size: .85rem; }
.tbl th, .tbl td { padding: 12px 14px; }
.mod { padding: 14px 15px; }

/* ---------- 10c. Legal pages -------------------------------------------- */
/* TOC becomes a normal (non-sticky) card that scrolls horizontally-free */
.toc { position: static; max-height: none; padding: 18px; margin-bottom: 8px; }
.toc ol { gap: 0; }
.toc a { padding: 10px 8px; font-size: .88rem; border-bottom: 1px solid var(--line); border-radius: 0; }
.toc li:last-child a { border-bottom: 0; }
.legal { gap: 30px; }
.legal section { scroll-margin-top: 82px; }
.legal h2 { font-size: 1.08rem; }
.legal p, .legal ul li { font-size: .92rem; }

/* ---------- 11. FAQ ----------------------------------------------------- */
.faq__q { font-size: .96rem; padding: 18px 2px; gap: 14px; }
.faq__a > div { padding: 0 34px 20px 2px; font-size: .9rem; }

/* ---------- 12. CTA band ------------------------------------------------ */
.cta-band { padding: 30px 20px; text-align: left; border-radius: var(--radius); }
.cta-band h2 { max-width: none; }
.cta-band .hero__actions { justify-content: stretch; margin-top: 22px; }

/* ---------- 13. Footer: accordion columns ------------------------------ */
.site-footer { padding-top: 40px; margin-top: 44px; }
.footer__grid { grid-template-columns: 1fr; gap: 0; }
.footer__about { margin-bottom: 26px; }
.footer__about p { max-width: none; font-size: .89rem; }

.footer__col { border-top: 1px solid var(--line); }
.footer__col h5 { display: none; }
.footer__col .footer__toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 16px 2px;
  background: none; border: 0; cursor: pointer;
  font-family: inherit;
  font-size: .78rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-2);
}
.footer__toggle .ico { transition: transform .3s; width: 16px; height: 16px; color: var(--ink-3); }
.footer__col.is-open .footer__toggle .ico { transform: rotate(180deg); }
.footer__panel { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.footer__col.is-open .footer__panel { max-height: 340px; }
.footer__panel .footer__list { padding-bottom: 18px; gap: 14px; }

.footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; font-size: .78rem; text-align: left; padding-bottom: 30px; }
.footer__bottom .legal { flex-wrap: wrap; gap: 14px; }
.footer__acq { font-size: .74rem; }

/* ---------- 14. Tap-target + misc polish ------------------------------- */
a, button { -webkit-tap-highlight-color: rgba(255, 107, 53, .18); }
.btn { padding: 14px 22px; }
.strip { padding-block: 14px; }
.strip__row { gap: 34px; animation-duration: 24s; }
.strip__item { font-size: .78rem; }

/* Very small phones */
@media (max-width: 360px) {
  .wrap { padding-inline: 14px; }
  h1 { font-size: 1.82rem; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .hero__stats > :last-child { display: none; }
  .m-snap { grid-auto-columns: 88%; }
}

/* Landscape phones: give a little of the desktop rhythm back */
@media (orientation: landscape) and (max-height: 480px) {
  .m-tabbar { display: none; }
  body { padding-bottom: 0; }
  .m-cta-bar { bottom: 0; }
  .hero__grid { grid-template-columns: 1fr 1fr; align-items: center; }
  .hero__visual { order: 1; }
}
