:root {
  --sand-100: #D9CAB5;
  --sand-200: #F8CF95;
  --sand-300: #E1BA85;
  --sand-400: #B28E5B;
  --sand-500: #9E7C4A;

  --bg-deepest: #0c0804;
  --bg-base: #14100a;
  --bg-elevated: #1c160e;
  --bg-card: #221a10;
  --bg-overlay: rgba(13, 9, 5, 0.85);

  --border-soft: rgba(178, 142, 91, 0.18);
  --border-mid: rgba(178, 142, 91, 0.32);
  --border-strong: rgba(178, 142, 91, 0.55);

  --text-primary: #EADFCB;
  --text-muted: #B9A385;
  --text-dim: #826644;

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  --glow-gold: 0 0 40px rgba(248, 207, 149, 0.2);

  --font-body: "Cairo", "Tajawal", "Segoe UI", "Helvetica Neue", sans-serif;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --container-max: 1200px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.2s;
  --t-mid: 0.35s;
  --t-slow: 0.6s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><path d='M30 8L36 18H24L30 8zM30 52L24 42H36L30 52zM8 30L18 24V36L8 30zM52 30L42 36V24L52 30z' fill='%23B28E5B' fill-opacity='0.032'/></svg>");
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(248, 207, 149, 0.07), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(158, 124, 74, 0.09), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

nav, header, main, footer, section {
  position: relative;
  z-index: 1;
}

img { max-width: 100%; display: block; }

a {
  color: var(--sand-200);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--sand-100); }

button {
  font-family: inherit;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--sand-200);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sand-200);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.section-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--sand-300));
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.8;
  margin-bottom: 3rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5.5rem 0;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  background: rgba(12, 8, 4, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: all var(--t-mid) var(--ease);
}

.navbar.scrolled {
  background: rgba(12, 8, 4, 0.92);
  border-bottom-color: var(--border-soft);
  padding: 0.75rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  flex-shrink: 0;
}
.nav-brand:hover { color: var(--sand-200); }

.nav-brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sand-300), var(--sand-500));
  box-shadow: 0 4px 16px rgba(178, 142, 91, 0.28);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-brand-mark .brand-svg {
  width: 22px;
  height: 22px;
  color: var(--bg-deepest);
  display: block;
}
.nav-brand-mark .brand-img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nav-brand-mark.has-logo .brand-svg { display: none; }
.nav-brand-mark.has-logo .brand-img { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links > li { display: flex; }

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.55rem 1rem;
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
  position: relative;
  white-space: nowrap;
}

.nav-links a:not(.nav-cta):hover {
  color: var(--sand-200);
  background: rgba(248, 207, 149, 0.06);
}

.nav-links a.active:not(.nav-cta) {
  color: var(--sand-200);
}

.nav-links a.active:not(.nav-cta)::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background: var(--sand-200);
  border-radius: 2px;
}

.nav-cta {
  padding: 0.55rem 1.2rem !important;
  background: linear-gradient(135deg, var(--sand-300), var(--sand-500));
  color: var(--bg-deepest) !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 16px rgba(178, 142, 91, 0.28);
  margin-right: 0.4rem;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(178, 142, 91, 0.4);
  background: linear-gradient(135deg, var(--sand-200), var(--sand-400)) !important;
}

.nav-discord {
  padding: 0.5rem 0.9rem !important;
  background: #5865F2 !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  border-radius: 9px !important;
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 3px 12px rgba(88, 101, 242, 0.28);
}
.nav-discord:hover {
  background: #4752C4 !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(88, 101, 242, 0.4);
}
.nav-discord svg { width: 16px; height: 16px; }

.nav-shop {
  padding: 0.5rem 0.9rem !important;
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  border-radius: 9px !important;
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.28);
}
.nav-shop:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}
.nav-shop svg { width: 15px; height: 15px; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast) var(--ease);
}
.nav-toggle:hover {
  border-color: var(--border-strong);
  color: var(--sand-200);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.7rem;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-mid) var(--ease);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--sand-300), var(--sand-500));
  color: var(--bg-deepest);
  box-shadow: 0 6px 24px rgba(178, 142, 91, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(178, 142, 91, 0.45);
  color: var(--bg-deepest);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-mid);
}
.btn-ghost:hover {
  background: rgba(248, 207, 149, 0.06);
  border-color: var(--border-strong);
  color: var(--sand-200);
}

.hero {
  padding: 9rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero-ornament {
  position: absolute;
  top: 20%;
  right: -6%;
  width: 240px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  animation: floatSlow 10s ease-in-out infinite;
}
.hero-ornament.right {
  top: auto;
  right: auto;
  bottom: 10%;
  left: -4%;
  width: 180px;
  animation-delay: -5s;
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: rgba(248, 207, 149, 0.08);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 1.75rem;
}

.pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #3fb950;
  border-radius: 50%;
  box-shadow: 0 0 10px #3fb950;
  animation: pulseDot 2s ease-in-out infinite;
}
.hero-badge.offline .pulse {
  background: var(--text-dim);
  box-shadow: none;
  animation: none;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--sand-200), var(--sand-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 560px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-stat-number {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--sand-200);
  letter-spacing: -0.02em;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 500;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emblem {
  position: relative;
  width: 320px;
  height: 320px;
  max-width: 100%;
}
.emblem-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(248, 207, 149, 0.18), transparent 65%);
  border-radius: 50%;
  animation: pulseSlow 4s ease-in-out infinite;
}
@keyframes pulseSlow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}
.emblem-ring {
  position: absolute;
  inset: 20px;
  border: 2px dashed var(--border-mid);
  border-radius: 50%;
  animation: spin 40s linear infinite;
}
.emblem-ring.inner {
  inset: 55px;
  border-style: solid;
  border-color: var(--border-soft);
  animation: spin 30s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

.emblem-core {
  position: absolute;
  inset: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sand-300), var(--sand-500));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px -15px rgba(178, 142, 91, 0.5), inset 0 0 40px rgba(0, 0, 0, 0.2);
}
.emblem-core span {
  font-size: 5rem;
  font-weight: 900;
  color: var(--bg-deepest);
  line-height: 1;
}

.features {
  padding: 5.5rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 1.8rem;
  transition: all var(--t-mid) var(--ease);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(248, 207, 149, 0.04), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(248, 207, 149, 0.12), rgba(178, 142, 91, 0.08));
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sand-200);
  margin-bottom: 1.1rem;
  position: relative;
  z-index: 1;
}
.feature-icon svg { width: 24px; height: 24px; }

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

.about {
  padding: 5rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: center;
}

.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-badge {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  border-radius: var(--r-xl);
  background:
    linear-gradient(135deg, var(--sand-400), var(--sand-500)),
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1), transparent);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><path d='M20 5L25 15H15L20 5zM20 35L15 25H25L20 35zM5 20L15 15V25L5 20zM35 20L25 25V15L35 20z' fill='%23000' fill-opacity='0.12'/></svg>");
  background-size: 40px 40px;
}
.about-badge-text {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--bg-deepest);
  text-align: center;
  line-height: 1.1;
  position: relative;
  z-index: 1;
  padding: 1rem;
}

.about-content p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 1.1rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.75rem;
}

.about-highlight {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 1rem 1.2rem;
  transition: all var(--t-fast) var(--ease);
}
.about-highlight:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.about-highlight strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--sand-200);
  margin-bottom: 0.15rem;
}
.about-highlight span {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.cta-band {
  background:
    linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><path d='M30 8L36 18H24L30 8zM30 52L24 42H36L30 52zM8 30L18 24V36L8 30zM52 30L42 36V24L52 30z' fill='%23F8CF95' fill-opacity='0.04'/></svg>");
  background-size: 60px 60px;
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }

.cta-band h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.cta-band p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 1.8rem;
  font-size: 1rem;
}
.cta-band .hero-actions {
  justify-content: center;
  margin-bottom: 0;
}

.page-header {
  padding: 8rem 0 3rem;
  text-align: center;
  position: relative;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--sand-200); }
.breadcrumb span:not(:last-child) { opacity: 0.6; }

.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.page-header > .container > p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.8;
}

.rules-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: flex-start;
}

.rules-sidebar {
  position: sticky;
  top: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 1.25rem 1rem;
}
.rules-sidebar h4 {
  font-size: 0.92rem;
  color: var(--sand-200);
  margin-bottom: 0.8rem;
  padding-right: 0.6rem;
  border-right: 3px solid var(--sand-300);
}
.rules-sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.rules-sidebar a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
}
.rules-sidebar a:hover {
  background: rgba(248, 207, 149, 0.06);
  color: var(--sand-200);
}
.rules-sidebar a.active {
  background: rgba(248, 207, 149, 0.1);
  color: var(--sand-200);
  font-weight: 600;
}

.rules-category {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.rules-category-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}
.rules-category-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--sand-300), var(--sand-500));
  color: var(--bg-deepest);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rules-category-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
}

.rules-category-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.1rem;
  padding-right: 0.85rem;
  border-right: 3px solid var(--sand-400);
}

.rule-warning {
  background: linear-gradient(135deg,
    rgba(248, 207, 149, 0.08),
    rgba(178, 142, 91, 0.04));
  border: 1px solid var(--border-soft);
  border-right: 3px solid var(--sand-200);
  border-radius: var(--r-md);
  padding: 0.9rem 1.15rem;
  margin: 1.1rem 0 1.4rem;
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--text-primary);
}
.rule-warning strong {
  color: var(--sand-200);
  font-weight: 700;
  margin-left: 0.3rem;
}

.rules-subhead {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sand-200);
  margin: 1.6rem 0 0.9rem;
  padding-right: 0.7rem;
  border-right: 3px solid var(--sand-300);
  line-height: 1.4;
}

.rule-item {
  display: flex;
  gap: 0.9rem;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border-soft);
}
.rule-item:last-child { border-bottom: none; }

.rule-number {
  flex-shrink: 0;
  min-width: 28px;
  height: 28px;
  padding: 0 0.45rem;
  border-radius: 7px;
  background: rgba(248, 207, 149, 0.1);
  border: 1px solid var(--border-soft);
  color: var(--sand-200);
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.rule-text { flex: 1; min-width: 0; }
.rule-text h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}
.rule-text p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.75;
}

.rule-definition {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  margin: 1rem 0 1.4rem;
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.8;
}
.rule-definition strong {
  color: var(--sand-200);
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.safe-zones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.7rem;
  margin: 0.9rem 0 1.2rem;
}
.safe-zone {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  padding: 0.75rem 0.9rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-align: center;
  transition: all var(--t-fast) var(--ease);
}
.safe-zone:hover {
  border-color: var(--border-strong);
  background: var(--bg-card);
  transform: translateY(-2px);
}

.cargo-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.9rem 0 1.2rem;
}
.cargo-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-right: 3px solid var(--sand-300);
  border-radius: var(--r-sm);
  padding: 0.75rem 0.95rem;
  color: var(--text-primary);
  font-size: 0.92rem;
  line-height: 1.7;
}
.cargo-item strong {
  color: var(--sand-200);
  margin-left: 0.35rem;
  font-weight: 700;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 0.5rem 0 2rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background:
    linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  padding: 0;
  cursor: zoom-in;
  transition: all var(--t-mid) var(--ease);
  font-family: inherit;
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><path d='M30 8L36 18H24L30 8zM30 52L24 42H36L30 52zM8 30L18 24V36L8 30zM52 30L42 36V24L52 30z' fill='%23F8CF95' fill-opacity='0.07'/></svg>");
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 1;
  transition: opacity var(--t-mid) var(--ease);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 24 24' fill='none' stroke='%23B28E5B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.45'><path d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/><circle cx='12' cy='13' r='4'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 56px;
  pointer-events: none;
  z-index: 1;
  transition: opacity var(--t-mid) var(--ease);
}

.gallery-item:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.gallery-item img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-item.missing { cursor: default; }
.gallery-item.missing img { display: none; }
.gallery-item.missing:hover { transform: none; box-shadow: none; border-color: var(--border-soft); }

.gallery-item.has-image::before,
.gallery-item.has-image::after {
  opacity: 0;
}

.gallery-empty-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-soft);
  border-radius: var(--r-md);
}
.gallery-empty-note code {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 0.1rem 0.45rem;
  color: var(--sand-200);
  font-size: 0.85rem;
  font-family: "SF Mono", Menlo, Monaco, monospace;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 4, 2, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  animation: fadeIn var(--t-mid) var(--ease);
}
.lightbox.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-img {
  max-width: 92%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: var(--r-lg);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.85);
  object-fit: contain;
  animation: zoomIn var(--t-mid) var(--ease);
}
@keyframes zoomIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--sand-200);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-mid) var(--ease);
}
.lightbox-close:hover {
  background: var(--sand-400);
  color: var(--bg-deepest);
  transform: rotate(90deg);
}

.footer {
  background: var(--bg-deepest);
  border-top: 1px solid var(--border-soft);
  padding: 3.5rem 0 1.75rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.25rem;
}

.footer-brand { max-width: 380px; }

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.8;
}

.footer-col h4 {
  font-size: 0.92rem;
  color: var(--sand-200);
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: var(--sand-200); }

.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-heart {
  display: inline-block;
  color: #e24f5a;
  animation: heartbeat 1.8s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.18); }
  50% { transform: scale(1); }
  70% { transform: scale(1.1); }
}

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.teaser-card {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  cursor: default;
  transition: all var(--t-mid) var(--ease);
}

.teaser-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><path d='M30 8L36 18H24L30 8zM30 52L24 42H36L30 52zM8 30L18 24V36L8 30zM52 30L42 36V24L52 30z' fill='%23F8CF95' fill-opacity='0.06'/></svg>");
  background-size: 60px 60px;
  pointer-events: none;
}

.teaser-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.teaser-card > * {
  position: relative;
  z-index: 1;
}

.teaser-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sand-300), var(--sand-500));
  color: var(--bg-deepest);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  box-shadow: 0 8px 24px -8px rgba(178, 142, 91, 0.5);
}
.teaser-icon svg { width: 26px; height: 26px; }

.teaser-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.teaser-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  background: rgba(248, 207, 149, 0.12);
  border: 1px solid var(--border-mid);
  border-radius: 999px;
  color: var(--sand-200);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.teaser-badge svg { width: 11px; height: 11px; }

body {
  animation: pageEnter 0.4s var(--ease) both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sand-200), var(--sand-400), var(--sand-200));
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: right;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
}
.page-progress.active {
  opacity: 1;
  transform: scaleX(1);
  transition:
    transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.2s var(--ease);
  animation: progressShimmer 1s linear infinite;
}
@keyframes progressShimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease),
              transform var(--t-slow) var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1200px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem;
    background: rgba(12, 8, 4, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-links.open { display: flex; }
  .nav-links > li { width: 100%; }
  .nav-links a {
    width: 100%;
    padding: 0.85rem 1rem;
    text-align: right;
  }
  .nav-links a.active:not(.nav-cta)::after { display: none; }
  .nav-links a.active:not(.nav-cta) {
    background: rgba(248, 207, 149, 0.06);
  }
  .nav-cta {
    margin: 0.4rem 0 0 !important;
    text-align: center;
    justify-content: center;
  }
  .nav-discord,
  .nav-shop {
    margin: 0.4rem 0 0 !important;
    justify-content: center;
    width: 100%;
  }
  .nav-toggle { display: flex; }
}

@media (max-width: 1100px) {
  section { padding: 3.5rem 0; }
  .hero { padding: 7rem 0 3rem; }
}

@media (max-width: 960px) {
  .hero-inner,
  .about-grid,
  .rules-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-visual { max-width: 300px; margin: 0 auto; }
  .emblem { width: 260px; height: 260px; }
  .emblem-core { inset: 70px; }
  .emblem-core span { font-size: 4rem; }

  .rules-sidebar {
    position: static;
  }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .hero-stats { gap: 1.5rem; }
  .hero-stat-number { font-size: 1.7rem; }

  .about-highlights { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .cta-band { padding: 2.5rem 1.25rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 1.25rem; }
  .about-highlights { grid-template-columns: 1fr; }
  .rules-category { padding: 1.25rem; }
  .rules-category-header { gap: 0.6rem; }
  .rules-category-header h2 { font-size: 1.15rem; }
  .rules-category-icon { width: 38px; height: 38px; }
  .rules-subhead { font-size: 1rem; }
  .safe-zones { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .safe-zone { padding: 0.55rem 0.45rem; font-size: 0.82rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 0.6rem; }
  .lightbox { padding: 0.75rem; }
  .lightbox-close { top: 0.8rem; left: 0.8rem; width: 38px; height: 38px; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .navbar, .footer, .nav-toggle, .hero-visual,
  .cta-band, .lightbox { display: none !important; }
  body { background: white; color: black; }
  .container { max-width: 100%; }
}
