/* ============================================================
   ORCHARDMC — server hub
   A dense, functional community hub. Solid-header panels,
   live data readouts, red-led warm palette. Built to read as
   a real Minecraft server site, not a landing page.
   ============================================================ */

:root {
  --ink:      #100d0c;
  --ink-2:    #17120f;
  --surface:  #1c1512;
  --surface-2:#241a16;
  --edge:     #33241f;
  --edge-hi:  #4a332b;

  --red:    #e6482e;
  --red-2:  #ff6a4d;
  --red-dk: #b8331d;
  --gold:   #f4b850;
  --leaf:   #7bc86b;
  --leaf-dk:#4f9a45;

  --text:     #f4ede3;
  --text-dim: #c0b0a5;
  --text-mut: #8a7a70;

  --r: 12px;
  --r-sm: 8px;
  --wrap: 1240px;

  --display: "Clash Display", "Bricolage Grotesque", system-ui, sans-serif;
  --body: "General Sans", "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  background-image:
    radial-gradient(50% 30% at 85% 0%, rgba(230,72,46,0.12), transparent 70%),
    radial-gradient(40% 25% at 10% 5%, rgba(244,184,80,0.05), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
::selection { background: var(--red); color: #fff; }
a { color: inherit; }

/* ============ top bar ============ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(16,13,12,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 62px; }
.logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem;
  letter-spacing: -0.02em; flex-shrink: 0;
}
.logo em { font-style: normal; color: var(--red); }
.logo .mark {
  width: 32px; height: 32px;
  filter: drop-shadow(0 2px 8px rgba(230,72,46,0.4));
}
nav.mainnav { display: flex; gap: 2px; margin-right: auto; }
nav.mainnav a {
  color: var(--text-dim); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  padding: 7px 13px; border-radius: var(--r-sm); transition: background 0.15s, color 0.15s;
}
nav.mainnav a:hover { color: var(--text); background: var(--surface); }
nav.mainnav a.active { color: var(--red-2); background: rgba(230,72,46,0.08); }

.ip-chip {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--edge);
  color: var(--text); font-family: var(--mono); font-size: 0.84rem; font-weight: 500;
  padding: 8px 14px; border-radius: var(--r-sm); cursor: pointer; flex-shrink: 0;
  transition: border-color 0.15s;
}
.ip-chip:hover { border-color: var(--edge-hi); }
.ip-chip:active { transform: scale(0.97); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-mut); flex-shrink: 0; }
.status-dot.online { background: var(--leaf); box-shadow: 0 0 8px var(--leaf); animation: pulse 2.4s infinite; }
.status-dot.offline { background: var(--red); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.45} }

/* ============ status banner ============ */
.status-banner {
  margin-top: 22px;
  background: linear-gradient(120deg, var(--surface-2), var(--surface));
  border: 1px solid var(--edge); border-radius: var(--r);
  padding: 20px 24px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.status-banner::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: linear-gradient(var(--red-2), var(--red-dk));
}
.sb-block { display: flex; flex-direction: column; gap: 2px; }
.sb-label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-mut);
}
.sb-value {
  font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 9px;
}
.sb-value.count { color: var(--red-2); }
.sb-value.state-online { color: var(--leaf); }
.sb-value.state-offline { color: var(--text-mut); }
.sb-divider { width: 1px; align-self: stretch; background: var(--edge); }
.sb-spacer { flex: 1; }
.sb-cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 0.92rem;
  padding: 11px 20px; border-radius: var(--r-sm);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.1s, filter 0.2s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--red-2), var(--red)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #e0a234); color: #2a1a08; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--edge); }
.btn-ghost:hover { border-color: var(--edge-hi); background: var(--surface-2); }
.btn-sm { padding: 8px 15px; font-size: 0.86rem; }

/* ============ hub grid ============ */
.hub {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}
.hub-main, .hub-side { display: flex; flex-direction: column; gap: 20px; }

/* ============ panel ============ */
.panel {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--edge);
}
.panel-head h2, .panel-head h3 {
  font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 9px;
}
.panel-head .tick { width: 4px; height: 16px; background: var(--red); border-radius: 2px; }
.panel-head .head-link {
  font-family: var(--mono); font-size: 0.76rem; color: var(--text-mut);
  text-decoration: none; transition: color 0.15s;
}
.panel-head .head-link:hover { color: var(--red-2); }
.panel-body { padding: 18px; }

/* welcome panel */
.welcome h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.05;
  letter-spacing: -0.025em; margin-bottom: 12px;
}
.welcome h1 .accent { color: var(--red-2); }
.welcome p { color: var(--text-dim); font-size: 1.02rem; max-width: 60ch; }
.welcome .about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.about-tag {
  font-family: var(--mono); font-size: 0.75rem; padding: 5px 11px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--edge); color: var(--text-dim);
}

/* gamemode row */
.gm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gm-card {
  --glow: var(--red);
  position: relative; border: 1px solid var(--edge); border-radius: var(--r-sm);
  padding: 20px; background: var(--surface-2); overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.gm-card.sky { --glow: var(--gold); }
.gm-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--glow);
}
.gm-card:hover { transform: translateY(-3px); border-color: var(--edge-hi); }
.gm-card .gm-tag {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--glow); margin-bottom: 8px;
}
.gm-card h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin-bottom: 8px; }
.gm-card p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; }
.gm-card .tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-card .tag {
  font-family: var(--mono); font-size: 0.7rem; padding: 4px 9px; border-radius: 100px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--edge); color: var(--text-mut);
}

/* news feed */
.news-item { padding: 15px 0; border-bottom: 1px solid var(--edge); }
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-date {
  font-family: var(--mono); font-size: 0.72rem; color: var(--red-2);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 5px;
}
.news-item h4 { font-family: var(--display); font-weight: 700; font-size: 1.08rem; margin-bottom: 5px; }
.news-item p { color: var(--text-dim); font-size: 0.92rem; }

/* leaderboard */
.voter-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--edge);
}
.voter-row:last-child { border-bottom: none; }
.voter-rank {
  font-family: var(--display); font-weight: 700; font-size: 0.95rem;
  width: 26px; height: 26px; border-radius: var(--r-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--edge); color: var(--text-mut);
}
.voter-row:nth-child(1) .voter-rank { background: rgba(244,184,80,0.16); border-color: var(--gold); color: var(--gold); }
.voter-row:nth-child(2) .voter-rank { background: rgba(200,200,210,0.1); border-color: #9aa; color: #ccd; }
.voter-row:nth-child(3) .voter-rank { background: rgba(205,127,50,0.14); border-color: #c87; color: #e9a; }
.voter-name { font-weight: 600; font-size: 0.94rem; flex: 1; }
.voter-count { font-family: var(--mono); font-size: 0.86rem; color: var(--text-dim); }

/* discord widget */
.discord-widget { padding: 0; }
.discord-widget iframe { display: block; width: 100%; border: none; border-radius: 0 0 var(--r) var(--r); }
.discord-fallback {
  padding: 20px; text-align: center;
}
.discord-fallback p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; }

/* quick links list */
.qlinks { display: flex; flex-direction: column; }
.qlink {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0; border-bottom: 1px solid var(--edge);
  text-decoration: none; color: var(--text); font-weight: 500;
  transition: color 0.15s, padding-left 0.15s;
}
.qlink:last-child { border-bottom: none; }
.qlink:hover { color: var(--red-2); padding-left: 5px; }
.qlink .ql-arrow { font-family: var(--mono); color: var(--text-mut); transition: color 0.15s; }
.qlink:hover .ql-arrow { color: var(--red-2); }

/* how to join strip */
.join-strip {
  margin-top: 20px;
  background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r);
  padding: 16px 22px; font-size: 0.95rem; color: var(--text-dim);
}
.join-strip strong { color: var(--red-2); }

/* ============ subpage hero ============ */
.subhead { padding: 34px 0 6px; }
.subhead h1 {
  font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em; margin-bottom: 8px;
}
.subhead h1 .accent { color: var(--red-2); }
.subhead p { color: var(--text-dim); max-width: 60ch; }
.subhead .copy-feedback { margin-top: 10px; }

/* vote grid */
.vote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }
.vote-card {
  position: relative; background: var(--surface); border: 1px solid var(--edge);
  border-radius: var(--r); padding: 22px; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; gap: 7px; overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.vote-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(var(--red-2), var(--red-dk));
  transform: scaleY(0); transform-origin: top; transition: transform 0.25s;
}
.vote-card:hover { transform: translateY(-3px); border-color: var(--edge-hi); }
.vote-card:hover::before { transform: scaleY(1); }
.vote-card .vote-num {
  position: absolute; top: 18px; right: 22px; font-family: var(--display);
  font-weight: 700; font-size: 1.5rem; color: rgba(230,72,46,0.2);
}
.vote-card h3 { font-family: var(--display); font-weight: 700; font-size: 1.08rem; }
.vote-card p { color: var(--text-dim); font-size: 0.88rem; flex: 1; }
.vote-card small { color: var(--red-2); font-family: var(--mono); font-size: 0.78rem; }

/* rules */
.rules-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.rule-item {
  background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r);
  padding: 18px 22px; display: flex; gap: 16px; align-items: flex-start;
  transition: border-color 0.2s, transform 0.2s;
}
.rule-item:hover { border-color: var(--edge-hi); transform: translateX(3px); }
.rule-item .rule-num {
  font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--red-2);
  background: rgba(230,72,46,0.12); border: 1px solid var(--edge);
  border-radius: var(--r-sm); min-width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rule-item strong { display: block; margin-bottom: 3px; font-weight: 700; font-size: 1.02rem; }
.rule-item span { color: var(--text-dim); font-size: 0.92rem; }

.note {
  margin-top: 24px; background: var(--surface); border: 1px solid var(--edge);
  border-left: 3px solid var(--red); border-radius: var(--r);
  padding: 18px 22px; font-size: 0.94rem; color: var(--text-dim);
}
.note strong { color: var(--red-2); }
.note a { color: var(--red-2); }

/* ============ footer ============ */
footer { border-top: 1px solid var(--edge); padding: 32px 0; margin-top: 44px; }
.footer-grid { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; color: var(--text-mut); font-size: 0.86rem; }
.footer-grid strong { color: var(--text); font-family: var(--display); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--red-2); }

/* ============ a11y + motion ============ */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--red-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { transition:none!important; animation:none!important; } html{scroll-behavior:auto;} }

/* ============ responsive ============ */
@media (max-width: 940px) {
  .hub { grid-template-columns: 1fr; }
  .hub-side { order: 2; }
}
@media (max-width: 640px) {
  nav.mainnav { display: none; }
  .gm-row { grid-template-columns: 1fr; }
  .status-banner { gap: 18px; }
  .sb-divider { display: none; }
  .logo span.full { display: none; }
}
