/* Shared style of the public sites (cantabile.ir, Persian; setti.contact, English).
   Same identity as the portal: charcoal / grey / mist, red only as the brand dot and "live". */
@font-face { font-family: "Vazir"; src: url("fonts/Vazir-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazir"; src: url("fonts/Vazir-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazir"; src: url("fonts/Vazir-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazir"; src: url("fonts/Vazir-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --bg: #EEEEED; --surface: #FFFFFF; --surface-2: #E6E6E4; --line: #E2E2DF; --line-strong: #CFCFCB;
  --ink: #292A2D; --muted: #6C6E72; --subtle: #9A9CA0; --red: #E53935; --red-soft: #FDEDEC;
  --btn: #292A2D; --btn-ink: #FFFFFF; --radius: 16px; --radius-sm: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141517; --surface: #1C1D20; --surface-2: #24252A; --line: #2D2E33; --line-strong: #3A3B41;
    --ink: #EDEDEB; --muted: #A0A2A6; --subtle: #74767B; --red: #F0524D; --red-soft: rgba(240, 82, 77, .12);
    --btn: #EDEDEB; --btn-ink: #141517; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
html[lang="fa"] body { font-family: "Vazir", Tahoma, system-ui, sans-serif; line-height: 1.9; }
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3, html[lang="fa"] .btn { font-weight: 700; }
html[lang="fa"] .hero h1 { font-weight: 900; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding-inline: 22px; }
@media (max-width: 640px) { .wrap { padding-inline: 20px; } }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; font-size: 17px; }
.brand svg { width: 46px; height: 25px; color: var(--ink); }
.top nav { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }
.top nav a { text-decoration: none; color: var(--muted); padding: 7px 10px; border-radius: 8px; font-size: 15px; }
.top nav a:hover { color: var(--ink); background: var(--surface-2); }
@media (max-width: 640px) { .top nav a.hide-sm { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--radius-sm); border: 1px solid var(--btn); background: var(--btn); color: var(--btn-ink); font-weight: 650; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14.5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); display: inline-block; flex: none; }

/* hero */
.hero { padding-block: 72px 48px; }  /* vertical only: the side gutters come from .wrap */
.hero h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 18px; font-weight: 750; max-width: 16em; }
html[lang="fa"] .hero h1 { letter-spacing: 0; line-height: 1.4; }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 36em; margin: 0 0 28px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }

/* sections */
section { padding: 40px 0; }
h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 8px; letter-spacing: -.01em; }
html[lang="fa"] h2 { letter-spacing: 0; }
.sub { color: var(--muted); margin: 0 0 26px; max-width: 40em; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.icon { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; margin-bottom: 14px; }
.icon svg { width: 20px; height: 20px; }
.steps { counter-reset: s; display: grid; gap: 12px; }
.steps li { list-style: none; counter-increment: s; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before { content: counter(s, var(--counter-style, decimal)); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
html[lang="fa"] .steps { --counter-style: persian; }
.steps { padding: 0; margin: 0; }

/* download */
.download { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .download { grid-template-columns: 1fr; } }
.apk { display: flex; flex-direction: column; gap: 12px; }
.meta { font-size: 13.5px; color: var(--muted); }
.meta code { font-size: 12px; word-break: break-all; direction: ltr; unicode-bidi: isolate; }
.badge { display: inline-block; font-size: 12.5px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; }
details + details { margin-top: 8px; }
summary { cursor: pointer; font-weight: 600; }
details p, details ol { color: var(--muted); font-size: 15px; margin: 10px 0 0; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; margin-top: 30px; }
footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---- hero with illustration ------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 36px; align-items: center; }
.hero > * { min-width: 0; }  /* Safari: let the text column shrink to the screen */
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); padding-block-start: 44px; } .hero .art { order: -1; max-width: 460px; } }
html, body { overflow-x: hidden; }
.hero h1, .hero .lead { overflow-wrap: break-word; }
.split > * { min-width: 0; }
.hero-bg { background: radial-gradient(1200px 420px at 85% 0%, color-mix(in srgb, var(--red) 9%, transparent), transparent 70%); }
.art { width: 100%; }
.art svg { width: 100%; height: auto; display: block; overflow: hidden; }
.stat-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); font-size: 14px; }
.stat-row b { display: block; font-size: 22px; color: var(--ink); line-height: 1.2; }

/* call window in the illustration */
.win { fill: var(--surface); stroke: var(--line-strong); }
.win-bar { fill: var(--surface-2); }
.tile { fill: var(--surface-2); }
.tile-face { fill: var(--line-strong); }
.tile-me { fill: color-mix(in srgb, var(--ink) 10%, var(--surface-2)); }
.speak { fill: none; stroke: var(--red); stroke-width: 2.5; opacity: 0; }
.rec-dot { fill: var(--red); }
.label { font: 600 11px/1 Inter, system-ui, sans-serif; fill: var(--muted); }
html[lang="fa"] .label { font-family: "Vazir", Tahoma, sans-serif; }
.route { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 5 7; }
.route.live { stroke: var(--ink); opacity: .55; }
.node { fill: var(--surface); stroke: var(--line-strong); }
.bar { fill: var(--ink); opacity: .75; }

/* bands between sections */
.band { background: var(--surface); border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--ink); -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z"/></svg>') center / contain no-repeat; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z"/></svg>') center / contain no-repeat; }
.card { transition: transform .25s ease, border-color .25s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.cta { text-align: center; padding: 48px 20px; border-radius: var(--radius); background: var(--ink); color: var(--bg); }
.cta h2 { color: var(--bg); }
.cta p { color: color-mix(in srgb, var(--bg) 75%, transparent); margin: 0 auto 22px; max-width: 34em; }
.cta .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* ---- motion (gentle; none when the visitor asks for less) --------------------- */
@keyframes wave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes speak { 0%, 22% { opacity: 0; } 28%, 45% { opacity: 1; } 52%, 100% { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes flow { to { stroke-dashoffset: -48; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.speak { animation: speak 8s ease-in-out infinite; }
.speak.s2 { animation-delay: 2s; } .speak.s3 { animation-delay: 4s; } .speak.s4 { animation-delay: 6s; }
.rec-dot, .dot { animation: pulse 1.6s ease-in-out infinite; }
.route.live { animation: flow 2.4s linear infinite; }
.reveal { animation: rise .7s ease both; }
.reveal.d1 { animation-delay: .08s; } .reveal.d2 { animation-delay: .16s; } .reveal.d3 { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
