/* FidiKetabi landing page — custom styles (Tailwind handles utilities) */

::selection {
  background-color: #d4c49f;
  color: #2a221d;
}

.dark ::selection {
  background-color: #4a3b32;
  color: #fdfbf7;
}

body {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
  overflow-x: hidden;
}

.dark body {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.015'/%3E%3C/svg%3E");
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Scroll reveals */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition:
    opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

.delay-300 {
  transition-delay: 300ms;
}

/* iPhone mockup */
.iphone-mockup {
  position: relative;
  border-radius: 2.75rem;
  background-color: #000;
  box-shadow:
    0 0 0 2px #4a3b32,
    0 0 0 10px #111,
    0 24px 48px -12px rgba(0, 0, 0, 0.45),
    0 0 0 11px rgba(255, 255, 255, 0.2);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.dark .iphone-mockup {
  box-shadow:
    0 0 0 2px #222,
    0 0 0 10px #050505,
    0 24px 48px -12px rgba(0, 0, 0, 0.75),
    0 0 0 11px rgba(255, 255, 255, 0.05);
}

.iphone-mockup::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 120px;
  width: 3px;
  height: 60px;
  background: #2a221d;
  border-radius: 4px 0 0 4px;
  box-shadow: 0 70px 0 #2a221d;
}

.iphone-mockup::after {
  content: "";
  position: absolute;
  right: -13px;
  top: 140px;
  width: 3px;
  height: 80px;
  background: #2a221d;
  border-radius: 0 4px 4px 0;
}

.dark .iphone-mockup::before,
.dark .iphone-mockup::after {
  background: #333;
  box-shadow: 0 70px 0 #333;
}

#hero-phone-frame {
  transform-origin: center center;
  will-change: transform;
  transform: translate3d(0, 48px, 0) rotate(-8deg) scale(0.9);
}

#hero-sticky {
  contain: paint;
}

/* Glass panel */
.glass-panel {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.dark .glass-panel {
  background: rgba(20, 20, 20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Gradient text */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, #78350f 0%, #b45309 100%);
}

.dark .text-gradient {
  background-image: linear-gradient(135deg, #d4c49f 0%, #f4efe6 100%);
}

/* Crossfade images */
.crossfade-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2.2rem;
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
}

.crossfade-img.active-img {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Support modal */
#support-modal:not(.hidden) {
  display: flex;
}

#support-modal.hidden {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.support-char-count {
  font-variant-numeric: tabular-nums;
}

/* Toast notification */
#toast-container {
  position: fixed;
  z-index: 110;
  inset-inline: 0;
  bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  width: min(100%, 26rem);
  padding: 1rem 1.15rem;
  border-radius: 1.25rem;
  background: rgba(253, 251, 247, 0.95);
  color: #2a221d;
  border: 1px solid rgba(231, 222, 194, 0.9);
  box-shadow: 0 18px 40px -18px rgba(42, 34, 29, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .toast {
  background: rgba(20, 20, 20, 0.95);
  color: #f5f5f5;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.toast-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.toast-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: #166534;
  color: #fff;
  flex-shrink: 0;
}

.dark .toast-check {
  background: #22c55e;
  color: #052e16;
}

.toast-close {
  flex-shrink: 0;
  padding: 0.2rem;
  border-radius: 9999px;
  opacity: 0.55;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.toast-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

.dark .toast-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.toast-body {
  display: grid;
  gap: 0.55rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.toast-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 0.15rem;
}

.toast-value {
  margin: 0;
  word-break: break-word;
  white-space: pre-wrap;
}

.toast-value.is-muted {
  opacity: 0.85;
  max-height: 5.5rem;
  overflow: hidden;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .crossfade-img,
  #hero-phone-frame,
  .toast {
    transition: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  #hero-phone-frame {
    transform: none;
  }
}
