:root {
  --green: #b8f000;
  --green-deep: #7aab00;
  --ink: #10140a;
  --glass: rgba(255, 255, 255, 0.22);
  --glass-strong: rgba(255, 255, 255, 0.38);
  --glass-border: rgba(255, 255, 255, 0.55);
  --panel: #0c1008;
  --shadow: 0 18px 50px rgba(16, 20, 10, 0.18);
  --radius: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-fa: "Vazirmatn", Tahoma, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-fa);
  color: var(--ink);
  background: #0c1008;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  animation: hero-drift 18s var(--ease) infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, transparent 35%, rgba(16, 20, 10, 0.18) 100%),
    linear-gradient(180deg, rgba(184, 240, 0, 0.05), rgba(16, 20, 10, 0.14));
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(980px, calc(100% - 2rem));
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: rise 1s var(--ease) both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: clamp(0.75rem, 2vw, 1.15rem);
  width: 100%;
}

.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 clamp(11rem, 28vw, 16rem);
  min-height: clamp(3.6rem, 6.5vw, 5rem);
  padding: clamp(0.95rem, 2vw, 1.35rem) clamp(1.4rem, 3vw, 2.4rem);
  border-radius: var(--radius);
  border: 1.5px solid var(--glass-border);
  background: linear-gradient(145deg, var(--glass-strong), var(--glass));
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 12px 34px rgba(16, 20, 10, 0.14);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    transform 0.35s var(--ease),
    background 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.glass-btn:hover,
.glass-btn:focus-visible {
  transform: translateY(-3px) scale(1.02);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.28));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 16px 36px rgba(16, 20, 10, 0.16);
  outline: none;
}

.glass-btn:active {
  transform: translateY(-1px) scale(0.99);
}

.glass-btn--ghost {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
}

.glass-btn--solid {
  background: linear-gradient(145deg, rgba(16, 20, 10, 0.88), rgba(16, 20, 10, 0.72));
  color: #f4ffe0;
  border-color: rgba(16, 20, 10, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 28px rgba(16, 20, 10, 0.22);
}

.glass-btn--solid:hover,
.glass-btn--solid:focus-visible {
  background: linear-gradient(145deg, rgba(16, 20, 10, 0.95), rgba(16, 20, 10, 0.8));
  color: #fff;
}

/* —— Fullscreen 3D deck —— */
.deck[hidden] {
  display: none;
}

.deck {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: #070a05;
  color: #f2f7e8;
  overflow: hidden;
  animation: deck-in 0.55s var(--ease) both;
}

.deck.is-closing {
  animation: deck-out 0.35s var(--ease) both;
}

.deck__glow {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 50% 20%, rgba(184, 240, 0, 0.18), transparent 42%),
    radial-gradient(circle at 80% 80%, rgba(122, 171, 0, 0.12), transparent 35%),
    radial-gradient(circle at 15% 70%, rgba(255, 255, 255, 0.04), transparent 40%);
  pointer-events: none;
}

.deck__bar {
  position: absolute;
  z-index: 5;
  top: 0;
  inset-inline: 0;
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, rgba(7, 10, 5, 0.75), transparent);
}

.deck__icon-btn {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 1.4rem;
  line-height: 1;
  transition: background 0.25s ease, transform 0.25s var(--ease);
}

.deck__icon-btn:hover,
.deck__icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
  outline: none;
}

.deck__counter {
  justify-self: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.deck__hint {
  font-size: 0.82rem;
  opacity: 0.55;
}

.deck__viewport {
  position: relative;
  z-index: 2;
  width: min(1120px, 100%);
  height: min(78svh, 760px);
  perspective: 1600px;
  perspective-origin: 50% 50%;
  touch-action: none;
}

.deck__scene {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.deck__card {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(92%, 980px);
  height: min(100%, 680px);
  border-radius: 1.35rem;
  overflow: hidden;
  background: #111;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transform-style: preserve-3d;
  transition:
    transform 0.7s var(--ease),
    opacity 0.55s var(--ease),
    filter 0.55s ease;
  will-change: transform, opacity, filter;
  cursor: grab;
}

.deck__card:active {
  cursor: grabbing;
}

.deck__card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0f140b;
  user-select: none;
  pointer-events: none;
}

.deck__card.is-active {
  z-index: 10;
}

.deck__card.is-far {
  pointer-events: none;
}

.deck__nav {
  position: absolute;
  z-index: 5;
  top: 50%;
  translate: 0 -50%;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 1.75rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--ease), background 0.25s ease, opacity 0.25s ease;
}

.deck__nav:hover,
.deck__nav:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.07);
  outline: none;
}

.deck__nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  transform: none;
}

.deck__nav--prev {
  right: max(0.75rem, calc(50% - 580px));
}

.deck__nav--next {
  left: max(0.75rem, calc(50% - 580px));
}

.deck__progress {
  position: absolute;
  z-index: 5;
  bottom: 1.25rem;
  left: 50%;
  translate: -50% 0;
  width: min(280px, 55vw);
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.deck__progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-deep), var(--green));
  transition: width 0.45s var(--ease);
}

body.deck-open,
body.modal-open {
  overflow: hidden;
}

/* —— Modal —— */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 6, 0.45);
  backdrop-filter: blur(6px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  border-radius: 1.4rem;
  padding: 1.75rem 1.5rem 1.5rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(243, 246, 236, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  color: #1a2210;
  animation: rise 0.45s var(--ease) both;
}

.modal__close {
  position: absolute;
  top: 0.7rem;
  left: 0.85rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  background: rgba(16, 20, 10, 0.06);
}

.modal__panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
}

.modal__lead {
  margin: 0 0 1.25rem;
  color: rgba(26, 34, 16, 0.68);
  font-size: 0.95rem;
  line-height: 1.7;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.contact-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  background: rgba(184, 240, 0, 0.14);
  border: 1px solid rgba(122, 171, 0, 0.18);
  font-size: 0.92rem;
}

.contact-list span:first-child {
  color: rgba(26, 34, 16, 0.55);
  font-weight: 500;
}

.contact-list a {
  font-weight: 600;
  direction: ltr;
}

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

@keyframes hero-drift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.06) translate3d(0, -1.2%, 0);
  }
}

@keyframes deck-in {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes deck-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.03);
  }
}

@media (max-width: 900px) {
  .hero__actions {
    gap: 0.85rem;
  }

  .glass-btn {
    flex: 1 1 calc(50% - 0.5rem);
    white-space: normal;
    text-align: center;
  }

  .glass-btn--solid {
    flex: 1 1 100%;
  }
}

@media (max-width: 560px) {
  .hero__content {
    width: calc(100% - 1.5rem);
  }

  .hero__actions {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }

  .glass-btn {
    flex: none;
    width: 100%;
    min-height: 3.85rem;
    font-size: 1.12rem;
    padding: 1.05rem 1.35rem;
  }

  .deck__viewport {
    height: min(72svh, 640px);
    width: 100%;
  }

  .deck__card {
    width: calc(100% - 1.5rem);
    height: 100%;
    border-radius: 1rem;
  }

  .deck__nav {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 1.45rem;
  }

  .deck__nav--prev {
    right: 0.4rem;
  }

  .deck__nav--next {
    left: 0.4rem;
  }

  .deck__hint {
    display: none;
  }

  .deck__bar {
    grid-template-columns: 2.6rem 1fr;
  }
}

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