/* ============================================================
   SILVER KEY REALTY — NAVIGATION
   Fixed nav, frosted glass on scroll, mobile toggle
   ============================================================ */

nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: var(--z-nav);
  padding: 20px var(--padding-desktop);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--duration-slow) var(--ease-out);
}

nav.scrolled {
  background: rgba(253, 252, 250, 0.94);
  backdrop-filter: blur(var(--blur-nav));
  -webkit-backdrop-filter: blur(var(--blur-nav));
  padding: 14px var(--padding-desktop);
  border-bottom: 1px solid rgba(201, 185, 154, 0.12);
  box-shadow: 0 4px 40px var(--skr-green-ghost);
}

/* ── LOGO ── */
.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 90px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px var(--skr-green-ghost));
  transition: all 0.4s;
}

nav.scrolled .nav-logo img {
  height: 60px;
}

.nav-logo:hover img {
  filter: drop-shadow(0 0 20px rgba(46, 125, 82, 0.12));
}

/* ── LINKS ── */
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--warm-gray);
  transition: color 0.4s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--skr-green);
  opacity: 0.5;
  transition: width 0.4s var(--ease-out);
}

.nav-links a:hover {
  color: var(--charcoal);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ── CTA BUTTON ── */
.nav-cta {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--white);
  background: var(--charcoal);
  padding: 12px 28px;
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
}

.nav-cta::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: var(--skr-green);
  opacity: 0;
  transition: opacity 0.4s;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 10, 10, 0.12), 0 4px 12px var(--skr-green-shadow);
}

.nav-cta:hover::after {
  opacity: 0.6;
}

/* ── MOBILE TOGGLE ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  position: relative;
  background: none;
  border: none;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: rgba(58,148,100,0.15);
  }
  .nav-links, .desktop-only {
    display: none !important;
  }
}

.nav-toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--charcoal);
  transition: all 0.3s;
  display: block;
}

/* ── HAMBURGER → X ANIMATION ── */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ── MOBILE MENU OVERLAY ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111;
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 80px 32px 32px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

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

/* Desktop: NEVER show mobile menu */
@media (min-width: 769px) {
  .mobile-menu,
  .mobile-menu.open {
    display: none !important;
  }
}

/* ALL mobile menu child styles — ONLY apply on mobile */
@media (max-width: 768px) {
  .mobile-menu-content {
    width: 100%;
    padding: 100px 32px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }

  .mobile-menu-brand { margin-bottom: 48px; }

  .mobile-menu-logo {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 300;
    color: var(--champagne);
    letter-spacing: 4px;
    margin-bottom: 8px;
  }

  .mobile-menu-tagline {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #5A5550;
  }

  .mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    text-decoration: none;
    transition: all 0.2s;
  }

  .mobile-menu-link:active {
    background: rgba(58,148,100,0.05);
    margin: 0 -32px;
    padding: 20px 32px;
  }

  .mobile-menu-number {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--skr-green-light);
    min-width: 28px;
  }

  .mobile-menu-label {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 400;
    color: var(--cream);
  }

  .mobile-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 32px 0;
  }

  .mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto;
  }

  .mobile-menu-cta {
    display: block;
    text-align: center;
    padding: 16px 24px;
    background: var(--skr-green);
    color: #fff;
    text-decoration: none;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: background 0.2s;
  }

  .mobile-menu-cta:active {
    background: var(--skr-green-dark, #2E7D52);
  }

  .mobile-menu-footer { margin-top: 32px; text-align: center; }

  .mobile-menu-footer-text {
    font-family: var(--sans);
    font-size: 10px;
    color: #3A3530;
    letter-spacing: 1px;
  }

  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}

/* ── NAV LOGIN BUTTON ── */
.nav-login-btn {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream) !important;
  padding: 10px 24px !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  text-decoration: none !important;
  transition: all 0.3s;
  cursor: pointer;
}

.nav-login-btn:hover {
  background: rgba(58,148,100,0.1);
  border-color: rgba(58,148,100,0.3) !important;
  color: var(--skr-green-light) !important;
}

.nav-login-btn::after {
  display: none !important;
}

/* ============================================================
   LOGIN MODAL
   ============================================================ */
.login-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-modal.open {
  display: flex;
}

.login-modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.login-modal-card {
  position: relative;
  background: #1A1A1A;
  border: 1px solid rgba(255,255,255,0.06);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 36px;
  z-index: 1;
}

.login-modal-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  color: #5A5550;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}
.login-modal-close:hover { color: var(--cream); }

.login-modal-brand {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--champagne);
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 24px;
}

.login-modal-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--cream);
  text-align: center;
  margin-bottom: 8px;
}

.login-modal-subtitle {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 300;
  color: var(--silver);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
}

.login-roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.login-role {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.login-role:hover {
  background: rgba(58,148,100,0.06);
  border-color: rgba(58,148,100,0.2);
}

.login-role-icon { font-size: 24px; line-height: 1; }
.login-role-name { font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--cream); }
.login-role-desc { font-family: var(--sans); font-size: 11px; font-weight: 300; color: #5A5550; }

.login-role-employee {
  background: rgba(255,255,255,0.01);
  border-color: rgba(255,255,255,0.04);
}
.login-role-employee:hover {
  background: rgba(201,185,154,0.06);
  border-color: rgba(201,185,154,0.2);
}

.login-step { display: none; }
.login-step.active { display: block; }

.login-back {
  background: none;
  border: none;
  color: var(--skr-green-light);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
}

.login-auth-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: #2F2F2F;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all 0.15s;
}
.login-auth-btn:hover {
  background: #383838;
  border-color: rgba(255,255,255,0.12);
}
.login-auth-btn span {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--cream);
}

.login-auth-divider {
  text-align: center;
  position: relative;
  margin: 8px 0;
}
.login-auth-divider::before,
.login-auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: rgba(255,255,255,0.06);
}
.login-auth-divider::before { left: 0; }
.login-auth-divider::after { right: 0; }
.login-auth-divider span {
  font-family: var(--sans);
  font-size: 11px;
  color: #5A5550;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #1A1A1A;
  padding: 0 12px;
}

.login-input {
  width: 100%;
  padding: 14px;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  outline: none;
  margin-bottom: 12px;
}
.login-input:focus { border-color: rgba(58,148,100,0.4); }

.login-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--skr-green);
  border: none;
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.login-submit-btn:hover { background: #2E7D52; }

.login-email-form { margin-top: 16px; }
.login-email-note {
  font-family: var(--sans);
  font-size: 11px;
  color: #5A5550;
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

.login-auth-footer {
  font-family: var(--sans);
  font-size: 10px;
  color: #3A3530;
  text-align: center;
  margin-top: 24px;
}

body.modal-open { overflow: hidden; }

@media (max-width: 768px) {
  .login-modal-card {
    padding: 32px 24px;
    max-height: 95vh;
  }
  .login-roles {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .login-role {
    flex-direction: row;
    justify-content: flex-start;
    gap: 16px;
    padding: 16px 20px;
    text-align: left;
  }
}
