/* Wallam website. Light, airy, pill buttons, soft pastel panels. */
:root {
  --bg: #ffffff;
  --ink: #0f1a2b;
  --muted: #5d6675;
  --line: #e8eaf0;
  --soft: #f5f6fa;
  --accent: #3d5afe;
  --accent-soft: #eef1ff;
  --mint: #e6f6ef;
  --lavender: #efebff;
  --peach: #fff1e6;
  --ok: #0f9d6b;
  --font: "Instrument Sans", "IBM Plex Sans Arabic", "Noto Sans Arabic", system-ui, sans-serif;
  --radius: 22px;
}
[dir="rtl"] { --font: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Instrument Sans", system-ui, sans-serif; }
:root { --display: "Bricolage Grotesque", "Instrument Sans", "IBM Plex Sans Arabic", "Noto Sans Arabic", system-ui, sans-serif; }
[dir="rtl"] { --display: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Bricolage Grotesque", system-ui, sans-serif; }
h1, h2, h3, .big, .plan-price b { font-family: var(--display); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { line-height: 1.85; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.05; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); line-height: 1.12; letter-spacing: -0.025em; }
h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
[dir="rtl"] h1 { font-size: clamp(2.1rem, 5vw, 3.9rem); line-height: 1.4; letter-spacing: 0; }
[dir="rtl"] h2 { line-height: 1.45; letter-spacing: 0; }
[dir="rtl"] h3 { line-height: 1.6; letter-spacing: 0; }
p { margin: 0; }
a { color: inherit; }
.accent { color: var(--accent); }

.wrap { max-width: 1160px; margin-inline: auto; padding-inline: 24px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.skip { position: absolute; inset-inline-start: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; z-index: 30; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / 0.82); backdrop-filter: saturate(1.4) blur(14px); }
.top-row { display: flex; align-items: center; gap: 20px; min-height: 72px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-family: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif; font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; }
.mark {
  display: inline-grid; place-items: center; width: 36px; height: 36px; background: var(--ink); color: #fff;
  border-radius: 12px; border-end-start-radius: 4px;
  font: 700 1.25rem/1 "IBM Plex Sans Arabic", "Noto Sans Arabic", sans-serif; padding-bottom: 5px;
}
.nav { display: flex; gap: 28px; margin-inline: auto; }
.nav a { text-decoration: none; font-size: 0.98rem; color: var(--ink); }
.nav a:hover { color: var(--accent); }

.lang, .demo-tabs { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 4px; gap: 2px; }
.lang button, .demo-tabs button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: 500 0.88rem/1.2 "IBM Plex Sans Arabic", "Noto Sans Arabic", "Instrument Sans", sans-serif; padding: 7px 13px; border-radius: 999px; min-height: 34px;
}
.lang button[aria-pressed="true"], .demo-tabs button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgb(15 26 43 / 0.14); }
.lang button:not([aria-pressed="true"]):hover, .demo-tabs button:not([aria-pressed="true"]):hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 500 1.02rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  padding: 15px 28px; border-radius: 999px; border: 1px solid transparent; min-height: 52px;
  transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 22px rgb(15 26 43 / 0.18); }
.btn-primary:hover { background: #1b2a42; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: var(--ink); color: #fff; }
.btn-light:hover { background: #1b2a42; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(44px, 7vw, 96px) clamp(40px, 6vw, 72px); }
.beams::before {
  content: ""; position: absolute; inset: -10% -5% 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(118deg, transparent 0 12%, rgb(61 90 254 / 0.07) 12% 24%, transparent 24% 33%, rgb(61 90 254 / 0.05) 33% 41%, transparent 41% 58%, rgb(124 92 255 / 0.05) 58% 66%, transparent 66%),
    radial-gradient(55% 70% at 15% 0%, rgb(61 90 254 / 0.10), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 95%);
  mask-image: linear-gradient(to bottom, #000 35%, transparent 95%);
}
[dir="rtl"] .beams::before { transform: scaleX(-1); }
.hero > .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.eyebrow { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 0.9rem; padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 33em; margin-top: 22px; }
.hero .actions { margin-top: 34px; }
.note { color: var(--muted); font-size: 0.93rem; margin-top: 16px; }

.demo { min-width: 0; background: var(--lavender); border-radius: 28px; padding: clamp(18px, 3vw, 30px); }
.demo-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.demo-pick-label { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.demo .demo-tabs { background: rgb(255 255 255 / 0.6); }
.chat {
  background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgb(61 60 120 / 0.18);
  font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Instrument Sans", system-ui, sans-serif;
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mark-small { width: 34px; height: 34px; font-size: 1.1rem; border-radius: 11px; border-end-start-radius: 4px; }
.chat-name { font-weight: 700; line-height: 1.2; font-family: "Bricolage Grotesque", "Instrument Sans", sans-serif; letter-spacing: -0.02em; }
.chat-status { font-size: 0.8rem; color: var(--ok); line-height: 1.5; }
.chat-body { display: flex; flex-direction: column; gap: 10px; padding: 18px; min-height: 280px; }
.msg { max-width: 84%; padding: 10px 15px; border-radius: 18px; font-size: 0.97rem; line-height: 1.7; animation: rise .28s ease-out both; }
.msg-user { align-self: flex-end; background: var(--ink); color: #fff; border-end-end-radius: 5px; }
.msg-bot { align-self: flex-start; background: var(--soft); border-end-start-radius: 5px; }
.typing { display: inline-flex; gap: 5px; align-items: center; min-height: 44px; }
.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; }
.chat-input { display: flex; align-items: center; justify-content: space-between; margin: 0 14px 14px; padding-block: 9px; padding-inline: 18px 9px; background: var(--soft); border-radius: 999px; color: var(--muted); font-size: 0.92rem; }
.chat-send { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); flex: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- "Works with" row ---------- */
.works { padding-block: 8px 28px; }
.works-row { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; border-block: 1px solid var(--line); padding-block: 22px; }
.works-label { color: var(--muted); font-size: 0.92rem; }
.works-row b { font: 600 1.05rem/1 "Instrument Sans", sans-serif; letter-spacing: -0.02em; color: #8a93a3; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(60px, 8vw, 110px); }
.section-head { max-width: 40em; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-inline: auto; }
.section-sub { color: var(--muted); margin-top: 14px; font-size: 1.08rem; }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { border-radius: 28px; padding: clamp(24px, 3.4vw, 40px); display: flex; flex-direction: column; gap: 10px; min-height: 320px; overflow: hidden; }
.panel p { color: #3f4856; max-width: 30em; }
.panel-mint { background: var(--mint); }
.panel-lavender { background: var(--lavender); }
.panel-art { margin-top: auto; padding-top: 26px; }
.code-line { background: var(--ink); color: #dfe6ff; border-radius: 14px; padding: 14px 16px; font: 0.82rem/1.6 Consolas, "Cascadia Mono", monospace; direction: ltr; text-align: left; overflow-wrap: anywhere; }
.code-line span { color: #8ea2ff; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { background: #fff; border-radius: 999px; padding: 8px 14px; font: 600 0.88rem/1.3 "Instrument Sans", sans-serif; box-shadow: 0 2px 8px rgb(15 26 43 / 0.06); direction: ltr; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.steps li { border-top: 1px solid var(--line); padding-top: 22px; }
.step-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 1rem/1 "Instrument Sans", sans-serif; margin-bottom: 16px; }
.steps p { color: var(--muted); margin-top: 8px; }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feature { background: var(--soft); border-radius: var(--radius); padding: 28px; }
.feature p { color: var(--muted); margin-top: 8px; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { position: relative; background: var(--soft); border-radius: var(--radius); padding: 30px 26px 26px; display: flex; flex-direction: column; }
.plan-rec { background: #fff; box-shadow: 0 0 0 2px var(--ink), 0 24px 50px rgb(15 26 43 / 0.10); }
.badge { position: absolute; top: -13px; inset-inline-start: 24px; background: var(--accent); color: #fff; font-size: 0.8rem; font-weight: 600; padding: 3px 13px; border-radius: 999px; line-height: 1.6; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.plan-price b { font: 700 3.2rem/1 "Instrument Sans", sans-serif; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; direction: ltr; }
.plan-price span { color: var(--muted); font-size: 0.95rem; }
.plan-messages { margin-top: 12px; font-weight: 600; }
.plan ul { list-style: none; margin: 20px 0 26px; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.plan li { position: relative; padding-inline-start: 28px; color: var(--muted); }
.plan li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: var(--ok); font-weight: 700; }
.plan .btn { margin-top: auto; width: 100%; }
#pricing .note { margin-top: 30px; text-align: center; }

/* ---------- FAQ ---------- */
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 22px; font-weight: 600; font-size: 1.1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 300 1.7rem/1 "Instrument Sans", sans-serif; color: var(--muted); flex: none; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-bottom: 24px; max-width: 46em; }

/* ---------- Closing panel and footer ---------- */
.closing { padding-block: 0 clamp(40px, 6vw, 72px); }
.closing-panel { position: relative; overflow: hidden; background: var(--soft); border-radius: 32px; padding: clamp(40px, 7vw, 84px) 24px; text-align: center; }
.closing-panel > * { position: relative; z-index: 1; }
.closing-panel h2 { max-width: 16em; margin-inline: auto; }
.closing-panel .btn { margin-top: 30px; }
.foot { color: var(--muted); font-size: 0.92rem; border-top: 1px solid var(--line); }
.foot-row { display: flex; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; padding-block: 26px; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- Dialog ---------- */
dialog { border: 0; border-radius: 24px; padding: 32px; max-width: min(440px, calc(100vw - 32px)); background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgb(15 26 43 / 0.25); }
dialog::backdrop { background: rgb(15 26 43 / 0.45); }
dialog h2 { font-size: 1.5rem; }
dialog p { color: var(--muted); margin: 10px 0 24px; }

/* ---------- Thank-you and legal pages ---------- */
.thanks { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.thanks-card { max-width: 520px; }
.thanks-card .mark { margin-inline: auto; width: 56px; height: 56px; font-size: 1.9rem; border-radius: 18px; border-end-start-radius: 5px; }
.thanks-card h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-top: 26px; line-height: 1.2; }
.thanks-card p { color: var(--muted); margin: 14px 0 30px; }
.legal { padding-block: clamp(36px, 6vw, 72px); }
.legal h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 8px; }
.legal h2 { font-size: 1.35rem; margin: 36px 0 10px; letter-spacing: -0.01em; }
.legal p, .legal li { color: #3f4856; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-inline-start: 22px; display: grid; gap: 6px; }
.legal .fill { background: #fff3c4; border-radius: 4px; padding: 0 4px; }
.legal .updated { color: var(--muted); }

/* ---------- Small screens ---------- */
@media (max-width: 920px) {
  .hero-grid, .duo, .features { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; gap: 30px; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .nav { display: none; }
  .lang { margin-inline-start: auto; }
  .panel { min-height: 0; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .lang button { padding: 7px 9px; font-size: 0.82rem; }
  .brand-name { font-size: 1.2rem; }
  .top-row { gap: 10px; }
  .hero .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .msg, .typing i { animation: none; }
  .btn { transition: none; }
}
