:root {
  --void: #08090b;
  --steel: #4b525e;
  --neon: #c9d1de;
  --bone: #e8ecf2;
  --muted: #a0a9b8;
  --hairline: rgba(201, 209, 222, 0.6);
  --glow-soft: drop-shadow(0 0 6px rgba(201, 209, 222, 0.45)) drop-shadow(0 0 22px rgba(150, 162, 184, 0.3));

  --display: "Bahnschrift", "DIN Condensed", "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", Impact, sans-serif;
  --text: "Segoe UI", "Noto Naskh Arabic", "Noto Sans Arabic", Tahoma, system-ui, sans-serif;
}

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

html {
  background: var(--void);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(56rem 34rem at 50% -8%, #1d2027 0%, rgba(29, 32, 39, 0) 65%),
    var(--void);
  color: var(--bone);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* One block per language; the other is hidden. */
html[data-lang="ar"] .en,
html[data-lang="en"] .ar {
  display: none !important;
}

/* ---------- Language switch ---------- */

.lang-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(201, 209, 222, 0.4);
  border-radius: 0.25rem;
  background: transparent;
  color: var(--neon);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-toggle:hover {
  background: var(--neon);
  color: var(--void);
}

.lang-toggle:focus-visible,
.join-btn:focus-visible,
.tg:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 4px;
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(3rem, 8vh, 5rem) 1.25rem 0;
}

.wordmark {
  margin: 0;
  padding-left: 0.14em; /* balances the trailing letter-spacing so the word sits dead center */
  font-family: var(--display);
  font-size: clamp(4.5rem, 21vw, 10.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.14em;
  color: var(--bone);
  text-shadow:
    0 0 0.35rem rgba(232, 236, 242, 0.55),
    0 0 1.6rem rgba(160, 172, 192, 0.45),
    0 0 4.5rem rgba(120, 132, 154, 0.3);
}

.sword {
  display: block;
  width: clamp(250px, 58vw, 440px);
  height: auto;
  margin-top: clamp(1rem, 3vh, 1.75rem);
  overflow: visible;
  filter: var(--glow-soft);
  animation: draw-blade 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.sword .metal {
  fill: #1a1d24;
  stroke: var(--neon);
  stroke-width: 0.8;
}

.sword .grip {
  fill: #0f1115;
  stroke: var(--steel);
  stroke-width: 0.8;
}

.sword .wrap {
  fill: none;
  stroke: var(--steel);
  stroke-width: 0.8;
}

.sword .gem {
  fill: var(--neon);
}

.sword .edge {
  fill: none;
  stroke: var(--neon);
  stroke-width: 0.7;
  stroke-linejoin: round;
}

.sword .ridge {
  stroke-opacity: 0.55;
  stroke-width: 0.5;
}

/* Reveals the blade from hilt to tip. The negative insets keep the glow from being clipped. */
@keyframes draw-blade {
  from {
    clip-path: inset(-40px 100% -40px -40px);
  }
  to {
    clip-path: inset(-40px);
  }
}

/* ---------- Divider ---------- */

.rule {
  position: relative;
  width: min(34rem, 86vw);
  height: 1px;
  margin: clamp(1.75rem, 4.5vh, 2.75rem) auto;
  border: 0;
  overflow: visible; /* browsers clip hr contents by default, which would hide the diamond */
  background: linear-gradient(90deg, transparent, var(--hairline) 22%, var(--hairline) 78%, transparent);
}

.rule::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid var(--neon);
  background: var(--void);
  box-shadow: 0 0 0.6rem rgba(201, 209, 222, 0.7);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------- Page body ---------- */

main {
  width: min(100%, 44rem);
  margin: 0 auto;
  padding: 0 1.25rem clamp(4rem, 10vh, 7rem);
  text-align: center;
}

main h2 {
  margin: 0 0 0.6rem;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--neon);
  text-shadow: 0 0 1rem rgba(160, 172, 192, 0.45);
}

/* ---------- Join ---------- */

.join {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.join-btn {
  display: inline-block;
  padding: 0.95rem 3rem;
  border: 1px solid var(--neon);
  border-radius: 0.25rem;
  background: transparent;
  color: var(--neon);
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow:
    0 0 0.7rem rgba(201, 209, 222, 0.25),
    inset 0 0 0.7rem rgba(201, 209, 222, 0.12);
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.join-btn:hover {
  background: var(--neon);
  color: var(--void);
  box-shadow: 0 0 1.6rem rgba(201, 209, 222, 0.6);
}

.join-btn:active {
  transform: translateY(1px);
}

.join-btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
  box-shadow: none;
}

.join-note {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- About ---------- */

.about p {
  margin: 0 auto;
  max-width: 32rem;
  color: var(--muted);
}

/* ---------- Team ---------- */

.people {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem 3.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.name {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.06em;
  color: var(--bone);
}

.tg {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(201, 209, 222, 0.5);
  border-radius: 0.25rem;
  color: var(--neon);
  font-size: 0.95rem;
  line-height: 1.6;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tg svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
}

.tg:hover {
  background: var(--neon);
  border-color: var(--neon);
  color: var(--void);
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .sword {
    animation: none;
  }
  .join-btn,
  .tg,
  .lang-toggle {
    transition: none;
  }
}
