/* --- public/styles.css --- */

:root {
  /* Palette: The Modern Ledger */
  --bg-paper: #f5f2eb; /* Warm Cream */
  --surface: #ffffff;
  --ink-primary: #122620; /* Deep Forest Green */
  --ink-secondary: #4a5d54; /* Muted Green-Grey */
  --accent-warm: #d66853; /* Persimmon/Clay */
  --accent-cool: #366c63; /* Vintage Teal */
  --border-color: #d1cdc4;

  /* Typography */
  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "Outfit", sans-serif;

  /* Spacing & Borders */
  --radius-sm: 4px;
  --radius-lg: 12px;
}

/* Base Reset & Atmosphere */
body {
  background-color: var(--bg-paper);
  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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  color: var(--ink-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6,
.title,
.stat-val {
  font-family: var(--font-serif) !important;
  color: var(--ink-primary) !important;
  letter-spacing: -0.02em;
}

.subtitle {
  font-family: var(--font-sans) !important;
  color: var(--ink-secondary) !important;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem !important;
}

/* Navigation - Floating & Minimal */
.navbar {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.navbar-item,
.navbar-link {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--ink-primary) !important;
}

/* Card Styling - Physical & Tactile */
.card,
.box {
  background: var(--surface);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 2px rgba(18, 38, 32, 0.05),
    0 8px 24px rgba(18, 38, 32, 0.02);
  border-radius: var(--radius-lg);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  position: relative;
}

/* Interactive Card Hover Effect */
.card.is-interactive:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 32px rgba(18, 38, 32, 0.08),
    0 4px 8px rgba(214, 104, 83, 0.1); /* Subtle accent glow */
  border-color: var(--accent-cool);
}

.card.is-interactive::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--ink-primary), var(--accent-warm));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card.is-interactive:hover::after {
  opacity: 1;
}

/* Stats Typography */
.stat-val {
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.1;
}

.stat-val.has-text-success {
  color: var(--ink-primary) !important;
} /* Green is now Ink */
.stat-val.has-text-danger {
  color: var(--accent-warm) !important;
} /* Red is Persimmon */

/* Table Styling - The "Invoice" Look */
.table {
  background: transparent;
}
.table thead th {
  border-bottom: 2px solid var(--ink-primary);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 1px;
}
.table td,
.table th {
  border-color: var(--border-color);
  padding: 1em 0.75em;
  vertical-align: middle;
}
.is-monospaced {
  font-family: "Outfit", sans-serif; /* Monospace often looks messy, using tabular nums instead */
  font-feature-settings: "tnum";
  font-weight: 500;
}

/* Buttons */
.button.is-primary,
.button.is-info {
  background-color: var(--ink-primary);
  color: var(--surface);
  font-family: var(--font-sans);
  border-radius: var(--radius-sm);
  transition: transform 0.2s;
}
.button:hover {
  transform: translateY(-1px);
}

/* Animation: Staggered Fade Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply animation classes */
.columns > .column:nth-child(1) {
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}
.columns > .column:nth-child(2) {
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}
.columns > .column:nth-child(3) {
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}
.columns > .column:nth-child(4) {
  animation: fadeInUp 0.6s ease-out 0.4s backwards;
}
.columns > .column:nth-child(5) {
  animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

/* Chart Container */
.chart-container {
  position: relative;
  height: 350px;
  width: 100%;
}

/* Utility Classes */
.border-radius-sm { border-radius: var(--radius-sm); }
.line-height-md { line-height: 1.6; }
.font-serif { font-family: var(--font-serif) !important; }

/* Custom Icons */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(214, 104, 83, 0.1);
  color: var(--accent-warm);
  margin-bottom: 1.5rem;
}
