/* ==========================================================================
   NabixSoft — design tokens
   Palette pulled from the wordmark: invoice-blue gradient + ledger teal.
   Type: Space Grotesk (display) / Inter (body) / IBM Plex Mono (figures).
   ========================================================================== */

:root {
  color-scheme: light;

  --ink: #0e1526;
  --ink-soft: #3a4256;
  --muted: #6b7285;
  --line: #e1e5ef;
  --line-soft: #edf0f7;
  --paper: #ffffff;
  --canvas: #f5f7fc;

  --blue-500: #4a78f0;
  --blue-700: #2542a8;
  --blue-900: #182d78;
  --teal-500: #34c6da;
  --teal-600: #1ea8bc;

  --focus: #1a2f8f;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-card: 0 1px 2px rgba(14, 21, 38, 0.04), 0 12px 28px -16px rgba(20, 32, 76, 0.18);
  --shadow-lift: 0 20px 44px -20px rgba(20, 32, 76, 0.32);

  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue-700);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------------------------------- Nav ---------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: var(--font-display);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14.5px;
}

.nav-links a.is-active {
  color: var(--blue-700);
}

.nav-links a:hover {
  text-decoration: none;
  color: var(--blue-700);
}

.nav-toggle {
  display: none;
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 64px 16px auto 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lift);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
  }

  .nav-links a {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
  }

  .nav-links a:hover {
    background: var(--line-soft);
  }

  .nav-toggle:checked ~ .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-toggle-label {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--line);
    cursor: pointer;
  }

  .nav-toggle-label svg {
    width: 18px;
    height: 18px;
  }
}

@media (min-width: 721px) {
  .nav-toggle-label {
    display: none;
  }
}

/* --------------------------------- Hero ---------------------------------- */

.hero {
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 420px;
  background: radial-gradient(60% 100% at 20% 0%, rgba(74, 120, 240, 0.14), transparent 70%),
    radial-gradient(50% 100% at 85% 10%, rgba(52, 198, 218, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--blue-700);
  background: #eef2ff;
  border: 1px solid #dbe4ff;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-500);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--ink);
}

.hero-copy {
  max-width: 520px;
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 30px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-card);
}

.btn-primary:hover {
  background: var(--blue-900);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--blue-700);
  color: var(--blue-700);
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13.5px;
}

/* ---------------------------- Ledger hero visual -------------------------- */

.ledger {
  background: linear-gradient(160deg, var(--blue-700), var(--blue-900));
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lift);
  color: #fff;
  position: relative;
}

.ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ledger-head .badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 4px 9px;
  border-radius: 999px;
}

.ledger-head strong {
  font-family: var(--font-display);
  font-size: 15px;
}

.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateX(-6px);
  animation: rowIn 0.5s ease forwards;
}

.ledger-row .name {
  font-size: 14px;
  font-weight: 600;
}

.ledger-row .item {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.68);
}

.ledger-row .amt {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.ledger-row:nth-child(2) { animation-delay: 0.05s; }
.ledger-row:nth-child(3) { animation-delay: 0.15s; }
.ledger-row:nth-child(4) { animation-delay: 0.25s; }

@keyframes rowIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ledger-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.28);
}

.ledger-total .label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.ledger-total .total {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
}

.ledger-stamp {
  position: absolute;
  right: 22px;
  bottom: -16px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-500);
  color: #072a30;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  box-shadow: 0 10px 20px -8px rgba(30, 168, 188, 0.5);
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .ledger {
    margin-top: 8px;
  }
}

/* ------------------------------- Sections -------------------------------- */

.section {
  padding: 64px 0;
}

.section-tight {
  padding: 40px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.section-head .eyebrow {
  margin-bottom: 14px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 8px;
  letter-spacing: -0.005em;
}

p {
  margin: 0 0 14px;
}

.lede {
  font-size: 17px;
  color: var(--ink-soft);
}

/* ---------------------------------- Apps --------------------------------- */

.apps-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper);
}

.app-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
  transition: background 0.14s ease;
}

.apps-list a.app-row:hover {
  background: var(--line-soft);
  text-decoration: none;
}

.app-row:last-child {
  border-bottom: none;
}

.app-row .index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.app-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: block;
}

.app-copy .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  color: var(--ink);
  margin-bottom: 2px;
}

.app-copy .desc {
  font-size: 14px;
  color: var(--muted);
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-pill.live {
  background: #e7f8ea;
  color: #17803d;
  border: 1px solid #c9edd1;
}

.status-pill.soon {
  background: #eef0f6;
  color: var(--muted);
  border: 1px solid var(--line);
}

.app-row .arrow {
  color: var(--muted);
  font-size: 18px;
}

@media (max-width: 640px) {
  .app-row {
    grid-template-columns: 40px 1fr;
    grid-template-areas:
      "icon name"
      "icon status";
    row-gap: 4px;
  }
  .app-row .index {
    display: none;
  }
  .app-icon {
    grid-area: icon;
  }
  .app-copy {
    grid-area: name;
  }
  .status-pill {
    grid-area: status;
    justify-self: start;
  }
  .app-row .arrow {
    display: none;
  }
}

/* --------------------------------- Cards --------------------------------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
}

.card .icon-chip {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #eef2ff;
  color: var(--blue-700);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.card p {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 14.5px;
}

@media (max-width: 780px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------ Product page ------------------------------ */

.store-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 9px 16px 9px 14px;
  font-weight: 600;
}

.appstore-badge svg {
  width: 22px;
  height: 22px;
}

.appstore-badge .lines {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.appstore-badge .lines small {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.appstore-badge .lines strong {
  font-size: 15.5px;
  font-family: var(--font-display);
}

.pill-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.content-card {
  max-width: 860px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px 34px;
}

.content-card ul {
  padding-left: 22px;
}

.content-card li {
  margin-bottom: 8px;
}

.notice {
  border-left: 4px solid var(--blue-700);
  background: #eef2ff;
  padding: 14px 16px;
  border-radius: 8px;
  margin: 20px 0;
}

/* ------------------------------ Feature blocks ---------------------------- */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 860px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}

.checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 15px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal-500);
}

.checklist li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  width: 8px;
  height: 5px;
  border-left: 2px solid #072a30;
  border-bottom: 2px solid #072a30;
  transform: rotate(-45deg);
}

/* Template chip gallery */

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.template-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
}

/* Stat strip (dashboard) */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stat {
  background: var(--paper);
  padding: 18px 16px;
}

.stat .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.stat .value {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.stat .value.up {
  color: #17803d;
}

.stat .value.down {
  color: #b3261e;
}

@media (max-width: 640px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Status chip row (estimate/invoice lifecycle) */

.status-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 18px;
}

.status-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
}

.status-chip.on {
  background: var(--blue-700);
  color: #fff;
  border-color: var(--blue-700);
}

/* Mini chart bars */

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 10px 4px 0;
}

.bar-chart .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--blue-500), var(--blue-700));
  border-radius: 6px 6px 2px 2px;
}

.bar-chart .bar.accent {
  background: linear-gradient(180deg, var(--teal-500), var(--teal-600));
}

/* QR mock */

.qr-mock {
  width: 92px;
  height: 92px;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 3px;
  flex: 0 0 auto;
}

.qr-mock span {
  background: var(--ink);
  border-radius: 1px;
}

.qr-mock span.off {
  background: transparent;
}

.payment-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.payment-card .lines strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  margin-bottom: 3px;
}

.payment-card .lines span {
  font-size: 13.5px;
  color: var(--muted);
}

/* --------------------------------- Footer -------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 30px;
  background: var(--paper);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
}

.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
}

.footer-bottom {
  color: var(--muted);
  font-size: 13.5px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 640px) {
  .hero {
    padding-top: 28px;
  }
  .section {
    padding: 44px 0;
  }
}
