/* =====================================================================
 * landing-auth.css  —  DesignCV Landing Page + Auth
 * ---------------------------------------------------------------------
 * Split layout: branding à gauche, auth card à droite.
 * Dark theme, glassmorphism, premium feel.
 * ===================================================================== */

/* --- Reset & Base --------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #4F46E5;
  --primary-light: #818CF8;
  --primary-dark: #3730A3;
  --bg-dark: #0B0F1A;
  --bg-card: rgba(15, 23, 42, 0.65);
  --border-card: rgba(148, 163, 184, 0.12);
  --text: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --surface: #1E293B;
  --danger: #EF4444;
  --success: #22C55E;
  --warning: #F59E0B;
}

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  overflow: hidden;
}

/* --- Animated Background --------------------------------------------- */
.landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.landing-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 70, 229, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 70, 229, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 70%);
}

.landing-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.landing-glow--1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -15%;
  left: -10%;
  animation: glow-drift 12s ease-in-out infinite alternate;
}

.landing-glow--2 {
  width: 400px;
  height: 400px;
  background: #7C3AED;
  bottom: -15%;
  right: -10%;
  animation: glow-drift 12s ease-in-out infinite alternate-reverse;
}

@keyframes glow-drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.15); }
}

/* --- Container (Split Layout) --------------------------------------- */
.landing-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  height: 100vh;
  padding: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

/* --- Branding (Left) ------------------------------------------------ */
.landing-brand {
  flex: 1;
  max-width: 440px;
}

.brand-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.brand-title span {
  color: var(--primary-light);
}

.brand-tagline {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  flex-shrink: 0;
}

/* --- Auth Card (Right) ---------------------------------------------- */
.auth-card-wrapper {
  width: 420px;
  flex-shrink: 0;
}

.auth-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow:
    0 0 0 1px rgba(79, 70, 229, 0.06),
    0 25px 60px -12px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.auth-logo span {
  color: var(--primary-light);
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* --- Form ----------------------------------------------------------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
  color: var(--text-muted);
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Password field */
.password-wrapper {
  position: relative;
}

.auth-input--password {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.password-toggle:hover {
  color: var(--text-secondary);
}

/* Password meter — simple, non-restrictive */
.password-meter {
  height: 3px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}

.password-meter-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.3s ease, background 0.3s ease;
  background: var(--text-muted);
}

.password-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  min-height: 16px;
  line-height: 16px;
  margin-top: 2px;
}

/* Name field animation */
.auth-field--hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin 0.35s ease, padding 0.35s ease;
}

.auth-field--hidden.auth-field--visible {
  max-height: 80px;
  opacity: 1;
  margin: 0;
  padding: 0;
}

/* --- Messages -------------------------------------------------------- */
.auth-message {
  display: none;
  font-size: 0.82rem;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.4;
  margin: -4px 0;
}

.auth-message--error {
  color: #FCA5A5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-message--success {
  color: #86EFAC;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* --- Submit Button -------------------------------------------------- */
.auth-submit {
  margin-top: 4px;
  width: 100%;
  padding: 13px 24px;
  background: var(--primary);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
  min-height: 46px;
}

.auth-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(79, 70, 229, 0.4);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-submit-loader {
  display: flex;
  align-items: center;
}

/* Submit row (button + forgot) */
.auth-submit-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-forgot {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 0;
  text-align: center;
  transition: color 0.15s ease;
}

.auth-forgot:hover {
  color: var(--text-secondary);
}

/* --- Divider -------------------------------------------------------- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.12);
}

.auth-divider span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Google Button -------------------------------------------------- */
.auth-social {
  width: 100%;
  padding: 11px 20px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-social:hover {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.25);
}

/* --- Toggle --------------------------------------------------------- */
.auth-toggle {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 20px;
}

.auth-toggle-link {
  background: none;
  border: none;
  color: var(--primary-light);
  font-weight: 600;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.auth-toggle-link:hover {
  color: #A5B4FC;
  text-decoration: underline;
}

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 860px) {
  .landing-container {
    flex-direction: column;
    gap: 32px;
    padding: 24px 20px;
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
  }

  .landing-brand {
    max-width: 100%;
    text-align: center;
  }

  .brand-title {
    font-size: 2.4rem;
  }

  .brand-tagline {
    margin-bottom: 24px;
  }

  .brand-features {
    display: none;
  }

  .auth-card-wrapper {
    width: 100%;
    max-width: 400px;
  }

  .auth-card {
    padding: 28px 24px 24px;
  }
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 2rem;
  }

  .brand-badge {
    font-size: 0.65rem;
  }

  .auth-card {
    border-radius: 16px;
    padding: 24px 20px 20px;
  }
}

/* --- Reduced Motion ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* deploy trigger */
