/* Deep Ocean Storm Architecture Studio CSS */

/* CSS Custom Properties */
:root {
  --primary-color: #1a365d;
  --secondary-color: #4a90a4;
  --accent-color: #63b3d1;
  --dark-blue: #0f1419;
  --light-blue: #e6f3f7;
  --storm-gray: #2d3748;
  --wave-white: #f7fafc;
  --text-light: #ffffff;
  --text-dark: #2d3748;
  --ocean-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --storm-gradient: linear-gradient(45deg, var(--dark-blue) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
  --wave-shadow: 0 10px 30px rgba(26, 54, 93, 0.3);
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Poppins', 'Inter', sans-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(--wave-white);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  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);
}

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

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

/* Bootstrap 5 Overrides */
.btn {
  font-family: var(--font-primary);
  font-weight: 500;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  border: none;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

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

.btn-primary:hover {
  background: var(--storm-gradient);
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(26, 54, 93, 0.4);
  color: var(--text-light);
}

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

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

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

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

/* Navigation */
.navbar {
  padding: 1rem 0;
  transition: var(--transition);
  background: rgba(247, 250, 252, 0.95);
  backdrop-filter: blur(10px);
}

.navbar.scrolled {
  background: rgba(26, 54, 93, 0.95);
  backdrop-filter: blur(15px);
  box-shadow: var(--wave-shadow);
}

.navbar.scrolled .navbar-brand,
.navbar.scrolled .navbar-nav .nav-link {
  color: var(--text-light);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: var(--transition);
}

.navbar-nav .nav-link {
  color: var(--primary-color);
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: var(--transition);
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--secondary-color);
  background: rgba(74, 144, 164, 0.1);
}

.navbar-nav .nav-link.active {
  color: var(--text-light);
  background: var(--ocean-gradient);
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 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='rgba%2826, 54, 93, 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(--storm-gradient);
  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 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23ffffff"></path><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="%23ffffff"></path><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%23ffffff"></path></svg>') bottom center/cover no-repeat;
}

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

.hero h1 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease-out 0.3s forwards;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero .btn {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease-out 0.9s forwards;
}

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

@keyframes waveAnimation {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

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

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

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

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

/* Cards */
.card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition);
  background: white;
  box-shadow: 0 5px 20px rgba(26, 54, 93, 0.1);
}

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

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

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

.card-body {
  padding: 2rem;
}

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

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

/* Services Grid */
.service-item {
  text-align: center;
  padding: 2rem;
  border-radius: 20px;
  background: white;
  box-shadow: 0 5px 20px rgba(26, 54, 93, 0.1);
  transition: var(--transition);
  height: 100%;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--wave-shadow);
}

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

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

/* Portfolio Grid */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  margin-bottom: 2rem;
  cursor: pointer;
}

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

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

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

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

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

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(74, 144, 164, 0.25);
  background: white;
}

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

.form-floating .form-control {
  height: calc(3.5rem + 2px);
}

.form-floating textarea.form-control {
  height: calc(6rem + 2px);
}

/* Footer */
.footer {
  background: var(--storm-gradient);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 5rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M985.66,92.83C906.67,72,823.78,31,743.84,14.19c-82.26-17.34-168.06-16.33-250.45.39-57.84,11.73-114,31.07-172,41.86A600.21,600.21,0,0,1,0,27.35V120H1200V95.8C1132.19,118.92,1055.71,111.31,985.66,92.83Z" fill="%23f7fafc"></path></svg>') bottom center/cover no-repeat;
}

.footer h5 {
  color: white;
  margin-bottom: 1rem;
}

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

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

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  margin-right: 0.5rem;
  transition: var(--transition);
}

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

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

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

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

.bg-light-blue {
  background: var(--light-blue);
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition);
}

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

.floating {
  animation: float 3s ease-in-out infinite;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .navbar-nav {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    margin-top: 1rem;
  }
  
  .navbar.scrolled .navbar-nav {
    background: rgba(26, 54, 93, 0.95);
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .service-item {
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 2rem 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
  }
  
  .section {
    padding: 2rem 0;
  }
}

/* High contrast for accessibility */
@media (prefers-contrast: high) {
  .btn-primary {
    background: var(--primary-color);
  }
  
  .card {
    border: 1px solid var(--storm-gray);
  }
}

/* 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;
  }
}