/* Joy Chaser shared theme — brand fonts, colors (light + dark), top nav, menu, theme switch, buttons, footer.
   Page-specific styles live in each page and should use the tokens below instead of hard-coded colors. */

@font-face { font-family: 'Londrina Solid'; font-weight: 900; font-display: swap; src: url(/fonts/LondrinaSolid-900.woff2) format('woff2'); }
@font-face { font-family: 'Covered By Your Grace'; font-weight: 400; font-display: swap; src: url(/fonts/CoveredByYourGrace-400.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url(/fonts/Nunito-400.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url(/fonts/Nunito-600.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url(/fonts/Nunito-700.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url(/fonts/Nunito-800.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 900; font-display: swap; src: url(/fonts/Nunito-900.woff2) format('woff2'); }

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

:root {
  /* brand palette (from the logo) */
  --coral: #F19481; --orange: #EB5E26; --pink: #DD85CF; --purple: #9D6DAA; --violet: #625BD1;
  --teal: #76AF9B; --sage: #DCE4D9; --blush: #F5CBC2; --mustard: #E8B22B; --ink: #040202; --white: #FFFFFF; --paper: #FFFDFB;
  --display: 'Londrina Solid', 'Arial Black', sans-serif;
  --script: 'Covered By Your Grace', 'Comic Sans MS', cursive;
  --body: 'Nunito', 'Segoe UI', sans-serif;

  /* theme tokens — light */
  --bg: #FFFDFB;            /* page */
  --bg-2: #FBF1EC;          /* alternate section band */
  --card: #FFFFFF;          /* cards, panels */
  --field: #FFFFFF;         /* form inputs */
  --fg: #040202;            /* main text */
  --fg-soft: rgba(4,2,2,.72);
  --fg-faint: rgba(4,2,2,.5);
  --line: #040202;          /* card + button outlines */
  --line-soft: rgba(4,2,2,.16);
  --sh: #040202;            /* offset "sticker" shadow for buttons/pills */
  --sh-card: #040202;       /* offset shadow for cards */
  /* text-safe versions of the bright colors (readable on --bg) */
  --t-orange: #C94A17; --t-purple: #8A5898; --t-violet: #5049C4; --t-pink: #B8409F;
  --t-teal: #467A67; --t-coral: #CF5A3F; --t-mustard: #8F6A0E;
}
html[data-theme="dark"] {
  --bg: #141113; --bg-2: #1B1719; --card: #1E1A1D; --field: #141113;
  --fg: #FFFDFB; --fg-soft: rgba(255,253,251,.76); --fg-faint: rgba(255,253,251,.5);
  --line: rgba(255,253,251,.85); --line-soft: rgba(255,253,251,.16);
  --sh: #FFFDFB; --sh-card: #F19481;
  --t-orange: #F4834F; --t-purple: #C89CD6; --t-violet: #A29DF2; --t-pink: #E9A3DD;
  --t-teal: #93C8B5; --t-coral: #F5A898; --t-mustard: #EDC155;
}

html { scroll-behavior: smooth; overflow-x: clip; }
body { font-family: var(--body); background: var(--bg); color: var(--fg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
body::after { /* soft print grain, like the logo */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1000; opacity: .16; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.35  0 0 0 0 0.3  0 0 0 1.1 -0.35'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
}
html[data-theme="dark"] body::after { mix-blend-mode: screen; opacity: .06; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 900; line-height: .98; letter-spacing: .01em; }
.script { font-family: var(--script); font-weight: 400; }
input, textarea, select, button { font-family: var(--body); }
.deco { position: absolute; pointer-events: none; user-select: none; }

/* ===== TOP NAV ===== */
body > nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,253,251,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem; height: 72px; border-bottom: 2px solid var(--blush);
}
html[data-theme="dark"] body > nav { background: rgba(20,17,19,.92); border-bottom-color: rgba(241,148,129,.5); }
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo-img { height: 52px; width: auto; transition: transform .25s; }
.nav-logo:hover .nav-logo-img { transform: rotate(-8deg) scale(1.06); }
.nav-logo-text { font-family: var(--display); font-size: 1.7rem; letter-spacing: 4px; color: var(--fg); }
.nav-logo-text span { color: var(--coral); }
.nav-actions { display: inline-flex; align-items: center; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 2px solid var(--ink);
  font-family: var(--script); font-size: 1.25rem; line-height: 1; padding: 9px 20px 11px; border-radius: 999px;
  transition: transform .15s, box-shadow .15s;
}
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.pill-app  { background: var(--coral); color: var(--ink); box-shadow: 3px 3px 0 var(--sh); }
.pill-menu { background: var(--violet); color: #fff; box-shadow: 3px 3px 0 var(--sh); }
.pill:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--sh); }
.pill:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--sh); }
.pill-app:hover svg { transform: translateX(3px); }
.pill-menu.open svg { transform: rotate(180deg); }

.theme-toggle { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 2px solid var(--ink); background: var(--ink); cursor: pointer; display: grid; place-items: center; box-shadow: 3px 3px 0 var(--coral); transition: transform .2s, background .2s; }
.theme-toggle:hover { transform: rotate(-14deg) scale(1.06); }
.theme-toggle svg { width: 24px; height: 24px; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .moon { stroke: #FFFDFB; }
.theme-toggle .sun { stroke: var(--ink); display: none; }
html[data-theme="dark"] .theme-toggle { background: var(--mustard); }
html[data-theme="dark"] .theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: block; }

/* drop-down: every option wears its own brand color */
.nav-links {
  position: absolute; top: 80px; right: 2rem; width: min(330px, calc(100vw - 2rem));
  list-style: none; background: var(--white); padding: .7rem;
  border: 2px solid var(--ink); border-radius: 24px; box-shadow: 6px 6px 0 var(--ink);
  opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.98); transform-origin: top right;
  transition: opacity .22s, transform .22s, visibility .22s;
}
html[data-theme="dark"] .nav-links { background: #1E1A1D; border-color: #FFFDFB; box-shadow: 6px 6px 0 var(--coral); }
.nav-links.open { opacity: 1; visibility: visible; transform: none; }
.nav-links li { opacity: 0; transform: translateX(14px); transition: opacity .25s, transform .25s; }
.nav-links.open li { opacity: 1; transform: none; }
.nav-links.open li:nth-child(2) { transition-delay: .03s; } .nav-links.open li:nth-child(3) { transition-delay: .06s; }
.nav-links.open li:nth-child(4) { transition-delay: .09s; } .nav-links.open li:nth-child(5) { transition-delay: .12s; }
.nav-links.open li:nth-child(6) { transition-delay: .15s; } .nav-links.open li:nth-child(7) { transition-delay: .18s; }
.nav-links a {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 16px;
  font: 900 1rem/1.1 var(--body); letter-spacing: .02em; color: var(--t);
  transition: background .18s, color .18s, transform .18s;
}
.nav-links .mi { flex: none; width: 36px; height: 36px; border-radius: 46% 54% 44% 56%; background: color-mix(in srgb, var(--c) 22%, white); display: grid; place-items: center; transition: background .18s, transform .25s; }
html[data-theme="dark"] .nav-links .mi { background: color-mix(in srgb, var(--c) 26%, #1E1A1D); }
.nav-links .mi svg { width: 20px; height: 20px; fill: none; stroke: var(--t); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .18s; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] { background: var(--c); color: var(--h); outline: none; }
.nav-links a:hover, .nav-links a:focus-visible { transform: translateX(4px); }
.nav-links a:hover .mi, .nav-links a:focus-visible .mi, .nav-links a[aria-current="page"] .mi { background: rgba(255,255,255,.28); }
.nav-links a:hover .mi, .nav-links a:focus-visible .mi { transform: rotate(-10deg) scale(1.08); }
.nav-links a:hover .mi svg, .nav-links a:focus-visible .mi svg, .nav-links a[aria-current="page"] .mi svg { stroke: var(--h); }
.nav-links li:nth-child(1) a { --c: var(--orange);  --t: var(--t-orange);  --h: #fff; }
.nav-links li:nth-child(2) a { --c: var(--purple);  --t: var(--t-purple);  --h: #fff; }
.nav-links li:nth-child(3) a { --c: var(--violet);  --t: var(--t-violet);  --h: #fff; }
.nav-links li:nth-child(4) a { --c: var(--pink);    --t: var(--t-pink);    --h: var(--ink); }
.nav-links li:nth-child(5) a { --c: var(--teal);    --t: var(--t-teal);    --h: var(--ink); }
.nav-links li:nth-child(6) a { --c: var(--coral);   --t: var(--t-coral);   --h: var(--ink); }
.nav-links li:nth-child(7) a { --c: var(--mustard); --t: var(--t-mustard); --h: var(--ink); }

/* ===== PAGE HEADER (inner pages) ===== */
.page-head { position: relative; overflow: hidden; text-align: center; padding: 3.5rem 1.5rem 2.5rem; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font: 900 .78rem/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--fg-soft); margin-bottom: 1.2rem; transition: color .2s; }
.back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.back-link:hover { color: var(--t-coral); }
.back-link:hover svg { transform: translateX(-3px); }
.page-title { font-size: clamp(3.2rem, 8vw, 5.6rem); }
.page-title .script { color: var(--coral); font-size: .82em; display: inline-block; transform: rotate(-3deg); margin-left: .12em; }
.page-sub { font: 600 1.12rem/1.6 var(--body); color: var(--fg-soft); max-width: 600px; margin: 1rem auto 0; }

/* ===== BUTTONS ===== */
.jc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 28px; border-radius: 999px;
  border: 2px solid var(--ink); cursor: pointer; font: 900 1rem/1 var(--body); letter-spacing: .01em;
  transition: transform .15s, box-shadow .15s;
}
.jc-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.jc-btn:hover { transform: translate(-2px,-2px); }
.jc-btn:hover svg { transform: translateX(3px); }
.jc-btn-violet { background: var(--violet); color: #fff; box-shadow: 5px 5px 0 var(--sh); }
.jc-btn-violet:hover { box-shadow: 7px 7px 0 var(--sh); }
.jc-btn-coral { background: var(--coral); color: var(--ink); box-shadow: 5px 5px 0 var(--sh); }
.jc-btn-coral:hover { box-shadow: 7px 7px 0 var(--sh); }
.jc-btn-white { background: #fff; color: var(--ink); box-shadow: 5px 5px 0 var(--coral); }
.jc-btn-white:hover { box-shadow: 7px 7px 0 var(--coral); }

/* ===== CARDS + FORMS (shared look) ===== */
.jc-card { background: var(--card); border: 2px solid var(--line); border-radius: 26px 30px 24px 32px; box-shadow: 5px 5px 0 var(--sh-card); }
.jc-field { width: 100%; background: var(--field); color: var(--fg); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; font: 600 1rem/1.4 var(--body); transition: box-shadow .15s; }
.jc-field::placeholder { color: var(--fg-faint); }
.jc-field:focus { outline: none; box-shadow: 4px 4px 0 var(--coral); }
.jc-label { display: block; font: 900 .78rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--fg-soft); margin: 1rem 0 .5rem; }
.jc-note { border-radius: 16px; padding: 12px 16px; font: 700 .95rem/1.4 var(--body); border: 2px solid var(--ink); color: var(--ink); }
.jc-note-ok { background: var(--sage); }
.jc-note-err { background: var(--blush); }

/* ===== FOOTER ===== */
.site-footer { position: relative; overflow: hidden; background: var(--blush); color: var(--ink); text-align: center; padding: 4.5rem 2rem 2.5rem; margin-top: 4rem; }
html[data-theme="dark"] .site-footer { background: #0B090A; color: #FFFDFB; border-top: 3px solid var(--coral); }
.sf-logo { width: 130px; margin: 0 auto .8rem; display: block; }
.sf-tag { font: 400 1.6rem/1 var(--script); margin-bottom: 1.8rem; }
.sf-socials { display: flex; justify-content: center; gap: .8rem; margin-bottom: 2rem; }
.sf-social { width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); display: grid; place-items: center; transition: transform .15s, background .15s; }
html[data-theme="dark"] .sf-social { box-shadow: 3px 3px 0 var(--coral); }
.sf-social:hover { transform: translate(-1px,-2px) rotate(-6deg); background: var(--mustard); }
.sf-social svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sf-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem 1.8rem; margin-bottom: 2rem; }
.sf-nav a { font: 900 .8rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; padding-bottom: 3px; border-bottom: 2px solid transparent; transition: border-color .2s; }
.sf-nav a:hover { border-color: var(--coral); }
.sf-copy { font: 700 .8rem/1 var(--body); opacity: .55; }

@media (max-width: 600px) {
  body > nav { padding: 0 1rem; height: 64px; }
  .nav-links { top: 72px; right: 1rem; }
  .nav-logo { gap: 8px; }
  .nav-logo-img { height: 40px; }
  .nav-logo-text { font-size: 1.25rem; letter-spacing: 2px; white-space: nowrap; }
  .pill-menu { white-space: nowrap; }
  .pill { font-size: 1.05rem; padding: 8px 12px 10px; }
  .pill-app { display: none; }
  .theme-toggle { width: 40px; height: 40px; }
  .nav-actions { gap: 9px; }
  .page-head { padding: 2.5rem 1.25rem 2rem; }
  .hide-sm { display: none; }
}
@media (max-width: 400px) {
  .nav-logo-text { font-size: 1.15rem; line-height: .95; }
  .nav-logo-text span { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== FUNCTIONAL COLOR (2026-09-27, from Kyle's feedback) =====
   One job = one look, on every page:
   - Action button (send, search, go to a page): violet pill, ink outline, offset shadow.
   - Download / get / buy: mustard pill, same shape (lives in the shop).
   - Text link: violet, bold, underlined, arrow.
   - Labels + tags (not clickable): flat, no outline, no shadow. */
html body :is(.contact-btn, .share-btn, .suggest-btn, .town-form button, .jc-btn-coral) {
  background: var(--violet); color: #fff; border: 2px solid var(--ink); border-radius: 999px;
  font-family: var(--body); font-weight: 900;
}
html body .suggest-btn { padding: 14px 30px; font-size: 1rem; }
html body :is(.story-link, .card-cta, .jc-link, .idea-link) {
  color: var(--t-violet); border-bottom: 0; text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 4px; text-transform: none; letter-spacing: .01em; font-weight: 900; font-size: .95rem;
}
html body :is(.story-link, .card-cta, .jc-link, .idea-link):hover { color: var(--t-violet); text-decoration-thickness: 3px; }
/* social buttons: all the same (they all do the same thing) */
html body .social-btn { background: var(--card); color: var(--fg); border-color: var(--line); }
html body .social-btn:hover { background: var(--violet); color: #fff; }
/* whole card is clickable: the card's main link stretches over it; the heart stays on top */
.resource-card { position: relative; }
.resource-card .card-cta::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.resource-card .jx-fav { position: relative; z-index: 2; }
.resource-card:has(.card-cta) { cursor: pointer; }
.resource-card:has(.card-cta):hover .card-cta { text-decoration-thickness: 3px; }
/* labels on cards are flat (no outline) so they never look like buttons */
html body .resource-card .badge { border: 0 !important; }
