/* ============================================================
   BRUDERTREUE AM MAIN — Hauptstylesheet
   ============================================================ */

/* 1. CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Farben */
  --color-primary:     #1a2744;
  --color-secondary:   #b89a4e;
  --color-bg:          #ffffff;
  --color-bg-alt:      #f5f4f0;
  --color-bg-dark:     #111827;
  --color-text:        #1c1c1c;
  --color-text-muted:  #6b7280;
  --color-text-light:  #ffffff;
  --color-link:        #1a2744;
  --color-link-hover:  #b89a4e;
  --color-border:      #d4c9a8;

  /* Typografie */
  --font-heading: 'EB Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;

  --line-height-tight:  1.2;
  --line-height-normal: 1.6;
  --line-height-loose:  1.85;

  /* Abstände */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;

  /* Formen & Schatten */
  --radius-sm: 2px;
  --radius-md: 4px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(26,39,68,0.12);
  --shadow-lg: 0 8px 32px rgba(26,39,68,0.18);
}

/* 2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background: var(--color-bg);
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

a {
  color: var(--color-link);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-link-hover);
}

/* 3. SKIP LINK
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0.75rem;
}

/* 4. TYPOGRAFIE
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary);
  line-height: var(--line-height-tight);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  max-width: 68ch;
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--line-height-loose);
  color: var(--color-text-muted);
  max-width: 60ch;
}

blockquote {
  border-left: 4px solid var(--color-secondary);
  padding: 1.25rem 2rem;
  margin: 2rem 0;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-primary);
  background: var(--color-bg-alt);
}

blockquote cite {
  display: block;
  font-size: var(--text-sm);
  font-style: normal;
  font-family: var(--font-body);
  color: var(--color-text-muted);
  margin-top: 0.75rem;
}

/* 5. LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: center;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.text-center { text-align: center; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }

/* 6. DIVIDER
   ============================================================ */
.divider {
  width: 60px;
  height: 2px;
  background: var(--color-secondary);
  margin: 1.25rem 0 1.75rem;
  border: none;
}

.divider.centered {
  margin-inline: auto;
}

/* 7. BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 2.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  line-height: 1;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-light);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-primary);
}

.btn-outline {
  background: transparent;
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.btn-outline:hover {
  background: var(--color-secondary);
  color: var(--color-primary);
}

.btn:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
}

/* 8. KARTEN
   ============================================================ */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-secondary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  transition: box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  flex-grow: 1;
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-secondary);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.card-link:hover {
  color: var(--color-primary);
}

/* 9. ANIMATIONEN
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 10. HEADER & NAVIGATION
   ============================================================ */
.site-header {
  background: var(--color-primary);
  height: 72px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-link img {
  height: 62px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  color: var(--color-text-light);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-secondary);
}

.main-nav a[aria-current="page"] {
  border-bottom: 2px solid var(--color-secondary);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text-light);
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after  { top:  7px; }

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* 11. HERO
   ============================================================ */
.hero {
  background: linear-gradient(
    160deg,
    var(--color-primary) 0%,
    #243360 60%,
    #1a3a50 100%
  );
  padding-block: var(--space-xl);
  position: relative;
  overflow: hidden;
  color: var(--color-text-light);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 50%, rgba(184,154,78,0.12) 0%, transparent 55%),
    radial-gradient(circle at 10% 80%, rgba(184,154,78,0.07) 0%, transparent 40%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 1.25rem;
}

.hero h1 {
  color: var(--color-text-light);
  font-size: clamp(2rem, 5vw, var(--text-4xl));
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

.hero .lead {
  color: rgba(255,255,255,0.78);
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
}

.hero-inner-image {
  flex-shrink: 0;
}

.hero-inner-image img {
  display: block;
  width: clamp(160px, 18vw, 260px);
  height: auto;
  opacity: 0.88;
  filter: drop-shadow(0 0 24px rgba(184,154,78,0.25));
}

/* 12. SEKTIONEN
   ============================================================ */
section {
  padding-block: var(--space-lg);
}

section.bg-alt {
  background: var(--color-bg-alt);
}

section.bg-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
}

section.bg-dark h2 {
  color: var(--color-text-light);
}

section.bg-dark p {
  color: rgba(255,255,255,0.75);
  max-width: 54ch;
}

.section-header {
  margin-bottom: var(--space-md);
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .divider {
  margin-inline: auto;
}

/* 13. INTRO-SEKTION (Startseite)
   ============================================================ */
.intro-image {
  border: 4px solid var(--color-bg-alt);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  object-position: top center;
  background: var(--color-bg-alt);
}

/* 14. TIMELINE (Über uns)
   ============================================================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.625rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-md);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-secondary);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-secondary);
}

.timeline-date {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.timeline-item h3 {
  font-size: var(--text-xl);
  margin-bottom: 0.5rem;
}

.timeline-item p {
  font-size: var(--text-base);
  color: var(--color-text);
}

/* 15. Q&A (Freimaurerei)
   ============================================================ */
.qa-section {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
  margin-top: var(--space-md);
}

.qa-section:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.qa-section h2 {
  font-size: var(--text-2xl);
  margin-bottom: 0.75rem;
}

.qa-section p + p {
  margin-top: 0.875rem;
}

/* 16. PROSA-SEITEN (Impressum, Datenschutz)
   ============================================================ */
.prose-page {
  padding-block: var(--space-lg);
}

.prose-page h1 {
  margin-bottom: 0.5rem;
}

.prose-page .lead {
  margin-bottom: var(--space-md);
}

.prose-content h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-md);
  margin-bottom: 0.75rem;
}

.prose-content h3 {
  font-size: var(--text-xl);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose-content p {
  margin-bottom: 0.875rem;
}

.prose-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 0.875rem;
}

.prose-content ul li {
  margin-bottom: 0.375rem;
  color: var(--color-text);
}

.prose-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose-placeholder {
  background: #fff3cd;
  border-left: 4px solid #f0ad4e;
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  color: #856404;
  margin: 0.5rem 0;
  border-radius: var(--radius-md);
}

/* 17. GÄSTEABEND
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.info-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-secondary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.info-card h3 {
  font-size: var(--text-xl);
  margin-bottom: 0.75rem;
}

.info-card p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* 18. CTA-SEKTION
   ============================================================ */
.cta-section {
  text-align: center;
  padding-block: var(--space-lg);
}

.cta-section blockquote {
  background: transparent;
  border-left: none;
  color: rgba(255,255,255,0.85);
  font-size: var(--text-2xl);
  max-width: 42ch;
  margin: 0 auto var(--space-md);
  padding: 0;
}

.cta-section blockquote cite {
  color: rgba(255,255,255,0.5);
}

/* 19. FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  padding-top: var(--space-lg);
  font-size: var(--text-sm);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-md);
  padding-bottom: var(--space-md);
}

.footer-brand img {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.footer-brand p {
  color: rgba(255,255,255,0.6);
  max-width: none;
  font-size: var(--text-sm);
  line-height: 1.7;
}

.footer-grid nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-grid nav h4 {
  color: var(--color-secondary);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.footer-grid nav a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-grid nav a:hover {
  color: var(--color-secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-block: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255,255,255,0.4);
  font-size: var(--text-xs);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* 20. FOCUS STYLES
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* 21. RESPONSIVE
   ============================================================ */
@media (min-width: 768px) {
  .container { padding: 0 2.5rem; }
}

/* Tablet: ≤ 1024 px */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Tablet/Mobil: ≤ 768 px */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.35rem; }

  .hero { padding-block: 4rem; }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-inner-image {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .main-nav.nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    padding: 0.875rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .main-nav a[aria-current="page"] {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid var(--color-secondary);
    padding-left: calc(1.5rem - 3px);
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .three-col {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .cta-section blockquote {
    font-size: var(--text-xl);
  }

  section { padding-block: 2.5rem; }
}

/* Mobil: ≤ 480 px */
@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  blockquote {
    padding: 1rem 1.25rem;
  }

  .timeline {
    padding-left: 2rem;
  }
}
