:root {
  --navy: #0a124f;
  --navy-deep: #060b33;
  --red: #b71c1c;
  --gold: #d4a017;
  --ink: #1a1a1a;
  --muted: #4a4a4a;
  --paper: #f7f5f0;
  --white: #ffffff;
  --line: rgba(10, 18, 79, 0.12);
  --shadow: 0 18px 40px rgba(6, 11, 51, 0.18);
  --font: "Poppins", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(212, 160, 23, 0.12), transparent 32%),
    linear-gradient(180deg, #eef1f8 0%, var(--paper) 38%, #ebe7df 100%);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: white;
  padding: 0.5rem 0.75rem;
}

.site-header {
  background: linear-gradient(180deg, var(--navy-deep), var(--navy));
  color: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: white;
}
.brand img {
  width: 58px;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.brand-text span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.78);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: white;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  align-items: center;
}
.nav a {
  color: rgba(255,255,255,0.9);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a:hover,
.nav a[aria-current="page"] {
  background: rgba(255,255,255,0.12);
  color: white;
}

.dropdown {
  position: relative;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 220px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.45rem;
  z-index: 20;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: grid;
}
.dropdown-menu a {
  color: var(--navy);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}
.dropdown-menu a:hover {
  background: #eef1f8;
  color: var(--red);
}

.hero {
  position: relative;
  min-height: min(72vh, 640px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #111;
}
.hero-slides {
  position: absolute;
  inset: 0;
}
.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-slides img.is-active { opacity: 1; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,11,51,0.25) 0%, rgba(6,11,51,0.55) 45%, rgba(6,11,51,0.82) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2.5rem;
  color: white;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.25rem;
  align-items: end;
}
.hero-badge {
  width: 140px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.45));
}
.hero h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.01em;
}
.hero p {
  margin: 0;
  max-width: 48rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.92);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.page-hero {
  background:
    linear-gradient(135deg, rgba(10,18,79,0.92), rgba(183,28,28,0.78)),
    url("../assets/img/convention-hero.jpg") center/cover;
  color: white;
  padding: 3.5rem 1.25rem;
}
.page-hero .wrap { padding-top: 0; padding-bottom: 0; }
.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}
.page-hero p {
  margin: 0;
  max-width: 42rem;
  color: rgba(255,255,255,0.9);
}

.panel {
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(6,11,51,0.06);
  backdrop-filter: blur(6px);
}
.panel + .panel { margin-top: 1.25rem; }

.section-title {
  margin: 0 0 1rem;
  color: var(--navy);
  font-size: 1.45rem;
}

.prose {
  line-height: 1.7;
  color: var(--muted);
  font-size: 1.02rem;
}
.prose p { margin: 0 0 1rem; }
.prose p:last-child { margin-bottom: 0; }

.notice {
  border-left: 5px solid var(--gold);
  background: #fff8e8;
  color: #4a3a12;
  padding: 1.1rem 1.2rem;
  border-radius: 0 14px 14px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.25rem;
  margin-top: -2.5rem;
  position: relative;
  z-index: 2;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.05rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 0;
  cursor: pointer;
}
.btn-primary {
  background: var(--navy);
  color: white;
}
.btn-primary:hover { background: var(--red); color: white; }
.btn-secondary {
  background: white;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--navy); color: var(--red); }

/* Officers board — mirrors Wix hierarchy (1 / 4 / 3 / 2 / text) */
.page-officers {
  --sage: #c5d6c4;
  --officer-ink: #1b1b1b;
}
.page-officers .page-hero {
  display: none;
}
.page-officers main.wrap {
  max-width: 1100px;
  padding-top: 1.5rem;
}
.officer-board {
  background: var(--sage);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 2rem 1.25rem 2.75rem;
}
.officer-board .section-title {
  text-align: center;
  color: var(--navy);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  margin: 0 0 1.75rem;
  font-weight: 600;
}
.officer-grid {
  display: grid;
  gap: 1.35rem 1.1rem;
  margin: 0 auto 1.65rem;
  justify-content: center;
  justify-items: center;
}
.officer-grid-1 { grid-template-columns: 148px; }
.officer-grid-2 { grid-template-columns: repeat(2, 148px); }
.officer-grid-3 { grid-template-columns: repeat(3, 148px); }
.officer-grid-4 { grid-template-columns: repeat(4, 148px); }
.officer-grid-text {
  margin-top: 0.5rem;
  margin-bottom: 0;
  grid-template-columns: repeat(4, minmax(140px, 170px));
  gap: 1.25rem 1.5rem;
  align-items: stretch;
}
.officer-grid-text .officer.no-photo {
  width: 100%;
}
.officer-grid-text .officer-body {
  display: grid;
  grid-template-rows: 2.6em auto auto;
  justify-items: center;
  text-align: center;
  height: 100%;
}
.officer-grid-text .role {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 0;
  line-height: 1.25;
  max-width: 11em;
}
.officer-grid-text .lodge {
  margin-top: 0.4rem;
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  width: max-content;
  max-width: 100%;
}
@media (max-width: 760px) {
  .officer-grid-4 { grid-template-columns: repeat(2, 148px); }
  .officer-grid-3 { grid-template-columns: repeat(2, 148px); }
  .officer-grid-text { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}
@media (max-width: 420px) {
  .officer-grid-4,
  .officer-grid-3,
  .officer-grid-2,
  .officer-grid-1,
  .officer-grid-text {
    grid-template-columns: 148px;
  }
}
.officer {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  text-align: center;
  width: 148px;
}
.officer img {
  width: 148px;
  height: 198px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center top;
  background: #b7c9b6;
  display: block;
  margin: 0 auto;
}
.officer.no-photo {
  display: block;
  width: auto;
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.officer-body {
  padding: 0.55rem 0.15rem 0;
}
.officer-body h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--officer-ink);
  line-height: 1.25;
}
.officer-body .role {
  margin: 0 0 0.1rem;
  font-weight: 700;
  color: var(--officer-ink);
  font-size: 0.95rem;
  line-height: 1.25;
}
.officer-body .lodge {
  margin: 0.1rem 0 0;
  color: var(--officer-ink);
  font-size: 0.88rem;
  line-height: 1.25;
}

.doc-grid,
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}
.doc-card,
.link-card {
  display: block;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: white;
  border: 1px solid var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.doc-card:hover,
.link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--navy);
}
.doc-card strong,
.link-card strong {
  display: block;
  margin-bottom: 0.25rem;
}
.doc-card span,
.link-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.deadlines {
  list-style: none;
  margin: 0;
  padding: 0;
}
.deadlines li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.deadlines li:last-child { border-bottom: 0; }
.deadlines time {
  font-weight: 700;
  color: var(--navy);
}

.lodge-list {
  display: grid;
  gap: 1rem;
}
.lodge {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  background: white;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.lodge h3 {
  margin: 0;
  color: var(--navy);
}
.lodge p { margin: 0; color: var(--muted); }

.contact-box {
  font-size: 1.15rem;
}
.contact-box a {
  font-weight: 700;
  font-size: 1.25rem;
}

.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.82);
  padding: 2rem 1.25rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.cipherware-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}
.cipherware-credit:hover {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.35);
}
.cipherware-credit img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
}
.cipherware-credit span {
  font-size: 0.92rem;
  white-space: nowrap;
}
.social {
  display: flex;
  gap: 0.65rem;
}
.social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: grid;
  place-items: center;
}
.social img { width: 18px; height: 18px; filter: invert(1); }
.staging-note {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

/* Memorial / Our Circle is Broken */
.page-memorial {
  background:
    radial-gradient(circle at top, rgba(197, 214, 196, 0.55), transparent 42%),
    linear-gradient(180deg, #eef1f8 0%, #f4f1ea 45%, #ebe7df 100%);
}
.memorial-hero {
  text-align: center;
  padding: 2.25rem 1rem 1.25rem;
}
.memorial-eyebrow {
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.memorial-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--navy);
  font-style: italic;
  font-weight: 600;
}
.memorial-lead {
  margin: 0 auto;
  max-width: 38rem;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.05rem;
}
.memorial-panel .section-title {
  text-align: center;
}
.memorial-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.memorial-entry {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f7f8fc);
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.memorial-entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(10, 18, 79, 0.28);
  color: var(--ink);
}
.memorial-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
}
.memorial-meta {
  color: var(--muted);
  font-size: 0.95rem;
}
.memorial-cta {
  margin-top: 0.35rem;
  font-weight: 600;
  color: var(--red);
  font-size: 0.92rem;
}
.memorial-note {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

/* News hub + lodge calendars */
.news-intro { margin: 0 0 1.25rem; text-align: center; }
.news-btn-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.news-btn {
  display: grid;
  place-items: center;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  text-align: center;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #1a2a7a 0%, #0a124f 55%, #1e3a8a 100%);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.news-btn:hover { filter: brightness(1.08); color: white; }
.news-btn-lodge {
  background: linear-gradient(135deg, #243b8c 0%, #0a124f 50%, #2f6fb5 100%);
}
.news-btn-aux {
  background: linear-gradient(135deg, #243b8c 0%, #0a124f 50%, #2f6fb5 100%);
}
.news-btn-wotm {
  background: linear-gradient(90deg, #6b2d8b, #c45a9a);
}
.news-btn-territory {
  background: #1f4d2e;
  color: #f0d45a;
}
.news-btn-territory:hover { color: #fff6b0; }
.news-btn-regional {
  background: #234a4f;
  color: #e0b07a;
}
.news-btn-regional:hover { color: #ffd7a8; }
.news-btn-intl {
  background: linear-gradient(135deg, #7a1d1d, #b71c1c 60%, #8b1e1e);
}
.news-btn-circle {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: min(420px, 100%);
  background:
    linear-gradient(rgba(47, 110, 109, 0.88), rgba(47, 110, 109, 0.88)),
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18), transparent 40%),
    #2f6e6d;
  border-radius: 12px;
}
.news-gallery { padding: 0; overflow: hidden; }
.news-slides {
  position: relative;
  min-height: 280px;
  background: #111;
}
.news-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.news-slides img.is-active { opacity: 1; }
.news-cob {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.news-cob img {
  width: 100%;
  border-radius: 12px;
  background: #dfe3ef;
}
.lodge-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.1rem 0;
}
.pdf-card,
.pdf-card-static {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 110px;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.92rem;
}
.pdf-card img,
.pdf-card-static img {
  width: 64px;
  height: auto;
}
.calendar-figure {
  margin: 1rem 0 0;
}
.calendar-figure img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
}
.calendar-figure figcaption {
  margin-top: 0.45rem;
  text-align: center;
  font-weight: 600;
  color: var(--navy);
}
.lodge-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}
.lodge-photos img {
  width: 100%;
  border-radius: 10px;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0.75rem;
  }
  .nav.is-open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    background: rgba(255,255,255,0.06);
  }
  .dropdown.is-open .dropdown-menu { display: grid; }
  .dropdown-menu a { color: white; }
  .home-grid,
  .hero-content {
    grid-template-columns: 1fr;
  }
  .hero-badge { width: 110px; }
  .deadlines li { grid-template-columns: 1fr; gap: 0.2rem; }
  .news-btn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-btn-circle { grid-column: 1 / -1; }
  .news-cob { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .news-btn-grid { grid-template-columns: 1fr; }
}
