* { font-family: 'Inter', sans-serif; }
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; font-style: italic; line-height: 1.05; letter-spacing: -0.02em; }

/* ══ Floating Glass Navbar ══ */
.navbar-glass {
  background: linear-gradient(180deg,
          rgba(255, 255, 255, 0.72) 0%,
          rgba(255, 255, 255, 0.52) 100%);
  backdrop-filter: blur(60px) saturate(200%) brightness(1.08);
  -webkit-backdrop-filter: blur(60px) saturate(200%) brightness(1.08);
  border: 0.5px solid rgba(255, 255, 255, 0.5);
  box-shadow:
      0 0.5px 0 0 rgba(255, 255, 255, 0.6) inset,
      0 8px 40px rgba(0, 0, 0, 0.07),
      0 2px 12px rgba(0, 0, 0, 0.04);
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.nav-link-glass {
  font-size: 0.85rem;
  font-weight: 500;
  color: #1e293b;
  transition: color 0.3s ease;
  position: relative;
  padding: 4px 0;
}
.nav-link-glass::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: #111;
  border-radius: 1px;
  transition: width 0.3s ease, left 0.3s ease;
}
.nav-link-glass:hover { color: #000; }
.nav-link-glass:hover::after { width: 100%; left: 0; }

/* Mobile dropdown */
.mobile-dropdown {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}
.mobile-dropdown.open {
  max-height: 400px;
  opacity: 1;
  margin-top: 0.5rem;
}

/* Search button styling */
.nav-search-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: #374151;
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-search-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.08);
  color: #000;
  transform: translateY(-0.5px);
}
.nav-search-btn:active {
  transform: translateY(0.5px);
}

.nav-search-text {
  display: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-search-kbd {
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  color: #6b7280;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}
.nav-search-btn:hover .nav-search-kbd {
  background: rgba(0, 0, 0, 0.1);
  color: #000;
}

@media (min-width: 768px) {
  .nav-search-btn {
    width: 170px;
    height: 38px;
    border-radius: 999px;
    padding: 0 12px;
    justify-content: flex-start;
  }
  .nav-search-text {
    display: inline;
  }
  .nav-search-kbd {
    display: inline-flex;
    margin-left: auto;
  }
}

/* ══ Search Overlay ══ */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.search-overlay.active {
  opacity: 1;
  visibility: visible;
}
.search-panel {
  width: 92%;
  max-width: 620px;
  background: linear-gradient(180deg,
          rgba(255, 255, 255, 0.92) 0%,
          rgba(255, 255, 255, 0.85) 100%);
  backdrop-filter: blur(60px) saturate(180%);
  -webkit-backdrop-filter: blur(60px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  box-shadow:
      0 0.5px 0 0 rgba(255,255,255,0.7) inset,
      0 24px 80px rgba(0, 0, 0, 0.18),
      0 8px 32px rgba(0, 0, 0, 0.08);
  padding: 24px 28px;
  transform: translateY(-20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
  opacity: 0;
}
.search-overlay.active .search-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.02);
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) inset;
}
.search-input-wrap:focus-within {
  background: rgba(0, 0, 0, 0.06);
  outline: none !important;
  box-shadow: none !important;
}
.search-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: #111;
}
.search-input-wrap input:focus,
.search-input-wrap input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
.search-input-wrap input::placeholder {
  color: #9ca3af;
}
.search-close-btn {
  color: #9ca3af;
  padding: 2px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.search-close-btn:hover {
  background: rgba(0,0,0,0.06);
  color: #111;
}
.search-suggestions-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 8px;
}
.search-pill {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.02);
  color: #4b5563;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.search-pill:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #000;
  transform: translateY(-0.5px);
}
.search-results {
  margin-top: 16px;
  max-height: 340px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background 0.2s ease;
}
.search-result-item:hover {
  background: rgba(0, 0, 0, 0.04);
}
.search-result-item img {
  width: 40px; height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.search-result-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111;
}
.search-result-meta {
  font-size: 0.75rem;
  color: #9ca3af;
}
.search-no-results {
  text-align: center;
  padding: 20px 0;
  color: #9ca3af;
  font-size: 0.85rem;
}

/* ══ Premium Calculator Custom Styling ══ */
.calc-btn {
  height: 48px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.calc-btn:hover {
  transform: translateY(-1.5px);
}
.calc-btn:active {
  transform: translateY(0.5px);
}
/* Number keys: Light, beautiful grey buttons */
.btn-num {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: #1f2937;
}
.btn-num:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
/* Main action keys: Slate accent */
.btn-action {
  background: rgba(243, 244, 246, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: #4b5563;
}
.btn-action:hover {
  background: rgba(229, 231, 235, 0.95);
  color: #111827;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
/* Operators keys: Indigo translucent accents */
.btn-operator {
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.06);
  color: #4f46e5;
}
.btn-operator:hover {
  background: rgba(79, 70, 229, 0.15);
  border-color: rgba(79, 70, 229, 0.12);
  color: #4338ca;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}
/* Clear and Equals keys: Premium accent gradients */
.btn-accent {
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}
.btn-accent:hover {
  background: linear-gradient(135deg, #4338ca 0%, #2563eb 100%);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}
/* Backspace / Delete style */
.btn-delete {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.06);
  color: #ef4444;
}
.btn-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.12);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
}

/* ═══════════════ ACCESSIBILITY UTILITIES ═══════════════ */

/* Hides elements visually while keeping them reachable for screen readers */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Glassmorphism style for Skip Link bypass elements */
.skip-link-glass {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #4f46e5;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
}

/* High-contrast Visible Focus Indicators across the calculator page */
:focus-visible {
  outline: 3px solid #6366f1 !important;
  outline-offset: 3px !important;
}

/* ═══════════════ GLOBAL TEXT SELECTABILITY OVERRIDES ═══════════════ */

/* Enable text selection across all pages except for specific interactive controls */
body, main, section, div, p, span, h1, h2, h3, h4, h5, h6, table, tr, td, th, li, ul, ol, strong, em, select, input, textarea, a {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

/* Retain non-selectable state on interactive control components where needed */
button, .calc-btn, kbd, select, option, svg, img, input[type="range"] {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

