:root {
  --naar-charcoal: #222;
  --naar-text: #777;
  --naar-light: #f7f7f7;
  --color-light-gray: #edf5fd;
}

* { box-sizing: border-box; }

body {
  overflow-x: hidden;
  background: #fff;
  color: var(--naar-text);
  font-family: Nunito, Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6,
.font-black, .font-bold {
  color: var(--naar-charcoal);
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 600;
}

p, li { font-family: Nunito, Arial, sans-serif; }

/* The bold-text color rule above (.font-black/.font-bold -> charcoal) also
   matches bold links, pinning their color and defeating Tailwind's text-color
   utilities (this stylesheet is unlayered, so it beats @layer utilities). The
   service-card "More details" CTAs opt out via .card-cta so they can fade from
   ink to red on hover, just like the card-title links. */
a.card-cta { color: var(--color-ems-ink); }
a.card-cta:hover { color: var(--color-ems-red); }

/* Naar-style single dark menu bar */
header.sticky {
  background: var(--naar-charcoal);
  box-shadow: 0 4px 22px rgb(0 0 0 / .08);
}

header .bg-ems-ink\/98 {
  border-color: rgb(255 255 255 / .1);
  background: var(--naar-charcoal);
}

header .bg-ems-ink\/98 > div { min-height: 86px; }

header .bg-ems-ink\/98 a.flex { color: #fff; }
header img.h-12 { height: 3.8rem; width: 3.8rem; }

header .bg-ems-ink\/98 a.flex span {
  color: #fff;
  font-family: Montserrat, Arial, sans-serif;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .08em;
}

header nav > a,
header nav > div > a {
  position: relative;
  color: #fff;
  font-family: Montserrat, Arial, sans-serif;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

header nav[aria-label="Primary"] > a,
header nav[aria-label="Primary"] > div > a {
  color: #fff !important;
  opacity: 1;
  visibility: visible;
}

header nav > a:hover,
header nav > div > a:hover,
header nav > a.text-ems-red,
header nav > div > a.text-ems-red { color: var(--color-ems-red); }

header nav[aria-label="Primary"] > a:hover,
header nav[aria-label="Primary"] > div > a:hover,
header nav[aria-label="Primary"] > a.text-ems-red,
header nav[aria-label="Primary"] > div > a.text-ems-red { color: var(--color-ems-red) !important; }

/* Center-out red underline — DESKTOP bar only. Scoped to nav[aria-label="Primary"]
   so it can't leak into the mobile dropdown (which reuses the same nav > a markup),
   where its bottom:20px offset would land as a red line across the menu text. */
header nav[aria-label="Primary"] > a::after,
header nav[aria-label="Primary"] > div > a::after {
  position: absolute;
  right: 50%;
  bottom: 20px;
  left: 50%;
  height: 2px;
  background: var(--color-ems-red);
  content: "";
  transition: left .2s ease, right .2s ease;
}

header nav[aria-label="Primary"] > a:hover::after,
header nav[aria-label="Primary"] > div > a:hover::after,
header nav[aria-label="Primary"] > a.text-ems-red::after,
header nav[aria-label="Primary"] > div > a.text-ems-red::after { right: 14px; left: 14px; }

header nav > a:last-child {
  margin-left: .5rem;
  border-radius: 4px;
  background: var(--color-ems-red);
  color: #fff;
  padding: .75rem 1.1rem;
}

header nav > a:last-child::after { display: none; }
/* The Members button (last nav item) carries .btn-barn: keep its red fill + white
   label on hover so the charcoal wipe reads correctly. The !important overrides the
   Primary-nav red-text hover rule above. */
header nav > a:last-child:hover { background: var(--color-ems-red); color: #fff; }
header nav[aria-label="Primary"] > a.btn-barn:hover,
header nav[aria-label="Primary"] > a.btn-barn:focus-visible { color: #fff !important; }

header .group > div {
  border: 0;
  border-top: 3px solid var(--color-ems-red);
  background: #fff;
  padding: 0;
  box-shadow: 0 12px 35px rgb(0 0 0 / .12);
}

header .group > div a {
  border-bottom: 1px solid #eee;
  color: #555;
  font-family: Montserrat, Arial, sans-serif;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

header .group > div a:hover { background: var(--color-ems-red); color: #fff; }

/* Calm, centered Naar-style hero */
body > section.relative.isolate {
  min-height: 390px;
  display: grid;
  place-items: center;
  background: #111;
  text-align: center;
}

body > section.relative.isolate > img { filter: saturate(.82) contrast(1.05); }

body > section.relative.isolate > div:nth-of-type(1) {
  background: rgb(0 0 0 / .63);
}

body > section.relative.isolate > div:nth-of-type(2) { display: none; }

body > section.relative.isolate > div.mx-auto { width: 100%; }

body > section.relative.isolate > div.mx-auto.grid {
  display: flex;
  justify-content: center;
}

body > section.relative.isolate > div.mx-auto.grid > div:first-child { width: min(100%, 780px); }
body > section.relative.isolate > div.mx-auto.grid > div.hidden { display: none; }

body > section.relative.isolate .border-l-4 {
  margin-inline: auto;
  border: 0;
  padding-left: 0;
}

body > section.relative.isolate h1 {
  max-width: 900px;
  margin-inline: auto;
  color: var(--color-light-gray);
  font-size: clamp(2.7rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
  text-transform: none;
  text-wrap: balance;
}

body > section.relative.isolate .home-hero-badge-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  width: min(100%, 720px);
  margin-inline: auto;
}

body > section.relative.isolate .home-hero-patch {
  width: clamp(108px, 13vw, 170px);
  filter: drop-shadow(0 12px 12px rgb(0 0 0 / .48));
}

body > section.relative.isolate .home-hero-meta {
  color: #ffb300;
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(.72rem, 1.15vw, .95rem);
  font-weight: 700;
  letter-spacing: .18em;
  text-shadow: 0 2px 9px #000;
  text-transform: uppercase;
  white-space: nowrap;
}

body > section.relative.isolate .text-ems-gold {
  color: #fff;
  font-family: Nunito, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

body > section.relative.isolate .home-hero-kicker {
  position: relative;
  width: min(100%, 690px);
  margin: .85rem auto 0;
  padding-bottom: .8rem;
  color: #ffb300;
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: .075em;
  line-height: 1.15;
  text-shadow: 0 2px 14px rgb(0 0 0 / .45);
  text-transform: uppercase;
}

body > section.relative.isolate .home-hero-kicker::after {
  position: absolute;
  right: 8%;
  bottom: 0;
  left: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffb300 18%, #ffb300 47%, var(--color-ems-red) 47%, var(--color-ems-red) 53%, #ffb300 53%, #ffb300 82%, transparent);
  content: "";
}

body > section.relative.isolate .home-hero-kicker + h1 {
  margin-top: .2rem;
  font-size: clamp(2.5rem, 6vw, 5rem); /* Slightly smaller/shorter */
  font-weight: 700;                   /* Less bold than 800 */
  letter-spacing: -0.005em;             /* Spaced apart (instead of -.035em) */
  line-height: 1.1;                   /* Adds a tiny bit of breathing room */
  text-shadow: 0 9px 7px rgb(0 0 0 / .7), 0 2px 0 rgb(255 255 255 / .15);
  text-transform: uppercase;
  
}

body > section.relative.isolate .home-hero-location {
  margin-top: .7rem;
  color: #fff;
  font-family: Nunito, Arial, sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 400;
}

body > section.relative.isolate p.text-xl,
body > section.relative.isolate p.text-lg {
  margin-inline: auto;
  color: #dbdbdb;
  font-size: 1.25rem;
  line-height: 1.7;
}

body > section.relative.isolate .flex.flex-wrap { justify-content: center; }

body > section.relative.isolate a.rounded-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 50px;
  border-radius: 999px;
  padding: .9rem 1.8rem;
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

body > section.relative.isolate a.bg-ems-red { background: var(--color-ems-red-dark); color: #fff; }
body > section.relative.isolate a.bg-ems-red:hover { background: var(--color-ems-red-dark); }
body > section.relative.isolate a.border { border-color: #fff; background: #fff; color: #333; }
body > section.relative.isolate a.border:hover { border-color: #e6e6e6; background: #e6e6e6; color: #333; }

.naar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  border-radius: 5px;
  background: var(--color-ems-red);
  color: #fff !important;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 22.5px;
  padding: 14px 45px;
  text-decoration: none;
  text-transform: none;
}

/* Base fill stays red on hover; the .btn-barn ::before now supplies the charcoal. */

/* Naar "barn-door" button hover: a charcoal panel wipes in from the center over the
   button's red fill and reverses on mouse-out. Pure CSS — the reduced-motion block at
   the bottom of this file disables the motion. The button keeps its own solid fill;
   isolation:isolate contains the z-index:-1 pseudo so it paints over the fill but under
   the label. */
.btn-barn { position: relative; overflow: hidden; isolation: isolate; }

.btn-barn::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  right: 50%;
  z-index: -1;
  opacity: 0;
  background: var(--naar-charcoal);
  transition: all 600ms cubic-bezier(0.77, 0, 0.175, 1); /* easeInOutQuart */
}

.btn-barn:hover::before,
.btn-barn:focus-visible::before { opacity: 1; left: 0; right: 0; }

/* Shared subtle lift so red (.btn-barn) and secondary (.btn-lift) buttons animate alike. */
.btn-barn,
.btn-lift { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }

.btn-barn:hover,
.btn-barn:focus-visible,
.btn-lift:hover,
.btn-lift:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgb(0 0 0 / .18);
}

/* Content styling follows the lighter Naar sections */
main.bg-ems-paper { background: #fff; }
.max-w-7xl { max-width: 1170px; }

article.rounded-lg,
section.rounded-lg,
nav.rounded-lg,
main .rounded-lg.border {
  border-radius: 3px;
  border-color: #ededed;
}

article.rounded-lg,
section.rounded-lg,
main nav.rounded-lg { box-shadow: 0 8px 28px rgb(0 0 0 / .055); }

article img.rounded-lg,
section img.rounded-lg,
.grid > img.rounded-lg { border-radius: 2px; }

.prose-ems { color: var(--naar-text); font-size: 1rem; }
.prose-ems p { line-height: 1.75; }

.prose-ems h2,
.text-2xl.font-black,
.text-xl.font-black {
  color: var(--naar-charcoal);
  line-height: 1.25;
  text-transform: none;
}

.prose-ems h2 { font-size: clamp(1.8rem, 3vw, 2.65rem); font-weight: 600; }
.prose-ems h3 { font-size: 1.45rem; text-transform: none; }

/* Meeting notices arrive after page load, but remain plain text and use the
   server-rendered schedule as their failure-safe baseline. */
#meeting-notice { border-left: 4px solid #d89a16; }

#meeting-notice[data-notice-type="cancellation"] {
  border-color: var(--color-ems-red);
  background: #fff2f2;
  color: #671515;
}

#meeting-notice[data-notice-type="reschedule"] {
  border-color: #d17b0f;
  background: #fff8e8;
}

#meeting-notice[data-notice-type="location_change"] {
  border-color: #197889;
  background: #eef9fa;
  color: #174e57;
}

#meeting-location-section[data-replacement-location="true"] {
  grid-template-columns: minmax(0, 1fr);
}

/* .bg-ems-red / .text-ems-red / .border-ems-red / .hover:bg-ems-red-dark and the
   prose-ems red now come straight from the unified Tailwind theme (--color-ems-red). */
.bg-ems-ink { background-color: var(--naar-charcoal); }

main aside nav {
  border-top: 4px solid var(--color-ems-red) !important;
  background: #fff !important;
}

main aside nav h2 {
  border-color: var(--color-ems-red);
  color: var(--naar-charcoal);
  font-size: .95rem;
}

main aside nav a {
  border-radius: 2px;
  color: #666;
  font-family: Montserrat, Arial, sans-serif;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

/* Nudge the text down to account for the font's baseline */
span.bg-ems-red {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1; /* Reset line height */
    padding-top: 1px; /* The "nudge" */
}

.bg-ems-red.text-white {
    color: #eeeeee !important;
}

.prose-ems h2 {
  margin-top: -6px;
}

main aside nav a:hover { background: #f5f5f5; color: var(--color-ems-red); }
main aside nav a.bg-ems-red { background: var(--color-ems-red); color: #fff; }

footer.bg-ems-ink {
  border-top: 4px solid var(--color-ems-red);
  background: var(--naar-charcoal);
}

/* Accessible gallery lightbox (DOM built by site.js). */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}

/* Class beats the UA [hidden] rule, so restate display:none for the closed state. */
.lightbox[hidden] { display: none; }

body.lightbox-open { overflow: hidden; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(17 17 17 / .92);
  cursor: zoom-out;
}

.lightbox__figure {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  max-width: min(1100px, 100%);
  margin: 0;
}

.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  background: #111;
  object-fit: contain;
  box-shadow: 0 24px 60px rgb(0 0 0 / .55);
}

.lightbox__caption {
  max-width: 60ch;
  color: #eaeaea;
  font-family: Nunito, Arial, sans-serif;
  font-size: .95rem;
  line-height: 1.5;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgb(0 0 0 / .5);
  color: #fff;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover,
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible { background: var(--color-ems-red); color: #fff; }

.lightbox__close:focus-visible,
.lightbox__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.lightbox__close {
  top: clamp(.75rem, 2vw, 1.5rem);
  right: clamp(.75rem, 2vw, 1.5rem);
  width: 46px;
  height: 46px;
  font-size: 1.9rem;
}

.lightbox__nav {
  top: 50%;
  width: 52px;
  height: 52px;
  font-size: 2rem;
  transform: translateY(-50%);
}

.lightbox__nav[hidden] { display: none; }
.lightbox__prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lightbox__next { right: clamp(.5rem, 2vw, 1.5rem); }

@media (max-width: 1023px) {
  header .bg-ems-ink\/98 > div { min-height: 70px; }

  header summary.my-4 {
    border: 0;
    border-radius: 3px;
    background: var(--color-ems-red);
    color: #fff;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 0;
    letter-spacing: 0;
  }

  header summary.my-4::after { content: "☰"; font-size: 1.15rem; }

  header nav.absolute {
    max-height: calc(100vh - 115px);
    overflow-y: auto;
    border-radius: 0;
    background: var(--naar-charcoal);
  }

  header nav.absolute a,
  header nav.absolute summary {
    color: #fff;
    font-family: Montserrat, Arial, sans-serif;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    transition: background-color .15s ease, color .15s ease;
  }

  /* Naar-style mobile hover/focus: lighten the card and turn the label red
     (replaces the desktop underline, which no longer reaches this menu). The last
     item is the solid-red Members button, so leave it out. */
  header nav.absolute > a:not(:last-child):hover,
  header nav.absolute > a:not(:last-child):focus-visible,
  header nav.absolute > details > summary:hover,
  header nav.absolute > details > summary:focus-visible {
    background: rgb(255 255 255 / .1);
    color: var(--color-ems-red);
  }

  header nav > a:last-child { clip-path: none; margin: 0; }
}

@media (max-width: 639px) {
  body > section.relative.isolate { min-height: 440px; }
  body > section.relative.isolate h1 { font-size: clamp(2.2rem, 11vw, 3rem); }
  body > section.relative.isolate > div.mx-auto { padding-top: 4rem; padding-bottom: 4rem; }
  body > section.relative.isolate p.text-xl,
  body > section.relative.isolate p.text-lg { font-size: 1.05rem; }

  body > section.relative.isolate .home-hero-badge-row {
    grid-template-columns: 1fr auto 1fr;
    gap: .65rem;
  }

  body > section.relative.isolate .home-hero-meta {
    font-size: .58rem;
    letter-spacing: .08em;
  }

  body > section.relative.isolate .home-hero-patch { width: 92px; }
  body > section.relative.isolate .home-hero-kicker { font-size: .92rem; letter-spacing: .08em; }
  body > section.relative.isolate .home-hero-kicker + h1 { font-size: clamp(2.8rem, 15vw, 4rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
