/* Kana Masarak website. Brand direction A ("Voice"): emerald with a saffron accent.
   No external requests: fonts and images are served from this site. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/PlusJakartaSans.woff") format("woff");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --emerald: #0b6e57;
  --emerald-bright: #13946f;
  --emerald-deep: #065242;
  --saffron: #f5a623;
  --mint: #bfe9da;

  --bg: #f4f8f6;
  --surface: #ffffff;
  --surface-2: #e8efec;
  --fg: #14201c;
  --muted: #4b5853;
  --line: #d8e2de;
  --link: #0b6e57;
  --on-brand: #ffffff;

  --head: "Plus Jakarta Sans", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --masarak: "Noto Sans", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabic: "Noto Sans Arabic", "Noto Naskh Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;

  --radius: 18px;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1412;
    --surface: #161d1a;
    --surface-2: #1d2622;
    --fg: #e3ebe7;
    --muted: #a6b3ad;
    --line: #2a3430;
    --link: #6bd8b4;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--body);
}
[lang="ar"] body, body[lang="ar"] { font-family: var(--arabic); }
img, svg { max-width: 100%; }
a { color: var(--link); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-left, 0px));
}
/* Hidden above the page (not to the side), so it never widens a right-to-left page. */
.skip { position: absolute; inset-inline-start: 8px; top: -100px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 8px; }

h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 { font-family: var(--arabic); letter-spacing: 0; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
.ml { font-family: var(--masarak); }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font: 800 1.08rem/1 var(--head); }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 4px 18px; margin-inline-start: auto; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--fg); }
.lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang a { padding: 3px 9px; border-radius: 999px; font-size: .85rem; }
.lang a[aria-current="true"] { background: var(--surface-2); color: var(--fg); font-weight: 700; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 999px; background: var(--emerald); color: #fff; text-decoration: none; font-weight: 700; font-family: var(--head); }
[lang="ar"] .btn { font-family: var(--arabic); }
.btn:hover { background: var(--emerald-deep); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.soon { background: transparent; color: var(--emerald); border: 2px solid var(--emerald); cursor: default; }
.btn.soon:hover { background: transparent; }
@media (prefers-color-scheme: dark) { .btn.soon { color: var(--mint); border-color: var(--mint); } }
.btn.small { padding: 8px 14px; font-size: .9rem; }

/* hero */
.hero { padding-block: clamp(36px, 7vw, 84px) clamp(40px, 7vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.eyebrow { display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--emerald); margin-bottom: 14px; }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--mint); } }
[lang="ar"] .eyebrow { letter-spacing: 0; }
.lede { font-size: 1.15rem; color: var(--muted); margin-top: 18px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 28px; }
.note { font-size: .92rem; color: var(--muted); }
.note b { color: var(--fg); font-weight: 600; user-select: all; }

/* phone mock */
.phone { justify-self: center; width: min(360px, 100%); background: #0f1714; border-radius: 40px; padding: 14px; box-shadow: 0 30px 60px -20px rgba(6, 82, 66, .45), 0 0 0 1px rgba(255,255,255,.06) inset; }
.screen { background: #e8efeb; border-radius: 28px; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; aspect-ratio: 9 / 17; }
.chat-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #fff; border-bottom: 1px solid #dfe7e3; color: #14201c; font-weight: 600; font-size: .9rem; }
.chat-top i { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #f5a623, #e2861a); }
.chat { padding: 14px; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 16px; font: 500 .95rem/1.35 var(--masarak); color: #14201c; background: #fff; }
.msg.me { align-self: flex-end; background: #cdede2; border-end-end-radius: 6px; }
.msg.them { border-end-start-radius: 6px; }
.typing { min-height: 1.35em; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--saffron); vertical-align: -0.15em; margin-inline-start: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.kb { background: #e4ede9; padding: 6px 6px 10px; display: grid; gap: 5px; }
.kb .strip { display: flex; justify-content: center; gap: 16px; font: 600 .82rem/26px var(--masarak); color: #14201c; }
.kb .strip span:nth-child(2) { font-weight: 800; }
.kb .row { display: grid; gap: 4px; }
.kb .r1 { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.kb .r2 { grid-template-columns: .5fr repeat(10, minmax(0, 1fr)) .5fr; }
.kb .r3 { grid-template-columns: .5fr 1.5fr repeat(7, minmax(0, 1fr)) 1.5fr .5fr; }
.kb .r4 { grid-template-columns: 1.5fr 1fr 1fr 5fr 1fr 1.5fr; }
.kb span.k { position: relative; height: 34px; border-radius: 6px; background: #fff; color: #14201c; font: 500 .95rem/34px var(--masarak); text-align: center; box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.kb span.k sup { position: absolute; top: 1px; inset-inline-end: 3px; font-size: .55rem; line-height: 1; color: #0b7a60; }
.kb span.s { background: #d0dfd8; color: #31433d; font-size: .7rem; }
.kb span.e { background: var(--emerald); color: #fff; }
.kb span.gap { visibility: hidden; }
.kb span.hot { background: #cdede2; }

/* letters strip */
.letters { padding-block: 8px 56px; }
.letter-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.letter { min-width: 76px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.letter b { display: block; font: 700 1.9rem/1.2 var(--masarak); }
.letter span { font-size: .78rem; color: var(--muted); }

/* sections */
.section { padding-block: clamp(48px, 8vw, 88px); }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 40em; display: grid; gap: 12px; margin-bottom: 34px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; align-content: start; }
.feature .glyph { width: 44px; height: 44px; border-radius: 12px; background: var(--emerald); color: #fff; display: grid; place-items: center; font: 700 1.25rem/1 var(--masarak); }
.feature p { color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; }
.step::before { counter-increment: step; content: counter(step); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--saffron); color: #2c1700; font: 800 1rem/1 var(--head); }
.step p { color: var(--muted); }

.promise { background: linear-gradient(135deg, var(--emerald-bright), var(--emerald-deep)); color: #fff; border-radius: 26px; padding: clamp(28px, 5vw, 52px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
@media (max-width: 760px) { .promise { grid-template-columns: minmax(0, 1fr); } }
.promise p { color: var(--mint); margin-top: 10px; max-width: 40em; }
.promise .btn { background: #fff; color: var(--emerald-deep); }
.promise .btn:hover { background: var(--mint); }

/* prose pages (privacy, support) */
.page-hero { background: linear-gradient(135deg, var(--emerald-bright), var(--emerald-deep)); color: #fff; padding-block: 44px 36px; }
.page-hero p { color: var(--mint); margin-top: 8px; }
.page-hero > .wrap { max-width: 820px; } /* line up with the text column below */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { background: rgba(255,255,255,.16); border-radius: 999px; padding: 4px 12px; font-size: .88rem; }
.prose { padding-block: 32px 64px; display: grid; gap: 18px; max-width: 820px; }
.prose > section { display: grid; gap: 18px; } /* cards grouped in a section keep the same spacing */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.card.key { border-inline-start: 5px solid var(--saffron); }
.card h2 { font-size: 1.3rem; color: var(--emerald); margin-bottom: 10px; }
@media (prefers-color-scheme: dark) { .card h2 { color: var(--link); } }
.card h3 { margin: 18px 0 6px; }
.card ul, .card ol { padding-inline-start: 1.2em; margin: 8px 0; }
.card li { margin: 5px 0; }
.card p + p { margin-top: 10px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .95rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 420px; }
th, td { text-align: start; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
td.ml { font-size: 1.15rem; font-weight: 700; white-space: nowrap; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 32px 40px; color: var(--muted); font-size: .92rem; }
.foot { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot a { color: var(--muted); }
.foot .mail { user-select: all; color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  html { scroll-behavior: auto; }
}
