/* PermaShip.ai — Custom Styles */

/* Google Fonts: Jost */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&display=swap');

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

/* Selection color */
::selection {
  background: rgba(18, 179, 179, 0.3);
  color: #222326;
}

/* Scroll-triggered animations */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 280ms ease-out, transform 280ms ease-out;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
[data-animate-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 280ms ease-out, transform 280ms ease-out;
}

[data-animate-stagger].visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
[data-animate-stagger].visible > *:nth-child(2) { transition-delay: 80ms; opacity: 1; transform: translateY(0); }
[data-animate-stagger].visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: translateY(0); }
[data-animate-stagger].visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }
[data-animate-stagger].visible > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: translateY(0); }

/* Hero subtle pulse on the teal accent */
@keyframes teal-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-teal-pulse {
  animation: teal-pulse 3s ease-in-out infinite;
}

/* Mobile nav overlay */
#mobile-menu {
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

#mobile-menu.hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

/* FAQ details styling */
details summary {
  cursor: pointer;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  border-radius: 6px;
  background: #f8f9fb;
  color: #12B3B3;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 200ms ease-out;
}

details[open] summary::before {
  content: '−';
}

/* Pricing card highlight border animation */
.pricing-highlight {
  position: relative;
}

.pricing-highlight::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  padding: 2px;
  background: linear-gradient(135deg, #12B3B3, #0B1220, #12B3B3);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Horizontal pipeline connector line */
.pipeline-connector {
  position: relative;
}

.pipeline-connector::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, #12B3B3, #94A3B8, #12B3B3);
  z-index: 0;
}

/* ===== Interactive Illustrations ===== */

/* Lazy video poster overlay */
.video-lazy-wrap {
  position: relative;
  overflow: hidden;
}

.video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  transition: opacity 400ms ease-out;
}

.video-poster.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Parallax 3D tilt */
.video-parallax {
  perspective: 800px;
  transform-style: preserve-3d;
}

.video-parallax > .video-lazy-wrap {
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
  will-change: transform, box-shadow;
}

/* Hotspot dots */
.hotspot {
  position: absolute;
  z-index: 10;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #12B3B3;
  border: 2px solid rgba(247, 250, 252, 0.4);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 150ms ease-out, background 150ms ease-out;
}

.hotspot:hover {
  transform: translate(-50%, -50%) scale(1.3);
  background: #0fe0e0;
}

.hotspot-ping {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #12B3B3;
  animation: hotspot-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes hotspot-ping {
  0% { transform: scale(1); opacity: 0.7; }
  75%, 100% { transform: scale(2); opacity: 0; }
}

/* Hotspot tooltip */
.hotspot-tooltip {
  position: absolute;
  z-index: 20;
  background: rgba(34, 35, 38, 0.95);
  border: 1px solid rgba(227, 230, 236, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease-out;
  white-space: nowrap;
  max-width: 220px;
}

.hotspot-tooltip.visible {
  opacity: 1;
}

.hotspot-tooltip-label {
  font-size: 12px;
  font-weight: 600;
  color: #12B3B3;
}

.hotspot-tooltip-desc {
  font-size: 11px;
  color: #6a6d77;
  margin-top: 2px;
  white-space: normal;
}

.hotspot-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
}

.hotspot-tooltip.above::after {
  top: 100%;
  border-top-color: rgba(34, 35, 38, 0.95);
}

.hotspot-tooltip.below::after {
  bottom: 100%;
  border-bottom-color: rgba(34, 35, 38, 0.95);
}

/* Launch button overlay */
.launch-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  background: rgba(255, 255, 255, 0.85);
  transition: opacity 300ms ease-out;
  border-radius: 12px;
}

.launch-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.launch-btn {
  font-family: 'Jost', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: #12B3B3;
  border: none;
  border-radius: 999px;
  padding: 14px 36px;
  cursor: pointer;
  box-shadow: 0 0 32px rgba(18, 179, 179, 0.5), 0 0 0 4px rgba(18, 179, 179, 0.15);
  transition: box-shadow 200ms ease-out, transform 200ms ease-out;
}

.launch-btn:hover {
  box-shadow: 0 0 48px rgba(18, 179, 179, 0.7), 0 0 0 6px rgba(18, 179, 179, 0.25);
  transform: scale(1.05);
}

.launch-cursor {
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== Back-to-Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 40;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #12B3B3;
  color: #0B1220;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(18, 179, 179, 0.3);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 280ms ease-out, transform 280ms ease-out, box-shadow 200ms ease-out;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  box-shadow: 0 6px 24px rgba(18, 179, 179, 0.5);
}

/* ===== Hamburger → X Animation ===== */
#hamburger-btn .hamburger-line {
  transition: transform 200ms ease-out, opacity 200ms ease-out;
  transform-origin: center;
}

#hamburger-btn.menu-open .hamburger-line-top {
  transform: translateY(6px) rotate(45deg);
}

#hamburger-btn.menu-open .hamburger-line-mid {
  opacity: 0;
}

#hamburger-btn.menu-open .hamburger-line-bot {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== Form Inline Validation ===== */
.field-error {
  display: none;
  font-size: 0.75rem;
  color: #EF4444;
  margin-top: 0.25rem;
}

.field-error.visible {
  display: block;
}

.input-error {
  border-color: #EF4444 !important;
}

.input-error:focus {
  border-color: #EF4444 !important;
  --tw-ring-color: #EF4444 !important;
}

/* ===== Cookie consent banner (CCPA/GDPR-style) ===== */
/* Scoped under #cookie-consent-root so Tailwind preflight cannot override */
#cookie-consent-root {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}

#cookie-consent-root .cookie-consent-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.5);
  z-index: 9998;
  opacity: 0;
  animation: cookie-backdrop-in 200ms ease-out forwards;
  pointer-events: auto;
}

@keyframes cookie-backdrop-in {
  to { opacity: 1; }
}

#cookie-consent-root .cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1F2937;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
  animation: cookie-slide-up 280ms ease-out forwards;
  pointer-events: auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@keyframes cookie-slide-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#cookie-consent-root .cookie-consent-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 1.5rem;
}

#cookie-consent-root .cookie-consent-text {
  color: #F7FAFC;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

#cookie-consent-root .cookie-consent-buttons,
#cookie-consent-root .cookie-consent-custom-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

#cookie-consent-root .cookie-consent-buttons {
  margin-bottom: 0.5rem;
}

#cookie-consent-root .cookie-consent-custom-buttons {
  margin-top: 1.25rem;
}

#cookie-consent-root button.cookie-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 200ms, color 200ms, border-color 200ms;
  border: 1px solid transparent;
  background-color: transparent;
  color: inherit;
}

#cookie-consent-root button.cookie-btn-primary {
  background-color: #12B3B3;
  color: #0B1220;
  border-color: #12B3B3;
}

#cookie-consent-root button.cookie-btn-primary:hover {
  background-color: #0fe0e0;
  border-color: #0fe0e0;
}

#cookie-consent-root button.cookie-btn-secondary {
  background-color: transparent;
  color: #F7FAFC;
  border-color: rgba(148, 163, 184, 0.4);
}

#cookie-consent-root button.cookie-btn-secondary:hover {
  border-color: #94A3B8;
  background-color: rgba(148, 163, 184, 0.1);
}

#cookie-consent-root button.cookie-btn-ghost {
  background-color: transparent;
  color: #94A3B8;
  border-color: transparent;
}

#cookie-consent-root button.cookie-btn-ghost:hover {
  color: #F7FAFC;
  background-color: rgba(148, 163, 184, 0.1);
}

#cookie-consent-root .cookie-consent-privacy {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
}

#cookie-consent-root .cookie-consent-link {
  color: #12B3B3;
  text-decoration: none;
}

#cookie-consent-root .cookie-consent-link:hover {
  text-decoration: underline;
}

#cookie-consent-root .cookie-consent-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: #F7FAFC;
  margin: 0 0 0.5rem;
}

#cookie-consent-root .cookie-consent-toggles {
  list-style: none;
  padding: 0;
  margin: 0;
}

#cookie-consent-root .cookie-consent-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

#cookie-consent-root .cookie-consent-row:last-of-type {
  border-bottom: none;
}

#cookie-consent-root .cookie-consent-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #F7FAFC;
}

#cookie-consent-root .cookie-consent-desc {
  display: block;
  font-size: 0.8125rem;
  color: #94A3B8;
  margin-top: 0.25rem;
}

#cookie-consent-root .cookie-toggle {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  accent-color: #12B3B3;
  cursor: pointer;
  flex-shrink: 0;
}

#cookie-consent-root .cookie-toggle:disabled {
  cursor: default;
}

#cookie-consent-root .cookie-consent-actions.hidden,
#cookie-consent-root .cookie-consent-custom.hidden {
  display: none !important;
}
