/* ============================================================
   REBALANCE PILATES STUDIO — style.css
   ============================================================ */

/* ============================================================
   CUSTOM FONTS (ITF Wathiq Thuluth)
   ============================================================ */
@font-face {
  font-family: 'ITF Wathiq Thuluth';
  src: url('assets/fonts/itfWathiqThuluth-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ITF Wathiq Thuluth';
  src: url('assets/fonts/itfWathiqThuluth-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ITF Wathiq Thuluth';
  src: url('assets/fonts/itfWathiqThuluth-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:       #7A7651;
  --fg:       #E1DFD1;
  --fg80:     rgba(225,223,209,.80);
  --fg60:     rgba(225,223,209,.60);
  --fg35:     rgba(225,223,209,.35);
  --fg15:     rgba(225,223,209,.15);
  --fg08:     rgba(225,223,209,.08);
  --ease-out: cubic-bezier(.22,1,.36,1);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Tajawal', sans-serif;
  overflow-x: hidden;
  cursor: crosshair;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ════════════════════════════════
   LAYERED BACKGROUND (like PDF)
   ════════════════════════════════ */

/* warm glow orb top-left only — NO dark vignette */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 15% 32%,
      rgba(238,224,192,.18) 0%,
      rgba(200,188,148,.05) 40%,
      transparent 65%);
}

/* concentric halo rings around the glow orb */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle 3px   at 16% 35%, rgba(228,215,185,.6) 0%, transparent 100%),
    radial-gradient(circle 55px  at 16% 35%, rgba(228,215,185,.14) 0%, transparent 100%),
    radial-gradient(circle 115px at 16% 35%, rgba(228,215,185,.09) 0%, transparent 100%),
    radial-gradient(circle 195px at 16% 35%, rgba(228,215,185,.055) 0%, transparent 100%),
    radial-gradient(circle 300px at 16% 35%, rgba(228,215,185,.035) 0%, transparent 100%),
    radial-gradient(circle 430px at 16% 35%, rgba(228,215,185,.02) 0%, transparent 100%);
  animation: haloBreath 8s ease-in-out infinite;
}
@keyframes haloBreath {
  0%,100%{ opacity:.8; }
  50%    { opacity:1;  }
}

/* grain */
#grain {
  position: fixed; inset: 0; z-index: 999;
  pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* cursor glow */
#cursor-glow {
  position: fixed; width:300px; height:300px; border-radius:50%;
  background: radial-gradient(circle, var(--fg08) 0%, transparent 70%);
  pointer-events:none; z-index:1;
  transform:translate(-50%,-50%);
}

#particles { position:fixed; inset:0; z-index:0; pointer-events:none; }

/* ════════════════════════════════
   PAGE
   ════════════════════════════════ */
.page {
  position:relative; z-index:2;
  min-height:100svh;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  padding:90px 36px 80px;
  text-align:center;
}

/* ════════════════════════════════
   LOGO ZONE
   ════════════════════════════════ */
.logo-zone {
  position:relative;
  width:300px; height:300px;
  margin:0 auto 64px;
  transition:transform .12s ease-out;
}

.rings-svg {
  position:absolute; inset:0; width:100%; height:100%;
  animation:rotateCW 55s linear infinite;
}
.rings-svg-rev {
  position:absolute; inset:0; width:100%; height:100%;
  animation:rotateCW 38s linear infinite reverse;
}
@keyframes rotateCW { to{ transform:rotate(360deg); } }

.rp       { fill:none; stroke:var(--fg35); stroke-width:.65; }
.rp-dash1 { stroke-dasharray:3 10; }
.rp-dash2 { stroke-dasharray:1 16; opacity:.45; }
.rp-dash3 { stroke-dasharray:5 4;  opacity:.3; }

.rings-solid { position:absolute; inset:0; width:100%; height:100%; }
.sr { fill:none; stroke:var(--fg35); stroke-width:.55; }
.sr:nth-child(1){ animation:breathe 5.2s ease-in-out infinite 0s;   }
.sr:nth-child(2){ animation:breathe 5.2s ease-in-out infinite -.9s;  }
.sr:nth-child(3){ animation:breathe 5.2s ease-in-out infinite -1.8s; }
.sr:nth-child(4){ animation:breathe 5.2s ease-in-out infinite -2.7s; }
@keyframes breathe {
  0%,100%{ opacity:.25; }
  50%    { opacity:.85; }
}

.center-glow {
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
}
.glow-blob {
  width:110px; height:110px; border-radius:50%;
  background:radial-gradient(circle, rgba(225,223,209,.22) 0%, transparent 70%);
  animation:blobPulse 4.2s ease-in-out infinite;
}
@keyframes blobPulse {
  0%,100%{ transform:scale(1);   }
  50%    { transform:scale(1.45); }
}

.logo-content {
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
}
/* ★ BIGGER LOGO */
.logo-img {
  width:195px; height:auto;
  opacity:.93;
  filter:drop-shadow(0 0 24px rgba(225,223,209,.22));
  animation:logoFloat 6s ease-in-out infinite;
}
@keyframes logoFloat {
  0%,100%{ transform:translateY(0);   }
  50%    { transform:translateY(-7px); }
}

/* ════════════════════════════════
   HEADLINE
   ════════════════════════════════ */
.headline { width:100%; max-width:680px; }

/* حين يعلو الضجيج */
.noise-line {
  display: block;
  font-family: 'ITF Wathiq Thuluth', 'Tajawal', sans-serif;
  font-size: clamp(48px, 12vw, 90px);
  font-weight: 900;
  line-height: 1.2;
  position: relative;
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
  z-index: 0;
  letter-spacing: 0;
  /* subtle glow makes text pop on textured bg */
  text-shadow: 0 0 40px rgba(225,223,209,.12);
}

/* ★ FLASH — on the word الضجيج */
.flash-word {
  display:inline;
  position:relative;
}
.flash-word.flashing {
  animation: wordFlash .6s linear forwards;
}
@keyframes wordFlash {
  0%  { color:var(--fg);                        text-shadow:none; }
  7%  { color:#fff; text-shadow:0 0 45px #fff, 0 0 90px rgba(255,255,255,.55); }
  14% { color:var(--fg);                        text-shadow:none; }
  27% { color:#fff; text-shadow:0 0 60px #fff, 0 0 110px rgba(255,255,255,.45); }
  35% { color:var(--fg);                        text-shadow:none; }
  48% { color:rgba(255,255,255,.7); text-shadow:0 0 35px rgba(255,255,255,.4); }
  56% { color:var(--fg);                        text-shadow:none; }
  100%{ color:var(--fg);                        text-shadow:none; }
}

/* glitch layers */
.noise-line::before,
.noise-line::after {
  content:attr(data-text);
  position:absolute; top:0; left:0; right:0;
  pointer-events:none; z-index:-1;
}
.noise-line::before {
  color:rgba(255,210,150,.7);
  animation:glitchA 7s infinite;
  clip-path:polygon(0 12%,100% 12%,100% 36%,0 36%);
}
.noise-line::after {
  color:rgba(145,195,140,.7);
  animation:glitchB 7s infinite;
  clip-path:polygon(0 64%,100% 64%,100% 84%,0 84%);
}
@keyframes glitchA {
  0%,77%,100%{ transform:translate(0);       opacity:0; }
  78%{ transform:translate(-6px, 2px);  opacity:1;  }
  79%{ transform:translate( 5px,-2px);  opacity:1;  }
  80%{ transform:translate(-5px, 2px);  opacity:.8; }
  81%{ transform:translate( 3px,-1px);  opacity:.5; }
  82%{ transform:translate(0);          opacity:0;  }
  88%{ transform:translate(-2px, 0);    opacity:.35;}
  89%{ transform:translate(0);          opacity:0;  }
}
@keyframes glitchB {
  0%,77%,100%{ transform:translate(0);      opacity:0; }
  78%{ transform:translate( 6px,-1px); opacity:1;  }
  79%{ transform:translate(-5px, 2px); opacity:1;  }
  80%{ transform:translate( 4px,-2px); opacity:.7; }
  81%{ transform:translate(-2px, 1px); opacity:.4; }
  82%{ transform:translate(0);         opacity:0;  }
}

/* shake */
.noise-line.shaking {
  animation:superShake .75s var(--ease-out) both;
}
@keyframes superShake {
  0%  { transform:translate(0) skewX(0) rotate(0deg); }
  5%  { transform:translate(-7px,2px) skewX(-5deg) rotate(-1.5deg); }
  11% { transform:translate(7px,-3px)  skewX(5deg)  rotate(2deg);   }
  17% { transform:translate(-9px,4px)  skewX(-6deg) rotate(-2.5deg);}
  23% { transform:translate(9px,-4px)  skewX(6deg)  rotate(2.5deg); }
  30% { transform:translate(-6px,2px)  skewX(-3deg) rotate(-1.5deg);}
  37% { transform:translate(5px,-2px)  skewX(2deg)  rotate(1deg);   }
  44% { transform:translate(-4px,1px)  skewX(-1deg) rotate(-.5deg); }
  53% { transform:translate(3px,-1px)              rotate(.4deg);   }
  64% { transform:translate(-2px,1px)              rotate(-.2deg);  }
  78% { transform:translate(1px,0)                 rotate(.1deg);   }
  100%{ transform:translate(0) skewX(0) rotate(0deg); }
}

/* thin lines — NO letter-spacing on Arabic, clear color */
.thin-line, .return-line {
  display: block;
  font-family: 'ITF Wathiq Thuluth', 'Tajawal', sans-serif;
  font-size: clamp(22px, 5vw, 36px);
  font-weight: 400;
  color: var(--fg);
  opacity: .82;
  letter-spacing: 0;
}
.thin-line   { margin-top: 16px; }
.return-line { margin-top: 10px; }

/* ════════════════════════════════
   بل مساحة — SCROLL STRETCH
   ════════════════════════════════ */
.space-line {
  display: block;
  font-family: 'ITF Wathiq Thuluth', 'Tajawal', sans-serif;
  font-size: clamp(40px, 11vw, 80px);
  font-weight: 700;
  margin-top: 8px;
  line-height: 1.4;
  overflow: visible;
}

.space-inner {
  display: inline-flex;
  align-items: baseline;
  gap: .25em;
  direction: rtl;
}

#masaha {
  display: inline-block;
  font-weight: 900;
  /* النقطة تم تعديلها لتتمدد الكلمة بانسجام مع اللغة العربية (لليسار) */
  transform-origin: right center;
  will-change: transform;
}

/* ════════════════════════════════
   REVEAL
   ════════════════════════════════ */
.reveal   {
   font-family: 'ITF Wathiq Thuluth', 'Tajawal', sans-serif;
   opacity:0; transform:translateY(24px); 
  
  }
.revealed {
  opacity:1; transform:translateY(0);
  transition:opacity .95s var(--ease-out), transform .95s var(--ease-out);
}

/* ════════════════════════════════
   DIVIDER
   ════════════════════════════════ */
.divider {
  display:flex; align-items:center; gap:18px;
  margin:50px 0;
}
.div-line { flex:1; max-width:60px; height:1px; background:var(--fg35); }
.div-dot  { width:3px; height:3px; border-radius:50%; background:var(--fg60); }

/* ════════════════════════════════
   CTA BUTTON
   ════════════════════════════════ */
.cta-btn {
  display:inline-flex; align-items:center; gap:12px;
  position:relative;
  border:1px solid var(--fg60);
  color:var(--fg); text-decoration:none;
  padding:17px 48px;
  font-family:'Tajawal',sans-serif;
  font-size:13px; font-weight:400;
  letter-spacing:3.5px; text-transform:uppercase;
  overflow:hidden;
  transition:color .45s, border-color .45s;
  opacity: 1;
}
.cta-btn::before {
  content:''; position:absolute; top:-1px; right:-1px;
  width:10px; height:10px;
  border-top:1px solid var(--fg); border-right:1px solid var(--fg);
  z-index:2; transition:width .35s, height .35s;
}
.cta-btn .corner-bl {
  position:absolute; bottom:-1px; left:-1px;
  width:10px; height:10px;
  border-bottom:1px solid var(--fg35); border-left:1px solid var(--fg35);
  transition:width .35s, height .35s;
}
.cta-btn:hover::before    { width:22px; height:22px; }
.cta-btn:hover .corner-bl { width:22px; height:22px; border-color:var(--fg); }
.cta-btn::after {
  content:''; position:absolute; inset:0;
  background:var(--fg);
  transform:translateX(102%);
  transition:transform .48s cubic-bezier(.77,0,.18,1);
  z-index:0;
}
.cta-btn:hover::after { transform:translateX(0); }
.cta-btn:hover { color:var(--bg); border-color:var(--fg); }
.cta-btn > * { position:relative; z-index:1; }

/* ════════════════════════════════
   WAITLIST SECTION (PRO STYLING)
   ════════════════════════════════ */
.waitlist-section {
  width: 100%;
  max-width: 480px;
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--fg15);
  text-align: center;
}
.waitlist-eyebrow {
  font-family: 'ITF Wathiq Thuluth', 'Tajawal', sans-serif;
  font-size: clamp(32px, 8vw, 40%);
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 24px;
}
.waitlist-title {
  font-family: 'ITF Wathiq Thuluth', 'Tajawal', sans-serif;
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 700;
  margin-bottom: 12px;
}
.waitlist-desc {
  font-family: 'Tajawal', sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--fg);
  opacity: 0.9;
  margin-bottom: 32px;
}
.waitlist-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* ── تصميم الحقول (شفافية وتفاعل) ── */
.waitlist-input, .phone-wrapper {
  width: 100%;
  max-width: 280px;
  background: rgba(225, 223, 209, 0.05); /* شفافية خفيفة جداً */
  border: 1px solid rgba(225, 223, 209, 0.3);
  border-radius: 50px;
  color: var(--fg);
  font-family: 'Tajawal', sans-serif;
  font-size: 16px;
  font-weight: 300;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
}
.waitlist-input {
  padding: 14px 20px;
  text-align: center;
}
.waitlist-input::placeholder, .phone-input-field::placeholder {
  color: rgba(225, 223, 209, 0.5);
}
/* التأثير عند الضغط (تصير أقوى وتبرز شوي) */
.waitlist-input:focus, .phone-wrapper:focus-within {
  background: rgba(225, 223, 209, 0.12);
  border-color: rgba(225, 223, 209, 0.8);
  transform: scale(1.02);
}

/* ── تصميم حقل الجوال الثابت (+966) ── */
.phone-wrapper {
  display: flex;
  align-items: center;
  overflow: hidden;
  direction: ltr; /* إجبار الاتجاه من اليسار لليمين */
}
.phone-prefix {
  padding-left: 20px;
  color: var(--fg);
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
  opacity: 0.7;
  user-select: none;
}
.phone-input-field {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: 'Tajawal', sans-serif;
  font-size: 16px;
  font-weight: 300;
  padding: 14px 10px 14px 8px; /* ضبطنا المسافات */
  outline: none;
  text-align: left; /* تم التعديل إلى اليسار */
  letter-spacing: 1.5px; /* يخلي شكل الأرقام أرتب */
}

/* ── زر الإرسال ── */
.waitlist-submit {
  width: 100%;
  max-width: 280px;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 50px;
  font-family: 'Tajawal', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 20px;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.2s;
  margin-top: 8px;
}
.waitlist-submit:hover { opacity: 0.9; transform: translateY(-2px); }

/* ── رسائل الخطأ المتماشية مع الثيم ── */
.error-text {
  color: var(--bg);
  background: rgba(225, 223, 209, 0.9); /* لون بيج فخم يعكس انتباه */
  padding: 0 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Tajawal', sans-serif;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}
.error-text.show {
  max-height: 40px;
  padding: 8px 16px;
  opacity: 1;
  margin-top: 4px;
}
.error-border {
  border-color: rgba(225, 223, 209, 0.9) !important;
  background: rgba(225, 223, 209, 0.15) !important;
  animation: shake 0.4s ease-in-out;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.email-success { display: none; flex-direction: column; align-items: center; gap: 10px; padding: 24px 0; }
.email-success.visible { display: flex; }
.success-check { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--fg60); display: flex; align-items: center; justify-content: center; font-size: 18px; animation: scaleIn .5s var(--ease-out); }
@keyframes scaleIn { from{transform:scale(0);opacity:0;} to{transform:scale(1);opacity:1;} }
.success-text { font-size: 14px; color: var(--fg); font-weight: 300; }

/* ════════════════════════════════
   SOCIALS
   ════════════════════════════════ */
.socials {
  display:flex; gap:32px; justify-content:center;
  margin-top:40px;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--fg);
  text-decoration: none;
  font-family: 'ITF Wathiq Thuluth', sans-serif;
  font-size: 16px; /* خط الثلث يحتاج حجم أكبر قليلاً */
  font-weight: 400;
  opacity: .7;
  transition: opacity .3s, transform .35s;
  position: relative;
  letter-spacing: 0; /* الغاء التباعد */
}
.social-link::after {
  content:''; position:absolute; bottom:-4px; left:0; right:0;
  height:1px; background:var(--fg);
  transform:scaleX(0); transform-origin:right;
  transition:transform .42s cubic-bezier(.77,0,.18,1);
}
.social-link:hover { opacity:1; transform:translateY(-3px); letter-spacing:4px; }
.social-link:hover::after { transform:scaleX(1); transform-origin:left; }
.social-link svg { width:19px; height:19px; flex-shrink:0; }

.handle {
  margin-top: 36px;
  font-family: 'ITF Wathiq Thuluth', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--fg);
  opacity: 0.8;
  letter-spacing: 0; /* الغاء التباعد */
}

.scroll-hint { position:absolute; bottom:28px; left:50%; transform:translateX(-50%); }
.scroll-bar {
  width:1px; height:52px;
  background:linear-gradient(to bottom, var(--fg60), transparent);
  margin:0 auto;
  animation:scrollBar 2.4s ease-in-out infinite;
}
@keyframes scrollBar {
  0%  { transform:scaleY(0); transform-origin:top;    opacity:1; }
  48% { transform:scaleY(1); transform-origin:top;    opacity:1; }
  50% { transform:scaleY(1); transform-origin:bottom; opacity:1; }
  100%{ transform:scaleY(0); transform-origin:bottom; opacity:0; }
}

@media(min-width:640px){
  .logo-zone { width:340px; height:340px; }
  .email-form { flex-direction:row; }
}
@media(max-width:400px){
  .page    { padding:60px 20px 60px; }
  .cta-btn { padding:14px 34px; letter-spacing:2.5px; }
  .socials { gap:22px; }
}

/* ════════════════════════════════
   FAQ SECTION
   ════════════════════════════════ */
.faq-section {
  width: 100%;
  max-width: 600px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--fg15);
  text-align: right;
  direction: rtl;
}
.faq-main-title {
  font-family: 'ITF Wathiq Thuluth', 'Tajawal', sans-serif;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  color: var(--fg);
  text-align: center;
  margin-bottom: 32px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-item {
  border-bottom: 1px solid var(--fg15);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: 'Tajawal', sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-align: right;
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: color 0.3s;
  outline: none;
}
.faq-question:hover {
  color: #fff;
}
.faq-icon {
  font-size: 20px;
  font-weight: 300;
  transition: transform 0.4s ease;
}
.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-answer p {
  font-family: 'Tajawal', sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--fg);
  opacity: 0.85;
  padding-bottom: 20px;
  padding-right: 8px;
}
/* حالة الفتح */
.faq-item.active .faq-answer {
  max-height: 500px; /* رقم كبير عشان يستوعب النص */
  opacity: 1;
}
.faq-item.active .faq-icon {
  transform: rotate(45deg); /* تحويل الزائد إلى X */
}