:root {
  --bg: #f4f0ea;
  --surface: #ffffff;
  --surface-soft: #eee6dc;
  --ink: #17130f;
  --muted: #746b61;
  --line: rgba(44, 34, 24, 0.12);
  --bronze: #9a693d;
  --bronze-2: #c79a6d;
  --dark: #181511;
  --dark-2: #241e18;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow: 0 18px 45px rgba(42, 30, 18, 0.12);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
}
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.topbar {
  height: 86px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(19, 16, 13, 0.96);
  color: white;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.language-switch {
  justify-self: start;
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: white;
  border-radius: 999px;
  min-width: 48px;
  height: 38px;
  transition: .2s ease;
}
.language-switch:hover { border-color: var(--bronze-2); color: var(--bronze-2); }
.topbar-spacer { justify-self: end; width: 48px; }
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand--compact { flex-direction: column; gap: 0; line-height: 1; }
.brand-mark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.45rem;
  letter-spacing: -0.09em;
  color: var(--bronze-2);
}
.brand-name-ar { font-size: .8rem; margin-top: -2px; }
.brand-name-en { font-size: .62rem; letter-spacing: .18em; margin-top: 4px; opacity: .76; }

.hero {
  min-height: 455px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: white;
  background:
    linear-gradient(115deg, rgba(16,13,10,.98), rgba(35,25,17,.84)),
    radial-gradient(circle at 72% 32%, rgba(199,154,109,.33), transparent 32%),
    #1c1712;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .28;
  background-image:
    linear-gradient(90deg, transparent 49.7%, rgba(255,255,255,.06) 50%, transparent 50.3%),
    linear-gradient(0deg, transparent 49.7%, rgba(255,255,255,.04) 50%, transparent 50.3%);
  background-size: 88px 88px;
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(2px); z-index: -1; }
.hero-glow--one { width: 380px; height: 380px; background: rgba(153,105,61,.15); top: -80px; right: 12%; }
.hero-glow--two { width: 300px; height: 300px; background: rgba(199,154,109,.09); bottom: -130px; left: 8%; }
.hero-content { width: min(860px, calc(100% - 48px)); text-align: center; padding: 72px 0; }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; color: var(--bronze-2); font-weight: 700; }
.hero h1 { margin: 0 auto; max-width: 800px; font-size: clamp(2.25rem, 6vw, 4.7rem); line-height: 1.1; letter-spacing: -.025em; font-weight: 650; }
.hero-copy { max-width: 680px; margin: 22px auto 0; color: rgba(255,255,255,.75); line-height: 1.9; font-size: 1.05rem; }

.links-section { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; padding: 66px 0 84px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -.02em; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.link-card {
  min-height: 220px;
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(35,25,17,.07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-align: start;
  color: var(--ink);
  width: 100%;
}
button.link-card { appearance: none; }
.link-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(154,105,61,.32); }
.link-card--dark { background: linear-gradient(145deg, #1b1815, #2a231d); color: #fff; }
.link-card--bronze { background: linear-gradient(145deg, #805534, #b17d4d); color: #fff; }
.link-card--sand { background: linear-gradient(145deg, #eee4d7, #ddc9b1); }
.link-card--image { color: white; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.link-card--image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12,10,8,.86), rgba(12,10,8,.16)); }
.link-card--image > * { position: relative; z-index: 1; }
.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  color: var(--bronze);
  font-size: 1.45rem;
  background: rgba(255,255,255,.06);
}
.link-card--dark .card-icon,
.link-card--bronze .card-icon,
.link-card--image .card-icon { color: #f1c596; }
.card-copy h3 { margin: 0 0 7px; font-size: 1.15rem; }
.card-copy p { margin: 0; color: var(--muted); line-height: 1.6; font-size: .9rem; }
.link-card--dark .card-copy p,
.link-card--bronze .card-copy p,
.link-card--image .card-copy p { color: rgba(255,255,255,.72); }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; color: var(--bronze); font-size: .84rem; font-weight: 700; }
.link-card--dark .card-footer,
.link-card--bronze .card-footer,
.link-card--image .card-footer { color: #efc18e; }
.card-arrow { font-size: 1.35rem; }
.card-disabled { opacity: .58; }
.card-disabled:hover { transform: none; box-shadow: 0 10px 26px rgba(35,25,17,.07); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(11, 9, 7, .6);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 22px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 44px));
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
  padding: 26px;
}
.modal-handle { display: none; width: 44px; height: 5px; border-radius: 999px; background: #d1c6ba; margin: 0 auto 18px; }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding-bottom: 20px; }
.modal-header h2 { margin: 0; font-size: 1.65rem; }
.modal-kicker { color: var(--bronze); margin: 0 0 5px; font-size: .8rem; font-weight: 700; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 1.45rem; color: var(--ink); }
.option-list { display: grid; gap: 10px; }
.option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfaf8;
  transition: .18s ease;
}
.option-item:hover { border-color: rgba(154,105,61,.45); background: #f8f2eb; }
.option-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.option-symbol { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-soft); color: var(--bronze); flex: 0 0 auto; }
.option-text strong { display: block; margin-bottom: 3px; }
.option-text span { display: block; color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.empty-state { text-align: center; padding: 30px 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); }

.footer {
  min-height: 150px;
  background: var(--dark);
  color: rgba(255,255,255,.76);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 38px max(24px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.brand-mark--small { font-size: 2rem; }
.footer-brand strong { display: block; color: white; letter-spacing: .1em; }
.footer-brand span { display: block; color: rgba(255,255,255,.5); margin-top: 4px; font-size: .82rem; }
.footer p { margin: 0; font-size: .84rem; }

html[dir="ltr"] .card-arrow { transform: rotate(180deg); }

@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .topbar { height: 76px; padding-inline: 18px; }
  .brand-mark { font-size: 2rem; }
  .hero { min-height: 390px; }
  .hero-content { width: min(100% - 34px, 680px); padding: 56px 0; }
  .hero h1 { font-size: 2.35rem; }
  .hero-copy { font-size: .96rem; }
  .links-section { width: min(100% - 26px, var(--max)); padding: 44px 0 58px; }
  .card-grid { gap: 11px; }
  .link-card { min-height: 190px; padding: 18px; border-radius: 18px; }
  .card-icon { width: 46px; height: 46px; border-radius: 14px; }
  .card-copy h3 { font-size: 1rem; }
  .card-copy p { font-size: .8rem; }
  .footer { flex-direction: column; align-items: flex-start; padding: 34px 22px; }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal { width: 100%; max-height: 82vh; border-radius: 26px 26px 0 0; padding: 20px 18px 24px; }
  .modal-handle { display: block; }
}

@media (max-width: 410px) {
  .card-grid { grid-template-columns: 1fr; }
  .link-card { min-height: 175px; }
}
