/* PazarCloud marketing site.
 *
 * The palette and type are the PRODUCT's, taken from
 * frontend-v2/src/styles/tokens.css — not a second brand identity. Somebody
 * who clicks "Start free" should land somewhere that looks like the page they
 * came from.
 *
 * RTL: every directional value here is a LOGICAL property
 * (margin-inline, padding-inline, inset-inline, text-align: start/end). There
 * is not one `left` or `right` in this file, which is what makes the Persian
 * and Arabic pages a MIRRORED LAYOUT rather than right-aligned text in a
 * left-to-right frame. Grid and flex follow the inline direction on their own,
 * so the two-column sections swap sides with no per-language rule.
 *
 * MOBILE FIRST: the base rules are the phone. A shopkeeper reads this on a
 * phone, and the desktop layout is the enhancement.
 */

:root {
  --paper: #f8f8f6;
  --paper-raised: #ffffff;
  --ink: #1b2033;
  --ink-soft: #585e72;
  --ink-faint: #9599a9;
  --accent: #2e3868;
  --accent-deep: #1f274a;
  --accent-tint: #eaecf6;
  --line: #e3e3e6;
  --line-strong: #cbccd4;
  --success: #3e7a63;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(27, 32, 51, 0.05), 0 10px 26px rgba(27, 32, 51, 0.07);
  --shadow-lift: 0 2px 6px rgba(27, 32, 51, 0.06), 0 24px 60px rgba(27, 32, 51, 0.13);
  --wrap: 1120px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html[dir='rtl'] {
  --font: 'Vazirmatn', Tahoma, system-ui, sans-serif;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 700;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  z-index: 100;
}
.skip:focus { inset-inline-start: 0; }

:where(a, .btn):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.wrap.narrow { max-width: 760px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease,
    box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 1.05rem;
}

.btn-solid {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(27, 32, 51, 0.18);
}
.btn-solid:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(31, 39, 74, 0.24);
}

.btn-outline {
  border-color: var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-quiet { color: var(--ink-soft); }
.btn-quiet:hover { color: var(--ink); background: var(--accent-tint); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 248, 246, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.08rem;
  margin-inline-end: auto;
}

/* The cube mark (brand-name.md): an inline SVG, bare on this light header. */
.brand-mark {
  width: 26px;
  height: 26px;
  display: block;
  flex: none;
}

.head-nav { display: none; }

.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Sign in stays visible at EVERY width.
 *
 * It used to be hidden below 640px, which got the audience backwards: a
 * shopkeeper who already has an account types the domain on their PHONE, and
 * on a phone the header was the wordmark and "Start free" — an invitation to
 * sign up again, with no way in. It is the narrow screen where the link
 * matters most, not least.
 *
 * It stays QUIET rather than becoming a second button: an existing customer
 * goes looking for it and finds it, and it must not compete with the one
 * thing this page is for. */
.head-actions .btn-quiet {
  padding-inline: 8px;
}

/* A language NAME is written in its own script, whatever the page's script is.
 * Both switchers list all six, so this matters on every page. The face itself
 * is declared per page by build.mjs — see the arabicFallback comment there. */
:lang(fa),
:lang(ar) {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}

/* ── The language switcher in the header ─────────────────────────────────────
 *
 * A native <details>, because the site runs no JavaScript and that is the only
 * disclosure HTML gives you. `list-style: none` on the summary (and the
 * ::-webkit-details-marker rule) removes the default triangle; without both,
 * WebKit and Firefox disagree about the marker. */
.lang-menu {
  position: relative;
}

.lang-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover { color: var(--ink); background: var(--accent-tint); }
.lang-menu > summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.lang-menu[open] > summary { color: var(--ink); background: var(--accent-tint); }

.lang-menu .globe { flex: none; opacity: 0.85; }

.lang-menu > ul {
  position: absolute;
  /* inset-inline-end, so the panel hangs from the correct edge in Persian and
     Arabic without a second rule. */
  inset-inline-end: 0;
  top: calc(100% + 8px);
  z-index: 50;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 168px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 2px;
}

.lang-menu > ul a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.94rem;
  white-space: nowrap;
}
.lang-menu > ul a:hover { background: var(--accent-tint); color: var(--ink); }
.lang-menu > ul a[aria-current='true'] { color: var(--accent); font-weight: 600; }

/* Narrow screens: the MARK carries the identity, the wordmark stands down.
 *
 * Making Sign in visible on a phone added a third thing to a 375px header,
 * and it did not fit — Turkish, Arabic, German and Russian all overflowed,
 * Arabic pushing the button to x=-12. Measured, not guessed.
 *
 * The wordmark is the widest element and the least load-bearing at this size:
 * the mark identifies the page, and everything below it says PazarCloud
 * repeatedly. Shrinking the buttons instead was tried first and did not free
 * enough for "تسجيل الدخول" next to "ابدأ مجاناً". */
@media (max-width: 479px) {
  .brand-name { display: none; }
  .head-actions .btn { padding: 10px 12px; font-size: 0.9rem; }
  /* Reclaimed to pay for the fourth control, in order of how little each
     costs: the wrap's own padding, then the gap between brand and actions.
     German is the binding case — it had 13px free before this. */
  .site-head .wrap { padding-inline: 12px; }
  .head-inner { gap: 10px; }
  .head-actions { gap: 4px; }
  /* The globe alone. The page is already IN the current language, so the code
     is the least load-bearing part of the control, and German needs the room. */
  .lang-menu .lang-code { display: none; }
  .lang-menu > summary { padding: 9px 7px; }

  /* The panel hangs from the HEADER ROW, not from the trigger.
   *
   * Anchored to the trigger it ran off the screen in every LTR language: the
   * globe is the FIRST of the three actions, so a 168px panel right-aligned
   * to it starts at about -68px and the language names are cut in half.
   * Arabic and Persian were fine, which is exactly how a bug like this
   * survives a check that only looks at one direction.
   *
   * Spanning the row instead is direction-agnostic — there is no edge to get
   * wrong — and on a 375px screen a full-width menu is the ordinary shape. */
  .head-inner { position: relative; }
  .lang-menu { position: static; }
  .lang-menu > ul {
    inset-inline: 0;
    min-width: 0;
  }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  padding-block: 56px 64px;
  background:
    radial-gradient(80% 120% at 50% 0%, var(--accent-tint) 0%, rgba(234, 236, 246, 0) 62%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero-inner { text-align: center; }

.hero h1 {
  font-size: clamp(2.05rem, 7.4vw, 3.9rem);
  max-width: 16ch;
  margin-inline: auto;
}

.lede {
  font-size: clamp(1.05rem, 2.6vw, 1.28rem);
  color: var(--ink-soft);
  max-width: 62ch;
  margin-inline: auto;
  margin-top: 20px;
}

.hero .actions { justify-content: center; }

.note {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--ink-faint);
}
.note a { color: var(--accent); }

/* ── Bands ────────────────────────────────────────────────────────────────── */

.band {
  padding-block: 64px;
}

.problem {
  background: var(--accent-deep);
  color: #e9ebf5;
}
.problem h2 {
  color: #fff;
  font-size: clamp(1.55rem, 4.6vw, 2.35rem);
  margin-bottom: 24px;
}
.problem p { color: #b9bfd8; }
.problem .closing {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.12rem;
  font-weight: 600;
}

.pricing {
  background: var(--paper-raised);
  border-block: 1px solid var(--line);
  text-align: center;
}
.pricing h2 { font-size: clamp(1.55rem, 4.6vw, 2.3rem); margin-bottom: 22px; }
.pricing p { color: var(--ink-soft); }
.pricing .actions { justify-content: center; }

/* ── Feature sections ─────────────────────────────────────────────────────── */

.feature { padding-block: 64px; }
.feature.alt { background: var(--paper-raised); border-block: 1px solid var(--line); }
.feature.plain { background: var(--accent-tint); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.feature h2 {
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  margin-bottom: 20px;
  max-width: 20ch;
}

.feature .copy > p { color: var(--ink-soft); }

.split {
  display: grid;
  gap: 36px;
  align-items: center;
}

.points {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.points li {
  display: grid;
  gap: 2px;
  padding-inline-start: 26px;
  position: relative;
}

/* The tick is inset-inline-start, so it sits on the correct side of the text
   in Arabic and Persian without a second rule. */
.points li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0.85;
}

.points strong { font-weight: 600; }
.points span { color: var(--ink-soft); font-size: 0.96rem; }

.points.cols { margin-top: 28px; }

.aside-note {
  margin-top: 30px;
  padding: 18px 20px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--success);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* ── Screenshots ──────────────────────────────────────────────────────────── */

.shot {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}

.shot img { width: 100%; }

/* ── Coming soon ──────────────────────────────────────────────────────────── */

.coming {
  padding-block: 60px;
  background: var(--paper-raised);
  border-block: 1px solid var(--line);
}
.coming h2 { font-size: clamp(1.45rem, 4.2vw, 2.1rem); margin-bottom: 18px; }
.coming p { color: var(--ink-soft); }
.coming .contact { margin-top: 20px; font-weight: 600; color: var(--ink); }
.coming .contact a { color: var(--accent); }

/* ── Final call to action ─────────────────────────────────────────────────── */

.cta {
  padding-block: 76px;
  text-align: center;
  background:
    radial-gradient(70% 130% at 50% 100%, var(--accent-tint) 0%, rgba(234, 236, 246, 0) 65%),
    var(--paper);
}
.cta h2 { font-size: clamp(1.7rem, 5.2vw, 2.6rem); }
.cta .lede { margin-top: 18px; }
.cta .actions { justify-content: center; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.site-foot {
  background: var(--accent-deep);
  color: #b9bfd8;
  padding-block: 44px 26px;
}

.foot-inner {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr 1fr;
}

.foot-col h3 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #fff;
  margin-bottom: 12px;
}

.foot-col ul,
.langs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.foot-col a,
.langs a {
  color: #b9bfd8;
  text-decoration: none;
  font-size: 0.94rem;
}
.foot-col a:hover,
.langs a:hover { color: #fff; text-decoration: underline; }

.langs ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}
.langs a[aria-current='true'] { color: #fff; font-weight: 600; }

.foot-legal {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.86rem;
  color: #8b93b4;
}

/* ── Wider than a phone ───────────────────────────────────────────────────── */

@media (min-width: 640px) {
  .foot-inner { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .langs ul { grid-template-columns: 1fr; }
  .points.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
  .head-actions .btn-quiet { padding-inline: 20px; }
}

@media (min-width: 900px) {
  body { font-size: 18px; }

  .head-nav {
    display: flex;
    gap: 26px;
    font-size: 0.95rem;
    font-weight: 500;
  }
  .head-nav a { text-decoration: none; color: var(--ink-soft); }
  .head-nav a:hover { color: var(--ink); }

  .hero { padding-block: 96px 104px; }
  .band, .feature { padding-block: 96px; }
  .cta { padding-block: 112px; }

  /* Two columns. In RTL the browser places the first grid item on the right,
     so the layout mirrors with no extra rule — `.reverse` then flips the
     visual order relative to that, in whichever direction the page runs. */
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 60px;
  }
  .split.reverse .copy { order: 2; }
  .split.reverse .shot { order: 1; }
}

/* ── The guide ─────────────────────────────────────────────────────────────
 *
 * A READING page, not a selling page. The measure is narrower than the
 * marketing sections and the type is a little larger, because the visitor is
 * here to read a thousand words about their own money rather than to scan
 * for a price — and on a phone, which is where a shopkeeper reads anything
 * at all. Every directional value is logical, so Persian and Arabic mirror.
 */

.guide { padding-block: 40px 72px; }

.guide h1 {
  font-size: clamp(1.5rem, 5.2vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.guide .lede {
  font-size: clamp(1.02rem, 3.2vw, 1.16rem);
  color: var(--ink-soft);
  margin: 0 0 22px;
}

.guide-kicker {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* The one paragraph the application also shows behind its "?" — set apart so
   a reader who arrived from the app recognises where they have landed. */
.guide-summary {
  margin: 0 0 34px;
  padding: 16px 18px;
  background: var(--accent-tint);
  border-radius: var(--radius);
  border-inline-start: 3px solid var(--accent);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.7;
}

.guide-crumb { margin-bottom: 18px; font-size: 0.9rem; }
.guide-crumb a { color: var(--accent); text-decoration: none; }
.guide-crumb a:hover { text-decoration: underline; }

.guide-section { margin-block: 34px; }

.guide-section h2 {
  font-size: clamp(1.14rem, 3.8vw, 1.36rem);
  line-height: 1.35;
  margin: 0 0 12px;
}

.guide-section p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.78;
}

.guide-section .points { margin-top: 18px; }

.guide-back {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.guide-back a { color: var(--accent); font-weight: 600; text-decoration: none; }
.guide-back a:hover { text-decoration: underline; }

.guide-index-heading {
  margin: 34px 0 18px;
  font-size: clamp(1.1rem, 3.6vw, 1.3rem);
}

.guide-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.guide-card {
  display: block;
  padding: 18px 20px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
}

.guide-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); }

.guide-card-num {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.guide-card-title {
  display: block;
  font-weight: 600;
  font-size: 1.04rem;
  line-height: 1.4;
  margin-bottom: 8px;
}

.guide-card-lede {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.guide-foot .foot-inner { grid-template-columns: 1fr; gap: 28px; }

@media (min-width: 720px) {
  .guide-foot .foot-inner { grid-template-columns: 1fr auto; }
}
