/* GlobaChat landing: turquoise (فیروزه) on lapis (لاجورد), same tokens as the dashboard.
   Logical properties only, so the same sheet serves the Persian (RTL) and English (LTR) pages. */

@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2'); }
@font-face { font-family: Vazirmatn; font-weight: 500; font-display: swap; src: url('/fonts/Vazirmatn-Medium.woff2') format('woff2'); }
@font-face { font-family: Vazirmatn; font-weight: 700; font-display: swap; src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2'); }

:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --ink: #16213a;
  --muted: #4b5a73;
  --line: #dbe3e8;
  --lapis: #1b2a4a;
  --lapis-deep: #0b1020;
  --turquoise: #0a7f7c;
  --turquoise-bright: #3cc6c0;
  --turquoise-wash: #e0f2f0;
  --saffron: #e0a526;
  --radius: 10px;
  --wrap: 1120px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Vazirmatn, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.9;
  letter-spacing: 0;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

:focus-visible { outline: 3px solid var(--turquoise-bright); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.icon { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.4rem;
  border-radius: var(--radius); border: 1.5px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--turquoise); color: #fff; }
.btn-primary:hover { background: #086967; }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--turquoise); color: var(--turquoise); }
.btn-small { min-height: 40px; padding: 0 1rem; font-size: .9375rem; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(245, 247, 248, .92); backdrop-filter: blur(8px); border-block-end: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; }
.nav { display: none; gap: 1.75rem; margin-inline-start: 1rem; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .9375rem; }
.nav a:hover { color: var(--turquoise); }
.header-actions { display: flex; align-items: center; gap: .6rem; margin-inline-start: auto; }
.lang { font-size: .875rem; font-weight: 500; color: var(--muted); text-decoration: none; padding: .4rem .6rem; }
.lang:hover { color: var(--turquoise); }
.header-login { display: none; }
@media (min-width: 900px) { .nav { display: flex; } .header-login { display: inline-flex; } }

/* ---------- sections ---------- */
section { padding-block: clamp(3.5rem, 8vw, 6rem); }
h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.35; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.45; font-weight: 700; }
h3 { font-size: 1.125rem; line-height: 1.6; font-weight: 700; }
.lead { color: var(--muted); font-size: 1.125rem; max-width: 36rem; }
.section-head { max-width: 40rem; margin-block-end: 2.5rem; }
.section-head p { color: var(--muted); margin-block-start: .75rem; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5.5rem); }
.hero .wrap { display: grid; gap: 3rem; align-items: center; }
.hero h1 { margin-block-end: 1.25rem; }
.hero .lead { margin-block-end: 2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-note { margin-block-start: 1.25rem; color: var(--muted); font-size: .9375rem; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.1fr 1fr; gap: 3rem; } }

/* The stage: a shop page with the widget, and the owner's phone answering from the messenger.
   Everything inside is sized in em off the stage width, so it scales as one picture. */
.stage { container-type: inline-size; width: 100%; max-width: 560px; margin-inline: auto; }
.stage-art { position: relative; aspect-ratio: 560 / 500; font-size: 2.65cqw; }
.browser {
  position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 82%; height: 84%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 1.1em; overflow: hidden;
  box-shadow: 0 1.2em 3em -1.4em rgba(27, 42, 74, .35);
}
.browser-bar { display: flex; align-items: center; gap: .5em; height: 2.6em; padding-inline: 1em; background: #eef2f4; border-block-end: 1px solid var(--line); }
.browser-bar i { width: .7em; height: .7em; border-radius: 50%; background: #cbd5db; }
.browser-bar span { margin-inline-start: auto; font-size: .85em; color: var(--muted); }
.shop { padding: 1.4em; display: grid; gap: 1em; }
.shop .bar { height: 1.1em; border-radius: .4em; background: #e6ecef; }
.shop .bar.w1 { width: 46%; height: 1.5em; background: #d5dee3; }
.shop .bar.w2 { width: 70%; }
.shop .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9em; margin-block-start: .4em; }
.shop .tile { aspect-ratio: 1 / .8; border-radius: .6em; background: var(--turquoise-wash); }
.shop .tile:nth-child(2) { background: #ece7d6; }
.shop .tile:nth-child(3) { background: #e3e8f2; }

.widget {
  position: absolute; inset-block-end: 1.1em; inset-inline-start: 1.1em; width: 54%;
  background: var(--surface); border-radius: .9em; overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 .8em 2.2em -.8em rgba(27, 42, 74, .45);
}
.widget-head { display: flex; align-items: center; gap: .6em; padding: .8em 1em; background: var(--turquoise); color: #fff; font-weight: 700; font-size: .95em; }
.widget-head .dot { width: .55em; height: .55em; border-radius: 50%; background: #b9f5d4; }
.widget-body { display: grid; gap: .6em; padding: .9em; min-height: 9.5em; align-content: start; font-size: .92em; line-height: 1.7; }

.msg { max-width: 88%; padding: .45em .8em; border-radius: .8em; }
.msg.visitor { justify-self: start; background: var(--turquoise-wash); color: #0b4b49; border-end-start-radius: .2em; }
.msg.agent { justify-self: end; background: var(--lapis); color: #fff; border-end-end-radius: .2em; }

.phone {
  position: absolute; inset-block-end: 0; inset-inline-end: 0; width: 36%; aspect-ratio: 9 / 15.5;
  background: var(--lapis-deep); border-radius: 2em; padding: .5em;
  box-shadow: 0 1.4em 3em -1em rgba(11, 16, 32, .7);
}
.phone-screen { height: 100%; border-radius: 1.6em; background: #14213d; overflow: hidden; display: flex; flex-direction: column; }
.phone-top { padding: 1.3em .9em .7em; font-size: .85em; font-weight: 700; color: #fff; border-block-end: 1px solid rgba(255, 255, 255, .1); display: flex; align-items: center; gap: .6em; }
.phone-top .avatar { width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--turquoise-bright); flex: none; }
.phone-top small { display: block; font-weight: 400; font-size: .8em; color: #9fb0cf; line-height: 1.4; }
.phone-body { display: grid; gap: .55em; padding: .8em .7em; align-content: start; font-size: .78em; line-height: 1.65; }
.pmsg { max-width: 92%; padding: .45em .7em; border-radius: .8em; }
.pmsg.in { justify-self: start; background: #223357; color: #e6edf9; border-end-start-radius: .2em; }
.pmsg.in b { display: block; color: var(--turquoise-bright); font-weight: 700; font-size: .92em; }
.pmsg.reply { justify-self: end; background: var(--turquoise); color: #fff; border-end-end-radius: .2em; }
.pmsg.reply small { display: block; color: #bfeceb; font-size: .85em; }

/* One sequence, once: visitor writes, the phone receives, the owner replies, the visitor sees it. */
@keyframes arrive { from { opacity: 0; transform: translateY(.6em); } to { opacity: 1; transform: none; } }
.seq { animation: arrive .45s ease-out both; animation-delay: var(--at); }
@media (prefers-reduced-motion: reduce) { .seq { animation: none; } html { scroll-behavior: auto; } }

/* ---------- install ---------- */
.install { background: var(--lapis); color: #e6edf9; }
.install .wrap { display: grid; gap: 2.5rem; align-items: center; }
.install h2 { color: #fff; }
.install .section-head p { color: #b4c2dc; }
.facts { display: grid; gap: 1rem; margin-block-start: 1.5rem; }
.facts li { display: flex; gap: .75rem; color: #d3deef; font-size: 1rem; line-height: 1.8; }
.facts .icon { color: var(--turquoise-bright); margin-block-start: .2rem; width: 1.25rem; height: 1.25rem; }
.code { direction: ltr; text-align: left; background: var(--lapis-deep); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 1.4rem 1.5rem; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .9375rem; line-height: 1.8; overflow-x: auto; }
.code .t { color: #8fa4cc; } .code .a { color: var(--turquoise-bright); } .code .v { color: #f1d38a; }
.code-cap { margin-block-start: .75rem; color: #9fb0cf; font-size: .875rem; }
@media (min-width: 900px) { .install .wrap { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* ---------- how it works ---------- */
.steps { display: grid; gap: 2rem; counter-reset: step; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; }
.steps li::before {
  counter-increment: step; content: counter(step, var(--numerals));
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--turquoise); color: #fff; font-weight: 700; line-height: 1;
}
.steps p { color: var(--muted); }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }

/* ---------- messengers ---------- */
.messengers { background: var(--surface); border-block: 1px solid var(--line); }
.channels { display: grid; gap: 0; }
.channel { display: grid; gap: .35rem 2rem; padding-block: 1.4rem; border-block-start: 1px solid var(--line); }
.channel:last-child { border-block-end: 1px solid var(--line); }
.channel h3 { color: var(--turquoise); }
.channel p { color: var(--muted); }
.fineprint { margin-block-start: 1.5rem; color: var(--muted); font-size: .9375rem; max-width: 40rem; }
@media (min-width: 800px) { .channel { grid-template-columns: 11rem 1fr; align-items: baseline; } }

/* ---------- features ---------- */
.features { display: grid; gap: 2.2rem 3rem; }
.feature { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
.feature .icon { color: var(--turquoise); width: 1.7rem; height: 1.7rem; grid-row: span 2; margin-block-start: .15rem; }
.feature p { color: var(--muted); grid-column: 2; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }

/* ---------- faq ---------- */
.faq { max-width: 46rem; }
.faq details { border-block-start: 1px solid var(--line); padding-block: 1.1rem; }
.faq details:last-child { border-block-end: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--turquoise); flex: none; }
.faq details[open] summary::after { content: '−'; }
.faq p { color: var(--muted); margin-block-start: .6rem; }

/* ---------- closing + footer ---------- */
.closing { background: var(--lapis); color: #fff; text-align: center; }
.closing h2 { color: #fff; margin-block-end: .75rem; }
.closing p { color: #b4c2dc; margin-block-end: 2rem; }
.closing .cta-row { justify-content: center; }
.closing .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.closing .btn-ghost:hover { border-color: var(--turquoise-bright); color: var(--turquoise-bright); }
.site-footer { background: var(--lapis-deep); color: #9fb0cf; padding-block: 2rem; font-size: .9375rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer a { text-decoration: none; margin-inline-end: 1.25rem; }
.site-footer a:hover { color: var(--turquoise-bright); }

/* grid children may shrink below their content (the code block scrolls instead of widening the page) */
.hero .wrap > *, .install .wrap > * { min-width: 0; }
.install .wrap, .hero .wrap { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .install .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
