/*
Theme Name: Chess Diagnostics
Theme URI: https://chessdiagnostics.de
Author: GameFrogs
Author URI: https://chessdiagnostics.de
Description: Marketing- und Blog-Theme fuer Chess Diagnostics -- dunkles Bronze/Terminal-Design, portiert aus der Next.js-Version der Website.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: chess-diagnostics
*/

:root {
  --bg: #0e0d0b;
  --surface: #17160f;
  --surface2: #1e1d15;
  --border: #2a2820;
  --text: #ede8d8;
  --muted: #7a7468;
  --accent: #b87333;
  --accent-dim: #4a3520;
  --green: #4a7a50;
  --red: #c0392b;
  --red-bright: #e2574c;
  --yellow: #dfb02c;

  --font-display: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  position: relative;
  min-width: 0;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: conic-gradient(from 90deg at 1px 1px, #ffffff08 90deg, transparent 0);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
}

::selection { background: var(--accent-dim); color: var(--text); }

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

/* -- Nav ------------------------------------------------------------ */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(14, 13, 11, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.nav-links a.plain:hover { color: var(--text); }
.nav-links a.cta {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.35rem 1rem;
  border-radius: 4px;
  text-transform: none;
  letter-spacing: normal;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a.cta:hover { background: var(--accent); color: var(--bg); }

main { flex: 1; }

/* -- Hero ------------------------------------------------------------ */
.hero {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  text-align: center;
}
.hero-copy { flex: 1; max-width: 34rem; }
.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}
.hero h1 { font-size: 2.25rem; line-height: 1.1; }
.hero p.lede { margin-top: 1.5rem; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.hero-actions { margin-top: 2rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.btn-primary {
  display: inline-block;
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.9rem 2rem;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}
.btn-primary:hover { opacity: 0.9; }
.hero-actions .hint { font-size: 0.75rem; color: var(--muted); }

/* -- Terminal ---------------------------------------------------------- */
.terminal {
  width: 100%;
  max-width: 34rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: left;
}
.terminal-bar { display: flex; align-items: center; gap: 0.4rem; border-bottom: 1px solid var(--border); padding: 0.7rem 1rem; }
.dot { width: 0.6rem; height: 0.6rem; border-radius: 999px; }
.dot.red { background: var(--red-bright); }
.dot.yellow { background: var(--yellow); }
.dot.green { background: var(--green); }
.terminal-body { min-height: 220px; padding: 1.1rem 1.15rem; display: flex; flex-direction: column; gap: 0.35rem; }
.terminal-body p { color: var(--muted); margin: 0; }
.terminal-body p.current { color: var(--text); }
.cursor { display: inline-block; width: 7px; height: 1em; margin-left: 2px; transform: translateY(2px); background: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .cursor.blink { animation: blink 1s step-end infinite; }
}
@keyframes blink { 50% { opacity: 0; } }

/* -- Features ---------------------------------------------------------- */
.features { max-width: 72rem; margin: 0 auto; padding: 4rem 1.25rem; }
.features h2 { text-align: center; font-size: 1.875rem; margin-bottom: 2.5rem; }
.feature-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
.card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  padding: 2rem;
  transition: background 0.15s ease;
}
.card:hover { background: var(--surface2); }
.card--green { border-left-color: var(--green); }
.card--red { border-left-color: var(--red); }
.card-tag { display: block; margin-bottom: 0.5rem; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent); }
.card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card p { font-size: 0.875rem; line-height: 1.7; color: var(--muted); }
.card p strong, .card li strong { color: var(--text); }
.card a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* -- Closing statement --------------------------------------------------- */
.closing { max-width: 48rem; margin: 0 auto; padding: 4rem 1.25rem 5rem; text-align: center; }
.closing p { max-width: 40rem; margin: 0 auto; color: var(--muted); opacity: 0.85; font-size: 0.875rem; line-height: 1.7; }
.closing strong { color: var(--text); }

/* -- Footer -------------------------------------------------------------- */
footer.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 1.25rem; text-align: center; font-size: 0.75rem; color: var(--muted); }
footer.site-footer p.tag { max-width: 40rem; margin: 0 auto 1rem; line-height: 1.7; opacity: 0.75; }
footer.site-footer p.tag strong { color: var(--text); }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.35rem 0.75rem; }
.footer-meta a { color: var(--accent); }
.footer-meta a:hover { text-decoration: underline; }

/* -- Legal pages ----------------------------------------------------------- */
.legal-page { max-width: 42rem; margin: 0 auto; padding: 4rem 1.25rem 5rem; }
.legal-page.wide { max-width: 48rem; }
.legal-page h1 { font-size: 2.25rem; margin-bottom: 2.5rem; }
.legal-mark { display: block; margin-bottom: 1rem; font-size: 2.25rem; color: var(--accent); }
.legal-sub { margin: -1.5rem 0 3.5rem; font-size: 0.75rem; color: var(--muted); }

dl.kv { display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; margin: 0; }
dl.kv dt { color: var(--muted); margin: 0; }
dl.kv dd { color: var(--text); margin: 0.15rem 0 0; }
.placeholder { color: var(--red-bright); }

.legal-block + .legal-block { margin-top: 1.5rem; }
.legal-block h2 {
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 600;
}
.legal-block p { font-size: 0.875rem; line-height: 1.7; color: var(--muted); }
.legal-block a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.divider-label {
  margin-bottom: 2.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

section.dsg-section { margin-bottom: 2.5rem; }
.dsg-eyebrow { display: block; margin-bottom: 0.25rem; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); }
.dsg-section h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.dsg-section .card + .card { margin-top: 0.9rem; }
.dsg-section .card-kicker { display: block; margin-bottom: 0.25rem; font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted); }
.dsg-section .card h3 { font-size: 1.125rem; margin-bottom: 0.5rem; font-family: var(--font-display); }
.dsg-section .card > * + * { margin-top: 0.5rem; }
.dsg-section .card p, .dsg-section .card li { font-size: 0.875rem; line-height: 1.7; color: var(--muted); }
.dsg-section .card ul { padding-left: 1.25rem; list-style: disc; display: flex; flex-direction: column; gap: 0.25rem; }
code.inline { background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 0.15em 0.4em; font-size: 0.8em; font-family: var(--font-mono); }

.meta-rows { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.4rem; }
.meta-row { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.75rem; }
.meta-row .label { min-width: 140px; flex-shrink: 0; color: var(--text); }
.meta-row .value { color: var(--muted); }
@media (min-width: 640px) { .meta-row { flex-direction: row; gap: 0.75rem; } }

/* -- Blog list + single post --------------------------------------------- */
.blog-list { display: flex; flex-direction: column; gap: 1rem; }
.blog-card {
  display: block;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  padding: 1.5rem;
  transition: background 0.15s ease;
}
.blog-card:hover { background: var(--surface2); }
.blog-card-meta {
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
}
.blog-card-date { color: var(--muted); text-transform: none; letter-spacing: normal; }
.blog-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.blog-card p { font-size: 0.875rem; line-height: 1.7; color: var(--muted); }

.pagination { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8125rem; }
.pagination a, .pagination span {
  display: inline-block;
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  color: var(--muted);
}
.pagination a:hover { color: var(--text); border-color: var(--accent); }
.pagination .current { color: var(--accent); border-color: var(--accent); }

.entry-back { display: inline-block; margin-top: 3rem; color: var(--accent); font-size: 0.875rem; }
.entry-back:hover { text-decoration: underline; }

.prose-chess { color: var(--text); line-height: 1.75; font-size: 0.95rem; }
.prose-chess > * + * { margin-top: 1.15em; }
.prose-chess h1, .prose-chess h2, .prose-chess h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-top: 1.6em;
}
.prose-chess h1 { font-size: 1.75rem; }
.prose-chess h2 { font-size: 1.4rem; }
.prose-chess h3 { font-size: 1.15rem; }
.prose-chess p, .prose-chess li { color: var(--text); opacity: 0.9; }
.prose-chess a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose-chess ul, .prose-chess ol { padding-left: 1.4em; }
.prose-chess ul { list-style: disc; }
.prose-chess ol { list-style: decimal; }
.prose-chess blockquote { border-left: 3px solid var(--accent); padding-left: 1em; color: var(--muted); font-style: italic; }
.prose-chess code { background: var(--surface2); border: 1px solid var(--border); border-radius: 4px; padding: 0.15em 0.4em; font-size: 0.85em; font-family: var(--font-mono); }
.prose-chess pre { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 1em; overflow-x: auto; }
.prose-chess pre code { background: none; border: none; padding: 0; }
.prose-chess img { border-radius: 6px; border: 1px solid var(--border); }

@media (min-width: 1024px) {
  .hero { flex-direction: row; align-items: center; gap: 4rem; padding-top: 6rem; padding-bottom: 7rem; text-align: left; }
  .hero-copy { text-align: left; }
  .hero h1 { font-size: 3.75rem; }
  .hero-actions { flex-direction: row; justify-content: flex-start; }
  .btn-primary { width: auto; }
  .terminal-wrap { flex: 1; display: flex; justify-content: center; }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .hero h1 { font-size: 3rem; }
}

/* -- Videos ---------------------------------------------------------------- */
.video-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
}
@media (min-width: 640px) { .video-grid { grid-template-columns: 1fr 1fr; } }

.video-card { display: block; }
.video-card:hover h3 { color: var(--accent); }
.video-card h3 {
  margin-top: 0.75rem;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  transition: color 0.15s ease;
}
.video-card p { margin-top: 0.35rem; font-size: 0.8125rem; color: var(--muted); line-height: 1.6; }

.lite-yt {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.lite-yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.lite-yt img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lite-yt-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: block;
}
.video-card:hover .lite-yt-icon { background: var(--accent); color: var(--bg); }
.lite-yt-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: rgba(14, 13, 11, 0.75);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.lite-yt-play:hover .lite-yt-icon,
.lite-yt-play:focus-visible .lite-yt-icon { background: var(--accent); color: var(--bg); }

/* -- Coming soon ------------------------------------------------------------ */
.coming-soon {
  max-width: 28rem;
  margin: 0 auto;
  padding: 6rem 1.25rem 7rem;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.coming-soon .legal-mark { margin-bottom: 1rem; }
.coming-soon h1 { font-size: 1.875rem; margin-bottom: 0.75rem; }
.coming-soon p { max-width: 24rem; margin-bottom: 2rem; color: var(--muted); font-size: 0.875rem; line-height: 1.7; }
.coming-soon .badge {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.35rem 1rem;
  border-radius: 4px;
}

/* -- Login ------------------------------------------------------------ */
.coming-soon .login-error { color: var(--red-bright); }
.coming-soon .secondary-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent);
  font-size: 0.8125rem;
}
.coming-soon .secondary-link:hover { text-decoration: underline; }
