/* ===================================== */
/*  Design Tokens — Easy Follow          */
/* ===================================== */
:root {
  --color-primary: #ff7a18;
  --color-primary-dark: #e85f00;
  --color-primary-light: #ffb347;
  --color-primary-glow: rgba(255, 122, 24, 0.3);

  --color-navy: #0f1b3d;
  --color-navy-dark: #0a1229;
  --color-navy-soft: rgba(15, 27, 61, 0.08);

  --color-bg: #fffaf5;
  --color-bg-alt: #fff3e8;
  --color-white: #ffffff;

  --color-text: #2c3e50;
  --color-text-muted: #6b7b8d;
  --color-text-light: #95a5b6;

  --color-youtube: #ff0000;
  --color-facebook: #1877f2;
  --color-instagram: #e1306c;
  --color-tiktok: #010101;
  --color-whatsapp: #25d366;

  --font: "Cairo", system-ui, sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(15, 27, 61, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 27, 61, 0.1);
  --shadow-dock: 0 12px 40px rgba(15, 27, 61, 0.16);

  --container: 42rem;
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===================================== */
/*  Base                                 */
/* ===================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  width: 100%;
}

body {
  font-family: var(--font);
  color: var(--color-text);
  background:
    linear-gradient(180deg, var(--color-white) 0%, var(--color-bg) 40%, var(--color-bg-alt) 100%);
  min-height: 100dvh;
  line-height: 1.8;
  direction: rtl;
  overflow-x: clip;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body.is-splash-active {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

/* ===================================== */
/*  Splash — Logo Zoom Rush              */
/* ===================================== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 46%, #152045 0%, var(--color-navy-dark) 55%, #060a16 100%);
  opacity: 1;
}

.splash__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 50% 40% at 50% 46%,
      rgba(255, 122, 24, 0.28) 0%,
      rgba(255, 122, 24, 0.08) 42%,
      transparent 72%
    );
  pointer-events: none;
}

.splash__glow {
  position: absolute;
  z-index: 1;
  width: min(52vw, 22rem);
  height: min(52vw, 22rem);
  max-width: 90vw;
  max-height: 90vw;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 122, 24, 0.45) 0%,
    rgba(255, 122, 24, 0.12) 42%,
    transparent 70%
  );
  filter: blur(28px);
  opacity: 0;
  transform: scale(0.75);
  pointer-events: none;
}

.splash__ring {
  position: absolute;
  z-index: 1;
  width: min(58vw, 24rem);
  height: min(58vw, 24rem);
  max-width: 92vw;
  max-height: 92vw;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 122, 24, 0.38);
  box-shadow:
    0 0 0 1px rgba(255, 179, 71, 0.08),
    0 0 32px rgba(255, 122, 24, 0.22);
  opacity: 0;
  transform: scale(0.85) rotate(-12deg);
  pointer-events: none;
  box-sizing: border-box;
}

.splash__mark {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.splash__logo {
  width: clamp(10rem, 48vw, 18rem);
  height: auto;
  mix-blend-mode: lighten;
  opacity: 0;
  filter: blur(24px);
  transform: translateZ(0) scale(0.82);
  backface-visibility: hidden;
}

.splash.is-ready .splash__logo {
  animation: splashLogoIn 0.52s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash.is-ready .splash__glow {
  animation: splashGlowIn 0.52s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash.is-ready .splash__ring {
  animation: splashRingIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.12s forwards;
}

.splash.is-settling .splash__logo {
  animation: splashLogoBreath 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash.is-settling .splash__glow {
  animation: splashGlowPulse 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash.is-settling .splash__ring {
  animation: splashRingSettle 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash.is-exiting {
  animation: splashLayerFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.splash.is-exiting .splash__logo {
  mix-blend-mode: normal;
  filter: none;
  will-change: transform, opacity;
  animation: splashLogoRush 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.splash.is-exiting .splash__glow,
.splash.is-exiting .splash__ring,
.splash.is-exiting .splash__veil {
  animation: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash.is-done {
  visibility: hidden;
  pointer-events: none;
}

@keyframes splashLogoIn {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateZ(0) scale(1);
  }
}

@keyframes splashGlowIn {
  to {
    opacity: 0.9;
    transform: scale(1);
  }
}

@keyframes splashRingIn {
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes splashLogoBreath {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: translateZ(0) scale(1);
  }
  50% {
    transform: translateZ(0) scale(1.035);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateZ(0) scale(1);
  }
}

@keyframes splashGlowPulse {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
  100% {
    opacity: 0.95;
    transform: scale(1.05);
  }
}

@keyframes splashRingSettle {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 0.85;
    transform: scale(1.08) rotate(8deg);
  }
}

@keyframes splashLogoRush {
  0% {
    opacity: 1;
    transform: translateZ(0) scale(1);
  }
  60% {
    opacity: 1;
    transform: translateZ(0) scale(4);
  }
  100% {
    opacity: 0;
    transform: translateZ(0) scale(10);
  }
}

@keyframes splashLayerFade {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Page stage */
.page-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

/* ===================================== */
/*  Atmosphere                            */
/* ===================================== */
.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.atmosphere__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.atmosphere__blob--orange {
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  background: var(--color-primary-light);
  bottom: 8%;
  left: -8%;
  opacity: 0.3;
}

.atmosphere__blob--navy {
  width: min(50vw, 380px);
  height: min(50vw, 380px);
  background: var(--color-navy);
  bottom: 18%;
  right: -10%;
  opacity: 0.045;
}

.atmosphere__grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
  mix-blend-mode: multiply;
}

/* ===================================== */
/*  Hero — cinematic full-bleed          */
/* ===================================== */
.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  height: clamp(55dvh, 70dvh, 85dvh);
  overflow: hidden;
  background: var(--color-navy-dark);
}

.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1);
}

body.is-motion-ready .hero__img {
  animation: kenBurns 16s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes kenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(10, 18, 41, 0.1) 0%,
      rgba(10, 18, 41, 0.03) 35%,
      rgba(255, 250, 245, 0) 55%,
      rgba(255, 250, 245, 0.55) 78%,
      var(--color-bg) 100%
    );
  pointer-events: none;
}

/* ===================================== */
/*  Profile identity                     */
/* ===================================== */
.profile {
  position: relative;
  z-index: 2;
  margin-top: -4.5rem;
  padding: 0 var(--space-5) var(--space-9);
}

.profile__inner {
  max-width: var(--container);
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile__name {
  font-size: clamp(2.15rem, 6.5vw, 3.75rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  margin-bottom: var(--space-3);
}

.profile__subject {
  margin-bottom: var(--space-5);
}

.profile__subject-text {
  display: inline-block;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 600;
  color: var(--color-primary);
  position: relative;
  padding-bottom: var(--space-3);
}

.profile__subject-text::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 3rem;
  height: 3px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.profile__divider {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--color-primary);
  margin-bottom: var(--space-5);
  box-shadow: 0 0 0 6px var(--color-primary-glow);
}

.profile__bio {
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.95;
  max-width: 36rem;
  margin-bottom: var(--space-6);
}

.profile__address {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-7);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: color var(--transition), background var(--transition);
}

.profile__address i {
  color: var(--color-primary);
  font-size: 1rem;
}

.profile__address:hover {
  color: var(--color-navy);
  background: rgba(255, 122, 24, 0.1);
}

/* ===================================== */
/*  Social                               */
/* ===================================== */
.profile__social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.social-link {
  width: 3.15rem;
  height: 3.15rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 27, 61, 0.08);
  color: var(--color-navy);
  font-size: 1.05rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition),
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.social-link:hover {
  transform: translateY(-4px) scale(1.05);
  color: var(--color-white);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.social-link--youtube:hover {
  background: var(--color-youtube);
}

.social-link--facebook:hover {
  background: var(--color-facebook);
}

.social-link--instagram:hover {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.social-link--tiktok:hover {
  background: var(--color-tiktok);
}

/* ===================================== */
/*  Floating contact dock                */
/* ===================================== */
.contact-dock {
  position: fixed;
  z-index: 60;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(6.5rem, calc(env(safe-area-inset-bottom) + 5.5rem));
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 27, 61, 0.08);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: var(--shadow-dock);
  opacity: 0;
  transform: translateX(-1.5rem) scale(0.92);
}

body.is-motion-ready .contact-dock {
  animation: dockIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

@keyframes dockIn {
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.contact-dock__btn {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1.35rem;
  opacity: 0;
  transform: scale(0.6);
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-dock__btn--whatsapp {
  background: var(--color-whatsapp);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

body.is-motion-ready .contact-dock__btn--whatsapp {
  animation:
    dockBtnIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards,
    whatsappPulse 2.2s ease-in-out 1s infinite;
}

.contact-dock__btn--phone {
  background: var(--color-navy);
  box-shadow: 0 6px 18px rgba(15, 27, 61, 0.28);
}

body.is-motion-ready .contact-dock__btn--phone {
  animation:
    dockBtnIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.52s forwards,
    phoneRing 4s ease-in-out 1.4s infinite;
}

@keyframes dockBtnIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.contact-dock__btn:hover {
  transform: translateY(-3px) scale(1.12);
  opacity: 1;
}

.contact-dock__btn--whatsapp:hover {
  animation: none;
  box-shadow:
    0 10px 26px rgba(37, 211, 102, 0.5),
    0 0 0 8px rgba(37, 211, 102, 0.15);
}

.contact-dock__btn--phone:hover {
  animation: none;
  box-shadow: 0 10px 26px rgba(15, 27, 61, 0.4);
}

.contact-dock__btn:active {
  transform: scale(0.92);
  animation: none;
  opacity: 1;
}

.contact-dock__btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@keyframes whatsappPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      0 8px 22px rgba(37, 211, 102, 0.5),
      0 0 0 8px rgba(37, 211, 102, 0.16),
      0 0 0 16px rgba(37, 211, 102, 0.06);
  }
}

@keyframes phoneRing {
  0%,
  12%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  2% {
    transform: rotate(8deg) scale(1.03);
  }
  4% {
    transform: rotate(-8deg) scale(1.03);
  }
  6% {
    transform: rotate(6deg) scale(1.02);
  }
  8% {
    transform: rotate(-6deg) scale(1.02);
  }
  10% {
    transform: rotate(0deg) scale(1);
  }
}

/* ===================================== */
/*  Footer                               */
/* ===================================== */
.site-footer {
  position: relative;
  z-index: 2;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(255, 122, 24, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, #121c3a 0%, var(--color-navy-dark) 100%);
  padding: 2rem var(--space-5);
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 122, 24, 0.35) 20%,
    var(--color-primary) 50%,
    rgba(255, 122, 24, 0.35) 80%,
    transparent 100%
  );
}

.site-footer__inner {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.35rem 0.65rem 1.45rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 122, 24, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 179, 71, 0.12),
    0 8px 28px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-footer__powered {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 250, 245, 0.65);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  white-space: nowrap;
}

.site-footer__logo {
  height: 3.5rem;
  width: auto;
  mix-blend-mode: lighten;
  filter: brightness(1.08) contrast(1.05);
}

/* ===================================== */
/*  Reveal animations                    */
/* ===================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(1.15rem);
  filter: blur(6px);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero__img,
  .contact-dock__btn--whatsapp,
  .contact-dock__btn--phone,
  .contact-dock,
  .splash__logo,
  .splash__glow,
  .splash__ring {
    animation: none !important;
  }

  .splash,
  .splash.is-exiting,
  .page-stage {
    transition: none !important;
  }

  body.is-splash-active .page-stage,
  body.is-intro-done .page-stage {
    transform: none;
  }

  body.is-motion-ready .hero__img {
    animation: none !important;
    will-change: auto;
  }

  .contact-dock {
    opacity: 1;
    transform: none;
  }

  .contact-dock__btn {
    opacity: 1;
    transform: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* ===================================== */
/*  Responsive                           */
/* ===================================== */
@media (max-width: 1023px) {
  .contact-dock {
    top: auto;
    bottom: max(5.5rem, calc(env(safe-area-inset-bottom) + 4.75rem));
    left: max(0.75rem, env(safe-area-inset-left));
    transform: translateX(-1.25rem) scale(0.92);
  }

  body.is-motion-ready .contact-dock {
    animation-name: dockIn;
  }
}

@media (max-width: 640px) {
  .hero {
    height: min(52dvh, 420px);
  }

  .profile {
    margin-top: -2.75rem;
    padding: 0 1.25rem var(--space-8);
    /* clear floating dock on the physical left (inline-start in LTR terms = end in RTL... dock is on left)
       In RTL, inline-start is right. Dock is on CSS `left`, so pad the left side via padding-left. */
    padding-left: 4rem;
    padding-right: 1.25rem;
  }

  .profile__name {
    font-size: clamp(1.65rem, 7.5vw, 2.35rem);
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }

  .profile__bio {
    font-size: 0.975rem;
    padding-inline: 0.15rem;
  }

  .profile__address {
    font-size: 0.875rem;
    max-width: 100%;
    text-align: center;
    justify-content: center;
    flex-wrap: wrap;
  }

  .profile__social {
    gap: var(--space-3);
    max-width: 100%;
  }

  .contact-dock {
    padding: 0.45rem;
    gap: 0.5rem;
  }

  .contact-dock__btn {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.15rem;
  }

  .social-link {
    width: 2.75rem;
    height: 2.75rem;
  }

  .site-footer {
    padding: 1.5rem 1rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }

  .site-footer__logo {
    height: 2.25rem;
  }

  .site-footer__brand {
    padding: 0.45rem 0.9rem 0.45rem 1rem;
    gap: 0.5rem;
    max-width: calc(100vw - 2rem);
  }

  .site-footer__powered {
    font-size: 0.7rem;
  }

  .splash__logo {
    width: clamp(8.5rem, 62vw, 14rem);
  }
}

@media (max-width: 380px) {
  .profile {
    padding-left: 3.65rem;
    padding-right: 1rem;
  }

  .profile__name {
    font-size: 1.5rem;
  }

  .site-footer__brand {
    flex-direction: column;
    gap: 0.35rem;
    border-radius: var(--radius-lg);
    padding: 0.65rem 1rem;
  }
}

@media (min-width: 1024px) {
  .profile {
    margin-top: -5.5rem;
  }

  .contact-dock {
    left: max(1.5rem, env(safe-area-inset-left));
    top: 50%;
    bottom: auto;
    transform: translate(-1.5rem, -50%) scale(0.92);
  }

  body.is-motion-ready .contact-dock {
    animation-name: dockInDesktop;
  }

  @keyframes dockInDesktop {
    to {
      opacity: 1;
      transform: translate(0, -50%) scale(1);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .contact-dock {
      transform: translate(0, -50%);
    }
  }
}
