/* ===== CSS Variables ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --bg-dark: #0a0a0a;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --text-light: #ffffff;
  --accent: #e63946;
  --accent-dark: #c1121f;
  --accent-light: rgba(230, 57, 70, 0.15);
  --border: #e5e5e5;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Space Mono', monospace;
  --font-body: 'Outfit', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ===== Header & Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  color: var(--text);
}

.logo-spin {
  transform-origin: 20px 20px;
  animation: logoSpin 8s linear infinite;
}

@keyframes logoSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 4rem;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-pattern {
  width: 100%;
  height: 100%;
}

.pulse-circle {
  animation: pulse 4s ease-in-out infinite;
}

.pulse-circle.c2 {
  animation-delay: 2s;
}

@keyframes pulse {
  0%, 100% { r: 60; opacity: 0.3; }
  50% { r: 80; opacity: 0.1; }
}

.hero-content {
  flex: 1;
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent-light);
  border-radius: 50px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--text-light);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1rem;
}

/* Hero Visual */
.hero-visual {
  flex: 0 0 300px;
}

.mixer-animation {
  width: 100%;
  height: auto;
}

.orbit {
  transform-origin: 150px 150px;
}

.o1 { animation: orbitRotate 20s linear infinite; }
.o2 { animation: orbitRotate 15s linear infinite reverse; }
.o3 { animation: orbitRotate 10s linear infinite; }

@keyframes orbitRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.coin {
  animation: coinFloat 3s ease-in-out infinite;
}

.coin1 { transform-origin: 150px 150px; animation: coinOrbit1 8s linear infinite; }
.coin2 { transform-origin: 150px 150px; animation: coinOrbit2 6s linear infinite; }
.coin3 { transform-origin: 150px 150px; animation: coinOrbit3 10s linear infinite; }

@keyframes coinOrbit1 {
  from { transform: rotate(0deg) translateX(100px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
}

@keyframes coinOrbit2 {
  from { transform: rotate(120deg) translateX(70px) rotate(-120deg); }
  to { transform: rotate(480deg) translateX(70px) rotate(-480deg); }
}

@keyframes coinOrbit3 {
  from { transform: rotate(240deg) translateX(50px) rotate(-240deg); }
  to { transform: rotate(600deg) translateX(50px) rotate(-600deg); }
}

.core {
  animation: corePulse 2s ease-in-out infinite;
}

@keyframes corePulse {
  0%, 100% { r: 25; }
  50% { r: 28; }
}

.shuffle {
  animation: shuffleRotate 2s ease-in-out infinite;
  transform-origin: 150px 150px;
}

@keyframes shuffleRotate {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(90deg); }
  50% { transform: rotate(180deg); }
  75% { transform: rotate(270deg); }
}

/* ===== Stats Section ===== */
.stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  padding: 4rem 2rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-unit {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.stat-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== Sections ===== */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-light);
  max-width: 100%;
  padding-left: max(2rem, calc((100% - 1200px) / 2 + 2rem));
  padding-right: max(2rem, calc((100% - 1200px) / 2 + 2rem));
}

.section-light {
  background: var(--bg-alt);
  max-width: 100%;
  padding-left: max(2rem, calc((100% - 1200px) / 2 + 2rem));
  padding-right: max(2rem, calc((100% - 1200px) / 2 + 2rem));
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-dark .section-header p {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Process / How It Works ===== */
.process-flow {
  position: relative;
}

.flow-line {
  position: absolute;
  top: 40px;
  left: 10%;
  width: 80%;
  height: 2px;
  z-index: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 1;
  counter-reset: step;
}

.step {
  text-align: center;
  padding: 1.5rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 auto 1rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-light);
  background: var(--accent);
  border-radius: 50%;
}

.step-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--text);
}

.step-icon svg {
  width: 100%;
  height: 100%;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Security Grid ===== */
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.security-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.security-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.security-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.security-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
}

/* ===== Features Showcase ===== */
.features-showcase {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.feature-main {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 3rem;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.feature-visual {
  flex: 0 0 200px;
}

.feature-visual svg {
  width: 100%;
  height: auto;
}

.data-flow {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: dataFlow 3s ease-in-out infinite;
}

@keyframes dataFlow {
  0%, 100% { stroke-dashoffset: 200; }
  50% { stroke-dashoffset: 0; }
}

.feature-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-content p {
  color: var(--text-muted);
  line-height: 1.7;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-item {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.feature-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.feature-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 50px;
  margin-bottom: 1rem;
}

.feature-item h4 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.feature-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item dt {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.faq-item dd {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== CTA Section ===== */
.cta {
  position: relative;
  padding: 6rem 2rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--text-light);
  overflow: hidden;
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.cta .btn-primary {
  background: var(--text-light);
  color: var(--accent);
}

.cta .btn-primary:hover {
  background: var(--bg-alt);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.cta-bg svg {
  width: 100%;
  height: 100%;
}

.cta-circle {
  opacity: 0.2;
}

.cta-circle.c1 {
  animation: ctaFloat 6s ease-in-out infinite;
}

.cta-circle.c2 {
  animation: ctaFloat 8s ease-in-out infinite reverse;
}

@keyframes ctaFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 20px); }
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 4rem 2rem 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-nav ul {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--text-light);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero {
      flex-direction: column;
      text-align: center;
      padding-top: 10rem;
  }
  
  .hero-desc {
      margin-left: auto;
      margin-right: auto;
  }
  
  .hero-visual {
      flex: 0 0 auto;
      width: 250px;
  }
  
  .steps {
      grid-template-columns: repeat(2, 1fr);
  }
  
  .flow-line {
      display: none;
  }
  
  .security-grid {
      grid-template-columns: 1fr;
  }
  
  .feature-main {
      flex-direction: column;
      text-align: center;
  }
  
  .feature-list {
      grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
      display: none;
  }
  
  .stats {
      flex-direction: column;
      gap: 2rem;
  }
  
  .steps {
      grid-template-columns: 1fr;
  }
  
  .footer-content {
      flex-direction: column;
      gap: 2rem;
  }
  
  .footer-nav ul {
      flex-wrap: wrap;
      gap: 1rem;
  }
}

/* ===== Animations on Scroll ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}