/* ===================================
   Antikythera Technologies — Brand Utilities
   Reusable utility classes for the design system
   =================================== */

/* ── Glass Components ── */

.glass {
  background: var(--glass-bg-primary);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.glass:hover {
  background: var(--glass-bg-secondary);
  border-color: var(--glass-border-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.glass-light {
  background: var(--glass-bg-light);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.glass-dark {
  background: var(--glass-bg-dark);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
}

.glass-clear {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(var(--blur-xl));
  -webkit-backdrop-filter: blur(var(--blur-xl));
}

/* ── Gradient Utilities ── */

.gradient-blue-purple {
  background: linear-gradient(135deg, var(--tn-blue) 0%, var(--tn-purple) 100%);
}

.gradient-cyan-blue {
  background: linear-gradient(135deg, var(--tn-cyan) 0%, var(--tn-blue) 100%);
}

.gradient-pink-purple {
  background: linear-gradient(135deg, var(--tn-pink) 0%, var(--tn-purple) 100%);
}

.gradient-mesh {
  background:
    radial-gradient(at 20% 80%, rgba(122, 162, 247, 0.15) 0%, transparent 50%),
    radial-gradient(at 80% 20%, rgba(187, 154, 247, 0.15) 0%, transparent 50%),
    radial-gradient(at 40% 40%, rgba(125, 207, 255, 0.1) 0%, transparent 50%),
    var(--tn-bg-primary);
}

/* ── Gradient Text ── */

.text-gradient {
  background: var(--tn-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.heading-gradient {
  background: linear-gradient(135deg, var(--tn-blue) 0%, var(--tn-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.heading-gradient-cyan {
  background: linear-gradient(135deg, var(--tn-cyan) 0%, var(--tn-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.holographic {
  background: linear-gradient(
    135deg,
    #7aa2f7 0%,
    #bb9af7 25%,
    #ff8fa3 50%,
    #7dcfff 75%,
    #7aa2f7 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: holographic-shift 3s ease infinite;
  filter: brightness(1.2);
}

/* ── Glow Effects ── */

.glow-blue { box-shadow: var(--glow-blue); }
.glow-cyan { box-shadow: var(--glow-cyan); }
.glow-purple { box-shadow: var(--glow-purple); }
.glow-pink { box-shadow: var(--glow-pink); }

.glow-text {
  text-shadow:
    0 0 10px rgba(122, 162, 247, 0.8),
    0 0 20px rgba(122, 162, 247, 0.6),
    0 0 30px rgba(122, 162, 247, 0.4);
  animation: text-glow 2s ease-in-out infinite alternate;
}

.icon-glow {
  font-size: 3rem;
  text-shadow:
    0 0 10px rgba(122, 162, 247, 0.8),
    0 0 20px rgba(122, 162, 247, 0.6),
    0 0 30px rgba(122, 162, 247, 0.4);
  display: inline-block;
  filter: brightness(1.2);
  transition: all 0.3s ease;
}

/* ── Hover Effect Utilities ── */

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(122, 162, 247, 0.4);
}

.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* ── Blur Utilities ── */

.blur-sm { backdrop-filter: blur(var(--blur-sm)); }
.blur-md { backdrop-filter: blur(var(--blur-md)); }
.blur-lg { backdrop-filter: blur(var(--blur-lg)); }
.blur-xl { backdrop-filter: blur(var(--blur-xl)); }

/* ── Shadow Utilities ── */

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ── Animation Utilities ── */

.animate-fade-in {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease forwards;
}

.animate-slide-in {
  animation: slideInRight 0.8s ease forwards;
  opacity: 0;
}

.animate-slide-in-right {
  animation: slide-in-right 0.8s ease forwards;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease infinite;
}

.float-animation {
  animation: float 6s ease-in-out infinite;
}

.float-element {
  animation: float-advanced 6s ease-in-out infinite;
}

/* ── Keyframes ── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(122, 162, 247, 0.3); }
  50%      { box-shadow: 0 0 30px rgba(122, 162, 247, 0.6); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(122, 162, 247, 0.3); }
  50%      { box-shadow: 0 0 40px rgba(122, 162, 247, 0.6); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes float-advanced {
  0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
  25%      { transform: translateY(-20px) translateX(10px) rotate(2deg); }
  50%      { transform: translateY(-10px) translateX(-10px) rotate(-1deg); }
  75%      { transform: translateY(-15px) translateX(5px) rotate(1deg); }
}

@keyframes text-glow {
  from {
    text-shadow:
      0 0 10px rgba(122, 162, 247, 0.8),
      0 0 20px rgba(122, 162, 247, 0.6),
      0 0 30px rgba(122, 162, 247, 0.4);
  }
  to {
    text-shadow:
      0 0 20px rgba(187, 154, 247, 0.8),
      0 0 30px rgba(187, 154, 247, 0.6),
      0 0 40px rgba(187, 154, 247, 0.4);
  }
}

@keyframes holographic-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

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

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float-gradient {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50%      { transform: rotate(180deg) scale(1.1); }
}

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

@keyframes particle-float {
  0%   { transform: translateY(100vh) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(100px); opacity: 0; }
}

@keyframes pulse-bg {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.1); }
}

/* ── Section Badge with Animated Gears ── */

.section-header {
  text-align: left;
  margin-bottom: 3rem;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.5rem 0.5rem 3.5rem;
  background: linear-gradient(135deg, rgba(125, 207, 255, 0.08), rgba(122, 162, 247, 0.04));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-left: 3px solid;
  border-image: linear-gradient(180deg, var(--tn-cyan), var(--tn-blue), var(--tn-purple)) 1;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--tn-cyan);
  margin-bottom: 1rem;
  position: relative;
  transform: perspective(500px) rotateX(2deg);
}

/* Larger cyan gear — clockwise */
.section-badge::before {
  content: '';
  position: absolute;
  left: 0.6rem;
  top: 50%;
  width: 22px;
  height: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(125,207,255,0.25)' stroke='%237dcfff' stroke-width='1.5'%3E%3Cpath d='M12 15a3 3 0 100-6 3 3 0 000 6z'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  animation: gear-clockwise 10s linear infinite;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 6px rgba(125, 207, 255, 0.3));
}

/* Smaller copper gear — counter-clockwise */
.section-badge::after {
  content: '';
  position: absolute;
  left: 1.75rem;
  top: 50%;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(184,115,51,0.3)' stroke='%23B87333' stroke-width='1.5'%3E%3Cpath d='M12 15a3 3 0 100-6 3 3 0 000 6z'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  animation: gear-counter-clockwise 7.5s linear infinite;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 4px rgba(184, 115, 51, 0.3));
}

@keyframes gear-clockwise {
  from { transform: translateY(-50%) rotate(0deg); }
  to { transform: translateY(-50%) rotate(360deg); }
}

@keyframes gear-counter-clockwise {
  from { transform: translateY(-75%) rotate(0deg); }
  to { transform: translateY(-75%) rotate(-360deg); }
}

.section-badge:hover {
  background: linear-gradient(135deg, rgba(125, 207, 255, 0.12), rgba(122, 162, 247, 0.06));
  transform: perspective(500px) rotateX(2deg);
}

.section-badge:hover::before {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 10px rgba(125, 207, 255, 0.5));
}

.section-badge:hover::after {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 8px rgba(184, 115, 51, 0.5));
}

.section-header .section-badge {
  margin-bottom: 1rem;
}

/* ── Scrollbar Styling ── */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--tn-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--tn-blue);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tn-cyan);
}

/* ── Text Selection ── */

::selection {
  background: var(--tn-blue);
  color: var(--tn-bg-primary);
}

/* ── Accessibility ── */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
