@font-face {
  font-family: "Vazir";
  src: url("./Vazir-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-base: #f8faf6;
  --bg-sage-wash: #edf5ee;
  --bg-warm-wash: #fcf6ef;

  --surface-shell: rgba(255, 255, 255, 0.90);
  --surface-card: #ffffff;
  --surface-soft: #f5f9f5;

  --text-primary: #1f2b23;
  --text-secondary: #536358;
  --text-muted: #7b8a80;

  --brand-green: #247b43;
  --brand-green-hover: #1d6637;
  --brand-green-soft: rgba(36, 123, 67, 0.09);

  --telegram-blue: #2794c4;
  --telegram-blue-hover: #1f7fa9;
  --telegram-soft: rgba(39, 148, 196, 0.10);

  --rubika-accent: #d96b27;
  --rubika-accent-hover: #bf5a1c;
  --rubika-soft: rgba(217, 107, 39, 0.10);

  --border-hairline: rgba(36, 123, 67, 0.13);
  --border-subtle: rgba(31, 43, 35, 0.08);

  --shadow-shell:
    0 22px 54px -22px rgba(29, 58, 39, 0.13),
    0 4px 18px -6px rgba(29, 58, 39, 0.06);
  --shadow-card:
    0 10px 26px -14px rgba(29, 58, 39, 0.15),
    0 1px 4px rgba(29, 58, 39, 0.04);

  --radius-shell: 28px;
  --radius-card: 22px;
  --radius-btn: 14px;
  --radius-pill: 999px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 15% 10%, var(--bg-sage-wash) 0%, transparent 48%),
    radial-gradient(circle at 85% 90%, var(--bg-warm-wash) 0%, transparent 50%),
    var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 38px) clamp(12px, 3.5vw, 24px);
  overflow-x: hidden;
  position: relative;
}

/* پس‌زمینه لطیف */
.ambient-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.48;
}

.orb-sage {
  width: 320px;
  height: 320px;
  top: -110px;
  right: -80px;
  background: rgba(138, 204, 154, 0.34);
}

.orb-warm {
  width: 290px;
  height: 290px;
  bottom: -100px;
  left: -80px;
  background: rgba(244, 189, 146, 0.28);
}

.botanical-flourish {
  position: absolute;
  width: clamp(130px, 24vw, 210px);
  height: auto;
  color: rgba(36, 123, 67, 0.12);
}

.flourish-top {
  top: 0;
  right: 0;
}

.flourish-bottom {
  bottom: 0;
  left: 0;
}

/* ساختار اصلی وسط‌چین */
.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.gateway-shell {
  width: 100%;
  background: #ffffff;
  background: var(--surface-shell);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-shell);
  padding: clamp(24px, 5vw, 40px) clamp(16px, 4.5vw, 36px);
  text-align: center;
}

/* بخش اول: سربرگ */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo-frame {
  position: relative;
  width: 98px;
  height: 98px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(36, 123, 67, 0.22);
  background: linear-gradient(135deg, rgba(36, 123, 67, 0.06), rgba(217, 107, 39, 0.06));
}

.brand-logo {
  position: relative;
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 8px 22px -10px rgba(29, 58, 39, 0.20);
}

.institute-name {
  margin: 0 0 8px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-green-soft);
  color: var(--brand-green);
  font-size: 0.80rem;
  line-height: 1.5;
}

.brand-title {
  margin: 0 0 6px;
  font-size: clamp(1.38rem, 4.2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
}

.brand-slogan {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* بخش دوم: معرفی کوتاه */
.intro-section {
  margin: 18px auto 24px;
  max-width: 58ch;
  text-align: center;
}

.intro-text {
  margin: 0 0 8px;
  font-size: 0.94rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.intro-prompt {
  margin: 0;
  font-size: 0.92rem;
  color: var(--brand-green);
}

/* بخش سوم: دو کارت فروشگاه */
.stores-section {
  width: 100%;
}

.stores-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

@media (min-width: 660px) {
  .stores-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

.store-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.store-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 32px -16px rgba(29, 58, 39, 0.18),
    0 2px 6px rgba(29, 58, 39, 0.05);
}

.store-telegram:hover {
  border-color: rgba(39, 148, 196, 0.35);
}

.store-rubika:hover {
  border-color: rgba(217, 107, 39, 0.35);
}

.store-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.store-telegram .store-icon-wrap {
  background: var(--telegram-soft);
}

.store-rubika .store-icon-wrap {
  background: var(--rubika-soft);
}

.store-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.store-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
}

.store-desc {
  margin: 0 0 18px;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--text-secondary);
  flex: 1;
}

.store-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.store-cta {
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  border-radius: var(--radius-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: #ffffff;
  transition: background-color 180ms ease, transform 160ms ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.store-cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.store-cta:active {
  transform: scale(0.98);
}

.cta-telegram {
  background: var(--telegram-blue);
}

.cta-telegram:hover {
  background: var(--telegram-blue-hover);
}

.cta-rubika {
  background: var(--rubika-accent);
}

.cta-rubika:hover {
  background: var(--rubika-accent-hover);
}

.copy-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.80rem;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
  touch-action: manipulation;
}

.copy-link-btn svg {
  width: 15px;
  height: 15px;
}

.copy-link-btn:hover {
  color: var(--brand-green);
  background: var(--brand-green-soft);
}

.copy-link-btn.is-copied {
  color: var(--brand-green);
  background: var(--brand-green-soft);
  border-color: rgba(36, 123, 67, 0.24);
}

/* جداکننده */
.soft-divider {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 26px 0 22px;
}

.divider-line {
  flex: 1;
  max-width: 110px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(36, 123, 67, 0.22), transparent);
}

.divider-leaf {
  width: 18px;
  height: 18px;
  color: rgba(36, 123, 67, 0.50);
  flex-shrink: 0;
}

/* بخش چهارم: معرفی کوتاه محصولات دیجیتال */
.products-overview {
  text-align: center;
  margin-bottom: 24px;
}

.section-heading {
  margin: 0 0 8px;
  font-size: 1.06rem;
  font-weight: 500;
  color: var(--text-primary);
}

.section-text {
  margin: 0 auto 18px;
  max-width: 56ch;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 540px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.pillar-item {
  background: var(--surface-soft);
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

@media (max-width: 480px) {
  .pillar-item {
    flex-direction: row;
    padding: 10px 14px;
  }
}

.pillar-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #ffffff;
  color: var(--brand-green);
  border: 1px solid var(--border-hairline);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.pillar-icon svg {
  width: 18px;
  height: 18px;
}

.pillar-title {
  font-size: 0.84rem;
  color: var(--text-primary);
}

/* بخش پنجم: پاورقی و اطلاعات مؤسسه */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.owner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.owner-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.owner-label {
  color: var(--text-muted);
}

.owner-value {
  color: var(--text-primary);
}

.license-badge {
  margin: 4px 0 0;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: var(--brand-green-soft);
  color: var(--brand-green);
  font-size: 0.78rem;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.footer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: #ffffff;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
  touch-action: manipulation;
}

.footer-pill svg {
  width: 15px;
  height: 15px;
}

.footer-pill:hover {
  color: var(--brand-green);
  border-color: rgba(36, 123, 67, 0.30);
  background: var(--surface-soft);
}

/* فوکوس دسترس‌پذیر */
.store-cta:focus-visible,
.copy-link-btn:focus-visible,
.footer-pill:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 3px;
}

/* اعلان توست */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 14px);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: #203025;
  color: #f7faf7;
  font-size: 0.84rem;
  box-shadow: 0 12px 28px -10px rgba(17, 29, 21, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 200ms ease, transform 200ms ease;
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .store-card,
  .store-cta,
  .copy-link-btn,
  .footer-pill,
  .toast {
    transition: none;
  }
}
