/* ============================================================
   United Earth Federation — Stylesheet
   Rot/Schwarz · minimalistisch · Montserrat
   ============================================================ */

:root {
  --bg:        #0a0a0c;
  --surface:   #141418;
  --surface-2: #1b1b21;
  --line:      #27272f;
  --text:      #f4f4f6;
  --muted:     #9a9aa4;
  --red:       #ff3b40;
  --red-deep:  #d61420;
  --red-glow:  rgba(255, 59, 64, .35);

  --maxw: 1140px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin-left: auto; margin-right: auto; padding-left: 1.25rem; padding-right: 1.25rem; }

.eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--red);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  --pad: .85rem 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: var(--pad);
  font-family: inherit;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 30px -10px var(--red-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px -10px var(--red-glow); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-danger {
  background: transparent;
  border-color: #3a2226;
  color: #ff6b70;
  font-size: .72rem;
  padding: .5rem .9rem;
}
.btn-danger:hover { background: #2a1417; border-color: var(--red); }

/* ── Navbar ──────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 12, .72);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 800; letter-spacing: .06em; }
.brand img { width: 38px; height: 38px; border-radius: 9px; }
.brand small { display: block; font-size: .6rem; font-weight: 600; letter-spacing: .25em; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 86vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(620px 520px at 82% 50%, rgba(214,20,32,.20), transparent 68%),
    url("../img/logo.png") 96% center / clamp(280px, 42vw, 540px) no-repeat;
  opacity: .9;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 30%, rgba(10,10,12,.4) 62%, transparent 85%);
}
.hero-content { position: relative; z-index: 2; padding: 5rem 0; max-width: 660px; }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -.01em;
  margin: 1rem 0 1.2rem;
}
.hero h1 span { color: var(--red); }
.hero p.lead { font-size: 1.1rem; color: var(--muted); max-width: 48ch; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.accent-bar { width: 4px; height: 0; background: var(--red); position: absolute; left: 0; top: 18%; box-shadow: 0 0 24px var(--red-glow); animation: grow 1s var(--ease) .2s forwards; }
@keyframes grow { to { height: 64%; } }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 6rem 0; }
.section-head { margin-bottom: 3rem; max-width: 620px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.05; margin: .6rem 0 .8rem; }
.section-head p { color: var(--muted); }

/* ── Feature grid ────────────────────────────────────────── */
.grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: #38383f; }
.card .ic { font-size: 1.6rem; margin-bottom: .9rem; }
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; letter-spacing: .02em; }
.card p { color: var(--muted); font-size: .92rem; }

/* ── News feed ───────────────────────────────────────────── */
.news-list { display: grid; gap: 1.2rem; }
.news-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
}
.news-meta { display: flex; align-items: center; gap: .8rem; font-size: .72rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: .7rem; }
.news-meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.news-item h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: .6rem; }
.news-item .body { color: #d3d3da; font-size: .96rem; }
.news-item img.news-img { margin-top: 1rem; border-radius: 10px; border: 1px solid var(--line); }
.empty {
  text-align: center; padding: 4rem 1rem; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ── Recruit CTA ─────────────────────────────────────────── */
.cta {
  position: relative;
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(160deg, var(--surface) 0%, #120c0e 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(500px 300px at 50% 0%, var(--red-glow), transparent 70%);
  opacity: .5;
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; margin: .8rem 0 1rem; }
.cta p { color: var(--muted); max-width: 50ch; margin: 0 auto 2rem; }

/* ── Footer ──────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 3rem 0; color: var(--muted); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer .brand small { color: var(--muted); }
.footer a:hover { color: var(--red); }

/* ============================================================
   Admin / Login
   ============================================================ */
.admin-bg { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.login-card {
  width: min(100%, 400px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem;
}
.login-card .brand { justify-content: center; margin-bottom: 1.6rem; }
.login-card h1 { font-size: 1.3rem; text-align: center; margin-bottom: .3rem; }
.login-card p.sub { text-align: center; color: var(--muted); font-size: .85rem; margin-bottom: 1.8rem; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.input, textarea.input, select.input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  padding: .8rem .95rem;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, textarea.input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255,59,64,.15);
}
textarea.input { resize: vertical; min-height: 160px; line-height: 1.6; }
.check { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }

.flash { padding: .85rem 1.1rem; border-radius: 9px; font-size: .9rem; margin-bottom: 1.4rem; border: 1px solid; }
.flash.ok  { background: #0e1f14; border-color: #1f5132; color: #6ee7a0; }
.flash.err { background: #241214; border-color: #6e2730; color: #ff8d92; }

/* Admin layout */
.admin-shell { max-width: 1000px; margin-inline: auto; padding: 2.5rem 1.5rem; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2.5rem; flex-wrap: wrap; gap: 1rem; }
.admin-top h1 { font-size: 1.4rem; font-weight: 800; }
.admin-top .brand small { color: var(--muted); }
.admin-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 880px) { .admin-grid { grid-template-columns: 1.1fr .9fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.panel h2 { font-size: 1rem; letter-spacing: .04em; margin-bottom: 1.3rem; display: flex; align-items: center; gap: .5rem; }
.panel h2::before { content: ""; width: 3px; height: 16px; background: var(--red); border-radius: 2px; }

.manage-item { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; margin-bottom: .8rem; }
.manage-item .mt { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.manage-item h4 { font-size: .98rem; font-weight: 700; }
.manage-item time { font-size: .7rem; color: var(--muted); letter-spacing: .06em; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 760px) {
  .nav-links { position: fixed; inset: 70px 0 auto 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .hero::after { background: linear-gradient(180deg, var(--bg) 30%, rgba(10,10,12,.6) 100%); }
  .hero::before { opacity: .35; }
}

/* ── A11y ────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .accent-bar { height: 64%; }
}

/* ============================================================
   Leitfaden (Guide)
   ============================================================ */
.guide-hero {
  position: relative;
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.guide-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(620px 380px at 88% 30%, var(--red-glow), transparent 70%);
  opacity: .5; pointer-events: none;
}
.guide-hero > .wrap { position: relative; }
.guide-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; line-height: 1.02; margin: .8rem 0 1rem; }
.guide-hero .lead { color: var(--muted); max-width: 60ch; margin-bottom: 2rem; }

.progress-overall { max-width: 520px; }
.progress-track { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--red) 0%, var(--red-deep) 100%); border-radius: 99px; transition: width .35s var(--ease); }
.progress-label { margin-top: .6rem; font-size: .82rem; color: var(--muted); letter-spacing: .04em; }
.progress-label span { color: var(--text); font-weight: 700; }
.btn-reset { margin-top: 1.4rem; font-size: .72rem; padding: .55rem 1rem; }

.guide-main { padding: 2.5rem 1.25rem 5rem; }
.ea-note { font-size: .85rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 10px; padding: .8rem 1rem; margin-bottom: 2rem; }

.phase { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.phase-head {
  width: 100%; display: flex; align-items: center; gap: 1.1rem;
  background: transparent; border: 0; cursor: pointer; color: var(--text);
  padding: 1.3rem 1.5rem; font-family: inherit; text-align: left;
}
.phase-head:hover { background: var(--surface-2); }
.phase-num {
  flex: none; width: 48px; height: 48px; display: grid; place-items: center;
  border: 2px solid var(--red); border-radius: 50%;
  font-weight: 900; font-size: 1.05rem; color: var(--text);
}
.phase-titles { flex: 1; display: flex; flex-direction: column; }
.phase-title { font-weight: 800; font-size: 1.2rem; letter-spacing: .01em; }
.phase-sub { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-top: .15rem; }
.phase-meta { flex: none; display: flex; align-items: center; gap: .9rem; }
.phase-progress { font-size: .78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.phase.done .phase-progress { color: #6ee7a0; }
.phase.done .phase-num { border-color: #2f9e63; color: #6ee7a0; }
.chevron { transition: transform .25s var(--ease); color: var(--muted); }
.phase-head[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.phase-body { padding: 0 1.5rem 1.6rem; }
.phase-body[hidden] { display: none; }
.phase-goal { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; color: #e7e7ec; font-weight: 600; margin: .2rem 0 1.3rem; }
.goal-tag { background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: .28rem .6rem; border-radius: 99px; }

.steps { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.step-check { display: flex; gap: .9rem; align-items: flex-start; cursor: pointer; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, background .15s; }
.step-check:hover { border-color: #38383f; background: var(--surface-2); }
.step-box { position: absolute; opacity: 0; width: 0; height: 0; }
.box { flex: none; width: 22px; height: 22px; margin-top: 1px; border: 2px solid var(--line); border-radius: 6px; display: grid; place-items: center; transition: all .15s var(--ease); }
.box::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) scale(0); transition: transform .15s var(--ease); margin-top: -2px; }
.step-box:checked + .box { background: linear-gradient(135deg, var(--red), var(--red-deep)); border-color: var(--red); }
.step-box:checked + .box::after { transform: rotate(-45deg) scale(1); }
.step-box:focus-visible + .box { outline: 2px solid var(--red); outline-offset: 2px; }
.step-text { display: flex; flex-direction: column; gap: .2rem; }
.step-title { font-weight: 600; font-size: .98rem; transition: color .15s, opacity .15s; }
.step-desc { font-size: .86rem; color: var(--muted); line-height: 1.5; }
.step-box:checked ~ .step-text .step-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--red); }

.guide-foot { margin-top: 2.5rem; text-align: center; color: var(--muted); font-size: .92rem; }
.guide-foot a { color: var(--red); font-weight: 600; }

@media (max-width: 560px) {
  .phase-head { padding: 1.1rem 1rem; gap: .8rem; }
  .phase-num { width: 42px; height: 42px; font-size: .95rem; }
  .phase-body { padding: 0 1rem 1.3rem; }
}

/* ── Leitfaden-Editor (Command) ─────────────────────────────── */
.edit-details { border: 1px solid var(--line); border-radius: 10px; margin-top: .4rem; background: var(--bg); }
.edit-details > summary {
  cursor: pointer; padding: .7rem 1rem; font-size: .82rem; font-weight: 600;
  letter-spacing: .04em; color: var(--muted); list-style: none; user-select: none;
}
.edit-details > summary::-webkit-details-marker { display: none; }
.edit-details > summary:hover { color: var(--text); }
.edit-details[open] > summary { color: var(--red); border-bottom: 1px solid var(--line); }
.edit-form { padding: 1.1rem; }
.edit-form .field { margin-bottom: .9rem; }
