/* Mellis Flow — Fluid Precision design system */

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Atmospheric background */
.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.atmosphere::before,
.atmosphere::after {
  content: '';
  position: absolute;
  border-radius: 9999px;
  filter: blur(120px);
}

.atmosphere::before {
  top: -10%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: rgba(0, 242, 255, 0.05);
}

.atmosphere::after {
  bottom: -10%;
  right: -10%;
  width: 40%;
  height: 40%;
  background: rgba(233, 195, 73, 0.05);
}

.fluid-gradient {
  background: radial-gradient(circle at 50% 50%, rgba(0, 242, 255, 0.08) 0%, transparent 70%);
}

.luminous-bg {
  background: radial-gradient(circle at 50% -20%, rgba(0, 242, 255, 0.08) 0%, rgba(16, 19, 26, 0) 60%);
}

.text-glow {
  text-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
}

/* Glassmorphism cards */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-card--gradient {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.glow-hover {
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-hover:hover {
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.15);
  border-color: rgba(0, 242, 255, 0.3);
}

/* Buttons — DESIGN.md */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-family: Geist, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease, border-color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #00f2ff;
  color: #0b0e14;
}

.btn-primary:hover {
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
}

.btn-secondary {
  background: transparent;
  color: #e9c349;
  border: 1px solid #e9c349;
}

.btn-secondary:hover {
  box-shadow: 0 0 15px rgba(233, 195, 73, 0.35);
  background: rgba(233, 195, 73, 0.08);
}

.btn-ghost {
  background: transparent;
  color: #e1e2eb;
  border: 1px solid rgba(0, 242, 255, 0.4);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #00f2ff;
}

.btn-nav {
  padding: 0.625rem 1.5rem;
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  background: rgba(0, 242, 255, 0.1);
  border: 1px solid rgba(0, 242, 255, 0.2);
  color: #00f2ff;
  font-family: Geist, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Form inputs */
.input-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #e1e2eb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field::placeholder {
  color: #5a5f6d;
}

.input-field:focus {
  outline: none;
  border-color: #00f2ff;
  box-shadow: 0 0 0 4px rgba(0, 242, 255, 0.15);
}

/* Nav */
.site-nav {
  transition: height 0.3s ease, padding 0.3s ease;
}

.site-nav.is-scrolled {
  height: 4rem;
}

.site-nav:not(.is-scrolled) {
  height: 5rem;
}

.nav-link {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 16px;
  color: #b9cacb;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #00dbe7;
}

.nav-link.is-active {
  color: #00f2ff;
  border-bottom: 2px solid #00f2ff;
  padding-bottom: 0.25rem;
}

/* Mobile menu */
.mobile-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-panel.is-open {
  max-height: 24rem;
}

.mobile-panel[hidden] {
  display: block;
  max-height: 0;
}

.mobile-panel.is-open[hidden] {
  display: block;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: #00f2ff;
  color: #0b0e14;
  font-weight: 600;
  border-radius: 0 0 0.5rem 0;
}

.skip-link:focus {
  left: 0;
}

/* Signature motion: one scan, then the page holds. */
.instrument-hero {
  position: relative;
}

.instrument-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00f2ff 35%, #e9c349 70%, transparent);
  transform: scaleX(1);
  transform-origin: left center;
}

.instrument-card {
  position: relative;
}

.plate-caption {
  margin-top: 0.75rem;
  font-family: Geist, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b9cacb;
}

@keyframes signature-scan {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes frame-in {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: no-preference) {
  .instrument-hero::after {
    animation: signature-scan 1.15s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
  }

  .frame-in {
    animation: frame-in 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
  }

  .instrument-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00f2ff, rgba(0, 242, 255, 0.12));
    transform-origin: left center;
    animation: signature-scan 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .instrument-card:nth-child(2)::before { animation-delay: 0.12s; }
  .instrument-card:nth-child(3)::before { animation-delay: 0.24s; }
  .instrument-card:nth-child(4)::before { animation-delay: 0.36s; }
}

/* Loading shimmer for form */
@keyframes form-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.btn.is-loading {
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 242, 255, 0.3) 0%, rgba(0, 242, 255, 0.6) 50%, rgba(0, 242, 255, 0.3) 100%);
  background-size: 200% 100%;
  animation: form-shimmer 1.5s ease-in-out infinite;
}

.btn-success {
  background: #006a71 !important;
  color: #e1fdff !important;
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-feedback {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
}

.form-feedback--success {
  color: #e1fdff;
  background: rgba(0, 106, 113, 0.35);
  border-color: rgba(0, 242, 255, 0.25);
}

.form-feedback--error {
  color: #ffb4ab;
  background: rgba(186, 26, 26, 0.15);
  border-color: rgba(255, 180, 171, 0.25);
}

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