/**
 * Product Premium – Apple-style gradients, typography, spacing, and animations.
 * Reference: apple.com – minimal copy, one product per section, light/dark alternation.
 * Applied to main Allpixel site only (not Allinvoice).
 */

/* ---- Apple-like typography (SF Pro on Mac, system elsewhere) ---- */
.product-section,
#our-products-section,
.index-page .hero .hero-content {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", sans-serif;
}
.product-section .section-header .display-5,
.product-section .section-header h2,
#our-products-section h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", sans-serif;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem) !important;
}
.product-section .section-header .lead {
  font-size: 1.25rem !important;
  font-weight: 400;
  letter-spacing: 0;
  opacity: 0.9;
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Full-section layout (one product per “screen” like Apple) ---- */
.product-section {
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 3.5rem !important;
  padding-bottom: 3.5rem !important;
}
.product-section .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.product-section .section-header {
  margin-bottom: 2rem !important;
}
.product-section .allopen-boxes-container {
  margin-top: 0 !important;
}

/* ---- Reduced motion: respect user preference ---- */
@media (prefers-reduced-motion: reduce) {
  .product-section .reveal-on-scroll,
  .product-section .reveal-scale,
  .product-section .reveal-from-left,
  .product-section .reveal-from-right {
    transition-duration: 0.01ms !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .product-premium-card,
  .allopen-box,
  .tech-card.product-page-main,
  .tech-card.product-page-cta {
    transition: none !important;
  }
}

/* ---- Product section backgrounds (Apple: clear light/dark alternation) ---- */
/* Generic theme classes for future products */
.product-section.product-theme-light {
  background: #fbfbfd;
  transition: background 0.6s ease;
}
.product-section.product-theme-light .section-header .display-5,
.product-section.product-theme-light .section-header h2 { color: #1d1d1f !important; }
.product-section.product-theme-light .section-header .lead { color: #6e6e73 !important; }

.product-section.product-theme-dark {
  background: #000000;
  transition: background 0.6s ease;
}
.product-section.product-theme-dark .section-header .display-5,
.product-section.product-theme-dark .section-header h2 { color: #f5f5f7 !important; }
.product-section.product-theme-dark .section-header .lead { color: rgba(245, 245, 247, 0.85) !important; }
.product-section.product-theme-dark .allopen-box-title,
.product-section.product-theme-dark .allopen-box-desc { color: #f5f5f7 !important; }

/* Product detail page shell (scoped to avoid cross-page CSS collisions) */
.product-detail-page .product-hero-shell {
  background: #000 !important;
  color: #fff !important;
  min-height: calc(100vh - 70px) !important;
  margin-top: 70px !important;
  display: flex !important;
  align-items: center !important;
}
.product-detail-page .product-hero-shell .container,
.product-detail-page .product-hero-shell .hero-content-wrapper,
.product-detail-page .product-hero-shell .hero-text-section,
.product-detail-page .product-hero-shell .hero-screenshot-section {
  visibility: visible !important;
  opacity: 1 !important;
}
.product-detail-page .product-hero-shell .hero-content-wrapper {
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-height: calc(80vh - 70px);
  display: flex;
}
.product-detail-page .product-hero-shell .hero-text-section {
  max-width: 760px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.product-detail-page .product-hero-shell .product-hero-title,
.product-detail-page .product-hero-shell .product-hero-subtitle {
  color: #fff !important;
}
.product-detail-page .product-hero-shell .product-hero-title {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.product-detail-page .product-hero-shell .product-hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.85) !important;
}
.product-detail-page .product-hero-shell .hero-screenshot-section {
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-detail-page .product-hero-shell .mobile-screenshot-container {
  width: 100%;
  max-width: 300px;
  padding: 14px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.08) 0%, rgba(0, 0, 0, 0.35) 100%);
  border: 1px solid rgba(0, 242, 254, 0.22);
}
.product-detail-page .product-hero-shell .mobile-screenshot {
  width: 100%;
  border-radius: 22px;
  display: block;
}
@media (max-width: 992px) {
  .product-detail-page .product-hero-shell .hero-content-wrapper {
    flex-direction: column !important;
  }
}

/* Safety fallback: product detail pages should never hide content
   even if reveal observer JS is missing or fails on a new page. */
.allconnect-page .reveal-on-scroll,
.allconnect-page .reveal-from-left,
.allconnect-page .reveal-from-right,
.allconnect-page .reveal-scale {
  opacity: 1;
  transform: none;
}

/* Allinvoice: solid light (Apple “white” section) */
#allinvoice-section {
  background: #fbfbfd;
  transition: background 0.6s ease;
}
#allinvoice-section .section-header .display-5,
#allinvoice-section .section-header h2 { color: #1d1d1f !important; }
#allinvoice-section .section-header .lead { color: #6e6e73 !important; }

/* AllOpen: solid dark (Apple “black” section, e.g. Studio Display) */
#allopen-section {
  background: #000000;
  transition: background 0.6s ease;
}
#allopen-section .section-header .display-5,
#allopen-section .section-header h2 { color: #f5f5f7 !important; }
#allopen-section .section-header .lead { color: rgba(245, 245, 247, 0.85) !important; }

/* AllTask: solid light (Apple “white” section) */
#alltask-section {
  background: #fbfbfd;
  transition: background 0.6s ease;
}
#alltask-section .section-header .display-5,
#alltask-section .section-header h2 { color: #1d1d1f !important; }
#alltask-section .section-header .lead { color: #6e6e73 !important; }

/* AllConnect: solid light */
#allconnect-section {
  background: #fbfbfd;
  transition: background 0.6s ease;
}
#allconnect-section .section-header .display-5,
#allconnect-section .section-header h2 { color: #1d1d1f !important; }
#allconnect-section .section-header .lead { color: #6e6e73 !important; }

/* AllVideo: solid dark */
#allvideo-section {
  background: #000000 !important;
  transition: background 0.6s ease;
}
#allvideo-section .section-header .display-5,
#allvideo-section .section-header h2 { color: #f5f5f7 !important; }
#allvideo-section .section-header .lead { color: rgba(245, 245, 247, 0.85) !important; }

/* AllinLocal: solid dark */
#allin-local-section {
  background: #000000;
  transition: background 0.6s ease;
}
#allin-local-section .section-header .display-5,
#allin-local-section .section-header h2 { color: #f5f5f7 !important; }
#allin-local-section .section-header .lead { color: rgba(245, 245, 247, 0.85) !important; }

/* Allin Platform: dark gradient (premium contrast) */
#allin-details-section.allin-platform-section,
.allin-platform-section#allin-details-section {
  background: #000000;
  transition: background 0.6s ease;
}

/* Our Products heading – minimal, Apple-like */
#our-products-section {
  padding-top: 2.5rem !important;
  padding-bottom: 0.5rem !important;
  background: transparent;
}
#our-products-section h2 {
  font-size: clamp(2rem, 4.5vw, 3rem) !important;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: #f5f5f7 !important;
}
#our-products-section p {
  font-size: 1.25rem;
  color: rgba(245, 245, 247, 0.8) !important;
}

/* ---- Smoother scroll reveal (premium feel) ---- */
.product-section .reveal-on-scroll {
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-section .reveal-on-scroll.reveal-stagger-1 { transition-delay: 0.08s; }
.product-section .reveal-on-scroll.reveal-stagger-2 { transition-delay: 0.18s; }
.product-section .reveal-on-scroll.reveal-stagger-3 { transition-delay: 0.28s; }
.product-section .reveal-on-scroll.reveal-stagger-4 { transition-delay: 0.38s; }
.product-section .reveal-on-scroll.reveal-stagger-5 { transition-delay: 0.48s; }

/* ---- Product cards: subtle float + shadow (Apple-style) ---- */
.product-section .allopen-box {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.3s ease;
  will-change: transform;
}
.product-section .allopen-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Light-background sections: card hover */
#allinvoice-section .allopen-box:hover,
#alltask-section .allopen-box:hover {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.product-section.product-theme-light .allopen-box:hover {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* Product logo: subtle scale on card hover */
.product-section .allopen-box .product-logo-container {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-section .allopen-box:hover .product-logo-container {
  transform: scale(1.04);
}
.product-section .allopen-box:hover .product-logo {
  filter: drop-shadow(0 4px 12px rgba(0, 242, 254, 0.2));
}

/* AllConnect specific logo shape */
.allconnect-logo-circle {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  object-fit: cover;
}

/* ---- Apple-style: no rounded corners on product display containers ---- */
.product-section .allopen-box,
#allinvoice-section .allopen-box,
#allopen-section .allopen-box,
#alltask-section .allopen-box,
#allin-local-section .allopen-box,
.hindi-technology-section .allopen-box,
.product-section .allopen-boxes-container,
.product-section .tech-card,
.tech-card.product-page-main,
.tech-card.product-page-cta {
  border-radius: 0 !important;
}

/* ---- Gradient on product boxes only (Apple-style: each box its own gradient) ---- */
#allinvoice-section .allopen-box {
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 45%, #e0f2fe 100%) !important;
  border: 1px solid rgba(14, 165, 233, 0.12) !important;
}
#allopen-section .allopen-box {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.4) 0%, rgba(30, 41, 59, 0.6) 50%, rgba(15, 23, 42, 0.7) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
#alltask-section .allopen-box {
  background: linear-gradient(180deg, #f8fafc 0%, #e8f4fc 40%, #dbeafe 100%) !important;
  border: 1px solid rgba(59, 130, 246, 0.15) !important;
}
#allconnect-section .allopen-box {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #eef2f7 100%) !important;
  border: 1px solid rgba(2, 6, 23, 0.12) !important;
}
#allvideo-section .allopen-box {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96) 0%, rgba(3, 7, 18, 0.97) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}
#allvideo-section .allopen-box-title,
#allvideo-section .allopen-box-desc {
  color: #f5f5f7 !important;
}
#allin-local-section .allopen-box {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(6, 95, 70, 0.25) 50%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1px solid rgba(20, 184, 166, 0.2) !important;
}
/* Second box in AllinLocal (For Service Providers) – override inline if needed; keep teal accent */
#allin-local-section .allopen-boxes-container .allopen-box:nth-child(2) {
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.35) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
  border: 1px solid rgba(0, 242, 254, 0.25) !important;
}

/* ---- Section headers: clear hierarchy (product name + tagline) ---- */
.product-section .section-header .display-5,
.product-section .section-header h2 {
  letter-spacing: -0.02em;
  font-weight: 700;
  transition: opacity 0.5s ease;
}
.product-section .section-header .lead {
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  opacity: 0.9;
}

/* ---- Product page cards (Alltask, AllinLocal, Allin standalone) ---- */
.tech-card.product-page-main,
.tech-card.product-page-cta {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.tech-card.product-page-main:hover,
.tech-card.product-page-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* ---- Hero CTA buttons on product pages ---- */
.hero-cta-button,
.allin-hero .hero-cta-button {
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.hero-cta-button:hover,
.allin-hero .hero-cta-button:hover {
  transform: scale(1.02);
  opacity: 0.95;
}
.hero-cta-button:active,
.allin-hero .hero-cta-button:active {
  transform: scale(0.98);
}

/* ---- Allin platform hero block ---- */
.allin-platform-hero,
.allin-platform-copy {
  transition: opacity 0.5s ease;
}

/* ---- General tech-card used in product/feature sections ---- */
.product-section .tech-card,
#features-section .tech-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.product-section .tech-card:hover,
#features-section .tech-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

/* ---- Hero: Apple-like first fold (minimal, spacious) ---- */
.index-page .hero {
  min-height: 100vh;
  padding: 2rem 0 4rem;
}
.index-page .hero .hero-content h1,
.index-page .hero .hero-content .display-5 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", sans-serif !important;
  font-size: clamp(2.75rem, 8vw, 4.5rem) !important;
  font-weight: 600 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.08 !important;
  color: #f5f5f7 !important;
  text-shadow: none;
}
.index-page .hero .hero-content .lead {
  font-size: 1.35rem !important;
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(245, 245, 247, 0.85) !important;
  margin-bottom: 2rem !important;
}
.index-page .hero .hero-content .d-flex {
  gap: 1rem;
}
.index-page .hero .hero-button {
  border-radius: 980px;
  padding: 12px 24px;
  font-size: 1.05rem;
  font-weight: 500;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.index-page .hero .hero-button:hover {
  transform: scale(1.02);
  opacity: 0.95;
}
.index-page .hero .hero-button:active {
  transform: scale(0.98);
}

/* ---- Product strip: centered, white background, responsive all screen sizes ---- */
.product-strip-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.product-strip-wrapper .product-strip-inner {
  display: flex;
  align-items: center;
  max-width: 640px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  gap: 0;
  position: relative;
  box-sizing: border-box;
  padding: 0 0.5rem;
}
.product-strip-scroll {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0 0.75rem;
}
.product-strip-scroll::-webkit-scrollbar {
  display: none;
}
.product-strip-item {
  flex-shrink: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  padding: 0.5rem 1.1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", sans-serif;
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  font-weight: 500;
  color: #6e6e73;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
  transition: font-size 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              font-weight 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.35s ease,
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              background 0.35s ease;
}
.product-strip-item:hover {
  color: #1d1d1f;
}
.product-strip-item.active {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 700;
  color: #1d1d1f;
  background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
  transform: scale(1.06);
  z-index: 2;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.product-strip-arrow {
  flex-shrink: 0;
  width: clamp(36px, 10vw, 44px);
  height: clamp(36px, 10vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  font-size: clamp(0.7rem, 2vw, 1rem);
}
.product-strip-arrow:hover {
  background: #e8e8ed;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transform: scale(1.05);
}
.product-strip-arrow:active {
  transform: scale(0.96);
}
@media (max-width: 992px) {
  .product-strip-wrapper { padding: 1.1rem 0.85rem; }
  .product-strip-inner { max-width: 100%; padding: 0 0.4rem; }
  .product-strip-scroll { gap: 0.65rem; padding: 0 0.6rem; }
  .product-strip-item { padding: 0.48rem 1rem; }
  .product-strip-item.active { transform: scale(1.05); }
}
@media (max-width: 768px) {
  .product-strip-wrapper { padding: 1rem 0.75rem; }
  .product-strip-inner { padding: 0 0.35rem; }
  .product-strip-scroll { gap: 0.5rem; padding: 0 0.5rem; }
  .product-strip-item { padding: 0.45rem 0.9rem; }
  .product-strip-item.active { transform: scale(1.04); }
}
@media (max-width: 480px) {
  .product-strip-wrapper { padding: 0.75rem 0.5rem; }
  .product-strip-inner { padding: 0 0.25rem; }
  .product-strip-scroll { gap: 0.4rem; padding: 0 0.4rem; }
  .product-strip-item { padding: 0.4rem 0.75rem; }
  .product-strip-item.active { transform: scale(1.03); }
}
@media (max-width: 360px) {
  .product-strip-wrapper { padding: 0.6rem 0.4rem; }
  .product-strip-item { padding: 0.35rem 0.65rem; font-size: 0.65rem; }
  .product-strip-item.active { font-size: 0.8rem; }
  .product-strip-arrow { width: 32px; height: 32px; font-size: 0.65rem; }
}
@media (min-width: 1200px) {
  .product-strip-wrapper .product-strip-inner { max-width: 680px; }
}
