/* ==========================================================================
   CRAFT & CHARTER — Design Tokens
   Palette
     --navy        #14213D   primary ground, header/footer
     --navy-deep   #0C1730   darkest panels, mega-menu
     --brass       #B08D57   primary accent, rules, icons
     --brass-light #D8BE8A   hover states, thin linework
     --parchment   #F3EEDF   page background
     --paper       #FBF9F2   card background
     --maroon      #6E2A35   CTA / secondary accent
     --ink         #22242B   body text
     --ink-soft    #55575F   muted text
   Type
     Display : "Cormorant Garamond" (engraved, charter-plate serif)
     Body    : "Source Sans 3"
     Utility : Cormorant Garamond, small-caps, letter-spaced (eyebrows/labels)
   Signature element: the "square & compass" hairline divider (.sc-divider)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,500&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --navy: #14213D;
  --navy-deep: #0C1730;
  --brass: #B08D57;
  --brass-light: #D8BE8A;
  --parchment: #F3EEDF;
  --paper: #FBF9F2;
  --maroon: #6E2A35;
  --ink: #22242B;
  --ink-soft: #55575F;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1200px;
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--navy);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--font-display);
  font-variant: small-caps;
  letter-spacing: 0.14em;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brass);
  display: inline-block;
  margin-bottom: 0.6em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85em 1.6em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--brass); color: var(--navy-deep); }
.btn-primary:hover { background: var(--brass-light); }
.btn-outline { background: transparent; color: var(--paper); border-color: rgba(251,249,242,0.5); }
.btn-outline:hover { border-color: var(--brass); color: var(--brass-light); }
.btn-maroon { background: var(--maroon); color: var(--paper); }
.btn-maroon:hover { background: #802f3c; }

/* ---- Signature element: square & compass hairline divider ---- */
.sc-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 3rem 0;
  color: var(--brass);
}
.sc-divider::before,
.sc-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  max-width: 220px;
  background: linear-gradient(90deg, transparent, var(--brass) 50%, transparent);
  opacity: 0.6;
}
.sc-divider svg { width: 30px; height: 30px; }
.sc-divider.on-dark { color: var(--brass-light); }

/* ==========================================================================
   Skip link / accessibility
   ========================================================================== */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--paper);
  padding: 12px 20px; z-index: 10000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ==========================================================================
   Top utility bar
   ========================================================================== */
.top-bar {
  background: var(--navy-deep);
  color: var(--brass-light);
  font-size: 0.85rem;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 16px;
  flex-wrap: wrap;
}
.top-bar a { color: var(--brass-light); }
.top-bar ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }

/* ==========================================================================
   Site header + primary nav
   ========================================================================== */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid rgba(176,141,87,0.35);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}
.site-branding { display: flex; align-items: center; gap: 14px; margin-left: 15%; }
.site-branding img.custom-logo { max-height: 56px; width: auto; }
.site-title {
  font-family: var(--font-display);
  color: var(--paper);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
}
.site-title a { color: var(--paper); }
.site-description {
  font-family: var(--font-display);
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--brass-light);
  font-size: 0.95rem;
  margin: 0;
}

/* Primary menu */
.primary-navigation { position: relative; }
.primary-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
}
.primary-menu > li { position: relative; }
.primary-menu > li > a {
  display: block;
  color: var(--paper);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 12px 16px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
  color: var(--brass-light);
  border-bottom-color: var(--brass);
}

/* Mega / dropdown submenu, in the spirit of UGLE's expanding menu panel */
.primary-menu ul.sub-menu {
  list-style: none;
  margin: 0;
  padding: 14px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--navy-deep);
  border-top: 2px solid var(--brass);
  box-shadow: 0 18px 30px rgba(0,0,0,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.primary-menu li:hover > ul.sub-menu,
.primary-menu li:focus-within > ul.sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.primary-menu ul.sub-menu a {
  display: block;
  padding: 10px 22px;
  color: var(--parchment);
  font-size: 0.92rem;
  font-weight: 500;
}
.primary-menu ul.sub-menu a:hover { color: var(--brass-light); background: rgba(176,141,87,0.08); }

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--brass);
  color: var(--brass-light);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(180deg, rgba(12,23,48,0.35) 0%, rgba(12,23,48,0.88) 88%), var(--navy);
  background-size: cover;
  background-position: center;
  color: var(--paper);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, rgba(176,141,87,0.05) 0 2px, transparent 2px 90px);
  pointer-events: none;
}
.hero-inner { position: relative; padding: 64px 0 72px; max-width: 780px; }
.hero .eyebrow { color: var(--brass-light); }
.hero h1 { color: var(--paper); }
.hero p.lede { font-size: 1.2rem; color: rgba(251,249,242,0.88); max-width: 620px; }
.hero-actions { display: flex; gap: 14px; margin-top: 1.6rem; flex-wrap: wrap; }

/* ==========================================================================
   Pillars / values grid (Integrity, Friendship, Respect, Service — style)
   ========================================================================== */
.pillars {
  background: var(--paper);
  padding: 4rem 0;
  border-top: 1px solid rgba(20,33,61,0.08);
  border-bottom: 1px solid rgba(20,33,61,0.08);
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 2rem;
}
.pillars-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.pillar-card {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  border: 1px solid rgba(176,141,87,0.35);
  background: var(--parchment);
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(20,33,61,0.12); }

/* Top half: either the optional image (scaled/cropped to fill) or the
   default square-and-compass icon on a plain brass-bordered ground. */
.pillar-media {
  flex: 1 1 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--paper);
  border-bottom: 1px solid rgba(176,141,87,0.35);
  overflow: hidden;
}
.pillar-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.pillar-card .icon { width: 44px; height: 44px; color: var(--brass); }

/* Bottom half: title + optional text, always on a solid, readable ground. */
.pillar-body {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.6rem 1.4rem;
}
.pillar-body h3 { font-size: 1.25rem; margin-bottom: 0.4em; text-align: center; }
.pillar-body p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; text-align: center; }

/* ==========================================================================
   Intro / two-column "about" band
   ========================================================================== */
.intro-band { padding: 5rem 0; }
.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.intro-grid img { border: 6px solid var(--paper); box-shadow: 0 20px 40px rgba(20,33,61,0.16); }
.stat-row { display: flex; gap: 40px; margin-top: 2rem; flex-wrap: wrap; }
.stat-row .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--navy);
  line-height: 1;
}
.stat-row .stat span { color: var(--ink-soft); font-size: 0.9rem; }

/* ==========================================================================
   News / posts grid
   ========================================================================== */
.news-section { background: var(--navy); color: var(--paper); padding: 5rem 0; }
.news-section .eyebrow { color: var(--brass-light); }
.news-section h2 { color: var(--paper); }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 2.5rem;
}
.news-card {
  background: var(--navy-deep);
  border: 1px solid rgba(176,141,87,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.news-card .thumb { aspect-ratio: 16/10; background-size: cover; background-position: center; background-color: #0a1226; }
.news-card .body { padding: 20px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.news-card .date { font-family: var(--font-display); font-variant: small-caps; letter-spacing: 0.08em; color: var(--brass); font-size: 0.85rem; }
.news-card h3 { color: var(--paper); font-size: 1.3rem; margin: 0.4em 0 0.5em; }
.news-card p { color: rgba(251,249,242,0.75); font-size: 0.94rem; flex: 1; }
.news-card a.read-more { color: var(--brass-light); font-weight: 600; font-size: 0.9rem; }

/* ---- Front-page news carousel ---- */
.news-carousel {
  position: relative;
  margin-top: 2.5rem;
  padding: 0 60px;
}
.news-track {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.news-track::-webkit-scrollbar { display: none; }
.news-track .news-card {
  flex: 0 0 calc((100% - 56px) / 3);
  scroll-snap-align: start;
}
.news-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy-deep);
  border: 1px solid var(--brass);
  color: var(--brass-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.news-nav:hover { background: var(--brass); color: var(--navy-deep); }
.news-nav.prev { left: 0; }
.news-nav.next { right: 0; }
.news-nav:disabled { opacity: 0.3; cursor: default; }
.news-nav:disabled:hover { background: var(--navy-deep); color: var(--brass-light); }
.news-nav.is-loading { opacity: 0.6; cursor: progress; }

/* ==========================================================================
   CTA band (join / find a lodge)
   ========================================================================== */
.cta-band {
  background: var(--maroon);
  color: var(--paper);
  padding: 3.5rem 0;
  text-align: center;
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: rgba(251,249,242,0.85); max-width: 640px; margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Standard content page
   ========================================================================== */
.page-header-band {
  background: var(--navy);
  color: var(--paper);
  padding: 3.2rem 0;
  border-bottom: 3px solid var(--brass);
}
.page-header-band h1 { color: var(--paper); margin: 0; }
.page-header-band .eyebrow { color: var(--brass-light); }

.content-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 56px;
  padding: 3.5rem 0 5rem;
}
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content blockquote {
  border-left: 3px solid var(--brass);
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.4em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--navy);
}

.widget-area .widget {
  background: var(--paper);
  border: 1px solid rgba(20,33,61,0.1);
  padding: 24px;
  margin-bottom: 24px;
}
.widget-area .widget-title {
  font-family: var(--font-display);
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: var(--navy);
  font-size: 1.15rem;
  border-bottom: 2px solid var(--brass);
  padding-bottom: 0.4em;
  margin-bottom: 0.8em;
}
.widget-area ul { list-style: none; margin: 0; padding: 0; }
.widget-area li { padding: 6px 0; border-bottom: 1px dashed rgba(20,33,61,0.12); }

.pagination { display: flex; gap: 10px; margin-top: 2.5rem; }
.pagination a, .pagination span {
  padding: 8px 14px; border: 1px solid var(--brass); font-weight: 600; color: var(--navy);
}
.pagination .current { background: var(--navy); color: var(--paper); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy-deep); color: rgba(251,249,242,0.8); padding: 4rem 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(176,141,87,0.2);
}
.footer-grid h4 {
  color: var(--brass-light);
  font-variant: small-caps;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: rgba(251,249,242,0.75); }
.footer-grid a:hover { color: var(--brass-light); }
.footer-brand { text-align: center; }
.footer-brand p { color: rgba(251,249,242,0.7); font-size: 0.94rem; max-width: 320px; margin-left: auto; margin-right: auto; }
.site-info {
  text-align: center;
  padding: 22px 0;
  font-size: 0.85rem;
  color: rgba(251,249,242,0.5);
}
.site-info a { color: rgba(251,249,242,0.65); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-carousel { padding: 0 48px; }
  .news-track .news-card { flex-basis: calc((100% - 28px) / 2); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .menu-toggle { display: inline-flex; }
  .primary-navigation { display: none; width: 100%; }
  .primary-navigation.is-open { display: block; }
  .primary-menu { flex-direction: column; align-items: stretch; }
  .primary-menu ul.sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border-top: none; display: none;
  }
  .primary-menu li.is-open > ul.sub-menu { display: block; }
  .header-inner { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .site-branding { margin-left: 0; }
  .pillars-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .news-carousel { padding: 0; }
  .news-nav { display: none; }
  .news-track .news-card { flex-basis: 84%; }
  .footer-grid { grid-template-columns: 1fr; }
}

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