/* ==========================================================================
   Stoanism Website Styles
   Accurately recreated based on stoanism.org
   ========================================================================== */

:root {
  --font-family-body: 'Mulish', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --color-background: #ffffff;
  --color-foreground: #12141d;
  --color-foreground-alt: #444444;
  --color-foreground-muted: #666666;
  --color-border: #e2e8f0;
  --color-border-subtle: #cccccca6;
  
  --content-max-width: 42rem; /* 672px matches original site */
  --wide-max-width: 80rem;    /* 1280px */
  
  --spacing-sm: 0.75rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  color: var(--color-foreground-alt);
  background-color: var(--color-background);
  font-size: clamp(0.95rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  width: 100%;
  background-color: var(--color-background);
  padding: 1.5rem 1.5rem;
  position: relative;
  z-index: 100;
}

.header-container {
  max-width: var(--wide-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-foreground);
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-foreground);
  margin: 0;
}

.brand-wrapper:hover .brand-title {
  opacity: 0.85;
}

/* Desktop Navigation */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-foreground);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover {
  opacity: 0.7;
}

.nav-link.active {
  font-weight: 700;
  color: var(--color-foreground);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-foreground);
  border-radius: 1px;
}

/* Mobile Nav Toggle Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-foreground);
  border-radius: 4px;
}

.mobile-menu-btn:focus-visible {
  outline: 2px solid var(--color-foreground);
}

.mobile-menu-btn svg {
  display: block;
  width: 26px;
  height: 26px;
}

/* Mobile Navigation Drawer / Overlay */
.mobile-nav-overlay {
  display: none;
}

@media (max-width: 768px) {
  .site-nav .nav-list {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-background);
    z-index: 999;
    padding: 2rem 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s;
    overflow-y: auto;
  }

  .mobile-nav-overlay.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
  }

  .mobile-nav-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-foreground);
  }

  .mobile-nav-close svg {
    display: block;
    width: 28px;
    height: 28px;
  }

  .mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0;
  }

  .mobile-nav-link {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-foreground);
    text-decoration: none;
    display: inline-block;
  }

  .mobile-nav-link.active {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 6px;
  }
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */

main {
  flex: 1 0 auto;
}

.content-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem 1.5rem;
}

.page-title {
  text-align: center;
  font-size: clamp(1.5rem, 1.4rem + 0.8vw, 1.875rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-foreground);
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.content-paragraph {
  margin-bottom: 1.6rem;
  color: var(--color-foreground-alt);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* Content Images & Figures */
.content-figure {
  margin: 2rem 0;
  width: 100%;
}

.content-figure.align-center {
  display: flex;
  justify-content: center;
}

.content-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.content-image.logo-feature {
  max-width: 400px;
  margin: 0 auto;
}

/* Blockquotes */
.quote-block {
  margin: 2.5rem 0 2rem 0;
  padding: 0 1rem;
  text-align: center;
}

.quote-text {
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--color-foreground);
  margin-bottom: 0.75rem;
}

.quote-author {
  font-size: 0.95rem;
  color: var(--color-foreground-muted);
}

/* Lists on Meetings page */
.agenda-list {
  margin: 1.5rem 0 2rem 1.5rem;
  padding-left: 0.5rem;
}

.agenda-list > li {
  margin-bottom: 1.5rem;
  line-height: 1.75;
  color: var(--color-foreground-alt);
}

.agenda-list > li strong {
  color: var(--color-foreground);
}

.agenda-sublist {
  list-style-type: disc;
  margin: 0.75rem 0 0.5rem 1.75rem;
  padding-left: 0;
}

.agenda-sublist > li {
  margin-bottom: 0.75rem;
  line-height: 1.65;
  color: var(--color-foreground-alt);
}

.agenda-sublist > li strong {
  color: var(--color-foreground);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: var(--color-background);
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid transparent;
}

.footer-container {
  max-width: var(--wide-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-emblem {
  display: flex;
  justify-content: center;
  margin-bottom: 3.5rem;
}

.footer-emblem-img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  opacity: 0.95;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-emblem-img:hover {
  opacity: 1;
  transform: scale(1.03);
}

.footer-bottom {
  border-top: 1px solid var(--color-border-subtle);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-foreground);
  text-decoration: none;
}

.social-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.social-link-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-foreground);
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.social-link-item a:hover {
  opacity: 0.65;
  transform: translateY(-2px);
}

.social-link-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }
}
