/* ==========================================================================
   ZemeMC — light-blue & white Minecraft network theme
   ========================================================================== */

:root {
  --sky: #55BFFF;
  --sky-2: #3aa9f0;
  --sky-3: #1f8fe0;
  --sky-4: #1569ad;
  --ice: #EAF7FF;
  --ice-2: #d6efff;
  --white: #FFFFFF;
  --navy: #0b2545;
  --navy-2: #2b4a6f;
  --muted: #4d6a89;
  --gold: #ffc83d;
  --gold-2: #e8a317;
  --ok: #1fb86a;
  --bad: #e5484d;
  --warn: #f0a020;

  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;

  --shadow-sm: 0 2px 10px rgba(31, 143, 224, .10);
  --shadow: 0 14px 40px rgba(31, 143, 224, .16);
  --shadow-lg: 0 24px 60px rgba(31, 143, 224, .24);
  --border: 1px solid rgba(85, 191, 255, .28);

  --font: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pixel: 'Silkscreen', 'Courier New', monospace;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --nav-h: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--navy);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
code { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 3px solid var(--sky-3); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- Icons ---------- */
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--ice); transition: background .2s, transform .2s; }
.icon-btn:hover { background: var(--ice-2); transform: rotate(90deg); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.3em; border-radius: 14px; border: 0;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em; line-height: 1.2; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .2s;
}
.btn::after { /* shine sweep */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .6s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(1px); }
.btn--sm { padding: .6em 1em; font-size: .88rem; border-radius: 12px; }
.btn--lg { padding: 1.05em 1.8em; font-size: 1.05rem; border-radius: 16px; letter-spacing: .04em; }

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--sky-2), var(--sky-3));
  box-shadow: 0 4px 0 var(--sky-4), 0 10px 24px rgba(31, 143, 224, .35);
}
.btn--primary:hover { box-shadow: 0 7px 0 var(--sky-4), 0 16px 32px rgba(31, 143, 224, .45); }
.btn--primary:active { box-shadow: 0 1px 0 var(--sky-4), 0 4px 10px rgba(31, 143, 224, .3); }

.btn--light {
  color: var(--navy); background: #fff;
  box-shadow: 0 4px 0 #bfe3f8, 0 10px 24px rgba(11, 37, 69, .10);
}
.btn--light:hover { box-shadow: 0 7px 0 #bfe3f8, 0 16px 30px rgba(11, 37, 69, .15); }
.btn--light:active { box-shadow: 0 1px 0 #bfe3f8; }
.discord-ic { color: #5865F2; }

.btn--pulse { animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 0 var(--sky-4), 0 10px 24px rgba(31, 143, 224, .35), 0 0 0 0 rgba(85, 191, 255, .55); }
  50% { box-shadow: 0 4px 0 var(--sky-4), 0 10px 24px rgba(31, 143, 224, .35), 0 0 0 14px rgba(85, 191, 255, 0); }
}
.btn.is-copied { background: linear-gradient(180deg, #2fd283, var(--ok)); box-shadow: 0 4px 0 #12874c; color: #fff; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.is-scrolled, .nav.is-open {
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgba(85, 191, 255, .3), 0 8px 30px rgba(31, 143, 224, .10);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__logo { width: 42px; height: 42px; filter: drop-shadow(0 4px 8px rgba(31, 143, 224, .35)); transition: transform .35s var(--ease); }
.brand:hover .brand__logo { transform: rotate(-8deg) scale(1.08); }
.brand__text { display: inline-flex; align-items: center; gap: 8px; font-family: var(--pixel); font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; color: var(--navy); }
.brand__tag { background: linear-gradient(180deg, var(--sky-2), var(--sky-3)); color: #fff; padding: 2px 8px 1px; border-radius: 8px; font-size: .95rem; box-shadow: 0 2px 0 var(--sky-4); }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px;
  font-size: .92rem; font-weight: 600; color: var(--navy-2); transition: background .2s, color .2s, transform .2s;
}
.nav__link:hover { background: var(--ice); color: var(--navy); transform: translateY(-1px); }
.nav__link.is-active { background: var(--ice); color: var(--sky-4); box-shadow: inset 0 -2px 0 var(--sky); }
.nav__discord { background: #fff; box-shadow: 0 0 0 1.5px rgba(88, 101, 242, .35); color: #4752c4; margin-left: 6px; }
.nav__discord:hover { background: #5865F2; color: #fff; }

.nav__toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 0; background: #fff; box-shadow: var(--shadow-sm); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav__toggle span { width: 20px; height: 2.5px; border-radius: 2px; background: var(--navy); transition: transform .3s var(--ease), opacity .2s; }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 20px;
    background: rgba(255, 255, 255, .97); box-shadow: 0 24px 40px rgba(11, 37, 69, .12);
    border-radius: 0 0 var(--r) var(--r);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav__link { padding: 13px 14px; font-size: 1rem; }
  .nav__discord { margin: 6px 0 0; justify-content: center; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(64px, 9vw, 112px) 0; }
.section--ice { background: linear-gradient(180deg, var(--ice) 0%, #f4fbff 100%); }
.section--first { padding-top: clamp(40px, 6vw, 72px); }
.section--tight { padding: clamp(32px, 5vw, 56px) 0 clamp(64px, 8vw, 96px); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto clamp(32px, 5vw, 56px); }
.eyebrow {
  display: inline-block; font-family: var(--pixel); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sky-4); background: var(--ice); border: var(--border); padding: 4px 12px 3px; border-radius: 999px; margin-bottom: 14px;
}
.section--ice .eyebrow { background: #fff; }
.h2 { font-size: clamp(1.75rem, 4.2vw, 2.75rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.lead { margin-top: 14px; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.1rem); }

.card {
  background: #fff; border: var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--nav-h) + 48px) 0 120px;
  display: flex; align-items: center;
  background: linear-gradient(180deg, #55BFFF 0%, #a6dcfc 55%, #EAF7FF 100%);
}
.hero__scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; image-rendering: pixelated; image-rendering: crisp-edges; }
.hero::after { /* fade into next section */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; z-index: -1;
  background: linear-gradient(180deg, rgba(234, 247, 255, 0), var(--ice));
}
.hero__clouds { position: absolute; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.cloud { position: absolute; left: -320px; opacity: .92; animation: drift linear infinite; }
.c1 { top: 13%; width: 220px; animation-duration: 110s; animation-delay: -30s; }
.c2 { top: 27%; width: 150px; animation-duration: 150s; animation-delay: -95s; opacity: .8; }
.c3 { top: 8%;  width: 120px; animation-duration: 190s; animation-delay: -150s; opacity: .7; }
.c4 { top: 36%; width: 260px; animation-duration: 130s; animation-delay: -10s; opacity: .85; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 700px)); } }

.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .9); box-shadow: var(--shadow-sm);
  font-size: .85rem; font-weight: 700; color: var(--navy); margin-bottom: 22px;
}
.hero__badge-dot { width: 9px; height: 9px; background: var(--sky-3); border-radius: 2px; box-shadow: 0 0 0 4px rgba(31, 143, 224, .2); }

.hero__title {
  font-family: var(--pixel); font-weight: 700; font-size: clamp(2.5rem, 10.5vw, 6.6rem); line-height: 1.02; letter-spacing: .02em; color: #fff;
  text-shadow:
    0 .035em 0 #d6efff, 0 .07em 0 #9fdbff, 0 .105em 0 #55BFFF, 0 .14em 0 #3aa9f0, 0 .175em 0 #1f8fe0, 0 .21em 0 #1569ad,
    0 .3em .22em rgba(11, 37, 69, .35);
  animation: floaty 6s ease-in-out infinite;
}
.hero__title span:last-child { color: #fff7cf; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.hero__sub { margin-top: clamp(22px, 3.5vw, 36px); font-size: clamp(1.1rem, 2.6vw, 1.6rem); font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.hero__desc { margin-top: 10px; max-width: 620px; font-weight: 500; font-size: clamp(.98rem, 1.6vw, 1.1rem); color: var(--navy); }

.ipcard {
  margin-top: 30px; width: min(100%, 560px); padding: 18px 18px 16px;
  background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid #fff; border-radius: var(--r-lg);
  box-shadow: 0 0 0 1px rgba(85, 191, 255, .35), 0 20px 50px rgba(31, 143, 224, .28), 0 0 60px rgba(255, 255, 255, .5);
}
.ipcard__label { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--pixel); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sky-4); }
.ipcard__row { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 8px 8px 16px; background: var(--ice); border: 1px dashed rgba(31, 143, 224, .45); border-radius: 16px; }
.ipcard__ip { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: clamp(1.05rem, 3.4vw, 1.5rem); color: var(--navy); overflow-wrap: anywhere; text-align: left; }
.ipcard__extra { margin-top: 10px; font-size: .85rem; color: var(--muted); }
.ipcard .pill { margin: 12px auto 0; }

.pill { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: #fff; border: var(--border); color: var(--navy); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); flex: none; box-shadow: 0 0 0 0 currentColor; }
[data-state="online"] .dot { background: var(--ok); animation: ping 2s infinite; color: rgba(31, 184, 106, .5); }
[data-state="offline"] .dot, [data-state="error"] .dot { background: var(--bad); }
[data-state="loading"] .dot { background: var(--sky-3); animation: ping 1.2s infinite; color: rgba(31, 143, 224, .5); }
[data-state="unconfigured"] .dot, [data-state="disabled"] .dot { background: #9db4c9; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 9px rgba(0, 0, 0, 0); } }

.hero__cta { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); color: var(--sky-4); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }

@media (max-width: 560px) {
  .hero { padding-bottom: 100px; }
  .hero__cta .btn { width: 100%; }
  .ipcard__row { padding: 8px; }
  .ipcard__ip { text-align: center; flex-basis: 100%; }
  .ipcard__row .btn { width: 100%; }
}

/* ---------- Status ---------- */
.status-card { background: #fff; border: var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(20px, 3.5vw, 36px); }
.status-card__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.status-card__head .h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.status-card__head .eyebrow { margin-bottom: 8px; }
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--ice); border-radius: 16px; min-width: 0; }
.tile__label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.tile__value { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.15rem; overflow-wrap: anywhere; }
.tile__value--mono { font-family: var(--mono); font-size: .95rem; font-weight: 700; }
.meter { height: 8px; border-radius: 4px; background: #fff; overflow: hidden; margin-top: 2px; }
.meter span { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--sky), var(--sky-3)); transition: width .8s var(--ease); }
.status-card__motd { margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: #fff; border: 1px dashed rgba(31, 143, 224, .4); font-family: var(--mono); font-size: .9rem; color: var(--navy-2); }
.status-card__players { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--ice); font-size: .85rem; font-weight: 600; }
.chip img { width: 24px; height: 24px; border-radius: 6px; image-rendering: pixelated; }
.status-card__note { margin-top: 14px; font-size: .88rem; color: var(--muted); }
.status-card__note:empty { display: none; }
[data-status-refresh].is-spinning .icon { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .status-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .status-grid { grid-template-columns: 1fr; } }

/* ---------- Features ---------- */
.grid-features { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.feature { padding: 26px 22px; position: relative; overflow: hidden; }
.feature::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--sky), var(--sky-3)); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.feature:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: rgba(85, 191, 255, .6); }
.feature:hover::before { transform: scaleX(1); }
.feature__icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 18px; border-radius: 16px; color: #fff;
  background: linear-gradient(145deg, var(--sky), var(--sky-3)); box-shadow: 0 4px 0 var(--sky-4), 0 10px 20px rgba(31, 143, 224, .3);
  transition: transform .4s var(--ease);
}
.feature__icon .icon { width: 28px; height: 28px; }
.feature:hover .feature__icon { transform: rotate(-8deg) scale(1.1); }
.feature h3 { font-size: 1.08rem; font-weight: 800; margin-bottom: 8px; }
.feature p { font-size: .92rem; color: var(--muted); }
.feature code, .step code { background: var(--ice); color: var(--sky-4); padding: 1px 6px; border-radius: 6px; font-weight: 600; }
@media (max-width: 1180px) { .grid-features { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid-features { grid-template-columns: 1fr; } }

/* ---------- Commands ---------- */
.cmd-tools { display: flex; justify-content: center; margin-bottom: 28px; }
.search { position: relative; width: min(100%, 440px); display: block; }
.search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--sky-3); pointer-events: none; }
.search input {
  width: 100%; padding: 14px 18px 14px 46px; border-radius: 16px; border: 1.5px solid rgba(85, 191, 255, .45); background: #fff;
  font: inherit; font-weight: 500; color: var(--navy); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: #7f9ab4; }
.search input:focus { outline: none; border-color: var(--sky-3); box-shadow: 0 0 0 4px rgba(85, 191, 255, .3); }
.cmd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cmd { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 18px 18px 22px; background: #fff; border: var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.cmd:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(85, 191, 255, .65); }
.cmd__body { min-width: 0; }
.cmd code { display: inline-block; font-size: 1.05rem; font-weight: 700; color: var(--sky-4); background: var(--ice); padding: 3px 12px; border-radius: 10px; }
.cmd p { margin-top: 8px; font-size: .9rem; color: var(--muted); }
.copy { position: relative; flex: none; width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--ice); color: var(--sky-4); display: grid; place-items: center; transition: background .2s, color .2s, transform .2s var(--ease); }
.copy .icon { grid-area: 1 / 1; transition: transform .25s var(--ease), opacity .2s; }
.copy .i-check { opacity: 0; transform: scale(.4); }
.copy:hover { background: var(--sky); color: #fff; transform: scale(1.08); }
.copy.is-copied { background: var(--ok); color: #fff; }
.copy.is-copied .i-copy { opacity: 0; transform: scale(.4); }
.copy.is-copied .i-check { opacity: 1; transform: none; }
.cmd-empty { text-align: center; margin-top: 24px; color: var(--muted); font-weight: 600; }
@media (max-width: 1000px) { .cmd-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cmd-grid { grid-template-columns: 1fr; } }

/* ---------- Economy ---------- */
.eco-grid { display: block; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.step { display: flex; gap: 18px; padding: 20px 22px; align-items: flex-start; }
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(85, 191, 255, .6); }
.step__n {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  font-family: var(--pixel); font-weight: 700; font-size: 1.25rem; color: #fff; padding-top: 2px;
  background: linear-gradient(145deg, var(--sky), var(--sky-3)); box-shadow: 0 4px 0 var(--sky-4);
}
.step h3 { font-size: 1.05rem; font-weight: 800; }
.step p { margin-top: 4px; font-size: .92rem; color: var(--muted); }

.face { width: 44px; height: 44px; border-radius: 10px; image-rendering: pixelated; background: var(--ice-2); flex: none; box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(11, 37, 69, .18); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Rules ---------- */
.rules { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: start; }
.rules__tabs { display: flex; flex-direction: column; gap: 8px; position: sticky; top: calc(var(--nav-h) + 16px); }
.tab { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: 16px; border: var(--border); background: #fff; font-weight: 700; color: var(--navy-2); transition: transform .2s var(--ease), background .2s, color .2s, box-shadow .2s; }
.tab:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.tab .icon { color: var(--sky-3); }
.tab.is-active { background: linear-gradient(145deg, var(--sky-2), var(--sky-3)); color: #fff; box-shadow: 0 4px 0 var(--sky-4), 0 12px 24px rgba(31, 143, 224, .3); border-color: transparent; }
.tab.is-active .icon { color: #fff; }
.rules__panel { padding: clamp(22px, 3vw, 34px); animation: panelIn .4s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }
.rules__panel h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 18px; }
.rules__intro { color: var(--muted); margin-bottom: 18px; }
.rules__intro:last-child { margin: 18px 0 0; }
.rule-list { list-style: none; counter-reset: rule; margin: 0; padding: 0; display: grid; gap: 12px; }
.rule-list li { counter-increment: rule; position: relative; padding: 14px 16px 14px 62px; border-radius: 14px; background: var(--ice); color: var(--navy-2); font-size: .96rem; }
.rule-list li::before { content: counter(rule); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--pixel); font-weight: 700; color: #fff; background: linear-gradient(145deg, var(--sky), var(--sky-3)); box-shadow: 0 3px 0 var(--sky-4); padding-top: 2px; }
.rule-list strong { color: var(--navy); }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ladder__step { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; border-radius: 16px; background: var(--ice); position: relative; font-size: .88rem; color: var(--muted); }
.ladder__step strong { color: var(--navy); font-size: 1rem; }
.ladder__step:nth-child(1) { background: #e9f9f0; }
.ladder__step:nth-child(2) { background: #fff6dd; }
.ladder__step:nth-child(3) { background: #ffeadb; }
.ladder__step:nth-child(4) { background: #ffe3e4; }
.ladder__n { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-family: var(--pixel); font-weight: 700; background: #fff; color: var(--navy); box-shadow: 0 2px 0 rgba(11, 37, 69, .15); padding-top: 2px; }
@media (max-width: 1000px) { .ladder { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .rules { grid-template-columns: 1fr; }
  .rules__tabs { position: static; flex-direction: row; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
  .tab { flex: none; scroll-snap-align: start; white-space: nowrap; }
  .tab:hover { transform: none; }
}
@media (max-width: 480px) { .ladder { grid-template-columns: 1fr; } .rule-list li { padding-left: 58px; } }

/* ---------- Discord CTA ---------- */
.cta {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: clamp(28px, 5vw, 52px); border-radius: var(--r-lg); color: #fff;
  background: linear-gradient(120deg, #1a78c9 0%, #2d9be8 55%, #55BFFF 100%);
  box-shadow: var(--shadow-lg);
}
.cta__pixels { position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%), linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%); background-size: 48px 48px; background-position: 0 0, 24px 24px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 80%); mask-image: linear-gradient(90deg, transparent, #000 80%); }
.cta__text { position: relative; max-width: 620px; }
.cta h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.cta p { margin-top: 10px; font-weight: 500; opacity: .95; }
.cta .btn { position: relative; }

/* ---------- Footer ---------- */
.footer { background: var(--ice); padding: 40px 0 24px; border-top: 1px solid rgba(85, 191, 255, .35); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__brand p { margin-top: 8px; color: var(--muted); font-size: .9rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__links a { font-weight: 600; font-size: .92rem; color: var(--navy-2); padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.footer__links a:hover { color: var(--sky-4); border-color: var(--sky); }
.footer__legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(85, 191, 255, .3); font-size: .8rem; color: var(--muted); }
.footer .btn b { font-family: var(--mono); font-weight: 700; }

/* ---------- Dialog ---------- */
.dialog { width: min(480px, calc(100% - 32px)); padding: 28px; border: 0; border-radius: var(--r-lg); background: #fff; color: var(--navy); box-shadow: 0 30px 80px rgba(11, 37, 69, .35); }
.dialog[open] { animation: pop .35s var(--ease); }
.dialog::backdrop { background: rgba(11, 37, 69, .45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.dialog__close { position: absolute; top: 16px; right: 16px; margin: 0; }
.dialog h2 { font-size: 1.5rem; font-weight: 800; padding-right: 40px; }
.dialog__status { margin-top: 8px; font-size: .9rem; font-weight: 600; color: #0c6b3c; }
.dialog__status[data-type="warn"] { color: #8a5a00; }
.join-steps { list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 14px; }
.join-steps li { display: flex; gap: 14px; align-items: flex-start; }
.join-steps li > span { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; font-family: var(--pixel); font-weight: 700; background: linear-gradient(145deg, var(--sky), var(--sky-3)); box-shadow: 0 3px 0 var(--sky-4); padding-top: 2px; }
.join-steps p { color: var(--muted); font-size: .9rem; }
.dialog__ip { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 8px 8px 16px; background: var(--ice); border: 1px dashed rgba(31, 143, 224, .45); border-radius: 14px; }
.dialog__ip code { font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
.dialog__actions { margin-top: 16px; display: flex; justify-content: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 76px; z-index: 300; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px;
  background: var(--navy); color: #fff; font-weight: 600; font-size: .92rem; box-shadow: 0 16px 40px rgba(11, 37, 69, .35);
  opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: opacity .25s, transform .35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { color: #6fe3a5; }
.toast[data-type="warn"] .icon { color: var(--gold); }

/* ---------- Setup helper ---------- */
.setup { position: fixed; left: 16px; bottom: 16px; z-index: 250; }
.setup__chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 0; background: var(--navy); color: #fff; font-weight: 700; font-size: .85rem; box-shadow: 0 10px 30px rgba(11, 37, 69, .3); }
.setup__chip b { background: var(--gold); color: var(--navy); border-radius: 999px; padding: 0 8px; margin-left: 2px; }
.setup__panel { position: absolute; left: 0; bottom: 52px; width: min(360px, calc(100vw - 32px)); padding: 18px; border-radius: 18px; background: #fff; border: var(--border); box-shadow: var(--shadow-lg); font-size: .88rem; }
.setup__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.setup__panel p { color: var(--muted); }
.setup__panel code { background: var(--ice); padding: 1px 6px; border-radius: 6px; }
.setup__panel ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.setup__panel li { padding: 10px 12px; background: #fff6d6; border-radius: 12px; border: 1px solid #ffe19b; }
.setup__panel li b { display: block; color: #7a5200; }
.setup__panel li span { color: #7a5200; opacity: .85; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

