/* Sahnivas site. Colours, radii and type come from tokens.css (packages/design-tokens). */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--sn-font-family);
  font-size: var(--sn-font-body-size);
  line-height: 1.55;
  color: var(--sn-color-text);
  background: var(--sn-color-canvas);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--sn-color-accent-strong);
  outline-offset: 3px;
  border-radius: 6px;
}
.wrap {
  width: min(100% - 32px, 1180px);
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--sn-color-surface);
  padding: 8px 12px;
}

/* ── Header ─────────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--sn-color-canvas) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--sn-color-border) 60%, transparent);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--sn-color-ink);
  color: var(--sn-color-accent);
  font-weight: 800;
}
.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav a {
  text-decoration: none;
  color: var(--sn-color-text-muted);
  padding: 10px 12px;
  border-radius: var(--sn-radius-pill);
  font-weight: 500;
}
.nav a.btn-ink {
  white-space: nowrap;
  color: var(--sn-color-on-ink);
  background: var(--sn-color-ink);
}
.nav a:hover:not(.btn),
.nav a[aria-current='page'] {
  color: var(--sn-color-text);
  background: var(--sn-color-surface-muted);
}
@media (max-width: 720px) {
  .nav .hide-sm {
    display: none;
  }
}

/* ── Buttons & pills ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--sn-radius-pill);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease-out, background 0.2s ease-out;
}
.btn:active {
  transform: scale(0.97);
}
.btn-ink {
  background: var(--sn-color-ink);
  color: var(--sn-color-on-ink);
}
.btn-accent {
  background: var(--sn-color-accent);
  color: var(--sn-color-on-accent);
}
.btn-outline {
  border-color: var(--sn-color-border-strong);
  color: var(--sn-color-text);
}
.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--sn-radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--sn-color-accent-soft);
  color: var(--sn-color-accent-strong);
}
.pill-outline {
  background: transparent;
  border: 1px solid var(--sn-color-border);
  color: var(--sn-color-text-muted);
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
  padding: 56px 0 32px;
}
.hero-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 16px 0 18px;
}
h1 em {
  font-style: normal;
  color: var(--sn-color-accent-strong);
}
.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--sn-color-text-muted);
  max-width: 34em;
  margin: 0 0 28px;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

/* ── Phone frame with the live app ──────────────────── */
.phone-stage {
  display: grid;
  justify-items: center;
  gap: 16px;
}
.phone {
  --w: 390px;
  --h: 844px;
  --scale: 0.78;
  --status: 48px;
  width: calc(var(--w) * var(--scale) + 28px);
  height: calc(var(--h) * var(--scale) + 28px);
  padding: 14px;
  border-radius: 54px;
  background: var(--sn-color-ink);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--sn-color-ink) 70%, #fff),
    0 40px 80px -30px rgba(40, 20, 80, 0.45);
  position: relative;
}
.phone::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 50%;
  translate: -50% 0;
  width: 96px;
  height: 26px;
  border-radius: 20px;
  background: #000;
  z-index: 2;
  pointer-events: none;
}
.phone-screen {
  width: calc(var(--w) * var(--scale));
  height: calc(var(--h) * var(--scale));
  border-radius: 40px;
  overflow: hidden;
  background: var(--sn-color-canvas);
  position: relative;
}
/* A status bar under the notch, like a real phone; the app gets the rest of the screen. */
.phone-status {
  height: calc(var(--status) * var(--scale));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(28px * var(--scale));
  font-size: 12px;
  font-weight: 600;
  color: var(--sn-color-text);
}
.phone-status svg {
  width: 30px;
  height: 11px;
}
.phone iframe {
  width: var(--w);
  height: calc(var(--h) - var(--status));
  border: 0;
  transform: scale(var(--scale));
  transform-origin: 0 0;
  background: var(--sn-color-canvas);
}
.phone-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--sn-color-text-subtle);
  font-size: 14px;
}
@media (max-width: 420px) {
  .phone {
    --scale: 0.7;
  }
}
.phone-note {
  font-size: 13px;
  color: var(--sn-color-text-muted);
  text-align: center;
  max-width: 330px;
  margin: 0;
}

/* ── Sections ───────────────────────────────────────── */
section {
  padding: 56px 0;
  scroll-margin-top: 72px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sn-color-accent-strong);
  margin: 0 0 10px;
}
h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 14px;
}
h3 {
  font-size: var(--sn-font-title-size);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 8px;
}
.muted {
  color: var(--sn-color-text-muted);
}
.grid-3 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid-2 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.card {
  background: var(--sn-color-surface);
  border-radius: var(--sn-radius-xl);
  padding: 28px;
}
.card-ink {
  background: var(--sn-color-ink);
  color: var(--sn-color-on-ink);
}
.card-ink .muted {
  color: var(--sn-color-on-ink-muted);
}
.card-accent {
  background: var(--sn-color-accent);
  color: var(--sn-color-on-accent);
}
.card-accent .muted {
  color: color-mix(in srgb, var(--sn-color-on-accent) 80%, transparent);
}
.icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--sn-radius-pill);
  background: var(--sn-color-accent-soft);
  color: var(--sn-color-accent-strong);
  margin-bottom: 18px;
}
.icon svg {
  width: 22px;
  height: 22px;
}
.card-ink .icon {
  background: color-mix(in srgb, var(--sn-color-on-ink) 12%, transparent);
  color: var(--sn-color-accent);
}
ul.ticks {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}
ul.ticks li {
  padding-left: 26px;
  position: relative;
}
ul.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sn-color-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-5' fill='none' stroke='%231C1C1E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}

/* ── Admin showcase ─────────────────────────────────── */
.browser {
  border-radius: var(--sn-radius-xl);
  background: var(--sn-color-surface);
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(40, 20, 80, 0.5);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--sn-color-surface-muted);
}
.browser-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--sn-color-border);
}
.browser-bar span {
  margin-left: 10px;
  flex: 1;
  font-size: 13px;
  color: var(--sn-color-text-muted);
  background: var(--sn-color-surface);
  border-radius: var(--sn-radius-pill);
  padding: 5px 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.browser img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

/* ── Demo accounts ──────────────────────────────────── */
.creds {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.cred {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--sn-radius-md);
  background: color-mix(in srgb, var(--sn-color-on-ink) 8%, transparent);
}
.card:not(.card-ink) .cred {
  background: var(--sn-color-surface-muted);
}
.cred b {
  font-weight: 600;
}
.cred small {
  display: block;
  opacity: 0.85;
  font-size: 13px;
}
.cred code {
  margin-left: auto;
  font: 600 15px/1 ui-monospace, 'SF Mono', Menlo, monospace;
  letter-spacing: 0.02em;
}
.copy {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.copy:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.copy svg {
  width: 18px;
  height: 18px;
}
.otp {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}

/* ── Stats strip ────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}
.stat {
  padding: 22px;
  border-radius: var(--sn-radius-lg);
  background: var(--sn-color-surface);
}
.stat b {
  display: block;
  font-size: 30px;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.stat span {
  color: var(--sn-color-text-muted);
  font-size: 14px;
}

/* ── Footer ─────────────────────────────────────────── */
footer {
  padding: 40px 0 56px;
  color: var(--sn-color-text-muted);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  border-top: 1px solid var(--sn-color-border);
  padding-top: 24px;
}
footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ── Docs layout ────────────────────────────────────── */
.docs {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  padding: 40px 0 24px;
}
.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  background: var(--sn-color-surface);
  border-radius: var(--sn-radius-lg);
  padding: 18px;
}
.toc p {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sn-color-text-muted);
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--sn-color-text-muted);
  font-size: 14px;
}
.toc a:hover {
  background: var(--sn-color-surface-muted);
  color: var(--sn-color-text);
}
.prose {
  max-width: 760px;
}
.prose section {
  padding: 0 0 40px;
  scroll-margin-top: 88px;
}
.prose h2 {
  font-size: 30px;
}
.prose h3 {
  font-size: 19px;
  margin-top: 26px;
}
.prose p,
.prose li {
  color: var(--sn-color-text);
}
.prose ol,
.prose ul {
  padding-left: 22px;
}
.prose li {
  margin: 6px 0;
}
.prose code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.92em;
  background: var(--sn-color-surface-muted);
  padding: 2px 6px;
  border-radius: 6px;
}
.note {
  border-radius: var(--sn-radius-md);
  padding: 14px 16px;
  background: var(--sn-color-info-soft);
  color: var(--sn-color-info-strong);
  margin: 16px 0;
}
.note.warn {
  background: var(--sn-color-warning-soft);
  color: var(--sn-color-warning-strong);
}
.table-wrap {
  overflow-x: auto;
  border-radius: var(--sn-radius-md);
  background: var(--sn-color-surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sn-color-border);
  vertical-align: top;
}
th {
  font-weight: 600;
  background: var(--sn-color-surface-muted);
}
tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 900px) {
  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-top: 16px;
  }
  /* On phones the contents become one scrollable row of chips under the header. */
  .toc {
    position: sticky;
    top: 68px;
    z-index: 4;
    padding: 8px 0;
    border-radius: 0;
    background: var(--sn-color-canvas);
  }
  .toc {
    min-width: 0;
  }
  .toc p {
    display: none;
  }
  .toc ol {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .toc a {
    white-space: nowrap;
    background: var(--sn-color-surface);
    border-radius: var(--sn-radius-pill);
    padding: 10px 14px;
  }
  .prose section {
    scroll-margin-top: 136px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
