/* ============================================================================
   LifeCore SMP — site chrome and page components
   ============================================================================ */

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  padding: 12px 18px; background: var(--grass-deep); color: #fff;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 800;
  background: rgba(10, 13, 18, 0.82);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 2px solid var(--stone);
  transition: border-color 0.3s, background 0.3s;
}
.topbar.is-scrolled { border-bottom-color: var(--grass-deep); }

.topbar__inner {
  display: flex; align-items: center; gap: var(--gap-md);
  min-height: 68px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__cube {
  width: 26px; height: 26px;
  background:
    linear-gradient(160deg, var(--grass-lit) 0 42%, var(--grass) 42% 72%, var(--grass-deep) 72%);
  border: 2px solid var(--void);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.28);
  transition: transform 0.5s var(--ease);
}
.brand:hover .brand__cube { transform: rotate(-90deg) scale(1.08); }
.brand__text {
  font-family: var(--font-pixel); font-size: 0.94rem;
  letter-spacing: 0.06em; white-space: nowrap;
}

.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav__item {
  padding: 9px 13px; font-size: 0.86rem; font-weight: 600;
  color: var(--text-soft); border-bottom: 2px solid transparent;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
  white-space: nowrap;
}
.nav__item:hover { color: var(--text); background: var(--stone); }
.nav__item.is-active { color: var(--grass); border-bottom-color: var(--grass); }

.topbar__actions { display: flex; align-items: center; gap: 10px; }

.topbar__search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; color: var(--text-dim);
  border: 2px solid var(--stone); background: var(--bedrock);
  font-size: 0.84rem; transition: border-color 0.16s, color 0.16s;
}
.topbar__search:hover { border-color: var(--grass-deep); color: var(--text); }
kbd {
  font-family: var(--font-mono); font-size: 0.7rem;
  padding: 1px 6px; border: 1px solid var(--iron);
  background: var(--stone); color: var(--text-dim);
}

.nav__toggle { display: none; width: 40px; height: 40px; padding: 8px; }
.nav__toggle span {
  display: block; height: 2px; background: var(--text); margin: 5px 0;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
.nav__toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; min-height: min(88vh, 780px);
  display: grid; align-items: center;
  overflow: hidden;
  border-bottom: 2px solid var(--stone);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__glow {
  position: absolute; inset: 0; pointer-events: none;
  /* Reads as depth over live terrain: a little sky darkening at the top, a
     stronger fade into the page colour at the bottom so the hero and the first
     section join instead of butting against each other. */
  background:
    radial-gradient(70% 55% at 50% 108%, rgba(108,194,74,0.22), transparent 62%),
    linear-gradient(180deg,
      rgba(6, 9, 14, 0.62) 0%,
      rgba(6, 9, 14, 0.18) 28%,
      rgba(8, 11, 16, 0.55) 68%,
      rgba(8, 11, 16, 0.97) 100%);
}
.hero__inner { position: relative; z-index: 2; padding-block: var(--gap-2xl); }

.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; margin-bottom: var(--gap-md);
  border: 2px solid var(--grass-deep); background: rgba(62,142,40,0.14);
  font-family: var(--font-pixel); font-size: 0.62rem; letter-spacing: 0.16em;
}
.hero__badge .dot {
  width: 8px; height: 8px; background: var(--grass);
  box-shadow: 0 0 10px var(--grass); animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.hero__title { max-width: 16ch; }
.hero__title em { font-style: normal; color: var(--grass); }
.hero__lead { max-width: 54ch; font-size: 1.1rem; margin-block: var(--gap-md) var(--gap-lg); }
.hero__cta { display: flex; gap: var(--gap-sm); flex-wrap: wrap; }

/* The IP block, styled as a copyable server entry. */
.ipbar {
  display: inline-flex; align-items: stretch; margin-top: var(--gap-lg);
  border: 2px solid var(--iron); background: var(--bedrock);
}
.ipbar__label {
  padding: 12px 14px; font-family: var(--font-pixel); font-size: 0.6rem;
  letter-spacing: 0.14em; color: var(--text-dim);
  border-right: 2px solid var(--iron); display: grid; place-items: center;
}
.ipbar__value {
  padding: 12px 18px; font-family: var(--font-mono); font-size: 1.02rem;
  color: var(--grass-lit); letter-spacing: 0.02em;
}
.ipbar__copy { padding: 12px 16px; border-left: 2px solid var(--iron); }
.ipbar__copy:hover { background: var(--grass-deep); color: #fff; }

/* ---------------------------------------------------------------- cards */
.card {
  padding: var(--gap-md);
  background: var(--stone); border: 2px solid var(--iron);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.06), inset -2px -2px 0 rgba(0,0,0,0.42);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px); border-color: var(--grass-deep);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.06),
              inset -2px -2px 0 rgba(0,0,0,0.42),
              0 18px 36px -22px var(--grass);
}
.card__icon { font-size: 1.7rem; margin-bottom: var(--gap-sm); display: block; }
.card__title { font-size: 1.05rem; margin-bottom: 6px; }
.card__body { font-size: 0.92rem; color: var(--text-soft); margin: 0; }

/* stat tiles */
.stats { display: grid; gap: 2px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 2px solid var(--iron); background: var(--iron); }
.stat { background: var(--stone); padding: var(--gap-md); text-align: center; }
.stat__value {
  font-family: var(--font-pixel); font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: var(--grass-lit); display: block; margin-bottom: 4px;
}
.stat__label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }

/* ---------------------------------------------------------------- tables */
.mc-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.mc-table th, .mc-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--stone-lit); }
.mc-table th {
  font-family: var(--font-pixel); font-size: 0.62rem; letter-spacing: 0.14em;
  color: var(--text-dim); text-transform: uppercase; background: var(--deepslate);
}
.mc-table tr:hover td { background: var(--stone-lit); }
.table-wrap { overflow-x: auto; border: 2px solid var(--iron); }

/* ---------------------------------------------------------------- hotbar */
.hotbar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 700; display: flex; gap: 2px; padding: 4px;
  background: rgba(10,13,18,0.86); border: 2px solid var(--iron);
  backdrop-filter: blur(10px);
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
.hotbar.is-hidden { transform: translateX(-50%) translateY(150%); opacity: 0; }
.hotbar__slot {
  width: 58px; height: 58px; display: grid; place-items: center; gap: 2px;
  background: #0f1319; border: 2px solid #0a0d12;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.5), inset -2px -2px 0 rgba(255,255,255,0.05);
  transition: background 0.16s, transform 0.16s var(--ease);
}
.hotbar__slot span { font-size: 1.18rem; line-height: 1; }
.hotbar__slot em {
  font-family: var(--font-pixel); font-style: normal;
  font-size: 0.44rem; letter-spacing: 0.06em; color: var(--text-dim);
}
.hotbar__slot:hover { background: var(--stone-lit); transform: translateY(-4px); }
.hotbar__slot:hover em { color: var(--grass); }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 2px solid var(--stone); background: var(--void); padding-block: var(--gap-xl) var(--gap-md); margin-bottom: 92px; }
.footer__inner { display: grid; gap: var(--gap-lg); grid-template-columns: 1.4fr 1fr auto; align-items: start; }
.brand--footer { margin-bottom: var(--gap-sm); }
.footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 22px; }
.footer__links a { font-size: 0.88rem; color: var(--text-soft); padding: 3px 0; }
.footer__links a:hover { color: var(--grass); }
.footer__social { display: flex; gap: 8px; }
.footer__social a {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 2px solid var(--iron); background: var(--stone); font-size: 1rem;
  transition: border-color 0.16s, transform 0.16s;
}
.footer__social a:hover { border-color: var(--grass); transform: translateY(-3px); }
.footer__legal {
  display: flex; justify-content: space-between; gap: var(--gap-md);
  flex-wrap: wrap; margin-top: var(--gap-lg);
  padding-top: var(--gap-md); border-top: 1px solid var(--stone);
  font-size: 0.78rem;
}

/* ---------------------------------------------------------------- search */
.search {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(5,7,10,0.82); backdrop-filter: blur(6px);
  display: grid; place-items: start center; padding-top: 12vh;
}
.search[hidden] { display: none; }
.search__panel { width: min(680px, 92vw); padding: 0; }
.search__panel input {
  width: 100%; padding: 20px 22px; font-size: 1.05rem;
  background: transparent; border: none; border-bottom: 2px solid var(--stone-lit);
  color: var(--text); font-family: var(--font-ui);
}
.search__panel input:focus { outline: none; border-bottom-color: var(--grass); }
.search__results { max-height: 52vh; overflow-y: auto; }
.search__item {
  display: flex; align-items: baseline; gap: 12px;
  padding: 12px 22px; cursor: pointer; border-left: 3px solid transparent;
}
.search__item.is-active, .search__item:hover {
  background: var(--stone-lit); border-left-color: var(--grass);
}
.search__item strong { font-size: 0.94rem; }
.search__item span { font-size: 0.8rem; color: var(--text-dim); }
.search__item em {
  margin-left: auto; font-style: normal; font-family: var(--font-pixel);
  font-size: 0.54rem; letter-spacing: 0.12em; color: var(--grass);
}
.search__hint { padding: 12px 22px; font-size: 0.74rem; border-top: 1px solid var(--stone-lit); }
.search__empty { padding: 26px 22px; color: var(--text-dim); }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 16px);
  z-index: 1000; padding: 12px 20px;
  background: var(--grass-deep); color: #fff; font-weight: 600; font-size: 0.9rem;
  border: 2px solid var(--void);
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- responsive
   Mobile is a different layout, not a squeezed desktop: the nav becomes a
   full-height sheet, the footer stacks, and the hotbar keeps its place as the
   primary way to move around - which is closer to how the game itself works on
   a small screen. */
@media (max-width: 1080px) {
  .nav__item { padding: 9px 10px; font-size: 0.8rem; }
  .topbar__search-label { display: none; }
}

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav {
    position: fixed; inset: 68px 0 0; margin: 0;
    flex-direction: column; gap: 0; align-content: start;
    background: var(--bedrock); padding: var(--gap-md);
    transform: translateX(100%); transition: transform 0.3s var(--ease);
    overflow-y: auto;
  }
  .nav.is-open { transform: none; }
  .nav__item {
    width: 100%; padding: 15px 12px; font-size: 1rem;
    border-bottom: 1px solid var(--stone);
  }
  .nav__item.is-active { background: var(--stone); }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__links { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: auto; }
  .hero__inner { padding-block: var(--gap-xl); }
}

@media (max-width: 560px) {
  :root { --slot-size: 52px; --gap-2xl: 64px; --gap-xl: 44px; }
  .hotbar__slot { width: 50px; height: 50px; }
  .hotbar__slot span { font-size: 1rem; }
  .ipbar { width: 100%; }
  .ipbar__value { font-size: 0.86rem; padding-inline: 12px; }
  .hero__cta .mc-btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------------------------------------------------------------- loot list
   A four-column table cannot fit inside a card column - the odds column was
   being clipped, which is the one number a player actually opens this for. A
   row layout fits any width, and the bar gives the rarity at a glance without
   needing to read the percentage at all. */
.loot { list-style: none; margin: 10px 0 0; padding: 0; max-height: 340px; overflow-y: auto; }
.loot__row {
  position: relative;
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: 42px 1fr auto 56px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--stone-lit);
  font-size: 0.86rem;
}
.loot__row:hover { background: var(--stone-lit); }
.loot__amt { font-family: var(--font-mono); color: var(--text-dim); font-size: 0.8rem; }
.loot__name { font-weight: 600; }
.loot__rarity { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.04em; }
.loot__odds {
  font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--grass-lit); text-align: right;
}
/* Rarity tints the row edge rather than the text, so the name stays readable. */
.loot__row[data-rarity='mythic']    { border-left: 3px solid var(--amethyst); }
.loot__row[data-rarity='legendary'] { border-left: 3px solid var(--gold); }
.loot__row[data-rarity='epic']      { border-left: 3px solid #c060ff; }
.loot__row[data-rarity='rare']      { border-left: 3px solid #4a9eff; }
.loot__row[data-rarity='uncommon']  { border-left: 3px solid var(--grass); }
.loot__row[data-rarity='common']    { border-left: 3px solid var(--iron); }
.loot__bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: var(--w);
  background: var(--grass-deep); opacity: 0.55;
}

/* ---------------------------------------------------------------- updates */
/* Patch notes as a timeline: the date column is fixed width so the entries
   line up into a spine, which is what makes a changelog scannable. */
.notes { display: grid; gap: var(--gap-md); }

.note {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: var(--gap-md);
  padding: var(--gap-md);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--grass);
  border-radius: 6px;
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.note:hover { transform: translateX(3px); border-left-color: var(--gold, #ffb930); }

.note__meta { display: flex; flex-direction: column; gap: 6px; }
.note__when {
  font-family: var(--font-mono); font-size: .82rem; color: var(--text-soft);
}
.note__tag {
  align-self: start;
  font-family: var(--font-pixel); font-size: .58rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--grass);
  border: 1px solid rgba(108,194,74,.35);
  padding: 3px 7px; border-radius: 3px;
}
.note__body h3 { margin: 0 0 6px; font-size: 1.05rem; }
.note__body p { margin: 0 0 8px; color: var(--text-soft); }
.note__src { font-size: .74rem; color: var(--text-dim); }
.note__src code {
  font-family: var(--font-mono); font-size: .72rem;
  background: rgba(255,255,255,.05); padding: 1px 5px; border-radius: 3px;
}

/* Monthly calendar */
.cal { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cal li {
  display: flex; align-items: center; gap: var(--gap-md);
  padding: 10px var(--gap-md);
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
}
.cal__day {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  background: rgba(108,194,74,.12); border: 1px solid rgba(108,194,74,.3);
  border-radius: 5px;
  font-family: var(--font-pixel); font-size: .8rem; color: var(--grass);
}

@media (max-width: 640px) {
  .note { grid-template-columns: 1fr; gap: 8px; }
  .note__meta { flex-direction: row; align-items: center; gap: 10px; }
}

/* Item sprites are 16x16 art scaled up; they must stay hard-edged or they turn
   into mush at 32px and stop reading as Minecraft items. */
.item-icon {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: 78%; height: 78%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.55));
}

/* -------------------------------------------------------------- brand mark */
.brand__logo {
  display: block;
  width: auto; height: 28px;
  image-rendering: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5));
}
.brand--footer .brand__logo { height: 25px; }

/* ------------------------------------------------------------ social icons */
/* Each link carries its platform's colour in --brand and adopts it on hover, so
   the row reads as monochrome until you reach for one. */
.social {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  background: var(--panel);
}
.social svg { display: block; }
.social:hover {
  color: #fff;
  background: var(--brand, var(--grass));
  border-color: var(--brand, var(--grass));
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--brand, #6cc24a) 45%, transparent);
}
.footer__social { display: flex; gap: 10px; flex-wrap: wrap; }
