:root {
  --rb-coral: #8A4FFF;
  --rb-coral-hover: #7B42F6;
  --rb-navy: #1A1A1A;
  --rb-navy-light: #2A2A2A;
  --rb-grey: #64748B;
  --rb-bg: #FAFAFA;
  --rb-white: #ffffff;
  --rb-border: #e2e8f0;

  --tpl-primary: #1e293b;
  --tpl-accent: #8A4FFF;
  --tpl-accent-light: #F3E8FF;
  --transition: 0.3s ease;
  --radius-sm: 12px;
  --radius-md: 20px;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Lexend', sans-serif; }
body { background: var(--rb-bg); color: var(--rb-navy); line-height: 1.6; }
/* Utilities */
.active { display: block; }
.text-center { text-align: center; }
.pt-4 { padding-top: 2rem; }
.pb-2 { padding-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.pb-4 { padding-bottom: 2rem; }
.w-100 { width: 100%; }
.alternate-bg { background: var(--rb-white); }
.section-bg { background: var(--rb-bg); }
.fade-in { animation: fadeIn 0.4s ease-out forwards; }
@keyframes fadeIn { from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }
/* Buttons */
button { cursor: pointer; transition: var(--transition); font-weight: 600; font-size: 1rem; border-radius: 50px; border: none; }
.btn-primary { background: var(--rb-coral); color: white; padding: 0.8rem 1.6rem; }
.btn-primary:hover { background: var(--rb-coral-hover); box-shadow: 0 4px 10px rgba(138, 79, 255, 0.3); }
.btn-primary.large { padding: 1.2rem 2.4rem; font-size: 1.2rem;}
.btn-outline { background: transparent; border: 2px solid var(--rb-coral); color: var(--rb-coral); padding: 0.8rem 1.6rem; border-radius: 50px; }
.btn-outline:hover { background: var(--rb-coral); color: white; }
.btn-outline-large { background: white; border: 2px solid var(--rb-border); color: var(--rb-navy); padding: 1.2rem; font-size: 1.1rem; border-radius: 12px; width: 100%; text-align: left; }
.btn-outline-large:hover { border-color: var(--rb-coral); color: var(--rb-coral); }
.btn-text { background: transparent; color: var(--rb-grey); text-decoration: underline; font-size: 0.95rem; }
.btn-text:hover { color: var(--rb-navy); }
/* Global Navbar */
.rb-navbar { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 4rem; background: var(--rb-white); box-shadow: 0 2px 15px rgba(0,0,0,0.05); position: sticky; top:0; z-index: 100;}
.rb-logo { font-size: 1.6rem; font-weight: 800; color: var(--rb-navy); cursor: pointer; display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.5px;}
.rb-logo .logo-icon { background: linear-gradient(135deg, #8A4FFF, #FF8A00); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.rb-nav-links { display: flex; gap: 2rem; list-style: none; }
.rb-nav-links a { text-decoration: none; color: var(--rb-grey); font-weight: 500; cursor: pointer; transition: color 0.2s; padding-bottom: 0.2rem; }
.rb-nav-links a:hover { color: var(--rb-coral); }
.rb-nav-links a.active-link { color: var(--rb-coral); border-bottom: 2px solid var(--rb-coral); }

/* Custom Badge, CTA */
.badge-pill { display: inline-block; background: #EADDFF; color: #4F378B; padding: 0.5rem 1.2rem; border-radius: 50px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 1.5rem; text-transform: uppercase; }
.text-italic-serif { font-family: 'Times New Roman', serif; font-style: italic; color: var(--rb-coral); font-weight: normal;}
.cta-box { background: var(--rb-coral); padding: 4rem 2rem; border-radius: var(--radius-md); color: white; margin: 4rem auto 0; max-width: 900px; box-shadow: 0 20px 40px rgba(138, 79, 255, 0.2); }
.cta-box h2 { font-size: 2.5rem; margin-bottom: 1.5rem; color: white; }
.cta-hide-bg-wrapper .bottom-cta { background: transparent; border: none; }
.btn-white { background: white; color: var(--rb-coral); padding: 1.2rem 2.4rem; border-radius: 50px; font-size: 1.1rem; font-weight: bold; border: none; transition: 0.3s; cursor: pointer; }
.btn-white:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.1); transform: translateY(-2px); color: var(--rb-coral-hover);}
.cta-subtext { margin-top: 1rem; font-size: 0.95rem; opacity: 0.9; color: #EDE9FE; }

/* Landing View - Hero */
.hero-section { background: var(--rb-bg); padding-bottom: 4rem; overflow: hidden; }
.hero-container { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 4rem auto 0; padding: 0 2rem; }
.hero-text { flex: 1; max-width: 600px; }
.hero-text h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 1.5rem; color: var(--rb-navy); font-weight: 800; letter-spacing: -1px;}
.hero-text p { font-size: 1.2rem; color: var(--rb-grey); margin-bottom: 2rem; line-height: 1.6; }
.trust-badges { color: var(--rb-grey); font-size: 0.95rem; }
/* Hero Image Injection Container */
.hero-image { flex: 1; display: flex; justify-content: center; position: relative; }
.hero-mockup-wrapper { position: relative; width: 400px; height: 500px; }
.hero-img-bg { position: absolute; width: 100%; height: 100%; background: linear-gradient(135deg, #e0e7ff, #f3e8ff); border-radius: 50%; top: 20px; left: 20px; z-index: 0; filter: blur(40px); opacity: 0.6;}
#hero-resume-mockup { position: absolute; top: 0; left: 40px; z-index: 1; transform: rotate(5deg); box-shadow: 0 20px 40px rgba(0,0,0,0.15); border-radius: 8px; overflow: hidden; border: 1px solid var(--rb-border); background: white; width: 300px; height: 420px; }
/* Expanded Site Sections */
.info-section { padding: 5rem 2rem; }
.section-subtitle-small { color: var(--rb-grey); font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px;}
.section-container { max-width: 1000px; margin: 0 auto; }
.section-title { font-size: 2.5rem; color: var(--rb-navy); margin-bottom: 1rem; }
.section-subtitle { font-size: 1.1rem; color: var(--rb-grey); margin-bottom: 3rem; }
/* Hired By Logos */
.hired-by-section { max-width: 1200px; margin: 0 auto; border-top: 1px solid var(--rb-border); }
.logos-flex { display: flex; justify-content: center; gap: 4rem; margin-top: 1.5rem; flex-wrap: wrap;}
.company-logo { font-size: 1.8rem; font-weight: 900; color: #cbd5e1; filter: grayscale(100%); transition: var(--transition); cursor: default;}
.company-logo:hover { filter: grayscale(0%); color: var(--rb-navy); }
.logo-google { font-family: 'Product Sans', sans-serif;}
.logo-amazon { font-family: 'Amazon Ember', sans-serif;}
/* Stats Banner */
.stats-banner { padding: 4rem 2rem; border-top: 1px solid var(--rb-border); border-bottom: 1px solid var(--rb-border); }
.stats-grid { display: flex; justify-content: space-around; gap: 2rem; text-align: center;}
.stat-item h3 { font-size: 3.5rem; color: var(--rb-coral); font-weight: 800; line-height: 1; margin-bottom: 0.5rem;}
.stat-item p { color: var(--rb-navy); font-weight: 500; font-size: 1.1rem;}
/* Steps Grid */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: left; }
.step-card { padding: 2.5rem; border-radius: var(--radius-md); position: relative; border: 1px solid var(--rb-border); transition: var(--transition); box-shadow: 0 4px 10px rgba(0,0,0,0.02);}
.step-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.05);}
.step-icon { width: 50px; height: 50px; background: var(--rb-coral); color: white; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: bold; font-size: 1.5rem; margin-bottom: 1.5rem; }
.step-card h3 { font-size: 1.4rem; margin-bottom: 0.8rem; }
.step-card p { color: var(--rb-grey); font-size: 1rem; }
/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.testimonial-card { background: white; padding: 2.5rem; border-radius: var(--radius-md); box-shadow: 0 4px 15px rgba(0,0,0,0.03); text-align: left; border: 1px solid var(--rb-border); display: flex; flex-direction: column; justify-content: space-between; }
.t-text { font-style: italic; color: var(--rb-navy); margin-bottom: 1.5rem; font-size: 1.1rem; }
.t-author h4 { color: var(--rb-coral); margin-bottom: 0.2rem; }
.t-author span { color: var(--rb-grey); font-size: 0.85rem; }
/* FAQ Section */
.faq-list { display: flex; flex-direction: column; gap: 1rem; max-width: 800px; margin: 2rem auto 0; text-align: left;}
.faq-item { padding: 2rem; border-radius: var(--radius-md); border: 1px solid var(--rb-border); }
.faq-item h4 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--rb-navy); }
.faq-item p { color: var(--rb-grey); }
/* Footer */
.bottom-cta { padding: 5rem 2rem; border-top: 1px solid var(--rb-border); border-bottom: 1px solid var(--rb-border); }
.rb-footer { background: var(--rb-navy); color: white; padding: 5rem 2rem 3rem; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.footer-col h3 { font-size: 1.3rem; margin-bottom: 1.5rem; color: white;}
.footer-col p { color: #94a3b8; font-size: 0.95rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.8rem; }
.footer-col a { color: #94a3b8; text-decoration: none; font-size: 0.95rem; transition: var(--transition); }
.footer-col a:hover { color: var(--rb-coral); }
/* Wizard View */
.wizard-container { max-width: 600px; margin: 5rem auto; background: var(--rb-white); padding: 4rem 3rem; border-radius: var(--radius-md); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.step-indicator { display: inline-block; background: #e2e8f0; color: var(--rb-navy); padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 1px;}
.wizard-container h2 { font-size: 2.2rem; margin-bottom: 1rem; }
.wizard-container p { color: var(--rb-grey); font-size: 1.1rem; margin-bottom: 2.5rem; }
.exp-options { display: flex; flex-direction: column; gap: 1rem; }
/* Templates View */
#templates-view { max-width: 1200px; margin: 3rem auto; padding: 0 2rem; }
.templates-header h2 { font-size: 2.5rem; margin-bottom: 0.5rem; margin-top: 1rem; }
.templates-header p { color: var(--rb-grey); font-size: 1.1rem; }
/* Template Grid with Dynamic Injection */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2.5rem; margin-top: 3rem; }
.tpl-card { text-align: center; cursor: pointer; transition: var(--transition); }
.tpl-card:hover { transform: translateY(-8px); }
.tpl-card:hover h3 { color: var(--rb-coral); }
.tpl-preview-wrapper { 
  width: 100%; 
  aspect-ratio: 1/1.4; 
  background: white; 
  border-radius: 6px; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
  margin-bottom: 1rem; 
  border: 1px solid var(--rb-border); 
  transition: var(--transition); 
  overflow: hidden; /* Hide overflow of scaled resume */
  position: relative;
  display: flex; /* For precise scaling origin */
}
.tpl-card:hover .tpl-preview-wrapper { box-shadow: 0 15px 30px rgba(241,101,67,0.2); border-color: var(--rb-coral); }
.tpl-card h3 { font-size: 1.1rem; color: var(--rb-navy); }
/* The generic Resume Document class */
.resume-doc {
  background: white;
  width: 794px;
  min-height: 1123px;
  box-sizing: border-box;
}

/* Print Mode Fallback */
@media print {
  body { background: white !important; margin: 0 !important; padding: 0 !important; }
  .view:not(.active), header, footer, .editor-form-area, .templates-header, .btn-primary, .btn-outline, .btn-text, #pricing-modal { display: none !important; }
  .editor-preview-area { display: block !important; background: white !important; padding: 0 !important; margin: 0 !important; width: 100% !important; }
  #preview-scaler { transform: none !important; height: auto !important; padding: 0 !important; width: 100% !important; }
  .resume-doc { position: relative !important; margin: 0 auto !important; box-shadow: none !important; border: none !important; width: 794px !important; min-height: 1123px !important; visibility: visible !important; }
  body * { visibility: hidden; }
  .resume-doc, .resume-doc *, .resume-doc span, .resume-doc div, .resume-doc p, .resume-doc h1, .resume-doc h2, .resume-doc h3, .resume-doc h4, .resume-doc h5, .resume-doc img { visibility: visible !important; }
}

/* Responsive */
@media (max-width: 1024px) {
  .hidden-mobile { display: none !important; }
  .editor-layout { flex-direction: column !important; height: auto !important; }
  .editor-sidebar-nav { width: 100% !important; }
  .editor-form-area { width: 100% !important; flex: none !important; }
  .editor-preview-area { display: none !important; }
}
/* AI Chat Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.animate-slide-up { animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.bot-msg { align-self: flex-start; }
.user-msg { 
  align-self: flex-end; 
  background: var(--rb-coral) !important; 
  color: white !important; 
  border-radius: 20px 20px 0 20px !important; 
  box-shadow: 0 4px 12px rgba(138, 79, 255, 0.2);
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-float-delayed { animation: float 3s ease-in-out 1.5s infinite; }


/* Scroll Reveal System */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.reveal-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Staggered Reveal for children */
.stagger-reveal > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stagger-reveal.in-view > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-reveal.in-view > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-reveal.in-view > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-reveal.in-view > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }

/* Mobile Touch Optimizations */
@media (max-width: 768px) {
  .hero-mockup-wrapper {
    width: 280px;
    height: 380px;
    margin: 0 auto;
  }
  #hero-resume-mockup {
    width: 240px;
    height: 340px;
    left: 20px;
  }
  .section-title {
    font-size: 2rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .rb-navbar {
    padding: 1rem;
  }
}

/* Custom Scrollbar for a premium feel */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--rb-coral);
}

