/* Cosmic Flare Architecture Studio CSS */

/* Custom Properties */
:root {
  --primary-color: #FF4500;
  --secondary-color: #1A1A2E;
  --primary-light: #FF6B33;
  --primary-dark: #E03E00;
  --secondary-light: #2A2A4E;
  --secondary-dark: #0F0F1A;
  --accent-color: #FFD700;
  --text-dark: #2C2C2C;
  --text-light: #F5F5F5;
  --text-muted: #6C757D;
  --bg-light: #FAFAFA;
  --bg-dark: #121212;
  --gradient-cosmic: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --gradient-flare: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--primary-color));
  --shadow-soft: 0 4px 20px rgba(255, 69, 0, 0.15);
  --shadow-strong: 0 8px 40px rgba(255, 69, 0, 0.25);
  --border-radius: 12px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: var(--gradient-flare);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: cosmic-glow 3s ease-in-out infinite alternate;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--secondary-color);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--primary-color);
}

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--text-dark);
}

/* Bootstrap 5 Overrides */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 30px;
  border: none;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--gradient-cosmic);
  color: var(--text-light);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: var(--gradient-flare);
  color: var(--text-light);
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
}

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

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  border-color: var(--primary-color);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
  color: var(--text-light);
}

/* Navigation */
.navbar {
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  padding: 15px 0;
  transition: var(--transition-smooth);
  border-bottom: 1px solid rgba(255, 69, 0, 0.1);
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-light);
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: var(--text-light);
  font-weight: 500;
  margin: 0 10px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition-smooth);
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text-light);
  background: rgba(255, 69, 0, 0.2);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 80%;
}

.navbar-toggler {
  border: none;
  padding: 4px 8px;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28245, 245, 245, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: var(--gradient-cosmic);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="%23FFD700" stop-opacity="0.1"/><stop offset="100%" stop-color="%23FF4500" stop-opacity="0.05"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="600" cy="700" r="120" fill="url(%23a)"/></svg>') no-repeat center;
  background-size: cover;
  opacity: 0.3;
  animation: cosmic-float 20s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-light);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fade-up 1s ease-out 0.5s both;
}

.hero-title {
  animation: fade-up 1s ease-out both;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  opacity: 0.9;
  animation: fade-up 1s ease-out 1s both;
}

.hero-cta {
  animation: fade-up 1s ease-out 1.5s both;
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: var(--transition-smooth);
  overflow: hidden;
  background: white;
}

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

.card-img-top {
  height: 250px;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--secondary-color);
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Project Cards */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  height: 400px;
  background: var(--secondary-color);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-cosmic);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--text-light);
  transition: var(--transition-smooth);
  text-align: center;
  padding: 2rem;
}

.project-card:hover .project-overlay {
  opacity: 0.95;
}

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

.project-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  transform: translateY(20px);
  transition: var(--transition-bounce);
}

.project-description {
  transform: translateY(20px);
  transition: var(--transition-bounce);
  transition-delay: 0.1s;
}

.project-card:hover .project-title,
.project-card:hover .project-description {
  transform: translateY(0);
}

/* Forms */
.form-control {
  border: 2px solid #E9ECEF;
  border-radius: var(--border-radius);
  padding: 12px 16px;
  font-size: 1rem;
  transition: var(--transition-smooth);
  background-color: white;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 69, 0, 0.25);
  background-color: white;
}

.form-label {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-flare);
  border-radius: 2px;
}

/* About Section */
.about-content {
  position: relative;
}

.about-stats {
  background: var(--gradient-cosmic);
  color: var(--text-light);
  border-radius: var(--border-radius);
  padding: 3rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  display: block;
  color: var(--accent-color);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Services */
.service-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-cosmic);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--text-light);
  transition: var(--transition-bounce);
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(10deg);
}

/* Contact */
.contact-info {
  background: var(--secondary-color);
  color: var(--text-light);
  border-radius: var(--border-radius);
  padding: 3rem;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: white;
}

/* Footer */
.footer {
  background: var(--secondary-color);
  color: var(--text-light);
  padding: 50px 0 20px;
}

.footer a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer a:hover {
  color: var(--primary-color);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 69, 0, 0.2);
  border-radius: 50%;
  margin: 0 5px;
  transition: var(--transition-bounce);
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

/* Animations */
@keyframes cosmic-glow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes cosmic-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(1deg); }
  66% { transform: translateY(-10px) rotate(-1deg); }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 69, 0, 0.6);
  }
}

/* Utilities */
.text-primary-custom {
  color: var(--primary-color);
}

.text-secondary-custom {
  color: var(--secondary-color);
}

.bg-primary-custom {
  background: var(--gradient-cosmic);
}

.cosmic-border {
  position: relative;
}

.cosmic-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-flare);
  border-radius: var(--border-radius);
  z-index: -1;
}

/* Loading Animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-cosmic);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .section {
    padding: 50px 0;
  }
  
  .hero {
    min-height: 80vh;
    padding: 2rem 0;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .about-stats {
    padding: 2rem;
  }
  
  .contact-info {
    padding: 2rem;
    margin-top: 2rem;
  }
  
  .project-card {
    height: 300px;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .hero-cta .btn {
    display: block;
    margin: 0.5rem 0;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .project-overlay {
    padding: 1rem;
  }
}

/* High contrast for accessibility */
@media (prefers-contrast: high) {
  .btn-outline-primary {
    border-width: 3px;
  }
  
  .form-control:focus {
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.5);
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
  
  html {
    scroll-behavior: auto;
  }
}