/*
Theme Name: هارمونی
Theme URI: https://harmonycloud.ir
Author: Harmony Cloud
Author URI: https://harmonycloud.ir
Description: تم اختصاصی هارمونی برای لندینگ اپ خانه هوشمند.
Version: 1.2.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: harmony
*/

@font-face {
  font-family: Vazirmatn;
  src: url("assets/fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

@font-face {
  font-family: Vazirmatn;
  src: url("assets/fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("assets/fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e1311;
  --bg-2: #121a17;
  --surface: #171f1c;
  --surface-2: #1c2622;
  --text: #eef3ef;
  --muted: #8b9a92;
  --accent: #3d9a6a;
  --accent-deep: #1f6b4a;
  --accent-soft: rgba(61, 154, 106, 0.14);
  --on-accent: #f4f8f5;
  --line: rgba(238, 243, 239, 0.09);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius: 14px;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body.harmony-landing {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-weight: 400;
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(31, 107, 74, 0.22), transparent 58%),
    var(--bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

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

button,
.btn {
  font-family: inherit;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(14, 19, 17, 0.86);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #0b1210;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 8px;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent-deep);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: #267a56;
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(61, 154, 106, 0.45);
  background: var(--accent-soft);
}

.nav-links .btn {
  margin-inline-start: 8px;
  min-height: 38px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  margin-inline: auto;
  background: currentColor;
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
}

.menu-toggle span::before {
  top: -5px;
}

.menu-toggle span::after {
  top: 5px;
}

.hero {
  padding: 64px 0 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.9fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin: 14px 0 16px;
  max-width: 14ch;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.35;
}

.lead {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.stat {
  min-width: 7.5rem;
}

.stat b {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
  font-weight: 600;
}

.stat span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.device {
  padding: 12px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.device-screen {
  border-radius: 16px;
  background: linear-gradient(180deg, #1a2420, #121a17);
  padding: 20px;
}

.device-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.clock {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
}

.device-top small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.chip {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #b7e0c8;
  font-size: 0.75rem;
  font-weight: 500;
}

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tile {
  min-height: 108px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.tile strong {
  display: block;
  margin-top: 16px;
  font-weight: 600;
}

.tile small {
  color: var(--muted);
  font-size: 0.78rem;
}

.tile.on {
  background: var(--accent-soft);
  border-color: rgba(61, 154, 106, 0.35);
}

.section {
  padding: 72px 0;
  scroll-margin-top: 84px;
}

body.admin-bar .nav {
  top: 32px;
}

.section-head {
  max-width: 38rem;
  margin-bottom: 32px;
}

.kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.45;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.card {
  padding: 22px 20px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--accent);
}

.icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.85;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.step {
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.step b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.download-card {
  display: grid;
  gap: 6px;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.download-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.download-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.download-card .btn {
  justify-self: start;
  min-width: 9.5rem;
}

.changelog {
  display: grid;
  gap: 10px;
}

.release {
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent-deep);
  background: var(--surface);
}

.release-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
}

.release-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.release-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.release ul {
  margin: 0 0 12px;
  padding-inline-start: 1.15rem;
  color: var(--muted);
}

.release li {
  line-height: 1.75;
}

.release li + li {
  margin-top: 4px;
}

.release > p {
  margin: 0 0 12px;
  color: var(--muted);
}

.release-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  font-size: 0.88rem;
}

.release-links a {
  color: var(--accent);
  font-weight: 500;
}

.release-links a:hover {
  color: #67c08f;
}

.site-footer {
  padding: 24px 0 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner a:hover {
  color: var(--text);
}

@media (max-width: 960px) {
  .hero-grid,
  .steps,
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 782px) {
  body.admin-bar .nav {
    top: 46px;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(var(--max), calc(100% - 32px));
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
  }

  .nav-links .btn {
    width: 100%;
    margin: 4px 0 0;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    padding-top: 36px;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-grid,
  .download-grid,
  .cards,
  .steps {
    grid-template-columns: 1fr;
  }
}

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