/* ===== FirmaNette custom styles ===== */

html {
  scroll-padding-top: 6rem;
}

/* --- Reveal animation base state (activated by JS so no-JS users see content) --- */
.js [data-animate] {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }
  .floating-blob,
  .floating-blob-slow,
  .float-badge,
  .float-badge-slow {
    animation: none !important;
  }
}

/* --- Text gradient --- */
.text-gradient {
  background: linear-gradient(120deg, #2563eb 20%, #38bdf8 55%, #2563eb 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Subtle grid background for hero --- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgb(226 232 240 / 0.6) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(226 232 240 / 0.6) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}
.dark .bg-grid {
  background-image:
    linear-gradient(to right, rgb(51 65 85 / 0.5) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(51 65 85 / 0.5) 1px, transparent 1px);
}

/* --- Glassmorphism --- */
.glass-nav {
  background: rgb(255 255 255 / 0.72);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid rgb(226 232 240 / 0.7);
}
.dark .glass-nav {
  background: rgb(2 6 23 / 0.72);
  border-color: rgb(51 65 85 / 0.5);
}
#navbar.scrolled .glass-nav {
  box-shadow: 0 4px 24px -8px rgb(0 0 0 / 0.12);
}

.glass-card {
  background: rgb(255 255 255 / 0.82);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid rgb(255 255 255 / 0.6);
}
.dark .glass-card {
  background: rgb(15 23 42 / 0.82);
  border-color: rgb(51 65 85 / 0.6);
}

/* --- Nav links --- */
.nav-link {
  padding: 0.5rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(71 85 105);
  transition: color 0.2s, background-color 0.2s;
}
.dark .nav-link { color: rgb(148 163 184); }
.nav-link:hover { color: rgb(37 99 235); background: rgb(239 246 255); }
.dark .nav-link:hover { color: rgb(96 165 250); background: rgb(30 41 59 / 0.6); }

.mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgb(51 65 85);
  transition: background-color 0.2s, color 0.2s;
}
.dark .mobile-link { color: rgb(203 213 225); }
.mobile-link:hover { background: rgb(239 246 255); color: rgb(37 99 235); }
.dark .mobile-link:hover { background: rgb(30 41 59); color: rgb(96 165 250); }

/* --- Floating gradient blobs --- */
@keyframes blob-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.08); }
  66% { transform: translate(-25px, 25px) scale(0.95); }
}
.floating-blob { animation: blob-drift 14s ease-in-out infinite; }
.floating-blob-slow { animation: blob-drift 20s ease-in-out infinite reverse; }

/* --- Floating hero badges --- */
@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.float-badge { animation: badge-float 5s ease-in-out infinite; }
.float-badge-slow { animation: badge-float 6.5s ease-in-out 0.8s infinite; }

/* --- Feature cards --- */
.feature-card {
  border-radius: 1.5rem;
  border: 1px solid rgb(241 245 249);
  background: white;
  padding: 1.75rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.35s;
}
.dark .feature-card {
  background: rgb(15 23 42 / 0.6);
  border-color: rgb(30 41 59);
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgb(191 219 254);
  box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.06), 0 20px 48px -12px rgb(37 99 235 / 0.16);
}
.dark .feature-card:hover { border-color: rgb(30 64 175); }

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  margin-bottom: 1.1rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature-card:hover .feature-icon { transform: scale(1.12) rotate(-4deg); }

.feature-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: rgb(15 23 42);
  margin-bottom: 0.5rem;
}
.dark .feature-title { color: white; }

.feature-text {
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgb(100 116 139);
}
.dark .feature-text { color: rgb(148 163 184); }

/* --- Portfolio cards --- */
.portfolio-card {
  border-radius: 1.5rem;
  background: white;
  border: 1px solid rgb(241 245 249);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s;
}
.dark .portfolio-card {
  background: rgb(15 23 42);
  border-color: rgb(30 41 59);
}
.portfolio-card:hover,
.portfolio-card:focus-visible {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 8px 20px -6px rgb(0 0 0 / 0.1), 0 24px 56px -12px rgb(37 99 235 / 0.22);
}

.portfolio-screen {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 1.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.mock-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mock-logo {
  display: block;
  width: 3.2rem;
  height: 0.85rem;
  border-radius: 999px;
}
.mock-links { display: flex; gap: 0.45rem; }
.mock-links i {
  display: block;
  width: 1.4rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.55);
}

.mock-hero { display: flex; flex-direction: column; gap: 0.55rem; padding-top: 0.4rem; }
.mock-h1 { display: block; width: 72%; height: 0.85rem; border-radius: 999px; }
.mock-h2 { display: block; width: 52%; height: 0.55rem; border-radius: 999px; }
.mock-btn { display: block; width: 5.2rem; height: 1.6rem; border-radius: 0.6rem; margin-top: 0.35rem; }

.mock-tiles {
  margin-top: auto;
  display: flex;
  gap: 0.7rem;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.mock-tiles i {
  display: block;
  flex: 1;
  height: 4.6rem;
  border-radius: 0.9rem;
  background: rgb(255 255 255 / 0.22);
  backdrop-filter: blur(2px);
}
.portfolio-card:hover .mock-tiles { transform: translateY(-3px); }

/* --- Real project screenshots --- */
.portfolio-screen-real {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgb(241 245 249);
}
.dark .portfolio-screen-real { background: rgb(30 41 59); }

.real-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.portfolio-card:hover .real-img,
.portfolio-card:focus-visible .real-img { transform: scale(1.05); }

.live-badge {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgb(6 95 70);
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px -2px rgb(0 0 0 / 0.2);
}
.live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgb(16 185 129);
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgb(16 185 129 / 0.5); }
  50% { opacity: 0.75; box-shadow: 0 0 0 4px rgb(16 185 129 / 0); }
}

.portfolio-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.4rem;
}
.portfolio-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.9rem;
  color: rgb(37 99 235);
  background: rgb(239 246 255);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.35s, color 0.35s;
}
.dark .portfolio-arrow { background: rgb(23 37 84 / 0.6); color: rgb(96 165 250); }
.portfolio-card:hover .portfolio-arrow {
  transform: rotate(45deg) scale(1.1);
  background: rgb(37 99 235);
  color: white;
}

/* --- Pricing --- */
.pricing-card {
  display: flex;
  flex-direction: column;
  border-radius: 1.75rem;
  border: 1px solid rgb(226 232 240);
  background: white;
  padding: 2.25rem 2rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.35s;
}
.dark .pricing-card {
  background: rgb(15 23 42 / 0.6);
  border-color: rgb(30 41 59);
}
.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.06), 0 20px 48px -12px rgb(37 99 235 / 0.15);
}

.pricing-featured {
  border: 2px solid rgb(37 99 235);
  box-shadow: 0 0 0 1px rgb(37 99 235 / 0.08), 0 12px 40px -8px rgb(37 99 235 / 0.28);
}
.dark .pricing-featured { background: rgb(23 37 84 / 0.25); }
.pricing-featured:hover {
  box-shadow: 0 0 0 1px rgb(37 99 235 / 0.12), 0 24px 56px -10px rgb(37 99 235 / 0.38);
}

.price-item {
  position: relative;
  padding-left: 1.9rem;
  font-size: 0.9rem;
  color: rgb(71 85 105);
  line-height: 1.5;
}
.dark .price-item { color: rgb(148 163 184); }
.price-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.12rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background-color: rgb(219 234 254);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 60%;
  background-position: center;
  background-repeat: no-repeat;
}
.dark .price-item::before { background-color: rgb(30 58 138 / 0.5); }

/* --- Process --- */
.process-step {
  position: relative;
  border-radius: 1.5rem;
  background: white;
  border: 1px solid rgb(241 245 249);
  padding: 2rem 1.75rem 1.75rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s;
}
.dark .process-step {
  background: rgb(15 23 42);
  border-color: rgb(30 41 59);
}
.process-step:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px -12px rgb(37 99 235 / 0.15);
}
.process-num {
  display: block;
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(150deg, #2563eb, #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}
.process-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: rgb(15 23 42);
  margin-bottom: 0.5rem;
}
.dark .process-title { color: white; }
.process-text {
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgb(100 116 139);
}
.dark .process-text { color: rgb(148 163 184); }

/* --- FAQ accordion --- */
.faq-item {
  border-radius: 1.25rem;
  border: 1px solid rgb(226 232 240);
  background: white;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.dark .faq-item {
  background: rgb(15 23 42 / 0.6);
  border-color: rgb(30 41 59);
}
.faq-item.open {
  border-color: rgb(147 197 253);
  box-shadow: 0 8px 32px -12px rgb(37 99 235 / 0.18);
}
.dark .faq-item.open { border-color: rgb(30 64 175); }

.faq-question {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: rgb(15 23 42);
  cursor: pointer;
}
.dark .faq-question { color: white; }

.faq-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: rgb(37 99 235);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-item.open .faq-icon { transform: rotate(180deg); }

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-answer > p {
  overflow: hidden;
  padding: 0 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgb(100 116 139);
  transition: padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.dark .faq-answer > p { color: rgb(148 163 184); }
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-item.open .faq-answer > p { padding-bottom: 1.4rem; }

/* --- Form --- */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(30 41 59);
  margin-bottom: 0.45rem;
}
.dark .form-label { color: rgb(226 232 240); }

.form-input {
  width: 100%;
  border-radius: 0.9rem;
  border: 1.5px solid rgb(226 232 240);
  background: rgb(248 250 252);
  padding: 0.8rem 1.1rem;
  font-size: 0.9375rem;
  color: rgb(15 23 42);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.dark .form-input {
  background: rgb(2 6 23 / 0.5);
  border-color: rgb(51 65 85);
  color: white;
}
.form-input::placeholder { color: rgb(148 163 184); }
.form-input:focus {
  border-color: rgb(37 99 235);
  background: white;
  box-shadow: 0 0 0 4px rgb(37 99 235 / 0.12);
}
.dark .form-input:focus { background: rgb(2 6 23); }
.form-input.error { border-color: rgb(239 68 68); }

/* --- Footer --- */
.footer-link {
  color: rgb(100 116 139);
  transition: color 0.2s;
}
.dark .footer-link { color: rgb(148 163 184); }
.footer-link:hover { color: rgb(37 99 235); }
.dark .footer-link:hover { color: rgb(96 165 250); }

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.9rem;
  border: 1px solid rgb(226 232 240);
  color: rgb(100 116 139);
  background: white;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.dark .social-btn {
  background: rgb(15 23 42);
  border-color: rgb(51 65 85);
  color: rgb(148 163 184);
}
.social-btn:hover {
  transform: translateY(-3px);
  color: white;
  background: rgb(37 99 235);
  border-color: rgb(37 99 235);
  box-shadow: 0 8px 20px -6px rgb(37 99 235 / 0.5);
}

/* --- Preloader --- */
@keyframes preload-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
.preloader-bar { animation: preload-slide 1s ease-in-out infinite; }
#preloader { transition: opacity 0.5s ease, visibility 0.5s; }
#preloader.done { opacity: 0; visibility: hidden; }

/* --- Back to top visible state --- */
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
