/* ===== Remnant Finder Website — Custom Styles ===== */
/* Supplements Tailwind CSS CDN */

/* --- Scroll behavior --- */
html {
  scroll-behavior: smooth;
}

/* --- Inter font fine-tuning --- */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Nav: transparent to solid on scroll --- */
.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.nav-scrolled .nav-link {
  color: #0f172a !important;
}
.nav-scrolled .nav-logo-light {
  display: none !important;
}
.nav-scrolled .nav-logo-dark {
  display: block !important;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.animate-on-scroll {
  opacity: 0;
}

.animate-on-scroll.is-visible {
  animation: fadeInUp 0.7s ease-out forwards;
}

.animate-on-scroll.slide-left.is-visible {
  animation: slideInLeft 0.7s ease-out forwards;
}

.animate-on-scroll.slide-right.is-visible {
  animation: slideInRight 0.7s ease-out forwards;
}

/* Staggered children */
.stagger-children.is-visible > *:nth-child(1) {
  animation-delay: 0ms;
}
.stagger-children.is-visible > *:nth-child(2) {
  animation-delay: 120ms;
}
.stagger-children.is-visible > *:nth-child(3) {
  animation-delay: 240ms;
}
.stagger-children.is-visible > *:nth-child(4) {
  animation-delay: 360ms;
}
.stagger-children.is-visible > *:nth-child(5) {
  animation-delay: 480ms;
}

/* --- Hero stone texture overlay --- */
.hero-texture {
  background-image:
    radial-gradient(
      ellipse at 20% 50%,
      rgba(88, 111, 125, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 20%,
      rgba(245, 158, 11, 0.06) 0%,
      transparent 40%
    );
}

/* --- Testimonial carousel --- */
.testimonial-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-dot {
  transition: all 0.3s ease;
}
.testimonial-dot.active {
  background-color: #f59e0b;
  transform: scale(1.3);
}

/* --- CTA Button pulse --- */
.btn-cta {
  position: relative;
  overflow: hidden;
}
.btn-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn-cta:hover::after {
  transform: translateX(100%);
}

/* --- Feature card hover --- */
.feature-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* --- Mobile menu overlay --- */
.mobile-menu {
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
.mobile-menu.open {
  opacity: 1 !important;
  visibility: visible !important;
}

/* --- Smooth scroll offset for anchor links --- */
[id] {
  scroll-margin-top: 80px;
}

/* --- Star rating color --- */
.star-gold {
  color: #f59e0b;
}

/* --- Store badge hover --- */
.store-badge {
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  opacity: 0.9;
}
.store-badge:hover {
  transform: scale(1.05);
  opacity: 1;
}

/* --- Legal pages: table of contents --- */
.toc-link {
  transition:
    color 0.2s ease,
    padding-left 0.2s ease;
}
.toc-link:hover,
.toc-link.active {
  color: #586f7d;
  padding-left: 4px;
}

/* --- Platform detection highlight --- */
.platform-highlight {
  animation: fadeInUp 0.5s ease-out;
  border: 2px solid #f59e0b;
}

/* --- Print styles --- */
@media print {
  nav,
  footer,
  .no-print {
    display: none !important;
  }
  body {
    font-size: 12pt;
  }
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}


/* ===== Blog & long-form content ===== */
.blog-content {
  line-height: 1.75;
  color: #334155;
}
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.75em;
}
.blog-content h1 { font-size: 2rem; }
.blog-content h2 { font-size: 1.6rem; }
.blog-content h3 { font-size: 1.3rem; }
.blog-content h4 { font-size: 1.1rem; }
.blog-content p { margin-bottom: 1.25em; }
.blog-content ul,
.blog-content ol {
  margin: 1em 0 1.5em;
  padding-left: 1.5em;
}
.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }
.blog-content li { margin-bottom: 0.4em; }
.blog-content a {
  color: #586F7D;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.blog-content a:hover { color: #3D4F59; }
.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5em 0;
}
.blog-content blockquote {
  border-left: 4px solid #F59E0B;
  padding: 0.5em 1.25em;
  margin: 1.5em 0;
  color: #475569;
  font-style: italic;
  background: #F8FAFC;
  border-radius: 0.5rem;
}
.blog-content code {
  background: #F1F5F9;
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
}
.blog-content pre {
  background: #0F172A;
  color: #E2E8F0;
  padding: 1.25em;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5em 0;
}
.blog-content iframe {
  max-width: 100%;
  border-radius: 0.75rem;
  margin: 1.5em 0;
}
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
.blog-content th,
.blog-content td {
  border: 1px solid #E2E8F0;
  padding: 0.6em 0.8em;
  text-align: left;
}
.blog-content th {
  background: #F8FAFC;
  font-weight: 700;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
