/* ==========================================================================
   ReceiptX — shared stylesheet
   Brand: indigo #4F46E5 → cyan #06B6D4
   ========================================================================== */

:root {
  --brand-start: #4f46e5;
  --brand-end: #06b6d4;
  --brand-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);

  --ink: #0d1220;
  --ink-soft: #3d4457;
  --ink-muted: #6b7280;
  --line: #e7e9f0;

  --bg: #ffffff;
  --bg-alt: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #f4f6fb;

  --shadow-sm: 0 1px 2px rgba(13, 18, 32, 0.05);
  --shadow-md: 0 12px 32px rgba(13, 18, 32, 0.08);
  --shadow-lg: 0 30px 70px rgba(79, 70, 229, 0.16);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;

  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f6ff;
    --ink-soft: #c3c9dc;
    --ink-muted: #8b93a9;
    --line: #262b3d;

    --bg: #0b0e18;
    --bg-alt: #0f1322;
    --surface: #141827;
    --surface-2: #1a1f31;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.55);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: var(--brand-start);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.45);
}
.btn-ghost {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--line);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ---- Brand / logo ----------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover {
  text-decoration: none;
}
.logo-tile {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-gradient);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

/* ---- Header ----------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 15px;
}
.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}
@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
}

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 56px 0 40px;
  margin-top: 96px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-tag {
  color: var(--ink-muted);
  max-width: 320px;
  margin: 16px 0 0;
  font-size: 14px;
}
.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 10px;
}
.footer-col a:hover {
  color: var(--ink);
  text-decoration: none;
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Legal / doc pages ------------------------------------------------ */
.doc {
  padding: 64px 0 8px;
}
.doc-head {
  max-width: 760px;
  margin: 0 auto 8px;
}
.doc-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-start);
}
.doc h1 {
  font-size: clamp(32px, 5vw, 46px);
  letter-spacing: -0.03em;
  margin: 12px 0 8px;
  line-height: 1.1;
}
.doc-meta {
  color: var(--ink-muted);
  font-size: 14px;
}
.doc-body {
  max-width: 760px;
  margin: 40px auto 0;
}
.doc-body h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 44px 0 12px;
  scroll-margin-top: 96px;
}
.doc-body h3 {
  font-size: 17px;
  margin: 28px 0 8px;
}
.doc-body p,
.doc-body li {
  color: var(--ink-soft);
  font-size: 16px;
}
.doc-body ul {
  padding-left: 22px;
}
.doc-body li {
  margin-bottom: 8px;
}
.doc-body strong {
  color: var(--ink);
}
.callout {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-start);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 24px 0;
}
.callout p {
  margin: 0;
}
.toc {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 32px auto 0;
  max-width: 760px;
}
.toc h4 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}
.toc li {
  margin-bottom: 8px;
}
@media (max-width: 620px) {
  .toc ol {
    columns: 1;
  }
}
