/* =========================================================
   Statix × Wafeq — Pitch Page Styles
   Tailwind handles layout/utilities; this file owns
   custom visual effects, animations, and component skins.
   ========================================================= */

:root {
  color-scheme: dark;
  --ease-out-quart: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

/* ── Base body ────────────────────────────────────────────── */
body {
  font-family: 'Inter', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  background-color: #020617;
  background-image:
    radial-gradient(60rem 40rem at 80% -10%, rgba(20, 184, 166, 0.18), transparent 60%),
    radial-gradient(50rem 30rem at -10% 10%, rgba(56, 189, 248, 0.12), transparent 55%),
    linear-gradient(180deg, #020617 0%, #0b1220 100%);
  color: #e2e8f0;
  min-height: 100vh;
}

html[lang='ar'] body {
  font-family: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif;
}

code,
pre {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ── Grid background overlay ─────────────────────────────── */
.grid-bg {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
}

/* ── Featured card (gradient border via pseudo-element) ───── */
.featured-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.18), rgba(2, 6, 23, 0.6)),
    radial-gradient(60rem 20rem at 10% -20%, rgba(45, 212, 191, 0.25), transparent 60%);
}

.featured-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(135deg, #2dd4bf, #38bdf8 45%, #6366f1);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ── Technology Stack chips ──────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 500;
  background: rgba(15, 23, 42, 0.7);
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, 0.25);
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
  transform: translateY(-1px);
  color: #99f6e4;
  border-color: rgba(94, 234, 212, 0.55);
}

.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.7;
  flex-shrink: 0;
}

/* ── Project cards hover lift ────────────────────────────── */
.project-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 60px -25px rgba(14, 165, 233, 0.35);
  border-color: rgba(45, 212, 191, 0.45);
}

/* ── Nav link animated underline ─────────────────────────── */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, #22d3ee, #2dd4bf);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

/* ── Focus ring ──────────────────────────────────────────── */
.focus-ring:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 3px;
  border-radius: 8px;
}

/* ── Glow shadow utility ──────────────────────────────────── */
.shadow-glow {
  box-shadow: 0 20px 60px -20px rgba(45, 212, 191, 0.45);
}

/* ── Scroll reveal ───────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Staggered direct children once parent reveals */
.reveal.is-visible > * { animation: rise 0.7s var(--ease-out-quart) backwards; }
.reveal.is-visible > *:nth-child(1) { animation-delay: 0.05s; }
.reveal.is-visible > *:nth-child(2) { animation-delay: 0.13s; }
.reveal.is-visible > *:nth-child(3) { animation-delay: 0.21s; }
.reveal.is-visible > *:nth-child(4) { animation-delay: 0.29s; }
.reveal.is-visible > *:nth-child(5) { animation-delay: 0.37s; }
.reveal.is-visible > *:nth-child(6) { animation-delay: 0.45s; }

/* ── Cursor spotlight ────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mx, -9999px) var(--my, -9999px),
    rgba(45, 212, 191, 0.07),
    transparent 70%
  );
  transition: background 0.1s ease;
}

@media (hover: none) {
  body::before { display: none; }
}

/* ── Reduced-motion overrides ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .project-card,
  .chip,
  .nav-link::after {
    transition: none !important;
  }

  .project-card:hover {
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  body::before {
    display: none;
  }
}
