/* Purrse brand layer: fonts, gold, small additions. Loaded after the original styles. */
:root {
  --brand-accent: #14b87a;
  --brand-accent-hover: #0e8f5f;
  --brand-gold: #f5b82e;
  --brand-gold-ink: #b07d0a;
  --font-heading: "Poppins", "Inter", Arial, sans-serif;
  --font-body: "Inter", Arial, sans-serif;
}
[data-mode="dark"] { --brand-gold-ink: #f5b82e; }

/* Body text: Inter. Headings, navigation, buttons: Poppins 600/700. Mono stays as is. */
body { font-family: var(--font-body); }
h1, h2, h3, h4, h5, h6,
nav, nav a, header a, button, [role="button"], [role="tab"],
a.rounded-full, .btn-sheen, .text-statement, .text-hero, .text-heading {
  font-family: var(--font-heading);
}
h1, h2, h3 { font-weight: 700; }
h1.font-black, h2.font-black, .font-black { font-weight: 700; }
.font-extrabold { font-weight: 700; }
.font-mono, code, kbd, pre { font-family: var(--font-mono, ui-monospace, monospace); }

/* "Soon" badge on Buy buttons while CONFIG.CA is empty */
.purrse-soon {
  display: inline-flex; align-items: center; margin-left: .5em;
  padding: .2em .55em; border-radius: 999px;
  background: var(--brand-gold); color: #10201a;
  font-size: .72em; font-weight: 700; line-height: 1; letter-spacing: .02em;
}
a[href^="#buy-"] { pointer-events: none; opacity: .72; }

/* Footer legal links keep the footer look */
footer a[href="/terms"], footer a[href="/privacy"], a[href="/terms"], a[href="/privacy"] { color: inherit; text-decoration: none; }
a[href="/terms"]:hover, a[href="/privacy"]:hover { text-decoration: underline; }

/* ---------- /app: early-access gate + application modal ---------- */
.purrse-fine { font-size: .75rem; line-height: 1.5; color: var(--color-text-muted, #5b6b64); margin: 0; }
[data-purrse-gate] .purrse-fine { max-width: 32em; }

.purrse-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: rgba(16, 32, 26, .48); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: purrse-fade .18s ease-out;
}
.purrse-card {
  position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--color-surface-raised, #fff); color: var(--color-text-primary, #10201a);
  border: 1px solid var(--color-border-subtle, rgba(16,32,26,.07)); border-radius: 1.5rem;
  padding: 28px 24px 22px; box-shadow: 0 24px 60px rgba(16, 32, 26, .22);
  animation: purrse-pop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.purrse-x {
  position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 999px; border: 0; background: transparent; color: var(--color-text-secondary, #4b5f56); cursor: pointer;
}
.purrse-x:hover { background: var(--color-surface-overlay, #e8f5f0); color: var(--color-text-primary, #10201a); }
.purrse-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.375rem; line-height: 1.25; margin: 0 40px 6px 0; letter-spacing: -.01em; }
.purrse-sub { color: var(--color-text-secondary, #4b5f56); margin: 0 0 18px; line-height: 1.5; font-size: .9375rem; overflow-wrap: anywhere; }
.purrse-form { display: grid; gap: 12px; }
.purrse-field { display: grid; gap: 6px; }
.purrse-label { font-weight: 600; font-size: .8125rem; }
.purrse-field input {
  width: 100%; box-sizing: border-box; height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--color-border-default, rgba(16,32,26,.12)); background: var(--color-surface-base, #fbf6ec);
  color: inherit; font: inherit; font-size: .9375rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
.purrse-field input#pa-wallet { font-family: var(--font-mono, ui-monospace, monospace); font-size: .875rem; }
.purrse-field input:focus { border-color: var(--brand-accent); box-shadow: 0 0 0 3px rgba(20, 184, 122, .22); }
.purrse-field input[aria-invalid="true"] { border-color: #ef4444; }
.purrse-error, .purrse-form-error { color: #ef4444; font-size: .8125rem; min-height: 0; }
.purrse-error:empty { display: none; }
.purrse-form-error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.purrse-form-error:empty { display: none; }
.purrse-check { display: flex; align-items: center; gap: 10px; font-size: .875rem; cursor: pointer; user-select: none; }
.purrse-check input { width: 18px; height: 18px; accent-color: var(--brand-accent); margin: 0; flex: none; }
.purrse-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-family: var(--font-heading); font-weight: 600; font-size: .9375rem; transition: background-color .15s, opacity .15s;
}
.purrse-btn-accent { background: var(--brand-accent); color: #fff; }
.purrse-btn-accent:hover { background: var(--brand-accent-hover); }
.purrse-btn-accent:disabled { opacity: .55; cursor: progress; }
.purrse-btn-ghost { background: var(--color-surface-overlay, #e8f5f0); color: var(--color-text-primary, #10201a); }
.purrse-btn-ghost:hover { filter: brightness(.97); }
.purrse-form-error .purrse-btn { height: 34px; padding: 0 14px; font-size: .8125rem; }
.purrse-form .purrse-btn-accent { width: 100%; margin-top: 4px; }
.purrse-success { display: grid; justify-items: center; text-align: center; padding-top: 8px; }
.purrse-success .purrse-title { margin: 14px 0 6px; }
.purrse-tick { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; background: var(--brand-accent); color: #fff; }
.purrse-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@keyframes purrse-fade { from { opacity: 0 } }
@keyframes purrse-pop { from { opacity: 0; transform: translateY(8px) scale(.98) } }
@media (prefers-reduced-motion: reduce) { .purrse-overlay, .purrse-card { animation: none } }

/* ---------- Visible rebrand: green-tinted backgrounds (images untouched, CSS only) ---------- */
:root { --purrse-tint: hue-rotate(-42deg) saturate(1.05) brightness(1.02); }
#hero-art,
#hero-art ~ div[aria-hidden="true"],
div[aria-hidden="true"].blur-2xl,
img[src*="img-meadow-hero"],
img[src*="img-valley-footer"] { filter: var(--purrse-tint); }

/* ---------- Bigger type: scale everything rem-based by ~9%, body copy a bit more ---------- */
html { font-size: 109.375%; }   /* 16px -> 17.5px */
.text-sm { font-size: 0.9375rem; }
.text-base { font-size: 1.0625rem; }
.text-lg { font-size: 1.2rem; }
.text-body-lg, .text-bubble { font-size: 1.0625rem; }
/* Hero word "Purse": gold reads better than green on the green-tinted sky */
:root { --purrse-hero-accent: #f5b82e; }
h1[data-fold] [data-purrse-accent], h1[data-fold] [data-fold-word] { text-shadow: 0 2px 18px rgba(16, 32, 26, .28); }

/* Hero "Launch app": solid button instead of see-through glass, readable on the green sky */
a.shadow-glass-cta {
  background-color: #10201a !important; color: #fff !important;
  box-shadow: 0 10px 30px rgba(16, 32, 26, .35), inset 0 0 0 1px rgba(255, 255, 255, .14) !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
a.shadow-glass-cta:hover { background-color: var(--brand-accent-hover) !important; }
