/* NJJBA website — phone-first. Civic, steady, blue: the Alliance's own blue carries the page;
   brass is kept for dates and small marks only. */
:root {
  --blue: #003897;        /* Alliance blue (brand) */
  --blue-deep: #0a2463;   /* header, footer, date tabs */
  --ink: #16203a;         /* body text */
  --muted: #55607a;       /* secondary text */
  --paper: #ffffff;       /* page */
  --wash: #eef2f9;        /* quiet bands */
  --line: #d5dcea;        /* hairlines */
  --brass: #a87b2c;       /* dates, small marks */
  --on-blue: #ffffff;
  --link: #003897;
  --card: #ffffff;
  --display: "Spectral", Georgia, "Times New Roman", serif;
  --body: "Public Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --step--1: 0.875rem; --step-0: 1rem; --step-1: 1.25rem; --step-2: 1.6rem; --step-3: 2.1rem; --step-4: 2.75rem;
  --radius: 10px;
  --gutter: max(18px, env(safe-area-inset-left, 0px));
  --gutter-r: max(18px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7ecf6; --muted: #a8b3cb; --paper: #0d1528; --wash: #131e37; --line: #26345a;
    --card: #152241; --brass: #d4ac62; --link: #8fb0ff; --blue-deep: #081a4a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--step-0)/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; max-width: 66ch; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.stack > * + * { margin-top: 1rem; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 12px; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--blue); z-index: 50; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--blue); color: var(--on-blue); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; margin-right: auto; min-width: 0; }
.brand img { width: 44px; height: 44px; }
.brand span { font-family: var(--display); font-weight: 600; font-size: 1.02rem; line-height: 1.15; }
.brand small { display: block; font: 400 0.72rem/1.2 var(--body); opacity: 0.85; }
.menu-btn { appearance: none; border: 1px solid rgba(255,255,255,.45); background: transparent; color: inherit; border-radius: 8px;
  font: 600 0.9rem var(--body); padding: 9px 14px; min-height: 44px; cursor: pointer; }
.nav { display: none; }
.nav.open { display: block; position: fixed; inset: calc(64px + env(safe-area-inset-top, 0px)) 0 0 0; background: var(--blue-deep); overflow-y: auto;
  padding: 8px var(--gutter-r) calc(24px + env(safe-area-inset-bottom, 0px)) var(--gutter); }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { display: block; color: #fff; text-decoration: none; padding: 14px 4px; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.nav a[aria-current="page"] { color: #ffd98a; }
.nav .nav-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.nav .nav-actions a { border: 0; padding: 0; }
@media (min-width: 980px) {
  .menu-btn { display: none; }
  .nav, .nav.open { display: flex; position: static; background: none; padding: 0; overflow: visible; align-items: center; gap: 18px; }
  .nav ul { display: flex; gap: 2px; }
  .nav a { font-size: 0.92rem; padding: 8px 9px; border: 0; border-radius: 6px; }
  .nav a:hover { background: rgba(255,255,255,.12); }
  .nav .nav-actions { margin: 0; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 999px;
  font: 600 0.98rem var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-gold { background: #ffd98a; color: #0a2463; }
.btn-white { background: #fff; color: var(--blue); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-line { border-color: var(--line); color: var(--link); background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Hero */
.hero { position: relative; color: #fff; background: var(--blue-deep); isolation: isolate; overflow: hidden; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,26,77,.55) 0%, rgba(0,26,77,.78) 55%, rgba(0,26,77,.94) 100%); }
.hero .wrap { padding-block: 56px 40px; display: grid; gap: 18px; }
.hero h1 { font-size: clamp(2.2rem, 7.5vw, 4rem); max-width: 16ch; }
.hero p { font-size: var(--step-1); line-height: 1.45; max-width: 34ch; opacity: .95; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--step--1); opacity: .9; margin-top: 8px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.25); }
.page-head { background: var(--blue); color: #fff; }
.page-head .wrap { padding-block: 36px 30px; display: grid; gap: 10px; }
.page-head .btn-row { margin-top: 8px; }
.page-head p { opacity: .92; font-size: var(--step-1); line-height: 1.45; }

/* Sections */
.band { padding-block: 44px; }
.band.wash { background: var(--wash); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink); }
.muted { color: var(--muted); }
.split { display: grid; gap: 28px; align-items: center; }
.split img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } .split.flip > :first-child { order: 2; } }

/* The three pillars: words first, photo as a strip, readable on any phone */
.pillars { display: grid; gap: 22px; }
@media (min-width: 820px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); }
.pillar h3 { margin-top: 14px; font-size: var(--step-2); color: var(--blue); }
@media (prefers-color-scheme: dark) { .pillar h3 { color: var(--link); } }
.pillar p { margin-top: 6px; }

/* Events: the date tab is the page's signature */
.events { display: grid; gap: 16px; }
@media (min-width: 820px) { .events.grid { grid-template-columns: repeat(2, 1fr); } }
.event { display: grid; grid-template-columns: 76px 1fr; gap: 16px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.event > div { min-width: 0; }
.tab { background: var(--blue-deep); color: #fff; border-radius: 8px; text-align: center; padding: 10px 4px 12px; align-self: start;
  font-variant-numeric: tabular-nums; }
.tab .m { display: block; font: 700 0.78rem/1 var(--body); letter-spacing: .08em; color: #ffd98a; }
.tab .d { display: block; font: 600 2.2rem/1 var(--display); margin-top: 4px; }
.tab .w { display: block; font-size: .72rem; opacity: .85; margin-top: 4px; }
.event h3 { font-size: var(--step-1); }
.event .when, .event .where { font-size: var(--step--1); color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.event .desc { margin-top: 8px; font-size: .95rem; overflow-wrap: anywhere; }
.event .btn-row { margin-top: 12px; }
.event .btn { min-height: 42px; padding: 0 16px; font-size: .92rem; }
.event .flyer { grid-column: 1 / -1; }
.event .flyer img { border-radius: 8px; max-height: 520px; width: auto; margin-inline: auto; }
.note { padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* Membership tiers */
.tiers { display: grid; gap: 16px; }
@media (min-width: 700px) { .tiers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .tiers { grid-template-columns: repeat(4, 1fr); } }
.tier { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.tier.top-tier { border: 2px solid var(--brass); }
.tier .price { font: 600 2rem/1 var(--display); color: var(--blue); }
@media (prefers-color-scheme: dark) { .tier .price { color: var(--link); } }
.tier .price small { font: 400 .85rem var(--body); color: var(--muted); }
.tier ul { margin: 0; padding-left: 1.1em; font-size: .95rem; }
.tier li + li { margin-top: 6px; }
.tier .fine { font-size: var(--step--1); color: var(--muted); }

/* Logos & photos */
.logo-wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 600px) { .logo-wall { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .logo-wall { grid-template-columns: repeat(5, 1fr); } }
.logo-wall figure { margin: 0; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; aspect-ratio: 3/2; display: grid; place-items: center; padding: 10px; }
.logo-wall img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }
.tier-label { font: 600 var(--step-1) var(--display); margin: 28px 0 12px; display: flex; gap: 10px; align-items: baseline; }
.tier-label span { font: 400 var(--step--1) var(--body); color: var(--muted); }
.photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 760px) { .photos { grid-template-columns: repeat(3, 1fr); } }
.photos button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; overflow: hidden; }
.photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.album + .album { margin-top: 36px; }
.album h2 { font-size: var(--step-2); margin-bottom: 12px; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(5,12,30,.94); display: grid; place-items: center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.lightbox img { max-height: 84vh; width: auto; border-radius: 6px; }
.lightbox button { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px));
  background: #fff; color: #0a2463; border: 0; border-radius: 999px; min-height: 44px; padding: 0 18px; font: 600 .95rem var(--body); cursor: pointer; }

/* People */
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
@media (min-width: 760px) { .people { grid-template-columns: repeat(4, 1fr); } }
.person img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); background: var(--wash); }
.person h3 { font-size: 1.08rem; margin-top: 10px; }
.person p { font-size: var(--step--1); color: var(--muted); }
blockquote { margin: 0; padding: 22px; border-left: 4px solid var(--brass); background: var(--wash); border-radius: 0 var(--radius) var(--radius) 0; }
blockquote p { font: 400 var(--step-1)/1.5 var(--display); }
blockquote footer { margin-top: 10px; font-size: var(--step--1); color: var(--muted); }

/* Lists of files / newsletters */
.files { display: grid; gap: 10px; }
.file { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; color: var(--ink); }
.file > div { min-width: 0; flex: 1; }
.file strong { display: block; }
.file span { font-size: var(--step--1); color: var(--muted); }
.file .go { flex: none; font-weight: 600; color: var(--link); font-size: .92rem; }
.feature { display: grid; gap: 22px; align-items: center; padding: 22px; border-radius: var(--radius); background: var(--blue-deep); color: #fff; }
.feature img { max-height: 280px; width: auto; margin-inline: auto; border-radius: 6px; }
@media (min-width: 760px) { .feature { grid-template-columns: 220px 1fr; } }
.newsletters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 760px) { .newsletters { grid-template-columns: repeat(3, 1fr); } }
.newsletters button { all: unset; cursor: zoom-in; display: block; }
.newsletters img { border: 1px solid var(--line); border-radius: 6px; aspect-ratio: 8.5/11; object-fit: cover; object-position: top; width: 100%; }
.newsletters p { font-size: var(--step--1); margin-top: 6px; }

/* Directory search */
.search { width: 100%; min-height: 48px; padding: 0 14px; font: 400 1rem var(--body); border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: thin; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: 500 .85rem var(--body); cursor: pointer; min-height: 36px; }
.chips button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.biz-list { display: grid; gap: 10px; margin-top: 14px; }
.biz { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.biz .cat { font-size: .78rem; color: var(--brass); font-weight: 600; }
.biz h3 { font: 600 1.05rem var(--body); margin-top: 2px; }
.biz p { font-size: .92rem; margin-top: 6px; overflow-wrap: anywhere; }
.biz .links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .92rem; }

/* Contact */
.contact-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.contact-card h3 { font-size: 1.05rem; font-family: var(--body); font-weight: 600; color: var(--muted); }
.contact-card a, .contact-card address { display: block; margin-top: 6px; font-size: var(--step-1); font-style: normal; overflow-wrap: anywhere; }

/* CTA + footer */
.cta { background: var(--blue); color: #fff; }
.cta .wrap { padding-block: 40px; display: grid; gap: 16px; }
.foot { background: var(--blue-deep); color: #dfe6f5; font-size: var(--step--1); }
.foot .wrap { padding-block: 36px calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 24px; }
@media (min-width: 820px) { .foot .wrap { grid-template-columns: 1.3fr 1fr 1fr; } }
.foot a { color: #fff; }
.foot h2 { font: 600 1rem var(--body); color: #ffd98a; margin-bottom: 8px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; opacity: .8; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.nav .nav-actions a.btn { display: inline-flex; padding: 0 18px; min-height: 42px; border-radius: 999px; font-size: .92rem; }
.nav .nav-actions a.btn-ghost { border: 2px solid rgba(255,255,255,.7); }
.nav .nav-actions a.btn-gold { color: #0a2463; }
.nav .nav-actions a.btn-gold:hover { background: #ffe3a8; }
