:root {
  --bg: #050505;
  --panel: rgba(18, 18, 18, 0.88);
  --panel-border: #2a0d0f;
  --red: #c4161c;
  --red-bright: #e8282f;
  --red-dark: #6e0b0f;
  --text: #e8e6e3;
  --muted: #9a9591;
  --line: #262222;
  --header-h: min(31.77vw, 610px); /* 1920x610 image aspect */

  /* class colors */
  --dk: #c41e3a; --dh: #a330c9; --druid: #ff7c0a; --evoker: #33937f;
  --hunter: #aad372; --mage: #3fc7eb; --monk: #00ff98; --paladin: #f48cba;
  --priest: #ffffff; --rogue: #fff468; --shaman: #0070dd; --warlock: #8788ee;
  --warrior: #c69b6d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red-bright); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */
.hero {
  position: relative;
  height: var(--header-h);
  min-height: 260px;
  background: url("assets/header.jpg") center top / cover no-repeat;
}

/* Fade the bottom and sides into the page, with a faint red glow at the seam */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, transparent 45%, rgba(5,5,5,.7) 75%, var(--bg) 100%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(196,22,28,.18), transparent 70%);
}

/* Wider than the image: blend its edges into black */
@media (min-width: 1921px) {
  .hero {
    background-size: 1920px auto;
    height: 610px;
  }
  .hero::before {
    content: "";
    position: absolute; inset: 0;
    pointer-events: none;
    background: linear-gradient(to right,
      var(--bg) calc(50% - 960px), transparent calc(50% - 760px),
      transparent calc(50% + 760px), var(--bg) calc(50% + 960px));
  }
}

.topnav {
  position: relative; z-index: 2;
  display: flex; justify-content: flex-end; align-items: center; gap: 28px;
  padding: 14px 24px;
  background: linear-gradient(to bottom, rgba(0,0,0,.75), transparent);
}
.topnav a {
  color: var(--text);
  text-decoration: none;
  font: 20px/1 "Bebas Neue", sans-serif;
  letter-spacing: .08em;
  transition: color .15s;
}
.topnav a:hover { color: var(--red-bright); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  background: linear-gradient(var(--red), var(--red-dark));
  border: 1px solid var(--red-bright);
  color: #fff !important;
  text-decoration: none;
  font: 20px/1 "Bebas Neue", sans-serif;
  letter-spacing: .08em;
  text-align: center;
  transition: filter .15s, box-shadow .15s;
}
.btn:hover { filter: brightness(1.15); box-shadow: 0 0 16px rgba(232,40,47,.45); }
.btn-small { padding: 7px 14px; font-size: 18px; }
.btn-block { display: block; margin: 18px 0; }

/* ---------- Layout ---------- */
.layout {
  position: relative; z-index: 3;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 290px;
  gap: 24px;
  max-width: 1320px;
  margin: calc(var(--header-h) * -0.28) auto 0; /* overlap the dark bottom of the header */
  padding: 0 24px 48px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-top: 3px solid var(--red);
  padding: 22px 22px 24px;
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
}

.panel-title {
  margin: 0 0 16px;
  font: 32px/1 "Bebas Neue", sans-serif;
  letter-spacing: .06em;
  color: #fff;
  display: flex; align-items: center; gap: 12px;
}
.panel-title::before,
.panel-title::after {
  content: ""; flex: 1; height: 2px;
}
.panel-title::after { background: linear-gradient(to right, var(--red), transparent); }
.panel-title::before { display: none; background: linear-gradient(to left, var(--red), transparent); }

/* News (and any .centered title): centred, line fading out both ways */
.panel-news .panel-title::before,
.panel-title.centered::before { display: block; }

.panel-intro { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

/* ---------- Recruiting ---------- */
.recruit-list { list-style: none; margin: 0; padding: 0; }
.recruit-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.recruit-list .spec { font-weight: 400; color: var(--muted); font-size: 13px; }
.recruit-list .cls { display: block; }

.demand {
  flex-shrink: 0;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 2px;
}
.demand-high   { background: var(--red); color: #fff; }
.demand-medium { background: #3a1416; color: #ff8a8e; border: 1px solid var(--red-dark); }
.demand-low    { background: #1c1c1c; color: var(--muted); border: 1px solid #333; }

.sub-title {
  margin: 20px 0 6px;
  font: 20px/1 "Bebas Neue", sans-serif;
  letter-spacing: .06em;
  color: #fff;
  text-align: center;
}
.schedule { margin: 0; font-size: 14px; }
.schedule div { display: flex; justify-content: space-between; padding: 4px 0; }
.schedule dt { color: var(--muted); }
.schedule dd { margin: 0; font-weight: 600; }

/* ---------- News ---------- */
.news-item { padding: 4px 0 22px; }
.news-item + .news-item { border-top: 1px solid var(--line); padding-top: 22px; }
.news-item h3 { margin: 0 0 4px; font-size: 20px; line-height: 1.3; color: #fff; }
.news-meta {
  margin: 0 0 10px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--red-bright);
}
.news-meta span { color: var(--muted); }
.news-item p { margin: 0 0 10px; color: #cfcbc7; }
.news-item p:last-child { margin-bottom: 0; }

/* Formatted post content (also used by the admin editor) */
.news-body { color: #fff; overflow-wrap: anywhere; }
.news-body p { margin: 0 0 10px; color: inherit; }
.news-body > :last-child { margin-bottom: 0; }
.news-body h3 { margin: 16px 0 8px; font: 24px/1.1 "Bebas Neue", sans-serif; letter-spacing: .05em; color: #fff; }
.news-body ul, .news-body ol { margin: 0 0 10px; padding-left: 22px; }
.news-body li { margin: 2px 0; }
.news-body blockquote {
  margin: 0 0 10px; padding: 6px 14px;
  border-left: 3px solid var(--red); background: rgba(255,255,255,.03); color: #bdb8b2;
}
.news-body img {
  display: block; max-width: 100%; height: auto;
  margin: 12px 0; border: 1px solid #2a2a2a;
}
.news-body strong { color: #fff; }

/* ---------- Raid progress ---------- */
.raid + .raid { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.raid-name { margin: 0 0 12px; font-size: 16px; color: #fff; }
.diff { margin-bottom: 10px; }
.diff-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.diff-head strong { font-weight: 600; }
.diff-head span { color: var(--muted); font-variant-numeric: tabular-nums; }
.diff.complete .diff-head span { color: var(--red-bright); font-weight: 700; }
/* Raid with no difficulties selected: just a centred x/y */
.diff-head-count { justify-content: center; }
.diff-head-count span { color: var(--text); font-size: 15px; font-weight: 600; }
.bar { height: 8px; background: #1a1a1a; border: 1px solid #2c2c2c; overflow: hidden; }
.bar > i {
  display: block; height: 100%;
  background: linear-gradient(to right, var(--red-dark), var(--red-bright));
  box-shadow: 0 0 10px rgba(232,40,47,.5);
}
.raid-links { margin-top: 18px; font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
.raid-links a { color: var(--muted); text-decoration: none; }
.raid-links a:hover { color: var(--red-bright); }

/* ---------- Apply page ---------- */
.apply-layout {
  position: relative; z-index: 3;
  max-width: 760px;
  margin: calc(var(--header-h) * -0.28) auto 0;
  padding: 0 24px 48px;
}
.back-link { display: inline-block; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--red-bright); }

.apply-q { margin: 0 0 22px; padding: 0; border: 0; }
.apply-label { display: block; margin-bottom: 4px; color: #fff; font-weight: 600; padding: 0; }
.apply-label .req { color: var(--red-bright); }
.apply-help { margin: 0 0 8px; color: var(--muted); font-size: 13px; }

.apply-q input[type="text"], .apply-q textarea, .apply-q select {
  width: 100%;
  padding: 10px 12px;
  background: #0d0d0d;
  border: 1px solid #333;
  border-radius: 2px;
  color: var(--text);
  font: 15px/1.5 "Inter", system-ui, sans-serif;
}
.apply-q textarea { resize: vertical; }
.apply-q input:focus, .apply-q textarea:focus, .apply-q select:focus {
  outline: none;
  border-color: var(--red-bright);
  box-shadow: 0 0 0 2px rgba(232,40,47,.25);
}
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checks input { width: 17px; height: 17px; accent-color: var(--red); }
.checks-stacked { flex-direction: column; gap: 8px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.apply-msg { min-height: 1.4em; margin: 0; color: #ff6b70; }
.apply-done { text-align: center; padding: 20px 0 8px; }
.apply-done h3 { margin: 0 0 8px; font: 34px/1 "Bebas Neue", sans-serif; letter-spacing: .06em; color: #fff; }
.apply-done p { color: var(--muted); margin: 0 0 20px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--panel-border);
  background: linear-gradient(to bottom, #0c0303, var(--bg));
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 22px 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr 1fr; }
  .panel-news { grid-column: 1 / -1; order: -1; }
}

@media (max-width: 700px) {
  .hero { background-position: 68% top; min-height: 240px; }
  .layout {
    grid-template-columns: 1fr;
    margin-top: -40px;
    padding: 0 16px 40px;
    gap: 16px;
  }
  .topnav { gap: 18px; }
  .topnav a { font-size: 18px; }
  .apply-layout { margin-top: -40px; padding: 0 16px 40px; }
}
