/* ===========================
   Capia GmbH – Stylesheet
   =========================== */

/* --- Variables --- */
:root {
  --color-bg:         #ffffff;
  --color-bg-alt:     #f5f5f3;
  --color-text:       #1a1a1a;
  --color-text-muted: #666666;
  --color-accent:     #2c5f8a;
  --color-accent-hover: #1d4266;
  --color-border:     #e0e0e0;

  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-size-base: 1rem;
  --line-height: 1.7;

  --radius: 4px;
  --max-width: 1100px;
  --max-width-narrow: 720px;
  --spacing: 1.5rem;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--color-accent-hover); }

ul { list-style: none; }

/* --- Touch / tap delay --- */
a, button, .btn { touch-action: manipulation; }

/* --- Focus visibility --- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.coach-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 1000;
  background: var(--color-accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  transition: top 0.2s;
}
.skip-link:focus { top: 0.5rem; text-decoration: none; color: #fff; }
.main:focus { outline: none; }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* --- Header / Nav --- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-logo:hover { color: var(--color-accent); text-decoration: none; }

.nav-list {
  display: flex;
  gap: 2rem;
}

.nav-list a {
  color: var(--color-text);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--color-accent);
}

.nav-list a.active { font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
  padding: 0.5rem;
  margin: -0.5rem;
}

/* --- Hero --- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 1.5rem;
  width: 100%;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-sub {
  font-size: 1.2rem;
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  background: #fff;
  color: var(--color-accent);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border: 2px solid transparent;
}

.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

/* --- Sections --- */
.section {
  padding: 4rem 0;
}

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

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

/* --- Cards (Leistungen) --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}

/* --- Coach Grid --- */
.coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.coach-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.coach-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(44,95,138,0.1);
  text-decoration: none;
}

.coach-card h2,
.coach-card h3 {
  font-size: 1.1rem;
  margin: 0.75rem 0 0.25rem;
}

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

/* --- Coach Avatar --- */
.coach-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.coach-avatar-lg {
  width: 100px;
  height: 100px;
  font-size: 2.5rem;
  flex-shrink: 0;
}

.coach-avatar-photo {
  object-fit: cover;
  background: none;
}

/* --- Coach Profile --- */
.coach-profile {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 3rem 0;
}

.coach-profile-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.coach-role {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* --- Tags --- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag-list li {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 2rem;
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* --- Page --- */
.page {
  padding: 3rem 0;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

/* --- Content (Markdown) --- */
.content h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }
.content h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.content p  { margin-bottom: 1rem; }
.content ul, .content ol { margin: 0 0 1rem 1.5rem; list-style: disc; }
.content ol  { list-style: decimal; }
.content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.5rem 1rem;
  color: var(--color-text-muted);
  margin: 1.5rem 0;
  font-style: italic;
}
.content hr { border: none; border-top: 1px solid var(--color-border); margin: 2rem 0; }

/* --- Post List --- */
.post-list { display: flex; flex-direction: column; gap: 2rem; }

.post-item {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.post-item:last-child { border-bottom: none; }

.post-item h2, .post-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.post-item h2 a, .post-item h3 a { color: var(--color-text); }
.post-item h2 a:hover, .post-item h3 a:hover { color: var(--color-accent); text-decoration: none; }

.post-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.read-more {
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-block;
  margin-top: 0.5rem;
}

/* --- Coach Posts Section --- */
.coach-posts { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.coach-posts h2 { font-size: 1.4rem; margin-bottom: 1.5rem; }
.coach-bio { margin-bottom: 2rem; }

/* --- Leistungen detail --- */
.leistungen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.leistung-item {
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.leistung-item h3 {
  font-size: 1.15rem;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

/* --- Kontakt --- */
.kontakt-info { display: flex; flex-direction: column; gap: 1rem; }
.kontakt-info p { font-size: 1.05rem; }

/* --- Footer --- */
.site-footer {
  background: var(--color-text);
  color: #ccc;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer strong { color: #fff; display: block; margin-bottom: 0.5rem; }
.site-footer p, .site-footer li { font-size: 0.9rem; }
.site-footer a { color: #aaa; }
.site-footer a:hover { color: #fff; }
.site-footer ul { display: flex; flex-direction: column; gap: 0.3rem; }
.footer-copy { font-size: 0.8rem; color: #999; border-top: 1px solid #333; padding-top: 1rem; }
.footer-copy a { color: #ccc; }
.footer-copy a:hover { color: #fff; }

/* --- Utilities --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.5rem; }

/* --- Responsive --- */
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .nav-list.open { display: flex; }
  .nav-list li a { display: block; padding: 0.75rem 1.5rem; }
  .site-header { position: relative; }
  .coach-profile-header { flex-direction: column; align-items: center; text-align: center; }
  .coach-avatar-lg { margin: 0 auto; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-video { display: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
