@tailwind base;
@tailwind components;
@tailwind utilities;


@import url('https://fonts.googleapis.com/css2?family=Noto+Serif&family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cedarville+Cursive&display=swap');

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/

@layer base {
  :root {
    color-scheme: light;
    --background: 0 0% 100%;
    --foreground: 0 0% 9%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 9%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 9%;
    --primary: 0 0% 9%;
    --primary-foreground: 0 0% 100%;
    --secondary: 0 0% 96%;
    --secondary-foreground: 0 0% 9%;
    --muted: 0 0% 96%;
    --muted-foreground: 0 0% 45%;
    --accent: 0 0% 94%;
    --accent-foreground: 0 0% 9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 100%;
    --border: 0 0% 90%;
    --input: 0 0% 90%;
    --ring: 0 0% 9%;
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
    --radius: 0.5rem;
  }
  .dark {
    color-scheme: dark;
    --background: 0 0% 9%;
    --foreground: 0 0% 95%;
    --card: 0 0% 11%;
    --card-foreground: 0 0% 95%;
    --popover: 0 0% 11%;
    --popover-foreground: 0 0% 95%;
    --primary: 0 0% 95%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 15%;
    --secondary-foreground: 0 0% 95%;
    --muted: 0 0% 15%;
    --muted-foreground: 0 0% 60%;
    --accent: 0 0% 18%;
    --accent-foreground: 0 0% 95%;
    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 100%;
    --border: 0 0% 18%;
    --input: 0 0% 18%;
    --ring: 0 0% 80%;
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
  }

  @media (prefers-color-scheme: dark) {
    :root:not(.light) {
      color-scheme: dark;
      --background: 0 0% 9%;
      --foreground: 0 0% 95%;
      --card: 0 0% 11%;
      --card-foreground: 0 0% 95%;
      --popover: 0 0% 11%;
      --popover-foreground: 0 0% 95%;
      --primary: 0 0% 95%;
      --primary-foreground: 0 0% 9%;
      --secondary: 0 0% 15%;
      --secondary-foreground: 0 0% 95%;
      --muted: 0 0% 15%;
      --muted-foreground: 0 0% 60%;
      --accent: 0 0% 18%;
      --accent-foreground: 0 0% 95%;
      --destructive: 0 72% 51%;
      --destructive-foreground: 0 0% 100%;
      --border: 0 0% 18%;
      --input: 0 0% 18%;
      --ring: 0 0% 80%;
      --chart-1: 220 70% 50%;
      --chart-2: 160 60% 45%;
      --chart-3: 30 80% 55%;
      --chart-4: 280 65% 60%;
      --chart-5: 340 75% 55%;
    }
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
    touch-action: manipulation;
  }
  /* Hotwire Native iOS pages use viewport-fit=cover so the page background
     extends edge-to-edge (lets content scroll behind the blurred nav bar
     for the standard iOS effect). Without insetting the body, content
     itself would render under the nav bar at top and the home indicator at
     bottom. Padding here pushes the page's content into the safe area
     while keeping the underlying bg edge-to-edge. */
  body.hotwire-native {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }

  .animate-fade-in {
    animation: fadeIn 1s ease-in;
  }

  .animate-spin-slow {
    animation: spin 20s linear infinite;
  }

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

  @keyframes spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
}

@layer components {
  .turbo-frame, turbo-frame {
    @apply transition-opacity duration-300 ease-in-out;
  }

  .turbo-frame[aria-busy="true"], turbo-frame[busy] {
    @apply opacity-40;
  }

  .turbo-loading {
    @apply opacity-0;
  }

  .turbo-loaded {
    @apply opacity-100;
  }
}

/* Landing page */
html {
  scroll-behavior: smooth;
}

[data-animate] {
  opacity: 0;
  animation: fadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.65; }
}

.screenshot-glow {
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.scroll-dot {
  animation: scroll-bounce 2s ease-in-out infinite;
}

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

details .faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

details .faq-body > div {
  overflow: hidden;
}

/* Activity Grid */
.activity-grid {
  @apply opacity-0;
  animation: gridFadeIn 1s ease-out forwards;
}

@keyframes gridFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

