/* ==========================================================================
   HSI — هماهنگ سامان ایرانیان — PureLeaf theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap');

:root{
  --bg: #f3efe6;
  --surface: #ffffff;
  --surface2: #ebe2d1;
  --border: #ddd0b6;
  --accent: #1f3358;
  --accent2: #a9814c;
  --accent-glow: rgba(31,51,88,0.14);
  --text: #1b2438;
  --muted: #746c5e;
  --danger: #a23b3b;

  --panel: #161c29;
  --panel-line: #2a3346;
  --readout: #eef3ff;
  --readout-glow: rgba(160,190,255,0.55);

  --font-display: 'Vazirmatn', sans-serif;
  --font-body: 'Vazirmatn', sans-serif;

  --radius: 14px;
  --max-w: 780px;
  --max-w-wide: 1180px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
h1,h2,h3,h4{ font-family: var(--font-display); font-weight: 800; margin: 0 0 .5em; line-height:1.3; }
p{ margin: 0 0 1em; }
ul{ margin:0 0 1em; padding-inline-start: 1.3em; }
.wrap{ max-width: var(--max-w-wide); margin:0 auto; padding: 0 24px; }
.wrap-narrow{ max-width: var(--max-w); margin:0 auto; padding: 0 24px; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

/* ---------- fade-in / loading ---------- */
.fade-in{ animation: fadeIn .5s ease both; }
@keyframes fadeIn{ from{ opacity:0; transform: translateY(6px);} to{ opacity:1; transform:none; } }
.loading{ color: var(--muted); padding: 40px 0; text-align:center; font-size:.95em; }

/* ---------- power line (signature divider) ---------- */
.power-line{
  height: 2px; border:0; margin:0;
  background: linear-gradient(90deg, transparent, var(--accent2) 20%, var(--accent2) 80%, transparent);
  opacity:.55;
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav{
  position: sticky; top:0; z-index: 50;
  background: rgba(243,239,230,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner{
  max-width: var(--max-w-wide); margin:0 auto; padding: 14px 24px;
  display:flex; align-items:center; justify-content:space-between; gap: 20px;
}
.brand{ display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:900; font-size:1.25rem; color: var(--accent); }
.brand-mark{
  width: 34px; height:34px; border-radius:9px; background: var(--panel);
  display:flex; align-items:center; justify-content:center;
  color: var(--readout); font-size:.7rem; font-weight:900; letter-spacing:.02em;
  box-shadow: inset 0 0 0 1px var(--panel-line);
}
.nav-links{ display:flex; gap: 6px; align-items:center; }
.nav-links a{
  padding: 8px 14px; border-radius: 999px; font-weight:600; font-size:.95rem; color: var(--text);
  transition: background .2s ease, color .2s ease;
}
.nav-links a:hover{ background: var(--surface2); }
.nav-links a.is-active{ background: var(--accent); color:#fff; }
.nav-toggle{ display:none; }

@media (max-width: 720px){
  .nav-links{ position: fixed; inset-inline: 0; top: 62px; background: var(--bg); flex-direction:column;
    align-items:stretch; padding: 10px 24px 18px; border-bottom:1px solid var(--border); display:none; }
  .nav-links.is-open{ display:flex; }
  .nav-links a{ padding:12px 14px; }
  .nav-toggle{ display:flex; align-items:center; justify-content:center; width:40px; height:40px;
    border-radius:10px; border:1px solid var(--border); background:var(--surface); font-size:1.1rem; }
}

/* ==========================================================================
   Hero (device-panel motif)
   ========================================================================== */
.hero{
  background: var(--panel);
  color: var(--readout);
  overflow:hidden;
  position: relative;
}
.hero::before{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 85% 20%, rgba(169,129,76,0.18), transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(160,190,255,0.12), transparent 40%);
  pointer-events:none;
}
.hero-inner{
  max-width: var(--max-w-wide); margin:0 auto; padding: 64px 24px 56px;
  display:grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items:center;
  position:relative; z-index:1;
}
.hero-eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:.82rem; letter-spacing:.06em; color: var(--accent2);
  border:1px solid rgba(169,129,76,0.4); border-radius:999px; padding: 6px 14px;
  margin-bottom: 18px; font-weight:700;
}
.hero h1{ font-size: clamp(2rem, 4.2vw, 3.1rem); color:#fff; margin-bottom:.4em; }
.hero-lead{ color: #c7cee0; font-size:1.08rem; max-width: 46ch; margin-bottom: 28px; }
.hero-ctas{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom: 34px; }

.hero-stats{ display:flex; gap: 28px; flex-wrap:wrap; }
.hero-stat{ display:flex; flex-direction:column; }
.hero-stat b{ font-family: var(--font-display); font-size:1.5rem; color:#fff; }
.hero-stat span{ font-size:.82rem; color:#9aa4bc; }

.hero-visual{ display:flex; justify-content:center; }

/* device glyph (used in hero, cards, detail) */
.device-glyph{ width: 100%; max-width: 300px; }
.dg-body{ fill: #10141f; stroke: var(--panel-line); stroke-width:2; filter: drop-shadow(0 18px 34px rgba(0,0,0,0.45)); }
.dg-brand{ fill: #cfd6e6; font-size: 13px; font-family: var(--font-display); font-weight:800; letter-spacing:.06em; }
.dg-readout{ fill: var(--readout); font-size: 46px; font-family: var(--font-display); font-weight:800;
  filter: drop-shadow(0 0 10px var(--readout-glow)); }
.dg-set{ fill: #7d8bab; font-size: 15px; font-family: var(--font-display); font-weight:700; }
.dg-wifi{ fill:none; stroke:#8fd18f; stroke-width:4; stroke-linecap:round; }
.dg-bars rect{ fill: var(--accent2); opacity:.9; }
.dg-buttons circle{ fill: none; stroke:#4a5470; stroke-width:2.5; }

.hero-visual .device-glyph{ max-width: 340px; }
.hero-visual .dg-readout{ font-size:48px; }

/* small stat chip floating near hero visual on wide screens */
.hero-visual-wrap{ position:relative; }

@media (max-width: 900px){
  .hero-inner{ grid-template-columns: 1fr; padding-top: 40px; }
  .hero-visual{ order:-1; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary, .btn-ghost{
  display:inline-flex; align-items:center; gap:8px;
  padding: 13px 24px; border-radius: 999px; font-weight:700; font-size:.96rem;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
  cursor:pointer; border: 1px solid transparent;
}
.btn-primary{ background: var(--accent2); color:#1b1508; }
.btn-primary:hover{ transform: translateY(-1px); background:#bd935c; }
.btn-ghost{ background: transparent; border-color: rgba(255,255,255,0.25); color:#fff; }
.hero .btn-ghost:hover{ background: rgba(255,255,255,0.08); }
.wrap .btn-ghost, .section .btn-ghost{ border-color: var(--border); color: var(--text); }
.section .btn-ghost:hover{ background: var(--surface2); }

/* ==========================================================================
   Stats strip
   ========================================================================== */
.stats-strip{ background: var(--surface2); border-bottom:1px solid var(--border); }
.stats-strip-inner{
  max-width: var(--max-w-wide); margin:0 auto; padding: 26px 24px;
  display:grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align:center;
}
.stat-item-value{ display:block; font-family: var(--font-display); font-weight:900; font-size:1.9rem; color: var(--accent); }
.stat-item-label{ display:block; font-size:.85rem; color: var(--muted); margin-top:2px; }
@media (max-width: 700px){ .stats-strip-inner{ grid-template-columns: repeat(2,1fr); } }

/* ==========================================================================
   Sections
   ========================================================================== */
.section{ padding: 72px 0; }
.section-tight{ padding: 48px 0; }
.section-header{ max-width: 620px; margin-bottom: 40px; }
.section-eyebrow{ font-size:.82rem; letter-spacing:.06em; color: var(--accent2); font-weight:800; display:block; margin-bottom:10px; }
.section-title{ font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-sub{ color: var(--muted); max-width: 60ch; }
.section.on-surface2{ background: var(--surface2); }

/* category grid */
.cat-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 980px){ .cat-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .cat-grid{ grid-template-columns: 1fr; } }

.cat-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display:flex; flex-direction:column; gap:10px;
}
.cat-card:hover{ transform: translateY(-3px); box-shadow: 0 14px 30px rgba(31,51,88,0.1); border-color: var(--accent2); }
.cat-card-icon{
  width:44px; height:44px; border-radius:11px; background: var(--panel); color: var(--readout);
  display:flex; align-items:center; justify-content:center; font-size:1.2rem;
}
.cat-card h3{ font-size:1.02rem; margin:0; }
.cat-card p{ margin:0; font-size:.88rem; color: var(--muted); }
.cat-card-count{ font-size:.78rem; color: var(--accent2); font-weight:700; margin-top:auto; }

/* features list */
.feature-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px 26px; }
@media (max-width: 700px){ .feature-grid{ grid-template-columns: 1fr; } }
.feature-row{ display:flex; gap:12px; align-items:flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.feature-row .dot{ width:8px; height:8px; margin-top:8px; border-radius:50%; background: var(--accent2); flex:none; }
.feature-row strong{ display:block; font-family:var(--font-display); font-size:.98rem; }
.feature-row span{ color: var(--muted); font-size:.88rem; }

/* ==========================================================================
   Product grid + filter chips
   ========================================================================== */
.filter-bar{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom: 30px; }
.chip{
  font-family: var(--font-body); font-size:.88rem; font-weight:600;
  padding: 9px 16px; border-radius: 999px; border:1px solid var(--border);
  background: var(--surface); color: var(--text); cursor:pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.chip:hover{ border-color: var(--accent2); }
.chip.is-active{ background: var(--accent); color:#fff; border-color: var(--accent); }

.products-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 980px){ .products-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px){ .products-grid{ grid-template-columns: 1fr; } }

.product-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  overflow:hidden; display:flex; flex-direction:column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:hover{ transform: translateY(-4px); box-shadow: 0 16px 34px rgba(31,51,88,0.12); border-color: var(--accent2); }
.product-card-visual{ background: var(--panel); display:flex; align-items:center; justify-content:center; padding: 26px; }
.product-card-visual .device-glyph{ max-width: 140px; }
.product-card-body{ padding: 18px 20px 22px; display:flex; flex-direction:column; gap:6px; position:relative; }
.product-card-cat{ font-size:.76rem; color: var(--accent2); font-weight:700; }
.product-card-title{ margin:0; font-size:1.15rem; }
.product-card-desc{ margin:0; font-size:.88rem; color: var(--muted); }
.badge-wifi{
  position:absolute; top:-14px; left:20px; background: var(--accent); color:#fff;
  font-size:.72rem; font-weight:800; padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 4px 10px rgba(31,51,88,0.35);
}
.badge-wifi-lg{ position:static; display:inline-block; margin-top:14px; }

/* ==========================================================================
   Product detail
   ========================================================================== */
.product-detail{
  display:grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items:start;
}
@media (max-width: 860px){ .product-detail{ grid-template-columns: 1fr; } }
.product-detail-visual{
  background: var(--panel); border-radius: var(--radius); padding: 40px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  position: sticky; top: 90px;
}
@media (max-width: 860px){ .product-detail-visual{ position:static; } }
.product-detail-title{ color: var(--muted); font-size:1.02rem; margin-bottom: 6px; }
.product-detail-excerpt{ font-size:1.02rem; }
.feature-list{ padding-inline-start: 1.2em; }
.feature-list li{ margin-bottom: 6px; }
.spec-table{ border:1px solid var(--border); border-radius: 10px; overflow:hidden; margin-bottom: 10px; }
.spec-table > div{ display:flex; justify-content:space-between; gap: 12px; padding: 11px 16px; font-size:.92rem; }
.spec-table > div:nth-child(odd){ background: var(--surface2); }
.spec-table > div span:first-child{ color: var(--muted); }
.spec-table > div span:last-child{ font-weight:700; direction:ltr; text-align:left; }
.product-detail-cta{ display:flex; gap:12px; margin-top: 26px; flex-wrap:wrap; }

/* ==========================================================================
   Timeline (about page)
   ========================================================================== */
.timeline-band{
  background: var(--panel); color:#fff; padding: 40px 24px; border-radius: var(--radius);
  display:flex; align-items:center; justify-content:space-between; gap: 20px; flex-wrap:wrap;
}
.timeline-band .years{ font-family: var(--font-display); font-weight:900; font-size:2.2rem; direction:ltr; }
.timeline-band .years-fa{ font-family: var(--font-display); font-weight:800; font-size:1.1rem; color: var(--accent2); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 800px){ .contact-grid{ grid-template-columns: 1fr; } }
.contact-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.contact-card h3{ font-size:1rem; margin-bottom: 10px; color: var(--accent2); }
.contact-card a, .contact-card p{ font-size:1.02rem; margin:0 0 4px; direction:ltr; text-align: right; }
.contact-card a:hover{ color: var(--accent); }

/* ==========================================================================
   Article body (used by pages/*.txt content, e.g. about.html)
   ========================================================================== */
.page-header{ padding: 56px 0 20px; }
.page-header h1{ font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--accent); }
.page-body{ padding: 10px 0 60px; max-width: var(--max-w); }
.page-body h2{ font-size:1.3rem; margin-top: 1.4em; color: var(--accent); }
.page-body p{ font-size: 1.03rem; color:#2c3247; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer{ background: var(--panel); color:#c7cee0; padding: 48px 0 28px; }
.footer-inner{ max-width: var(--max-w-wide); margin:0 auto; padding:0 24px; display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 720px){ .footer-inner{ grid-template-columns: 1fr; } }
.footer-brand{ display:flex; align-items:center; gap:10px; font-family: var(--font-display); font-weight:900; font-size:1.2rem; color:#fff; margin-bottom: 10px; }
.footer-col h4{ color:#fff; font-size:.92rem; margin-bottom: 12px; }
.footer-col a{ display:block; color:#9aa4bc; font-size:.92rem; margin-bottom: 8px; }
.footer-col a:hover{ color:#fff; }
.footer-bottom{ max-width: var(--max-w-wide); margin: 30px auto 0; padding: 18px 24px 0; border-top:1px solid var(--panel-line); font-size:.82rem; color:#7b86a3; }
