/* ══════════════════════════════════════════════════════════════════════════
   Sprint 15 — Welcome Experience & Onboarding Tips
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Overlay backdrop ───────────────────────────────────────────────────── */

.wf-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--surface-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: wf-fade-in 0.35s ease;
}

.wf-overlay--out {
  animation: wf-fade-out 0.35s ease forwards;
}

@keyframes wf-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes wf-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes wf-slide-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ── Card container ─────────────────────────────────────────────────────── */

.wf-card {
  background: var(--surface-elevated, #14181f);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 48px 52px;
  max-width: 560px;
  width: 100%;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
  position: relative;
}

.wf-card--center { text-align: center; }

.wf-animate-in { animation: wf-slide-up 0.4s cubic-bezier(.16,1,.3,1); }

/* ── Brand header ───────────────────────────────────────────────────────── */

.wf-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.wf-brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dk));
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--accent-surface);
}

.wf-brand__name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary, #f0f2f5);
}

/* ── Step dots ──────────────────────────────────────────────────────────── */

.wf-step-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 28px;
}

.wf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-default);
  transition: all .25s;
}

.wf-dot--active {
  background: var(--accent-primary);
  width: 24px;
  border-radius: 4px;
}

/* ── Typography ─────────────────────────────────────────────────────────── */

.wf-h1 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-primary, #f0f2f5);
}

.wf-h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text-primary, #f0f2f5);
}

.wf-lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted, #8b9ab0);
  margin-bottom: 28px;
}

.wf-sub {
  font-size: 14px;
  color: var(--text-muted, #8b9ab0);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ── Feature chips (screen 1) ───────────────────────────────────────────── */

.wf-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 36px;
  text-align: left;
}

.wf-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary, #c0ccd8);
}

.wf-feature svg { opacity: .7; flex-shrink: 0; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.wf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 28px;
  transition: all .18s;
  text-decoration: none;
  font-family: inherit;
}

.wf-btn--primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-surface);
  width: 100%;
  margin-top: 8px;
}

.wf-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--accent-surface); }
.wf-btn--primary:active { transform: scale(.98); }
.wf-btn--primary:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

.wf-btn--ghost {
  background: transparent;
  color: var(--text-muted, #8b9ab0);
  border: 1px solid var(--border-default);
  padding: 10px 20px;
  font-size: 14px;
}
.wf-btn--ghost:hover { background: var(--color-bg-muted); color: var(--text-primary, #f0f2f5); }

.wf-btn--lg { padding: 14px 32px; font-size: 16px; }

.wf-btn-skip {
  background: none;
  border: none;
  color: var(--text-muted, #8b9ab0);
  font-size: 13px;
  cursor: pointer;
  margin-top: 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: .7;
  font-family: inherit;
  display: block;
  width: 100%;
  text-align: center;
}
.wf-btn-skip:hover { opacity: 1; }

.wf-nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

/* ── Interest selection (screen 2) ──────────────────────────────────────── */

.wf-interests {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.wf-interest {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all .18s;
  width: 100%;
  font-family: inherit;
}

.wf-interest:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 40%, transparent);
  background: color-mix(in srgb, var(--accent-primary) 6%, transparent);
}

.wf-interest--active {
  border-color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
}

.wf-interest__icon {
  color: var(--text-muted, #8b9ab0);
  flex-shrink: 0;
  transition: color .18s;
  display: flex;
}

.wf-interest--active .wf-interest__icon { color: var(--accent-primary); }

.wf-interest__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wf-interest__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #f0f2f5);
}

.wf-interest__desc {
  font-size: 12px;
  color: var(--text-muted, #8b9ab0);
}

.wf-interest__check {
  color: var(--accent-primary);
  opacity: 0;
  transition: opacity .18s;
  display: flex;
}

.wf-interest--active .wf-interest__check { opacity: 1; }

/* ── Demo stats grid (screen 3) ─────────────────────────────────────────── */

.wf-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0 32px;
}

.wf-stat {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
}

.wf-stat__value {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.wf-stat__label {
  font-size: 11px;
  color: var(--text-muted, #8b9ab0);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Ready badge ────────────────────────────────────────────────────────── */

.wf-ready-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-primary) 25%, transparent);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wf-ready-badge--green {
  color: var(--status-success);
  background: color-mix(in srgb, var(--status-success) 12%, transparent);
  border-color: color-mix(in srgb, var(--status-success) 25%, transparent);
}

/* ── Tip preview row (screen 3 non-demo) ────────────────────────────────── */

.wf-tip-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--accent-primary) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-primary) 15%, transparent);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary, #c0ccd8);
  margin: 20px 0 28px;
  text-align: left;
}

.wf-tip-preview__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--accent-primary);
  animation: wf-pulse 2s infinite;
}

@keyframes wf-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.3); }
}

/* ══════════════════════════════════════════════════════════════════════════
   Onboarding Tip Banner (appears on Dashboard)
   ══════════════════════════════════════════════════════════════════════════ */

.wf-tip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--tip-color, var(--accent-primary));
  border-radius: 12px;
  margin-bottom: 20px;
  animation: wf-slide-up 0.35s cubic-bezier(.16,1,.3,1);
  position: relative;
}

.wf-tip--congrats {
  background: color-mix(in srgb, var(--status-warning) 4%, transparent);
  border-color: color-mix(in srgb, var(--status-warning) 15%, transparent);
  border-left-color: var(--status-warning);
}

.wf-tip__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.wf-tip__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wf-tip__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary, #f0f2f5);
}

.wf-tip__text {
  font-size: 12px;
  color: var(--text-muted, #8b9ab0);
  line-height: 1.5;
}

.wf-tip__action {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
  padding: 6px 14px;
  background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-primary) 20%, transparent);
  border-radius: 8px;
  transition: all .15s;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

.wf-tip__action--btn {
  background: none;
  border: 1px solid var(--border-default);
  color: var(--text-secondary, #c0ccd8);
}

.wf-tip__action:hover { background: color-mix(in srgb, var(--accent-primary) 18%, transparent); }

.wf-tip__close {
  background: none;
  border: none;
  color: var(--text-muted, #8b9ab0);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}

.wf-tip__close:hover {
  background: var(--color-bg-muted);
  color: var(--text-primary, #f0f2f5);
}

/* ══════════════════════════════════════════════════════════════════════════
   Responsive — Welcome modal (MOBILE-002.1)
   Breakpoints match project convention (768px tablet / 480px phone —
   see styles/pages/dashboard.css, styles/components/core-panel.css).
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Tablet (≤768px): scale the card down proportionally ────────────────── */
@media (max-width: 768px) {
  .wf-overlay { padding: 20px; }

  .wf-card {
    max-width: 460px;
    padding: 36px 32px;
  }

  .wf-stats-grid { gap: 10px; }
  .wf-features { gap: 8px; }
}

/* ── Phone (≤480px): full-screen, no fixed desktop box ───────────────────── */
@media (max-width: 480px) {
  .wf-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .wf-card {
    max-width: 100%;
    width: 100%;
    min-height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .wf-brand__logo { width: 34px; height: 34px; font-size: 17px; }
  .wf-brand__name { font-size: 19px; }

  .wf-h1 { font-size: 1.5rem; }
  .wf-h2 { font-size: 1.2rem; }
  .wf-lead, .wf-sub { font-size: 14px; }

  /* feature chips: 2-col grid can clip long labels at this width */
  .wf-features { grid-template-columns: 1fr; }

  .wf-stats-grid { gap: 8px; }
  .wf-stat { padding: 12px 8px; }
  .wf-stat__value { font-size: 20px; }

  .wf-nav { flex-wrap: wrap; gap: 10px; }
  .wf-btn--lg { padding: 13px 24px; font-size: 15px; }

  .wf-interest { padding: 12px 14px; }
}
