/* ═══════════════════════════════════════════════════
   ROLLIT DESIGN SYSTEM — NOVO
   Baseado no template de referência
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&family=Bricolage+Grotesque:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --ds-bg: #050505;
  --ds-bg-card: #0d0d0d;
  --ds-bg-elevated: #141416;
  --ds-fg: #f2f2f2;
  --ds-fg-muted: #737380;
  --ds-fg-secondary: #a1a1aa;
  --ds-border: #27272a;
  --ds-border-muted: #1c1c1f;
  --ds-red: #ef233c;
  --ds-red-bright: #f43f5e;
  --ds-red-dark: #991b1b;
  --ds-zinc-800: #27272a;
  --ds-zinc-700: #3f3f46;
  --ds-zinc-600: #52525b;
  --ds-zinc-500: #71717a;
  --ds-zinc-400: #a1a1aa;

  --rollit-red: 350 85% 55%;
  --rollit-red-bright: 350 90% 60%;
  --rollit-red-dark: 350 80% 40%;
  --rollit-red-glow: 350 100% 55%;
  --rollit-dark: 0 0% 2%;
  --rollit-dark-card: 0 0% 5%;
  --rollit-zinc-800: 240 4% 16%;
  --rollit-zinc-700: 240 4% 22%;

  --shadow-red-sm: 0 0 15px -3px rgba(239,35,60,0.3);
  --shadow-red-md: 0 0 30px -5px rgba(239,35,60,0.4);
  --shadow-red-lg: 0 0 60px -10px rgba(239,35,60,0.5);
  --shadow-elevated: 0 20px 40px -10px rgba(0,0,0,0.5);
}

/* ===== BASE ===== */
.ds-page {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--ds-bg);
  color: var(--ds-fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.ds-page ::selection {
  background: rgba(239,35,60,0.3);
  color: #fecdd3;
}

/* ===== FONTS ===== */
.font-heading { font-family: 'Manrope', sans-serif; }
.font-display { font-family: 'Bricolage Grotesque', sans-serif; }
.font-mono-brand { font-family: 'Space Mono', monospace; }

/* ===== KEYFRAMES ===== */
@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(30px); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes fadeSlideInUp {
  0% { opacity: 0; transform: translateY(20px); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes borderSpin { to { --gradient-angle: 360deg; } }
@keyframes shimmer { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 0 0 rgba(239,35,60,0); } 50% { box-shadow: 0 0 30px rgba(239,35,60,0.3); } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes barGrow { 0% { transform: scaleY(0); opacity: 0; } 25% { transform: scaleY(1); opacity: 1; } 75% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(0); opacity: 0; } }
@keyframes marqueeUp { 0% { transform: translateY(0); } 100% { transform: translateY(-50%); } }
@keyframes marqueeDown { 0% { transform: translateY(-50%); } 100% { transform: translateY(0); } }

/* ===== ANIMATION CLASSES ===== */
.animate-fade-slide-in { animation: fadeSlideIn 1s cubic-bezier(0.16,1,0.3,1) both; }
.animate-fade-slide-up { animation: fadeSlideInUp 0.8s cubic-bezier(0.2,0.8,0.2,1) both; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-breathe { animation: breathe 4s ease-in-out infinite; }
.animate-pulse-glow { animation: pulseGlow 3s ease-in-out infinite; }
.animate-spin-slow { animation: spinSlow 8s linear infinite; }
.animate-marquee-up { animation: marqueeUp 30s linear infinite; }
.animate-marquee-down { animation: marqueeDown 30s linear infinite; }

/* Scroll-triggered */
.animate-on-scroll { animation-play-state: paused !important; }
.animate-on-scroll.animate { animation-play-state: running !important; }

/* Delays */
.delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; } .delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; } .delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; } .delay-8 { animation-delay: 0.8s; }

/* ===== SHINY CTA BUTTON ===== */
@property --gradient-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.shiny-cta {
  --gradient-angle: 0deg;
  position: relative; overflow: hidden; border-radius: 0;
  padding: 1rem 2.5rem; font-weight: 500; color: #fff;
  background: linear-gradient(#000,#000) padding-box,
    conic-gradient(from var(--gradient-angle), transparent 0%, hsl(var(--rollit-red)) 5%, hsl(var(--rollit-red-bright)) 15%, hsl(var(--rollit-red)) 30%, transparent 40%, transparent 100%) border-box;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px hsl(var(--rollit-zinc-800));
  cursor: pointer; isolation: isolate;
  animation: borderSpin 2.5s linear infinite;
}
.shiny-cta::after {
  content: ''; pointer-events: none; position: absolute;
  left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 100%; aspect-ratio: 1;
  background: linear-gradient(-50deg, transparent, hsl(var(--rollit-red)), transparent);
  mask-image: radial-gradient(circle at bottom, transparent 40%, black);
  opacity: 0.4; animation: shimmer 4s linear infinite;
}

/* ===== BORDER BEAM BUTTON ===== */
.border-beam-btn { position: relative; overflow: hidden; }
.border-beam-btn::before {
  content: ''; position: absolute; inset: -300%;
  animation: spinSlow 4s linear infinite;
  background: conic-gradient(from 90deg at 50% 50%, transparent 0%, transparent 90%, #fff 100%);
}
.border-beam-btn .btn-fill { position: absolute; inset: 1px; background: hsl(var(--rollit-dark)); }

/* ===== RED BEAM BUTTON ===== */
.red-beam-btn { position: relative; overflow: hidden; }
.red-beam-btn::before {
  content: ''; position: absolute; inset: -100%;
  animation: spinSlow 3s linear infinite;
  background: conic-gradient(from 90deg at 50% 50%, transparent 0%, transparent 75%, hsl(var(--rollit-red)) 100%);
  opacity: 0; transition: opacity 0.3s;
}
.red-beam-btn:hover::before { opacity: 1; }
.red-beam-btn .btn-border { position: absolute; inset: 0; background: hsl(var(--rollit-zinc-800)); transition: opacity 0.3s; }
.red-beam-btn:hover .btn-border { opacity: 0; }
.red-beam-btn .btn-fill { position: absolute; inset: 1px; background: hsl(var(--rollit-dark)); z-index: 1; }
.red-beam-btn .btn-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 100%, rgba(239,35,60,0.2) 0%, transparent 100%);
  opacity: 0; transition: opacity 0.5s; z-index: 1;
}
.red-beam-btn:hover .btn-glow { opacity: 1; }

/* ===== PROGRESSIVE BLUR ===== */
.gradient-blur { position: fixed; z-index: 40; inset: 0 0 auto 0; height: 12%; pointer-events: none; }
.gradient-blur > div, .gradient-blur::before, .gradient-blur::after { position: absolute; inset: 0; }
.gradient-blur::before { content: ""; z-index: 1; backdrop-filter: blur(0.5px); mask: linear-gradient(to top, transparent 0%, black 12.5%, black 25%, transparent 37.5%); }
.gradient-blur > div:nth-of-type(1) { z-index: 2; backdrop-filter: blur(1px); mask: linear-gradient(to top, transparent 12.5%, black 25%, black 37.5%, transparent 50%); }
.gradient-blur > div:nth-of-type(2) { z-index: 3; backdrop-filter: blur(2px); mask: linear-gradient(to top, transparent 25%, black 37.5%, black 50%, transparent 62.5%); }
.gradient-blur > div:nth-of-type(3) { z-index: 4; backdrop-filter: blur(4px); mask: linear-gradient(to top, transparent 37.5%, black 50%, black 62.5%, transparent 75%); }
.gradient-blur > div:nth-of-type(4) { z-index: 5; backdrop-filter: blur(8px); mask: linear-gradient(to top, transparent 50%, black 62.5%, black 75%, transparent 87.5%); }
.gradient-blur > div:nth-of-type(5) { z-index: 6; backdrop-filter: blur(16px); mask: linear-gradient(to top, transparent 62.5%, black 75%, black 87.5%, transparent 100%); }
.gradient-blur > div:nth-of-type(6) { z-index: 7; backdrop-filter: blur(32px); mask: linear-gradient(to top, transparent 75%, black 87.5%, black 100%); }
.gradient-blur::after { content: ""; z-index: 8; backdrop-filter: blur(64px); mask: linear-gradient(to top, transparent 87.5%, black 100%); }

/* ===== BACKGROUNDS ===== */
.grid-bg {
  background-image: linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}
.stars-bg {
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 40px 70px, #fff, transparent),
    radial-gradient(1px 1px at 50px 160px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 90px 40px, #fff, transparent),
    radial-gradient(1px 1px at 130px 80px, #fff, transparent),
    radial-gradient(1px 1px at 200px 120px, #fff, transparent);
  background-size: 250px 250px; opacity: 0.15;
}

/* ===== UTILITIES ===== */
.corner-accents { position: relative; }
.corner-accents::before, .corner-accents::after { content: ''; position: absolute; width: 8px; height: 8px; border-color: var(--ds-red); }
.corner-accents::before { top: 0; left: 0; border-top: 1px solid; border-left: 1px solid; }
.corner-accents::after { bottom: 0; right: 0; border-bottom: 1px solid; border-right: 1px solid; }

.hover-card-lift { transition: transform 0.3s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.3s, border-color 0.3s; }
.hover-card-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-elevated); border-color: rgba(239,35,60,0.3); }

.nav-link-glow { position: relative; }
.nav-link-glow::after {
  content: ''; position: absolute; bottom: -4px; left: 50%;
  width: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ds-red), transparent);
  box-shadow: 0 0 10px rgba(239,35,60,0.8);
  transition: all 0.3s ease-out; transform: translateX(-50%);
}
.nav-link-glow:hover::after { width: 100%; }

[style*="--border-gradient"]::before {
  content: ""; position: absolute; inset: 0; padding: 1px;
  border-radius: var(--border-radius-before, inherit);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  background: var(--border-gradient); pointer-events: none;
}

.section-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(239,35,60,0.3), transparent); }
.section-divider-glow { height: 6px; background: linear-gradient(90deg, transparent, rgba(239,35,60,0.1), transparent); filter: blur(4px); }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ===== SCROLL REVEAL ===== */
.ds-reveal {
  opacity: 0; transform: translateY(24px); filter: blur(4px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1), filter 0.7s cubic-bezier(0.16,1,0.3,1);
}
.ds-reveal.revealed { opacity: 1; transform: translateY(0); filter: blur(0); }
