/* ==========================================================================
   Sainanet — shared stylesheet
   Editorial, typography-led direction. Brand blue extracted from logo.
   ========================================================================== */

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

:root{
  --bg:#FBFAF7;
  --surface:#FFFFFF;
  --ink:#171512;
  --muted:#5B584F;
  --muted-2:#8B8779;
  --line:#E5E2D8;
  --brand:#2659A8;
  --brand-tint:#EAF0F8;
  --dark:#171512;
  --on-dark:#FBFAF7;
  --on-dark-muted:#C7C4BA;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  direction:rtl;
  font-family:'Vazirmatn', Tahoma, sans-serif;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
p{ margin:0; }
h1,h2,h3,h4{ margin:0; text-wrap:balance; }
:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; }

.container{ max-width:1120px; margin:0 auto; padding-inline:24px; }

/* -------------------- buttons -------------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  font-size:13.5px; font-weight:800; padding:12px 24px; border-radius:5px;
  border:1px solid transparent; cursor:pointer;
}
.btn-dark{ background:var(--dark); color:var(--on-dark); }
.btn-outline{ background:transparent; color:var(--ink); border-color:var(--ink); }
.btn-link{ padding:12px 2px; border-bottom:1.5px solid var(--ink); border-radius:0; }
.btn-on-brand{ background:var(--on-dark); color:var(--ink); }

/* -------------------- header / nav -------------------- */
.site-header{ border-bottom:1px solid var(--line); background:var(--bg); position:relative; z-index:20; }
.nav-inner{
  max-width:1120px; 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-weight:800; font-size:18px; flex:none; }
.brand img{ height:58px; width:auto; }
.nav-links{ display:flex; gap:28px; font-size:13.5px; font-weight:600; color:#4A473F; }
.nav-links a:hover{ color:var(--brand); }
.nav-cta{ flex:none; }
.nav-toggle{
  display:none; flex:none; width:36px; height:36px; border:1px solid var(--line);
  border-radius:6px; background:var(--surface); position:relative; cursor:pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after{
  content:''; position:absolute; right:8px; left:8px; height:1.5px; background:var(--ink);
}
.nav-toggle::before{ top:12px; }
.nav-toggle span{ top:17px; }
.nav-toggle::after{ top:22px; }

@media (max-width:820px){
  .nav-links{
    display:none; position:absolute; inset-inline:0; top:100%;
    background:var(--bg); border-bottom:1px solid var(--line);
    flex-direction:column; gap:0; padding:6px 24px 14px;
  }
  .nav-links.open{ display:flex; }
  .nav-links a{ padding:12px 0; border-top:1px solid var(--line); }
  .nav-toggle{ display:block; }
  .nav-cta{ display:none; }
}

/* -------------------- eyebrow / tags -------------------- */
.eyebrow-tag{
  display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:700;
  color:var(--brand); background:var(--brand-tint); border-radius:999px; padding:5px 12px;
}
.mono-label{
  font-family:'Vazirmatn', Tahoma, sans-serif; font-size:13px; font-weight:700;
  color:var(--muted-2);
}

/* -------------------- page header (interior pages) -------------------- */
.page-header{ padding:40px 0 32px; border-bottom:1px solid var(--line); }
.page-header h1{ font-size:clamp(28px,4.2vw,42px); font-weight:900; line-height:1.25; max-width:18ch; }
.page-header p{ margin-top:14px; font-size:14.5px; line-height:1.7; color:var(--muted); max-width:60ch; }

/* -------------------- home: hero -------------------- */
.hero{ padding:44px 0 0; }
.hero h1{
  font-size:clamp(30px,5vw,50px); font-weight:900; line-height:1.22; letter-spacing:-.01em;
  text-wrap:balance; max-width:17ch;
}
.hero h1 em{ font-style:normal; color:var(--brand); }
.hero-sub{ max-width:38ch; margin-top:22px; }
.hero-sub p{ font-size:14.5px; line-height:1.7; color:var(--muted); margin-bottom:22px; }
.hero-actions{ display:flex; gap:16px; flex-wrap:wrap; }

/* -------------------- home: rotating banner hero --------------------
   Each slide is a complete, self-contained image (background + headline
   baked into the file by design). The page only overlays the two CTA
   buttons — everything else you see is pixels from the image itself. */
.hero-banner{ position:relative; overflow:hidden; aspect-ratio:1920/720; }
.hero-banner .slides{ position:absolute; inset:0; }
.hero-slide{ position:absolute; inset:0; opacity:0; transition:opacity 1.1s ease; }
.hero-slide.active{ opacity:1; z-index:1; }
.hero-slide picture{ position:absolute; inset:0; display:block; }
.hero-slide picture img,
.hero-slide > img{ width:100%; height:100%; object-fit:cover; display:block; background:#0E2340; }
.hero-slide-actions{
  position:absolute; z-index:2; inset-inline:0; bottom:5.2%;
  max-width:1120px; margin:0 auto; padding-inline:24px;
  display:flex; justify-content:flex-start; gap:14px; flex-wrap:wrap;
}
.hero-slide-actions .btn-outline{ color:#fff; border-color:rgba(255,255,255,.5); }
.hero-slide-dots{ position:absolute; z-index:3; bottom:2%; inset-inline-start:24px; display:flex; gap:8px; }
.hero-slide-dots span{ width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,.4); cursor:pointer; }
.hero-slide-dots span.active{ background:#fff; }
@media (max-width:640px){
  .hero-slide-actions{
    padding-inline:16px; gap:8px; bottom:3%;
  }
  .hero-slide-actions .btn{
    flex:1; font-size:11px; padding:9px 8px; border-radius:5px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .hero-slide-dots{ inset-inline-start:16px; }
  .hero-slide-dots span{ width:6px; height:6px; }
}

/* -------------------- stats -------------------- */
.stats{
  display:flex; margin-top:32px; border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  flex-wrap:wrap;
}
.stat{ flex:1; min-width:140px; padding:18px 24px; border-inline-start:1px solid var(--line); }
.stat:first-child{ border-inline-start:none; }
.stat .n{ font-family:'Vazirmatn', Tahoma, sans-serif; font-size:22px; font-weight:800; }
.stat .l{ font-size:12px; color:var(--muted-2); margin-top:4px; }

/* -------------------- service pillars (home) -------------------- */
.pillars{ display:grid; grid-template-columns:1.35fr .65fr; gap:1px; background:var(--line); }
@media (max-width:760px){ .pillars{ grid-template-columns:1fr; } }
.pillar{ background:var(--bg); padding:38px 32px; display:flex; flex-direction:column; gap:16px; }
.pillar.soft{ background:var(--dark); color:var(--on-dark); justify-content:center; }
.pillar .mono-label.on-dark{ color:#8FB4E5; }
.pillar h3{ font-size:24px; font-weight:800; line-height:1.4; }
.pillar.infra h3{ font-size:19px; }
.pillar p{ font-size:13px; line-height:1.65; }
.pillar.soft p{ color:var(--on-dark-muted); }
.pillar.infra p{ color:var(--muted); }
.pillar ul{ display:flex; flex-direction:column; gap:10px; margin-top:6px; }
.pillar li{ font-size:13px; font-weight:600; display:flex; align-items:center; gap:9px; }
.pillar li::before{ content:''; width:5px; height:5px; border-radius:50%; flex:none; background:currentColor; }
.pillar.soft li::before{ background:#6E9BD6; }
.pillar.infra li::before{ background:var(--brand); }
.pillar.infra li{ color:#2E2C25; }
.pillar-cta{ margin-top:8px; }

/* -------------------- clients wall -------------------- */
.clients{ padding:40px 0 8px; }
.clients-head{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:22px; }
.clients-head h2{ font-size:18px; font-weight:800; }
.client-wall{
  display:grid; grid-template-columns:repeat(2,1fr); gap:10px;
}
@media (min-width:520px){ .client-wall{ grid-template-columns:repeat(3,1fr); } }
@media (min-width:820px){ .client-wall{ grid-template-columns:repeat(4,1fr); } }
.client-cell{
  display:flex; align-items:center; justify-content:center;
  height:72px; padding:10px 16px;
  border:1px solid var(--line); border-radius:8px; background:var(--surface);
}
.client-cell img{ max-height:36px; max-width:100%; width:auto; height:auto; object-fit:contain; display:block; }
.client-cell span{
  font-size:12px; font-weight:600; color:#3A382F; text-align:center; line-height:1.4;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}

/* -------------------- cta band -------------------- */
.cta-band{
  margin-top:36px; background:var(--brand); color:var(--on-dark);
  padding:32px 0;
}
.cta-band-inner{
  max-width:1120px; margin:0 auto; padding-inline:24px;
  display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap;
}
.cta-band h2{ font-size:21px; font-weight:800; margin-bottom:6px; }
.cta-band p{ font-size:13px; color:#D7E2F2; }

/* -------------------- services page -------------------- */
.service-groups{ padding:8px 0 48px; display:flex; flex-direction:column; gap:36px; }
.service-group-head{ display:flex; align-items:baseline; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.service-group-head h2{ font-size:22px; font-weight:800; }
@media (max-width:520px){
  .service-group-head{ flex-direction:column; align-items:flex-start; gap:6px; }
}
.service-list{ border-top:1px solid var(--line); }
.service-item{
  display:grid; grid-template-columns:220px 1fr; gap:24px;
  padding:18px 0; border-bottom:1px solid var(--line);
}
@media (max-width:640px){ .service-item{ grid-template-columns:1fr; gap:8px; } }
.service-item h3{ font-size:17px; font-weight:800; }
.service-item p{ font-size:13.5px; line-height:1.7; color:var(--muted); max-width:62ch; }

/* -------------------- portfolio page -------------------- */
.portfolio-note{ padding:0 0 28px; font-size:13px; color:var(--muted-2); max-width:60ch; }
.portfolio-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:1px; background:var(--line); margin-bottom:48px; }
@media (max-width:700px){ .portfolio-grid{ grid-template-columns:1fr; } }
.case-card{ background:var(--bg); padding:30px 28px; display:flex; flex-direction:column; gap:14px; }
.case-icon{
  width:44px; height:44px; border-radius:10px; background:var(--brand-tint);
  border:1.5px solid var(--brand); display:flex; align-items:center; justify-content:center;
  font-size:19px;
}
.case-card h3{ font-size:16px; font-weight:800; }
.case-card p{ font-size:13px; line-height:1.65; color:var(--muted); }

/* -------------------- about page -------------------- */
.about-body{ padding:8px 0 40px; display:flex; flex-direction:column; gap:16px; max-width:70ch; }
.about-body p{ font-size:15px; line-height:1.75; color:var(--muted); }
.about-body p b{ color:var(--ink); }

/* -------------------- blog empty state -------------------- */
.blog-empty{
  margin:24px 0 72px; border:1px dashed var(--line); border-radius:14px;
  padding:44px 24px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:10px;
}
.blog-empty .mono-label{ margin-bottom:4px; }
.blog-empty h2{ font-size:20px; font-weight:800; }
.blog-empty p{ font-size:13.5px; color:var(--muted); max-width:44ch; }

/* -------------------- contact page -------------------- */
.contact-grid{ padding:8px 0 48px; display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--line); }
@media (max-width:700px){ .contact-grid{ grid-template-columns:1fr; } }
.contact-block{ background:var(--bg); padding:30px 28px; display:flex; flex-direction:column; gap:16px; }
.contact-row{ display:flex; flex-direction:column; gap:4px; }
.contact-row .k{ font-size:11px; font-weight:700; letter-spacing:.04em; color:var(--muted-2); text-transform:uppercase; }
.contact-row .v{ font-size:15px; font-weight:600; }
.contact-row .v a{ color:var(--brand); }
.map-link{ margin-top:6px; }

/* -------------------- lead / consultation form -------------------- */
.lead-section{ padding:8px 0 44px; max-width:760px; scroll-margin-top:24px; }
.lead-head p{ margin-top:10px; font-size:13.5px; line-height:1.7; color:var(--muted); }
.lead-alert{
  margin-top:20px; padding:14px 18px; border-radius:10px; font-size:13.5px; line-height:1.8;
}
.lead-alert-success{ background:#E7F5EF; color:#146348; border:1px solid #BEE3D2; }
.lead-alert-error{ background:#FBEAE7; color:#8A2E20; border:1px solid #F2C6BC; }
.lead-alert-error a{ color:inherit; text-decoration:underline; }
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .lead-alert-success{ background:#123328; color:#8FE0BE; border-color:#1E4E3C; }
  :root:not([data-theme="light"]) .lead-alert-error{ background:#3A1E18; color:#F2A896; border-color:#5C2E24; }
}
:root[data-theme="dark"] .lead-alert-success{ background:#123328; color:#8FE0BE; border-color:#1E4E3C; }
:root[data-theme="dark"] .lead-alert-error{ background:#3A1E18; color:#F2A896; border-color:#5C2E24; }

.lead-form{
  margin-top:26px; display:grid; grid-template-columns:1fr 1fr; gap:18px 20px;
}
@media (max-width:640px){ .lead-form{ grid-template-columns:1fr; } }
.lead-row{ display:flex; flex-direction:column; gap:7px; }
.lead-row-full{ grid-column:1 / -1; }
.lead-row label{ font-size:12.5px; font-weight:700; color:var(--muted); }
.lead-row input,
.lead-row select,
.lead-row textarea{
  font-family:inherit; font-size:14px; color:var(--ink); background:var(--surface);
  border:1px solid var(--line); border-radius:8px; padding:11px 14px; width:100%;
}
.lead-row textarea{ resize:vertical; min-height:96px; }
.lead-row input:focus,
.lead-row select:focus,
.lead-row textarea:focus{ outline:2px solid var(--brand); outline-offset:1px; }
.lead-hp{ position:absolute; inset-inline-start:-9999px; width:1px; height:1px; overflow:hidden; }

/* -------------------- footer -------------------- */
.site-footer{ border-top:1px solid var(--line); margin-top:0; }
.footer-inner{
  max-width:1120px; margin:0 auto; padding:36px 24px 24px;
  display:flex; flex-wrap:wrap; gap:32px; justify-content:space-between;
}
.footer-brand{ display:flex; align-items:center; gap:9px; font-weight:800; font-size:15px; }
.footer-brand img{ height:24px; width:auto; }
.footer-info{ display:flex; flex-direction:column; gap:6px; font-size:12.5px; color:var(--muted); }
.footer-info span[dir="ltr"]{ display:inline-block; text-align:right; }
.footer-links{ display:flex; flex-direction:column; gap:8px; font-size:13px; font-weight:600; }
.footer-links a:hover{ color:var(--brand); }
.footer-bottom{
  border-top:1px solid var(--line); padding:16px 24px; text-align:center;
  font-size:11.5px; color:var(--muted-2);
}
