/* SMO MC - site styles. Colours are taken from the SMO logo. */
:root {
  --night: #0d1524;
  --night-deep: #090f1b;
  --stone: #16223a;
  --stone-high: #1e2d4a;
  --edge: #2b3d5e;
  --gold: #ebbd4d;
  --gold-deep: #c9812e;
  --teal: #35c6c3;
  --mint: #6bd8c3;
  --sky: #4a9fe1;
  --frost: #e8f1f4;
  --muted: #9fb0c4;
  --red: #ef6a5b;
  --green: #46d073;
  --lime: #a3e635;

  --font-display: "Pixelify Sans", "Rubik", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --step-5: clamp(2.6rem, 6vw, 4.2rem);

  --page: min(1180px, 100% - 2rem);
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--frost);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--mint); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { width: var(--page); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--gold); color: var(--night-deep); padding: .6rem 1rem; border-radius: var(--radius-s);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 15, 27, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--edge);
}
.nav { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--frost); text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; image-rendering: pixelated; }
.brand span { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: .5rem .85rem; border-radius: var(--radius-s);
  color: var(--muted); text-decoration: none; font-weight: 500;
}
.nav-links a:hover { color: var(--frost); background: var(--stone); }
.nav-links a[aria-current="page"] { color: var(--gold); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--edge); color: var(--frost);
  width: 44px; height: 44px; border-radius: var(--radius-s); cursor: pointer;
}
.nav-toggle svg { margin: auto; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 46px; padding: .65rem 1.3rem; border-radius: var(--radius-s);
  font: 600 var(--step-0)/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: #1c1405; box-shadow: inset 0 -4px 0 var(--gold-deep); }
.btn-gold:hover { background: #f3cd68; color: #1c1405; }
.btn-ghost { border-color: var(--edge); color: var(--frost); background: transparent; }
.btn-ghost:hover { border-color: var(--teal); color: var(--frost); }
.btn-discord { background: #5865f2; color: #fff; box-shadow: inset 0 -4px 0 #3c45b5; }
.btn-discord:hover { background: #6b77f5; color: #fff; }
.btn svg { flex: none; }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(60% 70% at 78% 40%, rgba(53, 198, 195, 0.16), transparent 70%),
    radial-gradient(40% 50% at 82% 70%, rgba(235, 189, 77, 0.10), transparent 70%),
    var(--night);
  overflow: hidden;
}
.hero::after { /* pixel ground line - echoes the shield base in the logo */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: repeating-linear-gradient(90deg, var(--stone-high) 0 16px, var(--stone) 16px 32px);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 3rem; }
.hero h1 { font-size: var(--step-5); max-width: 13ch; }
.hero .lead { margin-top: 1.25rem; font-size: var(--step-1); color: var(--muted); max-width: 46ch; line-height: 1.5; }
.hero-logo { justify-self: center; position: relative; width: min(100%, 420px); }
.hero-logo img { width: 100%; height: auto; image-rendering: pixelated; filter: drop-shadow(0 24px 40px rgba(0,0,0,.55)); }

/* The memorable element: the IP as a Minecraft-style item tooltip */
.ip-card {
  margin-top: 2.25rem; display: inline-flex; flex-direction: column; gap: .35rem;
  max-width: 100%;
  padding: 1rem 1.35rem 1.1rem; text-align: left; cursor: pointer;
  background: #100a1c; color: var(--frost);
  border: 3px solid #100a1c; border-radius: 4px;
  box-shadow: inset 0 0 0 3px #3a1d78, 0 14px 30px rgba(0,0,0,.4);
  font: inherit; transition: box-shadow .15s ease, transform .12s ease;
}
.ip-card:hover { box-shadow: inset 0 0 0 3px var(--gold), 0 14px 30px rgba(0,0,0,.4); }
.ip-card:active { transform: translateY(1px); }
.ip-card .ip { font-family: var(--font-body); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: clamp(1.6rem, 4.5vw, 2.4rem); /* pixel font draws 5 like S */ color: var(--gold); line-height: 1.1; overflow-wrap: anywhere; }
.ip-card .ip-hint { color: #a99ed1; font-size: var(--step--1); }
.ip-card.copied .ip-hint { color: var(--green); }
.hero-meta { margin-top: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: .55rem; }
.status-dot { width: 10px; height: 10px; border-radius: 2px; background: var(--muted); }
.status[data-state="online"] .status-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(70, 208, 115, .18); }
.status[data-state="offline"] .status-dot { background: var(--red); }
.status strong { color: var(--frost); font-weight: 600; }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }

/* single page-load moment */
@media (prefers-reduced-motion: no-preference) {
  .hero-logo img { animation: drop-in .9s cubic-bezier(.2, .9, .25, 1.15) both; }
  .ip-card { animation: rise .6s .35s ease-out both; }
  @keyframes drop-in { from { opacity: 0; transform: translateY(-40px) scale(.92); } to { opacity: 1; transform: none; } }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ------------------------------------------------------------------ sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--night-deep); }
.section-head { max-width: 62ch; margin-bottom: 2.25rem; }
.section-head h2 { font-size: var(--step-4); }
.section-head p { margin-top: .75rem; color: var(--muted); font-size: var(--step-1); line-height: 1.5; }

/* how to join - a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative;
  padding: 1.4rem 1.4rem 1.5rem 4.4rem; background: var(--stone); border-radius: var(--radius-m);
  border: 1px solid var(--edge);
}
.steps li::before {
  content: counter(step); position: absolute; left: 1.2rem; top: 1.25rem;
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center;
  font-family: var(--font-display); font-size: var(--step-1); color: #1c1405; background: var(--gold); border-radius: 4px;
}
.steps h3 { font-size: var(--step-1); }
.steps p { margin-top: .35rem; color: var(--muted); }
.steps code { font-family: var(--font-body); font-weight: 600; color: var(--gold); }

/* featured games */
.featured { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 3rem; }
.feature {
  position: relative; overflow: hidden; min-height: 240px;
  padding: 2rem; border-radius: var(--radius-l); display: flex; flex-direction: column; justify-content: flex-end; gap: .6rem;
  border: 1px solid var(--edge);
}
.feature h3 { font-size: var(--step-3); }
.feature p { color: #d6e2ea; max-width: 40ch; }
.feature .players { font-size: var(--step--1); color: var(--muted); }
.feature-bedwars { background: linear-gradient(160deg, #3a1622 0%, #1a1322 55%, var(--stone) 100%); }
.feature-mafia { background: linear-gradient(160deg, #10302f 0%, #12202b 55%, var(--stone) 100%); }
.feature-art { position: absolute; right: 1.5rem; top: 1.5rem; width: 92px; height: 92px; opacity: .95; }

/* game list with category filter */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip {
  min-height: 40px; padding: .45rem 1rem; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--edge); color: var(--muted); font: 500 var(--step--1)/1 var(--font-body);
}
.chip:hover { color: var(--frost); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #062322; }
.chip .count { opacity: .7; margin-left: .3rem; }
.games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.game {
  display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; align-items: start;
  padding: 1rem 1.1rem; background: var(--stone); border-radius: var(--radius-m); border-left: 4px solid var(--cat, var(--teal));
}
.game[hidden] { display: none; }
.game .glyph {
  grid-row: span 2; width: 40px; height: 40px; border-radius: 6px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--cat, var(--teal)) 18%, transparent); color: var(--cat, var(--teal));
  font-family: var(--font-display); font-size: 1.15rem;
}
.game h3 { font-family: var(--font-body); font-size: var(--step-0); font-weight: 600; line-height: 1.3; }
.game p { font-size: var(--step--1); color: var(--muted); line-height: 1.45; }
.game .size { grid-column: 2; font-size: .78rem; color: var(--cat, var(--teal)); margin-top: .25rem; }
.cat-combat { --cat: var(--red); }
.cat-deduce { --cat: #b48cf0; }
.cat-party { --cat: var(--gold); }
.cat-skill { --cat: var(--teal); }

/* Discord band */
.discord-band { background: linear-gradient(120deg, #2a2f7a 0%, #1b2150 60%, var(--night-deep) 100%); border-block: 1px solid #3a42a0; }
.discord-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 2.5rem; align-items: center; }
.discord-band h2 { font-size: var(--step-4); }
.discord-band p { margin-top: .9rem; color: #cfd5ff; font-size: var(--step-1); max-width: 48ch; line-height: 1.5; }
.discord-band .btn { margin-top: 1.75rem; }
.discord-card {
  background: rgba(9, 12, 32, .55); border: 1px solid #3a42a0; border-radius: var(--radius-l); padding: 1.5rem;
  display: grid; gap: .9rem;
}
.discord-card .server { display: flex; align-items: center; gap: .9rem; }
.discord-card .server img { width: 56px; height: 56px; border-radius: 14px; background: var(--stone); image-rendering: pixelated; }
.discord-card .server strong { display: block; font-size: var(--step-1); }
.discord-counts { display: flex; gap: 1.25rem; color: #cfd5ff; font-size: var(--step--1); }
.discord-counts span { display: inline-flex; align-items: center; gap: .4rem; }
.discord-counts i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ------------------------------------------------------------------ team page */
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0 2.5rem; background: radial-gradient(50% 80% at 85% 0%, rgba(235, 189, 77, .12), transparent 70%), var(--night); }
.page-hero h1 { font-size: var(--step-5); }
.page-hero p { margin-top: 1rem; color: var(--muted); font-size: var(--step-1); max-width: 52ch; line-height: 1.5; }
.team-group { padding: 2.5rem 0; border-top: 1px solid var(--edge); }
.team-group:first-child { border-top: 0; }
.team-group header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; margin-bottom: 1.5rem; }
.team-group h2 { font-size: var(--step-3); color: var(--role); }
.team-group header p { color: var(--muted); flex: 1 1 320px; }
.members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.member {
  background: var(--stone); border-radius: var(--radius-m); padding: 1.4rem 1rem 1.2rem; text-align: center;
  border-top: 3px solid var(--role);
}
.member img { width: 96px; height: 96px; margin: 0 auto .9rem; image-rendering: pixelated; }
.member strong { display: block; font-size: var(--step-1); font-weight: 600; overflow-wrap: anywhere; } /* body font: pixel 5 reads as S in usernames */
.open-roles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.open-role { padding: 1.2rem 1.3rem; border: 2px dashed var(--edge); border-left: 4px solid var(--role); border-radius: var(--radius-m); }
.open-role h3 { font-size: var(--step-1); color: var(--role); }
.open-role p { margin-top: .35rem; color: var(--muted); font-size: var(--step--1); }
.member span { display: block; margin-top: .25rem; color: var(--muted); font-size: var(--step--1); }
.member-open { background: transparent; border: 2px dashed var(--edge); border-top: 2px dashed var(--edge); display: grid; place-items: center; gap: .5rem; min-height: 200px; }
.member-open p { color: var(--muted); font-size: var(--step--1); max-width: 22ch; }
.role-gold { --role: var(--gold); }
.role-red { --role: var(--red); }
.role-teal { --role: var(--teal); }
.role-green { --role: var(--green); }
.role-sky { --role: var(--sky); }
.role-lime { --role: var(--lime); }

/* ------------------------------------------------------------------ 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.notfound h1 { font-size: var(--step-5); color: var(--gold); }
.notfound p { margin: 1rem auto 2rem; color: var(--muted); max-width: 40ch; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--night-deep); border-top: 1px solid var(--edge); padding: 2.5rem 0; color: var(--muted); font-size: var(--step--1); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--frost); }
.footer-note { width: 100%; font-size: .8rem; opacity: .75; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 200; transform: translate(-50%, 150%);
  background: var(--stone-high); color: var(--frost); border: 1px solid var(--edge); border-left: 4px solid var(--green);
  padding: .8rem 1.2rem; border-radius: var(--radius-s); box-shadow: 0 12px 30px rgba(0,0,0,.4);
  transition: transform .25s ease, visibility 0s linear .25s; max-width: calc(100% - 2rem);
  visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .25s ease, visibility 0s; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-logo { order: -1; width: min(70%, 300px); }
  .hero h1 { max-width: none; }
  .steps { grid-template-columns: 1fr; }
  .featured, .discord-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1rem 1rem;
    background: var(--night-deep); border-bottom: 1px solid var(--edge);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .85rem .75rem; }
  .nav .btn-nav { display: none; }
  .ip-card { width: 100%; }
  .feature { padding: 1.5rem; min-height: 220px; }
  .feature-art { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

#g-open { color: var(--frost); }
.member-open { display: none; }

