/* Schachverein Marbach e.V. – Modern, spacious layout (no dark mode) */

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

:root {
  /* Page background – visible cream/beige (chess board feel) */
  --bg-top: #e8e4d8;
  --bg-mid: #dfd9c8;
  --bg-bottom: #d4cdb9;
  /* Content area – warm white card on top */
  --bg-card: #faf8f3;
  --bg-card-alt: #f0ebe0;
  /* Accent – chess green */
  --accent: #1a4d2c;
  --accent-soft: #2a6b3c;
  --accent-light: rgba(26, 77, 44, 0.14);
  /* Text */
  --text: #2a3028;
  --text-muted: #4a534c;
  --text-light: #657066;
  /* UI */
  --border: rgba(26, 77, 44, 0.12);
  --border-strong: rgba(26, 77, 44, 0.2);
  --shadow-soft: 0 4px 24px rgba(26, 77, 44, 0.1);
  --shadow-card: 0 10px 48px rgba(26, 77, 44, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  /* Spacing – generous */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 5rem;
  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --container: min(92vw, 1000px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: var(--space-lg) var(--space-sm) var(--space-2xl);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  text-align: center;
  background: var(--bg-mid);
  background-image:
    linear-gradient(160deg, var(--bg-top) 0%, var(--bg-mid) 50%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  outline: none;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
a:visited {
  color: var(--accent-soft);
}
a:hover {
  color: var(--accent-soft);
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

strong, b {
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  font-size: 1.0625rem;
  line-height: 1.75;
}
p:last-child {
  margin-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0 0 0.5em;
  color: var(--text);
  line-height: 1.3;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.6rem); }
h3 { font-size: 1.2rem; }
h4, h5, h6 { font-size: 1.1rem; }

img {
  border: 0;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout – wide, airy container */
#content {
  margin: 0 auto;
  width: var(--container);
  max-width: 1000px;
  text-align: left;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 2px solid var(--border-strong);
}

/* Header */
.site-header {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-alt) 100%);
  border-bottom: 3px solid var(--accent);
}
.site-header .hero-wrap {
  line-height: 0;
  overflow: hidden;
}
.site-header .hero-wrap img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  max-height: 260px;
}

/* Navigation – spacious, clear */
.menu-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  list-style: none;
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  background: rgba(26, 77, 44, 0.04);
}
.menu-nav li {
  margin: 0;
}
.menu-nav a {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  color: var(--accent);
  text-decoration: none;
}
.menu-nav a:hover {
  background: var(--accent-light);
  color: var(--accent);
  text-decoration: none;
}
.menu-nav a.is-current {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* Main – lots of padding */
main {
  padding: var(--space-xl) var(--space-lg);
}

main hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: var(--space-xl) 0;
}

/* Section blocks – cards with breathing room */
.section-block {
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
  padding: var(--space-lg) var(--space-lg);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.section-block:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.section-block:last-child {
  margin-bottom: 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.75em;
  padding-bottom: 0.35em;
  border-bottom: 2px solid var(--accent-light);
  display: inline-block;
}

/* Legacy classes */
.menu {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.35em;
}
.Stil3 {
  text-align: justify;
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.75;
}
.Stil4 {
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--accent);
}
#text {
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
}

/* Welcome title – prominent */
.welcome-title {
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space-lg);
  text-align: center;
  line-height: 1.35;
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  padding-bottom: var(--space-md);
}
.welcome-title::after {
  content: '';
  display: block;
  width: 4rem;
  height: 4px;
  background: var(--accent);
  margin: var(--space-sm) auto 0;
  border-radius: var(--radius-pill);
}

/* Notice box */
.notice-box {
  background: #fef8f8;
  border-left: 4px solid #b44;
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Images */
.img-placeholder {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: var(--space-lg) 0;
  border: 1px solid var(--border);
  background: var(--bg-card-alt);
}
.img-placeholder img {
  width: 100%;
  height: auto;
}

/* Map embed – integrated card style */
.map-embed {
  margin: var(--space-xl) 0 0;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.map-embed__caption {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
  padding: var(--space-sm) var(--space-md) var(--space-xs);
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-alt);
}
.map-embed__frame {
  display: block;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: var(--bg-card-alt);
}
.map-embed__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  min-height: 320px;
}
@media (min-width: 560px) {
  .map-embed__frame {
    height: 450px;
  }
  .map-embed__frame iframe {
    min-height: 450px;
  }
}
@media (min-width: 700px) {
  .map-embed {
    max-width: 640px;
  }
}

/* Rules / TT */
pre, TT {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0.5em 0;
  font-family: var(--font-body);
  color: var(--text-muted);
}

hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: var(--space-md) 0;
}

/* Scroll-reveal (JS adds .is-visible) */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (min-width: 640px) {
  body {
    padding: var(--space-xl) var(--space-md) var(--space-2xl);
  }
  .site-header .hero-wrap img {
    max-height: 280px;
  }
  .menu-nav {
    padding: var(--space-md) var(--space-xl);
    gap: var(--space-sm);
  }
  .menu-nav a {
    padding: 0.65rem 1.4rem;
  }
}

@media (min-width: 900px) {
  main {
    padding: var(--space-xl) var(--space-2xl);
  }
  .section-block {
    padding: var(--space-lg) var(--space-xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
