:root {
  --primary: #f2a115;
  --primary-hover: #d78b09;
  --secondary: #32a1ce;

  --background: #ffffff;
  --surface: #f5f6f8;
  --surface-elevated: #ffffff;

  --text-primary: #1e2024;
  --text-secondary: #636873;

  --border: #e5e7eb;

  --header-background: rgba(255, 255, 255, 0.86);

  --shadow-sm: 0 5px 18px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 20px 50px rgba(0, 0, 0, 0.12);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;

  --transition: 180ms ease;
}

html[data-theme="dark"] {
  --background: #111315;
  --surface: #191b1f;
  --surface-elevated: #22252a;

  --text-primary: #f4f5f7;
  --text-secondary: #b3b7c0;

  --border: #343840;

  --header-background: rgba(17, 19, 21, 0.86);

  --shadow-sm: 0 5px 18px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  min-width: 320px;

  background: var(--background);
  color: var(--text-primary);

  font-family: "Montserrat", sans-serif;

  transition:
    background var(--transition),
    color var(--transition);
}

html[dir="rtl"] body {
  font-family: "Vazirmatn", sans-serif;
}

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

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

button {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 110px 0;
}

.section--compact {
  padding-top: 70px;
  padding-bottom: 110px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;

  border-bottom: 1px solid var(--border);

  background: var(--header-background);

  backdrop-filter: blur(18px);
}

.navbar {
  min-height: 74px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;

  gap: 10px;

  flex-shrink: 0;
}

.brand__logo {
  width: 34px;
  height: 34px;

  object-fit: contain;
}

.brand__name {
  font-size: 1.45rem;
  font-weight: 800;
}

.brand__free {
  color: var(--primary);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.desktop-nav a {
  color: var(--text-secondary);

  font-size: 0.9rem;
  font-weight: 600;

  transition: color var(--transition);
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.menu-button {
  width: 42px;
  height: 42px;

  border: 1px solid var(--border);
  border-radius: var(--radius-sm);

  background: var(--surface-elevated);
  color: var(--text-primary);

  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition:
    transform var(--transition),
    border-color var(--transition);
}

.icon-button:hover,
.menu-button:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

#language-label {
  font-size: 0.82rem;
  font-weight: 800;
}

.theme-icon {
  font-size: 1.2rem;
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.menu-button span {
  width: 18px;
  height: 2px;

  border-radius: 99px;

  background: currentColor;
}

/* Mobile navigation */

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 199;

  opacity: 0;
  visibility: hidden;

  background: rgba(0, 0, 0, 0.5);

  transition:
    opacity var(--transition),
    visibility var(--transition);
}

.mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;

  z-index: 200;

  width: min(340px, 86vw);

  padding: 22px;

  background: var(--surface-elevated);

  transform: translateX(110%);

  box-shadow: var(--shadow-md);

  transition: transform 240ms ease;
}

html[dir="rtl"] .mobile-menu {
  right: auto;
  left: 0;

  transform: translateX(-110%);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding-bottom: 20px;

  border-bottom: 1px solid var(--border);
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
}

.mobile-menu nav a {
  padding: 18px 0;

  border-bottom: 1px solid var(--border);

  font-weight: 700;
}

/* Hero */

.hero {
  min-height: calc(100vh - 74px);

  display: flex;
  align-items: center;

  overflow: hidden;
}

.hero__container {
  display: grid;

  grid-template-columns:
    minmax(0, 1.1fr)
    minmax(320px, 0.9fr);

  align-items: center;

  gap: clamp(50px, 8vw, 120px);

  padding: clamp(65px, 8vw, 110px) 0;
}

.hero__content {
  max-width: 670px;
}

.eyebrow,
.section-kicker {
  margin: 0;

  color: var(--primary);

  font-size: 0.75rem;
  font-weight: 800;

  letter-spacing: 0.14em;
}

.hero h1 {
  margin: 14px 0 18px;

  font-size: clamp(2.6rem, 5.4vw, 4.9rem);

  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero__subtitle {
  margin: 0;

  color: var(--primary);

  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 700;
}

.hero__description {
  max-width: 600px;

  margin: 25px 0 0;

  color: var(--text-secondary);

  line-height: 1.8;
}

.download-area {
  margin-top: clamp(45px, 7vw, 80px);
}

.download-area__label {
  margin: 0 0 14px;

  font-size: 0.86rem;
  font-weight: 700;
}

.download-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.download-badges a,
.footer-downloads a {
  display: inline-block;

  transition: transform var(--transition);
}

.download-badges a:hover,
.footer-downloads a:hover {
  transform: translateY(-4px);
}

.download-badges img {
  width: 160px;
}

.hero__visual {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__glow {
  position: absolute;

  width: 75%;
  aspect-ratio: 1;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(242, 161, 21, 0.26),
    transparent 70%
  );

  filter: blur(22px);
}

.hero__image {
  position: relative;
  z-index: 1;

  width: min(100%, 470px);
}

/* Shared headings */

.section-heading {
  max-width: 700px;

  margin: 0 auto 60px;

  text-align: center;
}

.section-heading h2 {
  margin: 12px 0 0;

  font-size: clamp(2rem, 4vw, 3rem);

  line-height: 1.15;
}

/* Audience */

.audience-section {
  background: var(--surface);
}

.audience-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 22px;
}

.audience-card {
  padding: 32px 24px;

  border: 1px solid var(--border);
  border-radius: var(--radius-lg);

  background: var(--surface-elevated);

  text-align: center;

  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.audience-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-md);
}

.audience-card img {
  width: 90px;
  height: 90px;

  margin: 0 auto 22px;

  object-fit: contain;
}

.audience-card h3 {
  margin: 0 0 12px;
}

.audience-card p {
  margin: 0;

  color: var(--text-secondary);

  font-size: 0.88rem;
  line-height: 1.75;
}

/* Releases */

.release-section {
  padding: 115px 20px;

  background: var(--primary);

  text-align: center;
}

.release-section__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.release-brand {
  display: flex;
  align-items: center;
  gap: 12px;

  color: #2b2b2b;

  font-size: 2.2rem;
  font-weight: 800;
}

.release-brand strong {
  color: white;
}

.release-brand img {
  width: 48px;
  filter: brightness(0) invert(1);
}

.release-section h2 {
  margin: 30px 0 12px;

  color: white;

  font-size: clamp(2rem, 4vw, 3.2rem);
}

.release-section p {
  max-width: 620px;

  margin: 0 0 32px;

  color: rgba(255, 255, 255, 0.86);

  line-height: 1.7;
}

.button {
  min-height: 50px;

  padding: 0 26px;

  border: 0;
  border-radius: 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-weight: 800;

  cursor: pointer;

  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.button:hover {
  transform: translateY(-3px);
}

.button--light {
  background: white;
  color: #292929;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.13);
}

.button--primary {
  background: var(--primary);
  color: #222;
}

/* How it works */

.steps-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 24px;
}

.step-card {
  position: relative;

  padding: 30px;

  border: 1px solid var(--border);
  border-radius: var(--radius-lg);

  background: var(--surface-elevated);
}

.step-card__number {
  position: absolute;
  top: 20px;
  right: 22px;

  color: var(--primary);

  font-size: 0.78rem;
  font-weight: 800;
}

html[dir="rtl"] .step-card__number {
  right: auto;
  left: 22px;
}

.step-card img {
  width: 150px;
  height: 150px;

  margin: 10px auto 28px;

  object-fit: contain;
}

.step-card h3 {
  margin: 0 0 10px;
}

.step-card p {
  margin: 0;

  color: var(--text-secondary);

  font-size: 0.9rem;
  line-height: 1.75;
}

/* Footer */

.site-footer {
  padding: 70px 0 24px;

  background: var(--secondary);
  color: #102a34;
}

.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 50px;
}

.footer-brand {
  font-size: 1.7rem;
  font-weight: 800;
}

.footer-description {
  max-width: 380px;

  margin: 12px 0 0;

  line-height: 1.7;
}

.footer-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  margin-top: 24px;
}

.footer-downloads img {
  width: 130px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;

  font-weight: 700;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 55px;
  padding-top: 22px;

  border-top: 1px solid rgba(0, 0, 0, 0.13);

  text-align: center;

  font-size: 0.78rem;
}

/* Legal pages */

.page-hero {
  padding: 90px 0 60px;

  background: var(--surface);

  text-align: center;
}

.page-hero h1 {
  margin: 12px 0 0;

  font-size: clamp(2.4rem, 5vw, 4rem);

  line-height: 1.1;
}

.page-hero p:last-child {
  max-width: 650px;

  margin: 20px auto 0;

  color: var(--text-secondary);
}

.legal-container {
  width: min(800px, calc(100% - 40px));
}

.legal-content {
  color: var(--text-secondary);

  font-size: 1rem;
  line-height: 1.9;
}

.legal-content h2 {
  margin: 55px 0 15px;

  color: var(--text-primary);

  font-size: 1.35rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  margin: 0 0 20px;
}

.legal-content a {
  color: var(--primary);
  font-weight: 700;
}

.legal-content a:hover {
  text-decoration: underline;
}

.about-logo {
  width: 100px;

  margin: 0 auto 25px;
}

.about-logo img {
  width: 100%;
}

.legal-content > h2,
.legal-content > .muted {
  text-align: center;
}

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

/* 404 */

.not-found {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 30px;
}

.not-found__content {
  max-width: 550px;

  text-align: center;
}

.not-found__content img {
  width: 75px;

  margin: 0 auto 30px;
}

.not-found__code {
  display: block;

  color: var(--primary);

  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 800;

  line-height: 1;
}

.not-found h1 {
  margin: 20px 0 12px;
}

.not-found p {
  margin: 0 0 30px;

  color: var(--text-secondary);
}

/* RTL */

html[dir="rtl"] {
  text-align: right;
}

html[dir="rtl"] .section-heading,
html[dir="rtl"] .page-hero,
html[dir="rtl"] .release-section {
  text-align: center;
}

html[dir="rtl"] .hero__description,
html[dir="rtl"] .legal-content {
  line-height: 2;
}

/* Responsive */

@media (max-width: 950px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero__container {
    grid-template-columns: 1fr;

    text-align: center;
  }

  .hero__content {
    margin-inline: auto;
  }

  .hero__description {
    margin-inline: auto;
  }

  .download-badges {
    justify-content: center;
  }

  .hero__visual {
    order: -1;
  }

  .hero__image {
    width: min(70vw, 390px);
  }

  .audience-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .step-card {
    display: grid;

    grid-template-columns: 160px 1fr;

    align-items: center;

    gap: 28px;
  }

  .step-card img {
    margin: 0;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 32px, 1180px);
  }

  .section {
    padding: 75px 0;
  }

  .section--compact {
    padding-bottom: 75px;
  }

  .navbar {
    min-height: 66px;
  }

  .brand__logo {
    width: 30px;
    height: 30px;
  }

  .brand__name {
    font-size: 1.25rem;
  }

  .hero {
    min-height: auto;
  }

  .hero__container {
    padding: 45px 0 70px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

  .hero__image {
    width: min(78vw, 320px);
  }

  .download-badges {
    flex-direction: column;
    align-items: center;
  }

  .download-badges img {
    width: 150px;
  }

  .section-heading {
    margin-bottom: 40px;
  }

  .audience-grid {
    grid-template-columns: 1fr;
  }

  .release-section {
    padding: 80px 16px;
  }

  .step-card {
    display: block;

    text-align: center;
  }

  .step-card img {
    margin: 10px auto 25px;
  }

  .footer-main {
    flex-direction: column;
  }

  .footer-links {
    width: 100%;
  }

  .page-hero {
    padding: 70px 0 45px;
  }
}
