﻿/* Palette mirrors the main site theme (global.css): same bg/text/accent/surface. */
:root {
  --cs-bg: #ece7de;
  --cs-surface: #ffffff;
  --cs-surface-2: #f8f6f1;
  --cs-ink: #121212;
  --cs-muted: #505866;
  --cs-line: rgba(18, 18, 18, 0.14);
  --cs-accent: #0a6c74;
  --cs-accent-ink: #ffffff;
  --cs-dot: #e79037;
  --cs-dot-soft: rgba(231, 144, 55, 0.22);
  --cs-pill: rgba(18, 18, 18, 0.05);
  --cs-btn: #0a6c74;
  --cs-btn-ink: #ffffff;
  --cs-foot: #505866;
  --cs-shadow: 0 18px 44px rgba(18, 18, 18, 0.12);
  color-scheme: light;
}

html[data-theme='dark'] {
  --cs-bg: #0b0d12;
  --cs-surface: #11141b;
  --cs-surface-2: #151922;
  --cs-ink: #f5f7fb;
  --cs-muted: #a7adba;
  --cs-line: rgba(255, 255, 255, 0.08);
  --cs-accent: #8dd8de;
  --cs-accent-ink: #081012;
  --cs-dot: #d7a8f3;
  --cs-dot-soft: rgba(215, 168, 243, 0.22);
  --cs-pill: rgba(255, 255, 255, 0.06);
  --cs-btn: #8dd8de;
  --cs-btn-ink: #081012;
  --cs-foot: #a7adba;
  --cs-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.cs {
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(0.5rem, 1.5vh, 1rem) clamp(1rem, 5vw, 4rem);
  background: var(--cs-bg);
  color: var(--cs-ink);
  font-family: Inter, Cairo, system-ui, sans-serif;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

[lang='ar'] {
  font-family: Cairo, Inter, system-ui, sans-serif;
}

.cs-biling__col[lang='ar'] {
  line-height: 1.7;
}

/* skip link */
.cs-skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 50;
  background: var(--cs-btn);
  color: var(--cs-btn-ink);
  padding: 0.5rem 0.9rem;
  border-radius: 0.4rem;
  text-decoration: none;
  font-weight: 800;
  transition: top 140ms ease;
}

.cs-skip:focus-visible {
  top: 0.75rem;
}

/* faint watermark (behind card) */
.cs-watermark {
  position: fixed;
  bottom: -2.5vw;
  right: -1vw;
  font-size: clamp(5rem, 22vw, 16rem);
  font-weight: 900;
  line-height: 1;
  color: var(--cs-ink);
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
  white-space: nowrap;
  user-select: none;
}

body[dir='rtl'] .cs-watermark {
  right: auto;
  left: -1vw;
}

/* signature panel (site-surface card) */
.cs-panel {
  width: min(100%, 1120px);
  flex: 0.5 1 auto; /* البوكس يملأ نصف المساحة المتبقية فقط (ليس الصفحة كاملة) */
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center; /* محتوى البوكس متمركز عمودياً داخل ارتفاعه */
  position: relative;
  text-align: center;
  padding: clamp(0.8rem, 2vh, 1.3rem) clamp(1.25rem, 4vw, 3rem);
  border-radius: 2rem;
  background: linear-gradient(160deg, var(--cs-surface) 0%, var(--cs-surface-2) 100%);
  box-shadow: var(--cs-shadow);
  border: 1px solid var(--cs-line);
  overflow: hidden;
}

.cs-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

/* brand logo */
.cs-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(0.85rem, 2vh, 1.3rem);
}

.cs-brand__logo {
  display: block;
  height: clamp(60px, 12vh, 110px);
  width: auto;
  filter: drop-shadow(0 6px 14px rgba(18, 18, 18, 0.24));
}

/* badge */
.cs-badge {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--cs-line);
  background: var(--cs-pill);
  color: var(--cs-ink);
  font-size: clamp(0.72rem, 1.5vw, 0.85rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.3;
  opacity: 0.95;
}

/* giant bilingual wordmark: big AR + small EN beside it */
.cs-word {
  margin: clamp(0.85rem, 1.9vh, 1.3rem) 0 0;
  line-height: 0.9;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.cs-word__main {
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 900;
  color: var(--cs-ink);
}

.cs-word__alt {
  font-size: clamp(0.8rem, 1.8vw, 1.1rem);
  font-weight: 800;
  color: var(--cs-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 0.6rem;
  padding-top: 0.2em;
}

/* bilingual AR + EN block */
.cs-biling {
  margin: clamp(1rem, 2.1vh, 1.5rem) auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.7rem, 1.6vw, 1rem);
  text-align: center;
  max-width: 820px;
}

.cs-biling__col {
  padding: clamp(0.7rem, 1.5vh, 1rem) clamp(1rem, 2vw, 1.5rem);
  border-radius: 1.4rem;
  background: var(--cs-pill);
  border: 1px solid var(--cs-line);
}

.cs-biling__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cs-dot);
  margin-bottom: 0.35rem;
}

.cs-biling__headline {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--cs-ink);
  line-height: 1.3;
}

.cs-biling__sub {
  margin: 0.45rem auto 0;
  max-width: 48ch;
  font-size: clamp(0.85rem, 1.7vw, 0.98rem);
  font-weight: 600;
  color: var(--cs-muted);
  line-height: 1.55;
}

@media (min-width: 640px) {
  .cs-biling {
    grid-template-columns: 1fr 1fr;
  }
}

/* notify form */
.cs-form {
  margin: clamp(1rem, 2.1vh, 1.5rem) auto 0;
  max-width: 540px;
}

.cs-form__row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.cs-input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.9rem 1.2rem;
  font: inherit;
  font-weight: 700;
  color: var(--cs-ink);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--cs-line);
  border-radius: 0.9rem;
  outline: none;
}

.cs-input::placeholder {
  color: var(--cs-muted);
  opacity: 0.8;
}

.cs-input:focus-visible {
  border-color: var(--cs-btn);
  box-shadow: 0 0 0 3px var(--cs-dot-soft);
}

.cs-btn {
  flex: 0 0 auto;
  padding: 0.9rem 1.6rem;
  font: inherit;
  font-weight: 800;
  color: var(--cs-btn-ink);
  background: var(--cs-btn);
  border: none;
  border-radius: 0.9rem;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}

.cs-btn:hover {
  filter: brightness(1.06);
}

.cs-btn:active {
  transform: translateY(1px);
}

.cs-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--cs-dot-soft);
}

.cs-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.cs-form__status {
  min-height: 1.2rem;
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.cs-form__status--ok {
  color: var(--cs-ink);
}

.cs-form__status--err {
  color: #a5222a;
}

html[data-theme='dark'] .cs-form__status--err {
  color: #ff9a9a;
}

/* live strip: AR + EN rows */
.cs-lives {
  margin: clamp(1rem, 2.1vh, 1.5rem) auto 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.cs-live {
  display: flex;
  flex-direction: column; /* يجعل الصفوف أسفل بعضها */
  gap: 0.5rem; /* التحكم في المسافة بين السطر العربي والإنجليزي */
  align-items: stretch;
  width: 100%; /* البوكس ثابت على أكبر مساحة ولا يتغير بحسب النص */
  max-width: 880px;
  padding: 0.6rem 1.1rem;
  border-radius: 1rem;
  background: var(--cs-pill);
  border: 1px solid var(--cs-line);
  font-size: clamp(0.8rem, 1.8vw, 0.92rem);
  font-weight: 800;
  min-width: 0;
}

.cs-live__row {
  display: flex; /* يجعل النقطة والنص في صف واحد */
  align-items: center;
  justify-content: flex-start; /* يبدأ المحتوى من بداية الصف: عربي من اليمين, إنجليزي من اليسار */
  gap: 0.5rem; /* التحكم في المسافات الداخلية بين النقطة والنص */
  width: 100%; /* الصف يشغل عرض البوكس كاملاً */
  min-width: 0;
}

.cs-live__row[lang='en'] {
  direction: ltr; /* يبدأ الجزء الإنجليزي من اليسار */
}

.cs-live__item {
  color: var(--cs-ink);
  min-width: 0;
  white-space: normal;
  line-height: 1.4;
}

.cs-live__dot {
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cs-dot);
  box-shadow: 0 0 0 0 var(--cs-dot-soft);
  animation: cs-pulse 1.8s ease-out infinite;
}

@keyframes cs-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--cs-dot-soft);
  }
  70% {
    box-shadow: 0 0 0 0.55rem rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.cs-live__label {
  color: var(--cs-muted);
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* social icons: same square-tile look as the site footer (Font Awesome brands) */
.cs-social {
  margin: clamp(1rem, 2.1vh, 1.5rem) auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
}

.cs-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--cs-line);
  color: var(--cs-muted);
  background: var(--cs-pill);
  font-size: 1.05rem;
  text-decoration: none;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.cs-social__link:hover {
  color: var(--cs-accent);
  border-color: color-mix(in oklab, var(--cs-accent) 30%, var(--cs-line));
  background: color-mix(in oklab, var(--cs-accent) 8%, var(--cs-surface));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--cs-dot-soft);
}

.cs-social__link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--cs-dot-soft);
}

.cs-social__icon {
  display: inline-flex;
  line-height: 0;
}

.cs-social__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* footer: two marquees + notes */
.cs-foot {
  margin-top: clamp(0.85rem, 2vh, 1.25rem);
  width: 100%;
  text-align: center;
}

.cs-marq {
  overflow: hidden;
  max-width: 1180px;
  margin-inline: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.cs-marq--ar,
.cs-marq--en {
  direction: ltr;
}

.cs-marq__track {
  display: flex;
  gap: 2.4rem;
  width: max-content;
  padding-right: 2.4rem;
  animation: cs-scroll 26s linear infinite;
}

.cs-marq--en .cs-marq__track {
  animation-direction: reverse;
}

.cs-marq__item {
  font-size: clamp(0.82rem, 1.9vw, 0.96rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--cs-ink);
  opacity: 0.85;
  white-space: nowrap;
}

@keyframes cs-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-marq__track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    gap: 1rem 2rem;
  }
}

.cs-foot__notes {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.cs-foot__note {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cs-foot);
  letter-spacing: 0.03em;
}

@media (max-width: 520px) {
  .cs-form__row {
    flex-direction: column;
  }

  .cs-btn {
    width: 100%;
  }

  .cs-word {
    gap: 0.35em;
  }
}

