/* ============================================
   PackFood Landing — Custom Styles
   Aesthetic: Swiss Industrial Precision
   ============================================ */

/* --- Base & Scroll --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.35s; }
.reveal-delay-5 { transition-delay: 0.4s; }

/* --- Navigation --- */
.nav-scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
}
.nav-scrolled .nav-logo-text { color: #1A1A2E; }

/* --- Hero Grain Overlay --- */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* --- Dashboard Mockup --- */
.dashboard-mockup {
  perspective: 1200px;
}
.dashboard-screen {
  background: #ffffff;
  border-radius: 12px;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.04),
    0 8px 24px rgba(0,0,0,0.08),
    0 24px 48px rgba(0,0,0,0.06);
  transform: rotateY(-4deg) rotateX(2deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.dashboard-mockup:hover .dashboard-screen {
  transform: rotateY(-1deg) rotateX(0.5deg);
}
.phone-overlay {
  position: absolute;
  bottom: -24px;
  right: -20px;
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.06),
    0 12px 32px rgba(0,0,0,0.12);
  transform: rotateY(-2deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 10;
}
.dashboard-mockup:hover .phone-overlay {
  transform: rotateY(0deg) translateY(-4px);
}

/* --- Mockup internal elements --- */
.mock-bar {
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
}
.mock-bar-accent {
  background: #F47216;
}
.mock-bar-green {
  background: #22c55e;
}
.mock-bar-blue {
  background: #3b82f6;
}
.mock-chart-bar {
  border-radius: 3px 3px 0 0;
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Feature Illustrations --- */
.feature-illustration {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFF4EB 0%, #fff 100%);
  border: 1px solid rgba(244, 114, 22, 0.08);
}
.feature-illustration::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(244, 114, 22, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Calendar Illustration --- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #f3f4f6;
  transition: background 0.3s ease, transform 0.3s ease;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}
.cal-cell.active {
  background: rgba(244, 114, 22, 0.15);
  color: #F47216;
  font-weight: 600;
}
.cal-cell.highlight {
  background: #F47216;
  color: white;
  font-weight: 700;
}

/* --- Phone Illustration --- */
.phone-frame {
  background: #1A1A2E;
  border-radius: 28px;
  padding: 8px;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.1),
    0 16px 40px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
.phone-screen {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
}
.phone-notch {
  width: 80px;
  height: 6px;
  background: #1A1A2E;
  border-radius: 3px;
  margin: 6px auto 0;
}

/* --- Workflow Illustration --- */
.workflow-node {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.workflow-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 114, 22, 0.15);
}
.workflow-connector {
  height: 2px;
  background: linear-gradient(90deg, #F47216, #F4721633);
}

/* --- Stats Counter --- */
@keyframes countUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-number {
  animation: countUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- Pain Point Cards --- */
.pain-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.pain-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.pain-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #F47216, #D4630F);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.pain-card:hover::before {
  transform: scaleX(1);
}

/* --- Standard Cards --- */
.standard-card {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.standard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* --- Step Cards --- */
.step-connector {
  position: relative;
}
.step-connector::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -2rem;
  width: 4rem;
  height: 2px;
  background: linear-gradient(90deg, #F47216, transparent);
}
/* Below md the steps stack, so the connector turns vertical. It has to sit
   entirely inside the 2rem grid gap — a taller line would overlap the last
   line of the step's own paragraph. 767.98px keeps this off Tailwind's `md`
   (min-width: 768px), which is where md:grid-cols-3 takes over. */
@media (max-width: 767.98px) {
  .step-connector::after {
    top: auto;
    bottom: -2rem;
    right: 50%;
    width: 2px;
    height: 1.5rem;
    background: linear-gradient(180deg, #F47216, transparent);
    transform: translateX(50%);
  }
}

/* --- CTA Section --- */
.cta-section {
  background:
    linear-gradient(135deg, #F47216 0%, #D4630F 50%, #c0560a 100%);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.cta-section::after {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Contact Form --- */
.form-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
  border-color: #F47216;
  box-shadow: 0 0 0 3px rgba(244, 114, 22, 0.1);
  outline: none;
}

/* --- Mobile Menu --- */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.mobile-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* --- Geometric Decorators --- */
.geo-dots {
  background-image: radial-gradient(circle, #e5e7eb 1px, transparent 1px);
  background-size: 16px 16px;
}

/* --- Section Divider Wave --- */
.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Subtle Link Underline --- */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #F47216;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover::after {
  width: 100%;
}

/* --- Feature row alternation --- */
/* Grid tracks are auto-sized, so a column whose min-content is wider than the
   row (e.g. the nowrap/truncated report filenames) would push the track past
   the container and get clipped. min-width: 0 lets the track shrink. */
.feature-row > * {
  min-width: 0;
}
/* Only meaningful in the two-column layout; below lg the row is single-column
   and rtl would send any overflow off the unreachable left edge.
   1024px must stay in sync with Tailwind's `lg` (the rows use lg:grid-cols-2). */
@media (min-width: 1024px) {
  .feature-row:nth-child(even) {
    direction: rtl;
  }
  .feature-row:nth-child(even) > * {
    direction: ltr;
  }
}

/* --- Network Illustration --- */
.network-dot {
  transition: transform 0.3s ease;
}
.network-dot:hover {
  transform: scale(1.3);
}

/* --- Print --- */
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
  nav, .mobile-menu, .mobile-backdrop { display: none !important; }
}

/* --- Legal document pages (privacy policy) --- */
.legal-prose h1 { font-size: 2rem; font-weight: 700; color: #1A1A2E; margin-bottom: 0.5rem; }
.legal-prose .lead { color: #7B7979; font-size: 0.875rem; margin-bottom: 2rem; }
.legal-prose h2 { font-size: 1.125rem; font-weight: 600; color: #1A1A2E; margin-top: 2rem; margin-bottom: 0.5rem; }
.legal-prose p { color: #4b4b57; line-height: 1.7; margin-bottom: 0.75rem; }
.legal-prose ul { list-style: disc; padding-left: 1.25rem; color: #4b4b57; line-height: 1.7; margin-bottom: 0.75rem; }
.legal-prose li { margin-bottom: 0.375rem; }
.legal-prose a { color: #F47216; text-decoration: underline; }
