/* ============================================================
   Clear — Glossy / Glass design system
   ------------------------------------------------------------
   Raised glossy buttons, soft-shadow cards, glass panels,
   generous whitespace, smooth micro-interactions.
   Brand: CLEAR amber (#FFC823). Light theme.
   ============================================================ */

/* ---------- keyframes ---------- */
@keyframes clear-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes clear-fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes clear-slide-up-fast {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes clear-pop-in {
  0% { opacity: 0; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes clear-shimmer {
  from { background-position: -400px 0; }
  to { background-position: 400px 0; }
}
@keyframes clear-sheen {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
@keyframes clear-float-slow {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -18px, 0); }
}

.animate-fade-in { animation: clear-fade-in 0.4s ease-out both; }
.animate-fade-in-up { animation: clear-fade-in-up 0.5s ease-out both; }
.animate-fade-in-up.delay-100 { animation-delay: 0.1s; }
.animate-slide-up-fast { animation: clear-slide-up-fast 0.32s cubic-bezier(0.16, 1, 0.3, 1) both; }
.animate-pop-in { animation: clear-pop-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ---------- primary glossy button (CLEAR amber) ---------- */
.btn-glossy {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #1c1917;
  background: linear-gradient(180deg, #ffdd55 0%, #ffc823 55%, #f0b400 100%);
  border: 1px solid #c78f00;
  border-radius: 0.75rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -2px 4px rgba(120, 80, 0, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.1),
    0 10px 22px -8px rgba(255, 200, 35, 0.65);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.btn-glossy:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -2px 4px rgba(120, 80, 0, 0.18),
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 14px 28px -8px rgba(255, 200, 35, 0.7);
}
.btn-glossy:active:not(:disabled) {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 6px rgba(120, 80, 0, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.1);
}
.btn-glossy:focus-visible {
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 0 0 3px rgba(255, 200, 35, 0.45),
    0 10px 22px -8px rgba(255, 200, 35, 0.65);
}
.btn-glossy:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: saturate(0.6);
  transform: none;
}

/* ---------- secondary glossy button (neutral) ---------- */
.btn-glossy-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #334155;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(15, 23, 42, 0.08),
    0 6px 16px -8px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.btn-glossy-secondary:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #fbbf24;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 4px rgba(15, 23, 42, 0.08),
    0 10px 22px -8px rgba(255, 200, 35, 0.45);
}
.btn-glossy-secondary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.12);
}
.btn-glossy-secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 200, 35, 0.4);
}
.btn-glossy-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ---------- danger glossy button ---------- */
.btn-glossy-danger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #b91c1c;
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 0.75rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 2px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-glossy-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 8px 18px -8px rgba(239, 68, 68, 0.5);
}
.btn-glossy-danger:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: inset 0 2px 5px rgba(127, 29, 29, 0.25);
}
.btn-glossy-danger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

/* ---------- glossy card ---------- */
.card-gloss {
  background: linear-gradient(180deg, #ffffff 0%, #fafaf9 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 14px 34px -16px rgba(15, 23, 42, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card-gloss.interactive:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 200, 35, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 2px 4px rgba(15, 23, 42, 0.06),
    0 22px 46px -16px rgba(255, 200, 35, 0.35);
}
.card-gloss.tint-amber {
  border-color: rgba(255, 200, 35, 0.5);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 200, 35, 0.09));
}

/* ---------- glass panel (nav, overlays) ---------- */
.glass {
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 12px 32px -16px rgba(15, 23, 42, 0.25);
}
.glass-card {
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 14px 36px -14px rgba(15, 23, 42, 0.28);
}

/* ---------- nav pills ---------- */
.nav-pill {
  border-radius: 9999px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}
.nav-pill:not(.active):hover {
  border-color: #fcd34d;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 3px rgba(255, 200, 35, 0.14),
    0 8px 18px -8px rgba(255, 200, 35, 0.4);
}
.nav-pill.active {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(15, 23, 42, 0.12),
    0 8px 18px -8px rgba(15, 23, 42, 0.22);
}

/* ---------- glossy input ---------- */
.input-gloss {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #d6d3d1;
  border-radius: 0.6rem;
  box-shadow:
    inset 0 1px 3px rgba(15, 23, 42, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input-gloss::placeholder { color: #a8a29e; }
.input-gloss:focus {
  outline: none;
  border-color: #ffc823;
  box-shadow:
    0 0 0 3px rgba(255, 200, 35, 0.3),
    inset 0 1px 3px rgba(15, 23, 42, 0.06);
}
.input-gloss:hover:not(:focus) {
  border-color: #fbbf24;
}

/* ---------- dashed glass dropzone ---------- */
.dropzone-gloss {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(250, 250, 249, 0.45));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px dashed #d6d3d1;
  border-radius: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 12px 32px -16px rgba(15, 23, 42, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.dropzone-gloss:hover {
  border-color: #fbbf24;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 0 6px rgba(255, 200, 35, 0.12),
    0 20px 46px -16px rgba(255, 200, 35, 0.4);
}
.dropzone-gloss.is-dragging {
  border-color: #ffc823;
  background: rgba(255, 200, 35, 0.08);
  box-shadow:
    0 0 0 6px rgba(255, 200, 35, 0.16),
    0 20px 46px -16px rgba(255, 200, 35, 0.45);
  transform: scale(1.01);
}

/* ---------- glossy progress fill (travelling sheen) ---------- */
.progress-gloss {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffdd55 0%, #ffc823 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.progress-gloss::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  animation: clear-sheen 1.6s linear infinite;
}

/* ---------- shimmer skeleton ---------- */
.skeleton-shimmer {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.06) 25%, rgba(15, 23, 42, 0.12) 50%, rgba(15, 23, 42, 0.06) 75%);
  background-size: 800px 100%;
  animation: clear-shimmer 1.4s linear infinite;
}

/* ---------- ambient page glow (fixed, behind content) ---------- */
.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient-glow::before {
  content: "";
  position: absolute;
  top: -22vmax;
  left: 50%;
  transform: translateX(-50%);
  width: 95vmax;
  height: 62vmax;
  background: radial-gradient(closest-side, rgba(255, 200, 35, 0.14), transparent 70%);
}
.ambient-glow::after {
  content: "";
  position: absolute;
  bottom: -25vmax;
  right: -12vmax;
  width: 70vmax;
  height: 55vmax;
  background: radial-gradient(closest-side, rgba(255, 200, 35, 0.07), transparent 70%);
  animation: clear-float-slow 14s ease-in-out infinite;
}

/* ---------- base polish ---------- */
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #ffffff;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection {
  background: rgba(255, 200, 35, 0.35);
}
:focus-visible {
  outline: 2px solid rgba(255, 200, 35, 0.65);
  outline-offset: 2px;
}
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
.aspect-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.aspect-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn-glossy, .btn-glossy-secondary, .btn-glossy-danger, .card-gloss,
  .input-gloss, .nav-pill {
    transition: none;
  }
  .animate-fade-in, .animate-fade-in-up, .animate-slide-up-fast,
  .animate-pop-in, .skeleton-shimmer, .progress-gloss::after,
  .ambient-glow::after {
    animation: none;
  }
}
