/* Ember & Storm Architecture Studio - Custom CSS */

/* CSS Custom Properties */
:root {
  --primary-color: #D2691E;
  --secondary-color: #2F4F4F;
  --primary-light: #E6824C;
  --primary-dark: #B8571A;
  --secondary-light: #4A6A6A;
  --secondary-dark: #1F3535;
  --accent-ember: #FF6B35;
  --accent-storm: #708090;
  --text-light: #F8F9FA;
  --text-dark: #212529;
  --text-muted: #6C757D;
  --bg-light: #FFFFFF;
  --bg-dark: #1A1A1A;
  --shadow-light: rgba(210, 105, 30, 0.15);
  --shadow-dark: rgba(47, 79, 79, 0.2);
  --gradient-ember: linear-gradient(135deg, var(--primary-color), var(--accent-ember));
  --gradient-storm: linear-gradient(135deg, var(--secondary-color), var(--accent-storm));
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 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;
  color: var(--secondary-color);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: var(--gradient-ember);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

/* Bootstrap 5 Overrides */
.btn {
  border-radius: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.875rem 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  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: left 0.5s;
}

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

.btn-primary {
  background: var(--gradient-ember);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-light);
}

.btn-secondary {
  background: var(--gradient-storm);
  border-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-dark);
}

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

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

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

.btn-outline-secondary:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: white;
}

/* Card Overrides */
.card {
  border: none;
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.card-header {
  background: var(--gradient-ember);
  color: white;
  border-bottom: none;
  padding: 1.5rem;
}

/* Navigation */
.navbar {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(210, 105, 30, 0.1);
  transition: all 0.3s ease;
  padding: 1rem 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  padding: 0.5rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient-ember);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: var(--secondary-color);
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  position: relative;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: var(--gradient-ember);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color);
}

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

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

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

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(47, 79, 79, 0.8), rgba(210, 105, 30, 0.8)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--secondary-color) 0%, transparent 50%, var(--primary-color) 100%);
  opacity: 0.1;
  animation: heroGradient 8s ease-in-out infinite;
}

@keyframes heroGradient {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.3; }
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
}

.hero-title {
  color: white;
  background: none;
  -webkit-text-fill-color: white;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-buttons {
  animation: fadeInUp 1s ease-out 0.6s both;
}

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

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Portfolio Grid */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: var(--bg-light);
}

.portfolio-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-ember);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

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

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

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--gradient-storm);
}

/* Contact Form */
.form-control {
  border: 2px solid #E9ECEF;
  border-radius: 0;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem var(--shadow-light);
}

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

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

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

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(210, 105, 30, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Utility Classes */
.text-primary {
  color: var(--primary-color);
}

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

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

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

.section-padding {
  padding: 5rem 0;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
    padding: 2rem 0;
  }
  
  .hero-content {
    padding: 2rem 1rem;
  }
  
  .navbar-nav {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }
  
  .portfolio-item img {
    height: 250px;
  }
  
  .section-padding {
    padding: 3rem 0;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 576px) {
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .card {
    margin-bottom: 2rem;
  }
  
  .footer-social {
    justify-content: center;
    margin-top: 1rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-light: #1A1A1A;
    --text-dark: #F8F9FA;
    --text-muted: #CED4DA;
  }
  
  .navbar {
    background: rgba(26, 26, 26, 0.95);
  }
  
  .card {
    background: var(--secondary-dark);
    color: white;
  }
}

/* Print Styles */
@media print {
  .navbar, .footer, .btn {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .hero {
    background: none;
    color: black;
  }
}