/* Markety — shared styles */

:root {
  --bg: #f4f4f2;
  --surface: #e8e7e4;
  --ink: #1b1b1d;
  --muted: #59595c;
  --paper: #ffffff;
  --red: #ee4137;
  --accent: #d22f25;
  --accent-press: #b8261d;

  --display: "Big Shoulders", "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "Public Sans", system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-statement: clamp(1.5rem, 1.1rem + 1.3vw, 2.25rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);

  --m: clamp(16px, 2vw, 28px);
  --gap-section: clamp(96px, 12vw, 180px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

html[lang="ar"] {
  --display: "Cairo", sans-serif;
  --text: "Cairo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html { overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--red); color: var(--paper); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.display {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.88;
}
html[lang="ar"] .display { line-height: 1.15; letter-spacing: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--m);
  padding-inline: var(--m);
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95em 1.6em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font: 600 var(--step-body)/1 var(--text);
  text-decoration: none;
  transition: background-color .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--accent-press); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.link {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .22em;
  transition: color .2s, text-underline-offset .2s;
}
.link:hover { color: var(--accent); text-underline-offset: .32em; }

/* ---------- Top bar ---------- */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--m);
}
.bar--static { position: static; }
.bar__logo img { height: 30px; width: auto; }
.bar__nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 32px); font-size: var(--step-small); font-weight: 600; }
.bar__nav a { text-decoration: none; transition: color .2s; }
.bar__nav a:hover { color: var(--accent); }
.lang-toggle {
  font: 600 var(--step-small)/1 var(--text);
  padding: .7em 1.1em; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--paper); cursor: pointer;
  transition: background-color .2s, transform .2s var(--ease);
}
.lang-toggle:hover { background: var(--accent); }
.lang-toggle:active { transform: scale(.96); }
.lang-toggle .ar-label { font-family: "Cairo", sans-serif; }

@media (max-width: 760px) {
  .bar__nav .bar__more { display: none; }
  .bar__logo img { height: 24px; }
}

/* ---------- Reveal motion ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--i, 0) * 75ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { transform: none; transition: opacity .4s linear; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Legal pages ---------- */
.legal { padding: clamp(56px, 8vw, 120px) var(--m) var(--gap-section); }
.legal__head { max-width: 980px; margin-bottom: clamp(48px, 6vw, 88px); }
.legal__head h1 { font-size: var(--step-head); }
.legal__head p { margin-top: 20px; color: var(--muted); font-size: var(--step-small); }
.legal__body { max-width: 72ch; }
.legal__body h2 { font: 600 var(--step-lead)/1.25 var(--text); margin: 56px 0 14px; }
.legal__body p, .legal__body li { margin-bottom: 14px; }
.legal__body ul { list-style: disc; padding-inline-start: 1.2em; }
.legal__company { background: var(--surface); padding: 24px 28px; margin-top: 24px; }
.legal__company p { margin-bottom: 4px; }
[data-lang-block] { display: none; }
html[lang="en"] [data-lang-block="en"], html[lang="ar"] [data-lang-block="ar"] { display: revert; }

.legal-foot {
  background: var(--ink); color: var(--paper);
  padding: 40px var(--m);
  display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between;
  font-size: var(--step-small);
}
.legal-foot a { color: var(--paper); }
