:root {
  color-scheme: light;
  --ink: #2f281f;
  --muted: #6e6254;
  --paper: #f8f2e7;
  --paper-deep: #ecdfca;
  --surface: rgba(255, 252, 246, 0.9);
  --line: #d8c8ae;
  --green: #315f4f;
  --green-soft: #dce9df;
  --amber: #a56b24;
  --shadow: 0 22px 70px rgba(64, 48, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(224, 190, 132, 0.34), transparent 30rem),
    radial-gradient(circle at 90% 24%, rgba(111, 154, 127, 0.2), transparent 28rem),
    linear-gradient(rgba(86, 69, 47, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 69, 47, 0.045) 1px, transparent 1px), var(--paper);
  background-size:
    auto,
    auto,
    48px 48px,
    48px 48px,
    auto;
  font-family: 'Avenir Next', 'Segoe UI', sans-serif;
  line-height: 1.65;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  color: var(--amber);
}

.shell {
  width: min(calc(100% - 32px), 920px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
}

.brand {
  color: var(--ink);
  font-family: 'Iowan Old Style', 'Palatino Linotype', serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: clamp(32px, 7vw, 72px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -60px;
  bottom: -100px;
  width: 320px;
  height: 320px;
  border: 54px solid rgba(49, 95, 79, 0.1);
  border-radius: 50%;
  content: '';
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: 'Iowan Old Style', 'Palatino Linotype', serif;
  line-height: 1.16;
}

h1 {
  max-width: 670px;
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: -0.035em;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 64px;
}

.link-card {
  min-height: 170px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--green);
  color: var(--ink);
  transform: translateY(-4px);
}

.link-card h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.link-card p {
  margin: 0;
  color: var(--muted);
}

.document {
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.document h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.document h2 {
  margin: 2.2em 0 0.6em;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.document h3 {
  margin: 1.5em 0 0.35em;
  font-size: 1.15rem;
}

.document p,
.document li {
  max-width: 74ch;
}

.document ul,
.document ol {
  padding-inline-start: 1.35rem;
}

.language-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 8px;
}

.language-nav a,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.notice {
  margin: 28px 0;
  padding: 18px 20px;
  border-inline-start: 4px solid var(--amber);
  border-radius: 4px 16px 16px 4px;
  background: #fff5df;
}

.language-section {
  padding-top: 28px;
  border-top: 1px solid var(--line);
  margin-top: 44px;
}

.language-section:first-of-type {
  border-top: 0;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.85rem;
}

[dir='rtl'] {
  font-family: 'Geeza Pro', 'Noto Naskh Arabic', serif;
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 320px;
    border-radius: 24px;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }

  .link-card {
    min-height: 0;
  }

  .document {
    border-radius: 22px;
  }
}

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

  .link-card {
    transition: none;
  }
}
