/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
  --primary-color: #c3073f;
  --primary-dark: #950740;
  --secondary-color: #1f1f1f;
  --background-dark: #0b0c10;
  --text-light: #ffffff;
  --text-gray: #c5c6c7;
  --accent-color: #66fcf1;
  --gradient-primary: linear-gradient(135deg, #c3073f 0%, #950740 100%);
  --gradient-dark: linear-gradient(180deg, rgba(11, 12, 16, 0.95) 0%, rgba(31, 31, 31, 0.9) 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--background-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul {
  list-style: none;
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-gray);
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   Container & Layout
   =========================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===========================
   Header & Navigation
   =========================== */
header {
  background-color: rgba(31, 31, 31, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

header.scrolled {
  padding: 0.5rem 0;
  background-color: rgba(31, 31, 31, 0.98);
}

.navbar {
  width: 100%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-light);
  transition: var(--transition-normal);
}

.logo:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.logo-img {
  height: 40px;
  width: 40px;
  object-fit: contain;
}

.logo-text {
  font-family: 'Poppins', sans-serif;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-light);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition-normal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-normal);
}

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

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-light);
  border-radius: 3px;
  transition: var(--transition-normal);
}

.hamburger.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-image: url('../images/background.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 120px 20px 60px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-dark);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: fadeInUp 1s ease;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  animation: fadeInUp 1s ease 0.2s both;
}

.emoji-icon {
  display: inline-block;
  font-size: 3rem;
  animation: bounce 2s infinite;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-gray);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.6s both;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition-normal);
  cursor: pointer;
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(195, 7, 63, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(195, 7, 63, 0.6);
}

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

.btn-secondary:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(195, 7, 63, 0.4);
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-gray);
  font-size: 0.9rem;
  animation: fadeIn 1s ease 1s both;
}

.scroll-arrow {
  width: 2px;
  height: 30px;
  background: var(--text-gray);
  position: relative;
  animation: scrollDown 2s infinite;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-gray);
  border-bottom: 2px solid var(--text-gray);
  transform: translateX(-50%) rotate(45deg);
}

/* ===========================
   Features Section
   =========================== */
.features {
  padding: 100px 20px;
  background-color: var(--background-dark);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--secondary-color);
  padding: 2.5rem;
  border-radius: 15px;
  text-align: center;
  transition: var(--transition-normal);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  transition: var(--transition-normal);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.feature-description {
  color: var(--text-gray);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.feature-list {
  text-align: left;
  color: var(--text-gray);
  padding-left: 1.5rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* ===========================
   About Section
   =========================== */
.about {
  padding: 100px 20px;
  background: linear-gradient(180deg, var(--background-dark) 0%, var(--secondary-color) 100%);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: var(--text-gray);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-size: 1.05rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--background-dark);
  border-radius: 10px;
  border: 2px solid var(--primary-color);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-family: 'Poppins', sans-serif;
}

.stat-label {
  color: var(--text-gray);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.code-preview {
  background: var(--background-dark);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--primary-color);
}

.code-header {
  background: #1a1a1a;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-content {
  padding: 1.5rem;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-gray);
}

.code-content code {
  color: var(--accent-color);
}

/* ===========================
   How It Works Section
   =========================== */
.how-it-works {
  padding: 100px 20px;
  background-color: var(--background-dark);
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.step {
  background: var(--secondary-color);
  padding: 2.5rem;
  border-radius: 15px;
  text-align: center;
  position: relative;
  transition: var(--transition-normal);
  border: 2px solid transparent;
}

.step:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 15px rgba(195, 7, 63, 0.4);
}

.step-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.step-description {
  color: var(--text-gray);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.code-snippet {
  background: var(--background-dark);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  text-align: left;
}

.code-snippet code {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--accent-color);
}

/* ===========================
   Contact Section
   =========================== */
.contact {
  padding: 100px 20px;
  background: linear-gradient(180deg, var(--background-dark) 0%, var(--secondary-color) 100%);
}

.contact-form {
  max-width: 700px;
  margin: 0 auto;
  background: var(--background-dark);
  padding: 3rem;
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--primary-color);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-light);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--secondary-color);
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--text-light);
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  transition: var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(195, 7, 63, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  width: 100%;
  margin-top: 1rem;
}

.form-message {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  display: none;
}

.form-message.success {
  background: rgba(39, 201, 63, 0.1);
  border: 2px solid #27c93f;
  color: #27c93f;
  display: block;
}

.form-message.error {
  background: rgba(255, 95, 86, 0.1);
  border: 2px solid #ff5f56;
  color: #ff5f56;
  display: block;
}

/* ===========================
   Footer
   =========================== */
.footer {
  background-color: var(--secondary-color);
  padding: 3rem 20px 1.5rem;
  border-top: 2px solid var(--primary-color);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.footer-section p {
  color: var(--text-gray);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-gray);
  transition: var(--transition-normal);
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

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

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(195, 7, 63, 0.6);
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@keyframes scrollDown {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(15px);
    opacity: 0;
  }
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    max-width: 300px;
    height: calc(100vh - 70px);
    background: rgba(31, 31, 31, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    right: 0;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .emoji-icon {
    font-size: 2rem;
  }

  .btn {
    padding: 0.875rem 2rem;
    font-size: 0.9rem;
  }

  .contact-form {
    padding: 2rem 1.5rem;
  }
}

/* ===========================
   Utility Classes
   =========================== */
[data-aos] {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
  opacity: 1;
}

[data-aos="fade-up"] {
  transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
}

[data-aos="fade-right"] {
  transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
  transform: translateX(0);
}

[data-aos="fade-left"] {
  transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
}
