:root {
  --hall: #e4eae3;
  --frame: #1b2420;
  --door: #f6f4ef;
  --closed: #24312c;
  --brass: #8c6a3d;
  --brass-bright: #c4a36a;
  --mineral: #1f6b5c;
  --ink: #1b2420;
  --muted: #5c675f;
  --line: rgba(27, 36, 32, 0.16);
  --display: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --shadow: 0 24px 50px rgba(27, 36, 32, 0.12);
}

html[lang="ar"] {
  --display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
  --body: "IBM Plex Sans Arabic", "Noto Naskh Arabic", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(196, 163, 106, 0.18), transparent 55%),
    var(--hall);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
}

body,
button,
input {
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--mineral);
}

a:hover {
  color: var(--frame);
}

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--frame);
  color: var(--door);
  padding: 0.6rem 0.9rem;
  z-index: 5;
}

.skip:focus {
  top: 0.8rem;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.top {
  padding: 1.25rem 0 0.5rem;
}

.top__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.mark {
  display: inline-flex;
  flex: 0 0 auto;
}

.mark img {
  display: block;
  width: auto;
  height: 32px;
}

.top__tools {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-inline-start: auto;
}

.top__nav {
  display: flex;
  gap: 1.15rem;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 600;
}

.top__nav a {
  color: var(--ink);
  text-decoration: none;
}

.top__nav a:hover {
  color: var(--mineral);
}

.lang {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.92rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}

.lang:hover {
  border-color: var(--brass);
}

.hero {
  display: grid;
  grid-template-columns: minmax(16rem, 0.82fr) 1.25fr;
  gap: 2.75rem;
  align-items: end;
  padding: 2.5rem 0 3.5rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

html[lang="ar"] .eyebrow {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.95rem;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(2.4rem, 4.4vw, 4.15rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

html[lang="ar"] h1 {
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  font-size: clamp(1.9rem, 3.4vw, 3.05rem);
}

html[lang="ar"] .hero {
  grid-template-columns: minmax(18rem, 1fr) 1.15fr;
}

h1 span {
  display: block;
  text-wrap: balance;
}

.lead {
  margin: 1.25rem 0 0;
  max-width: 36rem;
  color: var(--ink);
}

.order {
  margin: 1rem 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.gate {
  display: grid;
  grid-template-columns: 1.45fr 0.78fr 0.78fr;
  gap: 8px;
  min-height: 520px;
  padding: 12px;
  background: var(--frame);
  box-shadow: inset 0 0 0 1px var(--brass-bright), var(--shadow);
  transition: grid-template-columns 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gate[data-open="requests"] {
  grid-template-columns: 0.78fr 1.45fr 0.78fr;
}

.gate[data-open="appointments"] {
  grid-template-columns: 0.78fr 0.78fr 1.45fr;
}

.leaf {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 100%;
  padding: 1rem 2.2rem 1.1rem 0.9rem;
  border: 0;
  background: var(--closed);
  color: var(--hall);
  text-align: start;
  cursor: pointer;
  overflow: hidden;
}

html[dir="rtl"] .leaf {
  padding: 1rem 0.9rem 1.1rem 2.2rem;
}

.leaf[aria-expanded="true"] {
  justify-content: flex-start;
  background: var(--door);
  color: var(--ink);
}

.leaf__index {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--brass-bright);
}

.leaf[aria-expanded="true"] .leaf__index {
  color: var(--brass);
}

.leaf__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  writing-mode: vertical-rl;
  align-self: flex-start;
  margin-top: auto;
}

html[lang="ar"] .leaf__name {
  writing-mode: horizontal-tb;
  transform: none;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.leaf[aria-expanded="true"] .leaf__name {
  writing-mode: horizontal-tb;
  transform: none;
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  line-height: 1.05;
  margin-top: 1.5rem;
}

.leaf__panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  max-width: 18rem;
  margin-top: 0.9rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

.leaf[aria-expanded="true"] .leaf__panel {
  opacity: 1;
  max-height: none;
  overflow: visible;
  margin-top: auto;
}

.leaf__kicker {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--mineral);
}

.leaf__line {
  font-size: 1.05rem;
  line-height: 1.35;
}

.leaf__handle {
  position: absolute;
  inset-inline-end: 0.85rem;
  top: 46%;
  width: 1.35rem;
  height: 0.28rem;
  background: linear-gradient(90deg, var(--brass), var(--brass-bright));
  border-radius: 1px;
}

.leaf[aria-expanded="true"] .leaf__handle {
  opacity: 0;
}

.chapter {
  padding: 2.6rem 0 2.8rem;
  border-top: 1px solid var(--line);
}

.chapter__head {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 1.6rem;
}

.chapter__index {
  margin: 0;
  font-family: var(--display);
  font-weight: 750;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--brass);
}

h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(2rem, 3vw, 2.7rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

html[lang="ar"] h2 {
  letter-spacing: 0;
  line-height: 1.3;
  font-weight: 700;
}

.dek {
  margin: 0.55rem 0 0;
  max-width: 38rem;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  padding-inline-start: 5.5rem;
}

h3 {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mineral);
}

html[lang="ar"] h3 {
  letter-spacing: 0;
  text-transform: none;
  font-size: 1.05rem;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  position: relative;
  padding-inline-start: 1rem;
  margin: 0 0 0.7rem;
}

li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.65em;
  width: 0.4rem;
  height: 1px;
  background: var(--brass);
}

.close {
  padding: 0 0 4rem;
}

.close__plate {
  background: var(--frame);
  color: var(--hall);
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: inset 0 0 0 1px var(--brass);
}

.close__plate .eyebrow {
  color: var(--brass-bright);
}

.close__plate h2 {
  max-width: 24ch;
  text-wrap: balance;
}

.close__plate p:last-child {
  max-width: 40rem;
  margin: 1rem 0 0;
  color: rgba(228, 234, 227, 0.86);
}

.foot {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 1.6rem;
}

.foot__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.98rem;
}

.foot p {
  margin: 0;
}

.foot .mark img {
  height: 22px;
}

@media (max-width: 860px) {
  .top__nav {
    display: none;
  }

  .hero,
  html[lang="ar"] .hero,
  .split,
  .chapter__head {
    grid-template-columns: 1fr;
  }

  .split {
    padding-inline-start: 0;
  }

  .gate,
  .gate[data-open="requests"],
  .gate[data-open="appointments"] {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .leaf {
    min-height: 4.5rem;
  }

  .leaf[aria-expanded="true"] {
    min-height: 11rem;
  }

  .leaf__name,
  html[lang="ar"] .leaf__name,
  .leaf[aria-expanded="true"] .leaf__name {
    writing-mode: horizontal-tb;
    transform: none;
    margin-top: 0.4rem;
    font-size: 1.45rem;
  }

  .foot__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .gate,
  .leaf__panel {
    transition: none;
  }
}
