/* READYSTATE - Physical AI :: converted from Tailwind v4 @theme + custom CSS */

:root {
  --font-display: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --color-surface-bg: #fbf9f9;
  --color-surface-white: #ffffff;
  --color-surface-dim: #dbdad9;
  --color-surface-container: #efeded;
  --color-outline-variant: #d4d4d4;
  --color-accent-blue: #3b82f6;
  --color-accent-pink: #ec4899;
  --color-accent-green: #22c55e;
  --color-accent-orange: #f97316;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: #fbf9f9;
  color: #1b1c1c;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

button, [role="button"], a, input[type="submit"], input[type="button"] {
  cursor: pointer;
}

::selection {
  background: #000;
  color: #fff;
}

.font-sans { font-family: var(--font-sans); }
.font-body { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }

/* Hairlines */
.hairline-b { border-bottom: 1px solid #d4d4d4; }
.hairline-t { border-top: 1px solid #d4d4d4; }
.hairline-l { border-left: 1px solid #d4d4d4; }
.hairline-r { border-right: 1px solid #d4d4d4; }
.hairline-all { border: 1px solid #d4d4d4; }

/* Custom keyframes & effects */
@keyframes signal-pulse {
  0% { transform: scaleY(0); opacity: 0; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
  50.1% { transform: scaleY(1); opacity: 1; transform-origin: bottom; }
  100% { transform: scaleY(0); opacity: 0; transform-origin: bottom; }
}

.signal-line {
  width: 2px;
  background: linear-gradient(to bottom, transparent, #3b82f6, transparent);
  animation: signal-pulse 3s infinite ease-in-out;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.signal-dot {
  animation: pulse-dot 2s infinite;
}

/* Subtle grid backdrop for technical feel */
.tech-grid {
  background-size: 32px 32px;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

.tech-grid-dark {
  background-size: 32px 32px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

/* Intersection Observer Reveal Utility Classes */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1), transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-inner {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.active .reveal-inner {
  animation: fade-in-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sequential card hover pulse animations (Simulates reading from left to right) */
@keyframes change-card-hover-pulse {
  0% {
    border-color: #e5e5e5;
    background-color: #ffffff;
    box-shadow: 0 0 #0000;
    transform: translateY(0);
  }
  30%, 70% {
    border-color: #000000;
    background-color: #fafafa;
    box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.12), 0 8px 12px -6px rgba(0, 0, 0, 0.08);
    transform: translateY(-6px);
  }
  100% {
    border-color: #e5e5e5;
    background-color: #ffffff;
    box-shadow: 0 0 #0000;
    transform: translateY(0);
  }
}

@keyframes change-icon-pulse {
  0% { background-color: #f5f5f5; color: #262626; border-color: #e5e5e5; }
  30%, 70% { background-color: #000000; color: #ffffff; border-color: #000000; }
  100% { background-color: #f5f5f5; color: #262626; border-color: #e5e5e5; }
}

@keyframes system-card-dark-pulse {
  0% {
    border-color: #262626;
    background-color: #0a0a0a;
    box-shadow: 0 0 #0000;
    transform: translateY(0);
  }
  30%, 70% {
    border-color: #ffffff;
    background-color: #171717;
    box-shadow: 0 14px 32px -4px rgba(255, 255, 255, 0.16);
    transform: translateY(-6px);
  }
  100% {
    border-color: #262626;
    background-color: #0a0a0a;
    box-shadow: 0 0 #0000;
    transform: translateY(0);
  }
}

@keyframes system-card-light-pulse {
  0% {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(0) scale(1);
  }
  30%, 70% {
    box-shadow: 0 20px 35px -5px rgba(255, 255, 255, 0.3), 0 0 0 3px rgba(212, 212, 212, 0.6);
    transform: translateY(-6px) scale(1.03);
  }
  100% {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(0) scale(1);
  }
}

/* Ensure user mouse hover ALWAYS overrides any auto pulse animation immediately */
.card-hoverable:hover,
.card-hoverable:hover *,
.group:hover,
.group:hover * {
  animation: none !important;
}

/* HUD Scanning Laser Line */
@keyframes hud-scanline {
  0% { transform: translateY(-100%); opacity: 0; }
  15% { opacity: 0.8; }
  85% { opacity: 0.8; }
  100% { transform: translateY(260px); opacity: 0; }
}

.animate-hud-scan {
  animation: hud-scanline 3.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Vision section word-by-word typing reveal */
.vision-word {
  display: inline-block;
  opacity: 0.1;
  filter: blur(5px);
  transform: translateY(6px);
  transition: opacity 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
              filter 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.vision-word.in-view {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}

.vision-cursor {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vision-cursor.blink {
  animation: cursor-blink 0.9s ease-in-out infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* Simple fade/zoom-in utility for modals (replaces tailwindcss-animate "animate-in") */
@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-zoom-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-modal-fade { animation: modal-fade-in 0.2s ease-out; }
.animate-modal-zoom { animation: modal-zoom-in 0.2s ease-out; }
.animate-dropdown { animation: dropdown-in 0.2s ease-out; }

@keyframes bounce-y {
  0%, 100% { transform: translateY(-15%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0,0,0.2,1); }
}
.animate-bounce-custom { animation: bounce-y 1s infinite; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-inner {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    animation: none !important;
  }
  .vision-word {
    transition: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}
