/* ==========================================================================
   HexKingdomMC — Design tokens
   Palette: deep night-blue base, electric blue → violet signature gradient
   Signature element: hexagon grid / hex-cut cards (from "Hex" identity)
   ========================================================================== */

:root {
  --bg-void:      #070b16;
  --bg-base:      #0b1120;
  --bg-panel:     #11192e;
  --bg-panel-2:   #16203a;
  --line:         #223054;
  --line-soft:    #1a2540;

  --text-hi:      #eef2ff;
  --text-mid:     #aab6d6;
  --text-low:     #6b7aa1;

  --blue:         #3b82f6;
  --blue-bright:  #5eb1ff;
  --violet:       #8b5cf6;
  --cyan:         #22d3ee;

  --grad-signature: linear-gradient(120deg, var(--blue) 0%, #6d6bf0 55%, var(--violet) 100%);
  --grad-soft: linear-gradient(180deg, rgba(59,130,246,0.14), rgba(139,92,246,0.05));

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-hi);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60vw 40vw at 85% -10%, rgba(139,92,246,0.16), transparent 60%),
    radial-gradient(50vw 35vw at -10% 20%, rgba(59,130,246,0.14), transparent 60%),
    var(--bg-void);
  pointer-events: none;
}

/* Hex grid watermark, used sparingly as the signature texture */
.hex-field {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='96' viewBox='0 0 84 96'%3E%3Cpath d='M42 0 L84 24 L84 72 L42 96 L0 72 L0 24 Z' fill='none' stroke='%23223054' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 84px 96px;
  mask-image: linear-gradient(180deg, black, transparent 70%);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-bright);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--grad-signature);
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 13, 26, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.brand .hexmark {
  width: 30px; height: 34px;
  background: var(--grad-signature);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.brand span.accent { color: var(--blue-bright); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-mid);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text-hi); background: var(--bg-panel-2); }
.nav-links a.is-active { color: var(--text-hi); background: var(--bg-panel); border: 1px solid var(--line); }
.nav-links a.cta {
  background: var(--grad-signature);
  color: #fff;
  font-weight: 600;
}
.nav-links a.cta:hover { filter: brightness(1.08); }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--bg-panel); border: 1px solid var(--line);
    color: var(--text-hi);
  }
  .nav-links.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg-base); border-bottom: 1px solid var(--line);
    padding: 10px 20px 20px;
    gap: 6px;
  }
  .nav-links.is-open a { padding: 12px 14px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  border-radius: 100px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
}
.btn-primary { background: var(--grad-signature); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--bg-panel); color: var(--text-hi); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 70px;
  overflow: hidden;
}
.hero-ip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-mid);
  cursor: pointer;
  transition: border-color .15s;
}
.hero-ip:hover { border-color: var(--blue); }
.hero-ip .dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }

.hero h1 {
  margin-top: 22px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  max-width: 780px;
}
.hero h1 .grad {
  background: var(--grad-signature);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
  margin-top: 22px;
  max-width: 560px;
  font-size: 17.5px;
  color: var(--text-mid);
}
.hero-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.hero-stats {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.stat {
  background: var(--bg-panel);
  padding: 20px 22px;
}
.stat .num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
}
.stat .num .unit { font-size: 15px; color: var(--text-low); font-weight: 500; margin-left: 2px;}
.stat .label { font-size: 13px; color: var(--text-low); margin-top: 4px; }
.stat .num.is-live::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399; margin-right: 7px; margin-bottom: 1px;
  box-shadow: 0 0 8px #34d399;
}

/* ---------- Section shell ---------- */
.section { padding: 84px 0; }
.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); margin-top: 14px; }
.section-head p { color: var(--text-mid); margin-top: 12px; font-size: 15.5px; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(20,30,55,0.35) 15%, rgba(20,30,55,0.35) 85%, transparent); }

/* ---------- Mode cards ---------- */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.mode-card { min-height: 380px; }
.mode-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  min-height: 300px;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .2s, border-color .2s;
}
.mode-card:hover { transform: translateY(-4px); border-color: var(--blue); }
.mode-card .shot {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: saturate(1.05);
}
.mode-card .shot::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,11,22,0.05) 30%, rgba(7,11,22,0.94) 100%);
}
.mode-card.no-shot { justify-content: center; align-items: center; text-align: center; background: var(--grad-soft); }
.mode-card.no-shot .hex-icon {
  width: 56px; height: 64px;
  background: var(--grad-signature);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  margin-bottom: 18px;
}
.mode-card-body { position: relative; padding: 22px 22px 24px; z-index: 1; }
.mode-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-bright);
  background: rgba(59,130,246,0.14);
  border: 1px solid rgba(59,130,246,0.3);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.mode-card h3 { font-size: 21px; }
.mode-card p { color: var(--text-mid); font-size: 14px; margin-top: 6px; }

/* ---------- Staff ---------- */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.staff-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  transition: transform .2s, border-color .2s;
}
.staff-card:hover { transform: translateY(-4px); border-color: var(--blue); }
.staff-card .desc {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.5;
}
.staff-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: var(--grad-signature);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 17px; color: #fff;
  object-fit: cover;
  border: 2px solid var(--line);
}
.staff-skin {
  height: 92px;
  width: auto;
  margin: 0 auto 12px;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 14px rgba(59,130,246,0.25));
}
.staff-card .name { font-weight: 600; font-size: 14.5px; }
.staff-card .role { font-size: 12.5px; color: var(--blue-bright); margin-top: 3px; }
.staff-card .online-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-low); margin-top: 8px;
}
.staff-card .online-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 56px 0 40px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.footer-col h4 { font-size: 13px; color: var(--text-low); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; color: var(--text-mid); font-size: 14.5px; margin-bottom: 9px; }
.footer-col a:hover { color: var(--blue-bright); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-low); }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: 64px 0 40px; }
.page-head h1 { font-size: clamp(32px, 5vw, 46px); margin-top: 14px; }
.page-head p { color: var(--text-mid); margin-top: 14px; max-width: 560px; font-size: 16px; }

/* ---------- Regolamento ---------- */
.reg-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.reg-nav { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; position: sticky; top: 92px; }
.reg-nav h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-low); padding: 6px 10px 14px; }
.reg-nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-mid);
  background: none; border: none;
  font-size: 14.5px; font-weight: 500;
  margin-bottom: 3px;
}
.reg-nav-item .n {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--bg-panel-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-low);
  flex-shrink: 0;
}
.reg-nav-item:hover { background: var(--bg-panel-2); color: var(--text-hi); }
.reg-nav-item.is-active { background: var(--grad-soft); color: var(--text-hi); }
.reg-nav-item.is-active .n { background: var(--grad-signature); color: #fff; }

.reg-panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 36px;
  min-height: 400px;
}
.reg-panel h2 { font-size: 26px; margin-bottom: 22px; }
.reg-panel .notice {
  background: var(--grad-soft);
  border: 1px solid rgba(59,130,246,0.35);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 14.5px;
  color: var(--text-mid);
  margin-bottom: 26px;
}
.reg-panel .notice b { color: var(--blue-bright); }
.reg-panel .notice strong.hl { color: var(--cyan); font-weight: 600; }
.reg-list { display: flex; flex-direction: column; gap: 14px; }
.reg-item {
  display: flex; gap: 14px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px; color: var(--text-mid);
}
.reg-item:last-child { border-bottom: none; }
.reg-item .idx { font-family: var(--font-mono); color: var(--blue-bright); flex-shrink: 0; }
.reg-item strong { color: var(--text-hi); }

@media (max-width: 860px) {
  .reg-layout { grid-template-columns: 1fr; }
  .reg-nav { position: static; }
}

/* ---------- Forum ---------- */
.forum-topbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 30px;
}
.forum-topbar .metric { display: flex; align-items: center; gap: 10px; }
.forum-topbar .metric .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--grad-signature); display:flex; align-items:center; justify-content:center; color:#fff; flex-shrink:0; }
.forum-topbar .metric .val { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.forum-topbar .metric .lbl { font-size: 12px; color: var(--text-low); }

.forum-layout { display: block; }
.forum-category { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 20px; overflow: hidden; }
.forum-category-head { padding: 18px 22px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 12px; }
.forum-category-head .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--bg-panel-2); display: flex; align-items: center; justify-content: center; color: var(--blue-bright); flex-shrink: 0; }
.forum-category-head h3 { font-size: 16.5px; }
.forum-category-head p { font-size: 13px; color: var(--text-low); margin-top: 2px; }
.forum-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
  transition: background .15s;
}
.forum-row:last-child { border-bottom: none; }
.forum-row:hover { background: var(--bg-panel-2); }
.forum-row .title { font-weight: 600; font-size: 14.5px; }
.forum-row .title .sub { display: block; font-weight: 400; font-size: 12.5px; color: var(--text-low); margin-top: 3px; }
.forum-row .meta { display: flex; gap: 26px; flex-shrink: 0; }
.forum-row .meta .m { text-align: center; }
.forum-row .meta .m .v { font-weight: 600; font-size: 14px; }
.forum-row .meta .m .k { font-size: 11px; color: var(--text-low); }
@media (max-width: 700px) { .forum-row .meta { display: none; } }



/* ---------- News ---------- */
.news-featured {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--grad-soft);
  padding: 40px;
  margin-bottom: 40px;
  overflow: hidden;
}
.news-featured .tag { color: var(--blue-bright); }
.news-featured h2 { font-size: 30px; margin-top: 14px; max-width: 640px; }
.news-featured p { color: var(--text-mid); margin-top: 12px; max-width: 560px; }
.countdown { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.countdown .box { background: var(--bg-base); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; min-width: 70px; text-align: center; }
.countdown .box .n { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.countdown .box .u { font-size: 10.5px; color: var(--text-low); text-transform: uppercase; letter-spacing: 0.06em; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.news-card { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.news-card .kind {
  display: inline-flex; align-self: flex-start;
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 100px;
}
.kind-update { color: var(--blue-bright); background: rgba(59,130,246,0.14); border: 1px solid rgba(59,130,246,0.3); }
.kind-event { color: var(--cyan); background: rgba(34,211,238,0.12); border: 1px solid rgba(34,211,238,0.3); }
.kind-news { color: #c4b5fd; background: rgba(139,92,246,0.14); border: 1px solid rgba(139,92,246,0.3); }
.news-card h3 { font-size: 18px; }
.news-card p { font-size: 14px; color: var(--text-mid); flex-grow: 1; }
.news-card .date { font-size: 12.5px; color: var(--text-low); font-family: var(--font-mono); }
.news-card .mini-countdown { display: flex; gap: 8px; margin-top: 4px; font-family: var(--font-mono); font-size: 12.5px; color: var(--blue-bright); }

/* ---------- CTA band ---------- */
.cta-band {
  border-radius: var(--radius-lg);
  background: var(--grad-signature);
  padding: 52px 44px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  color: #fff;
}
.cta-band h2 { font-size: 28px; }
.cta-band p { margin-top: 8px; opacity: 0.92; }
.cta-band .btn-ghost { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,0.22); }

@media (max-width: 700px) {
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 44px; }
}
