/* Ledgy marketing site — shared styles. Tokens mirror the in-product design system. */

@font-face {
  font-family: "Inter";
  src: url("./Inter.ttf") format("truetype-variations"),
       url("./Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #6042FE;
  --primary-light: #7B62FF;
  --primary-dark: #3E2D99;
  --primary-glow: rgba(96, 65, 255, 0.5);

  --app-bg-start: #010101;
  --app-bg-end: #0E0E0E;
  --background: #11131A;
  --card: #191C24;
  --muted: #222630;
  --muted-foreground: #8C92A1;
  --foreground: #E5E8EE;
  --foreground-dim: #B8BCC7;
  --border: #2F3441;
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.15);

  --success: #2BC470;
  --destructive: #F25543;
  --expense: #FF6B6B;
  --warning: #F4A621;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 300px;

  --shadow-button: 0 0 16px rgba(96, 65, 255, 0.45);
  --shadow-destructive: 0 0 16px rgba(255, 80, 80, 0.45);
  --focus-ring: 0 0 0 3px rgba(96, 65, 255, 0.25);

  --ease: cubic-bezier(0.32, 0.72, 0.4, 1);

  --container: 1200px;
  --content: 1080px;
  --prose: 720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--app-bg-end);
  color: var(--foreground);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, var(--app-bg-start) 0%, var(--app-bg-end) 100%);
  position: relative;
  overflow-x: hidden;
}

/* Ambient corner glows — fixed, behind everything. */
body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(94px);
  background: var(--primary-glow);
  opacity: 0.55;
}
body::before {
  top: -120px;
  left: -160px;
  width: 540px;
  height: 380px;
  border-radius: 50%;
}
body::after {
  bottom: -180px;
  right: -180px;
  width: 540px;
  height: 380px;
  border-radius: 50%;
  opacity: 0.45;
}

/* Faint star field — pure CSS dots. */
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 62%, rgba(255,255,255,0.35) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 41% 12%, rgba(180,170,255,0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 56% 78%, rgba(255,255,255,0.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,0.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 86% 50%, rgba(200,190,255,0.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 84%, rgba(255,255,255,0.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 88%, rgba(255,255,255,0.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 92%, rgba(255,255,255,0.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 8%, rgba(255,255,255,0.5) 50%, transparent 51%);
  background-size: 100% 100%;
  opacity: 0.7;
}

main, header, footer { position: relative; z-index: 1; }

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.container-narrow {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: 24px;
}
.prose-container {
  width: 100%;
  max-width: calc(var(--prose) + 48px);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Type */
h1, h2, h3, h4 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  color: var(--foreground);
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 800; }
h2 { font-size: clamp(30px, 3.6vw, 44px); }
h3 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 600; }
p { margin: 0; color: var(--foreground-dim); }
a { color: inherit; text-decoration: none; }

.t-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.t-muted { color: var(--muted-foreground); }
.t-dim { color: var(--foreground-dim); }
.t-mono {
  font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
}

.gradient-text {
  background: linear-gradient(135deg, #FFFFFF 30%, #7B62FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Pill badge */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--foreground);
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary-light);
  box-shadow: 0 0 8px var(--primary-light);
  animation: pulse 1.8s ease infinite;
}
.pill--success .dot { background: var(--success); box-shadow: 0 0 8px var(--success); }
.pill--save {
  background: linear-gradient(180deg, rgba(43,196,112,0.18), rgba(43,196,112,0.06));
  color: var(--success);
  border-color: rgba(43,196,112,0.35);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.5; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
  text-decoration: none;
  color: var(--foreground);
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.btn--primary {
  background: var(--primary);
  border-color: rgba(255,255,255,0.15);
  box-shadow: var(--shadow-button), inset 0 1px 0 rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn--primary:hover { background: var(--primary-light); }

.btn--secondary {
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.03) 100%);
  border-color: rgba(255,255,255,0.10);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--foreground);
}
.btn--secondary:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.06) 100%);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--foreground-dim);
}
.btn--ghost:hover { color: var(--foreground); background: rgba(255,255,255,0.04); }

.btn--lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn--block { width: 100%; }

/* Glass card */
.glass {
  position: relative;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 80% at 55% 10%, rgba(96,65,255,0.12) 0%, transparent 60%),
    linear-gradient(120deg, #14161E 0%, #20203A 50%, #11131A 100%);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 0 0 1px rgba(96,65,255,0.06),
    inset 0 -1px 0 rgba(96,65,255,0.10);
}

.glass-flat {
  border-radius: var(--radius-lg);
  background: rgba(8, 8, 18, 0.5);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 18, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-lockup img.brand-icon { height: 26px; width: auto; }
.brand-lockup img.brand-word { height: 22px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground-dim);
  border-radius: 8px;
  transition: all 0.15s ease;
}
.site-nav a:hover { color: var(--foreground); background: rgba(255,255,255,0.04); }
.site-nav a[aria-current="page"] { color: var(--foreground); }

.site-header__cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 760px) {
  .site-nav { display: none; }
  .site-header__cta .btn--ghost { display: none; }
  .site-header__inner { height: 60px; }
}

/* ========== Footer ========== */
.site-footer {
  margin-top: 80px;
  padding: 56px 0 40px;
  border-top: 1px solid var(--border-soft);
  background: rgba(0,0,0,0.35);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.site-footer h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a {
  color: var(--foreground-dim);
  font-size: 14px;
  transition: color 0.15s ease;
}
.site-footer a:hover { color: var(--foreground); }
.site-footer__about { color: var(--muted-foreground); font-size: 14px; max-width: 280px; }
.site-footer__legal {
  border-top: 1px solid var(--border-soft);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted-foreground);
  font-size: 13px;
}
.site-footer__legal-links { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .site-footer__about { grid-column: 1 / -1; max-width: none; }
  .site-footer__legal { flex-direction: column; align-items: flex-start; }
}

/* Section spacing */
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
@media (max-width: 760px) { .section { padding: 64px 0; } .section--tight { padding: 40px 0; } }

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
  display: grid;
  gap: 14px;
}
.section__head p { color: var(--foreground-dim); font-size: 17px; }

/* Reusable bits */
.icon-circle {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(96,65,255,0.15);
  color: var(--primary-light);
  font-size: 18px;
  flex-shrink: 0;
}

.cta-band {
  position: relative;
  margin: 96px 0 0;
  padding: 64px 24px;
  text-align: center;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background:
    radial-gradient(60% 100% at 50% 100%, rgba(96,65,255,0.35) 0%, transparent 70%),
    radial-gradient(60% 100% at 50% 0%, rgba(96,65,255,0.18) 0%, transparent 70%);
  overflow: hidden;
}
.cta-band__inner { display: grid; gap: 18px; max-width: 720px; margin: 0 auto; }
.cta-band__inner h2 { font-size: clamp(30px, 3.6vw, 44px); }
.cta-band__inner p { font-size: 17px; }
.cta-band__buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .cta-band { margin-top: 64px; padding: 48px 20px; }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
