/* Saman POS — www.samanpos.com
 *
 * The palette is the app's own dark theme (lib/core/constants/
 * app_colors.dart), so the site and the product look like one thing.
 *
 * There are no transitions or animations anywhere in this file, on
 * purpose. The app itself is built to a hard no-animation rule and the
 * site keeps to it: the deck swaps chapters instantly, the way the app
 * swaps screens.
 */

:root {
  --bg: #0f1117;
  --surface: #181b24;
  --card: #1f2330;
  --line: #2e3442;
  --ink: #f2f4f8;
  --muted: #a2abbd;
  --dim: #6f7a90;

  --brand: #5b6cff;
  --brand-dim: #4a58d9;
  --teal: #00c2a8;
  --ok: #34c759;
  --warn: #ffa726;
  --danger: #ff5c5c;

  --topbar-h: 64px;
  --rail-w: 210px;
  --radius: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  /* Nothing here is meant to scroll sideways; a stray wide element on
     a 320px phone should be clipped, not turn the whole page into a
     horizontal scroller with every heading cut off. */
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: .5rem .9rem;
  border-radius: 8px;
}

/* ---------------------------------------------------------------- */
/* Top bar — the two calls to action live here and never scroll away */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(15, 17, 23, .92);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: 1.05rem;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  color: #fff;
  font-weight: 800;
}

.brand-accent { color: var(--brand); }

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .6rem;
}

/* ---------------------------------------------------------------- */
/* Buttons                                                          */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* No flex gap: every button here is plain text, and a gap would sit
     on top of the ordinary space inside the label — "Download  for
     Windows" with a visible hole in it. Labels carry their own
     non-breaking space where they need one. */
  gap: 0;
  padding: .55rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: .93rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-solid { background: var(--brand); color: #fff; }
.btn-solid:hover { background: var(--brand-dim); }

.btn-outline { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); }

.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }

.btn-lg { padding: .8rem 1.4rem; font-size: 1rem; border-radius: 12px; }

.btn:focus-visible,
.rail button:focus-visible,
.hud-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---------------------------------------------------------------- */
/* Chapter rail                                                     */

.rail {
  position: fixed;
  top: var(--topbar-h);
  bottom: 0;
  left: 0;
  width: var(--rail-w);
  padding: 1.6rem 0 1.6rem 1.4rem;
  overflow: auto;
  z-index: 20;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.rail button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .42rem .5rem;
  background: none;
  border: 0;
  border-left: 2px solid var(--line);
  color: var(--dim);
  font: inherit;
  font-size: .84rem;
  text-align: left;
  cursor: pointer;
}

.rail button:hover { color: var(--muted); }

.rail button[aria-current="true"] {
  color: var(--ink);
  border-left-color: var(--brand);
  font-weight: 600;
}

.rail .num {
  font-variant-numeric: tabular-nums;
  font-size: .72rem;
  color: var(--dim);
}

.rail button[aria-current="true"] .num { color: var(--brand); }

/* ---------------------------------------------------------------- */
/* Deck                                                             */

.deck { padding-left: var(--rail-w); }

.slide {
  display: none;
  /* Full viewport including the padding (border-box), so a chapter
     always fills the screen exactly and its content centres between
     the top bar and the HUD instead of riding high. */
  min-height: 100vh;
  padding: calc(var(--topbar-h) + 1.5rem) clamp(1.2rem, 4vw, 3.5rem) 5rem;
  align-items: center;
}

.slide.current { display: flex; }

.slide-inner {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.slide-inner-center { grid-template-columns: minmax(0, 1fr); }

.copy { max-width: 46ch; }
.copy-center { max-width: 60ch; margin: 0 auto; text-align: center; }

.chapter-no {
  display: block;
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  margin-bottom: .6rem;
}

.eyebrow {
  margin: 0 0 .8rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 800;
}

h2 {
  margin: 0 0 .9rem;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.14;
  letter-spacing: -.025em;
  font-weight: 750;
}

.lede { margin: 0 0 1.4rem; color: var(--muted); font-size: 1.03rem; }

.points, .proof { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }

.points li, .proof li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: .95rem;
}

.points li::before, .proof li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--brand);
}

.points b, .proof strong { color: var(--ink); font-weight: 650; }

.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0 0 1.4rem; }
.cta-row-center { justify-content: center; }

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .9em;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .05em .35em;
}

.fineprint { color: var(--dim); font-size: .86rem; margin: 0; }

.end-grid {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  text-align: left;
}

.end-grid > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.end-grid b { display: block; font-size: .95rem; margin-bottom: .25rem; }
.end-grid span { color: var(--muted); font-size: .88rem; }
.end-grid a { color: var(--brand); }

/* ---------------------------------------------------------------- */
/* The mock screens                                                 */

.stage { display: flex; justify-content: center; }

.mock {
  width: 100%;
  max-width: 620px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.mock-lg { max-width: 680px; }

.mock-bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem .9rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.mock-bar i:first-child { background: #3c4252; }
.mock-bar span { margin-left: .6rem; font-size: .8rem; color: var(--muted); }

.mock-body { display: flex; min-height: 260px; }

.mock-side {
  width: 54px;
  padding: .8rem .5rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.mock-side span { height: 8px; border-radius: 4px; background: var(--line); }
.mock-side span.on { background: var(--brand); }

.mock-main { flex: 1; padding: .9rem; display: flex; flex-direction: column; gap: .8rem; min-width: 0; }

.mock-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .6rem; }

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .6rem .7rem;
}

.kpi b { display: block; font-size: 1.02rem; letter-spacing: -.01em; }
.kpi small { color: var(--dim); font-size: .72rem; }

.mock-rows { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }

.row {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr .8fr;
  gap: .5rem;
  padding: .5rem .7rem;
  font-size: .82rem;
  border-top: 1px solid var(--line);
}

.row:first-child { border-top: 0; }
.row span:last-child { text-align: right; }
.row.head { background: var(--card); color: var(--dim); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.row .ok { color: var(--ok); }
.row .warn { color: var(--warn); }
.row .danger { color: var(--danger); }

.mock-search {
  padding: .55rem .7rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--dim);
  font-size: .82rem;
}

.mock-pane {
  width: 168px;
  border-left: 1px solid var(--line);
  padding: .9rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.pane-total { background: var(--card); border-radius: var(--radius-sm); padding: .6rem .7rem; }
.pane-total small { display: block; color: var(--dim); font-size: .7rem; }
.pane-total b { font-size: 1.1rem; }

.pane-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .42rem .6rem;
  font-size: .8rem;
  color: var(--muted);
}

.pane-btn.ghost { border-style: dashed; }

.pane-cta {
  margin-top: auto;
  background: var(--brand);
  color: #fff;
  text-align: center;
  border-radius: 10px;
  padding: .55rem;
  font-size: .85rem;
  font-weight: 650;
}

.chart { display: flex; align-items: flex-end; gap: .45rem; height: 96px; padding: 0 .2rem; }

.chart span {
  flex: 1;
  background: linear-gradient(180deg, var(--brand), rgba(91, 108, 255, .25));
  border-radius: 4px 4px 0 0;
}

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }

.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .55rem;
}

.tile span { display: block; height: 44px; border-radius: 8px; background: var(--line); margin-bottom: .4rem; }
.tile small { display: block; font-size: .78rem; color: var(--muted); }
.tile b { font-size: .85rem; color: var(--teal); }

.status-line {
  padding: .45rem .7rem;
  border-radius: 999px;
  font-size: .8rem;
  align-self: flex-start;
}

.status-line.offline { background: rgba(255, 167, 38, .14); color: var(--warn); }

/* ---------------------------------------------------------------- */
/* HUD                                                              */

.hud {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1.1rem;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .45rem .8rem;
  background: rgba(24, 27, 36, .94);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hud-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.hud-btn:disabled { opacity: .35; cursor: default; }
.hud-count { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hud-count b { color: var(--ink); }
.hud-hint { font-size: .75rem; color: var(--dim); border-left: 1px solid var(--line); padding-left: .7rem; }

/* ---------------------------------------------------------------- */
/* Download page                                                    */

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 3rem) 1.2rem 4rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2rem);
  margin-bottom: 1.2rem;
}

.panel h2 { font-size: 1.2rem; margin: 0 0 .6rem; }
.panel h3 { font-size: .98rem; margin: 0 0 .4rem; }
.panel p { color: var(--muted); margin: 0 0 .8rem; }
.panel b { color: var(--ink); }

/* A platform card's title line: the name, and what that platform is
   for, so the two downloads are told apart at a glance. */
.panel-head {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}

.panel-head h2 { margin: 0; }

.tag {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--teal);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .12rem .55rem;
}

.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin: 1rem 0; }
.meta div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .8rem; }
.meta small { display: block; color: var(--dim); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.meta b { font-size: .98rem; }

.hash {
  display: block;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .74rem;
  color: var(--muted);
  word-break: break-all;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .7rem;
}

.notes { margin: .6rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .92rem; }

/* ---------------------------------------------------------------- */
/* Narrow screens: the deck stops being a deck and becomes a page.  */

@media (max-width: 1000px) {
  .rail, .hud { display: none; }
  .deck { padding-left: 0; }

  .slide,
  .slide.current {
    display: block;
    min-height: 0;
    padding: 2.5rem clamp(1rem, 5vw, 2rem);
    border-bottom: 1px solid var(--line);
  }

  .slide:first-child { padding-top: calc(var(--topbar-h) + 2rem); }

  .slide-inner { grid-template-columns: minmax(0, 1fr); }
  .copy { max-width: none; }
  .stage { margin-top: 1.6rem; }
  .mock-pane { display: none; }
}

@media (max-width: 560px) {
  /* Both calls to action stay. A phone visitor is exactly the person
     who needs the sign-in link, and folding one into a menu is how a
     landing page loses the visit — they only get smaller, and the
     download button loses the words it can do without. */
  .topbar { gap: .5rem; padding: 0 .8rem; }
  .top-actions { gap: .35rem; }
  .btn { padding: .45rem .7rem; font-size: .82rem; }
  .topbar .hide-sm { display: none; }
  .brand-name { font-size: .95rem; }
  .mock-side { display: none; }
}
