/* Tawi — design tokens taken from the deck: teal primary, slate text, amber accent,
   IBM Plex Sans / IBM Plex Sans Arabic / JetBrains Mono. Logical properties throughout so RTL works. */
:root {
  --teal: #0e6e69;
  --teal-dark: #0a5551;
  --teal-deep: #073f3c;
  --teal-soft: #e3f1ef;
  --teal-line: #b9dcd7;
  --ink: #0b0b0b;
  --slate: #5b6472;
  --slate-light: #8a93a0;
  --surface: #f4f6f8;
  --line: #e1e6ea;
  --amber: #c97b2b;
  --amber-soft: #fbf1e6;
  --white: #ffffff;
  --font-sans: "IBM Plex Sans", Arial, ui-sans-serif, system-ui, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", Tahoma, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", ui-monospace, Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(11, 11, 11, .04), 0 8px 24px rgba(11, 11, 11, .06);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.8; }
[lang="ar"] { font-family: var(--font-ar); }
html[lang="ar"] [lang="en"] { font-family: var(--font-sans); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { letter-spacing: 0; line-height: 1.45; }
h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, pre { font-family: var(--font-mono); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.surface { background: var(--surface); }
.dark { background: var(--teal-deep); color: var(--white); }
.dark h2, .dark .eyebrow { color: var(--white); }
.dark .lead { color: rgba(255, 255, 255, .82); }

.eyebrow, .tag {
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .9rem;
}
.eyebrow { color: var(--teal); }
.tag { color: var(--amber); margin-bottom: .7rem; }
html[lang="ar"] .eyebrow, html[lang="ar"] .tag { letter-spacing: 0; font-size: .92rem; }
.lead { font-size: 1.2rem; color: var(--slate); max-width: 46rem; margin-bottom: 2.2rem; }
.src { font-size: .82rem; color: var(--slate-light); margin: 0; }
.src.on-dark { color: rgba(255, 255, 255, .6); margin-top: 1.5rem; }
.note { color: var(--slate); margin-top: 2rem; max-width: 52rem; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.big { width: 30px; height: 30px; color: var(--teal); margin-bottom: .9rem; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; font-size: 1.1rem; }
.brand-ar { color: var(--teal); font-weight: 500; }
.mark {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  background: var(--teal); color: var(--white); font-weight: 700; font-size: 1.15rem; font-family: var(--font-sans);
}
.mark-sm { width: 28px; height: 28px; font-size: .95rem; border-radius: 7px; }
.mark-lg { width: 64px; height: 64px; font-size: 2rem; border-radius: 16px; margin-inline: auto; margin-bottom: 1.5rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 68px; }
.nav-links { display: flex; gap: 1.6rem; font-weight: 500; font-size: .95rem; color: var(--slate); }
.nav-links a:hover { color: var(--teal); }
.nav-actions { display: flex; align-items: center; gap: .75rem; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .92rem; font-weight: 500;
  padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer;
}
.lang-toggle:hover { border-color: var(--teal); color: var(--teal); }
.menu-btn { display: none; background: none; border: 0; padding: .4rem; color: var(--ink); cursor: pointer; }
.menu-btn .ico { width: 26px; height: 26px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 1rem; border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: .55rem 1rem; font-size: .92rem; }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: var(--white); color: var(--teal); border-color: var(--teal-line); }
.btn-ghost:hover { background: var(--teal-soft); }
.btn-light { background: var(--white); color: var(--teal-deep); }
.btn-light:hover { background: var(--teal-soft); }
.btn-outline-light { color: var(--white); border-color: rgba(255, 255, 255, .5); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.actions.center { justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3rem, 7vw, 6rem);
  background:
    radial-gradient(60% 80% at 100% 0%, var(--teal-soft) 0%, transparent 60%),
    radial-gradient(40% 50% at 0% 100%, var(--amber-soft) 0%, transparent 60%),
    var(--white);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1 { margin-bottom: .6rem; }
.alt-lang { font-size: 1.35rem; color: var(--teal); font-weight: 500; margin-bottom: 1.2rem; }
.hero .lead { margin-bottom: 0; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 2rem; font-size: .92rem; color: var(--slate); }
.hero-badges li { display: inline-flex; align-items: center; gap: .5rem; }
.hero-badges .ico { color: var(--teal); width: 18px; height: 18px; }

.chat {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.1rem; display: grid; gap: .8rem; font-family: var(--font-ar); font-size: 1rem;
}
.chat-head { display: flex; align-items: center; gap: .6rem; font-weight: 500; color: var(--slate); font-size: .9rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.chat-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #27c840; margin-inline-start: auto; }
.bubble { padding: .85rem 1rem; border-radius: 14px; max-width: 92%; line-height: 1.8; }
.bubble.user { background: var(--teal); color: var(--white); justify-self: start; border-end-start-radius: 4px; }
.bubble.bot { background: var(--surface); justify-self: end; border-end-end-radius: 4px; }
.bubble p { margin: 0 0 .6rem; }
.cite {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--teal); font-weight: 500;
  background: var(--white); border: 1px solid var(--teal-line); border-radius: 999px; padding: .25rem .7rem;
}
.cite .ico { width: 15px; height: 15px; }
.chat-foot { display: flex; flex-wrap: wrap; gap: .4rem; font-family: var(--font-sans); font-size: .75rem; color: var(--slate); padding-top: .4rem; }
html[lang="ar"] .chat-foot { font-family: var(--font-ar); }
.chat-foot span { background: var(--surface); border-radius: 999px; padding: .2rem .6rem; }
.caption { font-size: .88rem; color: var(--slate); text-align: center; margin: .9rem 0 0; }

/* ---------- Grids and cards ---------- */
.grid { display: grid; gap: 1.2rem; }
.cards-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.any-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.surface .card { box-shadow: none; }
.card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.card p { color: var(--slate); font-size: .95rem; margin-bottom: .6rem; }
.card .quote { margin-top: auto; margin-bottom: 0; color: var(--teal); font-weight: 500; font-size: 1rem; padding-top: .6rem; border-top: 1px dashed var(--line); }
.card.uc { padding: 1.5rem; }
.card .chan { margin-top: auto; margin-bottom: 0; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); }
html[lang="ar"] .card .chan { letter-spacing: 0; text-transform: none; }
.icon-circle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--teal-soft); color: var(--teal); margin-bottom: 1rem;
}

.stat { padding: 1.2rem 0; }
.stat-n { font-size: clamp(2.2rem, 3.6vw, 3rem); font-weight: 600; color: var(--teal); line-height: 1.1; margin-bottom: .5rem; letter-spacing: -.02em; font-family: var(--font-sans); }
.stat p { color: var(--slate); margin-bottom: .3rem; font-size: .98rem; }
html[dir="rtl"] .stat-n { unicode-bidi: plaintext; text-align: right; }
html[lang="ar"] .stat-n { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.stat.on-dark .stat-n { color: var(--white); }
.stat.on-dark p { color: rgba(255, 255, 255, .8); }

.oman-band {
  margin-top: 2.5rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center;
  background: var(--teal-soft); border-radius: var(--radius); padding: 2rem 2.2rem;
}
.oman-eq { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.oman-eq > div { display: flex; flex-direction: column; }
.oman-eq .big { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; color: var(--teal-deep); line-height: 1.1; font-family: var(--font-sans); }
.oman-eq .big.accent { color: var(--amber); }
.oman-eq .small { font-size: .85rem; color: var(--slate); }
.oman-eq .op { font-size: 1.8rem; color: var(--slate-light); }
.oman-copy h3 { font-size: 1.2rem; }
.oman-copy p { color: var(--slate); }

.any { padding: 1.2rem 0; border-top: 2px solid var(--teal-soft); }
.any h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.any p { color: var(--slate); font-size: .95rem; margin: 0; }
.h-ar { color: var(--teal); font-weight: 500; }

/* ---------- Architecture ---------- */
.arch { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; align-items: stretch; }
.arch-main { display: flex; flex-direction: column; }
.arch-row { display: grid; gap: .9rem; }
.arch-row.two { grid-template-columns: 1fr 1fr; }
.arch-row.three { grid-template-columns: repeat(3, 1fr); }
.arch-link { height: 1.1rem; width: 2px; background: var(--teal-line); margin-inline: auto; }
.arch-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .95rem 1.1rem; }
.arch-box h4 { margin-bottom: .2rem; color: var(--ink); }
.arch-box p { margin: 0; font-size: .88rem; color: var(--slate); }
.arch-box.channels { text-align: center; background: var(--teal); border-color: var(--teal); }
.arch-box.channels h4 { color: var(--white); }
.arch-box.channels p { color: rgba(255, 255, 255, .85); }
.arch-box.core { border-color: var(--teal-line); background: var(--teal-soft); }
.arch-box.src-box { border-style: dashed; }
.arch-studio { background: var(--ink); color: var(--white); border-radius: var(--radius); padding: 1.6rem; }
.arch-studio .eyebrow { color: var(--amber); margin-bottom: .4rem; }
.arch-studio h3 { font-size: 1.4rem; margin-bottom: 1rem; }
.arch-studio .ticks li { color: rgba(255, 255, 255, .85); }
.arch-studio .ticks li::before { border-color: var(--amber); background: transparent; }

/* ---------- Lists ---------- */
.ticks li { position: relative; padding-inline-start: 1.6rem; margin-bottom: .6rem; color: var(--slate); }
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 14px; height: 14px; border-radius: 50%;
  background: var(--teal-soft); border: 2px solid var(--teal);
}
.bullets li { margin-bottom: .9rem; color: var(--slate); padding-inline-start: 1.2rem; position: relative; }
.bullets li::before { content: ""; position: absolute; inset-inline-start: 0; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.bullets strong { color: var(--ink); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { font-size: .85rem; padding: .3rem .75rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.panel .chips li { background: var(--white); }
.big-chips li { font-size: .98rem; padding: .55rem 1rem; background: var(--white); }

/* ---------- Feature rows ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(2rem, 4vw, 3.5rem); border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature.reverse .feature-copy { order: 2; }
.feature.reverse .feature-visual { order: 1; }
.feature h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 1.2rem; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 1.6rem; }
.panel-title { font-weight: 600; font-size: .95rem; margin-bottom: .9rem; color: var(--ink); }
.example { margin-top: 1.4rem; background: var(--white); border-radius: var(--radius-sm); padding: 1rem 1.1rem; border: 1px solid var(--line); }
.example-q { font-size: 1.05rem; font-weight: 500; color: var(--teal-deep); margin-bottom: .6rem; font-family: var(--font-ar); line-height: 1.8; }
.example-a { font-size: .95rem; color: var(--slate); margin: 0; }
.sql-flow { display: grid; gap: .5rem; }
.sql-flow .example-q { margin: 0; }
.flow-arrow { text-align: center; color: var(--slate-light); font-size: 1.2rem; line-height: 1; }
pre { margin: 0; background: var(--ink); color: #e8f3f1; border-radius: var(--radius-sm); padding: 1rem 1.1rem; font-size: .85rem; line-height: 1.55; overflow: auto; text-align: left; }
pre code { color: inherit; }

.steps { display: grid; gap: 1.1rem; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 1rem; align-items: start; }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: var(--white); font-weight: 600; font-family: var(--font-sans); }
.steps h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.steps p { color: var(--slate); margin: 0; font-size: .95rem; }

.block { padding-block: clamp(2rem, 4vw, 3.5rem); border-top: 1px solid var(--line); }
.block h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 1.5rem; }
.facets { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.facet { background: var(--surface); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; }
.facet h3 { font-size: 1rem; margin-bottom: .25rem; }
.facet p { margin: 0; font-size: .9rem; color: var(--slate); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 4rem); }
.two-col.align-start { align-items: start; margin-top: 2rem; }
.channels li { display: grid; grid-template-columns: 150px 1fr; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.channels strong { font-weight: 600; }
.channels span { color: var(--slate); }
.callout { margin-top: 1.4rem; background: var(--amber-soft); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; }
.callout h3 { font-size: 1rem; margin-bottom: .3rem; color: var(--ink); }
.callout p { margin: 0; color: var(--slate); font-size: .95rem; }

/* ---------- Hosting ---------- */
.models { width: 100%; border-collapse: collapse; font-size: .92rem; }
.models th, .models td { text-align: start; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.models th { font-weight: 600; color: var(--slate); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
html[lang="ar"] .models th { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.models td:first-child { font-weight: 500; }
.panel .src { margin-top: .9rem; }
.assure li { display: flex; align-items: flex-start; gap: .9rem; padding: 1rem 1.1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .8rem; color: var(--ink); }
.assure .ico { color: var(--teal); width: 22px; height: 22px; margin-top: .1rem; }

/* ---------- Timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; position: relative; }
.timeline li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; position: relative; }
.timeline li::after {
  content: "→"; position: absolute; top: 1.25rem; inset-inline-end: -.9rem; color: var(--teal-line); font-size: 1.3rem; z-index: 1;
}
html[dir="rtl"] .timeline li::after { content: "←"; }
.timeline li:last-child::after { content: none; }
.when { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin-bottom: .5rem; }
html[lang="ar"] .when { letter-spacing: 0; font-size: .88rem; }
.timeline h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.timeline p:last-child { margin: 0; color: var(--slate); font-size: .95rem; }
.measure { margin-top: 2rem; }

/* ---------- CTA + footer ---------- */
.cta { background: var(--teal-deep); color: var(--white); text-align: center; }
.cta-inner { max-width: 48rem; }
.cta h2 { color: var(--white); }
.cta .alt-lang { color: rgba(255, 255, 255, .85); }
.cta .lead { color: rgba(255, 255, 255, .8); margin-inline: auto; margin-bottom: 1rem; }
.footer { background: var(--ink); color: rgba(255, 255, 255, .8); padding-block: 2.2rem; font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer .brand { color: var(--white); }
.footer .brand-ar { color: #7fcbc4; }
.footer p { margin: 0; }
.footer .src { color: rgba(255, 255, 255, .5); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cards-5, .any-5, .stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arch { grid-template-columns: 1fr; }
  .facets { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline li:nth-child(2)::after { content: none; }
}
@media (max-width: 860px) {
  .nav-links {
    display: none; position: absolute; inset-inline: 0; top: 68px; flex-direction: column; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-flex; }
  .nav-actions .btn { display: none; }
  .hero-grid, .feature, .two-col, .oman-band { grid-template-columns: 1fr; }
  .feature.reverse .feature-copy { order: 1; }
  .feature.reverse .feature-visual { order: 2; }
  .cards-3 { grid-template-columns: 1fr; }
  .cards-5, .any-5, .stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arch-row.three { grid-template-columns: 1fr; }
  .channels li { grid-template-columns: 1fr; gap: .1rem; }
  .timeline { grid-template-columns: 1fr; }
  .timeline li::after { content: none; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .cards-5, .any-5, .stats-5, .stats-4 { grid-template-columns: 1fr; }
  .arch-row.two { grid-template-columns: 1fr; }
  .facets { grid-template-columns: 1fr; }
  .oman-eq { gap: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
