/* HonorJar — one stylesheet for the landing page, the tip page, and the embed
   button. Warm, trustworthy palette; light + dark. */
:root {
  --ink: #1c2434;         /* deep navy text */
  --ink-soft: #55607a;
  --paper: #fbf7ef;       /* warm cream */
  --card: #ffffff;
  --line: #ece4d6;
  --gold: #c98a2b;        /* honor / brass accent (value / coins) */
  --rose: #ec5a72;        /* love / the heart */
  --gold-deep: #a06d17;
  --ok: #2f7d5b;
  --err: #b23b3b;
  --shadow: 0 10px 40px rgba(28, 36, 52, 0.10);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f0ead9;
    --ink-soft: #a7add0;
    --paper: #141824;
    --card: #1c2233;
    --line: #2b3450;
    --gold: #e2a94a;
    --gold-deep: #c98a2b;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-deep); }
h1, h2 { line-height: 1.1; letter-spacing: -0.02em; }

.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.15rem;
}
.brand::before {
  content: ""; display: inline-block; width: 1.05em; height: 1.05em;
  vertical-align: -0.2em; margin-right: .42em;
  background: url("/logo.svg?v=d107eb1") center / contain no-repeat;
}

/* ---------- landing ---------- */
.site-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  max-width: 1440px; margin: 0 auto; padding: 20px 20px;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--gold-deep); }
.nav-links .nav-cta {
  background: var(--gold); color: #fff; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--gold-deep);
}
.nav-links .nav-cta:hover { color: #fff; }
@media (max-width: 560px) { .nav-links a:not(.nav-cta) { display: none; } }
main { max-width: 760px; margin: 0 auto; padding: 0 20px 64px; }
.hero {
  margin: 28px 0 10px; padding: 52px 48px; border-radius: 24px;
  background: #1C2434; color: #fff; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 52px;
}
.hero-copy { flex: 0 1 580px; min-width: 0; }
.hero h1 { font-size: clamp(1.95rem, 4vw, 3.4rem); margin: 0 0 .35em; color: #fff; white-space: nowrap; }
.hero .lede { font-size: 1.16rem; color: #C9CEE2; max-width: 42ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-art { flex: 0 1 560px; max-width: 560px; height: auto; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }
@media (max-width: 600px) {
  .hero { flex-direction: column; align-items: flex-start; padding: 30px 22px; }
  .hero-art { align-self: center; max-width: 280px; }
}
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 999px;
  background: var(--gold); color: #fff; font-weight: 700; text-decoration: none;
  border: 1px solid var(--gold-deep);
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }

/* rose hearts drop in and settle as gold coins; glow breathes with them */
.hj-fall, .hj-rest { transform-box: fill-box; transform-origin: center; }
.hj-fall { opacity: 0; }                 /* hidden unless the animation runs */
@media (prefers-reduced-motion: no-preference) {
  .hj-fall { animation: hj-fall 4.5s ease-in infinite; }
  .hj-rest { animation: hj-rest 4.5s ease-out infinite; }
  .hj-glow { animation: hj-glow 4.5s ease-in-out infinite; }
}
.hj-d1 { animation-delay: 1.5s; }
.hj-d2 { animation-delay: 3s; }
@keyframes hj-fall {   /* rose heart falls the full depth of the jar to the pile */
  0%   { transform: translateY(-200px); opacity: 0; }
  6%   { opacity: 1; }
  48%  { transform: translateY(0); opacity: 1; }   /* impact, at the pile */
  55%  { transform: translateY(0); opacity: 0; }   /* morph: heart gone */
  100% { transform: translateY(0); opacity: 0; }
}
@keyframes hj-rest {   /* on impact the heart becomes a coin in the pile */
  0%, 48% { opacity: 0; transform: scale(.2); }
  55%     { opacity: 1; transform: scale(1.16); }  /* pops in as the heart lands */
  62%     { transform: scale(1); }
  90%     { opacity: 1; transform: scale(1); }
  97%     { opacity: 0; transform: scale(1); }
  100%    { opacity: 0; transform: scale(.2); }
}
@keyframes hj-glow {
  0%, 100% { opacity: .5; }
  30%      { opacity: 1; }
}

.how, .embed { border-top: 1px solid var(--line); padding: 36px 0; }
.how h2, .embed h2 { font-size: 1.5rem; margin: 0 0 .6em; }
.steps { margin: 0; padding-left: 1.1em; color: var(--ink-soft); max-width: 64ch; }
.embed > p { max-width: 64ch; }
.embed pre { max-width: 720px; }
.steps li { margin: .5em 0; }
.steps strong { color: var(--ink); }
pre {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; overflow: auto; font-size: .86rem;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fine { color: var(--ink-soft); font-size: .86rem; }
.story { border-top: 1px solid var(--line); padding: 40px 0; }
.story h2 { font-size: 1.5rem; margin: 0 0 .6em; }
.story p { font-size: 1.06rem; color: var(--ink); max-width: 60ch; margin: 0 0 1em; }
.story strong { color: var(--gold-deep); }
.story .sign { color: var(--ink-soft); font-style: italic; }

.site-foot { border-top: 1px solid var(--line); margin-top: 28px; }
.foot-inner {
  max-width: 1440px; margin: 0 auto; padding: 22px 20px;
  display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap;
}
.foot-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-legal a { color: var(--ink-soft); text-decoration: none; font-size: .9rem; }
.foot-legal a:hover { color: var(--gold-deep); }
.foot-copy { margin-left: auto; color: var(--ink-soft); font-size: .85rem; }
@media (max-width: 480px) { .foot-copy { margin-left: 0; } }

/* ---------- tip page ---------- */
body.tip { display: flex; flex-direction: column; min-height: 100vh; padding: 24px; }
.tip-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 420px; width: 100%; padding: 30px 28px 26px; text-align: center;
  margin: auto;
}
.tip-card .brand { display: inline-block; margin-bottom: 18px; }
.tip-card h1 { font-size: 1.35rem; font-weight: 600; color: var(--ink-soft); margin: 0; }
.tip-card .to { color: var(--ink); font-weight: 800; font-size: 1.7rem; }
.what { margin-top: 6px; color: var(--ink-soft); }
.blurb { color: var(--ink-soft); font-size: .95rem; margin: 10px 0 0; }
.amounts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 18px; }
.amt, .custom {
  border: 1.5px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 12px; padding: 12px 16px; font-size: 1rem; font-weight: 700;
  cursor: pointer; min-width: 64px;
}
.amt.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.custom { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.custom input { width: 68px; border: 0; background: transparent; color: var(--ink); font: inherit; }
.custom input:focus { outline: none; }
.send {
  width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--gold-deep);
  background: var(--gold); color: #fff; font-size: 1.05rem; font-weight: 800; cursor: pointer;
}
.send:disabled { opacity: .45; cursor: not-allowed; }
.err { color: var(--err); font-size: .9rem; margin-top: 10px; }

/* ---------- embed button (loaded on other sites) ---------- */
.honorjar-btn {
  display: inline-flex; align-items: center; gap: .4em;
  padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  text-decoration: none; color: #fff; background: #c98a2b; border: 1px solid #a06d17;
}

/* ---------- tip page: optional email ---------- */
.tip-email { margin: 2px 0 16px; text-align: left; }
.tip-email input {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line);
  border-radius: 12px; background: transparent; color: var(--ink); font: inherit;
}
.tip-email input:focus { outline: none; border-color: var(--gold); }
.tip-email .hint { display: block; font-size: .78rem; color: var(--ink-soft); margin-top: 6px; }

/* ---------- legal / content pages ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 30px 20px 64px; }
.legal .back { display: inline-block; margin-bottom: 16px; color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.legal h1 { font-size: 2rem; letter-spacing: -.02em; margin: 6px 0 4px; }
.legal .eff { color: var(--ink-soft); font-size: .88rem; margin: 0 0 22px; }
.legal h2 { font-size: 1.15rem; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--ink); font-size: 1rem; line-height: 1.62; }
.legal ul { padding-left: 1.2em; }
.legal a { color: var(--gold-deep); }
.legal .note {
  margin-top: 28px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card); color: var(--ink-soft); font-size: .9rem;
}
