/* Algis Performance — shared web design system */

:root {
  /* Colors (mirrored from iOS AppTheme) */
  --bg: #0F1724;
  --surface: #1A2435;
  --surface-2: #243042;
  --separator: #2E3D52;
  --separator-soft: rgba(255, 255, 255, 0.08);

  --text-primary: #FFFFFF;
  --text-secondary: #8CA1BA;
  --text-tertiary: #61738C;

  --teal: #00C9AA;
  --teal-mid: #0DA694;
  --teal-glow: rgba(0, 201, 170, 0.35);
  --blue: #0EA5E5;
  --amber: #F5A623;
  --red: #F25959;

  --primary-gradient: linear-gradient(90deg, #0E8DE5 0%, #00BFAB 100%);

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 20px;
  --sp-2xl: 24px;
  --sp-3xl: 32px;
  --sp-4xl: 48px;
  --sp-5xl: 64px;
  --sp-6xl: 96px;

  /* Radii */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Type */
  --font-heading: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --maxw: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.heading { font-family: var(--font-heading); letter-spacing: -0.01em; }
.muted { color: var(--text-secondary); }
.tertiary { color: var(--text-tertiary); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 14px 22px;
  border-radius: var(--r-md);
  border: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), filter 200ms var(--ease-out);
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--primary-gradient);
  box-shadow: 0 6px 20px -8px var(--teal-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -8px var(--teal-glow);
  filter: brightness(1.06);
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--separator);
  color: var(--text-primary);
}
.btn-secondary:hover { background: var(--surface-2); }

/* === Pill / status badge === */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(0, 201, 170, 0.12);
  border: 1px solid rgba(0, 201, 170, 0.3);
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* === Form fields === */
.input, .textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font: inherit;
  padding: 14px 16px;
  outline: none;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.input:focus, .textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 201, 170, 0.15);
}
.input::placeholder, .textarea::placeholder { color: var(--text-tertiary); }
.textarea { resize: vertical; min-height: 120px; }

.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* === Animated background orbs === */
.bg-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}
.bg-orbs::before,
.bg-orbs::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
.bg-orbs::before {
  width: 540px; height: 540px;
  background: radial-gradient(circle, rgba(0, 201, 170, 0.45) 0%, transparent 70%);
  top: -10%; left: -10%;
  animation: drift1 22s ease-in-out infinite;
}
.bg-orbs::after {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(14, 165, 229, 0.38) 0%, transparent 70%);
  bottom: -10%; right: -10%;
  animation: drift2 28s ease-in-out infinite;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0); }
  50%     { transform: translate(40px, 60px); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0); }
  50%     { transform: translate(-50px, -40px); }
}

/* === Reveal on load === */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 800ms var(--ease-out) forwards;
}
.reveal-1 { animation-delay: 80ms; }
.reveal-2 { animation-delay: 220ms; }
.reveal-3 { animation-delay: 360ms; }
.reveal-4 { animation-delay: 500ms; }
.reveal-5 { animation-delay: 640ms; }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* === Footer (shared) === */
.site-footer {
  text-align: center;
  padding: var(--sp-2xl);
  color: var(--text-tertiary);
  font-size: 13px;
  border-top: 1px solid var(--separator-soft);
}
.site-footer a { color: var(--text-secondary); margin: 0 var(--sp-md); }

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
}
