/* حكايتي — design system */
:root {
  --bg: #faf8f5;
  --ink: #0a0a0a;
  --muted: #55524d;
  --line: #0a0a0a;
  --card: #ffffff;
  --brand: #7c3aed;
  --brand-soft: #ede7fd;
  --pink: #fce4ef;
  --blue: #e0effc;
  --lilac: #ece6fd;
  --yellow: #fdf3c4;
  --rose: #fde2e2;
  --mint: #dcf7e8;
  --green: #12b76a;
  --radius: 14px;
  --shadow-x: 4px;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --display-tracking: -0.025em;
}

[dir="rtl"] { --shadow-x: -4px; }

html[lang="ar"] {
  --font-display: "Amiri", "Noto Naskh Arabic", serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --display-tracking: 0;
}
html[lang="he"] {
  --font-display: "Frank Ruhl Libre", Georgia, serif;
  --font-body: "Heebo", system-ui, sans-serif;
  --display-tracking: -0.01em;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; border: 2px solid var(--line);
  font-weight: 700; font-size: 15px; white-space: nowrap;
  box-shadow: calc(var(--shadow-x) / 2) 2px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(calc(var(--shadow-x) / -4), -1px); box-shadow: var(--shadow-x) 4px 0 var(--ink); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-light { background: #fff; }
.btn-sm { padding: 8px 18px; font-size: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border: 2px solid var(--line); border-radius: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: calc(var(--shadow-x) / 2) 2px 0 var(--ink);
  transform: rotate(-1.5deg);
}
[dir="rtl"] .badge { transform: rotate(1.5deg); letter-spacing: 0; }
.badge.pink { background: var(--pink); }
.badge.yellow { background: var(--yellow); }
.badge.lilac { background: var(--lilac); }
.badge.blue { background: var(--blue); }
.badge.mint { background: var(--mint); }

.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 12px; }

.card {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-x) 4px 0 var(--ink);
}

/* ---------- typography ---------- */
h1, h2, h3 { margin: 0; }
.display {
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: var(--display-tracking); line-height: 1.08;
}
html[lang="ar"] .display { font-weight: 700; line-height: 1.35; }
html[lang="he"] .display { font-weight: 500; line-height: 1.15; }
.h1 { font-size: clamp(40px, 6vw, 72px); }
.h2 { font-size: clamp(32px, 4.4vw, 54px); }
.lead { font-size: 18px; color: var(--muted); max-width: 620px; margin-inline: auto; }

.squiggle { display: block; width: 140px; height: 12px; margin: 14px auto 0; color: var(--brand); opacity: .55; }
.underline-wave {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='8' viewBox='0 0 40 8'%3E%3Cpath d='M0 4 Q10 0 20 4 T40 4' fill='none' stroke='%237c3aed' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: 0 100%; background-size: 40px 8px;
  padding-bottom: 8px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; border: 2px solid var(--line);
  background: linear-gradient(135deg, #f59e0b, #ec4899 55%, #7c3aed);
  display: grid; place-items: center; color: #fff;
  box-shadow: calc(var(--shadow-x) / 2) 2px 0 var(--ink);
}
.logo-mark svg { width: 18px; height: 18px; }
.nav-links { display: flex; gap: 22px; font-weight: 600; font-size: 15px; margin-inline-start: 12px; }
.nav-links a:hover, .nav-links a.active { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px;
  border: 2px solid var(--line); border-radius: 999px; background: #fff; font-weight: 700; font-size: 14px;
}
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 150px;
  padding: 6px; display: none; z-index: 60;
}
.lang-switch.open .lang-menu { display: block; }
.lang-menu button {
  display: flex; justify-content: space-between; width: 100%; padding: 9px 12px;
  border: 0; background: none; border-radius: 8px; font-weight: 600; text-align: start;
}
.lang-menu button:hover { background: var(--brand-soft); }
.lang-menu button[aria-current="true"] { color: var(--brand); }
.login-link { font-weight: 600; font-size: 15px; }
.menu-toggle { display: none; border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 8px; }

/* ---------- hero ---------- */
.hero {
  padding: 64px 0 40px; text-align: center; position: relative;
  background: radial-gradient(60% 50% at 50% 0%, #ece6fd 0%, transparent 70%);
}
.mode-toggle { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); margin-bottom: 26px; }
.mode-toggle .on { color: var(--ink); font-weight: 600; }
.switch {
  width: 44px; height: 24px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--brand); position: relative; padding: 0;
}
.switch::after {
  content: ""; position: absolute; top: 2px; inset-inline-end: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; border: 2px solid var(--line); transition: inset .2s;
}
.switch[aria-checked="false"] { background: #fff; }
.switch[aria-checked="false"]::after { inset-inline-end: calc(100% - 18px); }
.hero .lead { margin-top: 20px; }
.hero .btn { margin-top: 30px; }
.agents { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 32px; font-size: 14px; font-weight: 600; }
.agents span { display: inline-flex; align-items: center; gap: 6px; }
.agents i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.window { margin: 48px auto 0; max-width: 980px; text-align: start; overflow: hidden; }
.window-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 2px solid var(--line); background: #f3f0ea;
  font-size: 11px; font-weight: 800; letter-spacing: .1em;
}
.dots { display: flex; gap: 6px; margin-inline-end: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line); }
.dots i:nth-child(1) { background: #ff5f57; } .dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.window-body { padding: 28px; display: grid; gap: 18px; }
.bubble {
  justify-self: end; max-width: 460px; padding: 10px 16px; border: 2px solid var(--line);
  border-radius: 14px; background: var(--brand-soft); font-weight: 600; font-size: 15px;
}
.calendar-card { padding: 18px; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pill { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--mint); }
.post-row {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px;
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff;
  opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s;
}
.post-row + .post-row { margin-top: 10px; }
.post-row.in { opacity: 1; transform: none; }
.day { font-weight: 800; font-size: 13px; text-align: center; background: var(--yellow); border: 1.5px solid var(--line); border-radius: 8px; padding: 4px 0; }
.post-row:nth-child(3) .day { background: var(--pink); }
.post-row:nth-child(4) .day { background: var(--blue); }
.nets { display: flex; gap: 4px; }
.net-dot { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 800; }

.report { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { padding: 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
.stat b { display: block; font-size: 24px; line-height: 1.2; margin-top: 4px; }
.up { color: var(--green); font-weight: 700; font-size: 13px; }

/* ---------- sections ---------- */
section.block { padding: 96px 0; border-top: 2px solid var(--line); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head .badge { margin-bottom: 18px; }
.section-head .lead { margin-top: 16px; }

/* analytics */
.analytics { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.analytics .section-head { text-align: start; margin: 0; }
.analytics .lead { margin-inline: 0; }
.chips-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.chart-card { padding: 22px; }
.chart-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 20px; }
.chart-stats small { color: var(--muted); font-size: 12px; }
.chart svg { width: 100%; height: 180px; }
.chart path.line { stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 2s ease; }
.chart.in path.line { stroke-dashoffset: 0; }
[dir="rtl"] .chart svg { transform: scaleX(-1); }
.chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 700; margin-top: 6px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { padding: 28px; transition: transform .2s; }
.feature:hover { transform: translateY(-4px) rotate(-.4deg); }
.icon-box {
  width: 46px; height: 46px; border: 2px solid var(--line); border-radius: 12px; background: #fff;
  display: grid; place-items: center; margin-bottom: 18px;
  box-shadow: calc(var(--shadow-x) / 2) 2px 0 var(--ink);
}
.icon-box svg { width: 22px; height: 22px; }
.feature h3, .tile h3 { font-size: 22px; font-weight: 800; margin: 6px 0 10px; }
.feature p, .tile p { margin: 0; color: var(--muted); font-size: 15px; }
.tile { padding: 28px; position: relative; overflow: hidden; }
.tile.pink { background: var(--pink); } .tile.blue { background: var(--blue); } .tile.lilac { background: var(--lilac); }
.tile.yellow { background: var(--yellow); } .tile.rose { background: var(--rose); }
.tile .num {
  position: absolute; top: 14px; inset-inline-end: 18px;
  font-size: 46px; font-weight: 900; color: var(--ink); opacity: .08;
}

/* approvals */
.review { display: grid; grid-template-columns: 1.1fr 1fr; max-width: 980px; margin-inline: auto; position: relative; }
.review > div { padding: 24px; }
.review > div + div { border-inline-start: 2px solid var(--line); background: #fafafa; border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.post-head small, .comment small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.media-ph {
  aspect-ratio: 4 / 3; border: 2px solid var(--line); border-radius: 12px;
  background: var(--pink) radial-gradient(#0a0a0a22 1px, transparent 1px) 0 0 / 14px 14px;
  display: grid; place-items: center;
}
.comment { border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; margin-bottom: 12px; }
.comment.ok { background: var(--mint); }
.comment-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tag { margin-inline-start: auto; font-size: 10px; font-weight: 800; padding: 2px 8px; border: 1.5px solid var(--line); border-radius: 6px; background: var(--yellow); }
.comment.ok .tag { background: #fff; }
.share { width: 100%; margin-top: 4px; }
.stamp {
  position: absolute; bottom: -18px; inset-inline-end: 40px; background: var(--mint);
  border: 2px solid var(--line); border-radius: 10px; padding: 6px 14px; font-weight: 800; font-size: 13px;
  box-shadow: var(--shadow-x) 4px 0 var(--ink); transform: rotate(3deg);
}

/* stories marquee */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 20px; width: max-content; animation: scroll 60s linear infinite; padding: 6px 4px 10px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
[dir="rtl"] .marquee-track { animation-name: scroll-rtl; }
@keyframes scroll { to { transform: translateX(-50%); } }
@keyframes scroll-rtl { to { transform: translateX(50%); } }
.story { width: 340px; padding: 24px; flex-shrink: 0; }
.story p { margin: 10px 0 0; font-size: 15px; color: var(--muted); }

/* faq */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 14px; }
.faq details { padding: 0; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* networks */
.networks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.network { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 700; font-size: 15px; transition: transform .15s; }
.network:hover { transform: translateY(-3px); }
.network .net-dot { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }

/* cta band */
.cta-band { background: var(--brand); color: #fff; text-align: center; padding: 88px 0; border-top: 2px solid var(--line); }
.cta-band .lead { color: #e9e1fd; }
.cta-band .btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.cta-band .btn-light { color: var(--ink); }

/* footer */
footer { border-top: 2px solid var(--line); padding: 56px 0 32px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot-grid h4 { margin: 0 0 12px; font-size: 13px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--muted); }
.foot-grid a:hover { color: var(--brand); }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid #0a0a0a22; display: flex; justify-content: space-between; color: var(--muted); flex-wrap: wrap; gap: 10px; }

/* ---------- pricing ---------- */
.billing-toggle { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; padding: 4px; background: #fff; margin-top: 28px; gap: 4px; }
.billing-toggle button { border: 0; background: none; padding: 8px 20px; border-radius: 999px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.billing-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.save { font-size: 11px; background: var(--mint); color: var(--ink); padding: 2px 8px; border-radius: 6px; border: 1.5px solid var(--line); }
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; max-width: 880px; margin: 0 auto; }
.plan { padding: 34px; display: flex; flex-direction: column; }
.plan.featured { background: var(--lilac); }
.plan h3 { font-size: 26px; font-weight: 800; }
.plan .desc { color: var(--muted); margin: 6px 0 22px; }
.price { display: flex; align-items: baseline; gap: 6px; }
.price b { font-family: var(--font-display); font-size: 64px; font-weight: 400; line-height: 1; }
html[lang="ar"] .price b { font-family: var(--font-body); font-weight: 700; font-size: 56px; }
.price span { color: var(--muted); font-weight: 600; }
.billed { font-size: 13px; color: var(--muted); margin: 6px 0 4px; }
.ws { font-weight: 700; margin-bottom: 20px; }
.plan ul { list-style: none; padding: 0; margin: 12px 0 28px; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check { width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; background: var(--mint); border: 1.5px solid var(--line); display: grid; place-items: center; margin-top: 2px; }
.check svg { width: 11px; height: 11px; }
.plan .btn { margin-top: auto; }
.included { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.included .card { padding: 24px; }
.included h4 { margin: 0 0 14px; }
.included ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.included li::before { content: "✓"; color: var(--green); font-weight: 900; margin-inline-end: 8px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 68px; inset-inline: 0;
    background: var(--bg); border-bottom: 2px solid var(--line); padding: 16px; margin: 0;
  }
  .menu-toggle { display: block; }
  .login-link { display: none; }
  .analytics, .review { grid-template-columns: 1fr; }
  .review > div + div { border-inline-start: 0; border-top: 2px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
  .grid-3, .included { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  section.block { padding: 64px 0; }
  .grid-3, .included, .plans { grid-template-columns: 1fr; }
  .report { grid-template-columns: 1fr 1fr; }
  .chart-stats { grid-template-columns: 1fr 1fr; }
  .window-body { padding: 16px; }
  .post-row { grid-template-columns: 48px 1fr; }
  .post-row .nets { display: none; }
  .nav-actions .btn { display: none; }
  .story { width: 280px; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .post-row { opacity: 1; transform: none; }
}

/* plan badge sits on the card edge so both plans line up */
.plan { position: relative; }
.plan .popular { position: absolute; top: -16px; inset-inline-end: 24px; }

/* ---------- inner pages ---------- */
.page-hero { padding: 72px 0 56px; }
.page-hero .badge { margin-bottom: 20px; }
.sub-title { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
[dir="rtl"] .sub-title { letter-spacing: 0; font-size: 15px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 800; font-size: 14px; color: var(--brand); }
.more svg { width: 16px; height: 16px; transition: transform .2s; }
[dir="rtl"] .more svg { transform: scaleX(-1); }
.card:hover .more svg { transform: translateX(3px); }
[dir="rtl"] .card:hover .more svg { transform: scaleX(-1) translateX(3px); }

/* networks */
.net-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.net-card { padding: 24px; }
.net-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.net-card-head .net-dot { width: 40px; height: 40px; border-radius: 11px; font-size: 15px; }
.net-card-head h3 { font-size: 20px; font-weight: 800; }
.net-card-head .pill { margin-inline-start: auto; }
.net-card p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.formats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.formats span { font-size: 13px; font-weight: 700; padding: 3px 10px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); }

/* blog */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 40px; }
.filters button { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 18px; font-weight: 700; font-size: 14px; }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.cover {
  aspect-ratio: 16 / 9; display: grid; place-items: center; border-bottom: 2px solid var(--line);
  background-image: radial-gradient(#0a0a0a1f 1px, transparent 1px); background-size: 14px 14px;
}
.cover .icon-box { margin: 0; width: 64px; height: 64px; border-radius: 16px; transform: rotate(-6deg); }
.cover .icon-box svg { width: 30px; height: 30px; }
.post-featured { display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; margin-bottom: 32px; }
.post-featured .cover { aspect-ratio: auto; min-height: 320px; border-bottom: 0; border-inline-end: 2px solid var(--line); }
.post-featured .post-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.post-featured .badge { align-self: flex-start; margin-bottom: 14px; }
.post-featured h2 { font-size: clamp(28px, 3vw, 40px); margin: 10px 0 12px; }
.post-featured p { color: var(--muted); margin: 0; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .2s; }
.post-card:hover, .post-featured:hover { transform: translateY(-4px); }
.post-card .post-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 19px; font-weight: 800; margin: 10px 0 8px; line-height: 1.4; }
.post-card p { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted); align-items: center; }
.post-meta .cat { font-weight: 800; color: var(--ink); padding: 2px 10px; border: 1.5px solid var(--line); border-radius: 6px; background: #fff; }
.newsletter { padding: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; background: var(--yellow); }
.newsletter h2 { font-size: clamp(26px, 3vw, 36px); }
.newsletter p { margin: 8px 0 0; color: var(--muted); }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 200px; }

/* forms */
input, textarea, select {
  font: inherit; color: var(--ink); width: 100%; padding: 12px 16px; border: 2px solid var(--line);
  border-radius: 12px; background: #fff; outline: none; transition: box-shadow .15s;
}
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 4px var(--brand-soft); border-color: var(--brand); }
textarea { min-height: 150px; resize: vertical; }
label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.field-error { display: block; color: #dc2626; font-size: 13px; font-weight: 600; min-height: 0; margin-top: 4px; }
.has-error input, .has-error textarea { border-color: #dc2626; }
.form-done { margin: 16px 0 0; padding: 12px 16px; border: 2px solid var(--line); border-radius: 12px; background: var(--mint); font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.contact-form { padding: 32px; }
.contact-form .btn { width: 100%; }
.channels { display: grid; gap: 16px; }
.channel { display: flex; gap: 16px; padding: 20px; align-items: flex-start; }
.channel .icon-box { margin: 0; flex-shrink: 0; }
.channel h3 { font-size: 17px; font-weight: 800; }
.channel p { margin: 2px 0 6px; color: var(--muted); font-size: 14px; }
.faq-hint { padding: 22px; background: var(--lilac); }
.faq-hint p { margin: 0 0 10px; font-weight: 700; }

/* about */
.about-story { max-width: 760px; margin-inline: auto; font-size: 18px; color: var(--muted); }
.about-story p { margin: 0 0 18px; }
.stat-big { padding: 26px; text-align: center; }
.stat-big b { display: block; font-family: var(--font-display); font-size: 54px; font-weight: 400; line-height: 1; color: var(--brand); }
.stat-big span { display: block; margin-top: 10px; font-weight: 700; }
.timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 760px; position: relative; }
.timeline::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 46px; border-inline-start: 2px dashed var(--line); }
.timeline li { display: grid; grid-template-columns: 94px 1fr; gap: 20px; align-items: start; margin-bottom: 22px; position: relative; }
.year {
  justify-self: center; background: var(--yellow); border: 2px solid var(--line); border-radius: 10px;
  padding: 4px 10px; font-weight: 900; font-size: 14px; position: relative; z-index: 1; margin-top: 14px;
  box-shadow: calc(var(--shadow-x) / 2) 2px 0 var(--ink);
}
.timeline .card { padding: 20px 22px; }
.timeline h3 { font-size: 19px; font-weight: 800; }
.timeline p { margin: 6px 0 0; color: var(--muted); }

@media (max-width: 960px) {
  .net-cards, .post-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .post-featured, .newsletter, .contact-grid { grid-template-columns: 1fr; }
  .post-featured .cover { min-height: 220px; border-inline-end: 0; border-bottom: 2px solid var(--line); }
}
@media (max-width: 640px) {
  .net-cards, .post-grid, .form-row { grid-template-columns: 1fr; }
  .newsletter, .contact-form, .post-featured .post-body { padding: 24px; }
  .timeline li { grid-template-columns: 70px 1fr; gap: 12px; }
  .timeline::before { inset-inline-start: 34px; }
}

/* ---------- chat widget ---------- */
.chat-widget { position: fixed; bottom: 20px; inset-inline-end: 24px; z-index: 100; font-family: var(--font-body); }
.chat-fab {
  width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--line); padding: 0;
  background: var(--brand); display: grid; place-items: center; position: relative;
  box-shadow: calc(var(--shadow-x) * .75) 3px 0 var(--ink); transition: transform .2s, box-shadow .2s;
}
.chat-fab:hover { transform: translateY(-2px) scale(1.04); }
.chat-fab svg { width: 26px; height: 26px; position: absolute; transition: transform .25s, opacity .2s; }
.chat-fab .i-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.chat-widget.open .chat-fab .i-open { opacity: 0; transform: rotate(90deg) scale(.6); }
.chat-widget.open .chat-fab .i-close { opacity: 1; transform: none; }
.chat-widget:not(.open) .chat-fab::after {
  content: ""; position: absolute; top: 2px; inset-inline-end: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--green); border: 2px solid var(--line);
}

.chat-panel {
  position: absolute; bottom: 74px; inset-inline-end: 0; width: 370px; height: min(560px, calc(100vh - 120px));
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(12px) scale(.97); transform-origin: bottom right; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
[dir="rtl"] .chat-panel { transform-origin: bottom left; }
.chat-widget.open .chat-panel { opacity: 1; transform: none; pointer-events: auto; }
.chat-head { background: var(--brand); color: #fff; padding: 16px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--line); }
.chat-avatars { display: flex; }
.chat-avatars > span { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.chat-avatars .logo-mark { box-shadow: none; }
.chat-avatars .agent-dot { background: var(--yellow); color: var(--ink); margin-inline-start: -10px; }
.chat-avatars svg { width: 18px; height: 18px; }
.chat-head-text { flex: 1; display: grid; line-height: 1.35; }
.chat-title { font-size: 16px; }
.chat-status { font-size: 12px; opacity: .85; display: inline-flex; align-items: center; gap: 6px; }
.chat-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
.chat-restart { background: none; border: 0; color: #fff; padding: 6px; border-radius: 8px; opacity: .85; }
.chat-restart:hover { background: #ffffff22; opacity: 1; }
.chat-restart svg { width: 18px; height: 18px; }

.chat-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.msg.me { align-self: flex-end; }
.msg-avatar {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--line);
  background: linear-gradient(135deg, #f59e0b, #ec4899 55%, #7c3aed);
}
.bubble-msg { padding: 10px 14px; border: 2px solid var(--line); border-radius: 16px; font-size: 14px; line-height: 1.6; background: #fff; }
.msg.bot .bubble-msg { border-end-start-radius: 4px; }
.msg.me .bubble-msg { background: var(--brand); color: #fff; border-end-end-radius: 4px; }
.bubble-msg a { color: var(--brand); font-weight: 700; text-decoration: underline; }
.typing .bubble-msg { display: flex; gap: 4px; padding: 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }

.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 16px 12px; background: var(--bg); }
.chat-quick[hidden] { display: none; }
.chat-quick button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.chat-quick button:hover { background: var(--brand-soft); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 2px solid var(--line); background: #fff; }
.chat-input { border-radius: 999px; padding: 10px 16px; font-size: 14px; }
.chat-send { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--line); background: var(--brand); color: #fff; display: grid; place-items: center; padding: 0; }
.chat-send svg { width: 18px; height: 18px; }
[dir="rtl"] .chat-send svg { transform: scaleX(-1); }

@media (max-width: 640px) {
  .chat-widget { bottom: 14px; inset-inline-end: 14px; }
  .chat-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; border: 0; box-shadow: none; bottom: 0; }
  .chat-widget.open .chat-fab { position: fixed; top: 10px; inset-inline-end: 10px; width: 40px; height: 40px; box-shadow: none; z-index: 2; background: transparent; border-color: #fff; }
  .chat-widget.open .chat-fab svg { width: 20px; height: 20px; }
  .chat-head { padding-inline-end: 60px; }
}
