:root {
  --ink: #050505;
  --paper: #ffffff;
  --brand: #3175ed;
  --header-h: 74px;
  --modal-scrim: rgba(0, 0, 0, 0.58);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[dir="rtl"] body {
  font-family: "Noto Kufi Arabic", Inter, sans-serif;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(49, 117, 237, 0.7);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--brand);
  color: var(--ink);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  min-height: var(--header-h);
  background: #000;
  color: #fff;
}

.header-shell {
  min-height: var(--header-h);
  width: 100%;
  padding: 12px clamp(14px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  color: #fff;
}

.brand-logo {
  display: block;
  width: clamp(150px, 16vw, 206px);
  height: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.language-toggle {
  min-height: 44px;
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.language-btn {
  min-width: 48px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  transition: background 180ms ease, color 180ms ease;
}

.language-btn.active {
  background: #fff;
  color: #000;
}

.primary-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 22px;
  background: var(--brand);
  color: #111;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  transition: transform 180ms ease, background 180ms ease;
}

.primary-cta:hover {
  transform: translateY(-1px);
  background: #5a95ff;
}

.hero {
  width: 100%;
}

.hero-stage,
.hero-art {
  width: 100%;
  margin: 0;
}

.hero-art {
  position: relative;
  aspect-ratio: 1536 / 812;
  overflow: hidden;
  background: #fff;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 180ms ease;
}

.hero-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.hero-image.active {
  opacity: 1;
}

body.welcome-open {
  overflow: hidden;
}

.welcome-modal[hidden] {
  display: none;
}

.welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 40px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.welcome-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.welcome-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: var(--modal-scrim);
  cursor: pointer;
}

.welcome-card {
  position: relative;
  width: min(92vw, 430px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  padding: clamp(28px, 6vw, 40px);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  transform: translateY(14px) scale(0.98);
  transition: transform 220ms ease;
}

.welcome-modal.visible .welcome-card {
  transform: translateY(0) scale(1);
}

.welcome-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #f2f2f2;
  color: #111;
  cursor: pointer;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  transition: background 180ms ease, transform 180ms ease;
}

html[dir="rtl"] .welcome-close {
  right: auto;
  left: 10px;
}

.welcome-close:hover {
  background: #e6e6e6;
  transform: translateY(-1px);
}

.welcome-copy {
  min-width: 0;
  padding: 14px 22px 0;
  text-align: center;
}

.welcome-kicker {
  margin: 0 0 8px;
  color: #9a5d00;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.welcome-copy h2 {
  margin: 0;
  color: #050505;
  font-size: clamp(25px, 5vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

.welcome-copy p:not(.welcome-kicker) {
  margin: 12px 0 0;
  color: #343434;
  font-size: 16px;
  line-height: 1.55;
}

@media (max-width: 700px) {
  .hero-art {
    aspect-ratio: 1080 / 1871;
  }
}

@media (max-width: 620px) {
  :root {
    --header-h: 64px;
  }

  .header-shell {
    padding: 8px 12px;
    gap: 8px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .language-toggle {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 3px;
  }

  .language-btn {
    min-width: 42px;
    min-height: 34px;
    font-size: 12px;
  }

  .primary-cta {
    flex: 1 1 auto;
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
  }

  .welcome-card {
    width: min(100%, 380px);
  }

  .welcome-copy {
    padding: 18px 4px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
