/* Friendship Lodge
   Global homepage stylesheet
   -------------------------------------------------------------- */

:root {
  --navy-950: #03182b;
  --navy-900: #062746;
  --navy-800: #0b385f;
  --navy-700: #164d79;
  --gold-500: #c99a3d;
  --gold-400: #d9b564;
  --cream-100: #f8f3e9;
  --cream-50: #fcfaf5;
  --white: #ffffff;
  --ink: #15202b;
  --muted: #5f6b76;
  --border: #d7dce1;
  --shadow: 0 18px 45px rgba(2, 24, 43, 0.13);
  --radius-sm: 0.4rem;
  --radius-md: 0.8rem;
  --container: 76rem;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
          "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream-50);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--navy-700);
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--navy-900);
}

button,
input,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--navy-900);
  font-family: var(--serif);
  line-height: 1.14;
}

h1 {
  max-width: 13ch;
  margin-bottom: 0.75rem;
  color: var(--white);
  font-size: clamp(2.8rem, 7vw, 5.7rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h3 {
  margin-bottom: 0.6rem;
  font-size: 1.35rem;
}

p {
  margin-top: 0;
}

ul,
ol {
  padding-left: 1.25rem;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 9999;
  padding: 0.8rem 1rem;
  color: var(--white);
  background: var(--navy-900);
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header and navigation
   -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: var(--white);
  background: rgba(3, 24, 43, 0.97);
  border-bottom: 1px solid rgba(217, 181, 100, 0.7);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 5.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--white);
  text-decoration: none;
}

.brand:hover {
  color: var(--white);
}

.brand-emblem {
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-copy span {
  color: var(--gold-400);
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.16em;
}

.brand-copy small {
  margin-top: 0.32rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.primary-navigation {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

.primary-navigation a {
  position: relative;
  padding: 1.9rem 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-navigation a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1.2rem;
  left: 0;
  height: 2px;
  background: var(--gold-400);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.primary-navigation a:hover,
.primary-navigation a:focus-visible,
.primary-navigation a[aria-current="page"] {
  color: var(--gold-400);
}

.primary-navigation a:hover::after,
.primary-navigation a:focus-visible::after,
.primary-navigation a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0.65rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
}

.nav-toggle span[aria-hidden="true"] {
  display: block;
  height: 2px;
  margin: 0.28rem 0;
  background: var(--white);
}

/* Hero
   -------------------------------------------------------------- */

.hero {
  min-height: min(48rem, calc(100vh - 5.4rem));
  display: grid;
  align-items: center;
  color: var(--white);
  background:
    linear-gradient(90deg,
      rgba(3, 24, 43, 0.96) 0%,
      rgba(3, 24, 43, 0.82) 34%,
      rgba(3, 24, 43, 0.32) 65%,
      rgba(3, 24, 43, 0.08) 100%),
    linear-gradient(0deg,
      rgba(3, 24, 43, 0.42) 0%,
      transparent 48%),
    url("../images/lodge-hero.jpg") center center / cover no-repeat;
}

.hero-content {
  padding-block: 5rem;
}

.eyebrow {
  margin-bottom: 0.8rem;
  color: var(--gold-500);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.hero-tagline {
  margin-bottom: 1rem;
  color: var(--gold-400);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-style: italic;
}

.hero-intro {
  max-width: 36rem;
  margin-bottom: 2rem;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--navy-950);
  background: var(--gold-400);
  border-color: var(--gold-400);
}

.button-primary:hover {
  color: var(--navy-950);
  background: #e4c779;
}

.button-secondary {
  color: var(--white);
  background: var(--navy-900);
  border-color: var(--gold-400);
}

.button-secondary:hover {
  color: var(--white);
  background: var(--navy-800);
}

.button-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.72);
}

.button-ghost:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

/* Shared section headings
   -------------------------------------------------------------- */

.section-heading {
  max-width: 48rem;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-heading > p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
}

.text-link {
  font-weight: 800;
  text-decoration: none;
}

.text-link::after {
  content: "  ›";
}

/* History
   -------------------------------------------------------------- */

.history-section {
  background:
    radial-gradient(circle at 15% 20%, rgba(201, 154, 61, 0.08), transparent 24rem),
    linear-gradient(180deg, #fbf7ef 0%, #f4ecdd 100%);
}

.history-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 2.2fr) minmax(12rem, 0.8fr);
  gap: 2rem;
  align-items: center;
}

.framed-photo {
  margin: 0;
  padding: 0.45rem;
  background: var(--white);
  border: 1px solid #c9bfae;
  box-shadow: var(--shadow);
}

.framed-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 2.12rem;
  right: 6%;
  left: 6%;
  height: 2px;
  background: #a7b1ba;
}

.timeline li {
  position: relative;
  padding: 0 1rem;
  text-align: center;
}

.timeline li::before {
  content: "";
  position: relative;
  z-index: 1;
  width: 0.7rem;
  aspect-ratio: 1;
  display: block;
  margin: 1rem auto 1.2rem;
  background: var(--navy-900);
  border: 3px solid var(--cream-100);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--navy-900);
}

.timeline-year {
  display: block;
  color: var(--gold-500);
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
}

.timeline h3 {
  font-size: 1.05rem;
}

.timeline p {
  color: var(--muted);
  font-size: 0.9rem;
}

.centered-action {
  margin: 2.5rem 0 0;
  text-align: center;
}

/* Community
   -------------------------------------------------------------- */

.community-section {
  background: var(--white);
}

.community-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.community-photo {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.community-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 45%;
}

.community-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
}

.community-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.75rem 0 2rem;
}

.community-highlights article {
  padding: 1.2rem;
  background: var(--cream-50);
  border-left: 3px solid var(--gold-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.community-highlights h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.community-highlights p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Hall rental
   -------------------------------------------------------------- */

.rental-section {
  background: var(--cream-100);
}

.rental-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.rental-photo img {
  width: 100%;
  height: 100%;
  min-height: 31rem;
  object-fit: cover;
}

.rental-copy {
  position: relative;
  padding: clamp(2rem, 5vw, 4.5rem);
  overflow: hidden;
}

.rental-copy::after {
  content: "";
  position: absolute;
  right: -4rem;
  bottom: -3rem;
  width: 19rem;
  aspect-ratio: 1.2;
  opacity: 0.08;
  background:
    url("../images/lodge-line-art.png")
    center / contain no-repeat;
  pointer-events: none;
}

.check-list {
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin: 0.35rem 0;
  padding-left: 1.6rem;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold-500);
  font-weight: 900;
}

/* Community programs
   -------------------------------------------------------------- */

.programs-section {
  background: var(--navy-900);
}

.programs-section h2,
.programs-section h3 {
  color: var(--white);
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.program-card {
  padding: 1.75rem;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
}

.program-card a {
  color: var(--gold-400);
}

/* Officers
   -------------------------------------------------------------- */

.officers-section {
  background: var(--white);
}

.officer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.officer-card {
  padding: 1.75rem 1rem;
  text-align: center;
  background: var(--cream-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.officer-card h3 {
  margin-bottom: 0.55rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.officer-card p {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.officer-card a {
  font-size: 0.82rem;
  font-weight: 700;
}

/* Footer
   -------------------------------------------------------------- */

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  text-decoration: none;
}

.social-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  object-fit: contain;
}

.site-footer {
  padding-top: 3.5rem;
  color: rgba(255, 255, 255, 0.82);
  background: var(--navy-950);
  border-top: 4px solid var(--gold-500);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.85fr 0.7fr;
  gap: 2.5rem;
}

.site-footer h2 {
  color: var(--gold-400);
  font-size: 1.15rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 0.55rem 0;
}

.site-footer address {
  font-style: normal;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding: 1.3rem 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.88rem;
}

/* Accessibility and motion
   -------------------------------------------------------------- */

:focus-visible {
  outline: 3px solid #f3cc73;
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Responsive layout
   -------------------------------------------------------------- */

@media (max-width: 68rem) {
  .nav-toggle {
    display: block;
  }

  .primary-navigation {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    padding: 0.75rem 1rem 1rem;
    background: var(--navy-950);
    border-bottom: 1px solid var(--gold-500);
  }

  .primary-navigation.is-open {
    display: grid;
  }

  .primary-navigation a {
    padding: 0.9rem 0;
  }

  .primary-navigation a::after {
    bottom: 0.45rem;
    transform-origin: left;
  }

  .history-layout {
    grid-template-columns: 1fr;
  }

  .framed-photo {
    max-width: 30rem;
    margin-inline: auto;
  }

  .framed-photo img {
    aspect-ratio: 4 / 3;
  }

  .officer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 52rem) {
  .hero {
    min-height: 43rem;
    background-position: 63% center;
  }

  .timeline {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .timeline::before {
    top: 0;
    bottom: 0;
    left: 0.35rem;
    width: 2px;
    height: auto;
  }

  .timeline li {
    padding-left: 2.1rem;
    text-align: left;
  }

  .timeline li::before {
    position: absolute;
    top: 0.4rem;
    left: 0;
    margin: 0;
  }

  .community-layout,
  .rental-layout,
  .program-grid {
    grid-template-columns: 1fr;
  }

  .community-highlights {
    grid-template-columns: 1fr;
  }

  .rental-photo img {
    min-height: 20rem;
  }
}

@media (max-width: 42rem) {
  .container {
    width: min(calc(100% - 1.25rem), var(--container));
  }

  .header-inner {
    min-height: 4.6rem;
  }

  .brand-emblem {
    width: 2.65rem;
    height: 2.65rem;
  }

  .brand-copy strong {
    font-size: 1.08rem;
  }

  .brand-copy span {
    font-size: 0.9rem;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    min-height: 41rem;
  }

  h1 {
    font-size: clamp(2.7rem, 13vw, 4.2rem);
  }

  .button-row {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .officer-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
