/* MESTK — see BRAND.md */
:root {
  --charcoal: #282825;
  --orange: #BD572F;
  --orange-dark: #A44A26;
  --cream: #F5F0E7;
  --cream-2: #EDE6D9;
  --line: rgba(40, 40, 37, .14);
  --muted: rgba(40, 40, 37, .68);
  --cream-muted: rgba(245, 240, 231, .72);
  --cream-line: rgba(245, 240, 231, .16);

  --font: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 48px);
  --max: 1180px;
  --header-h: 64px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Arabic: Inter renders Latin, Plex Arabic renders Arabic */
html[lang="ar"] body { line-height: 1.8; }
html[lang="en"] body { line-height: 1.6; }

[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  background: var(--charcoal);
  color: var(--cream);
  padding: 8px 14px;
  z-index: 100;
  border-radius: var(--radius);
}
.skip:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn .ico { width: 20px; height: 20px; flex: none; }
.btn-accent { background: var(--orange); color: var(--cream); }
.btn-accent:hover { background: var(--orange-dark); }
.btn-dark { background: var(--charcoal); color: var(--cream); }
.btn-dark:hover { background: #000; }
.btn-ghost { border-color: var(--charcoal); color: var(--charcoal); }
.btn-ghost:hover { background: var(--charcoal); color: var(--cream); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 240, 231, .94);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}
.brand { display: block; flex: none; }
.brand img { height: 44px; width: auto; }

.nav {
  display: none;
  gap: 28px;
  margin-inline-start: auto;
  font-size: 15px;
  font-weight: 500;
}
.nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--charcoal); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}
.lang-toggle {
  appearance: none;
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--charcoal);
  font: 600 14px/1 var(--font);
  cursor: pointer;
  transition: border-color .2s;
}
.lang-toggle:hover { border-color: var(--charcoal); }
.lang-toggle[lang="ar"] { font-family: var(--font-ar); }

@media (min-width: 980px) {
  .nav { display: flex; }
  .header-actions { margin-inline-start: 8px; }
  :root { --header-h: 76px; }
  .brand img { height: 46px; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: 28px 40px;
}
.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}
.hero-logo {
  justify-self: center;
  width: min(280px, 72vw);
}
.hero-logo img { width: 100%; height: auto; }

.tagline {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(42px, 11.5vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-align: start;
}
.tagline span { color: var(--orange); }
html[lang="ar"] .tagline { text-align: right; }

.hero-lead {
  margin-top: 22px;
  font-size: clamp(19px, 4.6vw, 24px);
  font-weight: 500;
  line-height: 1.65;
  color: var(--charcoal);
  max-width: 30ch;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-ctas .btn { flex: 1 1 200px; }

.hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
html[lang="ar"] .hero-strip { justify-content: flex-end; }
.hero-strip li:not(:last-child)::after {
  content: "·";
  margin: 0 10px;
  color: var(--orange);
}

@media (min-width: 860px) {
  .hero { padding-block: 72px 56px; }
  .hero-grid {
    grid-template-columns: 1.35fr 1fr;
    gap: 56px;
  }
  .hero-copy { order: 1; }
  .hero-logo {
    order: 2;
    width: 100%;
    max-width: 380px;
    padding: 36px;
    border-inline-start: 1px solid var(--line);
  }
  .hero-ctas .btn { flex: 0 0 auto; }
  .hero-strip { margin-top: 72px; font-size: 13px; }
}

/* ---------- Sections ---------- */
.section { padding-block: 72px; }
@media (min-width: 860px) { .section { padding-block: 112px; } }

.section-head { max-width: 720px; margin-bottom: 40px; }
@media (min-width: 860px) { .section-head { margin-bottom: 56px; } }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
}
.eyebrow .num {
  font-family: "Inter", sans-serif;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: .04em;
}
.eyebrow .num::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--orange);
  vertical-align: middle;
  margin-inline-start: 12px;
}
.eyebrow-light { color: var(--cream-muted); }

h2 {
  font-size: clamp(30px, 7.4vw, 52px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
html[lang="en"] h2 { letter-spacing: -0.03em; line-height: 1.1; }

.section-lead {
  margin-top: 18px;
  font-size: clamp(17px, 4.2vw, 19px);
  color: var(--muted);
  max-width: 58ch;
}

/* ---------- Services ---------- */
#services { border-top: 1px solid var(--line); }

.services { border-top: 1px solid var(--charcoal); }
.service {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px 16px;
  padding-block: 26px;
  border-bottom: 1px solid var(--line);
}
.service-num {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--orange);
  padding-top: 4px;
}
.service h3 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}
.service h3 .en {
  font-family: "Inter", sans-serif;
  letter-spacing: -0.015em;
}
.service h3 .ar {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
html[lang="en"] .service h3 .ar { display: none; }
.service p { margin-top: 10px; color: var(--muted); max-width: 52ch; }

@media (min-width: 860px) {
  .service {
    grid-template-columns: 80px minmax(260px, 1fr);
    padding-block: 32px;
    transition: background-color .2s;
  }
  .service > div {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 1.2fr;
    gap: 40px;
    align-items: baseline;
  }
  .service h3 { font-size: 26px; }
  .service p { margin-top: 0; font-size: 18px; }
}

/* ---------- Brand Launch ---------- */
.launch {
  background: var(--charcoal);
  color: var(--cream);
}
.launch-grid {
  display: grid;
  gap: 44px;
}
.launch-title {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-size: clamp(38px, 10vw, 68px);
  text-align: start;
}
html[lang="ar"] .launch-title { text-align: right; }
.launch-title span { display: block; color: var(--orange); }
.launch-sub {
  margin-top: 18px;
  font-size: clamp(21px, 5.4vw, 28px);
  font-weight: 600;
  line-height: 1.45;
}
.launch-text {
  margin-top: 14px;
  color: var(--cream-muted);
  max-width: 48ch;
}
.launch .btn { margin-top: 30px; }

.launch-list { border-top: 1px solid var(--cream-line); }
.launch-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-block: 18px;
  border-bottom: 1px solid var(--cream-line);
  font-size: 17px;
  font-weight: 500;
}
.tick {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 6px;
  border: 1.5px solid var(--orange);
  border-radius: 50%;
  position: relative;
}
.tick::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--orange);
}

@media (max-width: 859px) {
  .launch .btn { width: 100%; }
}
@media (min-width: 860px) {
  .launch-grid {
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
  }
  .launch-list li { font-size: 18px; padding-block: 20px; }
}

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  gap: 20px;
}
.work-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream);
}
.work-media {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  background-color: var(--cream-2);
  background-image:
    linear-gradient(var(--line), var(--line)),
    linear-gradient(var(--line), var(--line));
  background-size: 1px 100%, 100% 1px;
  background-position: 50% 0, 0 50%;
  background-repeat: no-repeat;
  display: grid;
  place-items: center;
}
.work-media span {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 7vw, 36px);
  letter-spacing: -0.03em;
  color: rgba(40, 40, 37, .22);
  background: var(--cream-2);
  padding: 4px 14px;
}
.work-body { padding: 20px 22px 24px; border-top: 1px solid var(--line); }
.work-body h3 {
  font-family: "Inter", sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-align: start;
}
html[lang="ar"] .work-body h3 { text-align: right; }
.work-group {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.work-grid + .work-group { margin-top: 48px; }
.work-tag {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 4px;
  text-align: start;
}
html[lang="ar"] .work-tag { text-align: right; }
.work-desc { margin-top: 6px; color: var(--muted); font-size: 16px; }

@media (min-width: 700px) {
  .work-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ---------- Process ---------- */
.process-section { background: var(--cream-2); }
.steps {
  display: grid;
  gap: 0;
  position: relative;
}
.step {
  position: relative;
  padding-inline-start: 64px;
  padding-bottom: 34px;
}
.step:last-child { padding-bottom: 0; }
/* the connector line */
.step::before {
  content: "";
  position: absolute;
  inset-inline-start: 21px;
  top: 44px;
  bottom: 0;
  width: 1px;
  background: var(--orange);
  opacity: .5;
}
.step:last-child::before { display: none; }
.step-dot {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--charcoal);
  background: var(--cream-2);
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 16px;
}
.step:first-child .step-dot { background: var(--orange); border-color: var(--orange); color: var(--cream); }
.step h3 { font-size: 21px; font-weight: 700; line-height: 1.4; padding-top: 6px; }
.step p { margin-top: 6px; color: var(--muted); }

@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .step { padding-inline-start: 0; padding-bottom: 0; padding-top: 68px; }
  .step::before {
    top: 21px;
    inset-inline-start: 56px;
    inset-inline-end: -24px;
    bottom: auto;
    width: auto;
    height: 1px;
  }
  .step h3 { padding-top: 0; }
}

/* ---------- Contact ---------- */
.contact-inner > * { max-width: 860px; }
.contact-actions {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  min-height: 84px;
  border: 1.5px solid var(--charcoal);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.contact-link .ico { width: 30px; height: 30px; flex: none; }
.contact-link:hover { background: var(--charcoal); color: var(--cream); }
.contact-wa { background: var(--orange); border-color: var(--orange); color: var(--cream); }
.contact-wa:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.contact-text { display: flex; flex-direction: column; line-height: 1.35; }
.contact-text strong { font-size: 20px; font-weight: 700; }
.contact-text small { font-size: 15px; opacity: .8; }
.contact-text small[lang="en"] { text-align: start; }
.arrow { margin-inline-start: auto; font-size: 22px; }
html[lang="en"] .arrow { transform: scaleX(-1); }

/* ---------- Lead form ---------- */
.lead-form {
  display: grid;
  gap: 18px;
  margin-top: 36px;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #FAF7F1;
}
.field { display: grid; gap: 8px; }
.field label { font-size: 15px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: 400 16px/1.5 var(--font);
  color: var(--charcoal);
  background: var(--cream);
  border: 1.5px solid rgba(40, 40, 37, .22);
  border-radius: var(--radius);
  transition: border-color .2s;
  appearance: none;
  -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23282825' stroke-width='1.6'/%3E%3C/svg%3E");
  background-size: 12px 8px;
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 36px;
}
html[dir="ltr"] .field select {
  background-position: right 14px center;
  padding-left: 14px;
  padding-right: 36px;
}
.field input[dir="ltr"] { text-align: right; }
html[dir="ltr"] .field input[dir="ltr"] { text-align: left; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange);
}
.field.invalid input { border-color: var(--orange); }
.lead-form { position: relative; }
.hp { position: absolute; top: 0; inset-inline-start: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.form-error { color: var(--orange-dark); font-weight: 600; font-size: 15px; }
.form-submit { width: 100%; }
.form-submit[disabled] { opacity: .6; cursor: progress; }

.form-done {
  margin-top: 36px;
  padding: 28px 22px;
  border: 1.5px solid var(--charcoal);
  border-radius: var(--radius);
}
.form-done h3 { font-size: 24px; font-weight: 700; }
.form-done p { margin-top: 8px; color: var(--muted); }
.form-done .btn { margin-top: 20px; }

.or-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.or-line + .contact-actions { margin-top: 18px; }

@media (min-width: 700px) {
  .lead-form { grid-template-columns: 1fr 1fr; gap: 20px 24px; padding: 32px; }
  .field-wide, .form-error, .form-submit { grid-column: 1 / -1; }
  .form-submit { width: auto; justify-self: start; min-width: 200px; }
}

@media (min-width: 700px) {
  .contact-actions { grid-template-columns: 1fr 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 36px calc(36px + env(safe-area-inset-bottom));
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.footer-icon { height: 34px; width: auto; }
.footer-tag { font-family: "Inter", sans-serif; font-weight: 700; }
.footer-copy {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--muted);
  margin-inline-start: auto;
}
@media (max-width: 599px) {
  .footer-copy { margin-inline-start: 0; width: 100%; }
}

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
