/* ============================================
   ARTEMIS SCALE — COMPONENT STYLES
   Matches Stitch design exactly
   ============================================ */

/* ── Noise overlay ── */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  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)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Cursor glow ── */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(166,53,0,0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: left 0.1s ease, top 0.1s ease;
  will-change: left, top;
}

/* ── Glass card ── */
.glass-card {
  background: rgba(255, 255, 255, 0.40);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(166, 53, 0, 0.18);
  box-shadow: 0 2px 32px rgba(26,26,26,0.06);
}

/* ── Magnetic nav pill ── */
.magnetic-pill {
  position: absolute;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  background: rgba(255, 255, 255, 0.40);
  border: 1px solid rgba(166, 53, 0, 0.28);
  border-radius: 9999px;
  z-index: -1;
}

/* ── Reveal scroll animation ── */
.reveal-node {
  transition: all 0.55s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 0;
  transform: translateY(28px) scale(0.96);
}
.reveal-node.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.reveal-node[data-delay="1"] { transition-delay: 80ms;  }
.reveal-node[data-delay="2"] { transition-delay: 160ms; }
.reveal-node[data-delay="3"] { transition-delay: 240ms; }
.reveal-node[data-delay="4"] { transition-delay: 320ms; }

/* ── Float animation ── */
@keyframes float {
  0%, 100% { transform: translateY(0px);   }
  50%       { transform: translateY(-18px); }
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* ── Ticker scroll ── */
.ticker-scroll {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: ticker 28s linear infinite;
}
@keyframes ticker {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* ── Pipeline node dot ── */
.pipeline-node {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #a63500;
  box-shadow: 0 0 0 8px rgba(166,53,0,0.10);
  animation: pulse-node 3s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes pulse-node {
  0%, 100% { box-shadow: 0 0 0 8px rgba(166,53,0,0.10); }
  50%       { box-shadow: 0 0 0 14px rgba(166,53,0,0.05); }
}

/* ── Form inputs ── */
.form-input {
  background: rgba(255,255,255,0.40);
  border-bottom: 2px solid rgba(166,53,0,0.20);
  border-top: 0;
  border-left: 0;
  border-right: 0;
  outline: none;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 16px;
  color: #1c1b1b;
  transition: border-color 0.2s ease;
}
.form-input:focus {
  border-bottom-color: #a63500;
  box-shadow: none;
}
.form-input::placeholder {
  color: #907065;
}

/* ── Legal pages ── */
.legal-body {
  font-family: 'Hanken Grotesk', sans-serif;
  background: #fcf9f8;
  color: #1c1b1b;
}
.legal-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 140px 32px 80px;
}
.legal-container h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.legal-container .legal-date {
  font-size: 13px;
  color: #907065;
  margin-bottom: 56px;
  font-family: 'Geist', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.legal-container h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 52px;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.legal-container p {
  font-size: 16px;
  line-height: 1.75;
  color: #3d3836;
  margin-bottom: 18px;
}
.legal-container ul {
  padding-left: 24px;
  margin-bottom: 18px;
}
.legal-container ul li {
  font-size: 16px;
  line-height: 1.75;
  color: #3d3836;
  margin-bottom: 8px;
}
.legal-container a {
  color: #a63500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-divider {
  border: none;
  border-top: 1px solid rgba(166,53,0,0.12);
  margin: 48px 0;
}

/* ── Sign-in page ── */
.signin-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: #fcf9f8;
  position: relative;
  overflow: hidden;
}
.signin-card {
  width: 100%;
  max-width: 440px;
  padding: 52px 48px;
  border-radius: 28px;
  position: relative;
  z-index: 10;
}
.signin-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}
.signin-divider::before,
.signin-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(166,53,0,0.15);
}
.signin-divider span {
  font-size: 13px;
  color: #907065;
  font-family: 'Geist', monospace;
}
.btn-primary {
  width: 100%;
  background: #a63500;
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.15s ease;
  font-family: 'Hanken Grotesk', sans-serif;
}
.btn-primary:hover {
  box-shadow: 0 0 28px rgba(166,53,0,0.30);
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-ghost {
  width: 100%;
  background: transparent;
  color: #a63500;
  font-weight: 700;
  font-size: 16px;
  padding: 13px 24px;
  border-radius: 9999px;
  border: 1.5px solid rgba(166,53,0,0.35);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Hanken Grotesk', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-ghost:hover {
  background: rgba(166,53,0,0.04);
  box-shadow: 0 0 16px rgba(166,53,0,0.10);
}

/* ── Orbit animation (sign-in bg) ── */
@keyframes orbit1 {
  from { transform: rotate(0deg)   translateX(160px) rotate(0deg);   }
  to   { transform: rotate(360deg) translateX(160px) rotate(-360deg);}
}
@keyframes orbit2 {
  from { transform: rotate(120deg) translateX(220px) rotate(-120deg);  }
  to   { transform: rotate(480deg) translateX(220px) rotate(-480deg);  }
}
@keyframes orbit3 {
  from { transform: rotate(240deg) translateX(290px) rotate(-240deg);  }
  to   { transform: rotate(600deg) translateX(290px) rotate(-600deg);  }
}
@keyframes orbit4 {
  from { transform: rotate(60deg)  translateX(340px) rotate(-60deg);   }
  to   { transform: rotate(420deg) translateX(340px) rotate(-420deg);  }
}
.orbit-1 { animation: orbit1 12s linear infinite; }
.orbit-2 { animation: orbit2 18s linear infinite; }
.orbit-3 { animation: orbit3 24s linear infinite; }
.orbit-4 { animation: orbit4 30s linear infinite; }

@keyframes sphere-pulse {
  0%, 100% { box-shadow: 0 0 60px rgba(166,53,0,0.20), 0 0 120px rgba(166,53,0,0.08); }
  50%       { box-shadow: 0 0 80px rgba(166,53,0,0.30), 0 0 160px rgba(166,53,0,0.12); }
}
.sphere-glow {
  animation: sphere-pulse 4s ease-in-out infinite;
}

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
  .signin-card {
    padding: 40px 28px;
  }
  .legal-container {
    padding: 120px 20px 60px;
  }
}

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid #a63500;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .animate-float,
  .ticker-scroll,
  .orbit-1, .orbit-2, .orbit-3, .orbit-4,
  .sphere-glow,
  .pipeline-node {
    animation: none;
  }
  .reveal-node {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
