:root {
  --primary-dark: #090909;
  --secondary-dark: #2c2c2c;
  --accent-color: #cbcbcb;
  --accent-light: #949494;
  --text-light: #cbcbcb;
  --text-muted: #8c8c8c;
  --border-color: #444;
  --glass-bg: rgba(0,0,0,.05);
  --glass-border: rgba(203,203,203,.1);
  --secondary-dark-t: rgba(44,44,44,.8);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
  font-display: swap;
}

body {
  font-family: Momcake, sans-serif;
  font-display: swap;
  background-color: var(--secondary-dark-t);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================
   NAVBAR STYLES & ANIMATIONS
   ========================= */

.navbar {
  background: rgba(34, 40, 49, .8) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all .3s ease;
  animation: slideDown 0.5s ease-out;
}

/* NEW: Navbar scroll animation */

.navbar.scrolled {
  background: rgba(34, 40, 49, .95) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.logo {
  width: 44px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
  color: var(--primary-dark);
  font-weight: bold;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  animation: rotateIn 0.6s ease-out;
}

.logo:hover {
  transform: rotate(360deg) scale(1.1);
}

@keyframes rotateIn {
  from {
    transform: rotate(-180deg) scale(0);
    opacity: 0;
  }
  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent-color) !important;
  font-family: momcakebold, sans-serif;
  font-display: swap;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
  text-shadow: 0 0 10px rgba(203, 203, 203, 0.5);
}

.navbar-nav .nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  margin: 0 .5rem;
  position: relative;
  transition: all .3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--accent-color) !important;
  transform: translateY(-2px);
}

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

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

/* NEW: Staggered nav item animation */

.navbar-nav .nav-item {
  animation: fadeInRight 0.5s ease-out backwards;
}

.navbar-nav .nav-item:nth-child(1) {
  animation-delay: 0.1s;
}

.navbar-nav .nav-item:nth-child(2) {
  animation-delay: 0.2s;
}

.navbar-nav .nav-item:nth-child(3) {
  animation-delay: 0.3s;
}

.navbar-nav .nav-item:nth-child(4) {
  animation-delay: 0.4s;
}

.navbar-nav .nav-item:nth-child(5) {
  animation-delay: 0.5s;
}

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

.navbar-toggler {
  border: 0;
  padding: .25rem .5rem;
  transition: transform 0.3s ease;
}

.navbar-toggler:hover {
  transform: rotate(90deg);
}

.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%28148, 137, 121, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* =========================
   HERO SECTION
   ========================= */

.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: black url(../../assets/img/headerimg/terms_rouell.webp?h=65a70e8849e1d664752b951e03fc2347) no-repeat center;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: black url(../../assets/img/headerimg/terms_rouell.webp?h=65a70e8849e1d664752b951e03fc2347) no-repeat center top 0;
  background-size: cover;
  pointer-events: none;
  animation: kenBurns 20s ease-in-out infinite alternate;
}

/* NEW: Ken Burns zoom effect */

@keyframes kenBurns {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

/* NEW: Floating particles effect */

.hero::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(2px 2px at 20% 30%, rgba(203, 203, 203, 0.3), transparent), radial-gradient(2px 2px at 60% 70%, rgba(203, 203, 203, 0.2), transparent), radial-gradient(1px 1px at 50% 50%, rgba(203, 203, 203, 0.25), transparent), radial-gradient(2px 2px at 80% 10%, rgba(203, 203, 203, 0.3), transparent);
  background-size: 200% 200%;
  animation: floatingParticles 15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatingParticles {
  0%, 100% {
    background-position: 0% 0%, 100% 100%, 50% 50%, 0% 100%;
  }
  50% {
    background-position: 100% 100%, 0% 0%, 100% 0%, 100% 0%;
  }
}

@media (max-width: 767px) {
  .hero, .hero::before {
    background-position: center left;
  }
}

.hero-content {
  text-align: right;
  z-index: 2;
  position: relative;
  background-color: rgba(44, 44, 44, .5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 2rem;
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  animation: scaleIn 0.8s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
  animation: fadeInUp 1s ease-out;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

/* NEW: Text shimmer effect */

.hero h1::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(203, 203, 203, 0.5), transparent);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.hero p {
  font-size: 1.25rem;
  color: white;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: 0;
  text-align: right;
  animation: fadeInUp 1s ease-out .2s both;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

@media (max-width: 767px) {
  .hero h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .hero-content {
    margin-top: 5rem;
    padding: .5rem;
  }
}

/* =========================
   GLASS CARDS
   ========================= */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
  transition: all 0.4s ease;
  animation: fadeIn 0.6s ease-out;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .4);
  border-color: rgba(203, 203, 203, 0.3);
}

.glass-card-black {
  background: var(--secondary-dark);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
  transition: all 0.4s ease;
  animation: fadeIn 0.6s ease-out;
}

.glass-card-black:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .4);
  border-color: rgba(203, 203, 203, 0.3);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =========================
   BUTTONS
   ========================= */

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  border: 0;
  color: var(--primary-dark);
  padding: .75rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all .3s ease;
  animation: fadeInUp 1s ease-out .4s both;
  position: relative;
  overflow: hidden;
}

/* NEW: Button ripple effect */

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-light), var(--accent-color));
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 20px rgba(148, 137, 121, .4);
  color: var(--primary-dark);
}

.btn-primary:active {
  transform: translateY(-1px) scale(1.02);
}

.btn-outline-light {
  border: 2px solid var(--accent-light);
  color: var(--accent-light);
  padding: .75rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  margin-left: 1rem;
  transition: all .3s ease;
  animation: fadeInUp 1s ease-out .6s both;
  position: relative;
  overflow: hidden;
}

.btn-outline-light::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-light);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn-outline-light:hover::before {
  left: 0;
}

.btn-outline-light:hover {
  color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(223, 208, 184, .3);
  border-color: var(--accent-light);
}

/* =========================
   FEATURES SECTION
   ========================= */

.features {
  padding: 5rem 0;
  background-color: var(--secondary-dark);
}

.feature-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem !important;
  transition: all .5s ease;
  max-height: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUpStagger 0.6s ease-out forwards;
}

/* NEW: Staggered animation for feature cards */

.feature-card:nth-child(1) {
  animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
  animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
  animation-delay: 0.3s;
}

.feature-card:nth-child(4) {
  animation-delay: 0.4s;
}

.feature-card:nth-child(5) {
  animation-delay: 0.5s;
}

.feature-card:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes fadeInUpStagger {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent-color);
  box-shadow: 0 20px 40px rgba(148, 137, 121, .3);
  background: rgba(223, 208, 184, .15);
}

.feature-icon {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  display: inline-block;
  transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
  transform: rotateY(360deg) scale(1.2);
  color: var(--accent-light);
}

.feature-card h3 {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.feature-card:hover h3 {
  color: var(--accent-color);
}

.feature-card p {
  color: var(--text-muted);
  margin-bottom: 0;
  transition: color 0.3s ease;
}

.feature-card:hover p {
  color: var(--text-light);
}

/* =========================
   FOOTER
   ========================= */

.footer {
  background-color: var(--primary-dark);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1rem;
  animation: fadeIn 1s ease-out;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: var(--secondary-dark);
  color: var(--text-light);
  border-radius: 50%;
  text-decoration: none;
  transition: all .3s ease;
  font-size: 1.25rem;
  position: relative;
  overflow: hidden;
}

/* NEW: Social icon pulse animation */

.social-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--accent-color);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
  z-index: -1;
}

.social-icon:hover::before {
  width: 100%;
  height: 100%;
}

.social-icon:hover {
  color: var(--primary-dark);
  transform: translateY(-5px) rotate(360deg);
}

/* NEW: Bounce animation for social icons */

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.social-icon:hover {
  animation: bounce 1s;
}

.footer-text {
  text-align: center;
  color: var(--text-muted);
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  animation: fadeIn 1.5s ease-out;
}

.footer-text a {
  color: var(--text-muted);
  text-decoration: underline;
  transition: all 0.3s ease;
}

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

/* =========================
   UTILITY ANIMATIONS
   ========================= */

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

/* NEW: Pulse animation */

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

/* NEW: Shake animation */

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* NEW: Fade in from left */

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

/* NEW: Rotate in animation */

@keyframes rotateInCenter {
  from {
    transform: rotate(-180deg) scale(0);
    opacity: 0;
  }
  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}

/* =========================
   SCROLL ANIMATIONS
   ========================= */

/* NEW: Apply animations on scroll */

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

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

/* =========================
   PORTFOLIO ITEMS
   ========================= */

.portfolio-item {
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
}

.portfolio-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(203, 203, 203, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

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

.portfolio-item:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero p {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .btn-outline-light {
    margin-left: 0;
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  .feature-card {
    padding: 2rem;
  }
}

/* =========================
   SMOOTH SCROLLING
   ========================= */

html {
  scroll-behavior: smooth;
}

/* NEW: Custom scrollbar styling */

::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--accent-light);
  border-radius: 5px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* =========================
   LOADING ANIMATION
   ========================= */

/* NEW: Page loader */

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-dark);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeOut 0.5s ease-out 2s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--secondary-dark);
  border-top: 5px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

