/* Karvanro Mobile App Kit — landing shell */
:root {
  --mk-bg: #070d18;
  --mk-bg-elev: #0b1324;
  --mk-orange: #ea580c;
  --mk-orange-soft: rgba(234, 88, 12, 0.18);
  --mk-sky: #38bdf8;
  --mk-text: #f8fafc;
  --mk-muted: #94a3b8;
  --mk-border: rgba(148, 163, 184, 0.16);
  --mk-glass: rgba(15, 23, 42, 0.72);
  --mk-radius: 18px;
  --mk-safe-b: env(safe-area-inset-bottom, 0px);
  --mk-safe-t: env(safe-area-inset-top, 0px);
  --mk-touch: 44px;
  --font-fa: "Vazirmatn", "Tahoma", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body.mk-body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(234, 88, 12, 0.16), transparent 55%),
    radial-gradient(900px 500px at 0% 20%, rgba(56, 189, 248, 0.08), transparent 50%),
    var(--mk-bg);
  color: var(--mk-text);
  font-family: var(--font-fa);
  line-height: 1.7;
  padding-bottom: calc(24px + var(--mk-safe-b));
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.mk-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}

@media (min-width: 900px) {
  .mk-shell { max-width: 1080px; }
}

/* Sticky app bar */
.mk-appbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(10px + var(--mk-safe-t)) 14px 10px;
  background: rgba(7, 13, 24, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--mk-border);
}

.mk-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mk-brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(234, 88, 12, 0.35), 0 8px 24px rgba(234, 88, 12, 0.25);
}

.mk-brand-text { min-width: 0; }
.mk-brand-title {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.2;
}
.mk-brand-sub {
  font-size: 0.72rem;
  color: var(--mk-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-nav-desktop {
  display: none;
  align-items: center;
  gap: 6px;
}

.mk-nav-desktop a {
  min-height: var(--mk-touch);
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--mk-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background .2s, color .2s;
}
.mk-nav-desktop a:hover,
.mk-nav-desktop a:focus-visible {
  background: var(--mk-orange-soft);
  color: #fff;
  outline: none;
}

.mk-appbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--mk-touch);
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
}
.mk-btn:active { transform: scale(0.98); }
.mk-btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  box-shadow: 0 8px 24px rgba(234, 88, 12, 0.35);
}
.mk-btn-ghost {
  background: rgba(255,255,255,0.04);
  border-color: var(--mk-border);
  color: var(--mk-text);
}
.mk-btn-block { width: 100%; }

.mk-icon-btn {
  width: var(--mk-touch);
  height: var(--mk-touch);
  border-radius: 14px;
  border: 1px solid var(--mk-border);
  background: rgba(255,255,255,0.04);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

@media (min-width: 900px) {
  .mk-nav-desktop { display: flex; }
  .mk-icon-btn.mk-burger { display: none; }
  .mk-appbar { padding-inline: 22px; }
}

/* Mobile drawer */
.mk-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 120;
}
.mk-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mk-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(86vw, 320px);
  background: var(--mk-bg-elev);
  border-left: 1px solid var(--mk-border);
  transform: translateX(105%);
  transition: transform .28s ease;
  z-index: 130;
  padding: calc(16px + var(--mk-safe-t)) 16px calc(20px + var(--mk-safe-b));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mk-drawer.open { transform: translateX(0); }
.mk-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.mk-drawer nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mk-drawer nav a {
  min-height: var(--mk-touch);
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  font-weight: 700;
}
.mk-drawer nav a:hover {
  border-color: var(--mk-border);
  background: var(--mk-orange-soft);
}
.mk-drawer-ctas {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.mk-drawer-open { overflow: hidden; }

/* Sections */
.mk-main {
  padding: 18px 16px 40px;
}
@media (min-width: 900px) {
  .mk-main { padding: 28px 22px 56px; }
}

.mk-section {
  margin-bottom: 36px;
}
.mk-section-title {
  font-size: 1.35rem;
  font-weight: 900;
  margin: 0 0 8px;
}
.mk-section-lead {
  margin: 0 0 18px;
  color: var(--mk-muted);
  font-size: 0.95rem;
}

.mk-glass {
  background: var(--mk-glass);
  border: 1px solid var(--mk-border);
  border-radius: var(--mk-radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}

/* Hero */
.mk-hero {
  padding: 22px 18px;
  position: relative;
  overflow: hidden;
}
.mk-hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% 20%;
  height: 180px;
  background: radial-gradient(circle, rgba(234,88,12,0.25), transparent 70%);
  pointer-events: none;
}
.mk-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--mk-orange-soft);
  color: #fdba74;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.mk-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 4.5vw, 2rem);
  font-weight: 900;
  line-height: 1.35;
}
.mk-hero p {
  margin: 0 0 18px;
  color: var(--mk-muted);
}
.mk-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.mk-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.mk-facts li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: #cbd5e1;
}
.mk-facts li::before {
  content: "●";
  color: var(--mk-orange);
  font-size: 0.55rem;
  margin-top: 0.55rem;
}

/* Steps */
.mk-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  counter-reset: mkstep;
}
@media (min-width: 900px) {
  .mk-steps { grid-template-columns: repeat(4, 1fr); }
}
.mk-steps li {
  counter-increment: mkstep;
  padding: 16px;
  position: relative;
}
.mk-steps li::before {
  content: counter(mkstep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.mk-steps strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}
.mk-steps span {
  color: var(--mk-muted);
  font-size: 0.88rem;
}

/* Services grid */
.mk-services {
  display: grid;
  gap: 12px;
}
@media (min-width: 640px) {
  .mk-services { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .mk-services { grid-template-columns: repeat(3, 1fr); }
}
.mk-card {
  padding: 16px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .2s, transform .2s;
}
.mk-card:hover {
  border-color: rgba(234, 88, 12, 0.45);
  transform: translateY(-2px);
}
.mk-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mk-orange-soft);
  font-size: 1.25rem;
}
.mk-card h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
}
.mk-card p {
  margin: 0;
  color: var(--mk-muted);
  font-size: 0.88rem;
  flex: 1;
}

/* Trust */
.mk-trust {
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.mk-trust-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.mk-trust h3 { margin: 0 0 4px; font-size: 1rem; }
.mk-trust p { margin: 0; color: var(--mk-muted); font-size: 0.88rem; }

/* Download */
.mk-download-grid {
  display: grid;
  gap: 12px;
}
@media (min-width: 700px) {
  .mk-download-grid { grid-template-columns: repeat(3, 1fr); }
}
.mk-download-card {
  padding: 16px;
}
.mk-download-card h3 { margin: 0 0 8px; }
.mk-download-card p { margin: 0 0 14px; color: var(--mk-muted); font-size: 0.88rem; }
.mk-code {
  display: block;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.35);
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--mk-sky);
  direction: ltr;
  text-align: left;
  overflow-wrap: anywhere;
}

/* Footer */
.mk-footer {
  margin-top: 8px;
  padding: 20px 16px calc(18px + var(--mk-safe-b));
  border-top: 1px solid var(--mk-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  color: var(--mk-muted);
  font-size: 0.85rem;
}
.mk-footer strong { color: #fff; display: block; margin-bottom: 2px; }
.mk-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.mk-footer-links a {
  min-height: var(--mk-touch);
  display: inline-flex;
  align-items: center;
}

/* Login hint banner */
.mk-login-banner {
  display: none;
  margin: 12px 16px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(234, 88, 12, 0.15);
  border: 1px solid rgba(234, 88, 12, 0.35);
  color: #fed7aa;
  font-size: 0.9rem;
  font-weight: 600;
}
.mk-login-banner.show { display: block; }

@media (min-width: 900px) {
  .mk-login-banner { margin-inline: 22px; }
}

/* Auth modal (from landing — keeps OTP UI usable without full style.css) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 16px; padding-bottom: calc(16px + var(--mk-safe-b));
  background: rgba(2, 6, 23, 0.72); backdrop-filter: blur(8px);
}
.modal-overlay.open, .modal-overlay.active, .modal-overlay[aria-hidden="false"] {
  display: flex;
}
.modal-content-card {
  width: min(100%, 420px); max-height: min(90dvh, 640px); overflow: auto;
  background: linear-gradient(160deg, #0f172a, #0b1324);
  border: 1px solid var(--mk-border); border-radius: 20px;
  padding: 18px; box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.auth-modal-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:14px; }
.auth-modal-brand { display:flex; gap:10px; align-items:center; }
.auth-modal-brand img { width:36px; height:36px; border-radius:10px; }
.auth-modal-brand h2 { margin:0; font-size:1.05rem; }
.auth-modal-brand p { margin:0; color:var(--mk-muted); font-size:0.82rem; }
.icon-close {
  width:40px; height:40px; border:1px solid var(--mk-border); border-radius:12px;
  background:rgba(255,255,255,0.04); color:#fff; font-size:1.4rem; line-height:1;
}
.auth-segmented-control {
  display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:4px;
  background:rgba(0,0,0,0.28); border-radius:14px; margin-bottom:14px;
}
.auth-tab-btn {
  min-height:40px; border:0; border-radius:12px; background:transparent;
  color:var(--mk-muted); font-weight:700; font-family:inherit;
}
.auth-tab-btn.active { background:var(--mk-orange-soft); color:#fff; }
.modal-content-card label { display:block; margin:0 0 6px; font-size:0.85rem; color:var(--mk-muted); }
.modal-content-card input[type="tel"],
.modal-content-card input[type="email"],
.modal-content-card input[type="text"] {
  width:100%; min-height:44px; border-radius:12px; border:1px solid var(--mk-border);
  background:rgba(0,0,0,0.35); color:#fff; padding:0 12px; font-family:inherit; margin-bottom:12px;
}
.btn, .btn-primary {
  display:inline-flex; align-items:center; justify-content:center;
  min-height:44px; padding:0 16px; border-radius:14px; border:0;
  background:linear-gradient(135deg,#f97316,#ea580c); color:#fff; font-weight:700; font-family:inherit;
}
.auth-full { width:100%; }
.auth-hint { color:var(--mk-muted); font-size:0.88rem; }
.otp-boxes-group { display:flex; gap:8px; justify-content:center; margin:12px 0; }
.otp-box {
  width:44px; height:48px; text-align:center; font-size:1.2rem; font-weight:800;
  border-radius:12px; border:1px solid var(--mk-border); background:rgba(0,0,0,0.35); color:#fff;
}
.auth-row { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:10px; }
.link-btn { background:none; border:0; color:var(--mk-sky); font-family:inherit; font-weight:600; min-height:44px; }

/* آیکون SVG اختصاصی لندینگ */
.mk-card-icon,.mk-trust-icon{display:inline-flex;align-items:center;justify-content:center}
.mk-card-icon img,.mk-trust-icon img{display:block;width:40px;height:40px;border-radius:12px}
.mk-trust-icon img{width:48px;height:48px}
.mk-icon-btn .mk-ico{display:block;width:22px;height:22px}
