/* ============================================================
   Mich marketing site — shared stylesheet
   Theme: mid-century modern, leaning modern.
   Palette + motifs mirror the Mich desktop app (see CLAUDE.md).
   ============================================================ */

:root {
  /* Brand / per-view palette (from the Mich app) */
  /* PRIMARY is now a calm, desaturated Pine Slate so the 13 accent
     colors (the "wave") can pop. The legacy marigold lives on as the
     "home" accent. */
  --brand:            #3c4a4d; /* Pine Slate — PRIMARY */
  --home:             #db842c; /* marigold — legacy primary, now an accent */
  --donors:           #7c822e;
  --donations:        #b91135;
  --pledges:          #02b2b0;
  --pledge-payments:  #999570;
  --designations:     #2c817a;
  --campaigns:        #bd9940;
  --appeals:          #7a6248;
  --receipts:         #c45c6a;
  --reports:          #4a5c2a;
  --settings:         #5c6e78;
  --database:         #9e4f1e;
  --about:            #b07a9e;

  /* Neutrals */
  --bg:          #f3f3f3;
  --surface:     #ffffff;
  --border:      #d0d0d0;
  --text:        #2b2b2b;
  --text-strong: #111111;
  --muted:       #8a8a8a;
  --success:     #4caf50;

  --brand-dark:  #2f3b3e;   /* primary hover / pressed */
  --brand-tint:  #f3f6f5;   /* faint primary wash */

  /* Type */
  --serif: Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1120px;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.10);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--text-strong); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--alt { background: var(--bg); }
.section--tight { padding: 48px 0; }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--text); max-width: 60ch; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow { font-family: var(--sans); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
           font-size: .8rem; color: var(--muted); margin: 0 0 .5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: .7em 1.4em; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.15); color: #fff; }
.btn-outline { background: transparent; color: var(--brand-dark); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row { justify-content: center; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand-word { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--text); font-weight: 500; }
.site-nav a:hover { color: var(--brand-dark); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--brand-dark); }
.site-nav a[aria-current="page"]::after { content: ""; display:block; height:2px; background: var(--brand); border-radius:2px; margin-top:2px; }
.nav-cta { color: #fff !important; }
.nav-cta::after { display: none !important; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text-strong); margin: 5px 0; transition: .2s; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .site-nav.open { max-height: 80vh; }
  .site-nav a { padding: 14px 20px; border-top: 1px solid var(--bg); }
  .nav-cta { margin: 12px 20px; text-align: center; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--brand); color: #fff; padding: 80px 0 120px; overflow: hidden; }
.hero .hero-content { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero-highlight { font-weight: 700; box-shadow: inset 0 -.5em 0 rgba(255,255,255,.18); padding: 0 2px; border-radius: 2px; }
/* Angled, ghosted product screenshot drifting off the right edge */
.hero-bg-shot {
  position: absolute; top: 50%; right: -80px; z-index: 0;
  width: 620px; max-width: 52%; border-radius: var(--radius);
  transform: translateY(-50%) rotate(7deg) scale(1.04);
  opacity: .16; filter: saturate(.6);
  pointer-events: none; user-select: none;
}
@media (max-width: 860px) { .hero-bg-shot { display: none; } }
.hero .hero-word { height: clamp(56px, 10vw, 96px); width: auto; margin-bottom: 18px; }
.hero p { color: rgba(255,255,255,.95); font-size: 1.25rem; max-width: 46ch; }
.hero .btn-row { margin-top: 28px; }

/* ---------- Wave divider (mirrors the app's accent wave) ---------- */
.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 60px; }
.wave path { fill: var(--brand); }              /* default fill = section color */
section[style*="--accent"] .wave path,
.wave--accent path { fill: var(--accent); }

/* ---------- Animated circle row (mirrors the app's nav dots) ---------- */
.dot-row { display: flex; justify-content: center; gap: 14px; padding: 26px 0; }
.dot-row .dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--brand);
  animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(4px); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .dot-row .dot { animation: none; } }

/* ---------- Feature grid (home) — balanced 3-up, mid-century spine ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  display: flex; align-items: stretch; overflow: hidden; padding: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
/* Left accent panel + concentric dot in the card's app-view color */
.fc-spine {
  flex: 0 0 60px; position: relative;
  background: color-mix(in srgb, var(--accent, var(--brand)) 9%, #fff);
  border-right: 1px solid color-mix(in srgb, var(--accent, var(--brand)) 18%, #fff);
}
.fc-dot { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent, var(--brand)); }
.fc-dot::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 46px; height: 46px; border-radius: 50%; z-index: -1;
  background: color-mix(in srgb, var(--accent, var(--brand)) 26%, #fff); }
.fc-body { padding: 22px 24px; }
.feature-card h3 { color: var(--text-strong); }
.feature-card p { color: var(--text); margin: 0; font-size: .97rem; }
.fc-link { display: inline-block; margin-top: 12px; color: var(--brand); font-weight: 600; font-size: .92rem; }

/* ---------- Feature rows (features page) ---------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 40px 0;
               border-bottom: 1px solid var(--bg); }
.feature-row:last-child { border-bottom: 0; }
.feature-row .copy .eyebrow { color: var(--accent, var(--brand)); }
.feature-row .copy h2 { position: relative; }
.feature-row .copy h2::after { content:""; display:block; width:54px; height:3px; border-radius:3px;
                               background: var(--accent, var(--brand)); margin-top: 10px; }
.feature-row:nth-child(even) .media { order: -1; }
@media (max-width: 760px) {
  .feature-row { grid-template-columns: 1fr; gap: 20px; }
  .feature-row:nth-child(even) .media { order: 0; }
}

/* ---------- Screenshot frame ---------- */
.shot { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); width: 100%; }
figure.shot-fig { margin: 0; }
figure.shot-fig figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; text-align: center; }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; max-width: 760px; margin: 0 auto; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.price-card.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.price-card .price { font-family: var(--serif); font-size: 2.6rem; color: var(--text-strong); margin: .2em 0; }
.price-card .price small { font-size: 1rem; color: var(--muted); font-family: var(--sans); }
.price-card ul { list-style: none; padding: 0; margin: 18px 0; }
.price-card li { padding: 7px 0 7px 28px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

/* ---------- Download (simple list, no cards) ---------- */
.download-list { max-width: 560px; margin: 32px auto 0; text-align: left; border-top: 1px solid var(--line-soft, #ececec); }
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; border-bottom: 1px solid var(--line-soft, #ececec); }
.dl-os { display: flex; flex-direction: column; gap: 2px; }
.dl-os strong { font-family: var(--serif); font-size: 1.2rem; color: var(--text-strong); }
.dl-os span { font-size: .88rem; color: var(--muted); }
.dl-notify { background: none; border: none; padding: 0; color: var(--brand);
  font-family: var(--sans); font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap; }
.dl-notify:hover { color: var(--brand-dark); text-decoration: underline; }
@media (max-width: 560px) { .dl-row { flex-direction: column; align-items: flex-start; gap: 10px; } }

/* ---------- Purchase: hardware-fingerprint field ---------- */
.fp-card { max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 28px; }
.fp-input { font-family: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
  letter-spacing: .14em; text-transform: uppercase; text-align: center; font-size: 1.1rem; }
.fp-input::placeholder { letter-spacing: .08em; }
.fp-msg { min-height: 1.25em; margin: 10px 0 0; font-size: .9rem; }
.fp-ok { color: var(--success); }
.fp-err { color: var(--donations); }
.field-input.input-error { border-color: var(--donations); box-shadow: 0 0 0 3px color-mix(in srgb, var(--donations) 16%, #fff); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Button loading spinner */
.btn .spinner { width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%;
  display: inline-block; animation: btn-spin .7s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Toast (purchase feedback) */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(14px);
  background: var(--text-strong); color: #fff; padding: 12px 20px; border-radius: 10px;
  box-shadow: var(--shadow); font-size: .95rem; max-width: 90vw; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; z-index: 999; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--donations); }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity .2s ease; } }

/* ---------- Previous-versions list (download page) ---------- */
.ver-group { max-width: 640px; margin: 0 auto 28px; }
.ver-group h3 { font-size: 1.05rem; color: var(--text-strong); padding-bottom: 8px;
  border-bottom: 2px solid var(--border); margin-bottom: 4px; }
.ver-list { list-style: none; margin: 0; padding: 0; }
.ver-row { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 2px; border-bottom: 1px solid var(--line-soft, #ececec); }
.ver-meta { display: flex; flex-direction: column; gap: 2px; }
.ver-meta strong { font-size: 1rem; color: var(--text-strong); }
.ver-meta span { font-size: .85rem; color: var(--muted); }
.ver-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: .92rem; }
@media (max-width: 560px) { .ver-row { flex-direction: column; align-items: flex-start; gap: 8px; } }

/* ---------- Notify modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,24,25,.5); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px; z-index: 100; }
.modal-overlay[hidden] { display: none; }
.modal-card { position: relative; background: #fff; border-radius: 16px; box-shadow: var(--shadow);
  width: 100%; max-width: 440px; padding: 28px; text-align: left; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none;
  font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--text-strong); }
.field-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-strong); margin-bottom: 6px; }
.field-input { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; color: var(--text); }
.field-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, #fff); }
.notify-versions { border: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; }
.notify-versions legend { font-size: .85rem; font-weight: 600; color: var(--text-strong); padding: 0; margin-bottom: 4px; }
.notify-opt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; font-size: .92rem; }
.notify-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.notify-opt input { accent-color: var(--brand); width: 16px; height: 16px; }
.notify-check { width: 52px; height: 52px; margin: 4px auto 10px; border-radius: 50%;
  background: #eaf6ea; color: #2f6f33; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; }

/* ---------- Learn / training ---------- */
.steps { max-width: 760px; margin: 8px 0 0; }
.step { display: flex; gap: 18px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line-soft, #ececec); }
.step:last-child { border-bottom: none; }
.step-num { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-family: var(--sans); font-weight: 700; font-size: 1.1rem; line-height: 1;
  font-variant-numeric: lining-nums tabular-nums; }
.step h3 { margin: 0 0 4px; }
.step p { margin: 0; color: var(--text); }
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
.video-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, var(--brand)) 20%, #fff); color: var(--accent, var(--brand)); }
.video-thumb .play { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.92);
  display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.video-dur { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.65); color: #fff;
  font-size: .75rem; padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.video-meta { padding: 14px 16px; }
.video-meta h3 { margin: 0; font-size: 1.02rem; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
@media (max-width: 860px) { .video-grid, .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .video-grid, .topic-grid { grid-template-columns: 1fr; } }

/* ---------- Prose (legal / text pages) ---------- */
.prose { max-width: 72ch; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .4em 0; }

/* ---------- Notes / placeholders ---------- */
.note { border-left: 4px solid var(--campaigns); background: #fff8ec; padding: 14px 18px; border-radius: 8px; margin: 0 0 24px; font-size: .95rem; }
.note strong { color: var(--text-strong); }

/* ---------- Story / give-back callout ---------- */
.giveback { background: var(--designations); color: #fff; border-radius: var(--radius); padding: 36px; }
.giveback h2 { color: #fff; }
.giveback a { color: #fff; text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: #1c1c1c; color: #cfcfcf; margin-top: 0; }
.site-footer .dot-row { padding: 28px 0 8px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding: 28px 20px 10px; max-width: var(--maxw); margin: 0 auto; }
.footer-brand img { height: 34px; width: auto; margin-bottom: 10px; }
.footer-brand .tagline { font-family: var(--serif); font-style: italic; color: #fff; margin: 0 0 10px; }
.footer-note { font-size: .9rem; color: #aaa; max-width: 40ch; }
.footer-col h3 { color: #fff; font-family: var(--sans); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.footer-col a { display: block; color: #cfcfcf; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.site-footer a { color: #e0e0e0; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
                 border-top: 1px solid #333; padding: 16px 20px; font-size: .85rem; color: #999; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
