/* ============================================
   APPOLOGY.FR — Dark Minimal Showcase
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&display=swap');

/* --- Custom Properties --- */
:root {
  --bg-void: #050508;
  --bg-surface: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #55556a;

  --neon-cyan: #00d4e0;
  --neon-purple: #8b5cf6;
  --neon-cyan-dim: rgba(0, 212, 224, 0.1);
  --neon-purple-dim: rgba(139, 92, 246, 0.1);

  --glow-cyan: 0 0 12px rgba(0, 212, 224, 0.15);
  --glow-purple: 0 0 12px rgba(139, 92, 246, 0.15);
  --glow-cyan-intense: 0 0 20px rgba(0, 212, 224, 0.25), 0 0 50px rgba(0, 212, 224, 0.08);
  --glow-purple-intense: 0 0 20px rgba(139, 92, 246, 0.25), 0 0 50px rgba(139, 92, 246, 0.08);

  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.02);

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  --max-width: 1200px;
  --section-padding: clamp(80px, 12vh, 160px);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-void);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

/* --- Dot Grid Background --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 clamp(24px, 4vw, 48px);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.nav.is-scrolled {
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 1px 0 var(--glass-border), 0 20px 60px rgba(0, 0, 0, 0.3);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  transition: width 0.3s var(--ease-out-expo);
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__link:hover::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px clamp(24px, 4vw, 48px) var(--section-padding);
  overflow: hidden;
}

/* Subtle ambient gradient orbs */
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.2;
  animation: orb-float 30s ease-in-out infinite;
  pointer-events: none;
}

.hero__orb--cyan {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 70%);
  top: 15%;
  left: 20%;
  animation-delay: 0s;
}

.hero__orb--purple {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--neon-purple) 0%, transparent 70%);
  bottom: 10%;
  right: 15%;
  animation-delay: -10s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-15px, 25px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}


.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.hero__badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 5px rgba(0, 212, 224, 0.4);
  animation: pulse-dot 3s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  padding-bottom: 0.15em;
  margin-bottom: 24px;
}

.hero__title span {
  display: inline;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

.hero__cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--ease-out-expo);
}

.btn--primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: var(--bg-void);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan-intense);
}

.btn--ghost {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn--ghost:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero__scroll__line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  50.1% { transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-padding) clamp(24px, 4vw, 48px);
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section__label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--neon-cyan);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.section__description {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

/* Divider */
.divider {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border) 20%, var(--glass-border) 80%, transparent);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
  position: relative;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-top: 60px;
}

.about__text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.about__text strong {
  color: var(--text-primary);
  font-weight: 500;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stat-card {
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  transition: all 0.4s var(--ease-out-expo);
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.stat-card__number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.stat-card__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================
   APPS SECTION
   ============================================ */
.apps__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 60px;
}

.app-card {
  position: relative;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  overflow: hidden;
  transition: all 0.5s var(--ease-out-expo);
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, transparent 30%, var(--neon-cyan) 50%, var(--neon-purple) 70%, transparent 90%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.app-card:hover::before {
  opacity: 1;
}

.app-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

/* Neon accent glow behind card on hover */
.app-card--cyan:hover {
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4), 0 0 80px rgba(0, 240, 255, 0.06);
}

.app-card--purple:hover {
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4), 0 0 80px rgba(139, 92, 246, 0.06);
}

.app-card__header {
  padding: 48px 40px 0;
  position: relative;
}

.app-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 24px;
  position: relative;
}

.app-card--cyan .app-card__icon {
  background: rgba(0, 212, 224, 0.08);
  border: 1px solid rgba(0, 212, 224, 0.15);
}

.app-card--purple .app-card__icon {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.app-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.app-card__url {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  display: inline-block;
  transition: color 0.3s ease;
}

.app-card--cyan .app-card__url:hover { color: var(--neon-cyan); }
.app-card--purple .app-card__url:hover { color: var(--neon-purple); }

.app-card__description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.app-card__body {
  padding: 28px 40px 40px;
}

.app-card__features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.app-card__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.app-card__features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.app-card--cyan .app-card__features li::before {
  background: var(--neon-cyan);
}

.app-card--purple .app-card__features li::before {
  background: var(--neon-purple);
}

.app-card__footer {
  padding: 0 40px 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-card__tag {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.app-card--cyan .app-card__tag {
  background: rgba(0, 240, 255, 0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.15);
}

.app-card--purple .app-card__tag {
  background: rgba(139, 92, 246, 0.08);
  color: var(--neon-purple);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.app-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s var(--ease-out-expo);
}

.app-card--cyan .app-card__cta {
  background: rgba(0, 240, 255, 0.1);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.app-card--cyan .app-card__cta:hover {
  background: rgba(0, 240, 255, 0.18);
  box-shadow: var(--glow-cyan);
  transform: translateX(4px);
}

.app-card--purple .app-card__cta {
  background: rgba(139, 92, 246, 0.1);
  color: var(--neon-purple);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.app-card--purple .app-card__cta:hover {
  background: rgba(139, 92, 246, 0.18);
  box-shadow: var(--glow-purple);
  transform: translateX(4px);
}

.app-card__cta svg {
  transition: transform 0.3s ease;
}

.app-card__cta:hover svg {
  transform: translateX(3px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  padding: 60px clamp(24px, 4vw, 48px) 40px;
  border-top: 1px solid var(--glass-border);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.footer__link {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer__link:hover {
  color: var(--text-secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .about__grid {
    gap: 48px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: clamp(60px, 10vh, 100px);
  }

  /* Nav mobile */
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 48px;
    gap: 24px;
    transition: right 0.4s var(--ease-out-expo);
    border-left: 1px solid var(--glass-border);
  }

  .nav__links.is-open {
    right: 0;
  }

  .nav__toggle {
    display: flex;
    z-index: 1001;
  }

  .nav__toggle.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle.is-active span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* About */
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Apps */
  .apps__grid {
    grid-template-columns: 1fr;
  }

  .app-card__features {
    grid-template-columns: 1fr;
  }

  .app-card__header {
    padding: 32px 28px 0;
  }

  .app-card__body {
    padding: 24px 28px 28px;
  }

  .app-card__footer {
    padding: 0 28px 32px;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .hero__cta-group {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .about__stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 24px;
  }
}

/* ============================================
   ANIMATIONS — Page load stagger
   ============================================ */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__badge {
  animation: fade-up 0.8s var(--ease-out-expo) 0.2s both;
}

.hero__title {
  animation: fade-up 0.8s var(--ease-out-expo) 0.35s both;
}

.hero__subtitle {
  animation: fade-up 0.8s var(--ease-out-expo) 0.5s both;
}

.hero__cta-group {
  animation: fade-up 0.8s var(--ease-out-expo) 0.65s both;
}

.hero__scroll {
  animation: fade-up 0.8s var(--ease-out-expo) 1s both;
}

/* ============================================
   SELECTION & FOCUS
   ============================================ */
::selection {
  background: rgba(0, 240, 255, 0.2);
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ============================================
   LEGAL PAGES
   ============================================ */
.legal__content {
  max-width: 720px;
  margin-top: 48px;
}

.legal__content h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.legal__content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal__content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 12px;
}

.legal__content ul li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 16px;
  position: relative;
}

.legal__content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.legal__content a {
  color: var(--neon-cyan);
  transition: opacity 0.2s ease;
}

.legal__content a:hover {
  opacity: 0.7;
}

.legal__content strong {
  color: var(--text-primary);
  font-weight: 500;
}

.legal__update {
  margin-top: 48px;
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  font-style: italic;
}
