/* =====================================================
   HANDLEFAME.COM — Brand + Component Overrides
   ===================================================== */

/* ===== LOGO BRANDING ===== */
.hf-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
}

.hf-logo-icon {
  border-radius: 8px;
  flex-shrink: 0;
}

.hf-brand {
  font-size: 1.35rem;
  color: #111;
  letter-spacing: -0.02em;
}

.hf-accent {
  color: var(--terminal-green);
}

/* Footer logo override */
.footer .hf-brand { color: #fff; }
.footer .hf-logo-icon rect { fill: #10b981; }

/* ===== MEGA MENU — FIXED HOVER TRIGGER ===== */
.mega-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mega-menu-wrap > a {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.mega-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 860px;
  max-width: 95vw;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px 32px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 9999;
  box-shadow: 0 24px 70px rgba(0,0,0,0.13);
}

.mega-menu-wrap:hover .mega-dropdown,
.mega-dropdown:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* Bridge gap between trigger and dropdown */
.mega-menu-wrap::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.mega-col h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--terminal-green);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f3f4f6;
}

.mega-col a {
  display: block;
  padding: 5px 0;
  font-size: 0.8125rem;
  color: #374151;
  font-weight: 500;
  transition: color 0.15s ease, padding-left 0.15s ease;
  border-radius: 4px;
}
.mega-col a:hover {
  color: var(--terminal-green);
  padding-left: 4px;
}

/* ===== PRICING TABLE FEATURES ===== */
.pricing-features {
  list-style: none;
  margin: 12px 0 16px;
  padding: 0;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: #374151;
  padding: 4px 0;
  border-bottom: 1px solid #f3f4f6;
}
.pricing-features li:last-child { border-bottom: none; }

.pricing-features li svg {
  color: var(--terminal-green);
  flex-shrink: 0;
}

/* Pricing card order button */
.pricing-card .btn-primary,
.pricing-card button.btn-primary {
  margin-top: 4px;
}

/* ===== AGED PRICING PANEL ===== */
.aged-panel {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.aged-panel.active {
  display: grid;
}

@media (max-width: 900px) {
  .aged-panel.active {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .aged-panel.active {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

/* ===== AGED PRICE CARD FEATURES ===== */
.aged-price-card .aged-features {
  list-style: none;
  padding: 0;
  margin: 10px 0 14px;
  text-align: left;
}

.aged-price-card .aged-features li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #6b7280;
  padding: 3px 0;
}

.aged-price-card .aged-features li svg {
  color: var(--terminal-green);
  flex-shrink: 0;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 480px;
  transform: scale(0.94) translateY(20px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f3f4f6;
}

.modal-header h3 {
  font-size: 1.1rem;
  color: #111;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.modal-body { padding: 24px; }

.modal-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.modal-detail span:first-child {
  color: #6b7280;
  font-size: 0.875rem;
}

.modal-detail span:last-child {
  color: #111;
  font-weight: 600;
  font-size: 0.9375rem;
}

.modal-detail.total {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 4px;
}

.modal-detail.total span:first-child {
  font-weight: 700;
  color: #111;
  font-size: 1rem;
}

.modal-detail.total span:last-child {
  color: var(--terminal-green);
  font-size: 1.25rem;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .btn {
  width: 100%;
  justify-content: center;
  border-radius: 12px;
}

/* ===== FRESH PRICING TABLE IMPROVEMENTS ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.pricing-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.25s ease;
  position: relative;
}

.pricing-card:hover {
  border-color: var(--terminal-green);
  box-shadow: 0 12px 40px rgba(16,185,129,0.15);
  transform: translateY(-4px);
}

.pricing-card.popular {
  border-color: var(--terminal-green);
  box-shadow: 0 4px 20px rgba(16,185,129,0.12);
}

.pricing-card h4 {
  font-size: 1rem;
  color: #111;
  margin-bottom: 12px;
}

.pricing-card .price {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--terminal-green);
  font-family: var(--font-display);
  line-height: 1.1;
}

.pricing-card .per-unit {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 4px 0 16px;
}

/* ===== MOBILE MODAL ===== */
@media (max-width: 480px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    border-radius: 20px 20px 0 0;
    max-width: 100%;
  }
  .modal-overlay.active .modal {
    transform: scale(1) translateY(0);
  }
}

/* ===== MEGA MENU MOBILE HIDE ===== */
@media (max-width: 1024px) {
  .mega-dropdown { display: none !important; }
}

/* ===== NAV ACTIVE STATE ===== */
.nav-links a.active {
  color: var(--terminal-green) !important;
}

/* ===== FOOTER WORDMARK ===== */
.footer-wordmark {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  color: rgba(255,255,255,0.04);
  letter-spacing: -0.02em;
  margin-bottom: -20px;
  user-select: none;
  font-family: var(--font-display);
}
