/*
 * EazyWeb overlay — design Awwwards-grade
 * Palette : orange #FF6B35 → #F77F00 (warm sunrise), noir 0B0B0A, crème F7F4ED
 * Type : Fraunces (display) + Inter (UI)
 * Architecture : minimal, transitions soyeuses, glassmorphism subtil
 */

/* ─── Reset overlay layer ─── */
#eazy-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  color: #F7F4ED;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#eazy-overlay.eazy-hidden { display: none; }
#eazy-overlay button { font: inherit; }

/* ───────────── Loading screen ───────────── */
.eazy-loader {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, #1a1a17 0%, #0B0B0A 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 10;
  opacity: 1;
  transition: opacity 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 800ms;
}
.eazy-loader.eazy-loader-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.eazy-loader-inner {
  text-align: center;
  max-width: 380px;
  padding: 0 24px;
  animation: eazyFadeUp 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.eazy-loader-logo {
  width: 84px;
  height: 84px;
  margin-bottom: 28px;
  filter: drop-shadow(0 8px 32px rgba(255, 107, 53, 0.35));
}
.eazy-loader-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 600;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: #F7F4ED;
}
.eazy-loader-subtitle {
  font-size: 14px;
  color: rgba(247, 244, 237, 0.6);
  margin: 0 0 32px;
  letter-spacing: 0.01em;
}
.eazy-loader-progress {
  width: 100%;
  height: 3px;
  background: rgba(247, 244, 237, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}
.eazy-loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF6B35, #F77F00);
  border-radius: 2px;
  transition: width 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.5);
}
.eazy-loader-percent {
  font-size: 11px;
  color: rgba(247, 244, 237, 0.4);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  margin: 0;
}
.eazy-loader-credit {
  position: absolute;
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: rgba(247, 244, 237, 0.5);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 200ms ease;
}
.eazy-loader-credit:hover { color: #FF6B35; }
.eazy-loader-credit strong {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: none;
  color: rgba(247, 244, 237, 0.85);
}

/* ───────────── Top bar ───────────── */
.eazy-topbar {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
  z-index: 5;
}
.eazy-topbar > * { pointer-events: auto; }

.eazy-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #F7F4ED;
  padding: 8px 14px 8px 8px;
  background: rgba(11, 11, 10, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(247, 244, 237, 0.08);
  border-radius: 100px;
  transition: all 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.eazy-brand:hover {
  background: rgba(11, 11, 10, 0.7);
  border-color: rgba(255, 107, 53, 0.3);
  transform: translateY(-1px);
}
.eazy-brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
}
.eazy-brand-text {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 24;
}

.eazy-topbar-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  pointer-events: none;
}
.eazy-topbar-title h1 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
  color: rgba(247, 244, 237, 0.95);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.eazy-topbar-title p {
  font-size: 10px;
  margin: 1px 0 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 244, 237, 0.5);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
@media (max-width: 640px) {
  .eazy-topbar-title { display: none; }
}

.eazy-topbar-actions {
  display: flex;
  gap: 6px;
}
.eazy-btn {
  border: 1px solid rgba(247, 244, 237, 0.08);
  border-radius: 12px;
  padding: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color: #F7F4ED;
}
.eazy-btn-ghost {
  background: rgba(11, 11, 10, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.eazy-btn-ghost:hover {
  background: rgba(255, 107, 53, 0.15);
  border-color: rgba(255, 107, 53, 0.4);
  color: #FF6B35;
  transform: translateY(-1px);
}
.eazy-btn-ghost:active { transform: translateY(0); }
.eazy-btn svg {
  width: 16px;
  height: 16px;
}

/* ───────────── Dialog ───────────── */
.eazy-dialog {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.eazy-dialog.eazy-hidden { display: none; }

.eazy-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 10, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: eazyFadeIn 250ms ease;
}

.eazy-dialog-panel {
  position: relative;
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: linear-gradient(180deg, #1a1a17 0%, #0F0F0D 100%);
  border: 1px solid rgba(247, 244, 237, 0.08);
  border-radius: 20px;
  padding: 32px 32px 28px;
  box-shadow:
    0 24px 96px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 107, 53, 0.05) inset;
  animation: eazyZoomIn 350ms cubic-bezier(0.16, 1, 0.3, 1);
}
@media (max-width: 480px) {
  .eazy-dialog-panel { padding: 24px 20px 22px; }
}

.eazy-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: rgba(247, 244, 237, 0.5);
  cursor: pointer;
  transition: all 200ms ease;
  font-size: 14px;
}
.eazy-dialog-close:hover {
  background: rgba(247, 244, 237, 0.06);
  color: #F7F4ED;
}

.eazy-dialog-panel h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 500;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
  color: #F7F4ED;
}

.eazy-dialog-lede {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(247, 244, 237, 0.75);
  margin: 0 0 24px;
}
.eazy-dialog-lede strong {
  color: #FF6B35;
  font-weight: 600;
}

.eazy-dialog-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 28px;
  padding: 16px;
  background: rgba(247, 244, 237, 0.03);
  border: 1px solid rgba(247, 244, 237, 0.06);
  border-radius: 14px;
}
.eazy-dialog-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.eazy-stat-num {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  color: #FF6B35;
  letter-spacing: -0.01em;
}
.eazy-stat-lbl {
  font-size: 10px;
  color: rgba(247, 244, 237, 0.5);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eazy-dialog-panel h3 {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 244, 237, 0.5);
  margin: 0 0 12px;
}

.eazy-dialog-controls {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 8px;
}
.eazy-dialog-controls li {
  font-size: 13px;
  color: rgba(247, 244, 237, 0.8);
  display: flex;
  align-items: center;
  gap: 12px;
}
.eazy-dialog-controls kbd {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-family: 'Inter', monospace;
  font-weight: 500;
  background: rgba(247, 244, 237, 0.06);
  border: 1px solid rgba(247, 244, 237, 0.1);
  border-radius: 5px;
  color: #F7F4ED;
  min-width: 60px;
  text-align: center;
  flex-shrink: 0;
}
.eazy-dialog-controls em {
  font-style: italic;
  color: rgba(255, 107, 53, 0.8);
}

.eazy-dialog-cta {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  background: linear-gradient(135deg, #FF6B35, #F77F00);
  color: #0B0B0A;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: 100px;
  transition: all 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 24px rgba(255, 107, 53, 0.25);
}
.eazy-dialog-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.4);
}

/* ───────────── Toast ───────────── */
.eazy-toast {
  position: fixed;
  bottom: max(80px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: rgba(11, 11, 10, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: #F7F4ED;
  pointer-events: auto;
  z-index: 30;
  animation: eazyToastIn 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.eazy-toast.eazy-hidden { display: none; }

/* ───────────── Animations ───────────── */
@keyframes eazyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes eazyFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes eazyZoomIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes eazyToastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.eazy-fade-in { animation: eazyFadeIn 600ms 300ms both ease; }

/* ───────────── SuperSplat branding suppression ───────────── */
/* We provide our own branding — hide SuperSplat's default link.
   The SuperSplat code only shows it in cross-origin embed anyway, but defensive hide. */
#viewerBranding {
  display: none !important;
}
