/* Shared landing/auth shell */
@keyframes speara-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-fade {
  animation: speara-fade-in 260ms ease-out;
}

.landing-page {
  min-height: 100vh;
  background: #050816;
  color: #f8fbff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.landing-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  background: rgba(6, 9, 28, 0.72);
  border-bottom: 1px solid rgba(177, 195, 255, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.navbar-container {
  width: min(100%, 1280px);
  min-height: 60px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.navbar-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}

.navbar-brand-text {
  font-size: 20px;
  font-weight: 760;
  color: #f8fbff;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.navbar-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  color: rgba(235, 241, 255, 0.86);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.navbar-link:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.12);
}

.navbar-link-primary {
  color: #dce7ff;
  background: rgba(41, 73, 161, 0.35);
  border: 1px solid rgba(84, 128, 255, 0.16);
}

.auth-page .navbar-link-primary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(34, 211, 238, 0.22));
  border: 1px solid rgba(96, 165, 250, 0.42);
  color: #bfdbfe;
}

.navbar-link-primary:hover {
  transform: translateY(-1px);
  color: #ffffff;
  background: rgba(55, 92, 196, 0.44);
}

.auth-page .navbar-link-primary:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.36), rgba(34, 211, 238, 0.32));
  border-color: rgba(147, 197, 253, 0.55);
  color: #ffffff;
}

.navbar-link-active {
  color: #93c5fd !important;
  background: rgba(37, 99, 235, 0.15) !important;
  border: 1px solid rgba(37, 99, 235, 0.3) !important;
}

/* Landing page */
.landing-stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #050816;
}

.landing-view {
  position: absolute;
  inset: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.landing-background,
.landing-overlay {
  position: absolute;
  inset: 0;
}

.landing-background {
  z-index: 1;
  background-position: center;
  background-size: cover;
  transform: scale(1.01);
}

.landing-view-candidate .landing-background {
  background-image: url("/static/img/landing/candidate-hero-1920.jpg");
  background-position: center 45%;
}

.landing-view-recruiter .landing-background {
  background-image: url("/static/img/landing/recruiter-hero-1920.jpg");
  background-position: center center;
}

.landing-overlay {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(4, 7, 24, 0.58) 0%, rgba(5, 9, 31, 0.44) 36%, rgba(4, 7, 25, 0.88) 100%),
    linear-gradient(90deg, rgba(4, 7, 24, 0.78) 0%, rgba(11, 20, 61, 0.48) 43%, rgba(8, 12, 38, 0.74) 100%);
}

.landing-view::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 9, 31, 0.34) 0 33.33%, rgba(255, 255, 255, 0.03) 33.33% 66.66%, rgba(6, 9, 31, 0.26) 66.66% 100%),
    radial-gradient(circle at 50% 54%, rgba(61, 108, 255, 0.18), transparent 34%);
}

.audience-toggle-container {
  position: fixed;
  top: 90px;
  left: 50%;
  z-index: 20;
  transform: translateX(-50%);
}

.audience-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.audience-toggle-btn {
  min-width: 158px;
  min-height: 44px;
  border: 1px solid rgba(80, 125, 255, 0.44);
  border-radius: 999px;
  background: rgba(5, 12, 35, 0.28);
  color: rgba(232, 237, 255, 0.82);
  cursor: pointer;
  font-size: 16px;
  font-weight: 560;
  line-height: 1;
  padding: 12px 22px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.audience-toggle-btn:hover {
  color: #ffffff;
  border-color: rgba(123, 160, 255, 0.72);
}

.audience-toggle-btn.active {
  color: #ffffff;
  border-color: rgba(69, 124, 255, 0.82);
  background: linear-gradient(135deg, #3b82f6, #2457d6);
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.42);
}

.landing-hero-copy {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 160px 32px 190px;
  text-align: center;
}

.landing-hero-copy h1,
.landing-hero-copy h2 {
  max-width: 920px;
  margin: 0;
  color: #f7f9ff;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.12;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.landing-hero-copy h1 {
  font-size: clamp(40px, 4.4vw, 72px);
}

.landing-hero-copy h2 {
  margin-top: 26px;
  font-size: clamp(34px, 4vw, 64px);
}

.recruiter-copy {
  align-content: center;
}

.feature-strip {
  position: absolute;
  left: 50%;
  bottom: 46px;
  z-index: 12;
  width: min(100% - 96px, 1160px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateX(-50%);
}

.feature-strip li {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 16px;
  color: rgba(237, 242, 255, 0.86);
  font-size: 16px;
  font-weight: 520;
  text-align: center;
}

.feature-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(106, 151, 255, 0.42);
  border-radius: 14px;
  background: rgba(30, 55, 126, 0.42);
  box-shadow:
    0 18px 42px rgba(9, 18, 54, 0.34),
    inset 0 0 20px rgba(118, 157, 255, 0.12);
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  stroke: rgba(191, 210, 255, 0.9);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Auth pages */
.auth-page {
  display: flex;
  flex-direction: column;
}

.auth-main {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6.5rem 1.5rem 3rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 24px;
  padding: 2rem 2.25rem;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.85)
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.65);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 8px;
}

.auth-card-header p {
  font-size: 16px;
  color: #cbd5e1;
}

.auth-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 0.5rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.auth-title {
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-back-btn {
  margin-top: 0.25rem;
  display: inline-block;
  font-size: 0.9rem;
  opacity: 0.75;
  text-align: center;
  transition: opacity 0.2s ease;
  color: #cbd5e1;
  text-decoration: none;
}

.auth-back-btn:hover {
  opacity: 1;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #e2e8f0;
}

.form-group input {
  padding: 12px 16px;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.7)
  );
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  color: #f9fafb;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.6);
  background: linear-gradient(
    135deg,
    rgba(30, 64, 175, 0.2),
    rgba(15, 23, 42, 0.9)
  );
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
  font-size: 12px;
  color: #94a3b8;
}

.consent-group {
  gap: 6px;
}

.form-group .consent-label {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.form-group .consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #2563eb;
}

.form-group .consent-label a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 500;
}

.form-group .consent-label a:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

.forgot-password-link {
  font-size: 13px;
  color: #93c5fd;
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

.error-message {
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  color: #fca5a5;
  font-size: 14px;
}

.success-message {
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  color: #86efac;
  font-size: 14px;
}

.error-message.hidden,
.success-message.hidden {
  display: none;
}

.auth-form .form-group .field-error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #fca5a5;
  line-height: 1.35;
}

.auth-form .form-group .field-error.hidden {
  display: none;
}

.auth-card-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #cbd5e1;
}

.auth-card-footer a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-card-footer a:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .audience-toggle-container {
    top: 82px;
    width: min(100% - 32px, 420px);
  }

  .audience-toggle {
    width: 100%;
    gap: 10px;
  }

  .audience-toggle-btn {
    min-width: 0;
    font-size: 14px;
    padding-inline: 14px;
  }

  .landing-hero-copy {
    padding: 150px 24px 230px;
  }

  .feature-strip {
    width: min(100% - 36px, 620px);
    bottom: 28px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 14px;
  }

  .feature-strip li {
    gap: 8px;
    font-size: 13px;
  }

  .feature-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
  }

  .feature-icon svg {
    width: 25px;
    height: 25px;
  }
}

@media (max-width: 768px) {
  .landing-navbar {
    padding: 0 18px;
  }

  .navbar-container {
    gap: 12px;
    min-height: 58px;
  }

  .navbar-brand {
    gap: 8px;
  }

  .navbar-logo {
    width: 26px;
    height: 26px;
  }

  .navbar-brand-text {
    font-size: 18px;
  }

  .navbar-actions {
    gap: 6px;
  }

  .navbar-link {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 13px;
  }

  .landing-view-candidate .landing-background {
    background-image: url("/static/img/landing/candidate-hero-640.jpg");
  }

  .landing-view-recruiter .landing-background {
    background-image: url("/static/img/landing/recruiter-hero-640.jpg");
    background-position: 52% center;
  }

  .landing-view::after {
    background:
      linear-gradient(90deg, rgba(6, 9, 31, 0.38), rgba(255, 255, 255, 0.02), rgba(6, 9, 31, 0.32)),
      radial-gradient(circle at 50% 54%, rgba(61, 108, 255, 0.16), transparent 38%);
  }

  .landing-hero-copy h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .landing-hero-copy h2 {
    margin-top: 18px;
    font-size: clamp(30px, 10vw, 50px);
  }

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

  .auth-card-header h1 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .landing-navbar {
    padding-inline: 14px;
  }

  .navbar-link {
    padding-inline: 9px;
  }

  .audience-toggle-container {
    top: 78px;
  }

  .audience-toggle-btn {
    min-height: 40px;
    font-size: 13px;
  }

  .landing-hero-copy {
    padding: 142px 18px 228px;
  }

  .feature-strip {
    width: calc(100% - 24px);
    gap: 14px 8px;
  }

  .feature-strip li {
    font-size: 12px;
  }

  .feature-icon {
    width: 48px;
    height: 48px;
  }

  .feature-icon svg {
    width: 22px;
    height: 22px;
  }
}
