/* ==========================================================================
   RESOLVIA — PREMIUM INTERACTIVE REPORT WEB-PAGE DESIGN SYSTEM
   Apple × Stripe × Linear × Vercel Design Quality Architecture
   ========================================================================== */

:root {
  /* Core Color Tokens */
  --bg-dark: #0b0f17;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(24, 32, 50, 0.9);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-bright: rgba(255, 255, 255, 0.18);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --glow-cyan: rgba(56, 189, 248, 0.25);
  --glow-emerald: rgba(16, 185, 129, 0.25);
  
  /* Typography & Layout */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 99px;
  --max-width: 1140px;
}

/* Light Theme Variables (Dynamic Support) */
[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-bright: rgba(0, 0, 0, 0.18);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  
  --glow-cyan: rgba(56, 189, 248, 0.15);
  --glow-emerald: rgba(16, 185, 129, 0.15);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(30, 41, 59, 0.4) 0%, var(--bg-dark) 70%);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Floating Toolbar (Sales Demo Customizer) */
.customizer-toolbar {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.toolbar-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.toolbar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.toolbar-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s ease;
}

.toolbar-btn:hover,
.toolbar-btn.active {
  background: var(--accent-cyan);
  color: #0f172a;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
}

.toolbar-custom-trigger {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.toolbar-custom-trigger:hover {
  background: var(--accent-purple);
  color: #ffffff;
}

/* Customizer Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.customizer-modal {
  width: 100%;
  max-width: 520px;
  background: #0f172a;
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .customizer-modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s ease;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-cyan);
}

/* SECTION 1: HERO */
.report-hero {
  padding-top: 4.5rem;
  padding-bottom: 4rem;
  text-align: center;
}

.meta-prepared-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 2rem;
}

.hero-company-card {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.2rem 2.2rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  margin-bottom: 2.5rem;
  text-align: left;
}

.company-logo-frame {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
  border: 1px solid var(--border-glass-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-cyan);
  overflow: hidden;
}

.company-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.company-meta-info {
  display: flex;
  flex-direction: column;
}

.company-name-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.company-website-link {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s ease;
}

.company-website-link:hover {
  color: var(--accent-cyan);
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  max-width: 920px;
  margin: 0 auto 1.5rem auto;
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #a855f7 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub-meta {
  font-size: 0.95rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

/* SECTION 2: THE PROBLEM */
.problem-section {
  padding: 4rem 0;
}

.problem-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2.5rem;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.3) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-rose), transparent);
}

.problem-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.problem-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
}

/* SECTION 3: CONTENT MULTIPLICATION BLUEPRINT (HERO INTERACTIVE ENGINE) */
.blueprint-section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-emerald);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.engine-canvas-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  position: relative;
}

.flow-engine-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
  position: relative;
}

.flow-grid-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

.flow-node {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.flow-node:hover, .flow-node.active {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--glow-cyan);
}

.flow-node.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--accent-cyan);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.node-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem auto;
  font-size: 1.3rem;
  color: var(--accent-cyan);
}

.node-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.node-subtext {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.node-detail-box {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.node-detail-info h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--accent-cyan);
  margin-bottom: 0.4rem;
}

.node-detail-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.node-detail-stat {
  text-align: right;
}

.node-detail-stat-val {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

.node-detail-stat-lbl {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* SECTION 4: REAL EXAMPLE (DYNAMIC SAAS VS WEALTH) */
.example-section {
  padding: 5rem 0;
}

.example-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.example-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-glass);
}

.example-industry-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.example-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.asset-preview-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.asset-preview-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  background: rgba(56, 189, 248, 0.05);
}

.asset-type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.asset-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.asset-link-icon {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* SECTION 5: COMPETITOR SNAPSHOT (DYNAMIC SAAS VS WEALTH) */
.competitors-section {
  padding: 5rem 0;
}

.competitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.competitor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.3s ease;
}

.competitor-card:hover {
  transform: translateY(-4px);
}

.competitor-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.competitor-logo-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-amber);
}

.competitor-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.competitor-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.competitor-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.competitor-link-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-glass-bright);
}

/* SECTION 6: KEY TAKEAWAYS */
.takeaways-section {
  padding: 5rem 0;
}

.takeaways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.takeaway-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
}

.takeaway-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.08);
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

.takeaway-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.takeaway-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* SECTION 7: CTA */
.cta-section {
  padding: 6rem 0;
  text-align: center;
}

.cta-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--border-glass-bright);
  border-radius: 28px;
  padding: 4.5rem 2rem;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.cta-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--glow-cyan) 0%, transparent 60%);
  pointer-events: none;
}

.cta-headline {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 2;
}

.cta-buttons-wrapper {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.btn-report-primary {
  padding: 1rem 2.2rem;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #2563eb 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 12px 28px var(--glow-cyan);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-report-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px var(--glow-cyan);
}

.btn-report-secondary {
  padding: 1rem 2.2rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-glass-bright);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s ease;
}

.btn-report-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Footer Minimal */
.report-footer {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border-glass);
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .customizer-toolbar {
    width: 90%;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
  }
  .node-detail-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .node-detail-stat {
    text-align: left;
  }
  .hero-company-card {
    padding: 1rem 1.5rem;
  }
}
