/* -------------------------------------------------
   VARIABLES – THEMING SYSTEM
   ------------------------------------------------- */
:root {
  /* --- DEFAULT (DARK MODE) --- */
  --bg-color: #030304;
  --card-bg: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.08);
  --pill-bg: rgba(10, 10, 12, 0.8);

  /* Typography */
  --text-main: #f4f4f5;
  --text-muted: #888890;
  --text-inverse: #000; 

  /* Accents */
  --primary: #fff;
  --accent: #8b5cf6;
  --aurora-1: rgba(139, 92, 246, 0.08); 
  --aurora-2: rgba(59, 130, 246, 0.08);
  --input-bg: rgba(255, 255, 255, 0.03);

  /* Fonts & Layout */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --container-width: 1100px;
}

/* --- LIGHT MODE OVERRIDES --- */
[data-theme="light"] {
  --bg-color: #f2f2f5; 
  --card-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(0, 0, 0, 0.06);
  --pill-bg: rgba(255, 255, 255, 0.85);
  --text-main: #18181b; 
  --text-muted: #52525b; 
  --text-inverse: #fff;
  --primary: #000;
  --accent: #7c3aed;
  --aurora-1: rgba(139, 92, 246, 0.15); 
  --aurora-2: rgba(59, 130, 246, 0.15);
  --input-bg: rgba(0, 0, 0, 0.04);
}

/* -------------------------------------------------
   RESET & BASE
   ------------------------------------------------- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; background-color: var(--bg-color); transition: background-color 0.5s ease; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: transparent; 
  color: var(--text-main);
  font: 1rem/1.6 var(--font-body);
  position: relative;
  transition: color 0.3s ease;
}

h1, h2, h3, h4 { font-family:var(--font-heading); color:var(--text-main); letter-spacing:-.02em; }
p { font-weight:300; }
a { color:inherit; text-decoration:none; transition:.2s ease; cursor: pointer; }
ul { list-style:none; }
button { cursor: pointer; }

/* -------------------------------------------------
   BACKGROUND EFFECTS
   ------------------------------------------------- */
body::before {
  content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none; z-index: -1; mix-blend-mode: overlay; transform: translateZ(0); transition: opacity 0.5s ease;
}

body::after {
  content: ""; position: fixed; top: -20%; left: -10%; width: 70vw; height: 70vw;
  background: radial-gradient(circle, var(--aurora-1), transparent 70%);
  border-radius: 50%; animation: floatAurora 20s infinite alternate ease-in-out;
  z-index: -2; pointer-events: none; transform: translateZ(0);
}

html::after {
  content: ""; position: fixed; bottom: -20%; right: -10%; width: 60vw; height: 60vw;
  background: radial-gradient(circle, var(--aurora-2), transparent 70%);
  border-radius: 50%; animation: floatAurora 25s infinite alternate-reverse ease-in-out;
  z-index: -2; pointer-events: none; transform: translateZ(0);
}

@keyframes floatAurora {
  0% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  100% { transform: translate(50px, 50px) scale(1.1); opacity: 1; }
}

/* -------------------------------------------------
   COMPONENTS
   ------------------------------------------------- */
.container { max-width:var(--container-width); margin:0 auto; padding:0 24px; }
.section { padding: 100px 0; }
.hidden { opacity:0; transform:translateY(20px); transition:.6s ease; }
.show { opacity:1; transform:translateY(0); }

.glass {
  background:var(--card-bg); border:1px solid var(--glass-border); border-radius:16px;
  transition:transform .3s ease, background .3s, box-shadow .3s;
}

/* Header */
.header {
  position:fixed; top:20px; left:50%; transform:translateX(-50%);
  width:90%; max-width:900px; height:60px;
  background:var(--pill-bg); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
  border:1px solid var(--glass-border); border-radius:100px;
  display:flex; justify-content:space-between; align-items:center;
  padding:0 8px 0 24px; z-index:1000;
}
.logo { font:600 1.1rem var(--font-heading); color:var(--text-main); }
.demo-badge { background: var(--accent); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; margin-left: 8px; vertical-align: middle; }

.navbar { display:flex; gap:4px; background:var(--card-bg); padding:4px; border-radius:50px; }
.nav-link { font-size:.85rem; color:var(--text-muted); padding:6px 16px; border-radius:50px; transition:color .2s; }
.nav-link:hover, .nav-link.active { color:var(--text-main); background:rgba(125,125,125,.1); }

.controls-group { display: flex; align-items: center; gap: 10px; }
.theme-toggle { background: transparent; border: none; color: var(--text-muted); font-size: 1.1rem; padding: 8px; cursor: pointer; }
.theme-toggle:hover { color: var(--text-main); }

/* --- "Hire Us" Button Fix --- */
.btn-main-site { 
    background:var(--text-main); 
    color:var(--bg-color); 
    padding:8px 20px; 
    border-radius:50px; 
    font-size:.85rem; 
    font-weight:500;
    white-space: nowrap; /* Ensures text stays on one line */
}

.hamburger { display:none; padding:10px; cursor: pointer; }
.bar { display:block; width:20px; height:2px; margin:4px auto; background:var(--text-main); }

.btn { padding:12px 30px; border-radius:10px; font-size:.95rem; font-weight:500; border:1px solid transparent; transition:.2s; cursor: pointer; display: inline-block; }
.btn-primary { background:var(--text-main); color:var(--bg-color); }
.btn-primary:hover { transform:translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* -------------------------------------------------
   DEMO & PRICING
   ------------------------------------------------- */
.hero-demo { padding: 160px 0 80px; text-align: center; }
.hero-demo h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.1; margin-bottom: 20px; }
.hero-demo p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto 40px; }

.demo-grid, .pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 40px; }
.demo-card { overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.demo-preview { height: 200px; width: 100%; background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 3rem; border-bottom: 1px solid var(--glass-border); }
[data-theme="light"] .demo-preview { background: linear-gradient(135deg, #e4e4e7 0%, #f4f4f5 100%); }

/* --- Demo Content Alignment Fix --- */
.demo-content { 
    padding: 25px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    /* This ensures the flex container takes up all available space */
}
.demo-content h3 { margin-bottom: 10px; }
.demo-content p { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    margin-bottom: 20px; 
}
/* Pushes the button to the bottom of the card */
.demo-content .btn {
    margin-top: auto; 
    align-self: flex-start;
}

.tag-container { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tag { font-size: 0.75rem; padding: 4px 10px; border-radius: 4px; background: var(--input-bg); color: var(--text-muted); border: 1px solid var(--glass-border); }

.price-card { padding: 40px 30px; text-align: center; position: relative; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 30px rgba(139, 92, 246, 0.15); }
.price-amount { font-size: 2.5rem; font-weight: 700; color: var(--text-main); margin: 20px 0; }
.price-amount span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.features-list { text-align: left; margin: 30px 0; list-style: none; }
.features-list li { margin-bottom: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.features-list i { color: var(--accent); font-size: 0.8rem; }

/* -------------------------------------------------
   CONTACT FORM STYLES
   ------------------------------------------------- */
.contact-form { width: 100%; display: flex; flex-direction: column; gap: 18px; }
.input-group { display: flex; flex-direction: column; gap: 8px; position: relative; }
.input-group label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; margin-left: 2px; }

.input-group input, 
.input-group textarea, 
.input-group select {
  width: 100%; padding: 14px 16px;
  background: var(--input-bg); 
  border: 1px solid var(--glass-border); 
  border-radius: 10px;
  color: var(--text-main); 
  font: 1rem var(--font-body); 
  outline: none; transition: 0.2s;
  appearance: none; -webkit-appearance: none;
}
.input-group textarea { resize: vertical; min-height: 120px; }
::placeholder { color: var(--text-muted); opacity: 0.6; }

.input-group input:focus, 
.input-group textarea:focus, 
.input-group select:focus {
  background: var(--card-bg); 
  border-color: var(--text-muted);
}

/* Custom Select Dropdown Arrow */
.select-wrapper { position: relative; width: 100%; }
.arrow-icon { 
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%); 
    pointer-events: none; color: var(--text-muted); font-size: 0.8rem; 
}
/* Select Options Background */
select option { background-color: var(--bg-color); color: var(--text-main); padding: 10px; }
[data-theme="light"] select option { background-color: #ffffff; color: #000000; }

/* Success Popup */
.popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px);
    z-index: 10000; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.popup-overlay.active { opacity: 1; pointer-events: auto; }
.popup-card {
    background: var(--bg-color); border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); padding: 40px 60px; border-radius: 20px;
    text-align: center; transform: scale(0.9) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1); max-width: 90%;
}
.popup-overlay.active .popup-card { transform: scale(1) translateY(0); }
.popup-icon { font-size: 3rem; color: #10b981; margin-bottom: 20px; display: inline-block; }
.popup-btn {
    background: var(--text-main); color: var(--bg-color);
    padding: 10px 30px; border-radius: 50px; font-weight: 500; cursor: pointer; border: none;
}

/* Footer */
footer { text-align: center; padding: 60px 0; border-top: 1px solid var(--glass-border); margin-top: 60px; font-size: 0.9rem; color: var(--text-muted); }
.error-page { height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

@media (max-width: 800px) {
    .header { width: 95%; top: 10px; padding: 0 15px; }
    .navbar { display: none; }
    .navbar.active {
        display:flex; flex-direction:column; position:fixed; top:80px; left:50%; transform:translateX(-50%);
        width:95%; background:var(--bg-color); border:1px solid var(--glass-border); padding:20px; border-radius:20px; z-index:999;
    }
    .hamburger { display: block; }
}