/* mooney website — shared styles.
   Matches the in-app palette from lib/theme/colors.dart so the web presence
   feels like an extension of the app, not a separate marketing site. */

:root {
  color-scheme: light;
  --bg: #F2EFE7;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #9E9A94;
  --hint: #C4C0B8;
  --divider: #DDD9D0;
  --tear: #CEC9BF;
  --green: #2A6B4F;
  --blue: #3A6F9F;
  --red: #E76F51;
  --notif-bg: #FDF5F0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease;
}
a:hover { color: var(--green); }

/* ── Receipt-style horizontal rule ── */
.tear {
  border: 0;
  border-top: 1px dashed var(--tear);
  margin: 40px 0;
  height: 0;
}

/* ── Top bar ── */
.nav {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav .wordmark {
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.nav .wordmark:hover { color: var(--ink); opacity: 0.7; }
.nav .links {
  display: flex;
  gap: 20px;
}
.nav .links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}
.nav .links a:hover { color: var(--ink); }

/* ── Main container ── */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}
main.wide { max-width: 820px; }

/* ── Hero (home page) ── */
.hero {
  padding: 64px 0 32px;
  text-align: center;
}
.hero .mascot {
  width: 112px;
  height: 112px;
  margin: 0 auto 24px;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hero .tagline {
  font-size: 15px;
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 440px;
  line-height: 1.6;
}
.hero .cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.hero .cta:hover {
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(26, 26, 26, 0.12);
}
.hero .cta-secondary {
  display: inline-block;
  margin-left: 12px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.hero .cta-secondary:hover { color: var(--ink); }

/* ── Feature grid ── */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 48px 0;
}
@media (max-width: 620px) {
  .features { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
}
.feature {
  background: var(--surface);
  border-radius: 12px;
  padding: 22px;
  border: 1px solid var(--divider);
}
.feature .label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.feature h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 500;
}
.feature p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Receipt block (for home detail sections) ── */
.receipt {
  background: var(--surface);
  border-radius: 12px;
  padding: 28px 28px 24px;
  margin: 40px 0;
  border: 1px solid var(--divider);
  position: relative;
}
.receipt::before,
.receipt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background-image: radial-gradient(circle at 6px 6px, var(--bg) 5px, transparent 5.5px);
  background-size: 12px 12px;
  background-repeat: repeat-x;
}
.receipt::before { top: -6px; }
.receipt::after { bottom: -6px; transform: rotate(180deg); }
.receipt h2 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 500;
}
.receipt .meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.receipt .line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--divider);
  font-size: 13px;
}
.receipt .line:last-child { border-bottom: 0; }
.receipt .line .k { color: var(--muted); }
.receipt .line .v { color: var(--ink); font-variant-numeric: tabular-nums; }
.receipt .subtotal {
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 2px solid var(--ink);
  font-weight: 500;
  font-size: 14px;
}
.receipt .subtotal .v { color: var(--green); }

/* ── Legal / content page ── */
article header {
  border-bottom: 1px solid var(--divider);
  padding-bottom: 24px;
  margin-bottom: 32px;
}
article header h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
article header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
article h2 {
  margin: 40px 0 12px;
  font-size: 15px;
  font-weight: 500;
}
article p, article li {
  font-size: 14px;
  color: var(--ink);
}
article p { margin: 0 0 14px; }
article ul { margin: 0 0 16px; padding-left: 20px; }
article li { margin-bottom: 6px; }
article code {
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid var(--divider);
}
article .callout {
  background: var(--surface);
  border-left: 3px solid var(--green);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 13px;
  color: var(--muted);
  border-radius: 0 8px 8px 0;
}
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 13px;
}
article th, article td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}
article th { font-weight: 500; color: var(--muted); }

/* ── Footer ── */
footer.site {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  border-top: 1px dashed var(--tear);
  font-size: 12px;
  color: var(--hint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer.site a {
  color: var(--muted);
  text-decoration: none;
}
footer.site a:hover { color: var(--ink); }
