/* ChatMesh — doodle / sticker theme (shared) */
:root {
  --ink: #141414;
  --ink-2: #3a3a3a;
  --ink-3: #6e6e6e;
  --paper: #fbfaf5;
  --white: #ffffff;
  --line: #e6e3da;
  --blue: #1f3fe0;
  --blue-deep: #1530b8;
  --blue-soft: #dfe5ff;
  --yellow: #ffd02e;
  --yellow-soft: #fff4c2;
  --red: #ff4a2b;
  --red-soft: #ffe1da;
  --green: #17a35a;
  --green-soft: #daf5e6;
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --marker: "Permanent Marker", "Comic Sans MS", cursive;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --body: "DM Sans", system-ui, sans-serif;
  --max: 1200px;
  --stroke: 2.5px solid var(--ink);
  --pop: 5px 5px 0 var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(20, 20, 20, 0.08) 1px, transparent 1.2px);
  background-size: 22px 22px;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; position: relative; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; inset-inline-start: 8px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; transform: translateY(-200%); }
.skip:focus { transform: none; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type helpers */
.marker { font-family: var(--marker); font-weight: 400; letter-spacing: 0.01em; }
.hand { font-family: var(--hand); font-weight: 700; }
.scrawl { position: relative; display: inline-block; }
.scrawl svg.under { position: absolute; left: -2%; bottom: -0.18em; width: 104%; height: 0.32em; overflow: visible; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(251, 250, 245, 0.94); backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--marker); font-size: 26px; line-height: 1; }
.brand svg { width: 38px; height: 38px; flex: none; }
.nav { display: flex; align-items: center; gap: 18px; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 24px; }
.menu a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 700; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--blue); text-decoration: underline wavy var(--blue) 2px; text-underline-offset: 6px; }
.menu .menu-cta { display: none; }
.menu-btn { display: none; align-items: center; gap: 8px; font: 700 15px var(--body); color: var(--ink); background: var(--white); border: var(--stroke); border-radius: 999px; padding: 8px 14px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.menu-btn .bars { position: relative; width: 18px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: background 0.15s; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform 0.2s; }
.menu-btn .bars::before { top: -6px; }
.menu-btn .bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .bars { background: transparent; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .nav .cta-top { display: none; }
  .menu { display: none; position: absolute; top: calc(100% + 12px); left: 16px; right: 16px; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border: var(--stroke); border-radius: var(--radius-m); box-shadow: var(--pop); padding: 10px; }
  .menu.open { display: flex; }
  .menu li a { display: block; padding: 14px 16px; font-family: var(--marker); font-weight: 400; font-size: 22px; border-radius: 10px; }
  .menu li a:hover, .menu li a[aria-current="page"] { background: var(--yellow-soft); text-decoration: none; }
  .menu .menu-cta { display: block; padding: 10px 6px 6px; }
  .menu .menu-cta .btn { display: flex; width: 100%; padding: 0 20px; font-family: var(--body); font-size: 16px; }
}

.lang-switch { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14.5px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); transition: transform 0.12s, background 0.12s; }
.lang-switch { padding: 4px 14px 4px 8px; box-shadow: 2px 2px 0 var(--ink); }
.lang-switch .ls-icon { width: 40px; height: 31px; flex: none; overflow: visible; }
.lang-switch .ls-icon g { transition: transform 0.2s; transform-box: fill-box; transform-origin: center; }
.lang-switch:hover .b1 { transform: rotate(-8deg) translate(-1px, -1px); }
.lang-switch:hover .b2 { transform: rotate(8deg) translate(1px, 1px); }
.lang-switch:hover { background: var(--yellow-soft); transform: rotate(-2deg); }
.lang-switch[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--body); font-size: 15px; }
.lang-switch[lang="en"] { font-family: "DM Sans", sans-serif; }
@media (max-width: 440px) { .nav { gap: 8px; } .lang-switch { padding: 3px 10px 3px 6px; } .menu-btn { padding: 0; width: 44px; height: 42px; justify-content: center; } .mb-label { display: none; } .brand { font-size: 22px; gap: 8px; } .brand svg { width: 34px; height: 34px; } }

/* Page hero (inner pages) */
.page-hero { padding: 64px 0 40px; position: relative; }
.page-hero .kicker { font-family: var(--hand); font-weight: 700; font-size: 26px; color: var(--red); transform: rotate(-2deg); display: inline-block; }
.page-hero h1 { font-family: var(--marker); font-weight: 400; font-size: clamp(44px, 6.6vw, 84px); line-height: 0.98; margin-top: 6px; max-width: 13em; }
.page-hero h1 .blue { color: var(--blue); }
.page-hero .lede { margin-top: 22px; font-size: 19px; font-weight: 500; color: var(--ink-2); max-width: 36em; }
.page-hero .ctas { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px; font: 700 16px/1 var(--body); text-decoration: none; border: var(--stroke); cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; box-shadow: 3px 3px 0 var(--ink); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn svg { width: 22px; height: 14px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-ghost { background: var(--white); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-small { min-height: 42px; padding: 0 18px; font-size: 14.5px; }
.nav .btn { color: var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: 3px 3px 0 var(--ink); }

/* Stickers & paper */
.sticker { background: var(--white); border: var(--stroke); border-radius: var(--radius-m); box-shadow: var(--pop); }
.tape { position: absolute; width: 86px; height: 26px; background: rgba(255, 208, 46, 0.85); border: 1.5px solid rgba(20, 20, 20, 0.15); transform: rotate(-6deg); z-index: 3; }
.tape.red { background: rgba(255, 74, 43, 0.85); }
.tape.blue { background: rgba(31, 63, 224, 0.8); }
.grid-paper { background-color: #fff; background-image: linear-gradient(#e7ebf5 1px, transparent 1px), linear-gradient(90deg, #e7ebf5 1px, transparent 1px); background-size: 22px 22px; }
.ruled { background-color: #fffbe6; background-image: linear-gradient(transparent 31px, #b9c6ef 31px, #b9c6ef 32px); background-size: 100% 32px; }
.doodle { position: absolute; pointer-events: none; z-index: 1; }
.doodle svg { width: 100%; height: 100%; overflow: visible; }
@media (max-width: 720px) { .doodle.hide-m { display: none; } }

/* Footer */
.site-foot { background: var(--blue); color: #fff; border-top: var(--stroke); padding: 56px 0 32px; position: relative; }
.site-foot .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 36px; }
.site-foot .brand { color: #fff; font-size: 30px; }
.site-foot p { color: #d7ddff; font-size: 15px; margin-top: 12px; max-width: 26em; }
.site-foot h4 { font-family: var(--marker); font-weight: 400; font-size: 18px; margin: 0 0 12px; color: var(--yellow); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline wavy var(--yellow); text-underline-offset: 5px; }
.site-foot .bye { justify-self: end; align-self: start; background: #fff; color: var(--ink); border: var(--stroke); border-radius: var(--radius-m); box-shadow: var(--pop); padding: 16px 22px; transform: rotate(3deg); font-family: var(--marker); font-size: 20px; line-height: 1.15; text-align: center; }
.site-foot .legal { margin-top: 44px; padding-top: 20px; border-top: 1.5px dashed rgba(255, 255, 255, 0.4); font-size: 13.5px; color: #c4ccff; }
@media (max-width: 860px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } .site-foot .bye { justify-self: start; } }
@media (max-width: 520px) { .site-foot .cols { grid-template-columns: 1fr; } }
