:root {
  --ink: #161412;
  --muted: #5c564f;
  --line: rgba(22, 20, 18, 0.12);
  --paper: #f4efe8;
  --paper-2: #ebe4da;
  --gold: #9a7848;
  --gold-deep: #7a5c34;
  --white: #fffcf8;
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background: var(--paper);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

[data-depth] {
  --tx: 0px;
  --ty: 0px;
  transform: translate3d(var(--tx), var(--ty), 0);
  will-change: transform;
}

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 16px 28px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-left: max(28px, env(safe-area-inset-left));
  padding-right: max(28px, env(safe-area-inset-right));
  background: rgba(244, 239, 232, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.logo {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}

.logo__mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo__tag {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.nav a,
.nav button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.nav a:hover,
.nav button:hover {
  color: var(--ink);
}

.top__end {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.langs {
  display: flex;
  gap: 4px;
}

.langs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.08em;
  padding: 6px 8px;
  cursor: pointer;
}

.langs button.is-on,
.langs button:hover {
  color: var(--ink);
}

.langs button[data-lang="ar"] {
  letter-spacing: 0;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.btn--small {
  padding: 8px 14px;
  font-size: 12px;
}

.hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 88px 28px 72px;
}

.kicker {
  margin: 0 0 16px;
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 11.4em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

html[lang="zh-CN"] .hero h1 {
  max-width: 8.2em;
}

.lead,
.section__lead {
  max-width: 42rem;
  color: var(--muted);
  font-size: 18px;
  text-wrap: pretty;
}

.hero .lead {
  margin: 20px 0 28px;
}

.hero__note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 28px;
}

.section--alt {
  max-width: none;
  padding: 72px 28px;
  background: var(--paper-2);
}

.section--alt > * {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  margin: 0;
  max-width: 18em;
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

#method,
#ratings,
#clients,
#categories,
#top {
  scroll-margin-top: 96px;
}

.section__lead {
  margin: 12px 0 28px;
}

.cats,
.steps,
.board {
  display: grid;
  gap: 28px;
  padding: 28px 0;
  margin: 0;
  list-style: none;
}

.cats {
  grid-template-columns: repeat(4, 1fr);
}

.cats li,
.steps li,
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}

.cats h3,
.steps h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.cats p,
.steps p,
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.ai {
  margin: 0 0 28px;
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--white);
}

.ai__label {
  margin: 0 0 8px;
  color: #e2c89a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ai p {
  margin: 0;
  font-size: 16px;
}

.steps {
  grid-template-columns: 1fr 1fr;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps h3::before {
  content: "0" counter(step) "  ";
  color: var(--gold);
  font-family: var(--serif);
}

.board {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: center;
}

.card img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.card__meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.card__score {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.card__score strong {
  font-family: var(--serif);
  font-size: 28px;
  unicode-bidi: isolate;
  direction: ltr;
}

.card__score span {
  color: var(--muted);
  font-size: 12px;
  text-wrap: pretty;
}

.fine {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.foot {
  padding: 48px 28px 36px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.foot .logo {
  display: inline-flex;
  align-items: center;
}

.foot p {
  max-width: 560px;
  margin: 8px auto 0;
  color: var(--muted);
}

.foot__copy {
  margin-top: 8px !important;
  font-size: 13px;
  direction: ltr;
  unicode-bidi: isolate;
}

.foot p.foot__contact {
  margin-top: 18px;
}

.foot__text {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot__text:hover {
  color: var(--ink);
}

.modal__panel form {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.hp,
.visually-hidden {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: hidden;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 20, 18, 0.45);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-width: 100%;
  max-height: min(calc(100dvh - 40px), 720px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px 22px 20px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(22, 20, 18, 0.18);
  line-height: 1.35;
}

.modal__x {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 13px var(--sans);
  cursor: pointer;
}

.modal__panel h2 {
  margin: 0 0 8px;
  padding-inline-end: 4.5rem;
  font-family: var(--sans);
  font-size: clamp(22px, 4vw, 28px);
  letter-spacing: 0;
  line-height: 1.3;
  max-width: none;
}

.modal__lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
}

.modal__panel label {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.modal__panel input,
.modal__panel textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.4 var(--sans);
}

.captcha {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.captcha label {
  margin: 0;
}

.captcha__frame {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 220px;
  max-width: 100%;
  height: 72px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  clip-path: inset(0 round 12px);
  direction: ltr;
  unicode-bidi: isolate;
}

.captcha__img {
  display: block;
  width: 220px;
  height: 72px;
  max-width: 100%;
  object-fit: none;
}

.captcha__refresh {
  border: 0;
  background: none;
  color: var(--gold-deep);
  font: 600 13px var(--sans);
  cursor: pointer;
  justify-self: start;
  padding: 0;
}

.modal__status {
  margin: 0 0 10px;
  font-size: 14px;
}

.modal__status.is-ok {
  color: #2f6a3a;
}

.modal__status.is-err {
  color: #8a2f2f;
}

html[dir="rtl"] .modal__panel input,
html[dir="rtl"] .modal__panel textarea,
html[dir="rtl"] .captcha__refresh {
  letter-spacing: 0;
}

@media (max-width: 1100px) {
  .cats,
  .board {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .top {
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    gap: 10px 12px;
  }

  .nav {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    gap: 16px;
    padding-top: 10px;
    margin: 0;
    border-top: 1px solid var(--line);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    font-size: 13px;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a,
  .nav button {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .btn--small {
    display: none;
  }

  .hero {
    padding: 48px 20px 40px;
  }

  .hero h1,
  html[lang="zh-CN"] .hero h1 {
    max-width: 100%;
    font-size: clamp(30px, 8.4vw, 42px);
  }

  .lead,
  .section__lead {
    font-size: 16px;
  }

  .section,
  .section--alt {
    padding: 48px 20px;
  }

  #method,
  #ratings,
  #clients,
  #categories,
  #top {
    scroll-margin-top: 120px;
  }

  .card {
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 16px;
  }

  .card img {
    width: 72px;
    height: 72px;
  }

  .langs button {
    padding: 8px 6px;
  }
}

@media (max-width: 700px) {
  .cats,
  .board,
  .steps {
    grid-template-columns: 1fr;
  }

  .foot {
    padding: 36px 20px 28px;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }
}

html[dir="rtl"] {
  --sans: "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  --serif: "IBM Plex Sans Arabic", "Times New Roman", serif;
  letter-spacing: 0;
}

html[dir="rtl"] body {
  line-height: 1.75;
}

html[dir="rtl"] .logo__mark,
html[dir="rtl"] .card__score strong,
html[dir="rtl"] .steps h3::before {
  font-family: "Fraunces", "Times New Roman", serif;
}

html[dir="rtl"] .logo__mark {
  letter-spacing: -0.03em;
}

html[dir="rtl"] .logo__tag,
html[lang="zh-CN"] .logo__tag {
  font-family: "Outfit", "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
}

html[dir="rtl"] .kicker,
html[dir="rtl"] .ai__label {
  letter-spacing: 0;
  text-transform: none;
}

html[dir="rtl"] .hero h1,
html[dir="rtl"] .section h2,
html[dir="rtl"] .cats h3,
html[dir="rtl"] .steps h3,
html[dir="rtl"] .card h3 {
  font-family: var(--sans);
  letter-spacing: 0;
  line-height: 1.35;
}

html[dir="rtl"] .hero h1,
html[dir="rtl"] .section h2 {
  max-width: 16em;
}

html[dir="rtl"] .btn {
  letter-spacing: 0;
}

html[lang="zh-CN"] {
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", serif;
  letter-spacing: 0;
}

html[lang="zh-CN"] body {
  line-height: 1.55;
}

html[lang="zh-CN"] .modal__panel {
  line-height: 1.4;
}

html[lang="zh-CN"] .logo__mark,
html[lang="zh-CN"] .card__score strong,
html[lang="zh-CN"] .steps h3::before {
  font-family: "Fraunces", "Times New Roman", serif;
}

html[lang="zh-CN"] .hero h1,
html[lang="zh-CN"] .section h2,
html[lang="zh-CN"] .btn,
html[lang="zh-CN"] .modal__panel h2 {
  letter-spacing: 0;
  font-family: var(--sans);
}

html[dir="rtl"] .modal__panel {
  line-height: 1.35;
}

html[dir="rtl"] .modal__panel h2 {
  font-family: var(--sans);
}

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

  [data-depth] {
    transform: none;
    will-change: auto;
  }
}
