/* =====================================================================
   DC Sécurité — Software Demonstration Portal (standalone)
   Reuses the main site's visual identity: Cairo font, #0D6EFF / #06B6D4
   accents, dark theme, and the homepage hero overlay treatment.
   ===================================================================== */

:root {
  --accent: #0d6eff;
  --accent-hover: #0b5cd9;
  --accent-cyan: #06b6d4;
  --bg: #02050d;
  --bg-2: #060b17;
  --text: #ffffff;
  --text-muted: #9aa4b2;
  --text-dim: #6b7686;
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.06);
  --card-bg: rgba(255, 255, 255, 0.03);
  --maxw: 1152px;
  --radius: 16px;
  --font: "Cairo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

#main-content {
  outline: none;
}

/* ---------- Header / Navbar ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease,
    backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(2, 5, 13, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 84px;
}
.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #d6dde7;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.nav-cta {
  background: var(--accent);
  color: #fff;
}
.nav-cta:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72vh;
  padding: 168px 0 80px;
  overflow: hidden;
  background: var(--bg);
  text-align: center;
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translateZ(0);
}

/* Overlays copied from the main site's hero-background.css */
.hero-overlay-base {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      180deg,
      rgba(2, 5, 13, 0.72) 0%,
      rgba(3, 10, 24, 0.45) 38%,
      rgba(1, 6, 18, 0.62) 72%,
      rgba(0, 3, 10, 0.88) 100%
    ),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.42) 0%,
      rgba(0, 0, 0, 0.08) 22%,
      rgba(0, 0, 0, 0.08) 78%,
      rgba(0, 0, 0, 0.42) 100%
    );
}
.hero-overlay-center {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 52% 48% at 50% 40%,
    rgba(0, 4, 14, 0.88) 0%,
    rgba(0, 8, 22, 0.62) 42%,
    transparent 72%
  );
}
.hero-overlay-neon {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
      ellipse 28% 55% at 12% 52%,
      rgba(13, 110, 255, 0.14),
      transparent 68%
    ),
    radial-gradient(
      ellipse 28% 55% at 88% 48%,
      rgba(6, 182, 212, 0.12),
      transparent 68%
    ),
    radial-gradient(
      ellipse 70% 40% at 50% 100%,
      rgba(13, 110, 255, 0.08),
      transparent 60%
    );
}
.hero-overlay-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.hero-glow {
  position: absolute;
  top: 33%;
  left: 50%;
  width: 480px;
  height: 480px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(13, 110, 255, 0.1);
  filter: blur(120px);
  pointer-events: none;
}

/* Hero particles (mirrors hero-background.css) */
.hero-cyber-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(103, 232, 249, 0.85);
  box-shadow: 0 0 6px rgba(13, 110, 255, 0.55);
  transform: translateZ(0);
  will-change: transform, opacity;
}
@keyframes hero-particle-drift {
  0%,
  100% {
    opacity: 0.15;
    transform: translate3d(0, 0, 0);
  }
  50% {
    opacity: 0.75;
    transform: translate3d(0, -14px, 0);
  }
}
.hero-particle--animate {
  animation: hero-particle-drift var(--hero-drift-duration, 5s) ease-in-out
    infinite;
  animation-delay: var(--hero-drift-delay, 0s);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
}
.hero-title {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-subtitle {
  margin: 24px auto 0;
  max-width: 640px;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 300;
  color: #cdd5df;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.65);
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}
.section-demos {
  background: linear-gradient(to bottom, var(--bg), var(--bg-2));
}
.section-upcoming {
  background: linear-gradient(to bottom, var(--bg-2), var(--bg));
  border-top: 1px solid var(--border-soft);
}
.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: #fff;
}
.section-subtitle {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 300;
}

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: 32px;
}
.grid-demos {
  grid-template-columns: 1fr;
}
.grid-upcoming {
  grid-template-columns: 1fr;
}

/* ---------- Demo card ---------- */
.demo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.demo-card:not(.is-disabled):hover {
  transform: translateY(-8px);
  border-color: rgba(13, 110, 255, 0.4);
  box-shadow: 0 20px 50px rgba(13, 110, 255, 0.18);
}
.demo-card.is-disabled {
  border-color: var(--border-soft);
  background: rgba(255, 255, 255, 0.02);
}
.demo-card-glow {
  position: absolute;
  top: -64px;
  right: -64px;
  width: 192px;
  height: 192px;
  border-radius: 50%;
  background: rgba(13, 110, 255, 0.1);
  filter: blur(48px);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.demo-card:not(.is-disabled):hover .demo-card-glow {
  opacity: 1;
}
.demo-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.demo-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.demo-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(13, 110, 255, 0.3);
  background: linear-gradient(
    135deg,
    rgba(13, 110, 255, 0.15),
    rgba(6, 182, 212, 0.1)
  );
  color: #3b8bff;
}
.demo-card-icon svg {
  width: 28px;
  height: 28px;
}
.is-disabled .demo-card-icon {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
}
.demo-card-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}
.demo-card-desc {
  margin: 12px 0 0;
  flex: 1;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
}
.demo-card-cta {
  margin-top: 32px;
}

/* ---------- Status badges ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-live {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.3);
}
.status-soon {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 24px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, box-shadow 0.2s ease,
    transform 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px rgba(13, 110, 255, 0.4);
}
.btn-arrow {
  width: 16px;
  height: 16px;
}
.btn-disabled {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border);
  color: var(--text-dim);
  cursor: not-allowed;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0a0a0a;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 40px;
}
.footer-logo {
  height: 38px;
  width: auto;
  margin-bottom: 20px;
}
.footer-desc {
  max-width: 360px;
  margin: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #8b96a5;
}
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9aa4b2;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.social-btn:hover {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent));
  color: #fff;
  border-color: transparent;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 4px;
}
.footer-links a {
  font-size: 0.95rem;
  color: #8b96a5;
  width: fit-content;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px 0;
  font-size: 0.85rem;
  color: #6b7686;
  text-align: center;
}
.footer-bottom p {
  margin: 0;
}

/* =====================================================================
   Responsive — 320px → ultra-wide
   ===================================================================== */

/* Small phones */
@media (max-width: 360px) {
  .container {
    padding-inline: 16px;
  }
  .demo-card {
    padding: 24px;
  }
  .header-nav .nav-link:first-child {
    display: none;
  }
}

/* Tablet and up */
@media (min-width: 768px) {
  .hero {
    min-height: 78vh;
    padding-top: 184px;
  }
  .section {
    padding: 112px 0;
  }
  .grid-demos {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-upcoming {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    grid-template-columns: 2fr 1fr;
    gap: 64px;
  }
}

/* Desktop and up */
@media (min-width: 1024px) {
  .grid-upcoming {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Ultra-wide */
@media (min-width: 1536px) {
  :root {
    --maxw: 1280px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .demo-card:not(.is-disabled):hover {
    transform: none;
  }
}
