/* Custom variables and custom rules for TrackFlow Premium Landing Page */

:root {
  --color-primary: #FF85A2; /* Replaced with exact baby pink from logo */
  --color-primary-rgb: 255, 133, 162;
  --color-secondary: #FF8C69;
  --color-secondary-rgb: 255, 140, 105;
  --color-accent: #FFF0F2;
  --color-dark: #1A1819;
  --color-gray: #706B6E;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

body {
  font-family: var(--font-body);
  background-color: #FAF8F9;
  color: var(--color-dark);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

/* Premium Mesh Gradients */
.bg-mesh-glow {
  background: radial-gradient(circle at 15% 15%, rgba(255, 133, 162, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 85% 85%, rgba(255, 140, 105, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 50% 50%, rgba(255, 240, 242, 0.4) 0%, transparent 60%);
}

.glow-orb-pink {
  background: radial-gradient(circle, rgba(255, 133, 162, 0.12) 0%, rgba(255, 133, 162, 0) 70%);
  filter: blur(40px);
}

.glow-orb-peach {
  background: radial-gradient(circle, rgba(255, 140, 105, 0.12) 0%, rgba(255, 140, 105, 0) 70%);
  filter: blur(40px);
}

/* Glassmorphism */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px 0 rgba(255, 133, 162, 0.03);
}

.glass-panel-dark {
  background: rgba(26, 24, 25, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-4px);
}

/* Premium Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes slow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.03); }
}

.animate-pulse-slow {
  animation: slow-pulse 8s ease-in-out infinite;
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 133, 162, 0.2);
  border-radius: 99px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 133, 162, 0.4);
}

/* Interactive Dial/Circle Styling for Simulator */
.dial-container {
  aspect-ratio: 1;
  position: relative;
  transform: translate3d(0, 0, 0);
  -webkit-font-smoothing: subpixel-antialiased;
}

.dial-progress {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.8s ease;
  will-change: stroke-dashoffset;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.dial-pointer {
  transform-origin: 50% 50%;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* Hide default input ranges style for simulator slider */
.custom-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #EBE6E8;
  border-radius: 99px;
  outline: none;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 4px solid #FFF;
  box-shadow: 0 4px 10px rgba(255, 133, 162, 0.3);
  transition: all 0.2s;
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(255, 133, 162, 0.5);
}

/* ============================================================
   iPhone 15 Exact Frame — Titanium Flat-Side Design
   Dimensions based on iPhone 15 physical proportions.
   ============================================================ */

/* Outer wrapper needed to position hardware side buttons */
.phone-wrapper {
  position: relative;
  display: inline-block;
}

/* RIGHT SIDE: Power/Sleep Button — Space Black */
.phone-btn-power {
  position: absolute;
  right: -3px;
  top: 160px;
  width: 3px;
  height: 70px;
  background: linear-gradient(180deg, #3a3a3c 0%, #1c1c1e 40%, #3a3a3c 100%);
  border-radius: 0 2px 2px 0;
  z-index: 5;
}

/* LEFT SIDE: Action Button — Space Black */
.phone-btn-action {
  position: absolute;
  left: -3px;
  top: 122px;
  width: 3px;
  height: 32px;
  background: linear-gradient(180deg, #3a3a3c 0%, #1c1c1e 40%, #3a3a3c 100%);
  border-radius: 2px 0 0 2px;
  z-index: 5;
}

/* LEFT SIDE: Volume Up — Space Black */
.phone-btn-vol-up {
  position: absolute;
  left: -3px;
  top: 174px;
  width: 3px;
  height: 58px;
  background: linear-gradient(180deg, #3a3a3c 0%, #1c1c1e 40%, #3a3a3c 100%);
  border-radius: 2px 0 0 2px;
  z-index: 5;
}

/* LEFT SIDE: Volume Down — Space Black */
.phone-btn-vol-down {
  position: absolute;
  left: -3px;
  top: 244px;
  width: 3px;
  height: 58px;
  background: linear-gradient(180deg, #3a3a3c 0%, #1c1c1e 40%, #3a3a3c 100%);
  border-radius: 2px 0 0 2px;
  z-index: 5;
}

/* Main iPhone 15 frame body — Space Black */
.phone-frame {
  width: 310px;
  height: 668px;
  /* iPhone 15 uses a continuous corner curve — 55px matches physical device */
  border-radius: 55px;
  /* Space Black frame — deep charcoal with subtle sheen */
  border: 10px solid transparent;
  background-clip: padding-box;
  background-color: #FAF8F9;
  /* Outer Space Black frame ring using box-shadow layers */
  box-shadow:
    /* Outer black metallic band — subtle edge highlight */
    0 0 0 1px #4a4a4c,
    0 0 0 2px #1c1c1e,
    0 0 0 3px #0a0a0a,
    /* Realistic depth shadow */
    0px 30px 70px -10px rgba(0,0,0,0.55),
    0px 10px 30px -5px  rgba(0,0,0,0.30),
    /* Subtle pink brand ambient glow at base */
    0px 0px 40px rgba(255, 133, 162, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

/* Inner screen bezel — iPhone 15 has a very thin 2mm bezel */
.phone-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 46px;
  border: 2px solid rgba(0,0,0,0.06);
  pointer-events: none;
  z-index: 100;
}

/* Responsive scaling for phone simulator on narrow screens to prevent overflow */
@media (max-width: 380px) {
  .phone-frame {
    transform: scale(0.88);
    transform-origin: top center;
    margin-bottom: -80px;
  }
}

@media (max-width: 340px) {
  .phone-frame {
    transform: scale(0.8);
    transform-origin: top center;
    margin-bottom: -134px;
  }
}

/* iPhone 15 Dynamic Island — pill shaped, correct size */
.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  /* Dynamic Island — smaller, accurate proportions */
  width: 88px;
  height: 26px;
  background: #000;
  border-radius: 14px;
  z-index: 50;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.08),
    0 0 0 1px rgba(0,0,0,0.5);
}

/* Front camera dot inside Dynamic Island */
.phone-notch::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0a0a0a;
  box-shadow:
    inset 0 0 3px rgba(255,255,255,0.25),
    0 0 0 1px rgba(80,160,255,0.12);
}

/* Proximity/Face ID sensor dot (smaller, left side inside Dynamic Island) */
.phone-notch::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #111;
  box-shadow: inset 0 0 2px rgba(255,255,255,0.15);
}

/* iPhone Screen Sliding Carousel */
.phone-viewport {
  width: 100%;
  height: calc(100% - 104px); /* Subtract status bar (40px) and navigation (64px) height */
  overflow: hidden;
  position: relative;
}

.phone-carousel {
  display: flex;
  width: 500%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

.phone-screen {
  width: 20%;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Hide scrollbars completely inside the phone viewport for a real mobile app look */
.phone-viewport *::-webkit-scrollbar {
  display: none;
}
.phone-viewport * {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Segmented Tab Swiper Styling */
.segmented-control {
  position: relative;
  display: flex;
  background: rgba(255, 133, 162, 0.05);
  border: 1px solid rgba(255, 133, 162, 0.15);
  border-radius: 9999px;
  padding: 4px;
  z-index: 10;
}

.segmented-slider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  border-radius: 9999px;
  background: var(--color-primary);
  box-shadow: 0 4px 12px rgba(255, 133, 162, 0.3);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

.segmented-btn {
  position: relative;
  z-index: 10;
  background: transparent;
  color: var(--color-dark);
  border: none;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 6px 18px;
  border-radius: 9999px;
  cursor: pointer;
  transition: color 0.35s ease;
}

.segmented-btn.active {
  color: #FFF;
}

/* Accent Glow Text */
.text-glow {
  text-shadow: 0 0 20px rgba(255, 133, 162, 0.3);
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Ensure maximum clarity and prevent blurriness in mockup screenshots only */
.screenshot-img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* ============================================================
   IN-APP / WEBVIEW UTILITY STYLES
   Hides website navigation elements when query param app=true is active.
   ============================================================ */
.is-in-app header,
.is-in-app footer,
.is-in-app .back-to-home-btn,
.is-in-app .hide-in-app {
  display: none !important;
}

.is-in-app main {
  padding-top: 1rem !important;
  padding-bottom: 2rem !important;
}

.is-in-app .contact-form-container {
  grid-column: span 12 / span 12 !important;
}

/* FAQ Accordion Styling overrides */
.faq-trigger:focus {
  outline: none;
}
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
}
.faq-item.active .faq-content {
  max-height: 1000px;
  transition: max-height 0.3s cubic-bezier(1, 0, 1, 0), padding 0.3s ease;
}

/* Shimmer Loading Skeleton */
.skeleton-loader {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
.skeleton-line {
  background: linear-gradient(90deg, rgba(255, 94, 140, 0.04) 25%, rgba(255, 94, 140, 0.12) 50%, rgba(255, 94, 140, 0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer-pulse 1.6s infinite linear;
  border-radius: 8px;
}
@keyframes shimmer-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   CMS CONTENT FORMATTING STYLES
   Ensures raw HTML retrieved from the backend editor parses beautifully.
   ============================================================ */
.cms-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.cms-content p {
  font-size: 0.95rem;
  line-height: 1.625;
  color: var(--color-gray);
  margin-bottom: 1rem;
}

.cms-content ul {
  list-style-type: disc;
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--color-gray);
}

.cms-content li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cms-content strong {
  color: var(--color-dark);
  font-weight: 700;
}

.cms-content a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  transition: opacity 0.2s;
}

.cms-content a:hover {
  opacity: 0.8;
}

.cms-content-fade {
  animation: fadeIn 0.4s ease-out forwards;
}

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


