/* ── Landing & Login ── */

/* ── Cursor glow ── */
.cursor-glow {
  position: fixed;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: none;
  will-change: transform;
}

/* ── Ambient orbs ── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.22) 0%, transparent 70%);
  top: -100px; left: -100px;
  animation: float1 18s ease-in-out infinite;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.18) 0%, transparent 70%);
  bottom: -80px; right: 0;
  animation: float2 22s ease-in-out infinite;
}
.orb.small { width: 300px; height: 300px; }

/* ── Sweep line ── */
.sweep-line {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 100;
  pointer-events: none;
}

/* ── Particle canvas ── */
#particleCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ── Navbar ── */
.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  opacity: 0;
  backdrop-filter: blur(12px);
  background: rgba(10, 13, 20, 0.6);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--indigo);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.logo-mark.sm { width: 26px; height: 26px; font-size: 10px; }
.logo-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--t);
}
.nav-link:hover { color: var(--text); }
.nav-cta {
  padding: 8px 20px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t), border-color var(--t);
}
.nav-cta:hover { background: var(--surface3); border-color: var(--border-h); }

/* ── Hero ── */
#view-landing {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
}
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 48px 80px;
}
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(251,191,36,0.3);
  background: rgba(251,191,36,0.06);
  color: var(--gold);
  font-size: 13px;
  font-weight: 500;
  width: fit-content;
  opacity: 0;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-ring 1.5s ease-out infinite;
}

/* Word-by-word reveal */
.hero-headline {
  font-family: var(--font-d);
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 900;
  line-height: 1.22;
  color: var(--text);
  letter-spacing: 0;
  opacity: 0;
}
.word-wrap {
  display: inline-block;
  overflow: hidden;
  line-height: 1.22;
  margin-right: 0.18em;
  vertical-align: bottom;
}
.word {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
}
.highlight-white { color: #fff; }
.highlight-gold   { color: var(--gold); }
.highlight-indigo { color: var(--indigo-h); }

.hero-sub {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 440px;
  opacity: 0;
}
.hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

/* ── CTA Buttons ── */
.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  background: var(--indigo);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--t), box-shadow var(--t), transform 0.15s var(--ease);
  text-decoration: none;
  letter-spacing: -0.2px;
}
.btn-primary:hover {
  background: var(--indigo-h);
  box-shadow: 0 0 32px rgba(99,102,241,0.4);
}
.btn-primary.large {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: 12px;
}
.btn-primary.full { width: 100%; justify-content: center; padding: 13px; font-size: 15px; border-radius: 10px; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--border-h); color: var(--text); }
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--rose);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--t);
}
.btn-danger:hover { background: var(--rose-d); }

/* ── Floating Dashboard Card ── */
.hero-right {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  opacity: 0;
}
.floating-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  transform-style: preserve-3d;
  will-change: transform;
}
.fc-glow {
  position: absolute;
  inset: -20px;
  border-radius: 28px;
  background: radial-gradient(circle at 50% 50%, rgba(99,102,241,0.25), transparent 70%);
  filter: blur(20px);
  z-index: 0;
}
.fc-inner {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-h), inset 0 1px 0 rgba(255,255,255,0.05);
}
.fc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.fc-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.fc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.fc-dot.green { background: var(--emerald); }
.fc-dot.red   { background: var(--rose); }
.fc-dot.amber { background: var(--amber); }
.fc-year { font-size: 12px; color: var(--text-dim); }
.fc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.fc-stat {
  background: var(--surface2);
  border-radius: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  transform: translateZ(10px);
}
.fc-stat-label { font-size: 10px; color: var(--text-dim); margin-bottom: 4px; font-weight: 500; }
.fc-stat-value { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.fc-stat-value.green  { color: var(--emerald); }
.fc-stat-value.indigo { color: var(--indigo-h); }
.fc-chart { margin-bottom: 12px; transform: translateZ(4px); }
.fc-areas {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  transform: translateZ(6px);
}
.fc-area-badge {
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  opacity: 0.85;
}
.fc-insight {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 10px;
  font-size: 12px;
  color: var(--indigo-h);
  transform: translateZ(8px);
}
.fc-insight-icon { font-size: 14px; flex-shrink: 0; }

/* ── Feature cards ── */
.features-section {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 48px;
}
.features-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--indigo);
  margin-bottom: 32px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  opacity: 0;
  transform: translateY(32px);
  transition: border-color var(--t), box-shadow var(--t);
}
.feature-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.feature-icon {
  width: 44px; height: 44px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── Bottom CTA ── */
.bottom-cta {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 100px 48px;
  overflow: hidden;
}
.bottom-orb {
  position: absolute;
  width: 600px; height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.2), transparent 65%);
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.bottom-eyebrow {
  font-size: 13px;
  font-weight: 500;
  color: var(--indigo-h);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.bottom-headline {
  font-family: var(--font-d);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 36px;
}
.landing-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

/* ── Magnetic button JS wrapper ── */
.magnetic-wrap {
  display: inline-block;
}

/* ── Login ── */
#view-login.active {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.login-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 24px;
}
.login-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t);
  padding: 0;
}
.login-back:hover { color: var(--text); }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-h);
}
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.login-logo .logo-mark {
  width: 48px; height: 48px;
  font-size: 17px;
  border-radius: 14px;
}
.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}
.login-sub {
  font-size: 14px;
  color: var(--text-2);
  text-align: center;
  margin-bottom: 28px;
}
.login-error {
  background: rgba(244,63,94,0.1);
  border: 1px solid rgba(244,63,94,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--rose);
  margin-bottom: 16px;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.form-input {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
  width: 100%;
}
.form-input:focus {
  border-color: var(--border-s);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.form-input::placeholder { color: var(--text-dim); }
.form-input option { background: var(--surface2); color: var(--text); }
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 40px; }
.pwd-toggle {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  transition: color var(--t);
}
.pwd-toggle:hover { color: var(--text-2); }
.google-wrap { margin-top: 16px; }
.google-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), transform var(--t);
}
.google-signin-btn:hover {
  background: var(--surface3, var(--surface));
  border-color: var(--border-h);
  transform: translateY(-1px);
}
.google-signin-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.link-btn {
  background: none;
  border: none;
  color: var(--indigo);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: color var(--t);
}
.link-btn:hover { color: var(--indigo-h); text-decoration: underline; }
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span { font-size: 12px; color: var(--text-dim); }
.required-star { color: var(--rose); }
.login-hint {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.hint-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
code {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--indigo-h);
}

/* ── Spinner ── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-h);
  font-size: 14px;
  color: var(--text);
  pointer-events: all;
  animation: slideIn 0.25s var(--ease);
  max-width: 320px;
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error   { border-color: rgba(244,63,94,0.4); }
.toast-icon { font-size: 16px; flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 90px 24px 60px; gap: 40px; }
  .hero-right { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-nav { padding: 16px 24px; }
  .nav-links .nav-link { display: none; }
  .features-section, .bottom-cta { padding: 60px 24px; }
}
@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero-headline { font-size: 36px; }
}
