/* Noki Servers shares the nokiclient.com look: golem material accents
   (proposal, palette not closed), block grid, halo and block-step buttons. */
:root {
  color-scheme: dark;
  --stone: #b9b8b3; --moss: #8fae45; --crystal: #8fbdf0; --crystal-deep: #182a40;
  --copper: #d27d58; --wood: #c08a5a; --slate: #6b7079;
  --bg: #14171c; --panel: #1b2028; --panel-2: #222730; --border: #363d48;
  --text: #f0eee8; --muted: #aeb5c0; --step: 4px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background:
    linear-gradient(#ffffff05 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, #ffffff05 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #a6c8ff; outline-offset: 4px; }

.topbar, main, footer { width: min(100% - 64px, 1120px); margin: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 32px 0; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 850; letter-spacing: -1px; }
.brand span { font-size: 10px; font-weight: 500; letter-spacing: 2px; color: #bdc1c8; border-left: 1px solid #46494e; padding-left: 12px; }
.client-link { padding: 10px 14px; font-size: 12px; color: #d2e3fc; border: 1px solid #3b5271; border-radius: 9px; background: #22364f; box-shadow: 0 var(--step) 0 var(--crystal-deep); }
.client-link:hover { background: #2b4362; }

main { position: relative; }
main::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  top: -40px; left: 50%; transform: translateX(-50%);
  width: min(560px, 100%); height: 380px;
  background: radial-gradient(closest-side, #d27d5826, #8fbdf00f 60%, transparent);
}
.page-title { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 44px; }
/* noki.png has an opaque dark square; lighten lets the halo show through it. */
.mascot { width: 132px; height: 132px; margin-bottom: 14px; mix-blend-mode: lighten; }
.section-kicker { color: var(--wood); font-size: 10px; letter-spacing: 2px; font-weight: 600; }
h1 { margin: 14px 0 0; font-size: clamp(36px, 6vw, 56px); line-height: 1.1; letter-spacing: -2.4px; font-weight: 650; }
h1 em { font-style: normal; color: var(--crystal); }
.page-title p { margin: 16px 0 26px; color: #b0b6c0; font-size: 16px; }

.secondary, .primary { border-radius: 9px; padding: 11px 16px; font-size: 13px; font-weight: 600; }
.secondary { border: 1px solid #414953; background: var(--panel-2); box-shadow: 0 var(--step) 0 #0f1217; }
.secondary:hover { background: #2b313c; }
.secondary span { margin-left: 14px; color: var(--crystal); }
.primary { border: 0; background: var(--crystal); color: #152642; box-shadow: 0 var(--step) 0 #4f79a8; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: 22px; font-weight: 550; letter-spacing: -.6px; }
.section-heading > span { font-size: 11px; color: #989fac; }

/* Shared card anatomy for the top 3 and the catalog. */
.sponsor-card, .server-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid var(--border); border-radius: 14px; background: var(--panel);
  box-shadow: 0 var(--step) 0 #0f1217;
}
.server-banner { position: relative; aspect-ratio: 2.5 / 1; background: #182331; }
.server-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.server-banner.custom-banner img { object-fit: contain; background: #21180f; }
.server-identity { display: flex; align-items: center; gap: 11px; padding: 14px 16px 0; min-width: 0; }
.server-identity > div { min-width: 0; }
.server-logo { width: 42px; height: 42px; flex-shrink: 0; border-radius: 9px; object-fit: contain; background: #273244; }
.logo-fallback { display: grid; place-items: center; color: #a6b5cb; font-size: 19px; }
.sponsor-card h3, .server-card h3 { margin: 0 0 3px; font-size: 16px; font-weight: 650; letter-spacing: -.3px; }
.server-address { margin: 0; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.server-actions { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 16px; margin-top: auto; }
.player-status { display: flex; align-items: center; gap: 6px; margin: 0; min-height: 18px; font-size: 11px; color: #96a7c0; }
.player-status.is-online { color: #a0d6b5; }
.card-controls { display: flex; align-items: center; gap: 8px; }
.copy-address {
  display: flex; align-items: center; justify-content: space-between; flex: 1;
  padding: 9px 12px; border: 1px solid #3b5271; border-radius: 8px; background: #22364f;
  color: #d2e3fc; font-size: 11px; box-shadow: 0 3px 0 var(--crystal-deep);
}
.copy-address:hover { background: #2b4362; }
.save, .sample-label {
  flex-shrink: 0; height: 36px; border: 1px solid #363d48; border-radius: 8px;
  background: transparent; color: #9badc6; box-shadow: 0 3px 0 #0f1217;
}
.save { width: 36px; font-size: 18px; }
.save:hover, .save[aria-pressed=true] { background: #2b3546; color: #f3d98f; }
.sample-label { padding: 0 11px; font-size: 10px; color: #d1c2a4; border-color: #4a4234; }
.sample-label:hover { background: #2a261f; }

.sponsors { margin-bottom: 48px; }
.sponsor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sponsor-1 { border-top: 3px solid var(--copper); }
.sponsor-2 { border-top: 3px solid var(--crystal); }
.sponsor-3 { border-top: 3px solid var(--moss); }
.slot-number {
  position: absolute; top: 10px; left: 10px; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px; font-size: 14px; font-weight: 700;
  color: #14171c; box-shadow: 0 3px 0 #0006;
}
.sponsor-1 .slot-number { background: var(--copper); }
.sponsor-2 .slot-number { background: var(--crystal); }
.sponsor-3 .slot-number { background: var(--moss); }

#catalogo { scroll-margin-top: 20px; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; border-bottom: 1px solid #2d323b; }
.catalog-toolbar nav { display: flex; gap: 26px; }
.nav { padding: 0 0 13px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 13px; }
.nav.active { color: var(--text); border-color: var(--crystal); }
.nav span { margin-left: 4px; padding: 2px 6px; border-radius: 5px; background: #2b3546; color: #b9c6d8; font-size: 10px; }
#result-count { padding-bottom: 13px; font-size: 11px; color: #989fac; white-space: nowrap; }
.tools { display: flex; gap: 10px; }
.search { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; padding: 0 14px; border: 1px solid #363d48; border-radius: 10px; background: var(--panel); }
.search:focus-within { border-color: var(--crystal); }
.search svg { width: 16px; flex-shrink: 0; fill: none; stroke: #8c9db6; stroke-width: 1.6; }
.search input { width: 100%; min-width: 0; height: 46px; border: 0; outline: none; background: none; color: var(--text); font-size: 13px; }
.search input::placeholder { color: #8d95a3; }
kbd { padding: 0 6px; border: 1px solid #414953; border-radius: 4px; font-size: 10px; color: #9aa3b1; }
.sort select { height: 48px; padding: 0 12px; border: 1px solid #363d48; border-radius: 10px; background: var(--panel); color: #c3cad5; font-size: 12px; }
.demo-note { margin: 12px 0 16px; font-size: 11px; color: #989fac; }
.server-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 16px; }
.server-card:hover, .sponsor-card:hover { border-color: #4b5565; }

.empty { padding: 40px 20px; text-align: center; border: 1px dashed #414953; border-radius: 14px; }
.empty h3 { font-size: 17px; }
.empty p { color: var(--muted); font-size: 13px; }

footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding: 24px 0; border-top: 1px solid #2d323b; color: #969eaa; font-size: 11px; }
.footer-signature { color: #c9ced6; font-weight: 800; letter-spacing: -.3px; }
.footer-signature b { margin-left: 4px; font-size: 9px; font-weight: 500; letter-spacing: 2px; }

dialog { width: calc(100% - 32px); max-width: 480px; padding: 0; border: 1px solid #414953; border-radius: 14px; background: var(--panel); color: var(--text); box-shadow: 0 24px 80px #0008; }
dialog::backdrop { background: #0a0c10d0; backdrop-filter: blur(4px); }
.close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 6px; background: #12151a; color: #c4cad4; font-size: 22px; }
.modal-body { padding: 32px; }
.modal-body h2 { margin: 10px 0 18px; font-size: 24px; letter-spacing: -.5px; }
.modal-body p { color: #b8bec8; font-size: 13px; line-height: 1.8; }
.modal-body .primary { margin-top: 12px; }
.ad-label { color: #d1c2a4; font-size: 10px; letter-spacing: .3px; }
.toast { position: fixed; bottom: 20px; left: 50%; z-index: 20; transform: translateX(-50%); padding: 12px 16px; border-radius: 9px; background: var(--crystal); color: #14223a; font-size: 12px; opacity: 0; pointer-events: none; }
.toast.visible { opacity: 1; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.skip:focus { position: fixed; top: 5px; left: 5px; z-index: 30; padding: 10px; background: white; color: black; }
[hidden] { display: none !important; }

@media (max-width: 950px) {
  .server-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .topbar, main, footer { width: calc(100% - 32px); }
  .topbar { padding: 24px 0; }
  .brand { font-size: 20px; gap: 10px; }
  .brand span { font-size: 9px; padding-left: 10px; }
  .client-link { padding: 8px 10px; font-size: 11px; }
  .mascot { width: 108px; height: 108px; }
  h1 { letter-spacing: -1.5px; }
  .page-title { padding-bottom: 36px; }
  .page-title p { font-size: 14px; }
  .section-heading { flex-direction: column; gap: 6px; }
  .section-heading h2 { font-size: 20px; }
  .sponsor-grid, .server-cards { grid-template-columns: 1fr; }
  .sponsors { margin-bottom: 40px; }
  .catalog-toolbar nav { gap: 18px; }
  .tools { flex-wrap: wrap; }
  .search { flex-basis: 100%; }
  .sort select { height: 40px; }
  footer { flex-direction: column; gap: 6px; text-align: center; }
}

/* Motion is optional: content stays visible without animations. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .page-title > *, .sponsors { animation: noki-arrive 560ms cubic-bezier(.22, 1, .36, 1) both; }
  .page-title > :nth-child(2) { animation-delay: 40ms; }
  .page-title > :nth-child(3) { animation-delay: 80ms; }
  .page-title > :nth-child(4) { animation-delay: 120ms; }
  .page-title > :nth-child(5) { animation-delay: 160ms; }
  .sponsors { animation-delay: 220ms; }
  .mascot { animation: noki-greet 2200ms ease-in-out 1; transform-origin: 50% 80%; }
  .sponsor-card, .server-card { transition: transform 180ms ease, border-color 180ms ease; }
  .copy-address, .save, .sample-label, .secondary, .primary, .client-link { transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease; }
  .copy-address:active, .save:active, .sample-label:active { transform: translateY(3px); box-shadow: 0 0 0 transparent; }
  .secondary:active, .primary:active, .client-link:active { transform: translateY(var(--step)); box-shadow: 0 0 0 transparent; }
  .toast { transition: opacity 180ms ease; }
  @media (hover: hover) and (pointer: fine) {
    .sponsor-card:hover, .server-card:hover { transform: translateY(-3px); }
  }
}
@keyframes noki-arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes noki-greet {
  0%, 100% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-7px) rotate(-2deg); }
  65% { transform: translateY(-4px) rotate(1deg); }
}
