/* ==========================================================
   راهیار سامانه نوین (RSNO) — Main stylesheet
   ========================================================== */

:root {
  --bg: #F5F7F8;
  --surface: #FFFFFF;
  --surface-2: #EEF3F3;
  --text: #0D1B24;
  --muted: #5A6873;
  --border: #E1E8EA;
  --primary: #0F766E;
  --primary-strong: #0B5E58;
  --primary-soft: #E3F3F1;
  --on-primary: #FFFFFF;
  --accent: #E59E1A;
  --accent-soft: #FDF3E1;
  --ok: #16A34A;   --ok-soft: #E5F6EC;
  --warn: #C2700A; --warn-soft: #FDF1E1;
  --bad: #DC2626;  --bad-soft: #FCE8E8;
  --info: #2563EB; --info-soft: #E6EEFD;
  --ink: #0A1F24;
  --on-ink: #E8F1F1;
  --on-ink-muted: #9BB5B7;
  --shadow: 0 1px 2px rgba(13, 27, 36, .05), 0 8px 24px rgba(13, 27, 36, .06);
  --shadow-lg: 0 24px 60px -16px rgba(13, 27, 36, .22);
  --radius: 18px;
  --container: 1200px;
  --font: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --moon: block;
  --sun: none;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1418; --surface: #0F1D22; --surface-2: #16282E; --text: #E6EEF0; --muted: #97A8AE; --border: #1F3339;
    --primary: #2BB3A5; --primary-strong: #5CD0C3; --primary-soft: rgba(43, 179, 165, .14); --on-primary: #04201D;
    --accent: #F2B441; --accent-soft: rgba(242, 180, 65, .14);
    --ok: #4ADE80; --ok-soft: rgba(74, 222, 128, .12);
    --warn: #FBBF24; --warn-soft: rgba(251, 191, 36, .12);
    --bad: #F87171; --bad-soft: rgba(248, 113, 113, .12);
    --info: #60A5FA; --info-soft: rgba(96, 165, 250, .12);
    --ink: #061013;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .6);
    --moon: none; --sun: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1418; --surface: #0F1D22; --surface-2: #16282E; --text: #E6EEF0; --muted: #97A8AE; --border: #1F3339;
  --primary: #2BB3A5; --primary-strong: #5CD0C3; --primary-soft: rgba(43, 179, 165, .14); --on-primary: #04201D;
  --accent: #F2B441; --accent-soft: rgba(242, 180, 65, .14);
  --ok: #4ADE80; --ok-soft: rgba(74, 222, 128, .12);
  --warn: #FBBF24; --warn-soft: rgba(251, 191, 36, .12);
  --bad: #F87171; --bad-soft: rgba(248, 113, 113, .12);
  --info: #60A5FA; --info-soft: rgba(96, 165, 250, .12);
  --ink: #061013;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .6);
  --moon: none; --sun: block;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.ico {
  width: 22px; height: 22px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: var(--primary); color: var(--on-primary); padding: 8px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font-family: inherit; font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn .ico { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 10px 22px -10px var(--primary); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-accent { background: var(--accent); color: #2A1A00; box-shadow: 0 10px 26px -10px var(--accent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); display: inline-grid; place-items: center; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn .ico { width: 20px; height: 20px; }
.theme-toggle .i-moon { display: var(--moon); }
.theme-toggle .i-sun { display: var(--sun); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 700;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--border); box-shadow: 0 6px 24px -12px rgba(0, 0, 0, .12); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 72px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex-shrink: 0; }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-text strong { font-size: 16px; font-weight: 800; }
.brand-text small { font-size: 11px; font-weight: 800; letter-spacing: .25em; color: var(--primary); font-family: "Segoe UI", system-ui, sans-serif; }

.main-nav { display: flex; gap: 2px; margin-inline: auto; }
.main-nav a {
  padding: 8px 12px; border-radius: 10px; color: var(--muted);
  text-decoration: none; font-size: 15px; font-weight: 500; transition: color .2s, background-color .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--surface-2); }
.main-nav a.active { color: var(--primary); }
.nav-contact { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -260px; inset-inline-end: -220px;
  width: 760px; height: 760px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 20%, transparent), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--border) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
  opacity: .8; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.3vw, 54px); line-height: 1.4; font-weight: 900; margin: 20px 0 18px; }
.hero .hl { color: var(--primary); }
.typed-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: -4px 0 18px; font-size: clamp(17px, 1.8vw, 21px); font-weight: 700; min-height: 2.2em; }
.typed-label { color: var(--muted); font-weight: 500; }
.typed { color: var(--primary); background: var(--primary-soft); padding: 2px 12px; border-radius: 10px; white-space: nowrap; }
.caret { display: inline-block; width: 2px; height: 1.2em; margin-inline-start: -6px; background: var(--accent); animation: caret-blink 1s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
.lead { font-size: clamp(16px, 1.5vw, 18px); color: var(--muted); max-width: 56ch; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-points { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: 14px; font-weight: 500; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points .ico { width: 20px; height: 20px; color: var(--primary); }

.hero-visual { position: relative; padding: 36px 28px; }
.hv-main { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.hv-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--muted); }
.dots { display: inline-flex; gap: 6px; flex-shrink: 0; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #F87171; }
.dots i:nth-child(2) { background: #FBBF24; }
.dots i:nth-child(3) { background: #34D399; }
.hv-body { display: flex; align-items: center; gap: 24px; padding: 22px; }
.ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring-bg { stroke: var(--surface-2); }
.ring-fg { stroke: var(--primary); stroke-linecap: round; stroke-dasharray: 0 100; animation: ring 1.8s .3s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes ring { to { stroke-dasharray: 97 100; } }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.25; }
.ring-label strong { font-size: 28px; font-weight: 900; }
.ring-label span { font-size: 12px; color: var(--muted); }
.hv-legend { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; gap: 10px; font-size: 13px; }
.hv-legend li { display: flex; align-items: center; gap: 8px; }
.hv-legend b { margin-inline-start: auto; font-weight: 800; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.sw.ok { background: var(--ok); } .sw.warn { background: var(--warn); } .sw.bad { background: var(--bad); } .sw.info { background: var(--info); }
.hv-rows { border-top: 1px solid var(--border); padding: 6px 22px 12px; }
.hv-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.hv-row:last-child { border-bottom: 0; }

.chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.idle { background: var(--surface-2); color: var(--muted); }

.hv-float {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 10px 14px; box-shadow: var(--shadow-lg); font-size: 12px; line-height: 1.5;
  animation: float 6s ease-in-out infinite;
}
.hv-float strong { display: block; font-size: 13px; }
.hv-float span { color: var(--muted); }
.hv-float-1 { top: 0; inset-inline-end: 0; }
.hv-float-2 { bottom: 0; inset-inline-start: 0; animation-delay: -3s; }
.hv-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.hv-ico .ico { width: 18px; height: 18px; }
.hv-ico.ok { background: var(--ok-soft); color: var(--ok); }
.hv-ico.info { background: var(--info-soft); color: var(--info); }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--border); background: var(--surface); overflow: hidden; padding: 16px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee-group { display: flex; }
.marquee-group span { display: inline-flex; align-items: center; gap: 36px; padding-inline-end: 36px; white-space: nowrap; font-weight: 700; color: var(--muted); font-size: 15px; }
.marquee-group span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
@keyframes marquee { to { transform: translateX(50%); } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.45; font-weight: 900; margin: 16px 0 12px; }
.section-head p { margin: 0; color: var(--muted); font-size: 17px; }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.check-list li { position: relative; padding-inline-start: 30px; }
.check-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: 4px; width: 20px; height: 20px; border-radius: 6px; background: var(--primary-soft); }
.check-list li::after {
  content: ""; position: absolute; inset-inline-start: 4px; top: 8px; width: 12px; height: 12px; background: var(--primary);
  -webkit-mask: var(--check) center / contain no-repeat; mask: var(--check) center / contain no-repeat;
}

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.service {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.service-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 20px; }
.service-icon .ico { width: 26px; height: 26px; }
.service:nth-child(2) .service-icon { background: var(--bad-soft); color: var(--bad); }
.service:nth-child(3) .service-icon { background: var(--accent-soft); color: var(--accent); }
.service:nth-child(4) .service-icon { background: var(--info-soft); color: var(--info); }
.service h3 { font-size: 21px; font-weight: 800; margin-bottom: 10px; line-height: 1.5; }
.service p { color: var(--muted); margin: 0 0 20px; font-size: 15px; }

/* ---------- Portfolio ---------- */
.cases { display: grid; gap: 32px; }
.case {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: 28px; padding: 36px;
}
.case:nth-child(even) .case-media { order: 2; }
.case-media { border-radius: 20px; padding: clamp(14px, 3vw, 32px); }
.case--petros .case-media { background: linear-gradient(135deg, color-mix(in srgb, #EBCFAE 70%, var(--surface)), color-mix(in srgb, #D9AE86 45%, var(--surface))); }
.case--digi .case-media { background: linear-gradient(135deg, color-mix(in srgb, #BFDBFE 70%, var(--surface)), color-mix(in srgb, #C4B5FD 50%, var(--surface))); }
.case--app .case-media { background: linear-gradient(135deg, color-mix(in srgb, #99F6E4 60%, var(--surface)), color-mix(in srgb, #7DD3FC 40%, var(--surface))); }
.case-type { display: inline-block; font-size: 13px; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 3px 12px; border-radius: 999px; }
.case h3 { font-size: clamp(23px, 2.5vw, 30px); font-weight: 900; line-height: 1.5; margin: 12px 0 10px; }
.case-body > p { color: var(--muted); margin: 0 0 18px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 22px; }
.tags li { padding: 3px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 800; text-decoration: none; }
.link-arrow .ico { width: 18px; height: 18px; transition: transform .2s; }
.link-arrow:hover .ico { transform: translateX(-4px); }

/* Browser frame (mockups keep their own brand colours in both themes) */
.browser { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 50px -22px rgba(15, 23, 42, .45); }
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: #F1F5F9; border-bottom: 1px solid #E2E8F0; }
.browser-bar .url { flex: 1; max-width: 62%; margin-inline: auto; text-align: center; background: #fff; color: #64748B; border-radius: 8px; padding: 1px 12px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock { font-size: 12px; line-height: 1.6; color: #1E293B; }
.mock svg { width: 100%; height: auto; }

/* Petros Home mock */
.mock-petros { background: #FBF7F2; padding: 14px 16px 18px; color: #3B2A20; }
.pt-nav { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pt-logo { direction: ltr; font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 13px; letter-spacing: .14em; }
.pt-logo b { color: #C2703D; margin-left: 4px; }
.pt-links { display: flex; gap: 10px; margin-inline: auto; }
.pt-links i { width: 28px; height: 6px; border-radius: 3px; background: #E3D6C8; }
.pt-cart { width: 22px; height: 22px; border-radius: 50%; background: #3B2A20; flex-shrink: 0; }
.pt-hero { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 12px; background: linear-gradient(135deg, #F3E6D8, #EAD3BC); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.pt-kicker { display: block; font-size: 10px; font-weight: 700; color: #C2703D; }
.pt-copy strong { display: block; font-size: clamp(12px, 1.4vw, 15px); font-weight: 900; line-height: 1.55; margin: 4px 0 10px; }
.pt-btn { display: inline-block; background: #3B2A20; color: #FBF7F2; font-size: 10px; padding: 4px 12px; border-radius: 999px; }
.pt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pt-item { background: #fff; border-radius: 10px; padding: 8px; box-shadow: 0 1px 3px rgba(59, 42, 32, .1); }
.pt-img { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; margin-bottom: 6px; }
.pt-img svg { width: 55%; height: 55%; }
.pt-item i { display: block; height: 5px; border-radius: 3px; background: #E3D6C8; margin-top: 5px; }
.pt-item i.s { width: 55%; background: #C2703D; }

/* DigiAfshar mock */
.mock-digi { background: #F8FAFC; padding-bottom: 16px; }
.dg-nav { display: flex; align-items: center; gap: 12px; background: #0F172A; color: #fff; padding: 9px 16px; }
.dg-logo { font-weight: 900; font-size: 13px; white-space: nowrap; }
.dg-logo b { color: #60A5FA; font-weight: 900; }
.dg-search { flex: 1; min-width: 0; background: #1E293B; color: #94A3B8; border-radius: 8px; padding: 2px 10px; font-size: 10px; white-space: nowrap; overflow: hidden; }
.dg-icons { display: flex; gap: 6px; }
.dg-icons i { width: 20px; height: 20px; border-radius: 6px; background: #1E293B; }
.dg-hero { margin: 14px 16px; border-radius: 12px; background: linear-gradient(120deg, #1D4ED8, #7C3AED); color: #fff; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 8px; padding: 14px 18px; }
.dg-badge { display: inline-block; background: #F43F5E; font-size: 9px; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.dg-copy strong { display: block; font-size: clamp(12px, 1.4vw, 15px); font-weight: 900; line-height: 1.55; margin: 6px 0 10px; }
.dg-btn { display: inline-block; background: #fff; color: #1D4ED8; font-size: 10px; font-weight: 800; padding: 3px 12px; border-radius: 8px; }
.dg-cats { display: flex; justify-content: space-around; margin: 0 16px 14px; }
.dg-cat { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; color: #475569; }
.dg-cat > span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #E0E7FF; }
.dg-cat svg { width: 20px; height: 20px; }
.dg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 16px; }
.dg-item { position: relative; background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; padding: 8px; }
.dg-off { position: absolute; top: 6px; inset-inline-start: 6px; background: #F43F5E; color: #fff; font-size: 9px; font-weight: 800; border-radius: 6px; padding: 0 5px; }
.dg-img { aspect-ratio: 1; display: grid; place-items: center; }
.dg-img svg { width: 62%; height: 62%; }
.dg-name { display: block; height: 5px; border-radius: 3px; background: #E2E8F0; margin: 4px 0; }
.dg-price { display: block; font-size: 10px; font-weight: 800; color: #0F172A; white-space: nowrap; }

/* Moadian app mock */
.mock-app { display: grid; grid-template-columns: 44px 1fr; background: #F1F5F9; }
.ap-side { background: #0A1F24; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; }
.ap-logo { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, #14B8A6, #0F766E); margin-bottom: 8px; }
.ap-side i { width: 22px; height: 6px; border-radius: 3px; background: #1F3B42; }
.ap-side i.on { background: #2DD4BF; }
.ap-main { padding: 12px 14px; min-width: 0; }
.ap-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ap-top strong { font-size: 13px; }
.ap-pill { font-size: 10px; background: #fff; border: 1px solid #E2E8F0; border-radius: 999px; padding: 0 10px; }
.ap-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ap-kpis div { background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; padding: 6px 10px; min-width: 0; }
.ap-kpis span { display: block; font-size: 9.5px; color: #64748B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-kpis b { font-size: 15px; font-weight: 900; }
.ap-kpis .ok b { color: #16A34A; }
.ap-kpis .warn b { color: #D97706; }
.ap-chart { display: flex; align-items: flex-end; gap: 6px; height: 64px; background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.ap-chart i { flex: 1; border-radius: 4px 4px 0 0; background: #99F6E4; }
.ap-chart i:nth-child(odd) { background: #14B8A6; }
.ap-table { background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; overflow: hidden; }
.ap-row { display: grid; grid-template-columns: 1.1fr 1.1fr auto; gap: 8px; align-items: center; padding: 5px 10px; font-size: 10px; border-bottom: 1px solid #F1F5F9; }
.ap-row:last-child { border-bottom: 0; }
.ap-row.head { background: #F8FAFC; color: #64748B; font-weight: 700; }
.ap-chip { font-size: 9px; font-weight: 800; padding: 0 8px; border-radius: 999px; }
.ap-chip.ok { background: #DCFCE7; color: #15803D; }
.ap-chip.warn { background: #FEF3C7; color: #B45309; }
.ap-chip.bad { background: #FEE2E2; color: #B91C1C; }

/* ---------- Moadian section ---------- */
.moadian { position: relative; background: var(--ink); color: var(--on-ink); overflow: hidden; }
.moadian::before {
  content: ""; position: absolute; top: -300px; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 600px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(20, 184, 166, .22), transparent 65%); pointer-events: none;
}
.moadian .container { position: relative; }
.moadian .eyebrow { background: rgba(45, 212, 191, .12); color: #5EEAD4; }
.moadian .section-head p { color: var(--on-ink-muted); }

.steps { list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09); border-radius: 16px; padding: 22px; }
.step-num { font-size: 13px; font-weight: 900; color: #5EEAD4; background: rgba(45, 212, 191, .12); border-radius: 8px; padding: 2px 10px; }
.step h3 { font-size: 17px; font-weight: 800; line-height: 1.55; margin: 14px 0 6px; }
.step p { margin: 0; font-size: 14px; color: var(--on-ink-muted); }

.demo { background: var(--surface); color: var(--text); border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7); }
.demo-bar { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.demo-bar strong { font-weight: 800; }
.demo-badge { margin-inline-start: auto; font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.demo-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.demo-sources { display: flex; flex-wrap: wrap; gap: 10px; }
.src { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.src .ico { width: 18px; height: 18px; color: var(--primary); }
.demo-progress { height: 4px; margin: 0 20px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.demo-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 1.3s cubic-bezier(.4, 0, .2, 1); }
.demo-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px 8px; }
.filter {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.filter b { min-width: 24px; padding: 0 8px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 800; text-align: center; }
.filter:hover:not(:disabled) { border-color: var(--primary); }
.filter.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.filter.active b { background: color-mix(in srgb, var(--surface) 22%, transparent); }
.filter:disabled { opacity: .45; cursor: not-allowed; }
.table-wrap { overflow-x: auto; padding: 0 20px; }
.demo-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; }
.demo-table th { text-align: start; font-size: 12px; font-weight: 700; color: var(--muted); padding: 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.demo-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.demo-table tr.is-hidden { display: none; }
.demo-table .num { font-variant-numeric: tabular-nums; }
.demo-table .hl-warn { color: var(--warn); font-weight: 800; }
.demo-table .na { color: var(--muted); }
.demo-table tr[class*="st-"] .chip { animation: pop .45s calc(var(--i) * 60ms) both; }
@keyframes pop { from { opacity: 0; transform: scale(.75); } }
.demo-summary { margin: 0; padding: 14px 20px 20px; font-size: 14px; color: var(--muted); }
.demo-summary strong { color: var(--text); }

.m-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.m-feature { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09); }
.m-feature h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.m-feature p { margin: 0; font-size: 14px; color: var(--on-ink-muted); }
.ico-wrap { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--primary-soft); color: var(--primary); }
.m-feature .ico-wrap { background: rgba(45, 212, 191, .12); color: #5EEAD4; }
.m-cta { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- Process ---------- */
.process-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.p-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; }
.p-num { display: block; font-size: 46px; font-weight: 900; line-height: 1; margin-bottom: 16px; color: transparent; -webkit-text-stroke: 1.5px var(--primary); }
.p-step h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.p-step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.about-copy h2 { font-size: clamp(25px, 3vw, 36px); font-weight: 900; line-height: 1.5; margin: 16px 0 14px; }
.about-copy p { color: var(--muted); font-size: 16.5px; }
.callout { margin: 22px 0; padding: 16px 20px; border-inline-start: 4px solid var(--accent); background: var(--accent-soft); border-radius: 12px; font-weight: 700; font-size: 16px; line-height: 1.9; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.value { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.value h3 { font-size: 17px; font-weight: 800; margin: 14px 0 4px; }
.value p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Contact ---------- */
.contact-card { display: grid; grid-template-columns: .9fr 1.1fr; background: var(--surface); border: 1px solid var(--border); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.contact-info { position: relative; padding: 48px 40px; color: #E8F1F1; background: linear-gradient(155deg, #0F766E, #0A1F24 80%); overflow: hidden; }
.contact-info::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; bottom: -160px; inset-inline-end: -120px; border: 50px solid rgba(255, 255, 255, .05); }
.eyebrow-light { background: rgba(255, 255, 255, .12); color: #5EEAD4; }
.contact-info h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 900; line-height: 1.5; margin: 14px 0 10px; }
.contact-info > p { color: #B5CDCD; margin: 0; }
.info-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 18px; position: relative; z-index: 1; }
.info-list li { display: flex; align-items: center; gap: 14px; }
.info-list .ico-wrap { background: rgba(255, 255, 255, .1); color: #5EEAD4; }
.info-list span { display: block; font-size: 12px; color: #9BB5B7; line-height: 1.5; }
.info-list a, .info-list strong { color: #fff; font-weight: 700; text-decoration: none; font-size: 15px; }
.info-list a[dir="ltr"] { display: inline-block; }

.contact-form { padding: 48px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-content: start; }
.field { display: grid; gap: 6px; }
.contact-form .full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 700; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--text);
  padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}
.field input[dir="ltr"] { text-align: right; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.form-note { grid-column: 1 / -1; margin: 0; min-height: 1.5em; font-size: 14px; color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--muted); font-size: 14.5px; max-width: 38ch; margin: 16px 0 0; }
.site-footer h4 { font-size: 15px; font-weight: 800; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--muted); text-decoration: none; font-size: 14.5px; transition: color .2s; }
.site-footer ul a:hover { color: var(--primary); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-block: 22px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.footer-bottom a { text-decoration: none; color: var(--muted); }
.footer-bottom a:hover { color: var(--primary); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .menu-toggle { display: inline-grid; }
  .header-actions { margin-inline-start: auto; }
  .main-nav {
    display: none; position: absolute; top: 100%; inset-inline: 0; margin: 0;
    flex-direction: column; gap: 2px; padding: 12px 16px 20px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; font-size: 16px; }
  .nav-contact { display: block; }
}

@media (max-width: 960px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 560px; width: 100%; margin-inline: auto; }
  .services-grid { grid-template-columns: 1fr; }
  .case { grid-template-columns: 1fr; gap: 28px; padding: 22px; }
  .case:nth-child(even) .case-media { order: 0; }
  .steps, .process-grid { grid-template-columns: 1fr 1fr; }
  .m-features { grid-template-columns: 1fr 1fr; }
  .contact-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .container { padding-inline: 16px; }
  .hide-sm { display: none; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head p { font-size: 16px; }
  .brand-text strong { font-size: 15px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-visual { padding: 30px 0; }
  .hv-body { gap: 16px; padding: 18px 16px; }
  .ring { width: 104px; height: 104px; }
  .ring-label strong { font-size: 22px; }
  .hv-legend { font-size: 12px; gap: 8px; }
  .hv-rows { padding-inline: 16px; }
  .hv-float { padding: 8px 10px; }
  .hv-float strong { font-size: 12px; }
  .hv-ico { width: 28px; height: 28px; }
  .case { padding: 14px; border-radius: 22px; }
  .case-body { padding: 0 6px 8px; }
  .pt-grid, .dg-grid { grid-template-columns: repeat(3, 1fr); }
  .pt-item:nth-child(4), .dg-item:nth-child(4) { display: none; }
  .pt-links, .dg-icons { display: none; }
  .pt-hero, .dg-hero { padding: 12px; }
  .steps, .process-grid, .m-features, .values { grid-template-columns: 1fr; }
  .demo-bar, .demo-toolbar { padding-inline: 14px; }
  .demo-badge { display: none; }
  .demo-toolbar .btn { width: 100%; }
  .demo-progress { margin-inline: 14px; }
  .demo-filters { padding-inline: 14px; }
  .table-wrap { padding-inline: 14px; }
  .demo-summary { padding-inline: 14px; }
  .contact-info, .contact-form { padding: 32px 20px; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .marquee-track { animation: none; }
}
