:root {
  --bg: #06080f;
  --bg-elevated: #0d111c;
  --card: #12182a;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-2: #22d3ee;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --border: rgba(148, 163, 184, 0.14);
  --gradient-nova: linear-gradient(135deg, #1a1f71, #1e5799);
  --gradient-1: linear-gradient(135deg, #aeb6c2, #6b7280);
  --gradient-2: linear-gradient(135deg, #4ade80, #047857);
  --gradient-3: linear-gradient(135deg, #60a5fa, #1e40af);
  --gradient-4: linear-gradient(135deg, #ef4444, #9f1239, #7f1d1d);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Ambient grid */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 75%);
}

.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}
.bg-glow-1 { top: -200px; left: -100px; background: #3b82f6; }
.bg-glow-2 { top: 40%; right: -200px; background: #22d3ee; }
.bg-glow-3 { bottom: -150px; left: 30%; background: #1e40af; }

.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(6, 8, 15, 0.75);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand-lockup img { height: 40px; width: auto; }
.brand-lockup span {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #fff;
  box-shadow: 0 8px 32px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 12px 40px rgba(59, 130, 246, 0.45); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* Hero */
.hero {
  padding: 80px 0 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, #fff 0%, #93c5fd 50%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}
.stat span { font-size: 0.85rem; color: var(--muted); }

/* Card showcase */
.card-stage {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* ── Metal card surface (2 layers like mini-app: texture + gradient) ── */
.metal-surface {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  --card-gradient: linear-gradient(135deg, #1a1f71, #1e5799);
  --metal-blend: overlay;
  background: url("assets/card_blank.png") center/cover, var(--card-gradient);
  background-blend-mode: var(--metal-blend);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28);
}
/* Reflet statique léger */
.metal-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.22) 0%,
    transparent 38%,
    transparent 62%,
    rgba(255, 255, 255, 0.06) 100%
  );
  mix-blend-mode: soft-light;
}
/* Brillance animée */
.metal-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 44%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 56%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: metal-shine 8s ease-in-out infinite;
  mix-blend-mode: soft-light;
  opacity: 0.45;
}
@keyframes metal-shine {
  0%, 100% { background-position: 130% 0; }
  50% { background-position: -30% 0; }
}
/* Tons = CARD_GRADIENTS + CARD_TEXTURE_BLEND (card.html) */
.metal-surface[data-tone="nova"] {
  --card-gradient: linear-gradient(135deg, #1a1f71, #1e5799);
  --metal-blend: overlay;
}
.metal-surface[data-tone="0"] {
  --card-gradient: linear-gradient(135deg, #aeb6c2, #6b7280);
  --metal-blend: normal;
}
.metal-surface[data-tone="1"] {
  --card-gradient: linear-gradient(135deg, #4ade80, #047857);
  --metal-blend: overlay;
}
.metal-surface[data-tone="2"] {
  --card-gradient: linear-gradient(135deg, #60a5fa, #1e40af);
  --metal-blend: overlay;
}
.metal-surface[data-tone="3"] {
  --card-gradient: linear-gradient(135deg, #ef4444, #9f1239, #7f1d1d);
  --metal-blend: overlay;
}
.metal-surface[data-tone="4"] {
  --card-gradient: linear-gradient(135deg, #78716c, #0a0a0a, #292524);
  --metal-blend: soft-light;
}
.metal-surface[data-tone="4"]::after { opacity: 0.3; mix-blend-mode: overlay; }

.card-float {
  position: absolute;
  width: min(340px, 90vw);
  aspect-ratio: 1.586 / 1;
  border-radius: 20px;
  padding: 22px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-float > *:not(.metal-surface) { position: relative; z-index: 2; }
.card-float .top-row img.logo {
  height: 44px;
  width: auto;
  mix-blend-mode: overlay;
  opacity: 0.94;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45)) brightness(1.05);
}
.card-float[data-tone="nova"] .top-row img.logo,
.card-float[data-tone="0"] .top-row img.logo {
  mix-blend-mode: normal;
  opacity: 1;
}
.card-main {
  transform: rotate(-6deg) translateY(0);
  z-index: 3;
  animation: float-main 5s ease-in-out infinite;
}
.card-back-1 {
  transform: rotate(4deg) translate(40px, 24px) scale(0.92);
  z-index: 2;
  opacity: 0.85;
  animation: float-back1 5s ease-in-out infinite;
}
.card-back-2 {
  transform: rotate(12deg) translate(70px, 48px) scale(0.84);
  z-index: 1;
  opacity: 0.65;
  animation: float-back2 5s ease-in-out infinite;
}
@keyframes float-main {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-12px); }
}
@keyframes float-back1 {
  0%, 100% { transform: rotate(4deg) translate(40px, 24px) scale(0.92); }
  50% { transform: rotate(6deg) translate(40px, 16px) scale(0.92); }
}
@keyframes float-back2 {
  0%, 100% { transform: rotate(12deg) translate(70px, 48px) scale(0.84); }
  50% { transform: rotate(10deg) translate(70px, 40px) scale(0.84); }
}
.card-float .top-row {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}
.card-float .chip {
  display: block;
  height: 32px;
  margin-top: 20px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
.card-float .balance-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  margin-top: 28px;
}
.card-float .balance {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}
.card-float .balance small { font-size: 14px; opacity: 0.7; }
.card-float .pan {
  position: absolute;
  left: 22px;
  bottom: 22px;
  font-size: 16px;
  letter-spacing: 3px;
  font-variant-numeric: tabular-nums;
}
.card-float .net {
  position: absolute;
  right: 22px;
  bottom: 28px;
}
.card-float .net img { height: 36px; width: auto; }
.card-float .net img.mc { height: 22px; }

/* Sections */
section { padding: 88px 0; }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section-desc {
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 48px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-4px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--muted); }

/* Card gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.gallery-item {
  aspect-ratio: 1.586 / 1;
  border-radius: 14px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 12px 32px -12px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.25s, box-shadow 0.25s;
}
.gallery-item:hover {
  transform: scale(1.04);
  box-shadow:
    0 20px 40px -12px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.gallery-item > *:not(.metal-surface) { position: relative; z-index: 2; }
.gallery-item .g-logo {
  mix-blend-mode: overlay;
  opacity: 0.92;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)) brightness(1.04);
}
.gallery-item[data-tone="0"] .g-logo {
  mix-blend-mode: normal;
  opacity: 1;
}
.gallery-item .g-logo {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 24px;
  z-index: 2;
}
.gallery-item .g-chip {
  position: absolute;
  left: 14px;
  top: 38px;
  height: 18px;
  z-index: 2;
}
.gallery-item .g-name {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  z-index: 2;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-size: 2rem;
  font-weight: 800;
  color: rgba(59, 130, 246, 0.25);
  display: block;
  margin-bottom: 12px;
}
.step h3 { font-size: 1rem; margin-bottom: 8px; }
.step p { font-size: 0.85rem; color: var(--muted); }

/* CTA band */
.cta-band {
  margin: 40px 0 88px;
  padding: 56px 48px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.5);
}
.cta-band .metal-surface {
  --card-gradient: linear-gradient(135deg, #1a1f71, #1e5799);
  --metal-blend: overlay;
}
.cta-band > *:not(.metal-surface) { position: relative; z-index: 1; }
.cta-band h2 { font-size: 1.75rem; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.75); margin-bottom: 28px; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* Mobile nav toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 48px; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-stats { justify-content: center; }
  .card-stage { height: 360px; margin-top: 20px; }
  .features { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
  }
  .menu-toggle { display: block; }
}

@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 24px; }
}
