/*
Theme Name: ROI System
Theme URI: https://roi-s.pl
Author: Anton Malicki
Author URI: https://roi-s.pl
Description: Minimalistyczny, nowoczesny motyw dla ROI System z animacjami motion.
Version: 2.0
Text Domain: roisystem
*/

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Noise overlay ──────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

/* ─── Keyframes ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes drift1 {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(60px,-40px) scale(1.05); }
  66%  { transform: translate(-30px,20px) scale(0.95); }
  100% { transform: translate(0,0) scale(1); }
}
@keyframes drift2 {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(-50px,30px) scale(0.95); }
  66%  { transform: translate(40px,-20px) scale(1.05); }
  100% { transform: translate(0,0) scale(1); }
}
@keyframes drift3 {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(30px,50px) scale(1.1); }
  100% { transform: translate(0,0) scale(1); }
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,.4); }
  50%       { box-shadow: 0 0 6px 2px rgba(99,102,241,.5); }
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(6px); opacity: .5; }
}
@keyframes menuSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Reveal (JS-triggered) ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(.93);
  transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

.delay-0   { transition-delay:   0ms; }
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* ─── Hero entrance ──────────────────────────────────────────── */
.hero-tag    { animation: fadeUp .8s cubic-bezier(.16,1,.3,1) .1s  both; }
.hero-title  { animation: fadeUp .9s cubic-bezier(.16,1,.3,1) .2s  both; }
.hero-sub    { animation: fadeUp .9s cubic-bezier(.16,1,.3,1) .35s both; }
.hero-cta    { animation: fadeUp .9s cubic-bezier(.16,1,.3,1) .5s  both; }
.hero-scroll { animation: fadeIn 1s ease 1.2s both; }

/* ─── Shimmer text ───────────────────────────────────────────── */
.text-shimmer {
  background: linear-gradient(90deg,#fff 0%,#fff 40%,#aaa 50%,#fff 60%,#fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
}

/* ─── Gradient orbs ──────────────────────────────────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,.18) 0%, transparent 70%);
  top: -100px; left: -200px;
  animation: drift1 18s ease-in-out infinite;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,.14) 0%, transparent 70%);
  top: 20%; right: -150px;
  animation: drift2 14s ease-in-out infinite;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,.12) 0%, transparent 70%);
  bottom: 10%; left: 30%;
  animation: drift3 20s ease-in-out infinite;
}

/* ─── Navigation ─────────────────────────────────────────────── */
#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: border-color .4s, background .4s;
}
#main-nav.nav-scrolled {
  border-bottom-color: rgba(255,255,255,.1);
  background: rgba(0,0,0,.6);
}

.nav-logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  text-decoration: none;
  color: #fff;
}
.nav-logo span { color: rgba(255,255,255,.35); font-weight: 300; }

.nav-desktop {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: rgba(255,255,255,.6);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: .01em;
  transition: color .2s;
}
.nav-link:hover { color: #fff; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  transition: border-color .2s, background .2s;
}
.nav-hamburger:hover {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.04);
}
.ham-line {
  display: block;
  width: 100%; height: 1.5px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transform-origin: center;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-hamburger.open .ham-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open .ham-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open .ham-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: rgba(0,0,0,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 1.5rem 2rem 2rem;
  flex-direction: column;
  gap: .25rem;
  z-index: 49;
}
.mobile-menu.open {
  display: flex;
  animation: menuSlideDown .2s ease both;
}
.mobile-nav-link {
  color: rgba(255,255,255,.7);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  padding: .75rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: color .2s;
}
.mobile-nav-link:hover { color: #fff; }

/* ─── Focus-visible ──────────────────────────────────────────── */
:focus { outline: none; }
:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 4px; border-radius: 6px; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .01em;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-primary:hover {
  background: #e8e8e8;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,255,255,.12);
  color: #000;
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: transparent;
  color: #fff;
  font-weight: 500;
  font-size: .9rem;
  letter-spacing: .01em;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.18);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s, background .2s, transform .2s;
}
.btn-outline:hover {
  border-color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.05);
  transform: translateY(-2px);
  color: #fff;
}

/* ─── Tag chip ───────────────────────────────────────────────── */
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.1);
  font-size: .72rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tag-chip .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6366f1;
  flex-shrink: 0;
  animation: pulseDot 2s ease-in-out infinite;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 2rem;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}
.hero-section h1 {
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.035em;
  margin-bottom: 1.5rem;
}
.hero-section .hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,.6);
  line-height: 1.75;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-label {
  font-size: .7rem;
  color: rgba(255,255,255,.25);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.scroll-track {
  width: 1px; height: 32px;
  background: rgba(255,255,255,.1);
  position: relative;
  overflow: hidden;
}
.scroll-dot {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: rgba(255,255,255,.4);
  border-radius: 1px;
  animation: scrollBounce 1.5s ease-in-out infinite;
}

/* ─── Sections shared ────────────────────────────────────────── */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8rem 2rem;
}
.section-header { margin-bottom: 4rem; }
.section-header h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.section-header p {
  margin-top: 1rem;
  font-size: 1rem;
  color: rgba(255,255,255,.55);
  max-width: 440px;
  line-height: 1.75;
  font-weight: 400;
}

/* ─── Services ───────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 1rem;
}
.service-card {
  position: relative;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 2rem;
  background: rgba(255,255,255,.02);
  backdrop-filter: blur(4px);
  transition: border-color .3s, background .3s;
  cursor: default;
}
.service-card:hover {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.035);
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: radial-gradient(300px circle at var(--mouse-x,50%) var(--mouse-y,50%), rgba(255,255,255,.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }
.service-icon {
  display: inline-flex;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  margin-bottom: 1.25rem;
}
.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .75rem;
  letter-spacing: -.01em;
}
.service-card p {
  font-size: .875rem;
  color: rgba(255,255,255,.55);
  line-height: 1.75;
  font-weight: 400;
}

/* ─── Stats ──────────────────────────────────────────────────── */
.stats-section {
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 6rem 2rem;
}
.stats-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 2rem 1rem;
}
.stat-item { text-align: center; }
.stat-value {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}
.stat-label {
  margin-top: .6rem;
  font-size: .825rem;
  color: rgba(255,255,255,.45);
  letter-spacing: .01em;
  line-height: 1.5;
}

/* ─── Process ────────────────────────────────────────────────── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 0;
}
.step-item {
  padding: 2rem 1.5rem;
  border-left: 1px solid rgba(255,255,255,.07);
}
.step-number {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.12);
  letter-spacing: -.02em;
  transition: -webkit-text-stroke-color .3s;
}
.step-item:hover .step-number { -webkit-text-stroke-color: rgba(255,255,255,.45); }
.step-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1rem 0 .5rem;
  letter-spacing: -.01em;
}
.step-item p {
  font-size: .875rem;
  color: rgba(255,255,255,.55);
  line-height: 1.75;
  font-weight: 400;
}

/* ─── CTA ────────────────────────────────────────────────────── */
.cta-section {
  position: relative;
  overflow: hidden;
  padding: 8rem 2rem;
}
.cta-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 800px 400px at 50% 50%, rgba(99,102,241,.08) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.cta-inner h2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
  margin-bottom: 1.5rem;
}
.cta-inner p {
  font-size: 1rem;
  color: rgba(255,255,255,.55);
  line-height: 1.75;
  font-weight: 400;
  max-width: 420px;
  margin: 0 auto 2.5rem;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 2.5rem 2rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.02em;
}
.footer-logo span { color: rgba(255,255,255,.35); font-weight: 300; }
.footer-copy {
  font-size: .8rem;
  color: rgba(255,255,255,.25);
}
.footer-email {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color .2s;
}
.footer-email:hover { color: #fff; }

/* ─── Arrow SVG ──────────────────────────────────────────────── */
.btn-arrow {
  display: inline-block;
  width: 16px; height: 16px;
  flex-shrink: 0;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .process-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 680px) {
  .nav-desktop { display: none !important; }
  .nav-hamburger { display: flex !important; }
}
@media (max-width: 520px) {
  .process-grid { grid-template-columns: 1fr; }
  .scroll-indicator { display: none; }
}
