:root {
  --ink: #172033;
  --muted: #5c6678;
  --paper: #f3f6f8;
  --white: #ffffff;
  --sea: #1a7a72;
  --sea-deep: #0f4f4a;
  --sea-soft: #d8efeb;
  --sky: #d9e7f2;
  --yellow: #fef305;
  --line: rgba(23, 32, 51, 0.12);
  --shadow: 0 14px 36px rgba(23, 32, 51, 0.08);
  --radius: 1rem;
  --header-h: 80px;
  --font: "Outfit", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  --arabic: "Amiri", "Times New Roman", serif;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(217, 231, 242, 0.9), transparent 42%),
    radial-gradient(ellipse at 0% 30%, rgba(216, 239, 235, 0.65), transparent 36%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--sea-deep); }

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
  margin: 0;
}

h1 em, h2 em {
  font-style: italic;
  font-weight: 560;
  color: var(--sea-deep);
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-repeat: no-repeat;
  background-size: 100% 0.32em;
  background-position: 0 88%;
}

p { margin: 0; }

ul { margin: 0; padding: 0; }

::selection { background: var(--yellow); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--sea);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--yellow);
  color: var(--ink);
  padding: 0.55rem 0.9rem;
  font-weight: 700;
}

.skip:focus { top: 0.75rem; }

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(243, 246, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner,
.nav {
  display: flex;
  align-items: center;
}

.header-inner {
  height: 100%;
  justify-content: space-between;
  gap: 1rem;
}

.brand img { height: 52px; width: auto; }

.nav { gap: 0.35rem; }

.nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 0.7rem;
}

.nav a:hover { background: var(--white); }

.nav a[aria-current="page"] {
  background: var(--sea-soft);
  color: var(--sea-deep);
}

.nav a.btn,
.nav a.btn:hover {
  color: var(--ink);
  background: var(--yellow);
  border-radius: 999px;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-inline-start: 0.35rem;
}

.lang {
  display: flex;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}

.lang button {
  min-width: 42px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 0;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.btn:hover { transform: translateY(-1px); filter: brightness(0.98); }

.btn-small {
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  font-size: 0.95rem;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(23, 32, 51, 0.28);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--white);
  transform: none;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--yellow);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bars,
.bars::before,
.bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.bars::before,
.bars::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
}

.bars::before { top: -6px; }
.bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

.kicker {
  margin-bottom: 0.7rem;
  color: var(--sea);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-hero {
  padding: 2.8rem 0 3.4rem;
}

.hero {
  display: grid;
  gap: 2.2rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  max-width: 12ch;
}

.lead {
  max-width: 38rem;
  margin: 1.15rem 0 1.35rem;
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--muted);
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-top: 1.5rem;
}

.facts li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
}

.hero-visual {
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.hero-mark {
  width: min(280px, 72vw);
  filter: drop-shadow(0 18px 30px rgba(23, 32, 51, 0.16));
}

.hero-note {
  width: min(280px, 100%);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.95rem 1.05rem;
}

.hero-note b {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--arabic);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--ink);
}

.ribbon {
  margin: 0;
  padding: 0.7rem 1rem;
  background: var(--sea-deep);
  color: var(--white);
  text-align: center;
  font-family: var(--arabic);
  font-size: 1.35rem;
  line-height: 1.2;
}

.section { padding: 4.6rem 0; }

.section-head { max-width: 16em; margin-bottom: 2rem; }

.section-head h2,
.page-hero h1,
.close-copy h2,
.family-copy h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
}

.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); max-width: 18ch; }

.page-hero { padding: 3.3rem 0 0.4rem; }

.section-intro {
  max-width: 42rem;
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--muted);
}

.cards-3, .cards-2, .principles {
  display: grid;
  gap: 1rem;
}

.card, .join-card, .principle {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.3rem 1.45rem;
}

.cards-3 .card:nth-child(2),
.join-card:nth-child(2) {
  background: var(--sea-soft);
  border-color: transparent;
}

.card h3, .join-card h2, .principle h3 {
  font-size: 1.7rem;
  margin-bottom: 0.55rem;
}

.num {
  display: block;
  margin-bottom: 0.8rem;
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--sea);
}

.section-more { margin-top: 1.4rem; font-weight: 700; }

.space-list { border-top: 1px solid var(--line); }

.space-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.space-item span {
  font-family: var(--display);
  color: var(--ink);
}

.space-item span:first-child {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.95rem;
}

.quote-band {
  background:
    linear-gradient(135deg, rgba(26, 122, 114, 0.18), transparent 40%),
    var(--ink);
  color: var(--white);
  padding: 4.2rem 0;
}

.quote-band blockquote {
  max-width: 16em;
  font-family: var(--display);
  font-size: clamp(1.9rem, 4.2vw, 3.15rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--white);
}

.quote-band figcaption {
  margin-top: 1.1rem;
  color: var(--yellow);
  font-weight: 700;
}

.timeline { display: grid; }

.tl {
  position: relative;
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 0.3rem 0 1.4rem 1.15rem;
  border-inline-start: 3px solid var(--sea);
}

.tl::before {
  content: "";
  position: absolute;
  inset-inline-start: -8px;
  top: 0.45rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px var(--paper);
}

.tl strong {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--sea-deep);
}

.family {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}

.family-panel {
  background: var(--yellow);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.arabic-xl {
  font-family: var(--arabic);
  font-size: clamp(3.4rem, 7vw, 5.4rem);
  line-height: 1;
  color: var(--ink);
}

.family-copy p, .prose p { margin-top: 1rem; }

.family-copy .text-link, .prose a, .section-more a {
  font-weight: 700;
  text-underline-offset: 3px;
}

.close-band {
  background: var(--sea-deep);
  color: var(--white);
  padding: 4rem 0;
}

.close-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: end;
  justify-content: space-between;
}

.close-copy { max-width: 16em; }

.close-band .kicker,
.close-band h2 { color: var(--yellow); }

.close-copy p { margin-top: 0.8rem; font-size: 1.1rem; color: rgba(255, 255, 255, 0.88); }

.prose { max-width: 42rem; }
.prose + .prose, .stack > * + * { margin-top: 0; }

.blocks { margin-top: 2rem; }

.block {
  display: grid;
  gap: 0.4rem;
  padding: 1.7rem 0;
  border-top: 1px solid var(--line);
}

.block .idx {
  font-family: var(--display);
  font-size: 1.8rem;
  color: var(--sea);
}

.block h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 0.4rem; }

.callout {
  margin-top: 1.5rem;
  background: var(--sky);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.4rem;
}

.callout h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 0.6rem; }

.join-card p { margin-bottom: 1.1rem; }

.contact-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 4rem;
}

.form {
  position: relative;
  display: grid;
  gap: 0.9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.field { display: grid; gap: 0.35rem; }

.field.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form .btn[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.field label { font-weight: 700; color: var(--ink); }

input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid rgba(23, 32, 51, 0.18);
  border-radius: 0.85rem;
  background: var(--paper);
}

input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--sea-soft);
  border-color: var(--sea);
}

textarea { min-height: 150px; resize: vertical; }

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  background: #fff7c8;
  border-color: var(--ink);
}

.error {
  min-height: 1.15em;
  color: var(--sea-deep);
  font-size: 0.92rem;
  font-weight: 650;
}

.form-note { color: var(--muted); font-size: 0.95rem; }

.form-status {
  background: var(--sea-soft);
  color: var(--sea-deep);
  padding: 0.85rem 0.95rem;
  border-radius: 0.85rem;
}

.side-card {
  background: var(--yellow);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}

.side-card h2 { font-size: 1.7rem; }

.side-card a { font-weight: 700; color: var(--ink); }

.side-card ul, .site-footer ul { list-style: none; display: grid; gap: 0.35rem; }

.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 3rem 0 1.3rem;
}

.site-footer a { color: var(--white); font-weight: 650; }

.footer-grid {
  display: grid;
  gap: 1.8rem;
}

.brand-footer img { width: 72px; height: auto; margin-bottom: 0.8rem; }

.footer-label {
  margin-bottom: 0.55rem;
  color: var(--yellow);
  font-weight: 700;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

.not-found {
  min-height: 60vh;
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: 4rem 0;
}

.not-found h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); max-width: 12ch; }

@media (min-width: 800px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; min-height: min(calc(100vh - 8rem), 680px); }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .cards-2, .principles, .family, .contact-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 0.8fr 0.8fr; }
  .block { grid-template-columns: 4.5rem 1fr; gap: 1rem; align-items: start; }
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    display: none;
    position: fixed;
    z-index: 40;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.4rem 1.25rem 2rem;
    background: var(--ink);
    overflow: auto;
  }

  .nav.is-open { display: flex; }

  .nav ul { flex-direction: column; align-items: flex-start; width: 100%; gap: 0.2rem; }

  .nav a {
    color: var(--white);
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 560;
    padding: 0.2rem 0.55rem;
  }

  .nav a[aria-current="page"] { background: var(--yellow); color: var(--ink); }

  .nav a.btn,
  .nav a.btn:hover { background: var(--yellow); color: var(--ink); }

  .nav-tools { flex-direction: column; align-items: flex-start; margin: 0; }

  .lang { border-color: rgba(255, 255, 255, 0.35); background: transparent; }
  .lang button { color: var(--white); }
  .lang button[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }

  body.nav-open { overflow: hidden; }
}

[dir="rtl"] body {
  font-family: var(--arabic);
  font-size: 1.2rem;
  line-height: 1.75;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] .quote-band blockquote,
[dir="rtl"] .nav a {
  font-family: var(--arabic);
  letter-spacing: 0;
  line-height: 1.35;
}

[dir="rtl"] h1 em,
[dir="rtl"] h2 em {
  background-size: 100% 0.28em;
  background-position: 0 78%;
}

[dir="rtl"] .kicker {
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--arabic);
  font-size: 1.05rem;
}

[dir="rtl"] .btn,
[dir="rtl"] .lang button,
[dir="rtl"] .facts li,
[dir="rtl"] .footer-label { font-family: var(--arabic); }

[dir="rtl"] .btn:hover { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

@media print {
  .site-header, .ribbon, .nav-toggle { display: none; }
  .site-footer, .quote-band, .close-band { background: white; color: black; }
  a { text-decoration: underline; }
}
