/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-sm);
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  isolation: isolate;
}

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

.btn-primary {
  background: var(--grad-primary);
  color: #04140c;
  box-shadow: var(--glow-accent);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(61, 220, 132, 0.4), 0 0 55px -6px rgba(61, 220, 132, 0.55);
}

.btn-ghost {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-glass-strong);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---------- Glass surface ---------- */
.glass {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--r-lg);
}

/* ---------- Icon button (social) ---------- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-full);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn:hover {
  color: var(--accent);
  border-color: rgba(61, 220, 132, 0.4);
  background: var(--accent-soft);
  transform: translateY(-3px);
}

/* ---------- Tag / chip ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(61, 220, 132, 0.5), rgba(255, 255, 255, 0) 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  pointer-events: none;
}

.card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

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

/* ---------- Section label pill on cards ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--surface-glass-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

/* ---------- Custom cursor ---------- */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: var(--z-cursor);
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(61, 220, 132, 0.5);
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: width var(--dur-fast) var(--ease-out), height var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.cursor-ring.is-active {
  width: 60px;
  height: 60px;
  border-color: var(--accent);
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ---------- Form ---------- */
.field {
  position: relative;
  margin-bottom: var(--space-5);
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field input,
.field textarea {
  width: 100%;
  padding: var(--space-4);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: var(--fs-base);
  min-height: 52px;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-faint);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: rgba(61, 220, 132, 0.04);
  outline: none;
}

.field-error {
  display: block;
  font-size: var(--fs-xs);
  color: var(--danger);
  margin-top: var(--space-2);
  min-height: 1em;
}

.form-status {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent);
  margin-top: var(--space-4);
  min-height: 1.2em;
}

/* ---------- Skeleton / lazy image ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--dur-slow) var(--ease-out);
}
