/* ============================================================
   hossamhelal.com — Coming Soon landing
   Fonts: Changa (display) + Cairo (body) · RTL
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg-0: #070b24;
  --bg-1: #0d1238;
  --bg-2: #1a1040;
  --gold: #f5b301;
  --gold-2: #ffd66b;
  --gold-3: #ffe28a;
  --teal: #2dd4bf;
  --cyan: #38bdf8;
  --ink: #eef1ff;
  --muted: #9aa3d8;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.14);
  --font-display: 'Changa', 'Cairo', system-ui, sans-serif;
  --font-body: 'Cairo', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 22px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-0);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Aurora background ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 800px at 82% -10%, rgba(76, 43, 140, 0.42), transparent 60%),
    radial-gradient(1000px 700px at 15% 110%, rgba(14, 60, 110, 0.35), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-0) 100%);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  mix-blend-mode: screen;
  opacity: 0.55;
  will-change: transform;
}
.b1 {
  width: 46vmax; height: 46vmax;
  left: -12vmax; top: -14vmax;
  background: radial-gradient(circle, rgba(96, 52, 170, 0.75), transparent 65%);
  animation: drift1 26s var(--ease) infinite alternate;
}
.b2 {
  width: 40vmax; height: 40vmax;
  right: -10vmax; top: 8vmax;
  background: radial-gradient(circle, rgba(245, 179, 1, 0.34), transparent 62%);
  animation: drift2 30s var(--ease) infinite alternate;
}
.b3 {
  width: 38vmax; height: 38vmax;
  left: 22vmax; bottom: -16vmax;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.28), transparent 62%);
  animation: drift3 34s var(--ease) infinite alternate;
}
.b4 {
  width: 30vmax; height: 30vmax;
  right: 16vmax; bottom: -8vmax;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.26), transparent 62%);
  animation: drift4 38s var(--ease) infinite alternate;
}
@keyframes drift1 { to { transform: translate(9vmax, 7vmax) scale(1.12) rotate(12deg); } }
@keyframes drift2 { to { transform: translate(-7vmax, -6vmax) scale(0.94) rotate(-10deg); } }
@keyframes drift3 { to { transform: translate(-8vmax, -5vmax) scale(1.08) rotate(8deg); } }
@keyframes drift4 { to { transform: translate(6vmax, -7vmax) scale(1.16); } }

/* ---------- Particles canvas ---------- */
#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Floating icons ---------- */
.float-icons { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.f-icon {
  position: absolute;
  color: var(--gold);
  opacity: 0.22;
  filter: drop-shadow(0 0 14px rgba(245, 179, 1, 0.35));
  animation: floaty var(--dur, 9s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  user-select: none;
}
.f-icon svg { width: 100%; height: 100%; }
.fi-1 { --dur: 11s; top: 12%;  left: 6%;   width: 46px; height: 46px; }
.fi-2 { --dur: 13s; top: 24%;  right: 4%;  width: 42px; height: 42px; color: var(--teal); }
.fi-3 { --dur: 10s; bottom: 30%; left: 3%; width: 44px; height: 44px; color: var(--cyan); }
.fi-4 { --dur: 12s; top: 8%;   right: 22%; width: 48px; height: 48px; }
.fi-5 { --dur: 14s; bottom: 18%; right: 8%; width: 44px; height: 44px; color: var(--gold-2); }
.fi-6 { --dur: 12s; top: 44%;  left: 8%;   width: 48px; height: 48px; color: var(--teal); }
.fi-7 { --dur: 11s; bottom: 12%; left: 20%; width: 38px; height: 38px; }
.fi-8 { --dur: 13s; top: 16%;  left: 34%;  width: 40px; height: 40px; color: var(--gold-3); }
.fi-9 { --dur: 15s; bottom: 38%; right: 18%; width: 46px; height: 46px; color: var(--cyan); }
.fi-10 { --dur: 12s; top: 60%;  left: 1%;  width: 40px; height: 40px; color: var(--teal); }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-26px) rotate(6deg); }
}

/* ---------- Watermark portrait (LEFT side) ---------- */
.watermark {
  position: fixed;
  left: 0; /* physical left — RTL-safe */
  top: 0;
  height: 100dvh;
  width: min(44vw, 640px);
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.watermark picture {
  position: relative;
  width: 100%;
  height: 100%;
}
.watermark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.34;
  mix-blend-mode: screen;
  filter: saturate(0.85) contrast(1.05);
  -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent 92%);
          mask-image: linear-gradient(90deg, #000 30%, transparent 92%);
  animation: wmFloat 14s ease-in-out infinite;
}
.wm-glow {
  position: absolute;
  left: -20%;
  top: 0;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, rgba(245, 179, 1, 0.08), transparent 70%);
  pointer-events: none;
}
@keyframes wmFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1.2%); }
}

/* ---------- Content column ---------- */
.content {
  position: relative;
  z-index: 4;
  min-height: 100dvh;
  max-width: 1320px;
  margin-left: auto; /* keep content on the right, watermark owns the left */
  padding: clamp(2rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero { max-width: 820px; } /* wide enough for “موقع السير حسام هلال” on one line (~748px at 72px font) */

/* ---------- Brand badge ---------- */
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 179, 1, 0.16), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(245, 179, 1, 0.35);
  color: var(--gold-2);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  box-shadow: 0 0 30px rgba(245, 179, 1, 0.12), inset 0 0 18px rgba(245, 179, 1, 0.06);
  animation: fadeUp 0.8s var(--ease) 0.05s both;
}
.brand-badge svg { width: 17px; height: 17px; animation: sparkle 3s ease-in-out infinite; }
@keyframes sparkle {
  0%, 100% { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 2px rgba(245,179,1,.8)); }
  50%      { transform: rotate(20deg) scale(1.15); filter: drop-shadow(0 0 8px rgba(245,179,1,1)); }
}

/* ---------- Title ---------- */
.title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6.4vw, 4.5rem);
  line-height: 1.18;
  margin: 1.4rem 0 0;
  animation: fadeUp 0.9s var(--ease) 0.15s both;
}
.title .hl {
  background: linear-gradient(120deg, var(--gold-3), var(--gold) 45%, var(--gold-2));
  background-size: 220% auto;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: shine 6s linear infinite;
  white-space: nowrap; /* keep “حسام هلال” on one line */
}
@keyframes shine { to { background-position: 220% center; } }

.title .soon {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-inline-start: 0.4rem;
  vertical-align: 0.14em;
  font-size: 0.62em;
  font-weight: 600;
  color: var(--teal);
  padding: 0.35em 0.9em;
  border: 1px solid rgba(45, 212, 191, 0.4);
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.08);
  box-shadow: 0 0 26px rgba(45, 212, 191, 0.18);
}
.title .soon .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.65); }
  70%  { box-shadow: 0 0 0 12px rgba(45, 212, 191, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

/* ---------- Lede ---------- */
.lede {
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 400;
  max-width: 54ch;
  animation: fadeUp 0.9s var(--ease) 0.28s both;
}

.divider {
  margin: 1.9rem 0 0;
  width: 100%;
  max-width: 340px;
  animation: fadeUp 0.9s var(--ease) 0.4s both;
}
.divider span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(245, 179, 1, 0.12) 60%, transparent);
}

/* ---------- Portal cards ---------- */
.portals {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  max-width: 860px;
}
.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.6rem 1.7rem 1.7rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 18px 50px rgba(2, 4, 20, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease), border-color 0.35s, box-shadow 0.45s var(--ease);
  overflow: hidden;
  animation: cardIn 0.9s var(--ease) both;
  will-change: transform;
}
.portal-card.admin  { animation-delay: 0.5s; }
.portal-card.student{ animation-delay: 0.62s; }
.portal-card:hover {
  border-color: var(--accent, var(--gold));
  box-shadow: 0 26px 70px rgba(2, 4, 20, 0.7), 0 0 0 1px var(--accent-soft, rgba(245,179,1,.25)), 0 0 46px var(--glow-c, rgba(245, 179, 1, 0.22));
}
.portal-card.admin   { --accent: #ffd66b; --accent-soft: rgba(245,179,1,.28); --glow-c: rgba(245,179,1,.24); }
.portal-card.student { --accent: #5eead4; --accent-soft: rgba(45,212,191,.28); --glow-c: rgba(45,212,191,.24); }

.card-head { display: flex; align-items: center; gap: 1rem; }
.card-icon {
  flex: none;
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--accent, var(--gold));
  background: linear-gradient(145deg, var(--accent-soft, rgba(245,179,1,.16)), rgba(255,255,255,.04));
  border: 1px solid var(--accent-soft, rgba(245,179,1,.3));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 20px rgba(0,0,0,.25);
  transform: translateZ(40px);
}
.card-icon svg { width: 27px; height: 27px; }
.card-meta { display: flex; flex-direction: column; transform: translateZ(34px); }
.card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent, var(--gold));
  opacity: 0.9;
  letter-spacing: 0.2px;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
}
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  transform: translateZ(24px);
}
.card-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--accent, var(--gold));
  padding: 0.55rem 1.15rem 0.55rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-soft, rgba(245,179,1,.16)), rgba(255,255,255,.03));
  border: 1px solid var(--accent-soft, rgba(245,179,1,.35));
  transform: translateZ(30px);
  transition: gap 0.3s var(--ease), background 0.3s;
}
.portal-card:hover .card-cta { gap: 0.85rem; }
.card-cta .arr { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.portal-card:hover .card-cta .arr { transform: translateX(-4px); } /* RTL: arrow points left, move left */

.live-pill {
  position: absolute;
  top: 1.1rem;
  inset-inline-end: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink);
  opacity: 0.85;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.live-pill i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulse 1.9s ease-out infinite;
}

.glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(340px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.14), transparent 55%);
  transition: opacity 0.4s;
}
.portal-card:hover .glare { opacity: 1; }

/* ---------- Google Play note ---------- */
.play-note {
  margin-top: 1.6rem;
  width: 100%;
  max-width: 860px; /* same width as the portal-card grid */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.62rem 1.25rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  color: var(--muted);
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: fadeUp 0.9s var(--ease) 0.72s both;
}
.play-note svg { width: 19px; height: 19px; color: var(--gold-2); flex: none; }
.play-note strong { color: var(--ink); font-weight: 700; }

/* ---------- Footer ---------- */
.site-foot {
  margin-top: 2.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  opacity: 0.85;
  animation: fadeUp 0.9s var(--ease) 0.75s both;
}
.foot-sep { opacity: 0.5; }

/* ---------- Entrance ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(34px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .watermark { width: min(50vw, 480px); }
}

@media (max-width: 860px) {
  .portals { grid-template-columns: 1fr; }
  .watermark { width: 44vw; }
}

@media (max-width: 640px) {
  body { overflow-x: hidden; }
  .content {
    padding: 4.5rem 1.4rem 2.5rem;
    justify-content: flex-start;
  }
  /* watermark: full portrait, bottom-left, no crop, face up near the title */
  .watermark {
    top: auto;
    bottom: 0;
    left: -7vw;
    width: 94vw;
    height: auto;
    align-items: flex-end;
    opacity: 1;
  }
  .watermark picture {
    width: 100%;
    height: auto;
  }
  .watermark img {
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0.42;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 74%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 0%, #000 74%, transparent 100%);
  }
  .title { font-size: clamp(2rem, 11.5vw, 3rem); }
  .title .soon { font-size: 0.6em; }
  .brand-badge { font-size: 0.82rem; }
  .portal-card { padding: 1.4rem 1.3rem 1.5rem; }
  .card-icon { width: 48px; height: 48px; }
  .card-icon svg { width: 24px; height: 24px; }
  .card-title { font-size: 1.3rem; }
  .f-icon { opacity: 0.16; }
  .site-foot { flex-direction: column; gap: 0.2rem; align-items: flex-start; }
  .foot-sep { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
  .portal-card:hover { transform: none; }
}

/* ---------- Focus ---------- */
.portal-card:focus-visible {
  outline: 3px solid var(--gold-2);
  outline-offset: 3px;
}
