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

@layer base {
  @font-face {
    font-family: 'Supreme';
    src: url(https://themacindex.com/fonts/supreme-400.woff2) format('woff2');
    font-weight: 400;
    font-display: swap;
    font-style: normal;
  }
  @font-face {
    font-family: 'Supreme';
    src: url(https://themacindex.com/fonts/supreme-500.woff2) format('woff2');
    font-weight: 500;
    font-display: swap;
    font-style: normal;
  }
  /* Supreme has no 600; font-semibold resolves to this 700 face */
  @font-face {
    font-family: 'Supreme';
    src: url(https://themacindex.com/fonts/supreme-700.woff2) format('woff2');
    font-weight: 700;
    font-display: swap;
    font-style: normal;
  }
  @font-face {
    font-family: 'Cabinet Grotesk';
    src: url(https://themacindex.com/fonts/cabinet-grotesk-700.woff2) format('woff2');
    font-weight: 700;
    font-display: swap;
    font-style: normal;
  }
  @font-face {
    font-family: 'Cabinet Grotesk';
    src: url(https://themacindex.com/fonts/cabinet-grotesk-800.woff2) format('woff2');
    font-weight: 800;
    font-display: swap;
    font-style: normal;
  }
}

@layer components {
  /* Small uppercase mono label used for data metadata (counts, timestamps, table captions) */
  .mono-label {
    @apply font-mono text-[11px] uppercase tracking-widest text-graphite dark:text-paper/50;
  }

  /* Hairline-bordered surface: the only card treatment on the site */
  .hairline-card {
    @apply rounded-lg border border-ink/10 bg-white dark:border-paper/10 dark:bg-night-raised;
  }

  /* Quiet text link: ink with a soft underline that darkens on hover */
  .link-quiet {
    @apply text-ink underline decoration-ink/25 underline-offset-2 hover:decoration-ink dark:text-paper dark:decoration-paper/30 dark:hover:decoration-paper;
  }

  .pagy {
    @apply flex space-x-2 text-sm;
  }
  .pagy > a {
    @apply px-3 py-1 rounded border border-ink/15 text-graphite dark:border-paper/15 dark:text-paper/60;
  }
  .pagy > a.current {
    @apply bg-ink text-paper border-ink dark:bg-paper dark:text-ink dark:border-paper;
  }

  .dropdown-menu {
    @apply scroll-smooth;
  }
  .dropdown-menu-enter {
    @apply transition ease-out duration-100;
  }
  .dropdown-menu-enter-from {
    @apply transform opacity-0 scale-95;
  }
  .dropdown-menu-enter-to {
    @apply transform opacity-100 scale-100;
  }
  .dropdown-menu-leave {
    @apply transition ease-in duration-75;
  }
  .dropdown-menu-leave-from {
    @apply transform opacity-100 scale-100;
  }
  .dropdown-menu-leave-to {
    @apply transform opacity-0 scale-95;
  }

  /* Specification button loading states */
  turbo-frame[busy] .spec-button {
    @apply opacity-60 cursor-not-allowed pointer-events-none;
  }

  turbo-frame[busy] .spec-button:hover {
    @apply border-ink/15 text-graphite;
  }

  /* Dark mode loading states */
  .dark turbo-frame[busy] .spec-button:hover {
    @apply border-paper/15 text-paper/60;
  }
}

@layer utilities {
  @keyframes fade-up {
    0% {
      opacity: 0;
      transform: translateY(14px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fade-in {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  @keyframes float-slow {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-8px);
    }
  }

  .animate-fade-up {
    animation: fade-up 0.8s ease-out both;
  }

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

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

  @media (prefers-reduced-motion: reduce) {
    .animate-fade-up,
    .animate-fade-in,
    .animate-float-slow {
      animation: none;
    }
  }

  /* Chrome, Safari and Opera */
  .scrollbar-hidden::-webkit-scrollbar {
    display: none;
  }

  .scrollbar-hidden {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
