/* Crafter.ru — Minecraft-inspired UI, no framework */

:root {
  /* Minecraft-adjacent palette */
  --bg-deep: #0c0e10;
  --bg-surface: #141a1f;
  --bg-elevated: #1c242c;
  --bg-dirt: #3d2f1f;
  --stone-dark: #3a3a3a;
  --stone-mid: #6b6b6b;
  --border-3d-light: color-mix(in srgb, var(--text) 22%, transparent);
  --border-3d-dark: #0a0a0a;
  --border: color-mix(in srgb, var(--text-muted) 18%, transparent);
  --text: #e0e0e0;
  --text-muted: #9aa7b0;
  --grass: #55aa55;
  --grass-dark: #3d963d;
  --dirt: #8b6914;
  --dirt-dark: #5c4510;
  --gold: #ffaa00;
  --gold-dim: #c8860c;
  --diamond: #4fc3f7;
  --accent: var(--grass);
  --accent-dim: var(--grass-dark);
  --accent-glow: color-mix(in srgb, var(--grass) 32%, transparent);
  --radius: 0;
  --radius-sm: 0;
  --pixel: 4px;
  --font-sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-pixel: "Press Start 2P", ui-monospace, monospace;
  --header-h: 4.25rem;
  --container: min(1120px, 100% - 2rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mc-shadow: 4px 4px 0 #2b2b2b, 8px 8px 0 rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(180deg, #1a2332 0%, #0f1419 28%, var(--bg-deep) 55%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent calc(var(--pixel) * 2 - 1px),
      color-mix(in srgb, var(--text) 6%, transparent) calc(var(--pixel) * 2 - 1px),
      color-mix(in srgb, var(--text) 6%, transparent) calc(var(--pixel) * 2)
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent calc(var(--pixel) * 2 - 1px),
      color-mix(in srgb, var(--text) 6%, transparent) calc(var(--pixel) * 2 - 1px),
      color-mix(in srgb, var(--text) 6%, transparent) calc(var(--pixel) * 2)
    );
  background-size: auto, calc(var(--pixel) * 2) calc(var(--pixel) * 2), calc(var(--pixel) * 2) calc(var(--pixel) * 2);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--grass);
  color: #0a0f0a;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 800;
  text-decoration: none;
  border: 3px solid;
  border-color: #8f8 #131313 #131313 #8f8;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.narrow {
  max-width: 42rem;
  margin-inline: auto;
}

/* Minecraft “GUI panel” bevel */
.mc-panel {
  border: 3px solid;
  border-color: var(--border-3d-light) var(--border-3d-dark) var(--border-3d-dark) var(--border-3d-light);
  box-shadow: inset 1px 1px 0 color-mix(in srgb, white 8%, transparent);
}

.mc-title {
  font-family: var(--font-pixel);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow:
    3px 0 0 #3f3f3f,
    -3px 0 0 #3f3f3f,
    0 3px 0 #3f3f3f,
    0 -3px 0 #3f3f3f,
    6px 6px 0 rgba(0, 0, 0, 0.45);
}

.hero-title-tld {
  color: var(--gold);
  text-shadow:
    3px 0 0 #9a5a00,
    -3px 0 0 #9a5a00,
    0 3px 0 #9a5a00,
    0 -3px 0 #9a5a00,
    6px 6px 0 rgba(0, 0, 0, 0.45);
}

/* Mini block icons (features) */
.mc-block {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  image-rendering: pixelated;
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.35), inset 2px 2px 0 rgba(255, 255, 255, 0.12);
}

.mc-block--grass {
  background: linear-gradient(180deg, #7bc47b 0%, #55aa55 45%, #3d963d 100%);
}

.mc-block--dirt {
  background: linear-gradient(180deg, #a67c2e 0%, #8b6914 50%, #5c4510 100%);
}

.mc-block--ore {
  background: linear-gradient(135deg, #6b6b6b 0%, #4a4a4a 55%, #3a3a3a 100%);
  position: relative;
}

.mc-block--ore::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--diamond);
  box-shadow: 0 0 6px color-mix(in srgb, var(--diamond) 50%, transparent);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg-surface) 94%, black);
  border-bottom: 4px solid #0a0a0a;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 8%, transparent),
    0 4px 0 #1a1a1a,
    0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.brand-icon {
  flex-shrink: 0;
  border: 2px solid #1a1a1a;
  box-shadow: 2px 2px 0 #0a0a0a, inset 0 0 0 1px color-mix(in srgb, white 15%, transparent);
  image-rendering: pixelated;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-pixel);
  font-size: clamp(0.45rem, 1.8vw, 0.65rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 2px 2px 0 #2a2a2a;
}

.brand-tld {
  color: var(--gold);
}

.brand-tag {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grass);
  line-height: 1.5;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 3px solid;
  border-color: var(--border-3d-light) var(--border-3d-dark) var(--border-3d-dark) var(--border-3d-light);
  background: var(--bg-elevated);
  cursor: pointer;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
}

.nav-toggle-bar {
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav .nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.35rem 0;
  border-bottom: 3px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.site-nav a:hover {
  color: var(--grass);
}

.site-nav a:focus-visible {
  color: var(--gold);
  outline: none;
  border-bottom-color: var(--gold);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    max-height: 0;
    overflow: hidden;
    background: var(--bg-surface);
    border-bottom: 4px solid #0a0a0a;
    transition: max-height 0.35s var(--ease);
  }

  .site-nav.is-open {
    max-height: 320px;
  }

  .site-nav .nav-list {
    flex-direction: column;
    padding: 1rem 1.5rem 1.25rem;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.65rem 0;
    border-bottom-width: 0;
  }
}

/* Hero */

.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% -30%, color-mix(in srgb, var(--diamond) 18%, transparent), transparent 50%),
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 35% at 80% 15%, rgba(255, 255, 255, 0.03) 0%, transparent 45%),
    linear-gradient(180deg, #1e2a3d 0%, #121820 45%, var(--bg-deep) 100%);
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 12% 18%, #fff 0, #fff 1px, transparent 1px),
    radial-gradient(circle at 88% 12%, #fff 0, #fff 1px, transparent 1px),
    radial-gradient(circle at 44% 8%, #fff 0, #fff 1px, transparent 1px),
    radial-gradient(circle at 70% 22%, #fff6 0, #fff6 1px, transparent 1px);
  background-size: 120px 120px, 140px 130px, 100px 100px, 160px 140px;
  background-position: 0 0, 40px 20px, 80px 0, 20px 60px;
}

.hero-inner {
  position: relative;
  text-align: center;
}

.hero-eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--grass);
  text-shadow: 2px 2px 0 #1a3d1a;
}

.hero-title {
  margin: 0 0 1.25rem;
  font-size: clamp(0.85rem, 3.2vw, 1.35rem);
}

.hero-lead {
  margin: 0 auto 2.25rem;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

/* Server banner — “sign / server list” */

.server-banner {
  max-width: 38rem;
  margin-inline: auto;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-dirt) 85%, black) 0%, #2a2118 100%);
  border: 4px solid;
  border-color: #6a6a6a #1e1e1e #1e1e1e #6a6a6a;
  box-shadow:
    var(--mc-shadow),
    inset 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.server-banner-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 0.65rem;
  text-shadow: 2px 2px 0 #5c3d00;
}

.server-banner-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
}

.server-address {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  font-weight: 700;
  color: #ffff55;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.9rem;
  background: #0a0a0a;
  border: 3px solid;
  border-color: #1e1e1e #5a5a5a #5a5a5a #1e1e1e;
  word-break: break-all;
  text-shadow: 1px 1px 0 #3d3d00;
}

.server-banner-hint {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--text-muted) 90%, var(--gold));
}

.btn {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  border: none;
  transition: transform 0.1s var(--ease), filter 0.2s var(--ease);
}

.btn:active {
  transform: translateY(2px);
}

.btn-copy {
  padding: 0.75rem 1.35rem;
  color: #0f1a0f;
  background: linear-gradient(180deg, #7bd67b 0%, var(--grass) 45%, var(--grass-dark) 100%);
  border: 3px solid;
  border-color: #a8e8a8 #1a3d1a #1a3d1a #a8e8a8;
  box-shadow: 0 4px 0 #1a3d1a, 0 6px 16px rgba(0, 0, 0, 0.35);
}

.btn-copy:hover {
  filter: brightness(1.08);
}

.btn-copy:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-copy.is-done {
  background: linear-gradient(180deg, #ffd080 0%, var(--gold) 50%, var(--gold-dim) 100%);
  border-color: #ffe0a0 #5c3d00 #5c3d00 #ffe0a0;
  color: #1a1000;
  box-shadow: 0 4px 0 #5c3d00, 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Sections */

.section {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.section-alt {
  background-color: var(--bg-surface);
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 7px,
      rgba(0, 0, 0, 0.12) 7px,
      rgba(0, 0, 0, 0.12) 8px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 7px,
      rgba(0, 0, 0, 0.1) 7px,
      rgba(0, 0, 0, 0.1) 8px
    ),
    linear-gradient(180deg, #1a2228 0%, var(--bg-surface) 40%, color-mix(in srgb, var(--bg-dirt) 35%, var(--bg-surface)) 100%);
  border-block: 4px solid #0a0a0a;
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 5%, transparent);
}

.section-head {
  margin-bottom: 2rem;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-sans);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow:
    2px 0 0 #3f3f3f,
    -2px 0 0 #3f3f3f,
    0 2px 0 #3f3f3f,
    0 -2px 0 #3f3f3f,
    4px 4px 0 rgba(0, 0, 0, 0.4);
}

.section-intro {
  margin: 0 auto;
  max-width: 40rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.cards-3 {
  grid-template-columns: repeat(3, 1fr);
}

.cards-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
  .cards-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cards-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  padding: 1.35rem 1.5rem;
  background: linear-gradient(180deg, #252e36 0%, var(--bg-elevated) 100%);
  border: 3px solid;
  border-color: var(--border-3d-light) var(--border-3d-dark) var(--border-3d-dark) var(--border-3d-light);
  box-shadow: inset 1px 1px 0 color-mix(in srgb, white 6%, transparent);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.card:hover {
  border-color: color-mix(in srgb, var(--grass) 45%, var(--border-3d-light)) var(--border-3d-dark)
    var(--border-3d-dark) color-mix(in srgb, var(--grass) 35%, var(--border-3d-light));
  box-shadow: inset 1px 1px 0 color-mix(in srgb, var(--grass) 15%, transparent), 0 0 0 1px color-mix(in srgb, var(--grass) 20%, transparent);
}

.card-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--gold);
  text-shadow: 2px 2px 0 #3d2800;
}

.card-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.card-link .text-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--diamond);
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 0 12px color-mix(in srgb, var(--diamond) 35%, transparent);
}

.card-link .text-link:hover {
  text-decoration: underline;
  color: #7fd8ff;
}

.card-link .text-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.card-meta {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Features */

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 40rem;
  margin-inline: auto;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.15rem 1.35rem;
  background: var(--bg-elevated);
  border: 3px solid;
  border-color: var(--border-3d-light) var(--border-3d-dark) var(--border-3d-dark) var(--border-3d-light);
  box-shadow: inset 1px 1px 0 color-mix(in srgb, white 5%, transparent);
}

.feature-icon {
  flex-shrink: 0;
}

.feature-name {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.feature-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.rules-list,
.steps-list {
  margin: 0;
  padding: 1.25rem 1.5rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 3px solid;
  border-color: var(--border-3d-light) var(--border-3d-dark) var(--border-3d-dark) var(--border-3d-light);
  box-shadow: inset 1px 1px 0 color-mix(in srgb, white 5%, transparent);
}

.rules-list li,
.steps-list li {
  margin-bottom: 0.65rem;
}

.rules-list li::marker,
.steps-list li::marker {
  color: var(--grass);
  font-weight: 700;
}

.steps-list strong {
  color: #ffff55;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Footer */

.site-footer {
  padding: 2.5rem 0;
  border-top: 4px solid #0a0a0a;
  background: linear-gradient(180deg, #12161a 0%, #0a0c0e 100%);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 5%, transparent);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand-name {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-pixel);
  font-size: clamp(0.45rem, 1.8vw, 0.6rem);
  font-weight: 400;
  color: var(--gold);
  text-shadow: 2px 2px 0 #3d2800;
}

.footer-copy {
  margin: 0;
  max-width: 28rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--grass);
}

.footer-nav a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* Toast */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  padding: 0.85rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  border: 3px solid;
  border-color: var(--border-3d-light) var(--border-3d-dark) var(--border-3d-dark) var(--border-3d-light);
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  z-index: 200;
  transition: transform 0.35s var(--ease);
  max-width: calc(100% - 2rem);
  text-align: center;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
}
