@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Base Theme Variables (Light Mode) */
:root {
  /* Colors */
  --bg-color: #f8fafc;
  --bg-surface: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --border-color: #e2e8f0;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
  
  /* Animation */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-color: #0b0f19;
  --bg-surface: #111827;
  --bg-glass: rgba(17, 24, 39, 0.7);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-color: #3b82f6;
  --accent-hover: #60a5fa;
  --border-color: #1e293b;
  
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

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

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

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .bg-glass {
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 9999px;
  transition: all var(--transition-normal);
  gap: 0.5rem;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
}

.btn-outline:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

/* Animations (Scroll) */
.animate-on-scroll {
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}

.fade-in {
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.fade-in.is-visible {
  opacity: 1;
  visibility: visible;
}

.slide-up {
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}
.slide-up.is-visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

/* Delay modifiers */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-color);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive constraints */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
}

/* =========================================
   CORE UI COMPONENTS
   ========================================= */

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all var(--transition-normal);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding: 1rem 0;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width var(--transition-fast);
}

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

.btn-icon {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: rgba(128, 128, 128, 0.1);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(128, 128, 128, 0.2);
  transform: scale(1.05);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.bg-secondary {
  background-color: rgba(128, 128, 128, 0.03);
}

/* Grids */
.grid {
  display: grid;
  gap: 2rem;
}

.store-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.portfolio-grid {
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.testimonials-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem; /* offset for navbar */
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  filter: blur(60px);
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-image {
  position: relative;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass-orb {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
  filter: blur(40px);
  opacity: 0.5;
  animation: float 6s ease-in-out infinite;
}

.glass-card {
  position: absolute;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.mockup-1 {
  width: 80%;
  height: 60%;
  transform: translate(-10%, -10%) rotate(-5deg);
  z-index: 2;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
}

.mockup-2 {
  width: 70%;
  height: 70%;
  transform: translate(20%, 20%) rotate(3deg);
  z-index: 1;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Cards & Placeholders */
.card {
  border-radius: 16px;
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
  overflow: hidden;
  aspect-ratio: 16/10;
}

.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: transform var(--transition-slow);
}

.card:hover .img-placeholder {
  transform: scale(1.05);
}

.bg-gradient-1 { background: linear-gradient(135deg, #2563eb, #4f46e5); }
.bg-gradient-2 { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.bg-gradient-3 { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.bg-gradient-4 { background: linear-gradient(135deg, #10b981, #059669); }
.bg-gradient-5 { background: linear-gradient(135deg, #f59e0b, #d97706); }

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card-price {
  font-size: 1.1rem;
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Portfolio Item */
.portfolio-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.portfolio-item .img-placeholder {
  transition: transform var(--transition-slow);
}

.portfolio-item:hover .img-placeholder {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
  color: white;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h4 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.portfolio-overlay p {
  color: rgba(255,255,255,0.8);
  transform: translateY(20px);
  transition: transform var(--transition-normal) 0.1s;
}

.portfolio-item:hover .portfolio-overlay h4,
.portfolio-item:hover .portfolio-overlay p {
  transform: translateY(0);
}

/* Testimonials */
.testimonial-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.quote {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  position: relative;
}

.quote::before {
  content: '"';
  position: absolute;
  font-size: 4rem;
  color: var(--accent-color);
  opacity: 0.1;
  top: -20px;
  left: -10px;
  font-family: serif;
}

.client-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.client-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
}

.client-info h4 {
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

.client-info span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Footer */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--text-secondary);
  max-width: 300px;
}

.footer h4 {
  margin-bottom: 1.5rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(128, 128, 128, 0.1);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.social-icons a:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle {
    margin: 0 auto 2.5rem;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-image {
    height: 400px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-controls {
    gap: 1rem;
  }
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
  }
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .section {
    padding: 4rem 0;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .cols-2 {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   INNER PAGES & UTILITIES
   ========================================= */

/* Utilities */
.pt-32 { padding-top: 8rem; }
.pb-20 { padding-bottom: 5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-4 { padding: 1rem; }
.rounded-lg { border-radius: 0.5rem; }
.text-center { text-align: center; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: bold; }
.text-accent { color: var(--accent-color); }
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.relative { position: relative; }
.hidden { display: none !important; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.align-center { align-items: center; }
.gap-4 { gap: 1rem; }

/* Page Header */
.page-header {
  min-height: 40vh;
  display: flex;
  align-items: center;
}

.page-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.page-desc {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* About Page */
.about-mission h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.mockup-about {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-secondary);
  border: 1px dashed var(--border-color);
  background: var(--bg-surface);
}

/* Skills */
.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.skill-card {
  padding: 2.5rem 2rem;
  text-align: center;
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  padding: 1rem;
  background: rgba(128, 128, 128, 0.05);
  border-radius: 50%;
}

.skill-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.skill-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Store Page */
.store-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.filter-btn.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-color);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  animation: modalIn 0.3s ease-out forwards;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

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

/* Logo Wrapper */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
}
.d-block { display: block; }

/* 4-column store grid */
.store-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Feature Templates Overlay specific */
.overlay-card .card-img-wrapper {
  position: relative;
  aspect-ratio: 16/11;
  overflow: hidden;
}

.overlay-card .img-placeholder {
  transition: transform var(--transition-slow);
}

.overlay-card:hover .img-placeholder {
  transform: scale(1.1);
}

.overlay-card .card-overlay-content {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
  color: white;
  z-index: 2;
}

.overlay-card:hover .card-overlay-content {
  opacity: 1;
}

.overlay-card .card-overlay-content .card-title {
  color: white;
  margin-bottom: 0.5rem;
  transform: translateY(10px);
  transition: transform var(--transition-normal);
}

.overlay-card:hover .card-overlay-content .card-title {
  transform: translateY(0);
}

.overlay-card .card-overlay-content .btn {
  align-self: flex-start;
  transform: translateY(10px);
  transition: transform var(--transition-normal) 0.1s;
}

.overlay-card:hover .card-overlay-content .btn {
  transform: translateY(0);
}

.text-white { color: white !important; }
.hover-white:hover { background: white !important; color: black !important; border-color: white; }
