/* ============================================================
   107یار — Design system v2 (Apple-inspired)
   ============================================================ */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&display=swap');

:root{
  --white:#ffffff;
  --black:#000000;

  /* light theme (default) */
  --bg:#ffffff;
  --bg-elevated:#f5f5f7;
  --bg-elevated-2:#ececed;
  --text:#1d1d1f;
  --text-secondary:#6e6e73;
  --text-tertiary:#86868b;
  --border:rgba(0,0,0,.10);
  --glass:rgba(255,255,255,.75);
  --accent:#1C5FE0;
  --accent-2:#17C994;
  --accent-strong:#144DBE;
  --accent-contrast:#ffffff;
  --brand-gradient:linear-gradient(135deg, var(--accent), var(--accent-2));

  --accent-melk:#1C5FE0;
  --accent-manager:#0E6E5C;
  --accent-lawyer:#6A4FB0;

  --radius-lg:24px;
  --radius-md:16px;
  --radius-sm:10px;
  --max-w:1180px;

  --font-display:'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:'JetBrains Mono', monospace;
}

html[data-theme="dark"]{
  --bg:#000000;
  --bg-elevated:#1d1d1f;
  --bg-elevated-2:#2a2a2d;
  --text:#f5f5f7;
  --text-secondary:#a1a1a6;
  --text-tertiary:#86868b;
  --border:rgba(255,255,255,.14);
  --glass:rgba(0,0,0,.6);
  --accent:#4C8EF7;
  --accent-2:#2FE0A8;
  --accent-strong:#7DAEFF;
  --accent-contrast:#0a1120;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  font-family:var(--font-display);
  background:var(--bg);
  color:var(--text);
  line-height:1.75;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  transition:background .35s ease, color .35s ease;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
svg{ display:block; }

.wrap{ max-width:var(--max-w); margin:0 auto; padding:0 24px; }

/* ---- brand / logo ---- */
.logo-mark{
  width:34px; height:34px; flex-shrink:0; object-fit:contain;
}
.brand{ display:flex; align-items:center; gap:9px; color:var(--text); font-weight:700; font-size:18px; }
.brand-wordmark{
  display:flex; align-items:center; gap:5px; height:26px;
}
.brand-wordmark .wordmark-num{
  height:100%; width:auto; display:block; object-fit:contain;
}
.brand-wordmark .wordmark-yar{
  font-weight:800; font-size:19px; line-height:1; color:var(--text); position:relative; top:1px;
}
.brand-hero-mark{
  width:100px; height:auto; margin:0 auto 22px; display:block;
}
.brand-hero-wordmark{
  height:56px; width:auto; margin:0 auto 22px; display:block;
}
.brand-wordmark.footer-wordmark{
  height:30px; margin-bottom:14px;
}
.brand-wordmark.footer-wordmark .wordmark-yar{
  font-size:21px;
}


/* ---- utility ---- */
.eyebrow{
  font-family:var(--font-mono);
  font-size:12px;
  letter-spacing:.12em;
  color:var(--accent);
  text-transform:uppercase;
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 26px;
  border-radius:980px;
  font-weight:600;
  font-size:15px;
  cursor:pointer;
  border:1px solid transparent;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
  white-space:nowrap;
}
.btn:hover{ transform:translateY(-1px); }
.btn-accent{ background:var(--brand-gradient); color:var(--accent-contrast); }
.btn-accent:hover{ filter:brightness(1.08); }
.btn-outline{ background:transparent; border-color:var(--border); color:var(--text); }
.btn-outline:hover{ background:var(--bg-elevated); }
.btn-sm{ padding:9px 18px; font-size:13.5px; }
.btn-disabled{
  background:transparent; color:var(--text-tertiary);
  border:1px dashed var(--border);
  cursor:not-allowed; pointer-events:none;
}
.btn-disabled .soon-badge{
  font-family:var(--font-mono); font-size:10px; background:var(--bg-elevated-2);
  padding:2px 8px; border-radius:999px; margin-inline-start:6px;
}

.section{ padding:120px 0; position:relative; }
.section.tight{ padding:80px 0; }
.section.on-elevated{ background:var(--bg-elevated); }
.section-head{ text-align:center; max-width:640px; margin:0 auto 60px; }
.section-title{ font-size:clamp(28px,4vw,44px); font-weight:700; margin-top:14px; line-height:1.3; letter-spacing:-.01em; }
.section-desc{ color:var(--text-secondary); margin-top:16px; font-size:17px; }

/* ---- header ---- */
header{
  position:sticky; top:0; z-index:60;
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  background:var(--glass);
  border-bottom:1px solid var(--border);
}
.nav{ display:flex; align-items:center; justify-content:space-between; padding:13px 24px; }
.nav-links{ display:flex; gap:30px; font-size:13.5px; color:var(--text-secondary); }
.nav-links a:hover{ color:var(--text); }
.nav-cta{ display:flex; align-items:center; gap:16px; }
.nav-toggle{ display:none; background:none; border:none; color:var(--text); font-size:20px; cursor:pointer; }

/* theme switch */
.theme-switch{
  width:46px; height:26px; border-radius:999px; background:var(--bg-elevated-2);
  border:1px solid var(--border); position:relative; cursor:pointer; flex-shrink:0;
}
.theme-switch .knob{
  position:absolute; top:2px; right:2px; width:20px; height:20px; border-radius:50%;
  background:var(--brand-gradient); transition:transform .25s ease;
  display:flex; align-items:center; justify-content:center; color:#fff;
}
html[data-theme="dark"] .theme-switch .knob{ transform:translateX(-20px); }
.theme-switch svg{ width:12px; height:12px; }
html[data-theme="light"] .icon-moon{ display:none; }
html[data-theme="dark"] .icon-sun{ display:none; }

@media (max-width:860px){
  .nav-links{ display:none; }
  .nav-toggle{ display:block; }
}

/* ---- hero ---- */
.hero{ padding:96px 0 0; text-align:center; }
.hero .eyebrow{ margin-bottom:18px; }
.hero h1{
  font-size:clamp(34px,6vw,72px);
  font-weight:700;
  line-height:1.18;
  letter-spacing:-.02em;
  margin-bottom:20px;
}
.hero h1 span{ color:var(--accent); }
.hero p.lead{ color:var(--text-secondary); font-size:19px; max-width:560px; margin:0 auto 34px; }
.hero-actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-bottom:64px; }

.hero-visual{
  max-width:980px; margin:0 auto; padding:0 24px;
  display:flex; justify-content:center;
}
.hero-visual .phone-frame{
  width:min(78vw, 300px);
  border-radius:34px;
  padding:10px;
  background:linear-gradient(160deg,var(--bg-elevated-2),var(--bg-elevated));
  border:1px solid var(--border);
  box-shadow:0 30px 70px rgba(0,0,0,.16);
}
html[data-theme="dark"] .hero-visual .phone-frame{ box-shadow:0 30px 70px rgba(0,0,0,.6); }
.hero-visual .phone-frame img{
  width:100%; border-radius:24px; display:block;
}



/* ---- family / product grid ---- */
.family-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
@media (max-width:900px){ .family-grid{ grid-template-columns:1fr; } }

.app-card{
  border-radius:var(--radius-lg);
  padding:32px;
  background:var(--bg);
  border:1px solid var(--border);
  position:relative;
  transition:transform .25s ease, box-shadow .25s ease;
}
.app-card:hover{ transform:translateY(-4px); box-shadow:0 20px 50px rgba(0,0,0,.08); }
html[data-theme="dark"] .app-card:hover{ box-shadow:0 20px 50px rgba(0,0,0,.5); }
.app-card .tag{
  position:absolute; top:24px; left:24px;
  font-family:var(--font-mono); font-size:10.5px; letter-spacing:.06em;
  padding:5px 10px; border-radius:999px; background:var(--bg-elevated-2); color:var(--text-secondary);
}
.app-card.live .tag{ background:rgba(184,134,58,.15); color:var(--accent-strong); }
.app-card .icon-badge{
  width:48px; height:48px; border-radius:13px; margin-bottom:22px;
  display:flex; align-items:center; justify-content:center; color:#fff;
  overflow:hidden;
}
.app-card.melk .icon-badge,
.app-card.manager .icon-badge,
.app-card.lawyer .icon-badge{ background:var(--bg-elevated); border:1px solid var(--border); }
.app-card.melk .icon-badge img,
.app-card.manager .icon-badge img,
.app-card.lawyer .icon-badge img{ width:72%; height:72%; object-fit:contain; }
.app-card h3{ font-size:21px; font-weight:700; margin-bottom:10px; }
.app-card p{ color:var(--text-secondary); font-size:14.5px; margin-bottom:24px; min-height:64px; }
.app-card.soon{ opacity:.6; }
.app-card.soon:hover{ transform:none; box-shadow:none; }

/* ---- feature grid (icon based) ---- */
.feature-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:44px 32px; }
@media (max-width:860px){ .feature-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .feature-grid{ grid-template-columns:1fr; } }
.feature-item{ text-align:center; }
.feature-item .fi-icon{
  width:44px; height:44px; border-radius:13px; margin:0 auto 18px;
  background:var(--bg-elevated); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; color:var(--accent);
}
.feature-item .fi-icon svg{ width:20px; height:20px; }
.feature-item h4{ font-size:16.5px; font-weight:700; margin-bottom:8px; }
.feature-item p{ font-size:14px; color:var(--text-secondary); }

/* ---- feature + screenshot alternating rows ---- */
.feature-row{
  display:grid; grid-template-columns:1fr 1fr; gap:60px; align-items:center;
  padding:56px 0; border-bottom:1px solid var(--border);
}
.feature-row:last-child{ border-bottom:none; }
.feature-row:nth-child(even) .feature-row-text{ order:2; }
.feature-row:nth-child(even) .feature-row-shot{ order:1; }
@media (max-width:860px){
  .feature-row{ grid-template-columns:1fr; gap:32px; padding:40px 0; }
  .feature-row:nth-child(even) .feature-row-text,
  .feature-row:nth-child(even) .feature-row-shot{ order:initial; }
}
.feature-row-text .fi-icon{ width:44px; height:44px; border-radius:13px; margin:0 0 18px; }
.feature-row-text .fi-icon svg{ width:20px; height:20px; }
.feature-row-text h3{ font-size:24px; font-weight:700; margin-bottom:12px; }
.feature-row-text p{ color:var(--text-secondary); font-size:15.5px; max-width:400px; }
.feature-row-shot{ display:flex; justify-content:center; }
.feature-row-shot .phone-frame{
  width:min(70vw, 260px);
  border-radius:30px; padding:9px;
  background:linear-gradient(160deg,var(--bg-elevated-2),var(--bg-elevated));
  border:1px solid var(--border);
  box-shadow:0 24px 60px rgba(0,0,0,.12);
}
html[data-theme="dark"] .feature-row-shot .phone-frame{ box-shadow:0 24px 60px rgba(0,0,0,.55); }
.feature-row-shot .phone-frame img{ width:100%; border-radius:22px; display:block; }

/* ---- horizontal scroll gallery (apple style) ---- */
.gallery-shell{ position:relative; }
.gallery-scroll{
  display:flex; gap:20px; overflow-x:auto; scroll-snap-type:x mandatory;
  padding:6px 24px 28px; margin:0 -24px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin; scrollbar-color:var(--border) transparent;
  cursor:grab; user-select:none;
}
.gallery-scroll.dragging{ cursor:grabbing; scroll-snap-type:none; }
.gallery-scroll::-webkit-scrollbar{ height:6px; }
.gallery-scroll::-webkit-scrollbar-thumb{ background:var(--border); border-radius:999px; }
.gallery-card{
  scroll-snap-align:center;
  flex:0 0 auto;
  width:min(72vw,260px);
  background:var(--bg-elevated);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:14px;
}
.gallery-card img{
  width:100%; border-radius:12px; margin-bottom:14px;
  border:1px solid var(--border);
  -webkit-user-drag:none; pointer-events:none;
}
.gallery-card h4{ font-size:14.5px; margin-bottom:4px; }
.gallery-card p{ font-size:12.5px; color:var(--text-secondary); line-height:1.7; }
.gallery-hint{
  text-align:center; font-size:12.5px; color:var(--text-tertiary);
  font-family:var(--font-mono); margin-top:4px;
}
.gallery-group-label{
  font-family:var(--font-mono); font-size:13px; color:var(--text-tertiary);
  letter-spacing:.05em; margin:52px 0 18px;
}

/* ---- download / CTA panel ---- */
.cta-panel{
  border-radius:var(--radius-lg);
  padding:64px 40px;
  background:var(--bg-elevated);
  border:1px solid var(--border);
  text-align:center;
}
.cta-panel h2{ font-size:clamp(24px,3vw,32px); font-weight:700; margin-bottom:14px; }
.cta-panel p{ color:var(--text-secondary); margin-bottom:32px; max-width:480px; margin-inline:auto; }
.cta-buttons{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.cta-buttons .btn{ min-width:180px; }
.cta-hint{ margin-top:22px; font-size:13.5px; color:var(--text-tertiary); }
.cta-hint a{ color:var(--accent); text-decoration:underline; }

/* ---- footer ---- */
footer{ padding:70px 0 34px; border-top:1px solid var(--border); background:var(--bg-elevated); }
.footer-grid{ display:grid; grid-template-columns:1.5fr 1fr 1fr 1fr; gap:32px; margin-bottom:52px; }
@media (max-width:760px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
.footer-grid h5{ font-size:12.5px; color:var(--text-tertiary); margin-bottom:16px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.footer-grid li{ margin-bottom:11px; font-size:14px; color:var(--text-secondary); }
.footer-grid a:hover{ color:var(--text); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; color:var(--text-tertiary); font-size:12.5px; padding-top:24px; border-top:1px solid var(--border); }
.social-icons{ display:flex; gap:10px; }
.social-icons a{
  width:38px; height:38px; border-radius:11px; background:var(--bg); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; color:var(--text-secondary);
}
.social-icons a svg{ width:18px; height:18px; }
.social-icons a:hover{ background:var(--accent); border-color:var(--accent); color:var(--accent-contrast); }

/* ---- light content pages (privacy/terms) reuse main theme now ---- */
.doc-page main{ max-width:720px; margin:0 auto; padding:76px 24px 110px; }
.doc-page h1{ font-size:34px; font-weight:700; margin-bottom:10px; }
.doc-page .updated{ color:var(--text-tertiary); font-size:13px; margin-bottom:44px; }
.doc-page h2{ font-size:19px; margin:36px 0 12px; }
.doc-page p, .doc-page li{ color:var(--text-secondary); font-size:15px; line-height:2; }
.doc-page ul{ padding-right:20px; list-style:disc; }
.doc-page a{ color:var(--accent); text-decoration:underline; }

/* ---- about / split layout ---- */
.split{ display:grid; grid-template-columns:1fr 1fr; gap:70px; align-items:center; }
@media (max-width:900px){ .split{ grid-template-columns:1fr; gap:40px; } }
.split img{ border-radius:var(--radius-lg); border:1px solid var(--border); max-width:280px; margin:0 auto; display:block; }
.list-plain li{ display:flex; gap:14px; padding:16px 0; border-bottom:1px solid var(--border); }
.list-plain li:last-child{ border-bottom:none; }
.list-plain .num{ font-family:var(--font-mono); color:var(--accent); font-size:13px; padding-top:3px; }
.list-plain h4{ font-size:16px; margin-bottom:4px; }
.list-plain p{ color:var(--text-secondary); font-size:14px; }

/* reveal on scroll */
.reveal{ opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s ease; }
.reveal.in{ opacity:1; transform:translateY(0); }

@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}

@media (max-width:600px){
  .section{ padding:80px 0; }
  .hero{ padding-top:64px; }
}
