/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Turbo Drive progress bar */
.turbo-progress-bar {
  height: 3px;
  background: var(--color-accent-500, #e86b5d);
  box-shadow: 0 0 8px var(--color-accent-500, #e86b5d);
}

@keyframes turbo-shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.turbo-progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: turbo-shimmer 1s ease-in-out infinite;
}

/* Scrollbar-hidden utility for mobile scroll areas */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* SortableJS Kanban states */
.kanban-card--ghost {
  opacity: 0.35;
  background: var(--color-bg-tertiary) !important;
  outline: 2px dashed var(--color-accent-500);
  outline-offset: -2px;
}
.kanban-card--chosen {
  cursor: grabbing !important;
}
.kanban-card--drag {
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.35) !important;
  transform: rotate(1.2deg);
  cursor: grabbing !important;
}
.kanban--dragging .kanban-column {
  background: var(--color-bg-tertiary);
  transition: background-color 0.15s;
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateX(-10px) translateY(-50%);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(-50%);
  }
}

.animate-fade-in {
  animation: fade-in 0.2s ease-out;
}

/* Native App Styles */
/* Hide elements not needed in native app */
.turbo-native-app .desktop-only,
.turbo-native-app .web-footer,
.turbo-native-app .app-download-banner {
  display: none !important;
}

/* Safe area adjustments for notched devices */
.turbo-native-app {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Android-specific adjustments */
.turbo-native-android {
  /* Android status bar area */
  padding-top: 0;
}

/* iOS-specific adjustments */
.turbo-native-ios {
  /* iOS safe areas are handled by env() */
}

/* ==============================================
   DEMO BLUR MODE
   Toggle with Ctrl+Shift+D for demo recordings
   ============================================== */

/* Notification toast for demo mode toggle */
.demo-blur-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: demo-notification-in 0.3s ease-out;
}

.demo-blur-notification.fade-out {
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.3s ease-out;
}

@keyframes demo-notification-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* When demo blur is active, blur sensitive elements */
.demo-blur-active .demo-blur {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

/* User names and emails in navbar */
.demo-blur-active [data-dropdown-target="menu"] .truncate,
.demo-blur-active .dropdown-menu-enhanced .truncate {
  filter: blur(6px);
}

/* User avatar initials */
.demo-blur-active .user-initial {
  filter: blur(4px);
}

/* Document titles */
.demo-blur-active .document-title,
.demo-blur-active [class*="document"] h3,
.demo-blur-active .card h3.truncate {
  filter: blur(6px);
}

/* Welcome message on dashboard */
.demo-blur-active .welcome-name {
  filter: blur(8px);
}

/* Profile information */
.demo-blur-active .profile-info,
.demo-blur-active [data-profile-info],
.demo-blur-active input[type="text"]:not([name*="search"]),
.demo-blur-active input[type="email"],
.demo-blur-active input[type="tel"],
.demo-blur-active textarea {
  filter: blur(6px);
}

/* Document details - issuing authority, document number, etc */
.demo-blur-active .document-detail,
.demo-blur-active [data-sensitive],
.demo-blur-active .extracted-data {
  filter: blur(6px);
}

/* AI extracted data sections */
.demo-blur-active .ai-extracted-content {
  filter: blur(8px);
}

/* Certificate thumbnails and images */
.demo-blur-active .document-thumbnail img,
.demo-blur-active .certificate-image,
.demo-blur-active [data-blur-image],
.demo-blur-active [data-controller="pdf-viewer"] canvas {
  filter: blur(12px);
}

/* Define Me professional summary */
.demo-blur-active .define-me-content,
.demo-blur-active .professional-summary {
  filter: blur(8px);
}

/* Keep navigation and UI elements visible */
.demo-blur-active nav,
.demo-blur-active .sidebar,
.demo-blur-active .btn,
.demo-blur-active button,
.demo-blur-active .badge {
  filter: none !important;
}

/* Demo mode indicator */
.demo-blur-active::after {
  content: "DEMO MODE";
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--color-accent-500);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  z-index: 10000;
  opacity: 0.9;
}

/* Features page styles */
.feature-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.feature-card:hover { transform: translateY(-4px); }
.download-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.download-card:hover { transform: translateY(-4px); }
.step-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.step-card:hover { transform: translateY(-2px); }
.step-number {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 14px; flex-shrink: 0;
}
.tab-btn { transition: all 0.2s ease; background: #f3f4f6; color: #374151; }
.tab-btn:hover { background: #e5e7eb; }
.tab-btn.active { background: #d4a853 !important; color: #ffffff !important; border-color: #d4a853 !important; }
.dark .tab-btn { background: #1f2937; color: #f3f4f6; }
.dark .tab-btn:hover { background: #374151; }
.dark .tab-btn.active { background: #d4a853 !important; color: #ffffff !important; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.status-badge { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.extension-card, .app-card { cursor: pointer; }
.extension-card.selected, .app-card.selected { border-color: var(--color-primary) !important; box-shadow: 0 0 0 2px var(--color-primary); }
.inline-instructions, .app-inline-instructions { display: none; animation: slideDown 0.3s ease-out; }
.inline-instructions.active, .app-inline-instructions.active { display: block; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- home hero 3D backdrop (hero3d.js, desktop-only) ---------- */
.hero3d-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; opacity: 0; pointer-events: none;
  transition: opacity 1.4s ease;
}
section.hero3d-on .hero3d-canvas { opacity: 1; }
/* the canvas is opaque navy — flip the section's own backdrop to match so
   the fade-in is seamless, and let the .dark class (added with hero3d-on)
   re-scope the text tokens */
section.hero3d-on { background: #0d1520; }
section.hero3d-on [data-hero3d-static] { opacity: 0; transition: opacity 0.9s ease; }
@media (prefers-reduced-motion: reduce) {
  .hero3d-canvas { display: none; }
}
/* text inside the activated hero inherits the dark-theme ink even where no
   explicit color utility is set (e.g. the eyebrow badge) */
section.hero3d-on { color: var(--color-text-primary); }

/* ---------- hero orbit (CSS fallback visual + pre-3D state) ---------- */
.hero-orbit {
  position: relative; aspect-ratio: 1; max-width: 540px; margin: 0 auto;
  transition: opacity 0.9s ease;
}
.hero-orbit-core {
  position: absolute; inset: 30%; border-radius: 50%;
  background: radial-gradient(circle at 42% 38%,
    rgba(240, 141, 125, 0.85), rgba(232, 107, 93, 0.45) 45%, transparent 72%);
  filter: blur(2px);
  animation: pv-core-breathe 3.2s ease-in-out infinite;
}
.hero-orbit-ring {
  position: absolute; inset: 9%; border-radius: 50%;
  border: 3px dashed color-mix(in srgb, var(--color-vault-400) 55%, transparent);
  animation: pv-spin 70s linear infinite;
}
.hero-orbit-ring2 {
  position: absolute; inset: -1%; border-radius: 50%;
  border: 1px solid rgba(232, 107, 93, 0.35);
  animation: pv-spin 110s linear infinite reverse;
}
.hero-orbiter {
  position: absolute; inset: 9%;
  animation: pv-spin 44s linear infinite;
  animation-delay: var(--offset, 0s);
}
.hero-orbit-card {
  position: absolute; top: -34px; left: 50%; margin-left: -33px;
  width: 66px; height: 86px; border-radius: 9px;
  background:
    linear-gradient(transparent 14px, rgba(31, 44, 58, 0.16) 14px, rgba(31, 44, 58, 0.16) 17px, transparent 17px) 12px 12px / 34px 100% no-repeat,
    repeating-linear-gradient(#fdfdfd 0 26px, rgba(31, 44, 58, 0.13) 26px 29px) 12px 22px / 42px calc(100% - 34px) no-repeat,
    linear-gradient(#e86b5d 0 0) 12px calc(100% - 12px) / 22px 4px no-repeat,
    #fdfdfd;
  box-shadow: 0 10px 26px rgba(10, 15, 20, 0.22);
  animation: pv-spin 44s linear infinite reverse;
  animation-delay: var(--offset, 0s);
}
.hero-orbit-card-seal::after {
  content: ""; position: absolute; right: 10px; bottom: 10px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(232, 107, 93, 0.55);
}
@keyframes pv-spin { to { transform: rotate(360deg); } }
@keyframes pv-core-breathe {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.07); }
}

/* verification chips — float over the orbit and over the 3D canvas */
.hero-chip {
  position: absolute; z-index: 3;
  display: flex; align-items: flex-start; gap: 9px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 44, 58, 0.08);
  border-radius: 13px; padding: 10px 16px 11px 13px;
  box-shadow: 0 12px 32px rgba(10, 15, 20, 0.18);
  backdrop-filter: blur(6px);
  animation: pv-chip-float 6s ease-in-out infinite;
}
.hero-chip strong { display: block; font-size: 13.5px; color: #1f2c3a; font-weight: 600; }
.hero-chip small { display: block; font-size: 11.5px; color: #6b879f; margin-top: 1px; }
.hero-chip-dot {
  flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.65);
}
.hero-chip-dot::after {
  content: ""; display: block; width: 5px; height: 9px; margin: 1.5px 0 0 5px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.hero-chip-1 { top: 13%; right: -3%; }
.hero-chip-2 { bottom: 17%; left: -5%; animation-delay: -3s; }
@keyframes pv-chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ---------- supported-platforms marquee ---------- */
.pv-marquee {
  padding: 34px 0 38px;
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
  overflow: hidden;
}
.pv-marquee-label {
  text-align: center; font-size: 11.5px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--color-text-muted);
  margin-bottom: 22px; font-weight: 600;
}
.pv-marquee-track {
  display: flex; width: max-content;
  animation: pv-marquee-x 55s linear infinite;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.pv-marquee-track ul {
  display: flex; align-items: baseline; list-style: none;
  margin: 0; padding: 0 3rem 0 0; gap: 6rem;
}
.pv-marquee-track li {
  font-family: var(--font-display); font-size: 21px; white-space: nowrap;
  color: var(--color-text-secondary); opacity: 0.75;
}
@keyframes pv-marquee-x { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .hero-orbit-core, .hero-orbit-ring, .hero-orbit-ring2,
  .hero-orbiter, .hero-orbit-card, .hero-chip { animation: none; }
  .pv-marquee-track { animation: none; }
}
/* reduced motion: freeze the orbit as a spread composition, not a stack */
@media (prefers-reduced-motion: reduce) {
  .hero-orbiter { transform: rotate(var(--angle, 0deg)); }
  .hero-orbit-card { transform: rotate(calc(-1 * var(--angle, 0deg))); }
}

/* ---------- artifact-style hero backdrop (theme-aware) ---------- */
.pv-hero {
  background:
    radial-gradient(ellipse 52% 44% at 72% 42%, rgba(232, 107, 93, 0.16), transparent 70%),
    radial-gradient(ellipse 40% 34% at 14% 78%, rgba(34, 211, 238, 0.08), transparent 70%),
    radial-gradient(ellipse 34% 30% at 88% 86%, rgba(167, 139, 250, 0.10), transparent 70%),
    linear-gradient(168deg, #fdf2f0 0%, #f8fafc 46%, #f2f6fa 100%);
}
.dark .pv-hero {
  background:
    radial-gradient(ellipse 52% 44% at 72% 42%, rgba(232, 107, 93, 0.14), transparent 70%),
    radial-gradient(ellipse 40% 34% at 14% 78%, rgba(34, 211, 238, 0.06), transparent 70%),
    radial-gradient(ellipse 34% 30% at 88% 86%, rgba(167, 139, 250, 0.07), transparent 70%),
    var(--color-vault-950);
}

/* scattered drifting documents behind the hero content */
.pv-hero-scatter { position: absolute; inset: 0; pointer-events: none; }
.pv-scatter-card {
  position: absolute; left: var(--sx); top: var(--sy);
  width: 84px; height: 110px; border-radius: 11px;
  transform: rotate(var(--sr, 0deg));
  background:
    linear-gradient(transparent 17px, rgba(31, 44, 58, 0.14) 17px, rgba(31, 44, 58, 0.14) 21px, transparent 21px) 15px 15px / 44px 100% no-repeat,
    repeating-linear-gradient(#fff 0 32px, rgba(31, 44, 58, 0.11) 32px 36px) 15px 27px / 54px calc(100% - 44px) no-repeat,
    linear-gradient(#e86b5d 0 0) 15px calc(100% - 15px) / 28px 5px no-repeat,
    #ffffff;
  box-shadow: 0 14px 34px rgba(10, 15, 20, 0.13);
  opacity: 0.85;
  animation: pv-scatter-drift 9s ease-in-out infinite;
  animation-delay: var(--sd, 0s);
}
.dark .pv-scatter-card { opacity: 0.5; }
.pv-scatter-card-seal::after {
  content: ""; position: absolute; right: 13px; bottom: 13px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(232, 107, 93, 0.5);
}
@keyframes pv-scatter-drift {
  0%, 100% { transform: rotate(var(--sr, 0deg)) translateY(0); }
  50% { transform: rotate(calc(var(--sr, 0deg) + 3deg)) translateY(-16px); }
}

/* gyroscope wire rings around the orbit core (artifact's geodesic feel) */
.hero-orbit-wire {
  position: absolute; inset: 27%; border-radius: 50%;
  border: 1.5px solid rgba(232, 107, 93, 0.45);
  transform: rotateX(66deg);
  animation: pv-wire-spin 14s linear infinite;
}
.hero-orbit-wire-b {
  transform: rotateX(66deg) rotateY(58deg);
  border-color: rgba(232, 107, 93, 0.3);
  animation-duration: 19s; animation-direction: reverse;
}
@keyframes pv-wire-spin {
  from { transform: rotateX(66deg) rotateZ(0deg); }
  to { transform: rotateX(66deg) rotateZ(360deg); }
}
.hero-orbit-wire-b { animation-name: pv-wire-spin-b; }
@keyframes pv-wire-spin-b {
  from { transform: rotateX(66deg) rotateY(58deg) rotateZ(0deg); }
  to { transform: rotateX(66deg) rotateY(58deg) rotateZ(360deg); }
}

/* larger ring composition on wide screens */
@media (min-width: 1280px) {
  .hero-orbit { max-width: 620px; }
}

@media (prefers-reduced-motion: reduce) {
  .pv-scatter-card, .hero-orbit-wire, .hero-orbit-wire-b { animation: none; }
}

/* mobile-hero CTA affordance: a quiet coral pulse ring around the primary
   "Start Free" button, echoing the "one click" hook from the ad reel that
   drives our cold mobile traffic. Mobile/tablet only (max-width matches the
   lg breakpoint) so the desktop hero is never touched, CSS-only (no JS/video
   cost), and disabled under reduced-motion. */
@media (max-width: 1023.98px) {
  .pv-cta-ring { position: relative; }
  .pv-cta-ring::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 1rem;
    border: 2px solid var(--color-accent-500);
    opacity: 0;
    pointer-events: none;
    animation: pv-cta-pulse 2.4s ease-out infinite;
  }
}
@keyframes pv-cta-pulse {
  0%   { opacity: 0.55; transform: scale(1); }
  70%  { opacity: 0;    transform: scale(1.06); }
  100% { opacity: 0;    transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .pv-cta-ring::after { animation: none; display: none; }
}
