:root {
  --bg: #f7f5f0;
  --text: #17181a;
  --dim: #55585c;
  --faint: #8b8e93;
  --line: #d9d6cd;
  --btn: #17181a;
  --btn-text: #f7f5f0;
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Heebo', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

html[lang="ar"] body,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea,
html[lang="ar"] button {
  font-family: 'Noto Kufi Arabic', 'Heebo', sans-serif;
}

/* ---- language switcher ---- */
.lang-switch {
  position: fixed;
  top: 20px;
  inset-inline-end: 24px;
  display: flex;
  gap: 2px;
  z-index: 10;
}

.lang-switch button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--faint);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: color .15s, border-color .15s;
}

.lang-switch button:hover { color: var(--text); }

.lang-switch button.active {
  color: var(--text);
  border-color: var(--line);
}

/* ---- shared layout ---- */
.wrap {
  flex: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---- home ---- */
.hero h1 {
  font-size: clamp(38px, 6.5vw, 58px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 18px;
  direction: ltr;
}

html[dir="rtl"] .hero h1 { text-align: right; }

.hero .lines {
  color: var(--dim);
  font-size: clamp(15.5px, 2vw, 17.5px);
  font-weight: 400;
  max-width: 560px;
}

.btn {
  display: inline-block;
  margin-top: 34px;
  background: var(--btn);
  color: var(--btn-text);
  text-decoration: none;
  border: none;
  font-weight: 500;
  font-size: 16px;
  font-family: inherit;
  padding: 13px 30px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity .15s;
  align-self: flex-start;
}

.btn:hover { opacity: .85; }

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  letter-spacing: .18em;
  color: var(--faint);
  text-transform: uppercase;
}

.site-footer a {
  color: var(--faint);
  text-decoration: none;
}

.site-footer a:hover { color: var(--text); }

/* ---- intake (email step) & questionnaire ---- */
.narrow { max-width: 760px; }

.page-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 26px;
}

.page-title .domain {
  direction: ltr;
  unicode-bidi: embed;
  border-bottom: 3px solid var(--line);
}

.lead { color: var(--text); font-size: 17px; margin-bottom: 34px; }

.hint { color: var(--dim); font-size: 15px; margin-top: 30px; max-width: 620px; }
.hint + .hint { margin-top: 12px; }

input[type="email"].bare,
input[type="text"].bare,
input[type="tel"].bare {
  width: 100%;
  max-width: 620px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text);
  color: var(--text);
  padding: 10px 2px 12px;
  font-size: clamp(20px, 3vw, 26px);
  font-family: inherit;
  font-weight: 300;
}

input.bare::placeholder { color: #c2bfb6; }

input.bare:focus { outline: none; border-bottom-width: 2px; }

textarea.bare {
  width: 100%;
  max-width: 620px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text);
  color: var(--text);
  padding: 10px 2px 12px;
  font-size: 19px;
  font-family: inherit;
  font-weight: 300;
  min-height: 110px;
  resize: vertical;
}

textarea.bare:focus { outline: none; }

/* ---- questionnaire wizard ---- */
.progress {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--faint);
  margin-bottom: 22px;
}

.step { display: none; }
.step.active { display: block; }

.q-label {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 30px;
  max-width: 640px;
}

.choices { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }

.choice {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16.5px;
  font-family: inherit;
  padding: 14px 18px;
  cursor: pointer;
  text-align: start;
  transition: border-color .15s, background .15s;
}

.choice:hover { border-color: var(--text); }

.choice.selected {
  border-color: var(--text);
  background: #edeae2;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 38px;
}

.back-btn {
  background: transparent;
  border: none;
  color: var(--dim);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 4px;
}

.back-btn:hover { color: var(--text); }

.field-error {
  color: #b3261e;
  font-size: 14px;
  margin-top: 10px;
  min-height: 20px;
}

/* ---- thanks ---- */
.thanks-mark { font-size: 34px; margin-bottom: 16px; }

/* ---- mobile ---- */
@media (max-width: 560px) {
  .wrap { padding: 0 22px; }
  .site-footer { padding: 18px 22px; }
}
