/* ==== Root ==== */
:root {

  --font-family-base: "Vazir", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  user-select: none;

  /* ==== Base Colors ==== */
  --primary-color: #66c0f4;
  --secondary-color: #a8d0ff;
  --accent-color: #7c5cff;
  --success-color: #3ddc97;
  --warning-color: #ffcc66;
  --danger-color: #ff4d6d;

  /* ==== Background ==== */
  --bg-0: #0b101a;
  --bg-1: #0b1220;
  --bg-2: #0f1a2b;
  --bg-3: #14233a;

  --surface-1: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.08);

  --text-1: #eaf2ff; /* primary */
  --text-2: rgba(234, 242, 255, 0.75); /* secondary */
  --text-3: rgba(234, 242, 255, 0.55); /* muted */

  --border-color: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(102, 192, 244, 0.35);

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow-primary: 0 0 0 1px rgba(102, 192, 244, 0.25), 0 0 28px rgba(102, 192, 244, 0.18);
  --shadow-glow-accent: 0 0 0 1px rgba(124, 92, 255, 0.22), 0 0 30px rgba(124, 92, 255, 0.16);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  /* ==== Spacing ==== */
  --container-max: 1180px;

  --gradient-primary: linear-gradient(135deg, rgba(102, 192, 244, 0.28), rgba(124, 92, 255, 0.18));
  --gradient-surface: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

@font-face {
  font-family: "Vazir";
  src: url("../Fonts/Vazir.woff2") format("woff2"),
       url("../Fonts/Vazir.woff") format("woff"),
       url("../Fonts/Vazir.ttf") format("truetype"),
       url("../Fonts/Vazir.eot") format("embedded-opentype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ==== Base ==== */
html, body { height: 100%; }

*{ box-sizing: border-box; }

body{
  font-family: var(--font-family-base);
  background:
    radial-gradient(1100px 680px at 12% 10%, rgba(102,192,244,0.16), transparent 55%) fixed,
    radial-gradient(900px 620px at 88% 25%, rgba(124,92,255,0.14), transparent 58%) fixed,
    linear-gradient(180deg, var(--bg-3), var(--bg-2) 40%, var(--bg-0)) fixed;
  color: var(--text-1);
  padding-top: 100px;
  overflow-x: hidden;
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

.page-container{
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.section{
  padding: 80px 0;
}

.section-head{
  margin-bottom: 22px;
}

.section-title{
  margin: 0 0 10px 0;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-subtitle{
  margin: 0;
  color: var(--text-2);
  line-height: 1.9;
}

/* ==== Topbar ==== */
.topbar{
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: 100%;
  z-index: 50;

  background: rgba(8, 12, 20, 0.0);
  border-bottom: 1px solid transparent;
  border-radius: 0;

  transition:
    width .35s cubic-bezier(.2,.8,.2,1),
    transform .35s cubic-bezier(.2,.8,.2,1),
    background .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    border-radius .35s cubic-bezier(.2,.8,.2,1);
  will-change: transform, width;
}

.topbar-inner{
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar.is-floating{
  width: min(1200px, 86vw);
  transform: translateX(-50%) translateY(14px);

  background: rgba(18, 27, 46, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-bottom-color: rgba(255,255,255,0.10);
  border-radius: 16px;

  box-shadow: 0 14px 40px rgba(0,0,0,0.30);
}

.topbar::after{
  content: "";
  width: 98%;
  margin-right: 1%;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 2px;
  border-radius: 25px;

  background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
  transform-origin: right center;
  transform: scaleX(var(--scroll-progress, 1));
  opacity: 0;

  transition: opacity .2s ease;
}

.topbar.is-floating::after{
  opacity: 1;
}

/* ===== Brand ===== */
.brand{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 220px;
}

.brand-logo{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02);
  object-fit: cover;
  flex: 0 0 auto;
}

.brand-name{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-tagline{
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-3);
}

.topbar-actions{
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ===== Buttons ===== */
.btn-steam{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
  white-space: nowrap;
  user-select: none;
}

.btn-steam:active{ transform: translateY(1px); }

.btn-primary-steam{
  background: linear-gradient(135deg, rgba(102,192,244,0.95), rgba(102,192,244,0.55));
  color: #07101f;
  box-shadow: var(--shadow-glow-primary);
}

.btn-primary-steam:hover{
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(102,192,244,0.35), 0 18px 55px rgba(102,192,244,0.18);
}

.btn-ghost-steam{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
  color: var(--text-1);
}

.btn-ghost-steam:hover{
  transform: translateY(-2px);
  border-color: rgba(102,192,244,0.35);
  box-shadow: var(--shadow-soft);
}

/* ===== Hero ===== */
.hero{
  position: relative;
  padding: 70px 0 30px 0;
}

#particles-js{
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.42;
  pointer-events: none;
}

.hero-inner{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}

.hero-title{
  margin: 0 0 12px 0;
  font-size: clamp(2.1rem, 3.6vw, 3.3rem);
  font-weight: 950;
  letter-spacing: -0.05em;
  line-height: 1.15;
}

.hero-title strong{
  color: var(--primary-color);
  text-shadow: 0 0 22px rgba(102,192,244,0.22);
}

.hero-lead{
  margin: 0 0 18px 0;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 2;
}

.hero-cta{
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.hero-card{
  border-radius: var(--radius-xl);
  background: var(--gradient-surface);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero-card-inner{
  padding: 18px;
}

.hero-points{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.point{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
}

.point i{
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(102,192,244,0.12);
  border: 1px solid rgba(102,192,244,0.22);
  flex: 0 0 auto;
}

.point h3{
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 900;
}

.point p{
  margin: 0;
  color: var(--text-2);
  line-height: 1.9;
}

/* ===== Purpose ===== */
.purpose-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.panel{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02);
}

.panel h3{
  margin: 0 0 10px 0;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.panel p{
  margin: 0;
  color: var(--text-2);
  line-height: 2;
}

/* ===== Why Us ===== */
.why-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.why-card{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 18px 16px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.why-card:hover{
  transform: translateY(-6px);
  border-color: rgba(124,92,255,0.30);
  box-shadow: var(--shadow-glow-accent);
}

.why-icon{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(124,92,255,0.14);
  border: 1px solid rgba(124,92,255,0.24);
  margin-bottom: 12px;
}

.why-card h3{
  margin: 0 0 8px 0;
  font-weight: 950;
}

.why-card p{
  margin: 0;
  color: var(--text-2);
  line-height: 1.95;
}

/* ===== Donate ===== */
.donate-card{
  border-radius: 22px;
  background: var(--gradient-surface);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-soft);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.donate-text h2{
  margin: 0 0 8px 0;
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.donate-text p{
  margin: 0;
  color: var(--text-2);
  line-height: 2;
}

/* ===== Friends ===== */
.friends-grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.friend-card{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 12px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  min-height: 150px;
}

.friend-card:hover{
  transform: translateY(-5px);
  border-color: rgba(102,192,244,0.28);
  box-shadow: var(--shadow-glow-primary);
}

.friend-logo{
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  margin: 0 auto 10px auto;
  overflow: hidden;
}

.friend-logo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-name{
  text-align: center;
  margin: 0 0 8px 0;
  font-weight: 950;
  letter-spacing: -0.02em;
  font-size: 0.98rem;
}

.friend-desc{
  text-align: center;
  margin: 0;
  color: var(--text-2);
  line-height: 1.85;
  font-size: 0.92rem;
}

/* ===== Footer ===== */
.footer{
  border-top: 1px solid rgba(255,255,255,0.10);
  background: rgba(18, 27, 46, 0.62);
  padding: 38px 0;
  text-align: center;
}

.footer-title{
  margin: 0 0 10px 0;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.footer-text{
  margin: 0;
  color: var(--text-2);
  line-height: 2;
}

.footer-links{
  margin-top: 14px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--text-2);
  transition: transform .2s, border-color .2s, box-shadow .2s, color .2s;
}

.footer-link:hover{
  transform: translateY(-2px);
  color: var(--text-1);
  border-color: rgba(102,192,244,0.28);
  box-shadow: var(--shadow-soft);
}

.footer-bottom{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  color: var(--text-3);
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Responsive ===== */
@media (max-width: 1200px){
  .friends-grid{ grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px){
  .hero-inner{ grid-template-columns: 1fr; }
  .brand{ min-width: auto; }
  .why-grid{ grid-template-columns: repeat(2, 1fr); }
  .purpose-grid{ grid-template-columns: 1fr; }
  .friends-grid{ grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 576px){
  body{ padding-top: 92px; }

  .topbar.is-floating{
    width: min(98vw, 1200px);
    transform: translateX(-50%) translateY(10px);
  }

  .topbar-inner{
    min-height: 70px;
    gap: 0.6rem;
  }

  .brand-logo{ width: 38px; height: 38px; border-radius: 12px; }
  .brand-name{ font-size: 1rem; }
  .brand-tagline{ font-size: 0.8rem; }

  .btn-steam{ padding: 10px 12px; border-radius: 12px; }

  .section{ padding: 64px 0; }

  .why-grid{ grid-template-columns: 1fr; }
  .friends-grid{ grid-template-columns: repeat(2, 1fr); }
}
