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

@layer components {
  /* Granola-style in-app surface tokens. Calm, slightly warm, sticker-feel. */
  .app-card {
    @apply bg-white rounded-2xl border border-stone-200/70 shadow-[0_1px_2px_rgba(15,23,42,0.04)];
  }

  .app-card-elevated {
    @apply bg-white rounded-2xl border border-stone-200/70 shadow-[0_4px_24px_-12px_rgba(15,23,42,0.08)];
  }

  .app-sticker {
    @apply bg-white border border-stone-200/70 rounded-lg shadow-[0_1px_2px_rgba(15,23,42,0.05)] flex items-center justify-center;
  }

  .app-page-title {
    @apply text-[15px] font-medium text-stone-800;
  }

  .app-page-subtitle {
    @apply text-[13px] text-stone-400 mt-0.5;
  }

  /* Stop inline-code prose styling from bleeding into <pre><code> blocks.
     Without this, prose-code:bg-gray-100 etc. paint a light box over the
     light text inside dark <pre> blocks, making code blocks unreadable. */
  .prose pre code,
  .prose.dark\:prose-invert pre code,
  .dark .prose pre code {
    background-color: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
  }

  .prose pre code::before,
  .prose pre code::after {
    content: none !important;
  }
}
/*
 * Styles for the public website (marketing pages)
 * Used by the website.html.erb layout
 * Linear-inspired organic design
 */

:root {
  --site-max-width: 1920px;
  --site-margin: 80px;
}

/* Subtle side border lines - softened from the original SaaS grid feel */
.website-border-left,
.website-border-right {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(229, 231, 235, 0.35);
  pointer-events: none;
  z-index: 40;
}

.dark .website-border-left,
.dark .website-border-right {
  background: rgba(38, 38, 38, 0.4);
}

.website-border-left {
  left: max(var(--site-margin), calc((100vw - var(--site-max-width)) / 2 + var(--site-margin)));
}

.website-border-right {
  right: max(var(--site-margin), calc((100vw - var(--site-max-width)) / 2 + var(--site-margin)));
}

/* Hide the side borders on tablet & below — editorial feel */
@media (max-width: 1024px) {
  .website-border-left,
  .website-border-right {
    display: none;
  }
}

/* Main content area with consistent margins */
.website-content {
  margin-left: var(--site-margin);
  margin-right: var(--site-margin);
}

/* Soft section divider - hairline only, no grid pattern */
.website-divider {
  height: 32px;
  border-top: 1px solid rgba(229, 231, 235, 0.6);
}

.dark .website-divider {
  border-top-color: rgba(38, 38, 38, 0.8);
}

/* Floating pill header - centered within viewport */
.website-header {
  position: fixed;
  top: 0.875rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 1.5rem, 56rem);
  z-index: 50;
}

/* Dot pattern overlay - softened for editorial feel */
.dot-pattern {
  background-image: radial-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
}

.dark .dot-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* Simple fade in animation for logo icon */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in:not(.hidden) {
  animation: fadeIn 0.2s ease-out;
}

/* Primary button - Linear style */
.btn-beam {
  position: relative;
  background: #111827;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Dark mode: refined white button with subtle glow */
.dark .btn-beam {
  background: rgba(255, 255, 255, 0.95);
  color: #0a0a0a !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(139, 92, 246, 0.15);
}

/* Beam sweep animation */
.btn-beam::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: beam 3s infinite;
}

/* Dark mode beam - subtle purple tint */
.dark .btn-beam::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(139, 92, 246, 0.15),
    transparent
  );
}

.btn-beam:hover {
  background: #1f2937;
}

.dark .btn-beam:hover {
  background: #ffffff;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 0 30px rgba(139, 92, 246, 0.25),
    0 0 60px rgba(139, 92, 246, 0.1);
  transform: translateY(-1px);
}

/* Active/pressed state */
.dark .btn-beam:active {
  transform: translateY(0);
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(139, 92, 246, 0.2);
}

@keyframes beam {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* ===== HERO STICKERS (Granola-style tool icon stickers) ===== */
.hero-sticker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 6px 16px -8px rgba(15, 23, 42, 0.18),
    0 2px 4px -2px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dark .hero-sticker {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 6px 16px -8px rgba(0, 0, 0, 0.5),
    0 2px 4px -2px rgba(0, 0, 0, 0.4);
}

.hero-sticker-lg {
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

@media (max-width: 640px) {
  .hero-sticker { width: 42px; height: 42px; border-radius: 14px; }
  .hero-sticker-lg { width: 56px; height: 56px; border-radius: 18px; }
}

.hero-sticker-tilt-l-2 { transform: rotate(-9deg) translateY(2px); }
.hero-sticker-tilt-l-1 { transform: rotate(-4deg); }
.hero-sticker-tilt-c   { transform: rotate(-1deg) translateY(-6px); }
.hero-sticker-tilt-r-1 { transform: rotate(5deg); }
.hero-sticker-tilt-r-2 { transform: rotate(10deg) translateY(2px); }

.hero-sticker:hover {
  transform: translateY(-2px) rotate(0deg) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 24px -8px rgba(15, 23, 42, 0.22),
    0 4px 8px -2px rgba(15, 23, 42, 0.12);
}

.dark .hero-sticker:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 24px -8px rgba(0, 0, 0, 0.6),
    0 4px 8px -2px rgba(0, 0, 0, 0.5);
}

/* Hero-specific cool gradient (overrides gradient-mesh for hero only) */
.hero-gradient-warm {
  background: 
    radial-gradient(at 25% 35%, rgba(99, 102, 241, 0.10) 0%, transparent 50%),
    radial-gradient(at 75% 65%, rgba(79, 70, 229, 0.08) 0%, transparent 50%),
    radial-gradient(at 50% 50%, rgba(129, 140, 248, 0.06) 0%, transparent 70%);
}

.dark .hero-gradient-warm {
  background: 
    radial-gradient(at 25% 35%, rgba(99, 102, 241, 0.16) 0%, transparent 50%),
    radial-gradient(at 75% 65%, rgba(79, 70, 229, 0.12) 0%, transparent 50%),
    radial-gradient(at 50% 50%, rgba(129, 140, 248, 0.08) 0%, transparent 70%);
}

/* ===== AMBIENT EFFECTS ===== */

/* Static gradient mesh background */
.gradient-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(at 80% 70%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(at 50% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
}

.dark .gradient-mesh {
  background: 
    radial-gradient(at 20% 30%, rgba(139, 92, 246, 0.25) 0%, transparent 50%),
    radial-gradient(at 80% 70%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
    radial-gradient(at 50% 50%, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
}

/* Glassmorphism for cards in dark mode */
.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(229, 231, 235, 0.8);
}

.dark .glass-card {
  background: rgba(22, 22, 22, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(38, 38, 38, 0.8);
}

/* ===== DARK MODE TOGGLE BUTTON ===== */
.dark-mode-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(229, 231, 235, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(156, 163, 175, 0.8);
}

.dark .dark-mode-toggle {
  border-color: rgba(55, 65, 81, 0.8);
}

.dark .dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(75, 85, 99, 0.8);
}

/* Pill-style dark mode toggle (matches new floating header) */
.dark-mode-toggle-pill {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-toggle-pill:hover {
  background: rgba(0, 0, 0, 0.05);
}

.dark .dark-mode-toggle-pill:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
  :root {
    --site-margin: 40px;
  }

  .website-divider {
    height: 24px;
  }
}

/* Mobile breakpoint */
@media (max-width: 640px) {
  :root {
    --site-margin: 0px;
  }

  .website-divider {
    height: 20px;
  }
}
/*
 * 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.
 *


 */
