/* ===== CSS Custom Properties ===== */
:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --secondary: #FF6B6B;
  --accent: #FECA57;
  --dark: #2D3436;
  --light: #F8F9FA;
  --white: #FFFFFF;
  --gradient-start: #6C5CE7;
  --gradient-end: #FD79A8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.15);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: 0.3s ease;
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }

img, svg { display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 800;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  margin-bottom: 8px;
}

.section-header .underline {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  margin: 0 auto;
}

.section-header p {
  color: #636e72;
  margin-top: 16px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
}

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

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

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--white);
  transition: color var(--transition);
}

.navbar.scrolled .nav-logo {
  color: var(--dark);
}

.nav-logo svg {
  width: 40px;
  height: 40px;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

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

.navbar.scrolled .nav-links a {
  color: var(--dark);
}

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

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
  border-radius: 2px;
}

.navbar.scrolled .hamburger span {
  background: var(--dark);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(-45deg, #6C5CE7, #A29BFE, #FD79A8, #6C5CE7);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
  overflow: hidden;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.hero-content {
  flex: 1;
  max-width: 560px;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.hero-content .tagline {
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  margin-bottom: 32px;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-mascot {
  width: 320px;
  height: 320px;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
}

/* Floating decorations */
.floating-decor {
  position: absolute;
  z-index: 1;
  opacity: 0.3;
}

.floating-decor:nth-child(1) { top: 15%; left: 8%; animation: float 5s ease-in-out infinite; }
.floating-decor:nth-child(2) { top: 25%; right: 12%; animation: float 4s ease-in-out infinite 1s; }
.floating-decor:nth-child(3) { bottom: 20%; left: 15%; animation: float 6s ease-in-out infinite 0.5s; }
.floating-decor:nth-child(4) { bottom: 30%; right: 8%; animation: float 3.5s ease-in-out infinite 1.5s; }
.floating-decor:nth-child(5) { top: 50%; left: 50%; animation: float 5.5s ease-in-out infinite 2s; }

/* ===== Services ===== */
.services {
  padding: 100px 0;
  background: var(--light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.service-card .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  transition: transform var(--transition);
}

.service-card:hover .icon {
  animation: wiggle 0.5s ease;
}

.service-card h3 {
  margin-bottom: 12px;
  color: var(--dark);
}

.service-card p {
  color: #636e72;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== Portfolio ===== */
.portfolio {
  padding: 100px 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.portfolio-item {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.portfolio-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.portfolio-visual {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.portfolio-visual svg {
  width: 100%;
  height: 100%;
}

.portfolio-info {
  padding: 24px;
}

.portfolio-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--white);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.portfolio-info h3 {
  margin-bottom: 8px;
}

.portfolio-info p {
  color: #636e72;
  font-size: 0.9rem;
}

/* SVG draw animation */
.draw-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2s ease;
}

.visible .draw-path {
  stroke-dashoffset: 0;
}

/* ===== About ===== */
.about {
  padding: 100px 0;
  background: var(--light);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
}

.about-text {
  max-width: 640px;
  text-align: center;
}

.about-text p {
  color: #636e72;
  font-size: 1.05rem;
  line-height: 1.8;
}

.stats-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  text-align: center;
}

.stat .number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.stat .label {
  font-size: 0.9rem;
  color: #636e72;
  margin-top: 4px;
}

/* ===== Contact ===== */
.contact {
  padding: 100px 0;
}

.contact-wrapper {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.contact-form {
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #dfe6e9;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108,92,231,0.1);
}

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

.contact-info {
  text-align: center;
}

.contact-info-item {
  margin-bottom: 24px;
}

.contact-info-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.contact-info-item p {
  color: #636e72;
}

.form-success {
  display: none;
  text-align: center;
  padding: 48px 24px;
}

.form-success.show {
  display: block;
}

.form-success h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.form-success p {
  color: #636e72;
}

/* ===== Footer ===== */
.footer-wave {
  width: 100%;
  display: block;
  margin-bottom: -2px;
}

.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-links h4,
.footer-social h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.social-icons a:hover {
  background: var(--primary);
}

.social-icons svg {
  width: 18px;
  height: 18px;
  fill: var(--white);
}

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

/* ===== Animations ===== */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

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

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scroll-triggered animation classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.animate-slide-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-slide-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.hero-cta {
  animation: pulse 2.5s ease-in-out infinite;
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
  }

  .contact-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }

  .contact-info {
    text-align: left;
    min-width: 240px;
  }

  .about-content {
    flex-direction: row;
    text-align: left;
  }

  .about-text {
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hamburger { display: none !important; }
}

@media (max-width: 1023px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    transition: right var(--transition);
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    color: var(--dark) !important;
    font-size: 1.1rem;
  }

  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-mascot {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 480px) {
  .stats-row {
    gap: 24px;
  }

  .stat .number {
    font-size: 2rem;
  }
}
