/* Vision Pouya — "Obsidian & Gold" design system.
   Mobile-first; RTL-aware via logical properties; transform/opacity motion only.
   Palette/radius tokens are injected by the layout from content/settings/site.json. */

/* ---------------------------------------------------------------- fonts -- */
@font-face { font-family: 'Vazirmatn'; src: url('/assets/fonts/Vazirmatn-100-900-arabic.woff2') format('woff2');
  font-weight: 100 900; font-display: swap; unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE80-FEFC; }
@font-face { font-family: 'Vazirmatn'; src: url('/assets/fonts/Vazirmatn-100-900-latin.woff2') format('woff2');
  font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-var-latin.woff2') format('woff2');
  font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+2010-2027, U+20AC; }

/* ---------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, video, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

:root {
  --font-fa: 'Vazirmatn', 'Segoe UI', system-ui, sans-serif;
  --font-latin: 'Inter', system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4.5vw, 48px);
  --maxw: 1120px;
  --ring: 1px solid rgb(212 168 67 / .16);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
  --topbar-h: 64px;
}

html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: 1.0625rem;
  line-height: 1.75;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-wrap: break-word;
}
:lang(fa) body, [dir="rtl"] body { font-family: var(--font-fa); line-height: 1.9; }
.ltr { direction: ltr; unicode-bidi: isolate; font-family: var(--font-latin); }

::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -48px; z-index: 200;
  background: var(--gold); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  text-decoration: none; font-weight: 700; transition: top .15s var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------- topbar -- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 16px;
  height: var(--topbar-h);
  padding-inline: var(--gutter);
  background: rgb(11 11 15 / .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: var(--ring);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark { border-radius: 50%; border: 1.5px solid var(--gold); flex: none; }
.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.brand-latin { color: var(--ink-dim); font-size: .8em; font-weight: 500; margin-inline-start: 6px; }
/* small phones: brand yields, the lang switch never does */
@media (max-width: 479.98px) {
  .topbar { gap: 10px; }
  .brand-latin { display: none; }
  .brand-name { font-size: .95rem; }
  .lang-switch a { padding: 7px 8px; font-size: .78rem; }
}

.nav-desktop { display: none; gap: 4px; margin-inline-start: auto; }
.nav-desktop a {
  text-decoration: none; color: var(--ink-dim); padding: 8px 14px; border-radius: 999px;
  transition: color .18s var(--ease-out), background-color .18s var(--ease-out);
}
.nav-desktop a:hover { color: var(--ink); background: var(--bg-elev); }
.nav-desktop a[aria-current="page"] { color: var(--gold-bright); }

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.nav-desktop + .topbar-actions { margin-inline-start: 0; }

/* Language switch is ALWAYS visible — never buried in the burger menu.
   Mobile shows compact codes (FA/DE/EN); desktop shows full names. */
.lang-switch { display: inline-flex; flex: none; gap: 2px; border: var(--ring); border-radius: 999px; padding: 3px; }
.lang-switch a {
  position: relative;
  text-decoration: none; color: var(--ink-dim); font-size: .82rem; padding: 7px 9px;
  border-radius: 999px; transition: color .18s, background-color .18s;
}
/* invisible hit-area extension: the pill stays compact, the touch target is ≥44px */
.lang-switch a::after { content: ""; position: absolute; inset: -7px -1px; }
.lang-switch .lang-long { display: none; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--gold); color: var(--bg); font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; font-size: .95rem; text-decoration: none; line-height: 1.2;
  transition: transform .18s var(--ease-out), background-color .18s, box-shadow .18s, border-color .18s;
}
.btn:active { transform: scale(.97); }
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-bright); box-shadow: 0 4px 24px rgb(212 168 67 / .35); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid rgb(212 168 67 / .4); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-follow { display: none; padding: 8px 18px; font-size: .88rem; }

.nav-burger {
  display: grid; place-content: center; gap: 5px; width: 44px; height: 44px;
  background: none; border: var(--ring); border-radius: 12px; cursor: pointer;
}
.nav-burger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .22s var(--ease-out), opacity .22s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------- drawer -- */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 110; background: rgb(0 0 0 / .55);
  opacity: 0; transition: opacity .28s var(--ease-out);
}
.drawer-overlay.open { opacity: 1; }
.drawer {
  position: fixed; z-index: 120; top: 0; bottom: 0; inset-inline-end: 0;
  width: min(84vw, 340px);
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-elev);
  border-inline-start: var(--ring);
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top));
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(100%);
  transition: transform .28s var(--ease-out);
}
[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.open { transform: translateX(0); }
.drawer-close {
  align-self: flex-end; width: 44px; height: 44px; font-size: 26px; line-height: 1;
  background: none; border: var(--ring); border-radius: 12px; cursor: pointer; color: var(--ink);
}
.drawer-links { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.drawer-links a {
  text-decoration: none; color: var(--ink); font-size: 1.25rem; font-weight: 700;
  padding: 13px 10px; border-radius: 12px;
  transition: background-color .18s, color .18s;
}
.drawer-links a:hover { background: var(--bg-elev2); }
.drawer-links a[aria-current="page"] { color: var(--gold-bright); }
.drawer-links .drawer-minor { font-size: .95rem; font-weight: 500; color: var(--ink-dim); padding-block: 9px; }
.drawer-cta { margin-top: auto; }

/* ----------------------------------------------------------------- hero -- */
.hero { padding: clamp(40px, 9vw, 96px) var(--gutter) clamp(28px, 5vw, 56px); }
.hero-inner { max-width: var(--maxw); margin-inline: auto; text-align: center; }
.hero-avatar { display: inline-block; padding: 5px; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--gold), rgb(212 168 67 / .15), var(--gold-bright), var(--gold)); }
.hero-avatar img { border-radius: 50%; width: clamp(120px, 26vw, 168px); height: auto; aspect-ratio: 1; object-fit: cover; }
.hero-avatar-sm img { width: 116px; }
.hero-title {
  font-size: clamp(2.1rem, 8vw, 4rem); font-weight: 700; line-height: 1.22;
  margin-top: 26px; letter-spacing: -.01em;
  background: linear-gradient(100deg, var(--ink) 30%, var(--gold-bright) 65%, var(--ink) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-thesis { color: var(--ink-dim); font-size: clamp(1.05rem, 3vw, 1.3rem); max-width: 34em; margin: 16px auto 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; }

/* ------------------------------------------------------------- sections -- */
.section { padding: clamp(28px, 5vw, 56px) var(--gutter); max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-title {
  font-size: clamp(1.5rem, 5vw, 2.25rem); font-weight: 700; margin-bottom: 22px;
  display: flex; align-items: center; gap: 14px;
}
.section-title::before {
  content: ''; width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2.5px solid var(--gold);
}
.link-more { color: var(--gold-bright); text-decoration: none; font-weight: 500; }
.link-more:hover { text-decoration: underline; }

.page-head { padding: clamp(40px, 8vw, 80px) var(--gutter) 0; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; text-align: center; }
.page-title { font-size: clamp(1.9rem, 7vw, 3rem); font-weight: 700; }
.page-intro { color: var(--ink-dim); margin-top: 10px; font-size: 1.1rem; }
.page-404 { padding-bottom: 80px; }
.page-404 .btn { margin-top: 24px; }
.err-code { font-size: clamp(4rem, 18vw, 8rem); font-weight: 700; color: var(--gold); opacity: .35; line-height: 1; }

/* ---------------------------------------------------------------- bento -- */
.bento { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .card-big { grid-column: span 2; }
  .bento-even .card-big { grid-column: span 1; }
}
@media (min-width: 960px) { .bento { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .bento .card-big { grid-column: span 2; grid-row: span 2; } }

.card {
  background: var(--bg-elev); border: var(--ring); border-radius: var(--radius);
  overflow: hidden; position: relative;
  transition: transform .18s var(--ease-out), border-color .18s, box-shadow .18s;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); border-color: rgb(212 168 67 / .5);
    box-shadow: 0 12px 40px rgb(0 0 0 / .45); }
}
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-elev2); }
.card-big .card-media { aspect-ratio: 16 / 11; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-video img { filter: brightness(.85); }
.play-ring {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px;
  display: grid; place-content: center; border-radius: 50%;
  border: 2px solid var(--gold); background: rgb(11 11 15 / .55);
  color: var(--gold-bright); backdrop-filter: blur(4px);
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.card-type {
  align-self: flex-start; font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  color: var(--neon); text-transform: uppercase;
}
.card-title { font-size: 1.15rem; font-weight: 700; line-height: 1.45; }
.card-big .card-title { font-size: 1.45rem; }
.card-excerpt { color: var(--ink-dim); font-size: .95rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* -------------------------------------------------------------- pillars -- */
.pillars { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { background: var(--bg-elev); border: var(--ring); border-radius: var(--radius); padding: 26px 24px; }
.pillar-ring { display: block; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--gold); margin-bottom: 16px;
  box-shadow: 0 0 18px rgb(212 168 67 / .35); }
.pillar h3 { font-size: 1.2rem; margin-bottom: 8px; }
.pillar p { color: var(--ink-dim); font-size: .97rem; }

/* ---------------------------------------------------------- content page -- */
.prose-page { max-width: 760px; margin-inline: auto; padding: clamp(24px, 5vw, 48px) var(--gutter); }
.prose-head { text-align: center; margin-bottom: 28px; }
.prose-title { font-size: clamp(1.7rem, 6vw, 2.6rem); font-weight: 700; line-height: 1.3; margin-top: 10px; }
.prose-excerpt { color: var(--ink-dim); font-size: 1.12rem; margin-top: 12px; }
.prose-meta { color: var(--ink-dim); font-size: .88rem; margin-top: 14px; }
.prose-cover { border-radius: var(--radius); overflow: hidden; border: var(--ring); margin-bottom: 28px; }
.prose { font-size: 1.0925rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { font-weight: 700; line-height: 1.4; margin-top: 1.8em; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.25rem; }
.prose a { color: var(--gold-bright); text-underline-offset: 3px; }
.prose blockquote {
  border-inline-start: 3px solid var(--gold); padding-inline-start: 18px;
  color: var(--ink-dim); font-style: italic;
}
.prose code { background: var(--bg-elev2); border-radius: 6px; padding: 2px 7px; font-size: .9em; }
.prose pre { background: var(--bg-elev); border: var(--ring); border-radius: var(--radius);
  padding: 18px; overflow-x: auto; direction: ltr; }
.prose img { border-radius: var(--radius); }
.prose hr { border: 0; border-top: var(--ring); }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose-legal h2 { font-size: 1.2rem; }
.prose-follow { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; justify-content: center; }

.phone-frame {
  max-width: 340px; margin: 0 auto 28px; border-radius: 28px; overflow: hidden;
  border: 1.5px solid rgb(212 168 67 / .45); background: #000;
  box-shadow: 0 18px 60px rgb(0 0 0 / .5);
}
.phone-frame video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; }

.photo-stack { display: grid; gap: 16px; margin-bottom: 28px; }
.photo-stack figure { border-radius: var(--radius); overflow: hidden; border: var(--ring); }

.tag-chips, .filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.filter-bar { margin: 0 0 24px; }
.filter-sep { flex-basis: 100%; height: 0; }
@media (min-width: 720px) { .filter-sep { flex-basis: 0; width: 1px; align-self: stretch; background: rgb(212 168 67 / .2); } }
.chip {
  display: inline-flex; padding: 6px 14px; border-radius: 999px; text-decoration: none;
  border: var(--ring); color: var(--ink-dim); font-size: .88rem;
  transition: color .18s, border-color .18s, background-color .18s;
}
.chip:hover { color: var(--ink); border-color: var(--gold); }
.chip-active { background: var(--gold); color: var(--bg); font-weight: 700; border-color: var(--gold); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 36px; }
.page-count { color: var(--ink-dim); }

.empty-state {
  text-align: center; color: var(--ink-dim); padding: 48px 20px;
  border: 1.5px dashed rgb(212 168 67 / .3); border-radius: var(--radius);
}

/* -------------------------------------------------------------- contact -- */
.contact-cards { display: grid; gap: 16px; grid-template-columns: 1fr; max-width: 760px; margin-inline: auto; }
@media (min-width: 640px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
.contact-card {
  background: var(--bg-elev); border: var(--ring); border-radius: var(--radius);
  padding: 28px 24px; text-decoration: none;
  transition: transform .18s var(--ease-out), border-color .18s;
}
@media (hover: hover) { .contact-card:hover { transform: translateY(-3px); border-color: rgb(212 168 67 / .5); } }
.contact-card h2 { font-size: 1.1rem; margin-bottom: 6px; }
.contact-card p { color: var(--gold-bright); }
.contact-note { text-align: center; color: var(--ink-dim); margin-top: 24px; }

/* --------------------------------------------------------------- footer -- */
.footer { border-top: var(--ring); margin-top: clamp(40px, 8vw, 80px);
  padding: clamp(32px, 6vw, 56px) var(--gutter) calc(24px + env(safe-area-inset-bottom)); }
.footer-inner { max-width: var(--maxw); margin-inline: auto; display: grid; gap: 28px; }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { border-radius: 50%; border: 1.5px solid var(--gold); }
.footer-tagline { color: var(--ink-dim); }
.footer-cols { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-cols { grid-template-columns: repeat(3, auto); justify-content: space-between; } }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: var(--ink-dim); text-decoration: none; }
.footer-nav a:hover { color: var(--gold-bright); }
.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact a { color: var(--ink-dim); text-decoration: none; }
.footer-contact a:hover { color: var(--gold-bright); }
.footer-copy { color: var(--ink-dim); font-size: .85rem; border-top: var(--ring); padding-top: 20px; }

/* ------------------------------------------------------------- chat FAB -- */
.chat-fab {
  position: fixed; z-index: 130;
  inset-inline-end: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-content: center;
  background: var(--bg-elev); color: var(--gold-bright);
  border: 2px solid var(--gold); cursor: pointer;
  box-shadow: 0 8px 30px rgb(0 0 0 / .5), 0 0 22px rgb(212 168 67 / .22);
  transition: transform .18s var(--ease-out), box-shadow .18s;
}
[dir="rtl"] .chat-fab { inset-inline-end: auto; inset-inline-start: max(18px, env(safe-area-inset-left)); }
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgb(0 0 0 / .55), 0 0 30px rgb(79 227 193 / .3); }

/* ------------------------------------------------------------ chat sheet -- */
/* Mobile: full-screen viewport takeover per Hive strict rules; keyboard
   tracked with --vvh/--vv-top so the input bar sits 0px above the keyboard. */
.chat-panel {
  position: fixed; z-index: 140; inset: 0; width: 100%;
  height: 100vh; height: 100dvh; height: var(--vvh, 100dvh);
  top: var(--vv-top, 0);
  display: flex; flex-direction: column;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform .34s var(--ease-sheet);
  touch-action: none;
  will-change: transform;
}
.chat-panel.open { transform: translateY(0); }
.chat-panel[hidden] { display: none; }

.chat-head {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  border-bottom: var(--ring); background: var(--bg-elev);
}
.chat-head-avatar { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--gold); }
.chat-head-info { min-width: 0; flex: 1; }
.chat-head-title { font-weight: 700; font-size: 1rem; line-height: 1.3; }
/* AI disclosure lives HERE, in the head — never below the input bar (owner order) */
.chat-head-note { font-size: .72rem; color: var(--ink-dim); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-provider {
  display: none; font-size: .72rem; color: var(--neon); font-weight: 500;
}
.chat-provider.show { display: block; }
.chat-head button {
  width: 40px; height: 40px; flex: none; display: grid; place-content: center;
  background: none; border: var(--ring); border-radius: 10px; cursor: pointer; color: var(--ink);
  font-size: 18px;
}

.chat-list {
  flex: 1 1 0; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y; overscroll-behavior: contain;
  padding: 18px 16px; display: flex; flex-direction: column; gap: 12px;
}
.chat-msg { max-width: 84%; padding: 11px 15px; border-radius: 18px;
  white-space: pre-wrap; font-size: 1rem; line-height: 1.65; }
.chat-msg-user { align-self: flex-end; background: var(--gold); color: var(--bg);
  border-end-end-radius: 6px; font-weight: 500; }
[dir="rtl"] .chat-msg-user { align-self: flex-start; }
.chat-msg-bot { align-self: flex-start; background: var(--bg-elev); border: var(--ring);
  border-end-start-radius: 6px; }
[dir="rtl"] .chat-msg-bot { align-self: flex-end; }
.chat-msg-error { border-color: var(--danger); color: var(--danger); }
.chat-typing { display: inline-flex; gap: 5px; padding: 6px 2px; }
.chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-dim);
  animation: vp-typing 1.1s infinite ease-in-out; }
.chat-typing i:nth-child(2) { animation-delay: .18s; }
.chat-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes vp-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-5px); opacity: 1; } }

.chat-inputbar {
  flex: none; display: flex; align-items: flex-end; gap: 10px;
  padding: 8px 12px;
  /* NO band, NO strip: just the pill + send on the panel background.
     Keyboard closed → safe-area padding; keyboard open → JS sets --kb-pad
     to 0px and the pill sits EXACTLY on the keyboard (owner order). */
  padding-bottom: var(--kb-pad, calc(10px + env(safe-area-inset-bottom)));
  border-top: 0; background: var(--bg);
}
.chat-input {
  flex: 1; resize: none; max-height: 120px; min-height: 44px;
  background: var(--bg); border: var(--ring); border-radius: 22px;
  padding: 10px 16px; color: var(--ink); line-height: 1.5;
  font-size: 16px; /* ≥16px = no iOS zoom (strict rule 3) */
}
.chat-input:focus-visible { outline: 2px solid var(--gold); outline-offset: 0; }
.chat-send {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-content: center; border: 0; cursor: pointer;
  background: var(--gold); color: var(--bg);
  transition: transform .15s var(--ease-out), background-color .15s;
}
.chat-send:hover { background: var(--gold-bright); }
.chat-send:active { transform: scale(.92); }
.chat-send:disabled { opacity: .45; cursor: default; }
.chat-send svg { transform: rotate(0); }
[dir="rtl"] .chat-send svg { transform: rotate(180deg); }

/* Desktop: floating card, page stays visible */
@media (min-width: 640px) {
  .chat-panel {
    inset: auto; inset-inline-end: 24px; bottom: 24px; top: auto;
    width: 400px; height: min(640px, calc(100vh - 96px));
    border: var(--ring); border-radius: 20px; overflow: hidden;
    box-shadow: 0 24px 80px rgb(0 0 0 / .6);
    transform: translateY(24px); opacity: 0;
    transition: transform .26s var(--ease-out), opacity .26s var(--ease-out);
  }
  [dir="rtl"] .chat-panel { inset-inline-end: auto; inset-inline-start: 24px; }
  .chat-panel.open { transform: translateY(0); opacity: 1; }
  .chat-head { padding-top: 12px; }
  .chat-inputbar { padding-bottom: 10px; }
}

/* --------------------------------------------------------------- motion -- */
.reveal { opacity: 0; transform: translateY(14px);
  transition: opacity .48s var(--ease-out), transform .48s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.no-io .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important;
    animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------- desktop -- */
@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .lang-switch .lang-long { display: inline; }
  .lang-switch .lang-abbr { display: none; }
  .lang-switch a { padding: 4px 10px; }
  .btn-follow { display: inline-flex; }
  .nav-burger { display: none; }
  .drawer, .drawer-overlay { display: none; }
}
