/* The visitor page at / («آرام»): the identity, a word about help, the widget.
   Colors come from tokens.css only; layout uses logical properties. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; min-block-size: 100vh; min-block-size: 100dvh; background: var(--paper); color: var(--ink);
  border-block-start: 3px solid var(--accent); font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
[lang="fa"] { font-family: var(--font-fa); line-height: 1.75; }
[lang="en"] { font-family: var(--font-en); line-height: 1.55; }
h1, h2, p { margin: 0; }
img, svg { max-inline-size: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
::selection { background: var(--brand-tint-2); color: var(--ink); }

.sprite { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.i {
  inline-size: 20px; block-size: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
[dir="rtl"] .flip { transform: scaleX(-1); }

.l-shell {
  display: flex; flex-direction: column; min-block-size: calc(100vh - 3px); min-block-size: calc(100dvh - 3px);
  inline-size: 100%; max-inline-size: 1120px; margin-inline: auto; padding-inline: var(--s-5);
}

.l-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); block-size: 72px; }
.l-id { display: inline-flex; align-items: center; gap: 10px; min-inline-size: 0; font-weight: 600; font-size: 14.5px; }
.l-id > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-mark { inline-size: 28px; block-size: 28px; flex: none; border-radius: 8px; object-fit: contain; }
.l-lang {
  flex: none; padding: 6px 12px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; color: var(--ink-2);
  text-decoration: none; border: 1px solid var(--line);
}
.l-lang:hover { background: var(--surface-2); color: var(--ink); }

.l-main {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding-block: var(--s-8) var(--s-9);
}
.l-logo img { display: block; block-size: 72px; inline-size: auto; max-inline-size: min(280px, 100%); object-fit: contain; border-radius: 18px; }
.l-eyebrow { margin-block-start: var(--s-5); font-size: 13.5px; font-weight: 500; color: var(--brand-ink); }
.l-title { margin-block-start: var(--s-2); max-inline-size: 22ch; font-size: clamp(32px, 6vw, 52px); font-weight: 600; line-height: 1.35; text-wrap: balance; }
.l-title:lang(en) { line-height: 1.1; letter-spacing: -.03em; }
.l-lead { margin-block-start: var(--s-3); max-inline-size: 52ch; font-size: 17px; line-height: 1.95; color: var(--ink-2); }
.l-lead:lang(en) { line-height: 1.6; }

.l-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-block-start: var(--s-5); }
.l-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-block-size: 48px; padding-inline: 22px; border-radius: var(--r); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.2; text-decoration: none;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.l-btn:hover { background: var(--surface-2); }
.l-btn-primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.l-btn-primary:hover { background: color-mix(in oklch, var(--accent) 86%, var(--ink)); }

.l-ways {
  list-style: none; margin: var(--s-8) 0 0; padding: 0; inline-size: 100%; max-inline-size: 880px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border-block: 1px solid var(--line); text-align: start;
}
.l-ways li { display: flex; gap: 12px; padding: var(--s-4) var(--s-3); background: var(--paper); min-inline-size: 0; }
.l-ways .i { margin-block-start: 3px; color: var(--brand-ink); stroke-width: 1.5; }
.l-ways h2 { font-size: 15px; font-weight: 600; line-height: 1.5; }
.l-ways p { margin-block-start: 4px; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.l-ways p:lang(en) { line-height: 1.55; }

.l-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4);
  padding-block: var(--s-4); border-block-start: 1px solid var(--line); font-size: 13px; color: var(--ink-3);
}
.l-foot nav { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.l-foot a { display: inline-flex; align-items: center; min-block-size: 44px; color: var(--ink-2); text-decoration: none; }
.l-foot a:hover { text-decoration: underline; }

@media (max-width: 767px) {
  .l-shell { padding-inline: var(--s-3); }
  .l-top { block-size: 60px; }
  .l-main { padding-block: var(--s-6) var(--s-8); }
  .l-logo img { block-size: 56px; }
  .l-lead { font-size: 15.5px; }
  .l-actions { inline-size: 100%; flex-direction: column; }
  .l-btn { inline-size: 100%; }
  .l-ways { grid-template-columns: minmax(0, 1fr); margin-block-start: var(--s-6); }
  .l-ways li { padding-inline: 0; }
  /* The last block keeps clear of the chat button in the corner. */
  .l-foot { padding-block-end: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
