:root {
  --bg: #0e0c0a;
  --bg-elevated: rgba(22, 18, 14, 0.72);
  --gold: #d4af5a;
  --gold-bright: #f0d78a;
  --gold-dim: rgba(212, 175, 90, 0.35);
  --cream: #f0e2a8;
  --cream-soft: #f7edc4;
  --text: #f7f3ea;
  --text-muted: rgba(247, 243, 234, 0.72);
  --ink: #171410;
  --max: 440px;
  --radius: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

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

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  font-family: "Peyda", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: fixed;
  inset: 0;
}

.page {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    max(1.25rem, var(--safe-t))
    max(1.25rem, var(--safe-r))
    max(1.25rem, var(--safe-b))
    max(1.25rem, var(--safe-l));
  overflow: hidden;
  background-color: var(--bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.04) 2px, rgba(255, 255, 255, 0.04) 3px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 0, 0, 0.05) 2px, rgba(0, 0, 0, 0.05) 3px);
  mix-blend-mode: overlay;
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.55) 100%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.05rem;
  padding-top: clamp(0.35rem, 2.5vh, 1.25rem);
  overflow: hidden;
}

.hero,
.brands,
.actions {
  --enter-delay: 0ms;
  opacity: 0;
  transform: translateY(18px);
  animation: section-in 0.85s var(--ease) var(--enter-delay) both;
}

.hero {
  --enter-delay: 0ms;
  position: relative;
  text-align: center;
  padding: 1.85rem 1.35rem 1.55rem;
  border-radius: var(--radius);
  border: 1px solid var(--gold-dim);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent 42%),
    var(--bg-elevated);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 28px 70px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(212, 175, 90, 0.18), transparent 70%);
  pointer-events: none;
}

.logo-wrap {
  position: relative;
  width: min(68%, 230px);
  margin: 0 auto 0.35rem;
  display: grid;
  place-items: center;
}

.logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

.name {
  margin: 0;
  font-size: clamp(1.55rem, 4.5vw, 2.15rem);
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.title {
  margin: 0.55rem 0 0;
  font-size: clamp(0.92rem, 2.8vw, 1.05rem);
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.7;
}

.divider {
  display: block;
  width: 72px;
  height: 2px;
  margin: 0.85rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  box-shadow: 0 0 18px rgba(240, 215, 138, 0.45);
}

.brands {
  --enter-delay: 140ms;
  position: relative;
  border-radius: 1.35rem;
  border: 1px solid var(--gold-dim);
  background: rgba(8, 7, 6, 0.7);
  backdrop-filter: blur(12px);
  padding: 1rem 0.9rem;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.brands-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  align-items: center;
  justify-items: center;
  gap: 1rem 0.55rem;
  padding: 0.15rem 0.05rem;
}

.brand-item {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 7.6rem;
  height: 4.55rem;
  padding: 0.15rem 0.2rem;
  border-radius: 0.7rem;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s ease, opacity 0.25s ease;
}

.brand-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.brand-item:not(.is-static):hover {
  transform: translateY(-2px) scale(1.08);
  background: rgba(255, 255, 255, 0.06);
}

.brand-item.is-static {
  opacity: 0.85;
  cursor: default;
}

.actions {
  --enter-delay: 280ms;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
}

.action-icon {
  --delay: 0ms;
  position: relative;
  display: grid;
  place-items: center;
  width: 5.15rem;
  height: 5.15rem;
  border: 1px solid var(--gold-dim);
  border-radius: 1.25rem;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 45%),
    var(--bg-elevated);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 14px 32px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.32s var(--ease),
    box-shadow 0.32s var(--ease),
    background 0.32s ease,
    border-color 0.32s ease;
}

.action-icon::after {
  content: "";
  position: absolute;
  width: 160%;
  height: 160%;
  top: var(--spot-y, 50%);
  left: var(--spot-x, 50%);
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(212, 175, 90, 0.28) 0%,
    rgba(255, 255, 255, 0.06) 35%,
    transparent 65%
  );
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.35s ease, transform 0.45s var(--ease);
  pointer-events: none;
}

.action-icon img {
  position: relative;
  z-index: 1;
  width: 2.55rem;
  height: 2.55rem;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s var(--ease);
}

.action-icon:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: rgba(212, 175, 90, 0.7);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.12), transparent 45%),
    rgba(28, 24, 18, 0.85);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 22px rgba(212, 175, 90, 0.2),
    0 18px 40px rgba(0, 0, 0, 0.5);
}

.action-icon:hover::after {
  opacity: 1;
  transform: scale(1);
}

.action-icon:hover img {
  transform: scale(1.08);
}

.action-icon:active {
  transform: translateY(-1px) scale(0.98);
}

@media (min-width: 900px) {
  :root {
    --max: 480px;
  }

  .page {
    padding:
      max(2rem, var(--safe-t))
      max(1.5rem, var(--safe-r))
      max(2rem, var(--safe-b))
      max(1.5rem, var(--safe-l));
  }

  .shell {
    gap: 1.15rem;
    padding-top: clamp(0.5rem, 3vh, 1.5rem);
  }

  .hero {
    padding: 1.75rem 1.75rem 1.5rem;
    flex-shrink: 1;
    min-height: 0;
  }

  .logo-wrap {
    width: min(62%, 220px);
  }

  .brands {
    padding: 1.15rem 1.05rem;
  }

  .brands-track {
    gap: 1.1rem 0.75rem;
  }

  .brand-item {
    height: 5.1rem;
    max-width: 8.4rem;
  }

  .action-icon {
    width: 5.55rem;
    height: 5.55rem;
  }

  .action-icon img {
    width: 2.75rem;
    height: 2.75rem;
  }
}

/* موبایل: فشرده‌سازی برای ارتفاع کم */
@media (max-width: 899px) {
  .page {
    padding:
      max(0.75rem, var(--safe-t))
      max(0.85rem, var(--safe-r))
      max(0.75rem, var(--safe-b))
      max(0.85rem, var(--safe-l));
  }

  .shell {
    gap: clamp(0.65rem, 1.5vh, 1rem);
    padding-top: max(0.25rem, var(--safe-t));
  }

  .hero {
    padding: clamp(0.75rem, 1.8vh, 1.25rem) 1rem clamp(0.65rem, 1.5vh, 1.05rem);
    flex-shrink: 1;
    min-height: 0;
  }

  .logo-wrap {
    width: min(54%, 180px);
    margin-bottom: clamp(0.35rem, 1vh, 0.85rem);
  }

  .name {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  }

  .title {
    margin-top: 0.35rem;
    font-size: clamp(0.82rem, 3.2vw, 0.98rem);
    line-height: 1.55;
  }

  .divider {
    margin-top: clamp(0.4rem, 1.1vh, 0.8rem);
  }

  .brands {
    padding: 0.85rem 0.75rem;
    flex-shrink: 0;
  }

  .brands-track {
    gap: 0.8rem 0.4rem;
  }

  .brand-item {
    height: 4.05rem;
    max-width: 6.6rem;
  }

  .actions {
    gap: clamp(0.9rem, 2.4vw, 1.25rem);
    flex-shrink: 0;
  }

  .action-icon {
    width: clamp(4.4rem, 13vw, 5.15rem);
    height: clamp(4.4rem, 13vw, 5.15rem);
  }

  .action-icon img {
    width: clamp(2.1rem, 6vw, 2.55rem);
    height: clamp(2.1rem, 6vw, 2.55rem);
  }
}

@media (max-width: 899px) and (max-height: 740px) {
  .divider {
    margin-top: 0.45rem;
  }
}

@media (max-width: 899px) and (max-height: 640px) {
  .hero {
    padding: 0.7rem 0.85rem 0.65rem;
  }

  .logo-wrap {
    width: min(42%, 140px);
    margin-bottom: 0.4rem;
  }

  .brands {
    padding: 0.65rem 0.6rem;
  }

  .brand-item {
    height: 3.35rem;
  }

  .action-icon {
    width: 4.2rem;
    height: 4.2rem;
  }

  .action-icon img {
    width: 2rem;
    height: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero,
  .brands,
  .actions {
    opacity: 1;
    transform: none;
  }
}

@keyframes section-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
