/* =============================================================
   Crealyx — Refonte interactive
   Built on top of tokens.css
   ============================================================= */

@import url('tokens.css');

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  background: var(--bg-app);
  color: var(--fg-primary);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================================
   Section rhythm
   ============================================================= */
section { position: relative; padding: clamp(64px, 9vw, 120px) 0; }

.section-header { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); }

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--fg-primary);
}
.section--dark .section-title { color: #fff; }

.section-subtitle {
  margin-top: 16px;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--fg-secondary);
  text-wrap: pretty;
}
.section--dark .section-subtitle { color: var(--fg-on-dark-soft); }

.pill {
  display: inline-block;
  padding: 0.05em 0.4em;
  background: var(--gradient-pill);
  color: var(--teal-500);
  border-radius: var(--radius-md);
  border: 1px solid rgba(45, 212, 191, 0.25);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-500);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: currentColor;
}

/* =============================================================
   Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn--lg { padding: 17px 32px; font-size: 16px; }
.btn--full { width: 100%; }

.btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-teal);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(13, 148, 136, 0.5);
}
.btn--primary svg { transition: transform var(--transition-base); }
.btn--primary:hover svg { transform: translateX(4px); }

.btn--outline {
  background: transparent;
  color: var(--fg-primary);
  border-color: var(--gray-300);
}
.btn--outline:hover {
  border-color: var(--teal-500);
  color: var(--teal-600);
  background: rgba(13, 148, 136, 0.05);
  transform: translateY(-2px);
}

.btn--ghost-dark {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(10px);
}
.btn--ghost-dark:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(45, 212, 191, 0.4);
  transform: translateY(-2px);
}

.btn--white {
  background: #fff;
  color: var(--navy-900);
}
.btn--white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* =============================================================
   Reveal animations
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

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

/* =============================================================
   Background canvas + overlays
   ============================================================= */
.fx-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
#bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

/* Dark sections get a teal radial glow */
.section--dark {
  background: var(--navy-900);
  color: #fff;
  overflow: hidden;
}
.section--dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(20, 184, 166, 0.18), transparent 60%);
  pointer-events: none;
}
.section--dark > * { position: relative; z-index: 1; }
