/* Schachverein St. Georgen-Schonach e.V. — Gesamtgestaltung */

:root {
  --paper: #f7f5f0;
  --paper-2: #efece2;
  --card: #fffdf9;
  --ink: #1b242f;
  --ink-soft: #48535f;
  --ink-faint: #7c8691;
  --forest: #1f4034;
  --forest-2: #2d5a48;
  --gold: #a9782f;
  --gold-soft: #d7b47a;
  --line: rgba(27, 36, 47, 0.12);
  --line-strong: rgba(27, 36, 47, 0.22);
  --night: #0f1b2d;
  --night-2: #17263b;
  --ok: #2f7d4f;
  --bad: #b23b3b;
  --draw: #a9782f;
  --serif: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 45, 0.06), 0 12px 32px -12px rgba(15, 27, 45, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--forest-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; color: var(--ink); margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
::selection { background: var(--gold-soft); color: var(--ink); }
:focus-visible { outline: 3px solid var(--forest-2); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--night); color: #fff; padding: 0.7rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section.tight { padding-block: clamp(2rem, 4vw, 3rem); }
.bg-soft { background: var(--paper-2); }
.bg-night { background: var(--night); color: #e8edf3; }
.bg-night h1, .bg-night h2, .bg-night h3 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: 600 0.78rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.9rem;
}
.eyebrow::before { content: "♞"; font-size: 1.1em; color: var(--gold); }
.section-head { max-width: 60ch; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--forest); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.35rem; border-radius: 999px; border: 1px solid transparent;
  font: 600 0.98rem/1 var(--sans); text-decoration: none; cursor: pointer;
  background: var(--bg); color: var(--fg); transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(31, 64, 52, 0.6); }
.btn-primary { --bg: var(--forest); }
.btn-primary:hover { --bg: var(--forest-2); }
.btn-ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { --bg: rgba(27, 36, 47, 0.05); }
.bg-night .btn-ghost { --fg: #fff; border-color: rgba(255, 255, 255, 0.35); }
.bg-night .btn-ghost:hover { --bg: rgba(255, 255, 255, 0.12); }
.btn-wa { --bg: #1f9d55; }
.btn-wa:hover { --bg: #178a49; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 245, 240, 0.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .nav { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 46px; height: auto; border-radius: 8px; background: var(--night); padding: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-family: var(--serif); font-size: 1.06rem; }
.brand-text span { font-size: 0.76rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-faint); }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 0.35rem; }
.nav-links a {
  padding: 0.5rem 0.75rem; border-radius: 8px; text-decoration: none;
  color: var(--ink-soft); font-weight: 500; font-size: 0.95rem;
}
.nav-links a:hover { color: var(--ink); background: rgba(27, 36, 47, 0.05); }
.nav-links a.active { color: var(--forest); font-weight: 600; }
.nav-cta { margin-left: 0.4rem; padding: 0.6rem 1.1rem; }
.nav-cta.active { color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 9px; font-size: 1.2rem; width: 44px; height: 44px; cursor: pointer; }

@media (max-width: 940px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 0.8rem 1.2rem 1.3rem;
    gap: 0.15rem; transform: translateY(-120%); transition: transform 0.28s ease; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 0.85rem 0.6rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav-cta, .nav-links a.nav-cta { margin: 0.6rem 0 0; border: none; }
}

/* ---------- Hero (gestaltet, ohne Foto – scharf auf jedem Display) ---------- */
.hero {
  position: relative;
  color: #f3f0e9;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(169, 120, 47, 0.22), transparent 62%),
    radial-gradient(900px 500px at 8% 120%, rgba(47, 90, 73, 0.35), transparent 60%),
    linear-gradient(155deg, #0c1a2b 0%, #102a22 52%, #0a1626 100%);
}
/* dezente Schachbrett-Textur, nach links ausgeblendet */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -15% -20% 20%;
  z-index: -1;
  background-image: repeating-conic-gradient(rgba(255, 255, 255, 0.55) 0% 25%, transparent 0% 50%);
  background-size: 58px 58px;
  opacity: 0.05;
  transform: rotate(-9deg) scale(1.35);
  transform-origin: top right;
  -webkit-mask-image: linear-gradient(to left, #000 15%, transparent 78%);
  mask-image: linear-gradient(to left, #000 15%, transparent 78%);
}
/* großes Springer-Zeichen als Deko */
.hero-glyph {
  position: absolute;
  right: clamp(-3rem, -2vw, -1rem);
  bottom: -14%;
  z-index: -1;
  font-size: clamp(18rem, 34vw, 34rem);
  line-height: 1;
  color: var(--gold-soft);
  opacity: 0.13;
  pointer-events: none;
  user-select: none;
}
.hero > .container { position: relative; padding-block: clamp(3.6rem, 9vw, 6.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: italic; color: var(--gold-soft); }
.hero .lead { color: rgba(243, 240, 233, 0.9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.badge-news {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem;
  padding: 0.45rem 0.9rem; border-radius: 999px; text-decoration: none;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; font-size: 0.85rem;
}
.badge-news b { color: var(--gold-soft); font-weight: 600; }

/* ---------- Next-match card ---------- */
.nm-card {
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow);
}
.nm-card--empty { background: rgba(255, 255, 255, 0.08); color: #f0ede6; border-color: rgba(255, 255, 255, 0.2); box-shadow: none; }
.nm-kicker { font: 600 0.74rem/1 var(--sans); letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin: 0 0 0.7rem; }
.nm-card--empty .nm-kicker { color: var(--gold-soft); }
.nm-teams { font-family: var(--serif); font-size: 1.4rem; line-height: 1.25; margin: 0 0 1rem; }
.nm-vs { color: var(--ink-faint); font-family: var(--sans); font-size: 0.85rem; margin: 0 0.4rem; }
.nm-card--empty .nm-vs { color: rgba(255, 255, 255, 0.6); }
.nm-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem 1.2rem; }
.nm-facts li { display: flex; flex-direction: column; font-size: 0.98rem; }
.nm-facts span { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.nm-card--empty .nm-facts span { color: rgba(255, 255, 255, 0.55); }
.nm-meta { font-size: 0.95rem; color: rgba(255,255,255,0.75); margin: 0; }

/* ---------- Layout helpers ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split .visual { order: 1; }
.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }
.card .icn { font-size: 1.7rem; color: var(--gold); line-height: 1; margin-bottom: 0.6rem; }

.kv { display: grid; gap: 0.9rem; margin: 0; }
.kv > div { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.kv dt { font-weight: 600; color: var(--ink-soft); margin: 0; }
.kv dd { margin: 0; }
.kv-sub { color: var(--ink-faint); font-size: 0.9rem; }

.stats { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 1.6rem; }
.stat b { display: block; font-family: var(--serif); font-size: 1.9rem; color: var(--forest); }
.stat span { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }

.figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.figure img { width: 100%; }
.figure figcaption { padding: 0.7rem 1rem; font-size: 0.85rem; color: var(--ink-faint); background: var(--card); }

/* ---------- Data tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.dtable { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.dtable th, .dtable td { padding: 0.72rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); }
.dtable thead th { font: 600 0.74rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); background: var(--paper-2); }
.dtable tbody tr:last-child td { border-bottom: none; }
.dtable .c-rank { width: 3rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.dtable .c-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dtable .c-team { font-weight: 500; }
.dtable tr.is-own { background: rgba(169, 120, 47, 0.1); }
.dtable tr.is-own .c-team { font-weight: 700; color: var(--forest); }
.dtable--mini { font-size: 0.92rem; }
.dtable--mini td { padding: 0.5rem 0.7rem; }
.table-legend { font-size: 0.82rem; color: var(--ink-faint); margin: 0.6rem 0 0; }
.muted { color: var(--ink-faint); }

/* ---------- Fixtures ---------- */
.fx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.fx {
  display: grid; grid-template-columns: 9rem 4rem 1fr auto; align-items: center; gap: 1rem;
  padding: 0.85rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
.fx-date { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--ink-faint); }
.fx-date b { font-size: 0.98rem; color: var(--ink); font-family: var(--sans); }
.fx-ha { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.fx-opp { font-weight: 600; display: flex; flex-direction: column; }
.fx-comp { font-weight: 400; font-size: 0.8rem; color: var(--ink-faint); }
.fx-res { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.fx-res em { font-style: normal; font-weight: 500; font-size: 0.8rem; display: block; }
.fx-res--open { color: var(--ink-faint); font-weight: 500; }
.fx-res--win { color: var(--ok); }
.fx-res--loss { color: var(--bad); }
.fx-res--draw { color: var(--draw); }

.empty-state { background: var(--card); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 2rem 1.6rem; text-align: center; }
.empty-state .empty-sub { color: var(--ink-soft); font-size: 0.95rem; margin: 0.5rem 0 0; }
.data-note { font-size: 0.95rem; color: var(--ink-soft); background: var(--paper-2); border-left: 3px solid var(--gold); padding: 0.8rem 1rem; border-radius: 0 8px 8px 0; }
.data-note--warn { border-left-color: var(--bad); }
.cup-note { margin-top: 1.6rem; padding: 1.2rem 1.4rem; background: var(--paper-2); border-radius: var(--radius); }
.cup-note h3 { margin-bottom: 0.3rem; color: var(--forest); }
.cup-note p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3rem); }
.info-list { display: grid; gap: 1.1rem; }
.info-list .item { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.9rem; align-items: start; }
.info-list .icn { font-size: 1.4rem; color: var(--gold); }
.info-list b { display: block; }
.info-list span { color: var(--ink-soft); font-size: 0.96rem; }
.field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field textarea {
  font: inherit; padding: 0.7rem 0.85rem; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--paper); color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--forest-2); outline: none; }
.form-note { margin-top: 1rem; font-size: 0.92rem; color: var(--forest-2); }
.map-embed { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Prose (Impressum / Datenschutz) ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2rem; }
.prose .todo { background: #fff6e5; border: 1px solid var(--gold-soft); border-radius: 8px; padding: 0.8rem 1rem; color: #6a4b16; font-size: 0.95rem; }
.prose address { font-style: normal; }

/* ---------- Work-in-progress ---------- */
.wip { text-align: center; max-width: 60ch; margin-inline: auto; padding: 2.5rem 1.5rem; }
.wip .glyph { font-size: 3rem; color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #c9d2dc; padding-top: 3rem; margin-top: 4rem; }
.site-footer .brand { color: #fff; }
.site-footer .brand-text span { color: rgba(255, 255, 255, 0.55); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer-about p { color: rgba(255, 255, 255, 0.62); font-size: 0.92rem; margin-top: 0.8rem; max-width: 40ch; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.8rem; }
.site-footer nav a, .site-footer .footer-quiet, .site-footer div > a { display: block; color: rgba(255, 255, 255, 0.7); text-decoration: none; padding: 0.2rem 0; font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.footer-quiet { color: rgba(255, 255, 255, 0.45) !important; font-size: 0.85rem; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; justify-content: space-between; align-items: center; padding: 1.3rem 0 2rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); }
.footer-bottom a { color: rgba(255, 255, 255, 0.7); }
.legal { display: flex; gap: 1rem; }

/* ---------- Reveal animation (nur wenn JS aktiv) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid, .split, .grid-2, .grid-3, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-glyph { font-size: 16rem; right: -3rem; bottom: -8%; opacity: 0.1; }
  .hero::before { inset: -20% -15% -20% 0; }
  .split .visual { order: -1; }
  .footer-grid { gap: 1.6rem; }
  .fx { grid-template-columns: 1fr auto; grid-template-areas: "date res" "opp opp"; row-gap: 0.4rem; }
  .fx-date { grid-area: date; }
  .fx-res { grid-area: res; text-align: right; }
  .fx-opp { grid-area: opp; }
  .fx-ha { display: none; }
  .kv > div { grid-template-columns: 1fr; gap: 0.15rem; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .nm-facts { grid-template-columns: 1fr; }
}
