/* Joist & Journey — base styles used on every page.
   Brand: crisp black & white, deep burgundy-plum accent, elegant serif
   headings + humanist sans body + condensed/mono UI labels.
   Project-type color system lives here as custom properties so dashboard
   pages (later plans) reuse the same palette. */
:root {
  --ink: #16141a;            /* near-black text, not pure #000 */
  --paper: #ffffff;
  --neutral-50: #f7f6f4;     /* light neutral background */
  --neutral-200: #e6e3df;
  --neutral-500: #6b6560;    /* AA-compliant (~4.6:1 on white) for small secondary text */
  --plum: #5b1f3b;           /* primary burgundy-plum accent */
  --plum-600: #74274b;
  --plum-100: #f3e7ee;

  /* Project-type colors (used by platform UI in later plans) */
  --pt-events: #6b3fa0;
  --pt-campaign-events: #7d4bb5;
  --pt-fundraisers: #8a57c2;
  --pt-weddings: #9b6fce;
  --pt-grand-opening-events: #5e3a8c;
  --pt-home-renovation: #2f7a52;
  --pt-business-launch: #2e8b57;
  --pt-marketing-campaign: #3a9d6a;
  --pt-product-launch: #45ad77;
  --pt-construction: #277048;

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --maxw: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
a { color: var(--plum); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--plum-600);
  outline-offset: 2px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.eyebrow { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--plum); }

/* Buttons */
.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer;
  padding: .8rem 1.4rem; border-radius: var(--radius); border: 2px solid var(--plum);
  background: var(--plum); color: #fff; text-decoration: none; transition: background .15s ease;
}
.btn:hover { background: var(--plum-600); }
.btn-ghost { background: transparent; color: var(--plum); }
.btn-ghost:hover { background: var(--plum-100); }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus, .skip-link:focus-visible { left: 0; }

/* Nav */
.site-header { border-bottom: 1px solid var(--neutral-200); position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); z-index: 50; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; }
.brand img { height: 30px; width: auto; }
.site-header nav { display: contents; } /* passthrough so <nav> wrapper doesn't break the .bar flex layout */
.nav-links { display: flex; gap: 1.25rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: .98rem; }
.nav-links a.btn { color: #fff; }
.nav-links a:hover { color: var(--plum); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--neutral-200); padding: 1rem 1.25rem; }
  .nav-links.open { display: flex; }
}

/* Footer */
.site-footer { background: var(--neutral-50); border-top: 1px solid var(--neutral-200); margin-top: 4rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding: 2.5rem 0; }
.site-footer .tagline { color: var(--neutral-500); max-width: 32ch; }
.site-footer h4 { font-family: var(--font-mono); text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; color: var(--neutral-500); }
.site-footer ul { list-style: none; padding: 0; margin: .5rem 0 0; }
.site-footer a { color: var(--ink); text-decoration: none; display: inline-block; padding: .2rem 0; }
.site-footer .legal { border-top: 1px solid var(--neutral-200); padding: 1rem 0; font-size: .82rem; color: var(--neutral-500); }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* Cards / sections */
section { padding: 3.5rem 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.card { border: 1px solid var(--neutral-200); border-radius: var(--radius); padding: 1.5rem; background: #fff; }
.card h3 { margin-top: .4rem; }

/* Forms */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--neutral-500); }
.field input, .field select, .field textarea {
  font: inherit; padding: .65rem .75rem; border: 1px solid var(--neutral-200); border-radius: 8px; background: #fff;
}
.field .err { color: #b00020; font-size: .82rem; }
.honeypot { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Notification bell (injected into .nav-links by notifications.js) */
.notif-li { position: relative; display: flex; align-items: center; }
.notif-wrap { position: relative; }
.notif-btn {
  position: relative; background: transparent; border: none; cursor: pointer;
  padding: .25rem; line-height: 1; font-size: 1.15rem; color: var(--ink);
}
.notif-btn:hover { color: var(--plum); }
.notif-badge {
  position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px;
  padding: 0 4px; border-radius: 9px; background: var(--plum); color: #fff;
  font-family: var(--font-mono); font-size: .66rem; line-height: 18px; text-align: center;
}
.notif-dropdown {
  position: absolute; right: 0; top: calc(100% + .5rem); width: 320px; max-width: 86vw;
  background: #fff; border: 1px solid var(--neutral-200); border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0,0,0,.12); z-index: 60; overflow: hidden;
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem .85rem; border-bottom: 1px solid var(--neutral-200);
  font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--neutral-500);
}
.notif-readall { background: transparent; border: none; cursor: pointer; color: var(--plum); font: inherit; font-size: .72rem; text-transform: uppercase; }
.notif-items { max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex; flex-direction: column; gap: .2rem; padding: .65rem .85rem;
  border-bottom: 1px solid var(--neutral-200); text-decoration: none; color: var(--ink);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--neutral-50); }
.notif-item.unread { background: var(--plum-100); }
.notif-item.unread:hover { background: var(--plum-100); }
.notif-msg { font-size: .9rem; }
.notif-when { font-family: var(--font-mono); font-size: .68rem; color: var(--neutral-500); }
.notif-empty { padding: 1rem .85rem; margin: 0; color: var(--neutral-500); font-size: .88rem; }
@media (max-width: 720px) {
  .notif-dropdown { position: static; width: 100%; box-shadow: none; margin-top: .5rem; }
}
