/* ==========================================================================
   Mafiaway Landing Page CSS
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  --bg-dark: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --bg-header: rgba(10, 10, 10, 0.85);
  --gold: #d4af37;
  --gold-dim: #b8962e;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --text-primary: #e8e4dc;
  --text-secondary: #9a9a9a;
  --text-muted: #666;
  --border-subtle: rgba(212, 175, 55, 0.12);
  --font-heading: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #e8c84a;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Sticky Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

.site-header.scrolled {
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border-subtle);
}

.header-logo {
  display: flex;
  align-items: center;
  transition: opacity 0.3s;
}

.header-logo-img {
  height: 36px;
  width: auto;
}

/* ---------- Hero Logo ---------- */
.hero-logo {
  display: none;
}

.hero-logo img {
  width: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.7));
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--gold);
}

.nav-cta {
  padding: 8px 20px;
  background: var(--gold);
  color: var(--bg-dark) !important;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: #e8c84a;
  color: var(--bg-dark) !important;
  transform: translateY(-1px);
}

/* ---------- Hamburger Menu ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mobile-menu a:hover {
  color: var(--gold);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 0 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('/images/body_hr_lr_1.jpeg') center center / cover no-repeat;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 10, 0.88) 0%,
    rgba(10, 10, 10, 0.65) 50%,
    rgba(10, 10, 10, 0.80) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: grid;
  gap: 48px;
  align-content: center;
  padding: 24px 24px 0;
}

.hero-tagline h1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-tagline h1 .accent {
  color: var(--gold);
}

.hero-tagline p {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
}

/* ---------- Login Card ---------- */
.login-card {
  background: rgba(17, 17, 17, 0.85);
  border: 1px solid var(--border-subtle);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
}

.login-card h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

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

.login-submit {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--bg-dark);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  margin-top: 6px;
}

.login-submit:hover {
  background: #e8c84a;
  transform: translateY(-1px);
}

.login-links {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 13px;
}

.login-links a {
  color: var(--text-secondary);
}

.login-links a:hover {
  color: var(--gold);
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 32px 24px;
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ---------- Features Section ---------- */
.features {
  padding: 80px 24px;
  background: var(--bg-dark);
}

.features-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.features h2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 48px;
  letter-spacing: 1px;
}

.features-grid {
  display: grid;
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 32px 28px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-dim);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.08);
}

.feature-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  white-space: nowrap;
}

.feature-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---------- Footer CTA ---------- */
.footer-cta {
  padding: 80px 24px;
  text-align: center;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
}

.footer-cta h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-cta p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 32px;
}

.cta-button {
  display: inline-block;
  padding: 16px 40px;
  background: var(--gold);
  color: var(--bg-dark);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
  animation: pulse-glow 3s ease-in-out infinite;
}

.cta-button:hover {
  background: #e8c84a;
  color: var(--bg-dark);
  transform: translateY(-2px);
  animation: none;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 20px 4px var(--gold-glow); }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 24px;
  text-align: center;
  background: var(--bg-dark);
  border-top: 1px solid var(--border-subtle);
}

.site-footer p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Focus-visible States ---------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.form-group input[type="text"]:focus-visible,
.form-group input[type="password"]:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.login-submit:focus-visible {
  outline-offset: 3px;
}

.nav-cta:focus-visible,
.cta-button:focus-visible {
  outline-offset: 3px;
}

.hamburger:focus-visible {
  outline-offset: 4px;
}

/* ---------- Fade-in Animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .feature-card {
    transition: none;
  }

  .cta-button {
    animation: none;
  }

  .site-header {
    transition: none;
  }

  .header-logo {
    transition: none;
  }

  .hamburger span {
    transition: none;
  }
}

/* ---------- Responsive: Mobile (base) ---------- */
.hero-inner {
  grid-template-columns: 1fr;
}

.login-card {
  max-width: 100%;
}

.features-grid {
  grid-template-columns: 1fr;
}

/* ---------- Responsive: Tablet (768px+) ---------- */
@media (min-width: 768px) {
  .site-header {
    padding: 0 40px;
  }

  .hero-inner {
    padding: 24px 40px 0;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-inner {
    gap: 80px;
  }
}

/* ---------- Responsive: Desktop (1024px+) ---------- */
@media (min-width: 1024px) {
  .hamburger {
    display: none !important;
  }

  .header-nav {
    display: flex !important;
  }

  /* Desktop: big logo in hero, header logo hidden until scroll */
  .header-logo {
    opacity: 0;
    pointer-events: none;
  }

  .site-header.logo-visible .header-logo {
    opacity: 1;
    pointer-events: auto;
  }

  .hero-logo {
    display: block;
    position: absolute;
    top: 14px;
    left: 40px;
    z-index: 2;
  }

  .hero-logo img {
    height: 100px;
  }

  .hero-inner {
    grid-template-columns: 1fr 400px;
    align-items: center;
    gap: 64px;
    padding: 24px 40px 0;
  }

  .login-card {
    max-width: 400px;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Responsive: Small mobile (max 767px) ---------- */
@media (max-width: 767px) {
  .header-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 0 0 24px;
  }

  .hero-inner {
    padding: 72px 20px 0;
    gap: 24px;
  }

  .hero-tagline h1 {
    margin-bottom: 10px;
  }

  .hero-tagline p {
    font-size: 15px;
    line-height: 1.5;
  }

  .login-card {
    padding: 20px;
  }

  .login-card h2 {
    margin-bottom: 16px;
    font-size: 18px;
  }

  .form-group {
    margin-bottom: 12px;
  }

  .form-group input[type="text"],
  .form-group input[type="password"] {
    padding: 10px 12px;
  }

  .login-submit {
    padding: 12px;
    margin-top: 4px;
  }

  .login-links {
    margin-top: 12px;
  }

  .stats-inner {
    gap: 32px;
  }

  .stat-value {
    font-size: 26px;
  }

  .features {
    padding: 48px 20px;
  }

  .footer-cta {
    padding: 48px 20px;
  }
}

/* ==========================================================================
   Auth Pages (Signup, Password Recovery)
   ========================================================================== */

/* ---------- Auth Page Layout ---------- */
.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  overflow: hidden;
}

.auth-card {
  position: relative;
  z-index: 1;
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid var(--border-subtle);
  padding: 40px 36px;
  width: 100%;
  max-width: 480px;
}

.auth-card h1 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.auth-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.auth-link-btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

/* ---------- Alerts ---------- */
.alert {
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.alert-error {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

/* ---------- Email Input (extends existing form-group styles) ---------- */
.form-group input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="email"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-group input[type="email"]::placeholder {
  color: var(--text-muted);
}

.form-group input[type="email"]:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ---------- Form Hints ---------- */
.form-hint {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  min-height: 18px;
  color: var(--text-muted);
}

.form-hint.hint-ok {
  color: #86efac;
}

.form-hint.hint-error {
  color: #fca5a5;
}

/* ---------- Form Check (Checkbox) ---------- */
.form-check {
  margin: 20px 0;
}

.form-check label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--gold);
  flex-shrink: 0;
}

/* ---------- Form Divider ---------- */
.form-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 16px 0;
  position: relative;
}

.form-divider::before,
.form-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 20px);
  height: 1px;
  background: var(--border-subtle);
}

.form-divider::before {
  left: 0;
}

.form-divider::after {
  right: 0;
}

/* ---------- Misc ---------- */
.label-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

/* ---------- Auth Responsive: Small mobile ---------- */
@media (max-width: 767px) {
  .auth-page {
    padding: 80px 16px 32px;
  }

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

  .auth-card h1 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .form-group input[type="email"] {
    padding: 10px 12px;
  }
}

/* ==========================================================================
   Signup Page Enhancements
   ========================================================================== */

/* ---------- Password Toggle ---------- */
.password-wrapper {
  position: relative;
  width: 100%;
}

.form-group .password-wrapper input[type="password"],
.form-group .password-wrapper input[type="text"] {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
}

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

.password-toggle:focus-visible {
  outline: none;
  color: var(--gold);
}

/* ---------- Password Strength Meter ---------- */
.strength-meter {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 6px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  transition: width 0.3s, background 0.3s;
}

.strength-bar.strength-weak {
  background: #ef4444;
}

.strength-bar.strength-medium {
  background: #f59e0b;
}

.strength-bar.strength-strong {
  background: #22c55e;
}

/* ---------- Hint Warning Color ---------- */
.form-hint.hint-warn {
  color: #fbbf24;
}

/* ---------- Email Suggestion ---------- */
.email-suggestion {
  color: var(--gold) !important;
}

.email-suggestion .suggest-link {
  color: var(--gold);
  text-decoration: underline;
  font-weight: 500;
}

.email-suggestion .suggest-link:hover {
  color: #e8c84a;
}

/* ---------- Referral Toggle ---------- */
.referral-toggle {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  transition: color 0.2s;
}

.referral-toggle:hover {
  color: var(--gold);
}

/* ---------- Submit Loading State ---------- */
.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.login-submit:disabled:hover {
  background: var(--gold);
  transform: none;
}

.btn-loader {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(10, 10, 10, 0.3);
  border-top-color: var(--bg-dark);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Signup Two-Column Layout ---------- */
.signup-layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  width: 100%;
  max-width: 960px;
  padding: 0 24px;
}

.signup-layout .auth-card {
  width: 100%;
  max-width: 480px;
}

.signup-usps {
  display: none;
}

.signup-usps h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.signup-usps-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

.usp-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.usp-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.usp-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.usp-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.usp-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

@media (min-width: 1024px) {
  .signup-usps {
    display: block;
    flex: 1;
    max-width: 400px;
  }

  .signup-layout .auth-card {
    flex-shrink: 0;
    max-width: 440px;
    width: 440px;
  }
}
