:root {
  --md-sys-color-primary: #5b7cff;
  --md-sys-color-primary-container: #dfe7ff;
  --md-sys-color-secondary: #ff8da1;
  --md-sys-color-surface: #f5f7ff;
  --md-sys-color-surface-strong: #ffffff;
  --md-sys-color-on-surface: #1f2433;
  --md-sys-color-on-surface-variant: #5b6478;
  --md-sys-color-outline: rgba(115, 124, 148, 0.2);
  --md-sys-color-shadow: rgba(31, 36, 51, 0.12);
  --md-sys-color-success: #1eae78;
  --md-sys-color-error: #d94d6a;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-7: 56px;
  --space-8: 64px;

  --radius-1: 8px;
  --radius-2: 16px;
  --radius-3: 24px;
  --radius-4: 32px;
  --radius-5: 40px;

  --container-width: 1200px;
  --shadow-soft: 0 20px 60px rgba(53, 69, 106, 0.15);
  font-family: Vazirmatn;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Vazirmatn', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(91, 124, 255, 0.15), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255, 141, 161, 0.18), transparent 30%),
    var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page-shell {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 24px 24px 80px;
}

.section-shell {
  margin-top: var(--space-8);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 8px;
  position: sticky;
  top: 8px;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(245, 247, 255, 0.78);
  border: 1px solid rgba(126, 138, 169, 0.18);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(31, 36, 51, 0.06);
}

.brand-wrap,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
  color: white;
  font-weight: 800;
  box-shadow: 0 16px 32px rgba(91, 124, 255, 0.35);
}

.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--md-sys-color-on-surface);
}

.nav-cta,
.primary-button,
.secondary-button {
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.nav-cta,
.primary-button {
  background: linear-gradient(135deg, var(--md-sys-color-primary), #7a89ff 55%, var(--md-sys-color-secondary));
  color: white;
  border-radius: 999px;
  padding: 12px 22px;
  box-shadow: 0 18px 36px rgba(91, 124, 255, 0.28);
  font-weight: 700;
}

.primary-button.large {
  padding: 16px 28px;
  min-width: 220px;
}

.nav-cta:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--md-sys-color-outline);
  padding: 14px 22px;
  border-radius: 999px;
  color: var(--md-sys-color-on-surface);
  font-weight: 600;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  padding: 40px 8px 8px;
}

.eyebrow,
.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  background: rgba(91, 124, 255, 0.08);
  border: 1px solid rgba(91, 124, 255, 0.16);
  border-radius: 999px;
  padding: 8px 14px;
  width: fit-content;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
  display: inline-block;
}

.hero-copy h1 {
  margin: 20px 0 20px;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 1.1;
  letter-spacing: -0.06em;
}

.hero-copy p {
  font-size: 1.1rem;
  line-height: 2;
  color: var(--md-sys-color-on-surface-variant);
  max-width: 620px;
  margin-bottom: 32px;
}

.cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.download-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.free-ribbon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f7d06b, #ff9a7a 55%, #ff7aa2);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 18px 32px rgba(255, 122, 162, 0.28);
  white-space: nowrap;
}

.free-ribbon::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 18px;
  height: 18px;
  background: inherit;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 5px;
  z-index: -1;
}

.hero-stats {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 16px;
}

.hero-stats li {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(122, 137, 255, 0.12);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: 0 18px 40px rgba(31, 36, 51, 0.04);
}

.hero-stats strong {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.hero-stats span {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 620px;
}

.phone-frame {
  width: min(440px, 90%);
  border-radius: 42px;
  padding: 18px;
  background: linear-gradient(160deg, rgba(24, 28, 54, 0.96), rgba(38, 46, 79, 0.94));
  box-shadow: 0 32px 80px rgba(31, 36, 51, 0.24);
  transform: rotate(8deg);
}

.phone-screen {
  background: linear-gradient(180deg, #f7f8ff, #eef2ff);
  border-radius: 32px;
  padding: 18px 14px 14px;
  min-height: 560px;
  overflow: hidden;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.user-pill,
.status-badge {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.user-pill {
  background: rgba(91, 124, 255, 0.12);
  color: var(--md-sys-color-primary);
}

.status-badge {
  background: linear-gradient(135deg, #f8d27d, #ffb29e);
  color: #4a2d14;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
}

.portrait {
  min-height: 180px;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.portrait-one {
  background-image: url('1.png');
}

.portrait-two {
  background-image: url('2.png');
}

.portrait-three {
  background-image: url('3.png');
}

.portrait-four {
  background-image: url('4.png');
}

.mini-card {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  box-shadow: 0 18px 40px rgba(46, 56, 77, 0.08);
}

.mini-card p {
  margin: 0 0 4px;
  color: var(--md-sys-color-on-surface-variant);
}

.mini-card strong {
  font-size: 1.05rem;
}

.mini-card span {
  min-width: 56px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(120, 187, 100, 0.12);
  color: var(--md-sys-color-success);
  font-weight: 700;
}

.floating-card {
  position: absolute;
  border-radius: 16px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(91, 124, 255, 0.14);
  box-shadow: 0 18px 40px rgba(31, 36, 51, 0.08);
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
}

.card-one {
  left: 4%;
  top: 12%;
}

.card-two {
  right: 0%;
  bottom: 18%;
}

.brand-strip {
  margin-top: 48px;
  padding: 12px 0;
}

.brand-strip-inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(126, 138, 169, 0.14);
  border-radius: 24px;
  color: rgba(31, 36, 51, 0.72);
  font-weight: 700;
  text-align: center;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin-top: 14px;
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.feature-grid,
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.feature-card,
.design-card,
.mini-panel {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(126, 138, 169, 0.12);
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(31, 36, 51, 0.04);
}

.feature-card {
  padding: 24px 20px 28px;
}

.icon-box {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  margin-bottom: 18px;
  font-size: 1.6rem;
  color: white;
}

.gradient-blue {
  background: linear-gradient(135deg, #5b7cff, #7bb1ff);
}

.gradient-peach {
  background: linear-gradient(135deg, #ffb396, #ff8da1);
}

.gradient-violet {
  background: linear-gradient(135deg, #8e7dff, #b38fff);
}

.feature-card h3 {
  margin: 0 0 12px;
  font-size: 1.4rem;
}

.feature-card p,
.design-card p,
.story-copy p,
.mini-panel p {
  color: var(--md-sys-color-on-surface-variant);
  line-height: 2;
  margin: 0;
}

.design-card {
  overflow: hidden;
}

.card-visual {
  height: 280px;
  background-size: cover;
  background-position: center;
}

.visual-1 {
  background-image: url('5.png');
}

.visual-2 {
  background-image: url('6.jpg');
}

.visual-3 {
  background-image: url('7.png');
}

.card-body {
  padding: 20px 20px 24px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--md-sys-color-primary);
  font-weight: 700;
  margin-bottom: 16px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.story-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.story-copy h2 {
  margin: 14px 0 16px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.3;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 16px;
  color: var(--md-sys-color-on-surface);
  font-weight: 600;
}

.check-list li {
  position: relative;
  padding-right: 28px;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--md-sys-color-success);
}

.story-panels {
  display: grid;
  gap: 24px;
}

.mini-panel {
  padding: 22px;
}

.panel-main {
  min-height: 340px;
}

.panel-tag {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(91, 124, 255, 0.08);
  color: var(--md-sys-color-primary);
  font-weight: 700;
}

.panel-main h3 {
  margin: 18px 0 20px;
  font-size: 1.8rem;
}

.panel-visual {
  height: 210px;
  border-radius: 24px;
  background-size: cover;
  background-position: center;
}

.panel-visual-a {
  background-image: url('8.png');
}

.rating {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.8rem;
  margin: 12px 0 16px;
}

.rating span {
  color: #f8b84d;
}

.cta-section {
  margin-bottom: 48px;
}

.cta-card {
  background: linear-gradient(135deg, rgba(91, 124, 255, 0.12), rgba(255, 141, 161, 0.14));
  border: 1px solid rgba(91, 124, 255, 0.14);
  border-radius: 32px;
  padding: 28px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.cta-card h2 {
  margin: 10px 0 0;
  max-width: 660px;
  font-size: clamp(1.8rem, 2.5vw, 3rem);
  line-height: 1.4;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 8px 8px;
  border-top: 1px solid rgba(126, 138, 169, 0.16);
  color: var(--md-sys-color-on-surface-variant);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  min-width: 260px;
  max-width: 420px;
  background: rgba(31, 36, 51, 0.92);
  color: white;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 18px 40px rgba(31, 36, 51, 0.24);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 90;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: rgba(217, 77, 106, 0.96);
}

.toast.success {
  background: rgba(30, 174, 120, 0.96);
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero,
  .story-section,
  .feature-grid,
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 520px;
  }

  .main-nav {
    display: none;
  }

  .cta-card,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding-inline: 16px;
  }

  .topbar {
    padding: 14px 16px;
    border-radius: 28px;
  }

  .nav-cta,
  .primary-button,
  .secondary-button {
    width: 100%;
    justify-content: center;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-strip-inner,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .phone-frame {
    transform: none;
  }
}
