/* ================================================
   portal.rayanejd.fr — main stylesheet
   ================================================ */

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

:root {
  --bg:            #080c14;
  --surface:       rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.08);
  --border:        rgba(255,255,255,0.08);
  --border-hover:  rgba(255,255,255,0.20);
  --text-primary:  #f0f4ff;
  --text-secondary:rgba(240,244,255,0.50);
  --accent:        #6c8dff;
  --accent-soft:   rgba(108,141,255,0.15);
  --glow:          rgba(108,141,255,0.30);
  --green:         #3dd68c;
  --green-glow:    rgba(61,214,140,0.40);
}

/* ── Base ────────────────────────────────────────── */

html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Animated gradient mesh */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%,  rgba(108,141,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%,  rgba(168,108,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 60% 30%,  rgba(108,200,255,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  /* JS will animate the orbs via a canvas overlay instead */
}

/* Grid overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Orb canvas (injected by JS) */
#orb-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

#orb-canvas.ready { opacity: 1; }

/* ── Layout ──────────────────────────────────────── */

.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Keyframes ───────────────────────────────────── */

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Nav ─────────────────────────────────────────── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(8,12,20,0.55);
  transition: padding 0.3s ease, background 0.3s ease;
}

nav.scrolled {
  padding: 0.85rem 0;
  background: rgba(8,12,20,0.85);
}

nav .inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--glow);
  animation: pulse 2s ease-in-out infinite;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { transform: scaleX(1); }

/* ── Hero ────────────────────────────────────────── */

.hero {
  padding: 8rem 0 3.5rem;
  text-align: center;
  /* initial state — JS drives the reveal */
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(108,141,255,0.2);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.75rem;
  font-weight: 500;
}

.hero-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #f0f4ff 30%, #6c8dff 70%, #a86cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 400px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

/* ── Section label ───────────────────────────────── */

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Status bar ──────────────────────────────────── */

.status-bar {
  margin: 0 0 4rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}

.status-bar.visible {
  opacity: 1;
  transform: translateY(0);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 300;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.status-label {
  color: var(--green);
  font-weight: 500;
  font-size: 0.75rem;
}

/* ── Services ────────────────────────────────────── */

.services {
  padding: 0 0 5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

/* Cards start hidden; JS reveals them with staggered delays */
.service-card {
  background: var(--surface);
  padding: 2rem 1.75rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition:
    background 0.25s ease,
    opacity    0.5s ease,
    transform  0.5s ease;
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mouse-tracking glow */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(108,141,255,0.12) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover::before { opacity: 1; }
.service-card:hover          { background: var(--surface-hover); }

/* Shimmer stripe on hover */
.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.04) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  transition: left 0.55s ease;
}

.service-card:hover::after { left: 125%; }

.service-card:hover .service-arrow {
  transform: translate(3px, -3px);
  opacity: 1;
}

/* Card lift on hover */
.service-card:hover {
  z-index: 2;
}

/* ── Card internals ──────────────────────────────── */

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  transition: border-color 0.25s;
}

.service-card:hover .service-icon {
  border-color: rgba(108,141,255,0.3);
}

.service-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.service-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.service-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 300;
}

.service-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.service-tag {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(108,141,255,0.15);
  border-radius: 100px;
  padding: 0.2rem 0.6rem;
  font-weight: 500;
}

.service-arrow {
  font-size: 1.1rem;
  color: var(--text-secondary);
  opacity: 0.4;
  transition: transform 0.25s, opacity 0.25s;
  line-height: 1;
}

/* ── Footer ──────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  position: relative;
  z-index: 1;
}

footer .inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 300;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
  transition: opacity 0.2s;
}

footer a:hover { opacity: 0.75; }

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 640px) {
  .hero { padding-top: 7rem; }
  .nav-links { gap: 1.25rem; }
}
