/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
   Edit these custom properties to change colors, fonts, and spacing globally
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Colors */
  --color-bg: #0a0a0a;
  --color-bg-elevated: #141414;
  --color-text: #fafafa;
  --color-text-muted: #888888;
  --color-accent: #6366f1;
  --color-accent-hover: #818cf8;
  --color-border: #222222;

  /* Typography - Dieter Rams precision */
  --font-display: 'Hanken Grotesk', 'Helvetica Neue', 'Arial', sans-serif;
  --font-sans: 'Hanken Grotesk', 'Helvetica Neue', 'Arial', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --font-weight-light: 200;
  --font-weight-regular: 300;
  --font-weight-medium: 400;

  /* Type Scale */
  --text-hero: clamp(3rem, 10vw, 5rem);
  --text-h1: clamp(2rem, 5vw, 3rem);
  --text-h2: clamp(1.5rem, 3vw, 2rem);
  --text-h3: 1.25rem;
  --text-body: 1.125rem;
  --text-small: 0.875rem;

  /* Spacing (8px base) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-12: 6rem;
  --space-16: 8rem;

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --easing: cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --container-max: 1200px;
  --radius: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--easing);
}

a:hover {
  color: var(--color-accent-hover);
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: var(--font-weight-light);
  letter-spacing: 0.03em;
  margin-bottom: var(--space-6);
  text-align: center;
}

/* Scroll-triggered animation */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--easing),
              transform var(--duration-slow) var(--easing);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--font-weight-regular);
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--easing);
  min-height: 48px;
}

.btn--primary {
  background: var(--color-accent);
  color: white;
  transition: background 3s ease, color 3s ease;
}

.btn--primary:hover {
  background: transparent;
  color: #a855f7;
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Glowing orbs - 1 revolution per minute, alternating directions */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  top: 50%;
  left: 50%;
}

.orb--1 {
  width: 350px;
  height: 350px;
  margin: -175px 0 0 -175px;
  background: #6366f1;
  animation: orbitCW 60s linear infinite, colorShift1 30s ease-in-out infinite;
}

.orb--2 {
  width: 280px;
  height: 280px;
  margin: -140px 0 0 -140px;
  background: #8b5cf6;
  animation: orbitCCW 60s linear infinite, colorShift2 25s ease-in-out infinite;
}

.orb--3 {
  width: 200px;
  height: 200px;
  margin: -100px 0 0 -100px;
  background: #06b6d4;
  animation: orbitCW2 60s linear infinite, colorShift3 35s ease-in-out infinite;
}

/* Clockwise orbit */
@keyframes orbitCW {
  0% { transform: rotate(0deg) translateX(250px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(250px) rotate(-360deg); }
}

/* Counter-clockwise orbit */
@keyframes orbitCCW {
  0% { transform: rotate(0deg) translateX(320px) rotate(0deg); }
  100% { transform: rotate(-360deg) translateX(320px) rotate(360deg); }
}

/* Clockwise orbit - different starting position */
@keyframes orbitCW2 {
  0% { transform: rotate(180deg) translateX(180px) rotate(-180deg); }
  100% { transform: rotate(540deg) translateX(180px) rotate(-540deg); }
}

/* Color shifting */
@keyframes colorShift1 {
  0%, 100% { background: #6366f1; }
  33% { background: #8b5cf6; }
  66% { background: #a855f7; }
}

@keyframes colorShift2 {
  0%, 100% { background: #8b5cf6; }
  33% { background: #06b6d4; }
  66% { background: #6366f1; }
}

@keyframes colorShift3 {
  0%, 100% { background: #06b6d4; }
  33% { background: #14b8a6; }
  66% { background: #8b5cf6; }
}

/* Orbital paths with particles - 5 balls aligning every 60s */
.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  top: 50%;
  left: 50%;
}

/* Durations: 60s, 30s, 20s, 15s, 12s - all align at 12:00 every 60 seconds */
.orbit--1 {
  width: 200px;
  height: 200px;
  margin: -100px 0 0 -100px;
  animation: rotate 12s linear infinite;
}

.orbit--2 {
  width: 320px;
  height: 320px;
  margin: -160px 0 0 -160px;
  animation: rotate 15s linear infinite;
}

.orbit--3 {
  width: 440px;
  height: 440px;
  margin: -220px 0 0 -220px;
  animation: rotate 20s linear infinite;
}

.orbit--4 {
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  animation: rotate 30s linear infinite;
}

.orbit--5 {
  width: 680px;
  height: 680px;
  margin: -340px 0 0 -340px;
  animation: rotate 60s linear infinite;
}

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

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--color-text);
  border-radius: 50%;
  top: 0;
  left: 50%;
  margin-left: -4px;
  margin-top: -4px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.orbit--1 .particle { width: 6px; height: 6px; margin-left: -3px; margin-top: -3px; }
.orbit--2 .particle { width: 7px; height: 7px; margin-left: -3.5px; margin-top: -3.5px; }
.orbit--3 .particle { width: 8px; height: 8px; margin-left: -4px; margin-top: -4px; }
.orbit--4 .particle { width: 9px; height: 9px; margin-left: -4.5px; margin-top: -4.5px; }
.orbit--5 .particle { width: 10px; height: 10px; margin-left: -5px; margin-top: -5px; }

.hero__content {
  position: relative;
  text-align: center;
  padding: var(--space-4);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--font-weight-light);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__tagline {
  font-size: var(--text-h3);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINCIPLES SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.principles {
  padding: var(--space-16) 0;
}

.principles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}

.principle-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: transform var(--duration-normal) var(--easing),
              border-color var(--duration-normal) var(--easing);
}

.principle-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-text-muted);
}

.principle-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-3);
  color: var(--color-accent);
}

.principle-card__icon svg {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.principle-card:hover .principle-card__icon svg {
  animation: iconSpin 3s linear infinite, iconColorShift 3s ease-in-out infinite;
}

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

@keyframes iconColorShift {
  0%, 100% { color: #6366f1; }
  33% { color: #8b5cf6; }
  66% { color: #06b6d4; }
}

.principle-card__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-1);
}

.principle-card__desc {
  color: var(--color-text-muted);
  font-size: var(--text-small);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INSTALL SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.install {
  padding: var(--space-16) 0;
  background: var(--color-bg-elevated);
}

.install__content {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.install__desc {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.install__command {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.install__command code {
  font-family: var(--font-mono);
  font-size: var(--text-body);
  color: var(--color-accent);
}

.install__copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--duration-fast) var(--easing),
              background var(--duration-fast) var(--easing);
}

.install__copy:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.install__copy svg {
  width: 20px;
  height: 20px;
}

.install__copy .icon-check {
  display: none;
  color: #22c55e;
}

.install__copy.copied .icon-copy {
  display: none;
}

.install__copy.copied .icon-check {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.footer {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-border);
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.footer__nav {
  display: flex;
  gap: var(--space-4);
}

.footer__nav a {
  color: var(--color-text-muted);
  font-size: var(--text-small);
}

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

.footer__copy {
  color: var(--color-text-muted);
  font-size: var(--text-small);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .hero__title {
    font-size: clamp(2rem, 10vw, 3.5rem);
    letter-spacing: 0.08em;
  }

  .orbit--4,
  .orbit--5 {
    display: none;
  }

  .principles__grid {
    grid-template-columns: 1fr;
  }

  .install__command {
    flex-direction: column;
    gap: var(--space-3);
  }
}

@media (max-width: 480px) {
  .orbit--3 {
    display: none;
  }

  .footer .container {
    text-align: center;
  }

  .footer__nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}
