/**
 * styles.css
 * 
 * Custom CSS styles for the Recon financial analysis application.
 * 
 * This file contains:
 * - CSS custom properties (variables) for colors and design tokens
 * - Global styles for body, navbar, and app root
 * - Hero section styles (landing page header with gradients and animations)
 * - Input section styles (document upload, ticker selection, analysis form)
 * - Results pane styles (analysis output display, PDF preview)
 * - Responsive design breakpoints for mobile/tablet/desktop
 * - Animation keyframes (spin, fadeIn, titleGradientShift)
 * - Component-specific styles (cards, buttons, progress indicators, resizers)
 * - Citation link styles for evidence references
 * 
 * Note: This file is loaded externally from index.html to improve code organization.
 */

:root {
  --pwc-yellow: #d4c252;
  --pwc-orange: #f4a21d;
  --accent-blue: #82a0f5;
  --cool-slate: #64748b;
  --ink-900: #0f172a;
  --radius: 18px;
}

body {
  background: #f4f6fb;
  color: var(--ink-900);
  font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  margin: 0;
}

.app-root {
  color: #0b1220;
}

.navbar {
  backdrop-filter: blur(16px);
  background: rgba(2, 6, 23, 0.85) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: .2px;
  color: #e5e7eb !important;
  font-size: 1rem;
}

.navbar .bi-lightning-charge-fill {
  font-size: 1.1rem;
}

.hero-shell {
  position: relative;
  overflow: hidden;
}

.hero-section {
  position: relative;
  padding: 6rem 1rem 5rem;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  color: #e5e7eb;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(130,160,245,0.20), transparent 60%),
    radial-gradient(circle at 85% 0%, rgba(212,194,82,0.18), transparent 60%),
    linear-gradient(to bottom, #e5ecff 0%, #f4f6fb 65%, #f9fafb 100%);
  z-index: 0;
  pointer-events: none;
}

.hero-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 220px;
  background: linear-gradient(
    to bottom,
    rgba(15,23,42,0) 0%,
    rgba(248,250,252,0.05) 40%,
    rgba(248,250,252,0.75) 80%,
    #f9fafb 100%
  );
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

@media (max-width: 992px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.4);
  background: radial-gradient(circle at 0 0, rgba(252,211,77,0.15), transparent 50%),
              rgba(15,23,42,0.6);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #e5e7eb;
  margin-bottom: 1.5rem;
}

.hero-kicker .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.35);
}

.hero-title {
  font-weight: 800;
  font-size: 3rem;
  line-height: 1.1;
  color: #f9fafb;
  margin-bottom: 1.75rem;
  letter-spacing: -0.04em;
  position: relative;
  display: inline-block;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }
}

.hero-title span.gradient {
  background: linear-gradient(120deg, #f4a21d, #facc15, #82a0f5);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: #cbd5f5;
  font-size: 1.05rem;
  max-width: 32rem;
  margin-bottom: 2.25rem;
  line-height: 1.6;
}

@media (max-width: 992px) {
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

@media (max-width: 992px) {
  .hero-cta {
    justify-content: center;
  }
}

.hero-cta .btn-primary {
  background-image: linear-gradient(120deg, var(--accent-blue), var(--pwc-orange));
  border: 0;
  box-shadow: 0 16px 45px rgba(15,23,42,0.6);
  padding-inline: 1.75rem;
}

.hero-cta .btn-primary:hover {
  filter: brightness(1.02);
}

.hero-cta .btn-demo {
  background: transparent;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  color: #e5e7eb;
  padding-inline: 1.4rem;
}

.hero-cta .btn-demo:hover {
  background: rgba(15,23,42,0.8);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  font-size: .8rem;
  color: #94a3b8;
}

.hero-meta strong {
  color: #cbd5e1;
  font-weight: 600;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.hero-meta i {
  font-size: .9rem;
}

.hero-right-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 1);
  padding: 1.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  color: #0f172a;
  position: relative;
  overflow: hidden;
}

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

.demo-spinning-icon {
  animation: spin 2s linear infinite;
}

.demo-fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.hero-right-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(244,162,29,0.22), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(129,140,248,0.28), transparent 60%);
  opacity: 0.9;
  z-index: -1;
}

.hero-right-tag {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: #cbd5f5;
  margin-bottom: .75rem;
}

.hero-right-metric {
  font-size: .85rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .4rem;
  color: #cbd5f5;
}

.hero-right-metric strong {
  font-size: 1.5rem;
  color: #f9fafb;
}

.hero-right-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: rgba(22,163,74,0.2);
  color: #bbf7d0;
  border: 1px solid rgba(22,163,74,0.5);
}

.hero-right-pill i {
  font-size: .8rem;
}

.hero-right-divider {
  border-top: 1px dashed rgba(148,163,184,0.5);
  margin: .9rem 0 1rem;
}

.hero-right-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: #9ca3af;
}

.hero-right-foot span.badge-mini {
  padding: .18rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.8);
}

.inputs-section {
  background: #f9fafb;
  padding: 4.5rem 0 3rem;
}

.inputs-section-inner {
  max-width: 1340px;
  margin: 0 auto;
  width: calc(100% - 2rem);
}

.inputs-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin: 0 auto 2rem;
  max-width: 1080px;
  width: 100%;
}

.inputs-section-header h2 {
  font-size: 1.5rem;
  margin: 0;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.inputs-section-header p {
  margin: .25rem 0 0;
  font-size: .9rem;
  color: #6b7280;
}

@media (max-width: 768px) {
  .inputs-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.inputs-wrapper {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.inputs-wrapper .btn.btn-primary {
  background-image: linear-gradient(120deg, var(--accent-blue), var(--pwc-orange));
  border: 0;
  box-shadow: 0 14px 30px rgba(15,23,42,0.22);
}

.inputs-wrapper .btn.btn-primary:hover {
  filter: brightness(1.02);
}


.card-float {
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.98),
    rgba(248, 250, 252, 0.98)
  );
  border-radius: var(--radius);
  border: 1px solid rgba(226, 232, 240, 1);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  padding: 1.35rem;
}

.results-pane.card-float {
  background: #ffffff;
}


.section-label {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .78rem;
  color: var(--cool-slate);
}

.ombre-ring {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border: 1px solid rgba(212,194,82,0.9);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 12px 4px rgba(212,194,82,0.18);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.ombre-ring::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 24px;
  background: radial-gradient(
    circle,
    rgba(212,194,82,0.32) 0%,
    rgba(212,194,82,0.22) 35%,
    rgba(212,194,82,0.12) 65%,
    rgba(255,255,255,0) 100%
  );
  z-index: -1;
  pointer-events: none;
  transition: transform .25s ease, background .25s ease;
}

.ombre-ring:hover::after,
.ombre-ring:focus-within::after {
  background: radial-gradient(circle, rgba(212,194,82,0.34) 0%, rgba(212,194,82,0.26) 50%, rgba(255,255,255,0) 100%);
  transform: scale(1.03);
}

.ring-inner {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
}

.ring-inner input.form-control,
.ring-inner textarea.form-control {
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font-size: .92rem;
  padding: .6rem .75rem;
}

.ring-inner input.form-control:focus,
.ring-inner textarea.form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.6);
  outline: none;
}


.dropzone-lite {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border-radius: 12px;
  background: #fff;
}

.dropzone-lite .lead {
  font-weight: 700;
  color: var(--cool-slate);
}

.results-wrapper {
  margin-top: 3rem;
}

.results-pane {
  height: 100%;
}

.preview-body {
  height: 620px;
  border-radius: 12px;
  background: repeating-linear-gradient(-45deg, #f3f4f6 0 10px, #ffffff 10px 20px);
}

.btn-ghost {
  border: 1px solid #e5e7eb;
  color: var(--cool-slate);
  background: #fff;
}

.btn-ghost:hover {
  background: #f1f5f9;
}

.tab-card {
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16,24,40,.06);
}

.circular-progress {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
}

.circular-progress svg {
  transform: rotate(-90deg);
}

.circular-progress-circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.circular-progress-bg {
  stroke: #e2e8f0;
}

.circular-progress-fill {
  stroke: url(#progressGradient);
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.3s ease;
}

.circular-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

.resizer-layout {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

.pane {
  min-width: 260px;
}

.pane-analysis {
  flex: 0 0 60%;
}

.pane-preview {
  flex: 0 0 40%;
  align-self: flex-start;
}

.pane-preview .results-pane {
  position: sticky;
  top: calc(50vh - 350px);
  max-height: 700px;
  overflow: visible;
}

.resizer-handle {
  flex: 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: col-resize;
}

.resizer-line {
  width: 2px;
  border-radius: 999px;
  height: 70%;
  background: linear-gradient(to bottom, rgba(212,194,82,0.4), rgba(130,160,245,0.4));
  opacity: .5;
}

.resizer-handle:hover .resizer-line {
  opacity: .9;
}

footer {
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

@keyframes titleGradientShift {
  0% {
    background-position: 0% 50%;
    transform: translateY(0);
  }
  100% {
    background-position: 100% 50%;
    transform: translateY(-1.5px);
  }
}

/* === OVERRIDES FOR NEW HEADING PALETTE === */
/* ------ GLOBAL HEADING STYLE UPDATE ------ */

.hero-title {
  color: #0f172a;
}

.inputs-section-header h2,
.section-label,
.card-float .section-label,
.results-pane .section-label {
  color: #0f172a !important;
}

.hero-subtitle {
  color: #475569 !important;
}

.section-label {
  color: #475569 !important;
  font-weight: 700;
}

.pane-analysis .section-label,
.pane-preview .section-label {
  color: #0f172a !important;
}

.text-muted,
.form-text,
.small.text-muted {
  color: #64748b !important;
}

.navbar {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.navbar-brand {
  color: #0f172a !important;
}

.badge.text-bg-warning-subtle.border-warning-subtle {
  background: linear-gradient(120deg, rgba(250, 204, 21, 0.12), rgba(129, 140, 248, 0.12));
  border-color: rgba(226, 232, 240, 1) !important;
  color: #92400e;
}

.citation-link {
  text-decoration: underline;
  cursor: pointer;
  color: #2563eb;
  font-weight: 500;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.citation-link:hover {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.results-pane {
  white-space: pre-wrap;
  word-wrap: break-word;
}
