/* Faravand Group: shared by / (fa, RTL) and /en/ (en, LTR). Logical properties throughout. */

@font-face { font-family: "IRANSans"; src: url("../fonts/IRANSansWebFaNum.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IRANSans"; src: url("../fonts/IRANSansWebFaNum_Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IRANSans"; src: url("../fonts/IRANSansWebFaNum_Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* Same face with Latin digits, for English text. */
@font-face { font-family: "IRANSans EN"; src: url("../fonts/IRANSansWeb.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IRANSans EN"; src: url("../fonts/IRANSansWeb_Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IRANSans EN"; src: url("../fonts/IRANSansWeb_Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #0e1a3d;          /* logo wordmark navy */
  --ink-deep: #0a1430;
  --paper: #f2f4f7;
  --white: #ffffff;
  --text: #0e1a3d;
  --text-2: #4c5872;
  --rule: #d6dce6;
  --leaf: #17908f;          /* logo teal, darkened for text contrast */
  --on-ink: #ffffff;
  --on-ink-2: #aeb8d0;
  --on-ink-rule: rgba(255, 255, 255, .14);
  --pul: #e8435f;
  --carex: #1ec0f5;
  --amber: #f7b500;
  --r-sm: 8px;
  --r-md: 14px;
  --container: 1180px;
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0c1530;
    --white: #121d3d;
    --text: #e6ebf6;
    --text-2: #9ba7c3;
    --rule: #233159;
    --leaf: #45c9c3;
    --pul: #ff6b82;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
/* Font follows each element's language, so mixed snippets get the right digits. */
[lang|="fa"] { font-family: "IRANSans", Tahoma, sans-serif; }
[lang|="en"] { font-family: "IRANSans EN", "Segoe UI", system-ui, sans-serif; }
body {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.95;
  color: var(--text);
  background: var(--paper);
  overflow-x: hidden;
}
:lang(en) body, body:lang(en) { line-height: 1.65; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
h1, h2, h3 { line-height: 1.4; font-weight: 700; text-wrap: balance; }
:lang(en) h1, :lang(en) h2, :lang(en) h3 { line-height: 1.18; letter-spacing: -.02em; }
ul, ol { padding: 0; list-style: none; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.skip-link { position: absolute; inset-inline-start: 16px; inset-block-start: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-sm); background: var(--white); color: var(--text); }
.skip-link:focus { inset-block-start: 12px; }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible, .site-header :focus-visible, .band-carex :focus-visible, .site-footer :focus-visible { outline-color: #6fe0d9; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 10px 22px;
  border: 1.5px solid transparent; border-radius: var(--r-sm);
  font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-solid { background: var(--text); color: var(--paper); }
.btn-solid:hover { background: var(--leaf); color: #fff; }
.btn-line { border-color: currentColor; }
.btn-line:hover { color: var(--leaf); }
.on-ink .btn-solid { background: #fff; color: var(--ink); }
.on-ink .btn-solid:hover { background: #6fe0d9; }
.on-ink .btn-line { color: #fff; border-color: rgba(255,255,255,.4); }
.on-ink .btn-line:hover { border-color: #fff; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: var(--ink); color: var(--on-ink);
  border-block-end: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled, .site-header.is-open { border-block-end-color: var(--on-ink-rule); }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 1.3rem; line-height: 1; }
.brand img { width: 40px; height: auto; }
.nav { display: flex; gap: 28px; margin-inline-start: auto; }
.nav a, .lang-switch { font-size: .95rem; text-decoration: none; color: var(--on-ink-2); transition: color .15s ease; }
.nav a:hover, .lang-switch:hover { color: #fff; }
.lang-switch { padding-inline-start: 24px; border-inline-start: 1px solid var(--on-ink-rule); }
.menu-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  margin-inline-start: auto; border: 1px solid var(--on-ink-rule); border-radius: var(--r-sm);
  background: transparent; color: #fff; cursor: pointer;
}
.menu-toggle .icon-close, .is-open .menu-toggle .icon-open { display: none; }
.is-open .menu-toggle .icon-close { display: block; }
.mobile-nav { display: none; }

@media (max-width: 760px) {
  .nav, .header-inner > .lang-switch { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav {
    display: grid; max-height: 0; overflow: hidden; padding-inline: 16px;
    transition: max-height .25s ease, padding .25s ease;
  }
  .is-open .mobile-nav { max-height: 320px; padding-block: 4px 16px; }
  .mobile-nav a { padding: 14px 0; border-block-end: 1px solid var(--on-ink-rule); text-decoration: none; color: #fff; }
  .mobile-nav a:last-child { border: 0; color: var(--on-ink-2); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--on-ink);
}
.hero-body { position: relative; z-index: 1; padding-block: clamp(56px, 9vw, 120px) clamp(48px, 7vw, 88px); }
.hero h1 {
  max-width: 11em;
  font-size: clamp(2.3rem, 5.4vw, 4.4rem);
  line-height: 1.32;
  color: #fff;
}
:lang(en) .hero h1 { max-width: 11em; line-height: 1.08; }
.hero-lead { max-width: 33em; margin-block-start: 28px; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--on-ink-2); }
.hero-lead strong { color: #fff; font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 40px; }

/* The emblem is the one large gesture: oversized and cropped by the hero's edge. */
.hero-emblem {
  position: absolute; z-index: 0;
  inset-inline-end: max(-8vw, -110px);
  inset-block-end: 0;
  width: min(44vw, 580px);
  pointer-events: none;
}
.hero-emblem img { width: 100%; height: auto; }

.facts {
  position: relative; z-index: 1;
  background: var(--ink);
  box-shadow: 0 0 0 100vmax var(--ink);
  clip-path: inset(0 -100vmax -100vmax);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block-start: 1px solid var(--on-ink-rule);
}
.facts > div { padding: 22px 0 26px; padding-inline-end: 20px; }
.facts > div + div { padding-inline-start: 24px; border-inline-start: 1px solid var(--on-ink-rule); }
.facts dt { font-size: .85rem; color: var(--on-ink-2); }
.facts dd { margin-block-start: 4px; font-weight: 500; color: #fff; }
.facts a { text-decoration: none; }
.facts a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 900px) {
  .hero-emblem { width: 300px; inset-block-start: 40px; inset-block-end: auto; inset-inline-end: -70px; opacity: .45; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
  .facts > div:nth-child(n+3) { border-block-start: 1px solid var(--on-ink-rule); }
}
@media (max-width: 480px) {
  .hero-emblem { width: 220px; inset-inline-end: -60px; opacity: .35; }
  .facts > div { padding-block: 16px 18px; }
  .facts > div + div { padding-inline-start: 16px; }
  .facts > div:nth-child(3) { padding-inline-start: 0; }
}

/* ---------- Product bands ---------- */
.band { padding-block: clamp(72px, 10vw, 128px); }
.band-pul { background: var(--paper); }
.band-carex { background: var(--ink-deep); color: var(--on-ink); }
@media (prefers-color-scheme: dark) { .band-carex { background: #060d22; } }

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 104px);
  align-items: center;
}
.band-carex .product-grid > .specimen { order: -1; }

.product-name { display: flex; align-items: center; gap: 16px; }
.product-name img { width: 64px; height: 64px; flex: none; }
.band-pul .product-name img { padding: 8px; border-radius: 18px; background: #fff; border: 1px solid var(--rule); }
.product-name h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.2; }
.product-name span { display: block; font-size: 1rem; font-weight: 500; color: var(--text-2); }
.band-carex .product-name span { color: var(--on-ink-2); }

.product-copy > p { max-width: 32em; margin-block-start: 28px; font-size: 1.1rem; color: var(--text-2); }
.band-carex .product-copy > p { color: var(--on-ink-2); }

.does { margin-block-start: 28px; border-block-start: 1px solid var(--rule); }
.does li { padding-block: 12px; border-block-end: 1px solid var(--rule); }
.band-carex .does, .band-carex .does li { border-color: var(--on-ink-rule); }

.proof { margin-block-start: 22px; font-size: .95rem; color: var(--text-2); }
.proof b { color: var(--text); font-size: 1.1rem; }
.proof a { color: inherit; text-underline-offset: 4px; }
.band-carex .proof { color: var(--on-ink-2); }

.product-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-block-start: 32px; }
.band-pul .btn-solid { background: var(--pul); color: #fff; }
.band-pul .btn-solid:hover { background: var(--text); color: var(--paper); }
.band-carex .btn-solid { background: var(--carex); color: var(--ink-deep); }
.band-carex .btn-solid:hover { background: #fff; }
.text-link { font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.text-link:hover { text-decoration-color: currentColor; }
.stores { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-block-start: 18px; font-size: .92rem; color: var(--text-2); }
.band-carex .stores { color: var(--on-ink-2); }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .band-carex .product-grid > .specimen { order: 0; }
  .specimen { max-width: 520px; }
}

/* ---------- Specimens: what each product actually does ---------- */
.specimen {
  width: 100%;
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--r-md);
  font-size: .95rem;
  line-height: 1.75;
}
.band-pul .specimen { background: var(--white); border: 1px solid var(--rule); }
.band-carex .specimen { background: #10204a; border: 1px solid var(--on-ink-rule); }
.spec-caption { font-size: .82rem; color: var(--text-2); }
.band-carex .spec-caption { color: var(--on-ink-2); }

/* Pulnegar: bank SMS -> ledger row -> month */
.sms {
  max-width: 290px;
  padding: 12px 16px;
  border-radius: 16px;
  border-start-start-radius: 4px;
  background: color-mix(in srgb, var(--text) 6%, var(--white));
  font-size: .88rem;
  line-height: 1.8;
}
.sms header { display: flex; justify-content: space-between; gap: 12px; margin-block-end: 2px; font-size: .78rem; color: var(--text-2); }
.sms header b { color: var(--text); font-size: .85rem; }
.flow {
  display: flex; align-items: center; gap: 10px;
  margin-block: 14px; font-size: .8rem; color: var(--leaf); font-weight: 500;
}
.flow::before, .flow::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.ledger-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px;
}
.ledger-row .cat { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--pul) 12%, transparent); color: var(--pul); }
.ledger-row strong { display: block; font-weight: 500; line-height: 1.4; }
.ledger-row small { display: block; font-size: .78rem; color: var(--text-2); line-height: 1.5; }
.ledger-row .amt { font-weight: 700; color: var(--pul); white-space: nowrap; }
.month { margin-block-start: 22px; padding-block-start: 18px; border-block-start: 1px dashed var(--rule); }
.month-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.month-head b { font-size: 1.15rem; }
.stack { display: flex; height: 10px; margin-block: 12px 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.stack i { display: block; width: var(--w); background: var(--c); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .78rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }

/* Carex: complaint -> causes, urgency, nearest shop */
.complaint {
  max-width: 330px; margin-inline-start: auto;
  padding: 12px 16px; border-radius: 16px; border-start-end-radius: 4px;
  background: var(--carex); color: var(--ink-deep); font-weight: 500;
}
.dx { margin-block-start: 20px; display: grid; gap: 18px; }
.dx h3 { font-size: .8rem; font-weight: 500; color: var(--on-ink-2); margin-block-end: 6px; }
.cause { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; }
.cause + .cause { margin-block-start: 10px; }
.cause small { font-size: .78rem; color: var(--on-ink-2); }
.cause .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--on-ink-rule); overflow: hidden; }
.cause .bar i { display: block; height: 100%; width: calc(var(--p) * 100%); background: var(--carex); border-radius: 2px; }
.lamps { display: flex; gap: 8px; }
.lamp { flex: 1; padding: 6px 0; border-radius: 6px; text-align: center; font-size: .82rem; border: 1px solid var(--on-ink-rule); color: var(--on-ink-2); }
.lamp.is-lit { background: var(--amber); border-color: var(--amber); color: #2a1d00; font-weight: 700; }
.shop { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.06); }
.shop strong { display: block; font-weight: 500; line-height: 1.5; }
.shop small { color: var(--on-ink-2); font-size: .8rem; }
.shop .dist { white-space: nowrap; color: var(--carex); font-weight: 700; }

/* One moment of motion: each specimen plays once when it scrolls into view. */
.js .specimen .step { opacity: 0; transform: translateY(8px); }
.js .specimen.is-live .step { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--d, 0) * 1ms); }
.js .specimen .bar i, .js .specimen .stack i { transform: scaleX(0); transform-origin: right; }
.js .specimen .bar i:dir(ltr), .js .specimen .stack i:dir(ltr) { transform-origin: left; }
.js .specimen.is-live .bar i, .js .specimen.is-live .stack i { transform: none; transition: transform .8s cubic-bezier(.2,.7,.2,1) .7s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .specimen .step, .js .specimen .bar i, .js .specimen .stack i { opacity: 1; transform: none; transition: none; }
}

/* ---------- About ---------- */
.about { padding-block: clamp(72px, 10vw, 128px); background: var(--white); }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 7vw, 104px); }
.about h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.about-text p { max-width: 34em; font-size: 1.1rem; color: var(--text-2); }
.about-text p + p { margin-block-start: 18px; }
.about-text p:first-child { color: var(--text); font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.85; }
:lang(en) .about-text p:first-child { line-height: 1.55; }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact ---------- */
.contact { padding-block: clamp(72px, 10vw, 120px); border-block-start: 1px solid var(--rule); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 7vw, 104px); align-items: end; }
.contact h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.contact-grid > div > p { margin-block-start: 12px; color: var(--text-2); max-width: 26em; }
.channels { display: grid; }
.channel {
  display: grid; grid-template-columns: 5.5em 1fr; align-items: baseline; gap: 16px;
  padding-block: 18px; border-block-end: 1px solid var(--rule); text-decoration: none;
}
.channel:first-child { border-block-start: 1px solid var(--rule); }
.channel small { font-size: .9rem; color: var(--text-2); }
.channel strong { font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; transition: color .15s ease; }
.channel:hover strong { color: var(--leaf); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .channel { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* ---------- Footer ---------- */
.site-footer { padding-block: 48px 28px; background: var(--ink); color: var(--on-ink-2); font-size: .92rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.site-footer .brand { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-block-start: 36px; padding-block-start: 20px; border-block-start: 1px solid var(--on-ink-rule); font-size: .85rem; }
