/* ==========================================================================
   Khatian ERP — pitch site
   Design system: a digital ledger. Dark "ink" ground throughout; the ledger identity lives in
   the seal mark, Fraunces type, and the red/brass accent pair rather than a literal paper card —
   every screenshot sits in a dark glass "device window" (browser chrome, a colour glow, a live
   autoplay progress line) so it reads as real running software, not a printed page. See tokens
   below.
   ========================================================================== */

:root {
  /* ---- color: ledger tokens ---- */
  --ink: #10161b;
  --ink-2: #161d24;
  --ink-3: #212b34;
  --paper: #f3ecda;
  --paper-2: #eae1c8;
  --paper-line: #d8cba3;
  --red: #b23a2e;
  --red-dark: #8e2c22;
  --brass: #c9a227;
  --green: #3f7d5c;
  --ink-text: #ede6d3;
  --ink-text-muted: #93a0ac;
  --paper-text: #241c14;
  --paper-text-muted: #6b5f4b;

  /* ---- type ---- */
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --container: 1180px;
}

* { box-sizing: border-box; }
/* Deliberately no `scroll-behavior: smooth` on html: combined with the lazy-loaded screenshots
   further down the page, an in-flight smooth scroll can have its target position recalculated
   mid-animation as images settle into their reserved box, landing on the wrong offset. An instant
   jump is one less thing that can go visibly wrong on a page whose whole job is to look right. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Stops the browser's own pull-to-refresh/rubber-band bounce at the top and bottom of the
     page on mobile — one of the more obvious "this is a website, not an app" tells. Horizontal
     overscroll (the edge-swipe back/forward gesture) is left alone. */
  overscroll-behavior-y: contain;
}

/* Removes the grey flash Android/iOS draw on every tap by default — buttons and links already
   have their own hover/:active feedback (see .btn:active, .tab-btn, etc.), so the native
   highlight only adds a web-page-y flicker on top of it. */
* { -webkit-tap-highlight-color: transparent; }

/* Kills the ~300ms tap delay mobile browsers otherwise insert to wait for a possible double-tap
   zoom, so every button/link responds the instant you lift your finger, not a beat later. */
a, button, summary { touch-action: manipulation; }

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

a { color: inherit; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  /* The env() addition only matters in landscape on a notched phone, where the safe area eats
     into the left/right edges — env() resolves to 0 everywhere else, so this is a no-op elsewhere. */
  padding: 0 calc(28px + env(safe-area-inset-right)) 0 calc(28px + env(safe-area-inset-left));
}

/* ---- utility: eyebrow / mono labels ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brass);
  opacity: 0.7;
}
.on-paper .eyebrow { color: var(--red); }
.on-paper .eyebrow::before { background: var(--red); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  color: inherit;
}

.section {
  padding: 108px 0;
  position: relative;
}
@media (max-width: 720px) {
  .section { padding: 72px 0; }
}

.section-head {
  max-width: 640px;
  margin: 0 0 56px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.section-head p {
  margin: 18px 0 0;
  color: var(--ink-text-muted);
  font-size: 17px;
  max-width: 52ch;
}
.on-paper .section-head p { color: var(--paper-text-muted); }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 22, 27, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav.is-scrolled { border-bottom-color: var(--ink-3); }
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top)) 0 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-text);
}
.brand-seal {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--brass);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand-name b { color: var(--brass); font-weight: 600; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 14.5px;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-text-muted);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink-text); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-toggle { display: none; }
/* Duplicate "Contact sales" link, shown only inside the mobile dropdown (below) — the header's
   own ghost button already covers it at desktop widths. */
.nav-links-contact { display: none; }

@media (max-width: 480px) {
  /* Ghost "Contact sales" + solid "Book a demo" + the hamburger icon don't fit next to the
     logo on a narrow phone — the dropdown carries the contact link instead.
     Specificity note: plain `.nav-contact-btn` ties with the later `.btn` rule (both 0,1,0) and
     loses on source order — the extra `.nav-cta` ancestor class breaks the tie. */
  .nav-cta .nav-contact-btn { display: none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--red);
  color: #fbf6ea;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 10px 24px -12px rgba(178,58,46,0.65);
}
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost {
  background: transparent;
  color: var(--ink-text);
  border-color: var(--ink-3);
}
.btn-ghost:hover { border-color: var(--ink-text-muted); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-arrow { transition: transform 0.15s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 84px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* faint ruled-ledger lines across the whole hero, very subtle */
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 47px,
    rgba(201, 162, 39, 0.055) 47px 48px
  );
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 75%, transparent);
  pointer-events: none;
}
.hero-inner {
  position: relative;
}
.hero-copy { max-width: 720px; }
.hero-copy .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 100px;
  padding: 7px 14px 7px 12px;
  margin-bottom: 26px;
}
.hero-copy .badge svg { width: 13px; height: 13px; }
.hero-copy h1 {
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 15ch;
}
.hero-copy h1 em {
  font-style: italic;
  color: var(--brass);
}
.hero-copy .lede {
  margin: 26px 0 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-text-muted);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 38px;
  flex-wrap: wrap;
}
.hero-proof {
  margin-top: 46px;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}
.hero-proof div {
  font-family: var(--font-mono);
}
.hero-proof strong {
  display: block;
  font-size: 22px;
  color: var(--ink-text);
  font-weight: 600;
}
.hero-proof span {
  font-size: 12px;
  color: var(--ink-text-muted);
  letter-spacing: 0.02em;
}

/* ---- the signature: a dark glass "device window" around every screenshot, not a paper card.
   The ledger identity lives in the seal mark, the type, and the brass/red accents instead — this
   component's job is to look like real software, running, not a printed page. ---- */
.device-frame {
  position: relative;
  background: linear-gradient(180deg, #1a2129, #12171c);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 60px 100px -35px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.07);
}
/* A soft, colour-shifting glow behind the frame is the one dramatic flourish — kept to the hero
   and reused (fainter) on every device-frame so the whole showcase reads as one system. */
.device-frame::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: -1;
  background:
    radial-gradient(closest-side, rgba(178, 58, 46, 0.38), transparent 70%) 15% 20%/55% 55% no-repeat,
    radial-gradient(closest-side, rgba(201, 162, 39, 0.28), transparent 70%) 85% 80%/55% 55% no-repeat;
  filter: blur(46px);
  opacity: 0.9;
}
.device-frame .chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.device-frame .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.device-frame .dot.r { background: #e0605a; }
.device-frame .dot.a { background: #e0b25a; }
.device-frame .dot.g { background: #5ab884; }
.device-frame .addr {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  padding: 5px 11px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-frame .live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7fd9a8;
  flex-shrink: 0;
}
.device-frame .live-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4fd486;
  box-shadow: 0 0 0 0 rgba(79, 212, 134, 0.6);
  animation: liveDotPulse 2s ease-out infinite;
}
@keyframes liveDotPulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 212, 134, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(79, 212, 134, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 212, 134, 0); }
}
.device-frame .shot { position: relative; line-height: 0; overflow: hidden; }
.device-frame .shot img { width: 100%; height: auto; display: block; }

/* Story-style autoplay progress line along the bottom edge of the hero device — the unmistakable
   "this is moving" signal, matching the tab-list progress bars further down the page. */
.device-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
}
.device-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--brass));
}
.device-progress span.is-filling { animation: heroFill var(--hero-ms, 2100ms) linear forwards; }
@keyframes heroFill { from { width: 0%; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .device-progress span.is-filling { animation: none; }
  .device-frame .live-badge i { animation: none; }
}

.device-frame-lg { border-radius: 16px; }
.device-frame-lg .chrome { padding: 17px 22px; gap: 9px; }
.device-frame-lg .dot { width: 12px; height: 12px; }
.device-frame-lg .addr { font-size: 14px; padding: 7px 14px; margin-left: 14px; }
.device-frame-lg .live-badge { font-size: 12px; }
.device-frame-lg::before { opacity: 1; }

/* Smaller variant for the spotlight grid — same glass-window language, sized for a card, and
   with only a faint glow (six of these on screen at once would be overpowering at full strength). */
.device-frame-sm .chrome { padding: 10px 12px; gap: 6px; }
.device-frame-sm .dot { width: 7px; height: 7px; }
.device-frame-sm .addr { font-size: 10px; padding: 4px 9px; margin-left: 8px; }
.device-frame-sm::before { opacity: 0.55; filter: blur(30px); }

/* ==========================================================================
   Outstanding-features spotlight grid
   ========================================================================== */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.spotlight-card h3 {
  font-size: 18px;
  margin: 20px 0 10px;
  line-height: 1.3;
}
.spotlight-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-text-muted);
}
.spotlight-card-list {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: 12px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.spotlight-card-list h3 { margin-top: 0; }
.chip-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.chip-list li {
  font-size: 14px;
  color: var(--ink-text-muted);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.chip-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
}
@media (max-width: 980px) {
  .spotlight-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .spotlight-grid { grid-template-columns: 1fr; }
}

.hero-shot {
  opacity: 0;
  transform: translateY(18px) rotate(1.4deg);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-shot.is-in { opacity: 1; transform: translateY(0) rotate(0deg); }

/* The full-bleed hero presentation: a large, wide device window under the headline, breaking past
   .wrap's 1180px content column on purpose — a 1.6:1 screenshot needs real width to read as
   dramatic, not a narrow slice squeezed into a side column next to the copy. Independent of .wrap
   (a sibling, not nested inside it) specifically so it isn't capped by that container's max-width. */
.hero-shot-full {
  position: relative;
  margin: 56px auto 0;
  max-width: 1560px;
  padding: 0 20px;
}

/* Subtle cursor-follow tilt on the hero device frame — the one "alive" hover moment on an
   otherwise mostly-static hero. Disabled entirely under prefers-reduced-motion (JS gate) and
   never applied on touch devices (no hover to drive it). */
#heroFrame {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---- hero auto-cycling screenshots: stacked, crossfaded, with a slow Ken Burns drift ---- */
.hero-cycle {
  position: relative;
  aspect-ratio: 1900 / 1187;
}
.hero-cycle img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1);
  /* Short on purpose: these are dense, text-heavy app screenshots, not photos — a slow crossfade
     leaves both images' text visibly overlapping ("ghosting") for a beat, which reads as a
     rendering glitch rather than a smooth dissolve. A quick cut avoids that window entirely. */
  transition: opacity 0.18s ease;
}
.hero-cycle img.is-active {
  opacity: 1;
  animation: kenBurns var(--hero-ms, 2100ms) ease-out forwards;
}
@keyframes kenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-cycle img.is-active { animation: none; }
}

.hero-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}
.hero-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: background 0.25s ease, transform 0.25s ease;
}
.hero-dots span.is-active { background: var(--brass); transform: scale(1.3); }

@media (max-width: 640px) {
  .hero-copy h1 { max-width: none; }
  .hero-shot-full { margin-top: 40px; padding: 0 14px; }
}

/* ==========================================================================
   Stat strip
   ========================================================================== */
.stat-strip {
  border-top: 1px solid var(--ink-3);
  border-bottom: 1px solid var(--ink-3);
  padding: 40px 0;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-grid .stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 600;
  color: var(--brass);
  letter-spacing: -0.02em;
}
.stat-grid .stat span {
  display: block;
  font-size: 13.5px;
  color: var(--ink-text-muted);
  margin-top: 6px;
  line-height: 1.4;
}
@media (max-width: 780px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
}

/* ==========================================================================
   Tab showcase
   ========================================================================== */
.showcase-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}
.tab-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 96px;
}
.tab-btn {
  position: relative;
  text-align: left;
  background: none;
  border: none;
  border-left: 2px solid var(--ink-3);
  color: var(--ink-text-muted);
  font-family: var(--font-body);
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  border-radius: 0 6px 6px 0;
  overflow: hidden;
}
/* Story-style autoplay progress bar — fills over the dwell time while a tab is active and
   autoplay hasn't been stopped by user interaction. JS toggles .is-filling to (re)start the
   animation; width resets to 0 whenever the class is removed (tab change, autoplay pause). */
.tab-btn .tprogress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background: var(--red);
}
.tab-btn.is-filling .tprogress {
  animation: tabFill var(--tab-ms, 5000ms) linear forwards;
}
@keyframes tabFill {
  from { width: 0%; }
  to { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tab-btn.is-filling .tprogress { animation: none; width: 100%; }
}
.tab-btn .tnum {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--brass);
  opacity: 0.7;
  margin-bottom: 6px;
}
.tab-btn .tname {
  display: block;
  font-size: 16.5px;
  font-weight: 600;
  color: inherit;
  font-family: var(--font-display);
}
.tab-btn:hover { color: var(--ink-text); background: rgba(255,255,255,0.02); }
.tab-btn.is-active {
  border-left-color: var(--red);
  color: var(--ink-text);
  background: rgba(178, 58, 46, 0.08);
}
.tab-btn.is-active .tnum { opacity: 1; }

.tab-panels { position: relative; min-height: 340px; }
.tab-panel {
  display: none;
  animation: panelIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab-panel.is-active { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,0.85fr); gap: 40px; align-items: center; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.tab-panel-copy h3 {
  font-size: 24px;
  margin-bottom: 16px;
}
.tab-panel-copy ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tab-panel-copy li {
  display: flex;
  gap: 12px;
  color: var(--ink-text-muted);
  font-size: 15px;
  line-height: 1.55;
}
.tab-panel-copy li::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--red);
}

@media (max-width: 900px) {
  .showcase-layout { grid-template-columns: 1fr; }
  .tab-list {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    /* Fades the right edge so a cut-off tab reads as "more to scroll to", not just clipped —
       there was nothing hinting this row scrolls at all before this. Left edge is left solid
       since the first tab never has anything hidden behind it. */
    mask-image: linear-gradient(to right, black calc(100% - 28px), transparent);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent);
  }
  .tab-btn { border-left: none; border-bottom: 2px solid var(--ink-3); flex-shrink: 0; border-radius: 6px 6px 0 0; }
  .tab-btn.is-active { border-bottom-color: var(--red); }
  .tab-panel.is-active { grid-template-columns: 1fr; }
  .tab-panel-copy { order: 2; }
}

/* ==========================================================================
   "Made for local ledger" feature cards
   ========================================================================== */
.section.on-paper {
  background: var(--paper);
  color: var(--paper-text);
}
.on-paper .section-head p { color: var(--paper-text-muted); }

.tab-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  overflow: hidden;
}
.tab-card {
  padding: 30px 24px;
  border-left: 1px solid var(--paper-line);
  position: relative;
  background: var(--paper);
  transition: background 0.2s ease;
}
.tab-card:first-child { border-left: none; }
.tab-card:hover { background: var(--paper-2); }
.tab-card .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--red);
  padding: 4px 9px;
  border-radius: 3px;
  margin-bottom: 16px;
}
.tab-card h4 {
  font-family: var(--font-display);
  font-size: 17px;
  margin-bottom: 10px;
}
.tab-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--paper-text-muted);
  line-height: 1.55;
}
@media (max-width: 900px) {
  .tab-card-grid { grid-template-columns: repeat(2, 1fr); }
  .tab-card:nth-child(3) { border-left: none; }
  .tab-card:nth-child(odd) { border-left: none; }
}
@media (max-width: 560px) {
  .tab-card-grid { grid-template-columns: 1fr; }
  .tab-card { border-left: none !important; border-top: 1px solid var(--paper-line); }
  .tab-card:first-child { border-top: none; }
}

/* Dark-background variant of the same tab-card component, for sections that sit on --ink rather
   than --paper (the "Who it's for" grid) — same shape, different tokens, so this one component
   works on both backgrounds instead of forking into two near-duplicate grids. */
.tab-card-grid-dark { border-color: var(--ink-3); }
.tab-card-dark {
  background: var(--ink-2);
  border-left-color: var(--ink-3);
}
.tab-card-dark:hover { background: var(--ink-3); }
.tab-card-dark .tag { background: var(--brass); color: var(--ink); }
.tab-card-dark h4 { color: var(--ink-text); }
.tab-card-dark p { color: var(--ink-text-muted); }
@media (max-width: 560px) {
  .tab-card-dark { border-top-color: var(--ink-3) !important; }
}

/* ==========================================================================
   Mobile showcase
   ========================================================================== */
.mobile-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 50px;
  align-items: start;
}
.mobile-showcase > .reveal:first-child { padding-top: 6px; }
.mobile-frames {
  display: flex;
  gap: 28px;
}
.phone-frame {
  width: 210px;
  border-radius: 26px;
  background: linear-gradient(180deg, #1a2129, #12171c);
  padding: 12px 10px;
  box-shadow: 0 40px 70px -28px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.07);
  position: relative;
}
.phone-frame::before {
  content: "";
  position: absolute;
  inset: -16%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(178, 58, 46, 0.28), transparent 70%) 30% 25%/70% 70% no-repeat;
  filter: blur(38px);
}
.phone-frame:nth-child(2) { margin-top: 34px; }
.phone-frame .notch {
  width: 46px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 auto 10px;
}
.phone-frame .shot { border-radius: 14px; overflow: hidden; line-height: 0; }
.phone-frame .shot img { width: 100%; height: auto; display: block; }
@media (max-width: 900px) {
  .mobile-showcase { grid-template-columns: 1fr; }
  .mobile-frames { justify-content: center; }
}
@media (max-width: 560px) {
  .mobile-frames { flex-direction: column; align-items: center; }
  .phone-frame:nth-child(2) { margin-top: 0; }
}

/* ==========================================================================
   Comparison: old ledger vs new
   ========================================================================== */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.compare-col {
  border-radius: 8px;
  padding: 32px 30px;
  position: relative;
}
.compare-col.old {
  background: linear-gradient(180deg, #1a2028, #161c22);
  border: 1px solid var(--ink-3);
  opacity: 0.88;
}
.compare-col.new {
  background: var(--paper);
  color: var(--paper-text);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}
.compare-col h3 {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.compare-col.old h3 { color: var(--ink-text-muted); }
.compare-col.new h3 { color: var(--red); }
.compare-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.compare-col li {
  font-size: 15px;
  line-height: 1.5;
  padding-left: 22px;
  position: relative;
}
.compare-col.old li { color: #7d8791; }
.compare-col.old li::before {
  content: "×";
  position: absolute;
  left: 0;
  top: -2px;
  color: #6a747e;
  font-size: 17px;
}
.compare-col.new li { color: var(--paper-text); }
.compare-col.new li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 700;
}
@media (max-width: 780px) {
  .compare-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FAQ — native <details>/<summary>, no JS needed: keyboard-operable and
   screen-reader-friendly for free.
   ========================================================================== */
.faq-list {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: 10px;
  padding: 4px 22px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 30px 18px 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink-text);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 16px;
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--brass);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; border-radius: 4px; }
.faq-item p {
  margin: 0 0 20px;
  color: var(--ink-text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 62ch;
}

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-section {
  text-align: center;
  padding: 120px 0;
  position: relative;
}
.cta-seal {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1.5px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  color: var(--brass);
}
.cta-section h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  max-width: 18ch;
  margin: 0 auto;
  line-height: 1.15;
}
.cta-section p {
  color: var(--ink-text-muted);
  font-size: 17px;
  max-width: 48ch;
  margin: 22px auto 0;
}
.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 38px;
  flex-wrap: wrap;
}
.cta-contact {
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink-text-muted);
}
.cta-contact a { color: var(--brass); text-decoration: none; }
.cta-contact a:hover { text-decoration: underline; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--ink-3);
  padding: 44px 0 calc(44px + env(safe-area-inset-bottom));
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-text-muted); }
.footer-links { display: flex; gap: 26px; font-size: 13.5px; }
.footer-links a { color: var(--ink-text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink-text); }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ---- staggered group reveal ----
   Every .reveal on the page used to animate identically, so a 4-card grid slid
   in as one slab. Here the *children* animate instead, each offset by a delay
   JS writes onto them (see the observer in app.js), so a row of cards arrives
   in sequence. Elements carrying .reveal-group deliberately do NOT also carry
   .reveal — the stagger replaces the parent's own fade rather than stacking
   with it, which read as muddy when both ran at once. */
.reveal-group > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-group.is-in > * { opacity: 1; transform: translateY(0); }

/* ---- ledger-rule section divider ----
   A brass hairline that draws left-to-right as its section arrives, carrying
   the ruled-paper motif down the page. Sections were previously separated by
   nothing but padding. */
.rule {
  height: 1px;
  margin-bottom: 46px;
  background: linear-gradient(to right, var(--brass), rgba(201, 162, 39, 0.05));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.5;
}
.rule.is-in { transform: scaleX(1); }

/* Printing (or saving as PDF) never scrolls the page, so an element gated on
   IntersectionObserver would print blank — force everything visible. */
@media print {
  .reveal { opacity: 1!important; transform: none!important; }
  .reveal-group > * { opacity: 1!important; transform: none!important; }
  .hero-shot { opacity: 1!important; transform: none!important; }
  .hl-i { transform: none!important; opacity: 1!important; }
  .nav { position: static; }
}

/* ---- focus visibility ---- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ==========================================================================
   Mobile nav
   ========================================================================== */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex;
    background: none;
    border: 1px solid var(--ink-3);
    border-radius: 6px;
    color: var(--ink-text);
    padding: 9px 11px;
    cursor: pointer;
  }
  .nav-links-contact { display: block; }
  .nav-links.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--ink-2);
    border-bottom: 1px solid var(--ink-3);
    padding: 20px 28px 26px;
    gap: 18px;
  }
}

/* ==========================================================================
   Hero cinematic entrance
   Orchestrated on load: badge -> headline phrases -> lede -> buttons -> proof
   -> device. Driven by one .is-loaded class on .hero (set in app.js); each
   element carries its own animation-delay so the order lives here in CSS
   rather than in a chain of JS timers.

   Every start state is scoped to `html.js` — that class is set by an inline
   script in <head> before first paint, so if JS never runs, nothing is ever
   hidden. Getting this wrong is the classic entrance-animation bug: a
   permanently invisible headline.
   ========================================================================== */
.hl {
  display: block;
  overflow: hidden;
  /* Room for descenders (the 'g' in "page") that overflow:hidden would clip,
     cancelled out again so the layout box is unchanged. */
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.js .hero .hl-i { display: block; transform: translateY(105%); }
.js .hero .badge,
.js .hero .lede,
.js .hero .hero-actions,
.js .hero .hero-proof { opacity: 0; }

.hero.is-loaded .hl-i { animation: hlRise 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.hero.is-loaded .hl:nth-child(1) .hl-i { animation-delay: 0.16s; }
.hero.is-loaded .hl:nth-child(2) .hl-i { animation-delay: 0.29s; }

.hero.is-loaded .badge        { animation: heroIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.04s forwards; }
.hero.is-loaded .lede         { animation: heroIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.46s forwards; }
.hero.is-loaded .hero-actions { animation: heroIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.58s forwards; }
.hero.is-loaded .hero-proof   { animation: heroIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.68s forwards; }

@keyframes hlRise { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* The device frame's settle-in is the sequence's last beat. It used to fire on
   its own 160ms timer, independent of everything else. */
.hero-shot { transition-delay: 0.78s; }

@media (prefers-reduced-motion: reduce) {
  /* Skip the entrance outright — land on the end state immediately rather than
     animating fast, so nothing can be left mid-flight or invisible. */
  .js .hero .hl-i,
  .js .hero .badge,
  .js .hero .lede,
  .js .hero .hero-actions,
  .js .hero .hero-proof { opacity: 1; transform: none; animation: none; }
  .hero-shot { transition-delay: 0s; }
  .reveal-group > * { transition-delay: 0s !important; }
}

/* ==========================================================================
   Scroll-linked hero device
   Continuous, scroll-driven motion (not a binary trigger) via the native CSS
   scroll timeline. Behind @supports: browsers without it (Safari/Firefox at
   time of writing) simply keep the static frame — no scroll listener, no rAF
   loop, nothing to jank. Deliberately no pinning/scroll-jacking.
   ========================================================================== */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
    .hero-shot-full .device-frame {
      animation: deviceSettle linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 38%;
    }
    @keyframes deviceSettle {
      from { transform: translateY(46px) scale(0.965); }
      to   { transform: translateY(0) scale(1); }
    }
  }
}

/* ==========================================================================
   Ledger tape — the signature
   The 31 report names running past like adding-machine tape. Two tracks in
   opposite directions so it reads as machine tape rather than a logo carousel.
   Pure CSS: the list is duplicated in the markup, so translating one full list
   width loops seamlessly.
   ========================================================================== */
.tape-band {
  padding: 84px 0;
  border-top: 1px solid var(--ink-3);
  border-bottom: 1px solid var(--ink-3);
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, rgba(201,162,39,0.05) 31px 32px),
    var(--ink);
  overflow: hidden;
}
.tape-lead {
  margin: 0 0 34px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 27px);
  color: var(--ink-text);
  max-width: 30ch;
  line-height: 1.3;
}
.tape-lead .eyebrow { display: flex; }

.tape {
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* Fade both edges so names enter and leave rather than being chopped off. */
  mask-image: linear-gradient(to right, transparent, black 9%, black 91%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 9%, black 91%, transparent);
}
.tape-track {
  display: flex;
  width: max-content;
  animation: tapeRun 46s linear infinite;
}
.tape-track-reverse { animation-direction: reverse; }
.tape:hover .tape-track { animation-play-state: paused; }

.tape-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}
.tape-list li {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink-text-muted);
  white-space: nowrap;
  padding: 0 26px;
  display: flex;
  align-items: center;
}
.tape-list li::after {
  content: "৳";
  margin-left: 26px;
  color: var(--brass);
  opacity: 0.55;
}

/* Translating exactly -50% lands the duplicate list precisely where the
   original started, so the loop has no visible seam. */
@keyframes tapeRun {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  /* No motion at all — the tracks become plain scrollable rows the reader
     controls, rather than animating (however briefly) on their own. */
  .tape-track { animation: none; }
  .tape { overflow-x: auto; }
}

@media (max-width: 640px) {
  .tape-band { padding: 60px 0; }
  .tape-list li { font-size: 13px; padding: 0 18px; }
  .tape-list li::after { margin-left: 18px; }
  .tape-track { animation-duration: 34s; }
}
