/* Storm Fire Architecture Studio - CSS Styles */

/* CSS Custom Properties */
:root {
  --primary-color: #1a1a1a;
  --secondary-color: #ff4500;
  --accent-color: #ff6b35;
  --text-light: #ffffff;
  --text-dark: #333333;
  --text-muted: #888888;
  --bg-light: #f8f9fa;
  --bg-dark: #0d0d0d;
  --gradient-fire: linear-gradient(135deg, #ff4500, #ff6b35, #ff8c42);
  --gradient-storm: linear-gradient(135deg, #1a1a1a, #2d2d2d, #404040);
  --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-heavy: 0 10px 30px rgba(0,0,0,0.3);
  --transition-fast: 0.3s ease;
  --transition-slow: 0.6s ease;
  --border-radius: 8px;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

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

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

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

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

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: var(--transition-fast);
}

.btn:hover::before {
  left: 100%;
}

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

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

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

.btn-outline-primary:hover {
  background: var(--secondary-color);
  color: var(--text-light);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--gradient-storm);
  color: var(--text-light);
}

.btn-dark:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-2px);
}

/* Navigation */
.navbar {
  background: rgba(26, 26, 26, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-light);
  transition: var(--transition-fast);
  padding: 1rem 0;
}

.navbar.scrolled {
  background: var(--primary-color) !important;
  padding: 0.5rem 0;
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-light) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.navbar-nav .nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
  position: relative;
}

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

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

.navbar-nav .nav-link:hover {
  color: var(--secondary-color) !important;
}

.navbar-toggler {
  border: none;
  padding: 0;
}

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

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(45deg, var(--primary-color) 0%, rgba(26,26,26,0.8) 50%, var(--primary-color) 100%),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="%23ff4500" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: var(--gradient-fire);
  border-radius: 50%;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 80%;
  height: 80%;
  background: var(--secondary-color);
  border-radius: 50%;
  opacity: 0.05;
  animation: float 8s ease-in-out infinite reverse;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero .lead {
  color: rgba(255,255,255,0.9);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Sections */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-dark {
  background: var(--gradient-storm);
  color: var(--text-light);
}

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

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

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: var(--transition-fast);
  overflow: hidden;
  background: var(--text-light);
}

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

.card-img-top {
  transition: var(--transition-slow);
}

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

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Project Gallery */
.project-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  cursor: pointer;
  margin-bottom: 2rem;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: var(--transition-fast);
}

.project-item:hover .project-overlay {
  opacity: 0.9;
}

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

.project-item img {
  transition: var(--transition-slow);
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.project-title {
  color: var(--text-light);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.project-category {
  color: rgba(255,255,255,0.8);
  text-align: center;
}

/* Forms */
.form-control {
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition-fast);
}

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

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

.section-dark .form-label {
  color: var(--text-light);
}

.section-dark .form-control {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: var(--text-light);
}

.section-dark .form-control::placeholder {
  color: rgba(255,255,255,0.6);
}

/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.footer a {
  color: rgba(255,255,255,0.8);
  transition: var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  color: rgba(255,255,255,0.6);
}

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

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-slide-in {
  animation: slideInRight 0.6s ease forwards;
}

/* Utility Classes */
.text-gradient {
  background: var(--gradient-fire);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.bg-gradient-dark {
  background: var(--gradient-storm);
}

.shadow-custom {
  box-shadow: var(--shadow-heavy);
}

.border-gradient {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box, var(--gradient-fire) border-box;
}

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

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

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 69, 0, 0.1);
  border-top: 3px solid var(--secondary-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) {
  .hero {
    text-align: center;
    padding: 2rem 0;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .card {
    margin-bottom: 2rem;
  }
  
  .navbar-collapse {
    background: var(--primary-color);
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero .lead {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .project-item img {
    height: 200px;
  }
}

/* High contrast for accessibility */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000000;
    --text-muted: #666666;
  }
}

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

/* Print styles */
@media print {
  .navbar,
  .btn,
  .footer {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .hero {
    background: none;
    color: black;
  }
}