/* ==========================================================================
   Flexora.Ai — Master Stylesheet (assets/css/style.css)
   Clean, modern, responsive dark theme design system
   ========================================================================== */

:root {
  --bg: #07090F;
  --surface: #0F131D;
  --surface-2: #161B28;
  --surface-3: #1E2436;
  --line: #232838;
  --line-strong: #32394F;
  --teal: #2DE2C8;
  --teal-glow: rgba(45, 226, 200, 0.35);
  --teal-soft: rgba(45, 226, 200, 0.12);
  --blue: #4C7BFF;
  --blue-soft: rgba(76, 123, 255, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --success: #10b981;
  --ink: #F2F4FA;
  --ink-soft: #8A90A6;
  --ink-muted: #565C71;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(45, 226, 200, 0.25);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

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

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--teal);
}

/* Container */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 18px;
  }
}

/* Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--teal));
  background-size: 200% auto;
  animation: gradientShift 3s linear infinite;
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px var(--teal);
}

/* Ambient Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 226, 200, 0.08) 0%, rgba(76, 123, 255, 0.04) 40%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
  mix-blend-mode: screen;
}
body:hover .cursor-glow {
  opacity: 1;
}

/* Background floating particles */
.bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 226, 200, 0.55), rgba(76, 123, 255, 0.05) 70%);
  opacity: 0;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% { transform: translateY(0) translateX(0) scale(0.6); opacity: 0; }
  8% { opacity: 0.55; }
  92% { opacity: 0.35; }
  100% { transform: translateY(-115vh) translateX(var(--drift, 40px)) scale(1.15); opacity: 0; }
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 9, 15, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, border-color 0.3s;
}

nav.wrap {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: transform 0.25s ease;
}

.logo:hover {
  transform: scale(1.04);
}

.logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.logo span {
  color: var(--teal);
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-links a {
  cursor: pointer;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  position: relative;
  transition: color 0.15s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--teal);
  transition: right 0.25s ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  right: 0;
}

.nav-links a.active {
  color: var(--ink);
  font-weight: 600;
}

.nav-cta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.menu-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  color: var(--ink);
  font-size: 18px;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.menu-btn:hover {
  border-color: var(--teal);
}

@media (max-width: 960px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .nav-cta .btn-ghost { display: none; }
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 28px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  animation: slideDown 0.25s ease;
}

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

.mobile-menu a {
  padding: 12px 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s, padding-left 0.15s;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--teal);
  padding-left: 6px;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal);
  color: #07090F;
  border-color: var(--teal);
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(45, 226, 200, 0.5);
  background: #39ebd2;
}

.btn-ghost {
  color: var(--ink-soft);
  border-color: var(--line);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--teal);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12.5px;
}

.btn:active {
  transform: scale(0.97);
}

/* Ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  pointer-events: none;
  animation: rippleFx 0.6s ease-out;
}
.btn-primary .ripple {
  background: rgba(7, 9, 15, 0.35);
}
@keyframes rippleFx {
  to { transform: scale(2.6); opacity: 0; }
}

/* Eyebrow & Live Dots */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal);
  border: 1px solid rgba(45, 226, 200, 0.3);
  background: var(--teal-soft);
  padding: 6px 14px;
  border-radius: 20px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

/* Typography Gradient */
.grad {
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--teal), var(--blue));
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 5s linear infinite;
  display: inline-block;
}

@keyframes gradientShift {
  0% { background-position: 0% center; }
  100% { background-position: 300% center; }
}

/* Hero Section Base */
.page-hero {
  padding: 70px 0 30px;
  text-align: left;
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 16px 0 14px;
}

.page-hero p.lede {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 640px;
  line-height: 1.6;
}

/* Badges & Pills */
.pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid rgba(76, 123, 255, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pill.free {
  background: var(--teal-soft);
  color: var(--teal);
  border-color: rgba(45, 226, 200, 0.25);
}

.pill.new {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.15);
}

.pill.featured {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-verified {
  background: var(--teal-soft);
  color: var(--teal);
  border: 1px solid rgba(45, 226, 200, 0.3);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Sections */
section {
  padding: 80px 0;
  position: relative;
  z-index: 2;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-head h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 480px;
}

/* Scroll reveal */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* Floating Action Buttons (FAB) */
.fab {
  position: fixed;
  left: 24px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  padding: 11px 18px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  transition: var(--transition);
}

.fab:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--teal);
  box-shadow: var(--shadow-glow);
}

.fab-contact { bottom: 24px; }
.fab-submit { bottom: 78px; }
.fab .fab-icon { color: var(--teal); font-weight: 700; font-size: 16px; }

@media (max-width: 640px) {
  .fab span { display: none; }
  .fab { padding: 12px 14px; border-radius: 50%; }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 5, 9, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
  animation: modalFadeIn 0.25s ease forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 36px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  animation: modalPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPopIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-box h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 10px 0 6px;
  color: var(--ink);
}

.modal-sub {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-bottom: 20px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 16px;
}

.modal-close:hover {
  color: var(--teal);
  border-color: var(--teal);
  transform: rotate(90deg);
}

/* Forms inside modal */
.mini-form {
  margin-top: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .mf-row { grid-template-columns: 1fr; }
}

.mini-form input,
.mini-form select,
.mini-form textarea {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  outline: none;
  width: 100%;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mini-form input:focus,
.mini-form select:focus,
.mini-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45, 226, 200, 0.15);
}

.mini-form input::placeholder,
.mini-form textarea::placeholder {
  color: var(--ink-muted);
}

.mf-success {
  display: none;
  text-align: center;
  padding: 32px 20px;
  border: 1px dashed rgba(45, 226, 200, 0.4);
  border-radius: 16px;
  margin-top: 20px;
  background: rgba(45, 226, 200, 0.05);
}

.mf-success.show {
  display: block;
  animation: successPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.mf-success h3 {
  margin: 10px 0 6px;
  color: var(--teal);
}

.mf-success p {
  color: var(--ink-soft);
  font-size: 13.5px;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2);
  border: 1px solid var(--teal);
  color: var(--ink);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--shadow-glow);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  font-weight: 700;
  font-size: 18px;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
  border-color: var(--teal);
  box-shadow: var(--shadow-glow);
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
  position: relative;
  z-index: 2;
  background: rgba(7, 9, 15, 0.7);
}

.foot-top {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  gap: 36px;
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .foot-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .foot-top { grid-template-columns: 1fr; }
}

.foot-brand .logo {
  margin-bottom: 14px;
}

.foot-brand p {
  font-size: 13.5px;
  color: var(--ink-soft);
  max-width: 260px;
  line-height: 1.6;
}

.foot-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 16px;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
}

.foot-col a {
  display: block;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.foot-col a:hover {
  color: var(--teal);
  transform: translateX(4px);
}

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--ink-soft);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.social-row a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: all 0.25s;
}

.social-row a:hover {
  color: var(--ink);
  border-color: var(--teal);
  transform: translateY(-3px) scale(1.08);
}

.social-row svg {
  width: 17px;
  height: 17px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Live Country Visitor Ticker Pill */
.live-ticker {
  position: fixed;
  bottom: 136px;
  left: 24px;
  z-index: 70;
  background: rgba(15, 19, 29, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(45, 226, 200, 0.35);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease, opacity 0.3s ease;
  max-width: 320px;
  text-decoration: none;
}
.live-ticker.show {
  transform: translateX(0);
}
.live-ticker .pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--teal);
  animation: pulseDot 1.5s infinite;
  flex: none;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.live-ticker .ticker-text {
  flex: 1;
}
.live-ticker .ticker-text b {
  color: var(--teal);
}

/* Comprehensive Mobile & Tablet Responsive Engine */
@media (max-width: 960px) {
  .nav-bar {
    padding: 0 20px;
  }
  .mobile-menu {
    border-radius: 0 0 16px 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .wrap {
    padding: 0 16px;
  }
  .hero {
    padding: 44px 0 28px;
  }
  h1 {
    font-size: 32px !important;
    line-height: 1.18 !important;
  }
  .lead {
    font-size: 15px !important;
  }
  .section-head h2 {
    font-size: 24px;
  }
  .grid-3, .grid-4, .tools-grid {
    grid-template-columns: 1fr !important;
  }
  .card-grid {
    grid-template-columns: 1fr !important;
  }
  .fab-contact {
    bottom: 16px;
    left: 16px;
  }
  .fab-submit {
    bottom: 68px;
    left: 16px;
  }
  .live-ticker {
    bottom: 120px;
    left: 16px;
    max-width: calc(100vw - 32px);
    font-size: 11.5px;
    padding: 8px 12px;
  }
  #musicToggle {
    bottom: 16px !important;
    right: 16px !important;
    width: 42px !important;
    height: 42px !important;
  }
  #backToTop {
    bottom: 66px !important;
    right: 16px !important;
    width: 42px !important;
    height: 42px !important;
  }
  .btn {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 26px !important;
  }
  .btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  .live-ticker {
    bottom: 118px;
    left: 12px;
    font-size: 11px;
    padding: 6px 10px;
  }
}

