/* ==========================================================================
   WhiteHatsForFuture – Design System
   Light theme, blue + cyan accents, glassy panels
   ========================================================================== */

:root {
  --bg: #f8f9fc;
  --bg-elevated: #ffffff;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-border: rgba(0, 0, 0, 0.08);
  --text: #374151;
  --text-strong: #111827;
  --muted: #6b7280;
  --line: rgba(0, 0, 0, 0.1);
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.25);
  --accent2: #0891b2;
  --accent2-hover: #0e7490;
  --accent2-glow: rgba(8, 145, 178, 0.2);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

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

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

/* -------------------------------------------------------------------------- */
/* Layout                                                                     */
/* -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.section-lead {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 48ch;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-strong);
  text-decoration: none;
}
.logo:hover {
  color: var(--text-strong);
}
.logo-icon {
  display: block;
  flex-shrink: 0;
  height: 32px;
  width: auto;
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}
.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--accent);
}
.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: translateY(0) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: translateY(0) rotate(-45deg);
}

.hamburger {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: background var(--transition);
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition);
}
.hamburger::before {
  top: -6px;
}
.hamburger::after {
  top: 6px;
}

.main-nav {
  display: block;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-list a:hover,
.nav-list a.active {
  color: var(--text-strong);
  background: rgba(0, 0, 0, 0.06);
}
.nav-list a.active {
  color: var(--accent);
}

.nav-discord {
  margin-left: 0.25rem;
}
/* Icon und Text in einer Zeile – überschreibt .nav-list a display:block */
.nav-list .discord-link {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  padding: 0.5rem 0.75rem;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-list .discord-link:hover {
  color: #5865F2;
  background: rgba(0, 0, 0, 0.06);
}
.discord-link .discord-icon,
.discord-link-footer .discord-icon {
  flex-shrink: 0;
  display: block;
  vertical-align: middle;
}
.discord-label {
  flex-shrink: 0;
  font-weight: 500;
  font-size: 0.9375rem;
}
.discord-link-footer {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-size: 0.9375rem;
  color: var(--muted);
}
.discord-link-footer:hover {
  color: #5865F2;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--panel-border);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.is-open {
    max-height: 320px;
  }

  .nav-list {
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }

  .nav-list a {
    width: 100%;
    padding: 0.75rem 1rem;
  }
  .nav-list .nav-discord .discord-link {
    width: auto;
    display: inline-flex !important;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform 0.15s ease;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #1d4ed8);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #1e40af);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-strong);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 0.5rem;
}

.card-text {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
}

.card-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .card-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* -------------------------------------------------------------------------- */
/* Project blocks (Projekte & Links)                                           */
/* -------------------------------------------------------------------------- */

.section-projekte {
  padding-top: 3rem;
}

.project-block-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .project-block-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}
@media (min-width: 900px) {
  .project-block-grid:not(.project-block-grid-small) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-block {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.2s ease;
}
.project-block:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.project-block:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.project-block-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
.project-block-icon img {
  width: 32px;
  height: 32px;
}
.project-block-discord .project-block-icon {
  background: rgba(88, 101, 242, 0.12);
}
.project-block-ctf .project-block-icon {
  background: rgba(8, 145, 178, 0.12);
  color: var(--accent2);
  font-size: 0.875rem;
}
.project-block-writeups .project-block-icon {
  background: rgba(37, 99, 235, 0.08);
  font-size: 1.5rem;
}

.project-block-body {
  flex: 1;
  min-width: 0;
}

.project-block-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0.35rem 0 0.5rem;
}

.project-block-text {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.project-block-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  transition: color var(--transition);
}
.project-block:hover .project-block-link {
  color: var(--accent-hover);
}

.section-cta {
  text-align: center;
  margin: 0;
}

/* Kleine Projekt-Blöcke (weitere Links) */
.project-block-grid-small .project-block {
  padding: 1rem 1.25rem;
}
.project-block-inline .project-block-icon {
  display: none;
}
.project-block-inline .project-block-link {
  display: block;
  margin-bottom: 0.25rem;
}

.section-title-spaced {
  margin-top: 2.5rem;
}

.hero-small {
  padding: 2.5rem 0 2rem;
}
.hero-small .hero-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

/* -------------------------------------------------------------------------- */
/* Pills / Tags                                                               */
/* -------------------------------------------------------------------------- */

.pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent);
}
.pill-cyan {
  background: rgba(8, 145, 178, 0.12);
  color: var(--accent2);
}

/* -------------------------------------------------------------------------- */
/* Callout                                                                    */
/* -------------------------------------------------------------------------- */

.callout {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(8, 145, 178, 0.06));
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.callout-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 0.5rem;
}
.callout p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

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

.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 40ch;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

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

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-strong);
  margin-bottom: 0.35rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted);
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-error {
  font-size: 0.875rem;
  color: #f87171;
  margin-top: 0.35rem;
}

.form-success {
  padding: 1rem;
  background: rgba(8, 145, 178, 0.1);
  border: 1px solid rgba(8, 145, 178, 0.25);
  border-radius: var(--radius-sm);
  color: var(--accent2-hover);
  margin-bottom: 1rem;
}

/* Honeypot: hidden from users, left in DOM for bots */
.form-group.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.form-group.honeypot input {
  position: absolute;
}

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

.site-footer {
  margin-top: auto;
  padding: 3rem 0 2rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
  }
}

.footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-brand .logo-icon {
  flex-shrink: 0;
  height: 28px;
  width: auto;
  display: block;
}
.footer-brand .logo-text {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-strong);
}

.footer-tagline {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0.5rem 0 0.75rem;
}

.footer-disclaimer {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
  max-width: 32ch;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links li {
  margin-bottom: 0.5rem;
}
.footer-links a {
  font-size: 0.9375rem;
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.copyright {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
}

/* -------------------------------------------------------------------------- */
/* Page-specific: Legal                                                       */
/* -------------------------------------------------------------------------- */

.legal-section {
  margin-bottom: 2.5rem;
}
.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 0.75rem;
  padding-top: 0.5rem;
}
.legal-section p {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.legal-email-censored .legal-email-mask {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.05em;
  color: var(--text-strong);
}
.legal-email-hint {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.legal-email-revealed a {
  font-weight: 500;
}
.legal-captcha-form {
  margin-top: 1rem;
  max-width: 280px;
}
.legal-captcha-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}
.legal-captcha-row .form-input {
  width: 5rem;
}

/* -------------------------------------------------------------------------- */
/* Utility                                                                    */
/* -------------------------------------------------------------------------- */

.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
