/* Practech — Brand stylesheet
 * Animations & utilities qui complètent Tailwind CDN
 */

:root {
  --bg: #0b1020;
  --bg-2: #0f172a;
  --line: rgba(148, 163, 184, 0.12);
  --accent: #f97316;
  --accent-2: #f59e0b;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: #e2e8f0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.font-display { font-family: 'Fraunces', 'Times New Roman', serif; letter-spacing: -0.02em; }

/* === Hero gradient animé === */
.hero-aurora {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero-aurora::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(40% 50% at 20% 30%, rgba(139, 92, 246, 0.35) 0%, transparent 60%),
    radial-gradient(40% 40% at 80% 20%, rgba(34, 211, 238, 0.25) 0%, transparent 60%),
    radial-gradient(50% 50% at 60% 80%, rgba(249, 115, 22, 0.25) 0%, transparent 60%);
  filter: blur(60px);
  z-index: -1;
  animation: auroraShift 18s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%  { transform: translate3d(2%, -3%, 0) rotate(2deg); }
  100% { transform: translate3d(-2%, 2%, 0) rotate(-2deg); }
}

/* Grille SVG fine en arrière plan */
.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: 48px 48px;
  background-position: -1px -1px;
}

/* === Reveal on scroll === */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* === Card === */
.card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.55) 100%);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1), border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.35);
  box-shadow: 0 20px 60px -20px rgba(249, 115, 22, 0.15);
}

/* === Boutons === */
.btn-primary {
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
  color: #0b1020;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.85rem 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, filter .25s;
  box-shadow: 0 8px 30px -8px rgba(249, 115, 22, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 14px 40px -10px rgba(249, 115, 22, 0.65);
}
.btn-ghost {
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
  border-radius: 9999px;
  padding: 0.85rem 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color .25s, background .25s, transform .25s;
}
.btn-ghost:hover {
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(249, 115, 22, 0.06);
  transform: translateY(-2px);
}

/* === Texte gradient === */
.text-gradient {
  background: linear-gradient(135deg, #fff 0%, #fcd34d 40%, #f97316 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-gradient-cool {
  background: linear-gradient(135deg, #c4b5fd 0%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* === Logo orbit === */
.logo-pulse {
  animation: logoPulse 4s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(249, 115, 22, 0)); }
  50%      { filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.6)); }
}

/* === Marquee / agents === */
.agent-orbit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.agent-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.5);
  font-size: 0.85rem;
  color: #cbd5e1;
}
.agent-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 56px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 56px;
  bottom: -28px;
  width: 2px;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.6) 0%, rgba(249, 115, 22, 0) 100%);
}
.timeline-item:last-child::before { display: none; }
.timeline-step {
  position: absolute;
  left: 0;
  top: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #f59e0b);
  color: #0b1020;
  font-weight: 700;
  font-family: 'Fraunces', serif;
}

/* Form */
.input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: #e2e8f0;
  transition: border-color .2s, background .2s;
  font: inherit;
}
.input:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(15, 23, 42, 0.85);
}
.input::placeholder { color: #64748b; }

/* Mobile nav */
.mobile-menu {
  transition: opacity .2s, transform .2s;
}
.mobile-menu.hidden-menu {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

/* Code block */
pre.code {
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: #cbd5e1;
  overflow-x: auto;
}
pre.code .k { color: #c4b5fd; }
pre.code .s { color: #fcd34d; }
pre.code .c { color: #64748b; font-style: italic; }

/* Screenshot frame */
.frame {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0f172a;
  position: relative;
}
.frame .bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--line);
}
.frame .dot { width: 10px; height: 10px; border-radius: 50%; background: #475569; }
.frame .url {
  margin-left: 12px;
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
