:root {
  --bg: #0b0c0a;
  --card-ink: #f5f1ea;
  --muted: #a8a29a;
  --accent: #e08a3e;
  --border: rgba(245, 241, 234, 0.08);
  --photo-size: min(60vw, 260px);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Vazirmatn", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--card-ink);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("../assets/bg-fire.jpg");
  background-position: center 115%;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.08;
  pointer-events: none;
}

/* fully hides the top quarter of the page, then smoothly fades out so the
   photo covers the rest of the background — a real solid-color gradient
   paint, not mask-image alpha trickery, which didn't render predictably.
   A noise texture is layered in because an 8-bit gradient over such a large,
   low-contrast area shows visible banding lines otherwise. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxmaWx0ZXIgaWQ9J24nPjxmZVR1cmJ1bGVuY2UgdHlwZT0nZnJhY3RhbE5vaXNlJyBiYXNlRnJlcXVlbmN5PScwLjg1JyBudW1PY3RhdmVzPScyJyBzdGl0Y2hUaWxlcz0nc3RpdGNoJy8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9JzEwMCUnIGhlaWdodD0nMTAwJScgZmlsdGVyPSd1cmwoI24pJyBvcGFjaXR5PScwLjEyJy8+PC9zdmc+"),
    linear-gradient(to bottom, var(--bg) 0%, var(--bg) 25%, transparent 60%);
  background-size: 180px 180px, auto;
  background-blend-mode: overlay, normal;
  pointer-events: none;
}

.app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 8px;
}

.brand {
  font-family: "Lalezar", "Vazirmatn", sans-serif;
  font-weight: 400;
  font-size: 34px;
  color: var(--accent);
  letter-spacing: 1px;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 6px 16px 18px;
  flex-shrink: 0;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 4px 2px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-btn.active {
  color: var(--card-ink);
  border-color: var(--accent);
}

.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 8px;
}

.contact-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 16px calc(14px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--card-ink);
  text-decoration: none;
  border: 1px solid var(--border);
  background: rgba(245, 241, 234, 0.06);
  padding: 6px 14px;
  border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.frame {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.glow {
  position: absolute;
  inset: -20% -15% 0 -15%;
  background: radial-gradient(circle closest-side at var(--glow-x, 50%) 30%, var(--accent) 0%, transparent 70%);
  opacity: 0.22;
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

.embla {
  width: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.embla__viewport {
  overflow: hidden;
}

.embla__container {
  display: flex;
}

.embla__slide {
  flex: 0 0 76%;
  min-width: 0;
  padding: 0 6px;
  overflow: hidden;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transform-origin: 50% 30%;
  transition: transform 0.1s linear, opacity 0.1s linear;
}

.card-photo {
  width: var(--photo-size);
  height: var(--photo-size);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.5s ease, transform 0.5s ease;
  cursor: pointer;
}

.card-photo.is-loaded {
  opacity: 1;
  transform: scale(1);
}

.card-badge {
  align-self: center;
  font-size: 13px;
  font-weight: 700;
  color: #1a1305;
  background: var(--accent);
  padding: 4px 12px;
  border-radius: 999px;
}

.card-features {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  align-self: center;
}

.card-features span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--card-ink);
}

.card-name {
  margin: 4px 0 0;
  font-size: 23px;
  font-weight: 800;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 280px;
}

.card-price {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.dots {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  margin-top: 18px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

.nav-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(245, 241, 234, 0.06);
  color: var(--card-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: opacity 0.2s ease;
}

.nav-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

.nav-arrow--prev {
  right: 4px;
}

.nav-arrow--next {
  left: 4px;
}

@media (max-width: 480px) {
  :root {
    --photo-size: min(58vw, 235px);
  }

  .embla__slide {
    flex-basis: 82%;
  }

  .card-name {
    font-size: 21px;
  }

  .nav-arrow {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
}

@media (min-width: 860px) {
  :root {
    --photo-size: min(19vw, 340px);
  }

  .glow {
    background: radial-gradient(circle closest-side at var(--glow-x, 50%) 30%, var(--accent) 0%, var(--accent) 6%, transparent 55%);
    opacity: 0.13;
    filter: blur(55px);
  }

  .topbar {
    padding-top: 36px;
  }

  .brand {
    font-size: 46px;
  }

  .tabs {
    gap: 40px;
    padding: 12px 16px 32px;
  }

  .tab-btn {
    font-size: 20px;
  }

  .frame {
    max-width: 1200px;
  }

  .embla__slide {
    flex-basis: 30%;
  }

  .card-name {
    font-size: 29px;
  }

  .card-desc {
    font-size: 17px;
    max-width: 340px;
  }

  .card-price {
    font-size: 21px;
  }

  .nav-arrow {
    width: 52px;
    height: 52px;
    font-size: 28px;
  }

  .nav-arrow--prev {
    right: -12px;
  }

  .nav-arrow--next {
    left: -12px;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 4, 2, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  opacity: 0;
  transform: scale(0.92);
  transition: transform 0.35s ease, opacity 0.25s ease;
}

.lightbox.is-open .lightbox-img.is-ready {
  opacity: 1;
  transform: scale(1);
}

.lightbox-close {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(245, 241, 234, 0.1);
  color: var(--card-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 51;
}

.lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(245, 241, 234, 0.1);
  color: var(--card-ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 51;
  transition: opacity 0.2s ease;
}

.lightbox-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

.lightbox-arrow--prev {
  right: calc(16px + env(safe-area-inset-right, 0px));
}

.lightbox-arrow--next {
  left: calc(16px + env(safe-area-inset-left, 0px));
}
