/* Winlaton St Paul's Lodge No. 8931 — design system (DSTN-inspired) */

:root {
  --color-header-bg: #1c2b3a;
  --color-header-bg-alt: #1a2535;
  --color-body: #ffffff;
  --color-section-muted: #f5f6f8;
  --color-gold: #c8a050;
  --color-gold-alt: #b89a3e;
  --color-text: #2c2c2c;
  --color-link: #1d4e89;
  --color-border: #e0e0e0;
  --color-cta-primary: #1c2b3a;
  --font-heading: "Cinzel", Georgia, serif;
  --font-body: "Lato", system-ui, sans-serif;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --radius: 6px;
  --gold-border: 4px solid var(--color-gold);
  --header-height: 4.25rem;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-body);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-header-bg);
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  margin-top: 0;
}

h3 {
  font-size: 1.15rem;
  margin-top: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 0.75rem 1rem;
  background: var(--color-gold);
  color: var(--color-header-bg);
  font-weight: 700;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  outline: 2px solid var(--color-link);
}

/* ——— Site header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--color-header-bg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  flex: 1;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
  color: #fff;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 2.5vw, 1.1rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: #fff;
}

.brand-sub {
  font-size: 0.75rem;
  opacity: 0.9;
  margin: 0.15rem 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.nav-toggle-icon {
  font-size: 1.5rem;
  line-height: 1;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.site-nav {
  position: fixed;
  inset: 0;
  top: var(--header-height);
  background: var(--color-header-bg-alt);
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  z-index: 999;
}

.site-nav.is-open {
  transform: translateX(0);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.85rem 1rem;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  border-left: 3px solid transparent;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--color-gold);
  border-left-color: var(--color-gold);
  text-decoration: none;
}

@media (min-width: 768px) {
  .site-nav {
    position: static;
    inset: auto;
    transform: none;
    background: transparent;
    padding: 0;
    overflow: visible;
  }

  .site-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.15rem;
  }

  .site-nav a {
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .site-nav a.active {
    border-bottom-color: var(--color-gold);
    color: var(--color-gold);
  }
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-height);
  background: rgba(0, 0, 0, 0.45);
  z-index: 998;
}

.nav-backdrop.is-visible {
  display: block;
}

@media (min-width: 768px) {
  .nav-backdrop {
    display: none !important;
  }
}

/* ——— Main ——— */
main {
  min-height: 50vh;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 375px) {
  .container {
    padding: 0 1.25rem;
  }
}

.section {
  padding: 2.5rem 0;
}

.section--muted {
  background: var(--color-section-muted);
}

/* ——— Hero (home) ——— */
.hero {
  position: relative;
  background: var(--color-header-bg);
  color: #fff;
  padding: 2.5rem 0 3rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23c8a050' stroke-width='0.5'%3E%3Cpath d='M40 5 L40 75 M15 40 L65 40 M25 25 L55 55 M55 25 L25 55'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 320px;
    align-items: center;
  }
}

@media (min-width: 1280px) {
  .hero-grid {
    grid-template-columns: 1fr 360px;
  }
}

.hero h1 {
  color: #fff;
  margin: 0 0 0.5rem;
}

.hero-tagline {
  font-size: 1rem;
  opacity: 0.92;
  margin: 0 0 0.35rem;
  color: var(--color-gold);
  font-weight: 700;
}

.hero-sub {
  font-size: 0.95rem;
  opacity: 0.88;
  margin: 0 0 1.5rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ——— Page hero (inner pages) ——— */
.page-hero {
  background: linear-gradient(135deg, var(--color-header-bg) 0%, #243a52 100%);
  color: #fff;
  padding: 2rem 0 2.25rem;
  text-align: center;
}

.page-hero h1 {
  color: #fff;
  margin: 0 0 0.5rem;
}

.page-hero p {
  margin: 0;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
  font-size: 1.05rem;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--color-cta-primary);
  color: #fff;
  border-color: var(--color-cta-primary);
}

.btn--primary:hover {
  background: #152230;
  border-color: #152230;
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn--on-light {
  background: var(--color-cta-primary);
  color: #fff;
  border-color: var(--color-cta-primary);
}

.btn--on-light:hover {
  background: #152230;
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--color-link);
  border-color: var(--color-link);
}

.btn--outline:hover {
  background: var(--color-link);
  color: #fff;
}

/* ——— Cards ——— */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-border);
}

.card--feature {
  border-left: var(--gold-border);
  border-top: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.card--hero-panel {
  color: var(--color-text);
}

.card--hero-panel h3 {
  color: var(--color-header-bg);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.facts-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.facts-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-section-muted);
}

.facts-list li:last-child {
  border-bottom: none;
}

.facts-list strong {
  color: var(--color-header-bg);
}

/* ——— Two columns ——— */
.two-col {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 768px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

/* ——— Highlight grid ——— */
.highlight-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .highlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1280px) {
  .highlight-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.highlight-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.highlight-card h3 {
  color: var(--color-gold-alt);
  margin-bottom: 0.5rem;
}

.highlight-card p {
  flex: 1;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.highlight-card .card-link {
  font-weight: 700;
  color: var(--color-link);
  margin-top: auto;
}

/* ——— Meeting summary links ——— */
.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.inline-links--center {
  justify-content: center;
}

.stack-top {
  margin-top: 1.25rem;
}

/* ——— Tables ——— */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: #fff;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  background: var(--color-header-bg);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
}

.data-table tbody tr:nth-child(even) {
  background: var(--color-section-muted);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ——— Map ——— */
.map-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.map-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ——— Icon lists ——— */
.icon-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.icon-list li {
  padding-left: 1.5rem;
  position: relative;
}

.icon-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-gold-alt);
  font-weight: 700;
}

/* ——— Panels / callouts ——— */
.panels-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.callout {
  background: var(--color-section-muted);
  border-left: var(--gold-border);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ——— Accordion ——— */
.accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #fff;
}

.accordion-item + .accordion-item {
  border-top: 1px solid var(--color-border);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  background: #fff;
  border: none;
  cursor: pointer;
  color: var(--color-header-bg);
}

.accordion-trigger:hover {
  background: var(--color-section-muted);
}

.accordion-trigger:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: -2px;
}

.accordion-trigger::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--color-gold);
  flex-shrink: 0;
}

.accordion-item.is-open .accordion-trigger::after {
  content: "−";
}

.accordion-panel {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-item.is-open .accordion-panel {
  max-height: 60rem;
  padding: 0 1.25rem 1.25rem;
}

.accordion-panel p {
  margin: 0;
  font-size: 0.95rem;
}

/* ——— Values grid ——— */
.values-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.value-card {
  background: #fff;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.value-card h3 {
  color: var(--color-gold-alt);
  margin-bottom: 0.5rem;
}

/* ——— Contact ——— */
.contact-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-details {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.contact-details ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-details li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.contact-details li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.contact-form-wrap {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--color-link);
  outline-offset: 1px;
}

.form-note {
  font-size: 0.875rem;
  color: #555;
  margin-top: 1rem;
}

/* ——— External link cards ——— */
.link-cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .link-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.link-card {
  display: block;
  padding: 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.link-card:hover {
  border-color: var(--color-gold);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: var(--color-text);
}

.link-card h3 {
  color: var(--color-link);
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.link-card span {
  font-size: 0.875rem;
  opacity: 0.85;
}

.link-card-icon {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.65rem;
  color: var(--color-gold-alt);
}

.link-card-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ——— Footer ——— */
.site-footer {
  background: var(--color-header-bg);
  color: rgba(255, 255, 255, 0.9);
  padding: 2.5rem 0 1.5rem;
  margin-top: 0;
}

.site-footer a {
  color: var(--color-gold);
}

.site-footer a:hover {
  color: #e4c56e;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-col h3 {
  color: var(--color-gold);
  font-size: 1rem;
  margin: 0 0 1rem;
}

.footer-col p,
.footer-col address {
  margin: 0 0 0.5rem;
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.55;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
}

.text-muted-small {
  font-size: 0.875rem;
  opacity: 0.88;
  margin-top: 1rem !important;
}

/* ——— Utilities ——— */
.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.text-center {
  text-align: center;
}
