/* ============================================
   Cho Gar Wing Chun
   ============================================ */

:root {
  --color-bg: #0d0b0a;
  --color-bg-alt: #17130f;
  --color-surface: #211a16;
  --color-surface-2: #2a2119;
  --color-red: #9e1b1b;
  --color-red-dark: #6e1212;
  --color-gold: #d4af37;
  --color-gold-soft: #e9cf85;
  --color-text: #f3ece2;
  --color-text-muted: #b9ada0;
  --font-heading: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-body: 'Noto Sans', 'Segoe UI', Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --max-width: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.65;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-gold-soft);
  letter-spacing: 0.03em;
  margin-top: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

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

.section-title {
  text-align: center;
  margin-bottom: 12px;
  font-size: 2rem;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 48px;
}

.eyebrow {
  display: block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--color-gold);
  margin-bottom: 10px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(158, 27, 27, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(158, 27, 27, 0.5);
}

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

.btn-outline:hover {
  background: var(--color-gold);
  color: #1a1410;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 11, 10, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-gold-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.logo .logo-mark {
  height: 44px;
  width: 44px;
  display: block;
  object-fit: contain;
  transition: height 0.3s ease, width 0.3s ease;
}

.site-header.is-scrolled .logo .logo-mark {
  height: 36px;
  width: 36px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  font-size: 1.3rem;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-gold-soft);
}

.nav-links .btn-login {
  border: 1px solid var(--color-gold);
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--color-gold-soft);
}

.nav-links .btn-login:hover {
  background: var(--color-gold);
  color: #1a1410;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(158, 27, 27, 0.25), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.12), transparent 40%),
    linear-gradient(180deg, #0d0b0a 0%, #17130f 100%);
}

.hero-bg-glyph {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 42rem;
  opacity: 0.05;
  color: var(--color-red);
  pointer-events: none;
  line-height: 1;
  user-select: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--color-red);
  -webkit-text-stroke: 1px var(--color-gold);
}

.hero p {
  color: var(--color-text-muted);
  font-size: 1.15rem;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
  padding: 70px 0 50px;
  text-align: center;
  background: linear-gradient(180deg, #1c1611 0%, var(--color-bg) 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 12px;
}

.page-hero p {
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.breadcrumb {
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
}

/* ---------- Cards / Grid ---------- */

.grid {
  display: grid;
  gap: 28px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-surface);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.4);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Stats strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.stats .stat-number {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: var(--color-gold-soft);
}

.stats .stat-label {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Table (Trainingszeiten) ---------- */

.timetable {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.timetable th, .timetable td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.timetable th {
  background: var(--color-surface-2);
  color: var(--color-gold-soft);
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.timetable tr:last-child td {
  border-bottom: none;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(158, 27, 27, 0.2);
  color: #f3a5a5;
  border: 1px solid rgba(158, 27, 27, 0.4);
}

.tag-gold {
  background: rgba(212, 175, 55, 0.15);
  color: var(--color-gold-soft);
  border-color: rgba(212, 175, 55, 0.4);
}

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--color-surface-2), var(--color-bg-alt));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  border: 1px solid rgba(212, 175, 55, 0.12);
  color: var(--color-red);
}

/* ---------- Forms ---------- */

.form-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius);
  padding: 42px 36px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--color-bg);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' fill='none' stroke='%23d4af37' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-group select option {
  background: var(--color-surface);
  color: var(--color-text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-gold);
}

.form-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 20px;
}

.form-error {
  background: rgba(158, 27, 27, 0.15);
  border: 1px solid rgba(158, 27, 27, 0.5);
  color: #f3a5a5;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: none;
}

.form-success {
  background: rgba(90, 140, 70, 0.15);
  border: 1px solid rgba(120, 180, 95, 0.5);
  color: #bfe0a8;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: none;
}

.form-card-wide {
  max-width: 620px;
}

.demo-hint {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--color-gold-soft);
  margin-bottom: 24px;
}

/* ---------- Registration approval ---------- */

.tag-pending {
  background: rgba(212, 175, 55, 0.15);
  color: var(--color-gold-soft);
  border-color: rgba(212, 175, 55, 0.4);
}

.tag-approved {
  background: rgba(90, 140, 70, 0.18);
  color: #bfe0a8;
  border-color: rgba(120, 180, 95, 0.45);
}

.tag-rejected {
  background: rgba(158, 27, 27, 0.2);
  color: #f3a5a5;
  border-color: rgba(158, 27, 27, 0.45);
}

.request-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.request-item {
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  padding: 18px 0;
}

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

.request-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.request-head strong {
  font-family: var(--font-heading);
  color: var(--color-gold-soft);
}

.request-meta {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin: 8px 0 0;
  line-height: 1.7;
}

.request-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.request-actions .btn {
  padding: 9px 20px;
  font-size: 0.82rem;
}

.btn-danger {
  background: transparent;
  border: 1px solid rgba(158, 27, 27, 0.6);
  color: #f3a5a5;
}

.btn-danger:hover {
  background: rgba(158, 27, 27, 0.2);
}

.empty-state {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-tab {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
}

.admin-tab.is-active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--color-gold-soft);
  border-color: rgba(212, 175, 55, 0.55);
}

/* ---------- Member area ---------- */

.member-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 48px;
}

.member-welcome h1 {
  margin-bottom: 6px;
}

.member-welcome p {
  color: var(--color-text-muted);
  margin: 0;
}

.belt-bar {
  height: 22px;
  border-radius: 999px;
  background: var(--color-bg);
  border: 1px solid rgba(212, 175, 55, 0.25);
  overflow: hidden;
  position: relative;
}

.belt-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-red), var(--color-gold));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.attendance-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.attendance-list li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.attendance-list li:last-child {
  border-bottom: none;
}

.attendance-list .date {
  color: var(--color-text);
}

.profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-gold-soft);
  border: 2px solid var(--color-gold);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  padding: 50px 0 30px;
  color: var(--color-text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-col {
  flex: 1 1 200px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 14px;
}

.footer-col p {
  font-size: 0.9rem;
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a:hover {
  color: var(--color-gold-soft);
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.newsletter-form input {
  flex: 1 1 150px;
  min-width: 0;
  padding: 10px 12px;
  background: var(--color-bg);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-gold);
}

.newsletter-form .btn {
  padding: 10px 18px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.newsletter-success {
  color: var(--color-gold-soft);
  font-size: 0.85rem;
  margin: 10px 0 0;
  display: none;
}

.footer-bottom {
  border-top: 1px solid rgba(212, 175, 55, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}

.footer-legal {
  margin: 0 0 10px;
  color: var(--color-text-muted);
}

.footer-legal a:hover {
  color: var(--color-gold-soft);
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 820px;
}

.legal h2 {
  font-size: 1.3rem;
  margin-top: 44px;
}

.legal h3 {
  font-size: 1.02rem;
  margin-top: 28px;
  color: var(--color-text);
}

.legal p,
.legal li,
.legal address {
  color: var(--color-text-muted);
}

.legal address {
  font-style: normal;
  margin-bottom: 20px;
}

.legal ul {
  padding-left: 20px;
  margin: 0 0 16px;
}

.legal li {
  margin-bottom: 8px;
}

.legal a {
  color: var(--color-gold-soft);
  text-decoration: underline;
}

.legal code {
  background: var(--color-surface);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.9em;
}

.legal-updated {
  font-size: 0.85rem;
  margin-top: 40px;
}

/* ---------- Cookie notice ---------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  background: var(--color-surface);
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
  transform: translateY(110%);
  transition: transform 0.4s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.cookie-banner-text {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.cookie-banner-text a {
  color: var(--color-gold-soft);
  text-decoration: underline;
}

.cookie-banner-btn {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-indicator { display: none; }
}

@media (max-width: 420px) {
  .logo {
    font-size: 1.15rem;
    gap: 8px;
  }

  .logo .logo-mark {
    height: 34px;
    width: 34px;
  }
}

@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero-bg-glyph { font-size: 22rem; }

  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 20px;
  }
}

@media (max-width: 520px) {
  /* Three stats: one per row beats a 2 + 1 layout with a half-width orphan. */
  .stats { grid-template-columns: 1fr; }
  .member-header { flex-direction: column; align-items: flex-start; }
}

/* ============================================
   Interactive layer – loader, 3D scene, motion
   ============================================ */

/* ---------- Page loader ---------- */

#page-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.loader-mark {
  font-size: 2.6rem;
}

.loader-word {
  font-family: var(--font-heading);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--color-gold);
}

.loader-rule {
  width: 0;
  height: 1px;
  background: var(--color-gold);
}

html.is-loading,
html.is-loading body {
  overflow: hidden;
  height: 100%;
}

/* ---------- Three.js hero scene ---------- */

.scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero .hero-content {
  position: relative;
  z-index: 2;
}

.hero-bg-glyph {
  z-index: 0;
}

.scene-canvas {
  z-index: 1;
}

/* ---------- Custom cursor ---------- */

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1500;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--color-gold);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(212, 175, 55, 0.5);
}

.cursor-ring.is-active {
  width: 56px;
  height: 56px;
  border-color: var(--color-gold);
  background: rgba(212, 175, 55, 0.08);
}

html.has-custom-cursor,
html.has-custom-cursor a,
html.has-custom-cursor button,
html.has-custom-cursor .btn,
html.has-custom-cursor input,
html.has-custom-cursor textarea {
  cursor: none;
}

/* ---------- Sticky header motion ---------- */

.site-header {
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.header-inner {
  transition: height 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(13, 11, 10, 0.98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.site-header.is-scrolled .header-inner {
  height: 62px;
}

/* ---------- Nav active indicator ---------- */

.nav-links {
  position: relative;
}

.nav-indicator {
  position: absolute;
  bottom: -4px;
  height: 2px;
  background: var(--color-gold);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Card tilt ---------- */

.card {
  will-change: transform;
}

/* ---------- Page hero (host for compact scene) ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
}

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

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}
