/* ============================
   Nova Web — Premium Styles
   Apple-inspired aesthetic
   ============================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fff;
  color: #1d1d1f;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

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

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

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

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6e6e73;
  transition: color 0.2s ease;
  position: relative;
  padding: 4px 0;
}

.nav-link:hover,
.nav-link.active {
  color: #1d1d1f;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  transition: width 0.3s ease;
  border-radius: 2px;
}

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

.nav-cta-btn {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff !important;
  padding: 10px 24px !important;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

.nav-cta-btn::after {
  display: none;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1d1d1f;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 30%, #0d1b2a 60%, #1b2838 100%);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url('../images/nova-hero-bg.png') center/cover no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero-subtitle {
  display: block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  color: #fff;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #a78bfa, #2dd4bf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.scroll-indicator span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.3);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.5); }
}

/* --- Sections General --- */
.section {
  padding: 120px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 20px;
  color: #1d1d1f;
}

.section-header p {
  font-size: 1.1rem;
  color: #6e6e73;
  line-height: 1.7;
}

/* --- Services --- */
.services {
  background: #fafafa;
}

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

.service-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 32px;
  border: 1px solid #e8e8ed;
  transition: all 0.4s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #2563eb;
}

.service-icon svg {
  width: 26px;
  height: 26px;
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.service-card p {
  font-size: 0.95rem;
  color: #6e6e73;
  line-height: 1.7;
}

/* --- Portfolio --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.portfolio-card {
  border-radius: 20px;
  overflow: hidden;
  background: #f5f5f7;
  cursor: pointer;
}

.portfolio-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 11;
}

.portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

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

.portfolio-info h3 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.portfolio-info p {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

/* --- About --- */
.about {
  background: #fafafa;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.1);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 400px;
}

.about-content h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.about-content p {
  font-size: 1rem;
  color: #6e6e73;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-stats {
  display: flex;
  gap: 48px;
  margin-top: 40px;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: #6e6e73;
  font-weight: 500;
}

/* --- Contact --- */
.contact {
  background: #fff;
  position: relative;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 64px;
  background: #fafafa;
  border-radius: 24px;
  padding: 56px;
  border: 1px solid #e8e8ed;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1d1d1f;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 14px 16px;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  transition: all 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.btn-submit {
  width: fit-content;
  padding: 14px 36px;
}

.arrow-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.btn-submit:hover .arrow-icon {
  transform: translateX(4px);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 8px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-item svg {
  width: 22px;
  height: 22px;
  color: #2563eb;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 0.9rem;
  color: #6e6e73;
}

/* --- Footer --- */
.footer {
  background: #1d1d1f;
  color: #f5f5f7;
  padding: 80px 0 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 80px;
  margin-bottom: 60px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  margin-top: 16px;
  line-height: 1.6;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #fff;
}

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

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger delays for cards */
.service-card:nth-child(1) { transition-delay: 0.1s; }
.service-card:nth-child(2) { transition-delay: 0.2s; }
.service-card:nth-child(3) { transition-delay: 0.3s; }
.service-card:nth-child(4) { transition-delay: 0.4s; }

.portfolio-card:nth-child(1) { transition-delay: 0.1s; }
.portfolio-card:nth-child(2) { transition-delay: 0.2s; }
.portfolio-card:nth-child(3) { transition-delay: 0.3s; }

/* --- Mobile Nav --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 80px 40px;
    transition: right 0.4s ease;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
  }

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

  .nav-link {
    font-size: 1.2rem;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    display: block;
  }

  .nav-cta-btn {
    margin-top: 16px;
    text-align: center;
    border-radius: 12px !important;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }

  .hero-desc {
    font-size: 1rem;
  }

  .section {
    padding: 80px 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 32px 24px;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 100px 16px 60px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

/* Success state */
.submit-success {
  text-align: center;
  padding: 40px 20px;
}

.submit-success h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.submit-success p {
  color: #6e6e73;
}