/* ============================================
   Pixtree.ai Official Website - Custom Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Navigation ---- */
.nav-glass {
  background: rgba(0, 0, 0, 0);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease;
}

.nav-glass.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.nav-link {
  position: relative;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: opacity 0.3s ease;
}

.nav-link:hover {
  opacity: 0.7;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ffffff;
}

/* ---- Hero Section ---- */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .hero-section {
    height: auto;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .hero-bg {
    background-position: 75% center;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0.4) 100%
  );
}

/* ---- Ghost Button ---- */
.ghost-btn {
  display: inline-block;
  padding: 12px 36px;
  border: 1.5px solid #ffffff;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: all 0.35s ease;
  cursor: pointer;
  background: transparent;
}

.ghost-btn:hover {
  background: #ffffff;
  color: #0a0a0a;
}

.ghost-btn-dark {
  border-color: #0a0a0a;
  color: #0a0a0a;
}

.ghost-btn-dark:hover {
  background: #0a0a0a;
  color: #ffffff;
}

.primary-btn {
  display: inline-block;
  padding: 14px 40px;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: all 0.35s ease;
  cursor: pointer;
  border: none;
}

.primary-btn:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

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

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

.fade-in {
  opacity: 0;
  transition: opacity 1s ease;
}

.fade-in.visible {
  opacity: 1;
}

.slide-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.slide-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children */
.stagger-children .fade-up:nth-child(1) { transition-delay: 0s; }
.stagger-children .fade-up:nth-child(2) { transition-delay: 0.15s; }
.stagger-children .fade-up:nth-child(3) { transition-delay: 0.3s; }
.stagger-children .fade-up:nth-child(4) { transition-delay: 0.45s; }
.stagger-children .fade-up:nth-child(5) { transition-delay: 0.6s; }

/* ---- Video Section ---- */
.video-cover {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s ease, scale 0.4s ease;
  background: rgba(0, 0, 0, 0.3);
}

.video-play-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  scale: 1.1;
}

.video-play-btn svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
  margin-left: 4px;
}

/* ---- Feature Cards ---- */
.feature-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* ---- Section Spacing ---- */
.section-dark {
  background-color: #0a0a0a;
  color: #ffffff;
}

.section-light {
  background-color: #ffffff;
  color: #1f2937;
}

.section-gray {
  background-color: #f9fafb;
  color: #1f2937;
}

.section-deep {
  background-color: #111111;
  color: #ffffff;
}

/* ---- Image Hover ---- */
.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.6s ease;
}

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

/* ---- Feature Tags ---- */
.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.04);
}

/* ---- Spec Table ---- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spec-table td {
  padding: 16px 0;
  font-size: 0.9rem;
}

.spec-table td:first-child {
  color: rgba(255, 255, 255, 0.5);
  width: 40%;
  font-weight: 400;
}

.spec-table td:last-child {
  color: #ffffff;
  font-weight: 400;
}

.spec-table-light tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.spec-table-light td:first-child {
  color: #6b7280;
}

.spec-table-light td:last-child {
  color: #1f2937;
}

/* ---- Mobile Menu ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  transition: opacity 0.3s ease;
}

.mobile-menu a:hover {
  opacity: 0.6;
}

/* ---- Hamburger ---- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 110;
}

.hamburger span {
  width: 24px;
  height: 1.5px;
  background: #ffffff;
  transition: all 0.3s ease;
}

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

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

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

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

/* ---- FAQ Search ---- */
.faq-search-input {
  font-family: 'Inter', sans-serif;
}

.faq-search-input::placeholder {
  color: #9ca3af;
}

/* ---- FAQ Pill Tags ---- */
.faq-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.faq-pill-guide {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid rgba(29, 78, 216, 0.15);
}

.faq-pill-video {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

/* ---- FAQ Group ---- */
.faq-group {
  transition: opacity 0.3s ease;
}

/* ---- FAQ Question Text ---- */
.faq-question-text {
  flex: 1;
  text-align: left;
  padding-right: 8px;
}
.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.faq-question {
  width: 100%;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  color: #1f2937;
  cursor: pointer;
  text-align: left;
  font-family: 'Inter', sans-serif;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
  transition: padding-bottom 0.4s ease;
}

.faq-item.open .faq-answer-inner {
  padding-bottom: 20px;
}

.faq-answer-content {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.7;
}

.faq-answer-content p,
.faq-answer-content ul,
.faq-answer-content ol {
  margin-bottom: 0.85rem;
}

.faq-answer-content p:last-child,
.faq-answer-content ul:last-child,
.faq-answer-content ol:last-child {
  margin-bottom: 0;
}

.faq-answer-content ul,
.faq-answer-content ol {
  padding-left: 1.25rem;
}

.faq-answer-content ul {
  list-style: disc;
}

.faq-answer-content ol {
  list-style: decimal;
}

.faq-answer-content li + li {
  margin-top: 0.35rem;
}

.faq-answer-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.faq-answer-content strong {
  color: #374151;
  font-weight: 600;
}

/* ---- News Carousel ---- */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.news-arrow {
  transition: all 0.3s ease;
}

.news-arrow:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: scale(1.05);
}

.news-arrow:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .news-carousel {
    gap: 0.5rem;
  }
  .news-carousel-track {
    gap: 1rem;
  }
  .news-carousel-track .feature-card {
    width: 300px;
  }
  .news-arrow {
    width: 2rem;
    height: 2rem;
  }
  .news-arrow svg {
    width: 1rem;
    height: 1rem;
  }
}

/* ---- Store Entry (Magazine Editorial) ---- */
.store-entry {
  transition: opacity 0.4s ease;
}

.store-entry:hover {
  opacity: 0.85;
}

.store-number {
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

/* ---- Footer ---- */
.footer-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #ffffff;
}

.social-icon {
  width: 20px;
  height: 20px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.social-icon:hover {
  opacity: 1;
}

/* ---- Parallax subtle ---- */
@media (min-width: 1024px) {
  .parallax-bg {
    background-attachment: fixed;
  }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ---- Responsive Typography ---- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem !important;
  }
  .section-title {
    font-size: 2rem !important;
  }
}

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

/* ---- Terms Modal ---- */
.terms-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  overflow-y: auto;
}

.terms-overlay.open {
  display: block;
}

.terms-modal {
  position: relative;
  max-width: 720px;
  margin: 60px auto;
  background: #fff;
  border-radius: 12px;
}

.terms-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  background: #fff;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid #e5e7eb;
  z-index: 10;
}

.terms-header-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111;
}

.terms-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: #9ca3af;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}

.terms-close:hover {
  color: #4b5563;
}

.terms-body {
  padding: 0 28px 28px;
  max-height: 70vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .terms-modal {
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
  }
  .terms-header {
    border-radius: 0;
    padding: 14px 16px;
  }
  .terms-close {
    font-size: 2rem;
    padding: 4px 8px;
  }
  .terms-body {
    padding: 0 20px 24px;
    max-height: none;
  }
}

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