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

@layer base {
  :root {
    --custom-bg: rgb(236, 244, 252);
    --custom-bg-secondary: rgb(226, 234, 242);
    --custom-dark: rgb(14, 26, 75);
    --custom-orange: rgb(248, 127, 82);
    --custom-orange-dark: rgb(232, 90, 42);
    --custom-text: rgb(26, 26, 26);
    --custom-text-muted: rgb(13, 70, 175);
    --grid-color: rgb(229, 231, 235);
    --grid-pattern: linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
                   linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    --grid-size: 24px 24px;
  }
}

@layer utilities {
      /* Hide scrollbar for Chrome, Safari and Opera */
      .no-scrollbar::-webkit-scrollbar {
          display: none;
      }
     /* Hide scrollbar for IE, Edge and Firefox */
      .no-scrollbar {
          -ms-overflow-style: none;  /* IE and Edge */
          scrollbar-width: none;  /* Firefox */
    }
  }

@layer components {
  .btn-primary {
    @apply px-6 py-2.5 text-white text-lg font-medium rounded-xl shadow-sm transition-all duration-200;
    background-color: var(--custom-orange);
  }
  .btn-primary:hover {
    background-color: var(--custom-orange-dark);
  }

  .input-primary {
    @apply w-full rounded-xl bg-white shadow-sm transition-all duration-200;
    border: 1px solid rgba(26, 26, 26, 0.2);
    color: var(--custom-text);
  }
  .input-primary:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--custom-orange);
  }

  .label-primary {
    @apply block text-sm font-medium mb-2;
    color: rgba(26, 26, 26, 0.6);
  }

  .bg-custom-bg {
    background-color: var(--custom-bg);
  }

  .bg-custom-bg-secondary {
    background-color: var(--custom-bg-secondary);
  }

  .bg-custom-dark {
    background-color: var(--custom-dark);
  }

  .bg-custom-orange {
    background-color: var(--custom-orange);
  }

  .text-custom-dark {
    color: var(--custom-dark);
  }

  .text-custom-text {
    color: var(--custom-text);
  }

  .text-custom-text-muted {
    color: var(--custom-text-muted);
  }

  .border-custom-dark {
    border-color: var(--custom-dark);
  }

  .ring-custom-orange {
    --tw-ring-color: var(--custom-orange);
  }

  .bg-grid-pattern {
    background-image: var(--grid-pattern);
    background-size: var(--grid-size);
  }
}

/*

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

*/

@keyframes fadeOutOpacity {
  0% {
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.animate-fade-out {
  animation: fadeOutOpacity 8s ease-in-out 1 forwards;
}

.animate-fade-out:hover {
  animation: none;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}
/* Dark Theme Report Styles */

:root {
  --gradient-border: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(168, 85, 247, 0.3));
  --card-glow: 0 0 20px rgba(59, 130, 246, 0.15);
  --card-glow-hover: 0 0 30px rgba(59, 130, 246, 0.25);
}

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

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1f2937;
}

::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Glassmorphism cards */
.glass-card {
  background: rgba(31, 41, 55, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(75, 85, 99, 0.3);
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-glow-hover);
  border-color: rgba(59, 130, 246, 0.5);
}

/* Fix ROI card shadow rendering - contain shadow and reduce backdrop artifacts */
.grid[style*="z-index: 1"] .glass-card {
  isolation: isolate;
  contain: layout style paint;
}

.grid[style*="z-index: 1"] .glass-card:hover {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Gradient borders */
.gradient-border {
  position: relative;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(168, 85, 247, 0.1));
  border: 1px solid transparent;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Number counter monospace */
.counter-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

/* Chart container styling */
.chart-container {
  position: relative;
  background: rgba(31, 41, 55, 0.5);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgba(75, 85, 99, 0.3);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
  }
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
}

.reveal-fade-up {
  transform: translateY(30px);
}

.reveal-fade-up.active {
  transform: translateY(0);
}

.reveal-scale {
  transform: scale(0.95);
}

.reveal-scale.active {
  transform: scale(1);
}

/* Stagger animations for children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.active > * {
  opacity: 1;
  transform: translateY(0);
}

/* Metric card glow effect */
.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 250%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.metric-card:hover::after {
  opacity: 1;
}

/* Chart.js dark theme overrides */
canvas {
  filter: brightness(1.1);
}

/* Logo glow effect */
.logo-glow {
  filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
}

/* Pulse animation for highlights */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth section transitions */
section {
  transition: all 0.3s ease;
}

/* Details/Summary styling for dark theme */
details summary {
  transition: all 0.3s ease;
}

details[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

details summary:hover {
  background: rgba(55, 65, 81, 0.5);
}

/* Number highlight effect */
.number-highlight {
  position: relative;
  display: inline-block;
}

.number-highlight::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.3), rgba(168, 85, 247, 0.3));
  z-index: -1;
  border-radius: 4px;
}

/* Typography enhancements */
h1, h2, h3, h4 {
  letter-spacing: -0.025em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .glass-card:hover {
    transform: none;
  }

  .stagger-children > * {
    transform: none;
  }
}
/* Scoped to the RUJAC presentation deck.
   Palette and type match live bonaparte.app: white canvas, navy type,
   orange CTAs, Montserrat headlines, Roboto body. */

.rujac-html,
.rujac-body {
  height: 100%;
  margin: 0;
  background: #ffffff;
}

.rujac-body {
  overflow: hidden;
  overscroll-behavior: none;
  color: #060b27;
  font-family: Roboto, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.rujac {
  --rujac-bg: #ffffff;
  --rujac-ink: #060b27;
  --rujac-muted: rgba(6, 11, 39, 0.48);
  --rujac-line: rgba(6, 11, 39, 0.12);
  --rujac-orange: #ed7e30;
  --rujac-orange-soft: #fff7ed;
  --rujac-blue: #2e54fb;
  --rujac-panel: #f7f8fb;

  position: relative;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--rujac-bg);
  color: var(--rujac-ink);
}

.rujac-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--rujac-muted);
}

.rujac-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.rujac-logo {
  height: 1.65rem;
  width: auto;
  object-fit: contain;
}

.rujac-brand-mark {
  color: var(--rujac-ink);
  font-family: Montserrat, sans-serif;
  font-weight: 600;
}

.rujac-brand-dot {
  color: var(--rujac-orange);
}

.rujac-phase {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
}

.rujac-phase-index {
  color: var(--rujac-orange);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.rujac-phase-name {
  color: var(--rujac-ink);
  font-family: Montserrat, sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.rujac-stage {
  position: relative;
  flex: 1;
  min-height: 0;
}

.rujac-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.rujac-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.rujac-top,
.rujac-bottom {
  min-height: 0;
}

.rujac-top {
  flex: 0 0 60%;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 2rem 0.75rem;
}

.rujac-pane-label {
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rujac-muted);
}

.rujac-bottom {
  flex: 0 0 40%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 1.5rem 2rem 0.5rem;
  border-top: 1px solid var(--rujac-line);
}

.rujac-notes {
  width: 75%;
  max-width: 75%;
  margin: 0;
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  line-height: 1.45;
  font-weight: 400;
  color: var(--rujac-ink);
}

.rujac-slide[data-kind="delivery"] {
  padding: 0 2rem 0.75rem;
}

.rujac-export {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.75rem;
}

.rujac-export-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex: 0 0 auto;
  padding: 0.15rem 0 0.35rem;
}

.rujac-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.7rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--rujac-orange);
  color: #fff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(237, 126, 48, 0.18);
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.rujac-chip:hover {
  background: var(--rujac-ink);
  box-shadow: 0 12px 28px rgba(6, 11, 39, 0.18);
  transform: scale(1.03);
}

.rujac-export-xml,
.rujac-export-excel {
  display: flex;
  flex-direction: column;
  flex: 1 1 42%;
  min-height: 0;
}

.rujac-export-xml .rujac-console,
.rujac-export-excel .rujac-table-wrap {
  flex: 1;
  min-height: 0;
}

.rujac-shot-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--rujac-line);
  background: var(--rujac-panel);
}

.rujac-shot {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.rujac-footer {
  padding-top: 0.4rem;
  padding-bottom: 1.15rem;
}

.rujac-dots {
  display: flex;
  gap: 0.55rem;
}

.rujac-dot {
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(6, 11, 39, 0.18);
  cursor: pointer;
}

.rujac-dot.is-active {
  background: var(--rujac-orange);
}

.rujac-keys {
  display: flex;
  gap: 0.4rem;
}

.rujac-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.45rem;
  padding: 0 0.4rem;
  border: 1px solid var(--rujac-line);
  border-radius: 999px;
  font-family: Roboto, sans-serif;
  font-size: 0.7rem;
  color: var(--rujac-muted);
  background: #fff;
}

.rujac-table-wrap,
.rujac-console {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--rujac-line);
  border-radius: 0.25rem;
  background: var(--rujac-panel);
}

.rujac-table-wrap {
  padding: 0.25rem 0;
  background: #fff;
}

.rujac-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.rujac-table th,
.rujac-table td {
  padding: 0.7rem 1.1rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--rujac-line);
}

.rujac-table th {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rujac-muted);
}

.rujac-table td {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  color: var(--rujac-ink);
}

.rujac-table td.is-empty {
  color: rgba(6, 11, 39, 0.28);
}

.rujac-table td.is-key {
  color: var(--rujac-orange);
  font-weight: 500;
}

.rujac-table tr.is-focus td {
  background: var(--rujac-orange-soft);
}

.rujac-table tr.is-focus td:first-child {
  box-shadow: inset 3px 0 0 var(--rujac-orange);
}

.rujac-table.is-picking tr:not(.is-focus) td {
  opacity: 0.38;
}

.rujac-console {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.rujac-console-bar {
  flex: 0 0 auto;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--rujac-line);
  background: var(--rujac-panel);
}

.rujac-console-prompt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--rujac-muted);
}

.rujac-console-body {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 1rem 1.15rem 1.4rem;
  overflow: auto;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--rujac-ink);
  white-space: pre;
}

.rujac-console-body::-webkit-scrollbar {
  width: 8px;
}

.rujac-console-body::-webkit-scrollbar-thumb {
  background: rgba(6, 11, 39, 0.2);
  border-radius: 999px;
}

.rujac-console-scan {
  display: none;
}

.rujac-console .tok-key {
  color: var(--rujac-ink);
  font-weight: 500;
}

.rujac-console .tok-str {
  color: #47507a;
}

.rujac-console .tok-num {
  color: var(--rujac-orange);
}

.rujac-console .tok-bool,
.rujac-console .tok-punct {
  color: var(--rujac-blue);
}

.rujac-caret {
  display: inline-block;
  width: 0.55ch;
  height: 1em;
  margin-left: 0.1ch;
  background: var(--rujac-orange);
  animation: rujac-caret 1s steps(1) infinite;
  vertical-align: text-bottom;
}

.rujac-downloads {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 16rem;
}

.rujac-download {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.7rem 0.7rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: var(--rujac-orange);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(237, 126, 48, 0.18);
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.rujac-download:hover {
  background: var(--rujac-ink);
  box-shadow: 0 12px 28px rgba(6, 11, 39, 0.18);
  transform: scale(1.03);
}

.rujac-download-ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.4rem;
  padding: 0.3rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rujac-download-copy {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.rujac-download-label {
  font-size: 0.95rem;
  font-weight: 500;
}

.rujac-download-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.78);
}

@keyframes rujac-caret {
  50% {
    opacity: 0;
  }
}

.rujac-hub-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.rujac-hub {
  --rujac-ink: #d6e4ff;
  --rujac-muted: rgba(214, 228, 255, 0.55);
  --rujac-line: rgba(126, 182, 255, 0.16);
  --rujac-orange: #ff8a1a;
  background: #07090f;
  color: #d6e4ff;
}

.rujac-hub .rujac-chrome,
.rujac-hub .rujac-bottom {
  background: #07090f;
}

.rujac-hub .rujac-phase-name,
.rujac-hub .rujac-notes {
  color: #e8ebff;
}

.rujac-hub .rujac-logo {
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.9;
}

.rujac-hub .rujac-bottom {
  border-top-color: rgba(181, 191, 255, 0.12);
}

.rujac-hub .rujac-dot {
  background: rgba(232, 235, 255, 0.22);
}

.rujac-hub .rujac-dot.is-active {
  background: #ff8a1a;
  box-shadow: 0 0 0.75rem rgba(255, 138, 26, 0.55);
}

.rujac-hub .rujac-keys kbd {
  border-color: rgba(181, 191, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(232, 235, 255, 0.65);
}

.rujac-hub-top {
  flex: 0 0 68%;
}

.rujac-hub-stage .rujac-bottom {
  flex: 0 0 32%;
}

.rujac-hub-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(46, 109, 255, 0.16);
  border-radius: 1.25rem;
  background: #07090f;
  box-shadow:
    0 2rem 5rem rgba(4, 5, 13, 0.2),
    inset 0 0 5rem rgba(46, 109, 255, 0.08);
}

.rujac-hub-frame::before,
.rujac-hub-frame::after {
  position: absolute;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  content: "";
  filter: blur(70px);
  opacity: 0.4;
  pointer-events: none;
}

.rujac-hub-frame::before {
  top: -19rem;
  left: -10rem;
  background: rgba(46, 109, 255, 0.34);
}

.rujac-hub-frame::after {
  right: -14rem;
  bottom: -22rem;
  background: rgba(255, 138, 26, 0.16);
}

.rujac-hub-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
}
/*
 * 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.
 *


 */

/* Client logo animation */
.client-logo {
  transition: transform 0.5s ease;
}

.client-logo:hover {
  transform: rotate(10deg) scale(1.1);
}

.client-logo-carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: 1rem;
}

.logo-slider {
  display: flex;
  animation: scroll 25s linear infinite;
  width: max-content;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@keyframes logoSpin {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}
