/* ═══════════════════════════════════════════════════════
   sp-design.css — Service Pages Design System v2
   Zéro à Un — Animations, glassmorphism, visual identity
═══════════════════════════════════════════════════════ */

/* ── 1. Hero Enhancements ─────────────────────────────── */
.sp-hero {
  position: relative;
  overflow: hidden;
  background: #081f1b;
  padding-top: 130px;
  padding-bottom: 5rem;
}

/* Grid background */
.sp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74,222,128,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,222,128,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 0%, black 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 85% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Ambient glow — left side, behind the text, no overlap with the icon */
.sp-hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  top: -100px;
  left: -200px;
  background: radial-gradient(circle, rgba(74,222,128,.09) 0%, transparent 65%);
  border-radius: 50%;
  animation: sp-orb 11s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes sp-orb {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-50px, 50px) scale(1.15); }
}

.sp-hero > * { position: relative; z-index: 1; }

/* ── Eyebrow pill ── */
.sp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(74,222,128,.07);
  border: 1px solid rgba(74,222,128,.22);
  border-radius: 100px;
  padding: .35rem 1rem;
  font-family: var(--ff-mono, monospace);
  font-size: .6rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #4ade80;
  margin-bottom: 1.25rem;
}

.sp-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  animation: sp-blink 2.2s ease-in-out infinite;
}

@keyframes sp-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .35; transform: scale(.55); }
}

/* ── H1 gradient ── */
.sp-h1 {
  background: linear-gradient(130deg, #F2EDE4 55%, rgba(74,222,128,.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  max-width: 56%; /* prevent overlap with floating icon on desktop */
}

@media (max-width: 900px) {
  .sp-h1 { max-width: 100%; }
}

/* ── Floating service icon ── */
.sp-hero-icon {
  position: absolute;
  right: 7%;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  animation: sp-float 7s ease-in-out infinite;
}

@keyframes sp-float {
  0%, 100% { transform: translateY(-50%); }
  50%       { transform: translateY(calc(-50% - 18px)) rotate(2deg); }
}

.sp-hero-icon svg {
  width: 100%;
  height: 100%;
  stroke: #4ade80;
  fill: none;
  stroke-width: .8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .18;
  filter: drop-shadow(0 0 24px rgba(74,222,128,.55));
}

/* ── 2. Stats Bar ─────────────────────────────────────── */
.sp-stats {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  margin: 2.5rem 0 3rem;
  border: 1px solid rgba(74,222,128,.12);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(74,222,128,.025);
}

.sp-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  gap: .25rem;
  border-right: 1px solid rgba(74,222,128,.08);
  transition: background .3s;
}

.sp-stat:last-child { border-right: none; }
.sp-stat:hover { background: rgba(74,222,128,.04); }

.sp-stat-value {
  font-family: 'Clash Display', sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: #4ade80;
  line-height: 1;
  letter-spacing: -.04em;
}

.sp-stat-unit {
  color: rgba(74,222,128,.65);
  font-size: .85rem;
  font-weight: 500;
  margin-left: .15rem;
}

.sp-stat-label {
  font-family: var(--ff-mono, monospace);
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(242,237,228,.3);
  margin-top: .3rem;
}

/* ── 3. Glass Cards (sp-list items) ──────────────────── */
.sp-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 1.5rem 0 !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.sp-list li {
  background: rgba(255,255,255,.018);
  border: 1px solid rgba(74,222,128,.1);
  border-radius: 14px;
  padding: 1.4rem 1.5rem !important;
  transition: transform .3s cubic-bezier(.22,1,.36,1), border-color .3s, box-shadow .3s;
  position: relative;
  overflow: hidden;
  cursor: default;
}

/* shimmer line on hover */
.sp-list li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74,222,128,.5), transparent);
  transform: translateX(-100%);
  transition: transform .55s ease;
}

.sp-list li:hover {
  transform: translateY(-5px);
  border-color: rgba(74,222,128,.28);
  box-shadow: 0 14px 44px rgba(0,0,0,.25), 0 0 0 1px rgba(74,222,128,.04);
}

.sp-list li:hover::before { transform: translateX(100%); }

.sp-list-icon {
  width: 40px;
  height: 40px;
  background: rgba(74,222,128,.08);
  border: 1px solid rgba(74,222,128,.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .9rem;
  flex-shrink: 0;
  color: #4ade80;
}

.sp-list-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* ── 4. Process Timeline ──────────────────────────────── */
.sp-process-wrap {
  margin: 2rem 0 3.5rem;
}

.sp-process-wrap > h2 {
  font-family: 'Clash Display', sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: #F2EDE4;
  letter-spacing: -.03em;
  margin-bottom: 2rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid rgba(74,222,128,.1);
}

.sp-process {
  display: flex;
  gap: 0;
  position: relative;
}

/* horizontal line */
.sp-process::before {
  content: '';
  position: absolute;
  top: 27px;
  left: 27px;
  right: 27px;
  height: 1px;
  background: linear-gradient(90deg, rgba(74,222,128,.5), rgba(74,222,128,.05));
  pointer-events: none;
}

.sp-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .8rem;
  position: relative;
}

.sp-step-num {
  width: 54px;
  height: 54px;
  background: #081f1b;
  border: 2px solid #4ade80;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Clash Display', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #4ade80;
  box-shadow: 0 0 18px rgba(74,222,128,.25);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transition: box-shadow .3s, transform .3s;
}

.sp-step:hover .sp-step-num {
  box-shadow: 0 0 28px rgba(74,222,128,.5);
  transform: scale(1.08);
}

.sp-step-label {
  font-family: var(--ff-mono, monospace);
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(242,237,228,.3);
}

.sp-step-text {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .88rem;
  color: rgba(242,237,228,.6);
  line-height: 1.5;
  font-weight: 500;
}

/* ── 5. Scroll Reveal ─────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}

.reveal.sp-visible {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }

/* ── 6. FAQ Enhanced ──────────────────────────────────── */
.sp-faq-item {
  border-radius: 10px;
  margin-bottom: .4rem;
  border: 1px solid rgba(242,237,228,.06) !important;
  padding: 0 .5rem;
  transition: background .25s, border-color .25s;
}

.sp-faq-item[open] {
  background: rgba(74,222,128,.03);
  border-color: rgba(74,222,128,.12) !important;
}

.sp-faq-item summary {
  padding: 1rem .5rem !important;
}

/* ── 7. Section enhancements ──────────────────────────── */
.sp-section {
  margin-bottom: 4.5rem;
}

/* ── 8. CTA Glow ──────────────────────────────────────── */
.sp-cta-section {
  position: relative;
  overflow: hidden;
}

.sp-cta-glow {
  position: absolute;
  bottom: -70px;
  right: -70px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(74,222,128,.14) 0%, transparent 68%);
  pointer-events: none;
  border-radius: 50%;
  animation: sp-orb 7s ease-in-out infinite alternate;
}

/* ── 9. Back link pill — hidden on desktop, shown on mobile ── */
.sp-back {
  display: none; /* desktop: hide, user uses browser back */
}

@media (max-width: 767px) {
  .sp-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--ff-mono, monospace);
    font-size: .6rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(242,237,228,.45);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color .2s;
    cursor: pointer;
  }
  .sp-back:hover { color: #4ade80; }
  .sp-back::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18l-6-6l6-6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
  }
}

/* ── 10. Mobile ───────────────────────────────────────── */
@media (max-width: 900px) {
  .sp-hero-icon { display: none; }
}

@media (max-width: 767px) {
  .sp-stats {
    flex-wrap: wrap;
    border-radius: 12px;
  }
  .sp-stat {
    flex: 1 1 calc(50% - 1px);
    padding: 1.1rem .75rem;
    border-bottom: 1px solid rgba(74,222,128,.08);
  }
  .sp-stat:nth-child(even) { border-right: none; }
  .sp-stat-value { font-size: 1.65rem; }

  .sp-list {
    grid-template-columns: 1fr !important;
  }

  .sp-process { flex-direction: column; gap: 0; }
  .sp-process::before {
    top: 27px;
    left: 26px;
    right: auto;
    bottom: 27px;
    width: 1px;
    height: calc(100% - 54px);
    background: linear-gradient(180deg, rgba(74,222,128,.5), rgba(74,222,128,.05));
  }
  .sp-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    padding: 0 0 2rem 0;
    gap: 1rem;
  }
  .sp-step:last-child { padding-bottom: 0; }
  .sp-step-num { flex-shrink: 0; }
}

/* ── 9. Icon Color Variants ──────────────────────────────── */
.sp-list-icon.sp-icon-green  { background: rgba(74,222,128,.1);  border-color: rgba(74,222,128,.28);  color: #4ade80; }
.sp-list-icon.sp-icon-blue   { background: rgba(96,165,250,.1);  border-color: rgba(96,165,250,.28);  color: #60a5fa; }
.sp-list-icon.sp-icon-purple { background: rgba(167,139,250,.1); border-color: rgba(167,139,250,.28); color: #a78bfa; }
.sp-list-icon.sp-icon-orange { background: rgba(251,146,60,.1);  border-color: rgba(251,146,60,.28);  color: #fb923c; }
.sp-list-icon.sp-icon-pink   { background: rgba(244,114,182,.1); border-color: rgba(244,114,182,.28); color: #f472b6; }
.sp-list-icon.sp-icon-yellow { background: rgba(251,191,36,.1);  border-color: rgba(251,191,36,.28);  color: #fbbf24; }
.sp-list-icon.sp-icon-red    { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.28); color: #f87171; }
.sp-list-icon.sp-icon-teal   { background: rgba(45,212,191,.1);  border-color: rgba(45,212,191,.28);  color: #2dd4bf; }

/* ── 10. Icon Animations ─────────────────────────────────── */
@keyframes sp-float      { 0%,100%{transform:translateY(0)}    50%{transform:translateY(-4px)} }
@keyframes sp-spin-slow  { from{transform:rotate(0deg)}        to{transform:rotate(360deg)} }
@keyframes sp-pulse-icon { 0%,100%{transform:scale(1)}         50%{transform:scale(1.18)} }
@keyframes sp-glow-icon  { 0%,100%{filter:drop-shadow(0 0 2px currentColor)} 50%{filter:drop-shadow(0 0 7px currentColor)} }
@keyframes sp-bounce-x   { 0%,100%{transform:translateX(0)}   50%{transform:translateX(3px)} }

.sp-list-icon.sp-anim-float  svg { animation: sp-float      3.2s ease-in-out infinite; }
.sp-list-icon.sp-anim-spin   svg { animation: sp-spin-slow  9s   linear     infinite; }
.sp-list-icon.sp-anim-pulse  svg { animation: sp-pulse-icon 2.6s ease-in-out infinite; }
.sp-list-icon.sp-anim-glow   svg { animation: sp-glow-icon  2.8s ease-in-out infinite; }
.sp-list-icon.sp-anim-bounce svg { animation: sp-bounce-x   2.4s ease-in-out infinite; }
