/* Storm Slate Architecture Studio CSS */

/* ===== ROOT VARIABLES ===== */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #E74C3C;
  --primary-dark: #1A252F;
  --primary-light: #34495E;
  --secondary-light: #EC7063;
  --secondary-dark: #C0392B;
  --white: #FFFFFF;
  --light-gray: #F8F9FA;
  --medium-gray: #6C757D;
  --dark-gray: #343A40;
  --text-dark: #2C3E50;
  --text-light: #FFFFFF;
  --shadow-light: 0 2px 10px rgba(44, 62, 80, 0.1);
  --shadow-medium: 0 5px 25px rgba(44, 62, 80, 0.15);
  --shadow-heavy: 0 10px 40px rgba(44, 62, 80, 0.2);
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.6s ease;
  --border-radius: 8px;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', serif;
}

/* ===== GLOBAL 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(--white);
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

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

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

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

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

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

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

a:hover {
  color: var(--secondary-dark);
  text-decoration: none;
}

/* ===== BOOTSTRAP OVERRIDES ===== */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  padding: 0.75rem 2rem;
  transition: var(--transition-medium);
  border: none;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  box-shadow: var(--shadow-light);
}

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

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--white);
  box-shadow: var(--shadow-light);
}

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

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

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

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

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

.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: var(--transition-medium);
  overflow: hidden;
}

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

.card-title {
  color: var(--primary-color);
  font-family: var(--font-heading);
}

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

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

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

/* ===== NAVIGATION ===== */
.navbar {
  background-color: var(--white) !important;
  box-shadow: var(--shadow-light);
  transition: var(--transition-medium);
  padding: 1rem 0;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.navbar-nav .nav-link {
  color: var(--primary-color) !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:hover {
  color: var(--secondary-color) !important;
  background-color: var(--light-gray);
}

.navbar-nav .nav-link.active {
  color: var(--secondary-color) !important;
  font-weight: 600;
}

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

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

.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='%23{$navbar-dark-toggler-icon-color}' 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: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  position: relative;
  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 100 100"><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>') repeat;
  opacity: 0.3;
}

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

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero .btn {
  animation: fadeInUp 1s ease 0.4s both;
  margin-right: 1rem;
  margin-bottom: 1rem;
}

.hero-image {
  position: relative;
  animation: fadeInRight 1s ease 0.6s both;
}

.hero-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-heavy);
}

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

.section-dark {
  background-color: var(--light-gray);
}

.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-color: var(--secondary-color);
  border-radius: 2px;
}

/* ===== SERVICES ===== */
.service-card {
  text-align: center;
  padding: 2rem;
  height: 100%;
  transition: var(--transition-medium);
}

.service-card:hover {
  transform: translateY(-10px);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--white);
  font-size: 2rem;
  transition: var(--transition-medium);
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
  transform: scale(1.1);
}

/* ===== PORTFOLIO ===== */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

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

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(44, 62, 80, 0.9), rgba(231, 76, 60, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-medium);
  flex-direction: column;
  text-align: center;
  color: var(--white);
  padding: 2rem;
}

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

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

.portfolio-overlay h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.portfolio-overlay p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

/* ===== ABOUT ===== */
.about-stats {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  padding: 3rem 0;
  margin: 3rem 0;
  border-radius: var(--border-radius);
}

.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary-color);
  display: block;
  margin-bottom: 0.5rem;
}

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

/* ===== TEAM ===== */
.team-member {
  text-align: center;
  margin-bottom: 2rem;
}

.team-photo {
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-medium);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-medium);
}

.team-member:hover .team-photo img {
  transform: scale(1.1);
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.team-social a {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.team-social a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* ===== CONTACT FORM ===== */
.contact-form {
  background-color: var(--white);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
}

.contact-info {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  padding: 3rem;
  border-radius: var(--border-radius);
}

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

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

.contact-text h5 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.contact-text p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
}

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

.footer h5 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.footer p,
.footer li {
  color: rgba(255, 255, 255, 0.8);
}

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

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

.footer ul {
  list-style: none;
  padding: 0;
}

.footer li {
  margin-bottom: 0.5rem;
}

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

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 45px;
  height: 45px;
  background-color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
  font-size: 1.25rem;
}

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

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

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

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

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ===== UTILITY CLASSES ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.text-primary {
  color: var(--primary-color) !important;
}

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

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

.border-secondary {
  border-color: var(--secondary-color) !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .hero {
    text-align: center;
    padding: 2rem 0;
  }
  
  .hero .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    margin-right: 0;
  }
  
  .contact-form,
  .contact-info {
    padding: 2rem;
    margin-bottom: 2rem;
  }
  
  .about-stats {
    margin: 2rem 0;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .navbar-collapse {
    background-color: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-top: 1rem;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .team-photo {
    width: 150px;
    height: 150px;
  }
  
  .portfolio-overlay {
    padding: 1rem;
  }
}

/* ===== LOADING ANIMATION ===== */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: 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: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-medium);
  z-index: 1000;
  box-shadow: var(--shadow-medium);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background-color: var(--secondary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-heavy);
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}