/* ═══════════════════════════════════════════
   MITRAS — UI Components
   ═══════════════════════════════════════════ */

/* Grain texture */
.grain::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Typography utilities */
.text-gold {
  background: linear-gradient(135deg, var(--gold-100), var(--gold-200) 45%, var(--gold-300) 80%, var(--gold-100));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-200);
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold-200);
  opacity: 0.5;
}

/* Glass card */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.glass:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
}

.glass--lift:hover {
  transform: translateY(-6px);
  box-shadow:
    0 24px 48px -12px var(--glow),
    0 0 0 1px rgba(250,204,21,0.08),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Hero title glow */
.hero-glow {
  text-shadow: 0 0 60px rgba(250,204,21,0.15), 0 0 120px rgba(250,204,21,0.05);
}

/* 404 error code */
.error-code {
  background: linear-gradient(180deg, #fff 0%, rgba(250,204,21,0.4) 50%, rgba(250,204,21,0.1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: errorPulse 4s ease-in-out infinite;
}

@keyframes errorPulse {
  0%, 100% { opacity: 0.85; filter: blur(0); }
  50% { opacity: 1; filter: blur(0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.35s var(--ease);
  text-decoration: none;
  border: none;
}

.btn--gold {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-200), var(--gold-100));
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(250, 204, 21, 0.2);
}

.btn--gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: btnShine 4s ease-in-out infinite;
}

@keyframes btnShine {
  0%, 80% { left: -100%; }
  100% { left: 150%; }
}

.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(250, 204, 21, 0.35);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--gold-200);
}

.btn--ghost:hover {
  background: rgba(250, 204, 21, 0.06);
  border-color: var(--gold-200);
}

.btn--full { width: 100%; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}

.header.is-scrolled {
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

/* Vault card */
.vault-card {
  position: relative;
  overflow: hidden;
}

.vault-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-200), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.vault-card:hover::before { opacity: 1; }

.vault-card__visual {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(250,204,21,0.05) 0%, transparent 50%, rgba(250,204,21,0.02) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.vault-card__visual i {
  font-size: 2.5rem;
  color: rgba(250, 204, 21, 0.15);
  transition: color 0.4s, transform 0.4s var(--ease);
}

.vault-card:hover .vault-card__visual i {
  color: rgba(250, 204, 21, 0.35);
  transform: scale(1.1);
}

.vault-card__price {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
}

.vault-card__tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 100px;
  color: var(--text-muted);
}

/* Step card */
.step-card {
  position: relative;
  padding: 1.75rem;
  border-left: 2px solid var(--border-hover);
}

.step-card__num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold-200);
  margin-bottom: 0.5rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1.25rem;
  transform: translateY(100%);
  transition: transform 0.5s var(--ease);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

/* Focus states */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold-200);
  outline-offset: 3px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(250,204,21,0.25); border-radius: 3px; }

::selection {
  background: rgba(250, 204, 21, 0.25);
  color: var(--text);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}