/* Cashrot marketing site — tokens from design-system + animated-hero-background (home variant) */

:root {
  --hero-base: #e8e4df;
  --screen-bg: #f2f2f7;
  --text-primary: #000000;
  --text-secondary: rgba(0, 0, 0, 0.55);
  --fade-overlay: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 32%,
    rgba(232, 228, 223, 0.12) 50%,
    rgba(232, 228, 223, 0.38) 68%,
    rgba(237, 237, 242, 0.72) 82%,
    #f2f2f7 92%,
    #f2f2f7 100%
  );
}

@media (prefers-color-scheme: dark) {
  :root {
    --hero-base: #0a0a0e;
    --screen-bg: #000000;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.72);
    --fade-overlay: linear-gradient(
      to bottom,
      transparent 0%,
      transparent 32%,
      rgba(10, 10, 14, 0.12) 50%,
      rgba(10, 10, 14, 0.42) 68%,
      rgba(10, 10, 14, 0.72) 82%,
      rgba(0, 0, 0, 0.94) 93%,
      #000000 100%
    );
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Jost", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--screen-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* —— Hero mesh —— */

.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--hero-base);
}

.hero--landing {
  min-height: 100vh;
  min-height: 100dvh;
}

.hero--compact {
  min-height: 40vh;
  min-height: 40dvh;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  animation: blob-drift ease-in-out infinite alternate;
}

/* Positions scaled from MESH_LAYOUT (ref ~400px wide) */
.hero-blob:nth-child(1) {
  left: -27.5%;
  top: -22.5%;
  width: 115%;
  aspect-ratio: 1;
  animation-duration: 8.2s;
  animation-delay: 0s;
}
.hero-blob:nth-child(2) {
  left: 20%;
  top: -27.5%;
  width: 110%;
  aspect-ratio: 1;
  animation-duration: 8.8s;
  animation-delay: 0.9s;
}
.hero-blob:nth-child(3) {
  left: 5%;
  top: -7.5%;
  width: 95%;
  aspect-ratio: 1;
  animation-duration: 7.6s;
  animation-delay: 0.45s;
}
.hero-blob:nth-child(4) {
  left: -22.5%;
  top: 10%;
  width: 130%;
  aspect-ratio: 1;
  animation-duration: 9s;
  animation-delay: 0.3s;
}
.hero-blob:nth-child(5) {
  left: 7.5%;
  top: 25%;
  width: 120%;
  aspect-ratio: 1;
  animation-duration: 8.4s;
  animation-delay: 0.7s;
}
.hero-blob:nth-child(6) {
  left: 30%;
  top: 15%;
  width: 105%;
  aspect-ratio: 1;
  animation-duration: 9.2s;
  animation-delay: 1.1s;
}
.hero-blob:nth-child(7) {
  left: -7.5%;
  top: 37.5%;
  width: 125%;
  aspect-ratio: 1;
  animation-duration: 8.6s;
  animation-delay: 0.55s;
}

@keyframes blob-drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(var(--drift-x, 8px), var(--drift-y, 6px)) scale(1.04);
  }
}

.hero-blob:nth-child(1) {
  --drift-x: 10px;
  --drift-y: 8px;
}
.hero-blob:nth-child(2) {
  --drift-x: -9px;
  --drift-y: 10px;
}
.hero-blob:nth-child(3) {
  --drift-x: 8px;
  --drift-y: 7px;
}
.hero-blob:nth-child(4) {
  --drift-x: 7px;
  --drift-y: -6px;
}
.hero-blob:nth-child(5) {
  --drift-x: 6px;
  --drift-y: -8px;
}
.hero-blob:nth-child(6) {
  --drift-x: -7px;
  --drift-y: 6px;
}
.hero-blob:nth-child(7) {
  --drift-x: 5px;
  --drift-y: -5px;
}

/* Light mode blobs (HOME_LIGHT_BLOBS) */
.hero-blob {
  background: radial-gradient(
    circle at center,
    var(--blob-color) 0%,
    var(--blob-mid) 38%,
    transparent 88%
  );
}

.hero-blob:nth-child(1) {
  --blob-color: rgba(235, 130, 115, 0.52);
  --blob-mid: rgba(235, 130, 115, 0.22);
}
.hero-blob:nth-child(2) {
  --blob-color: rgba(252, 235, 218, 0.88);
  --blob-mid: rgba(252, 235, 218, 0.2);
}
.hero-blob:nth-child(3) {
  --blob-color: rgba(240, 180, 155, 0.38);
  --blob-mid: rgba(240, 180, 155, 0.12);
}
.hero-blob:nth-child(4) {
  --blob-color: rgba(175, 170, 165, 0.48);
  --blob-mid: rgba(175, 170, 165, 0.35);
}
.hero-blob:nth-child(5) {
  --blob-color: rgba(185, 178, 170, 0.42);
  --blob-mid: rgba(185, 178, 170, 0.32);
}
.hero-blob:nth-child(6) {
  --blob-color: rgba(160, 145, 130, 0.36);
  --blob-mid: rgba(160, 145, 130, 0.18);
}
.hero-blob:nth-child(7) {
  --blob-color: rgba(200, 195, 190, 0.45);
  --blob-mid: rgba(200, 195, 190, 0.4);
}

@media (prefers-color-scheme: dark) {
  .hero-blob:nth-child(1) {
    --blob-color: rgba(237, 111, 99, 0.92);
    --blob-mid: rgba(237, 111, 99, 0.22);
  }
  .hero-blob:nth-child(2) {
    --blob-color: rgba(248, 228, 206, 0.88);
    --blob-mid: rgba(248, 228, 206, 0.2);
  }
  .hero-blob:nth-child(3) {
    --blob-color: rgba(240, 160, 130, 0.55);
    --blob-mid: rgba(240, 160, 130, 0.12);
  }
  .hero-blob:nth-child(4) {
    --blob-color: rgba(10, 10, 14, 0.96);
    --blob-mid: rgba(10, 10, 14, 0.35);
  }
  .hero-blob:nth-child(5) {
    --blob-color: rgba(14, 12, 18, 0.94);
    --blob-mid: rgba(14, 12, 18, 0.32);
  }
  .hero-blob:nth-child(6) {
    --blob-color: rgba(107, 93, 82, 0.78);
    --blob-mid: rgba(107, 93, 82, 0.18);
  }
  .hero-blob:nth-child(7) {
    --blob-color: rgba(6, 6, 8, 0.98);
    --blob-mid: rgba(6, 6, 8, 0.4);
  }
}

.hero-fade {
  position: absolute;
  inset: 0;
  background: var(--fade-overlay);
  pointer-events: none;
}

/* —— Layout —— */

.site-header {
  --brand-row-height: 26px;
  --brand-logo-height: 18px;
  --brand-font-size: 26px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  max-width: 720px;
  margin: 0 auto;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--brand-row-height);
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.brand-link:hover {
  text-decoration: none;
  opacity: 0.85;
}

/* Matches CashrotBrandLockup: logo centered in a slot sized to the wordmark row */
.brand-logo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: var(--brand-row-height);
  width: calc(var(--brand-logo-height) * 658 / 527);
}

.brand-logo {
  display: block;
  height: var(--brand-logo-height);
  width: auto;
}

.brand-wordmark {
  font-size: var(--brand-font-size);
  font-weight: 600;
  line-height: var(--brand-font-size);
  letter-spacing: -0.02em;
  transform: translateY(-3px);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  gap: 8px 16px;
  min-height: var(--brand-row-height);
  font-size: 14px;
  line-height: 1;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
}

.site-nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  flex: 1;
}

.hero--landing .hero-inner {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
  max-width: 720px;
  margin: 0 auto;
}

.hero--compact .hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.lockup {
  --brand-row-height: 32px;
  --brand-logo-height: 22px;
  --brand-font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: var(--brand-row-height);
  margin-bottom: 20px;
}

.tagline {
  margin: 0 0 32px;
  max-width: 22rem;
  font-size: 18px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.app-store-link {
  display: inline-block;
  line-height: 0;
  margin-bottom: 40px;
}

.app-store-link img {
  display: block;
  height: 44px;
  width: auto;
}

.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding: 24px;
  font-size: 14px;
}

.site-footer a {
  color: var(--text-secondary);
}

.site-footer a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* —— Legal / article —— */

.page-body {
  position: relative;
  z-index: 1;
  padding: 32px 24px 64px;
  background-color: var(--screen-bg);
}

.article {
  max-width: 42rem;
  margin: 0 auto;
}

.article h1 {
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.article .updated {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--text-secondary);
}

.article h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 32px 0 12px;
}

.article p,
.article li {
  color: var(--text-secondary);
}

.article p {
  margin: 0 0 16px;
}

.article ul {
  margin: 0 0 16px;
  padding-left: 1.25rem;
}

.article li {
  margin-bottom: 8px;
}

.article a {
  color: var(--text-primary);
  text-decoration: underline;
}

.support-email {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
}

.tally-embed {
  width: 100%;
  margin: 8px 0 24px;
}

.tally-embed iframe {
  display: block;
  width: 100%;
  border: 0;
}
