/* RetainerLogic.ai - Styles matching Underwrite.ai design language */

/* ===== CSS Variables ===== */
:root {
  /* Colors - Matching Underwrite.ai palette */
  --color-primary: #0EA5E9;        /* Teal/Cyan - CTAs */
  --color-primary-dark: #0284C7;   /* Darker teal for hover */
  --color-accent: #7C3AED;         /* Purple - accents */
  --color-accent-light: #A78BFA;   /* Light purple */
  --color-heading: #0F172A;        /* Dark navy */
  --color-text: #334155;           /* Body text */
  --color-text-light: #64748B;     /* Secondary text */
  --color-background: #FFFFFF;     /* White */
  --color-surface: #F8FAFC;        /* Light blue-gray */
  --color-surface-alt: #F1F5F9;    /* Slightly darker surface */
  --color-border: #E2E8F0;         /* Subtle borders */
  --color-success: #10B981;        /* Green */
  --color-warning: #F59E0B;        /* Amber */
  --color-error: #EF4444;          /* Red */
  
  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Borders */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Container */
  --container-max: 1200px;
  --container-padding: 1.5rem;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

h4 {
  font-size: 1.125rem;
}

p {
  margin-bottom: var(--space-md);
}

.lead {
  font-size: 1.25rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.highlight {
  color: var(--color-accent);
}

/* ===== Layout ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--space-4xl) 0;
}

.section--surface {
  background-color: var(--color-surface);
}

.section--gradient {
  background: linear-gradient(135deg, #7C3AED 0%, #6366F1 50%, #0EA5E9 100%);
  color: white;
}

.section--gradient h1,
.section--gradient h2,
.section--gradient h3,
.section--gradient h4 {
  color: white;
}

.section--gradient .lead {
  color: rgba(255, 255, 255, 0.9);
}

.text-center {
  text-align: center;
}

.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 968px) {
  .grid--3, .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ===== Header & Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-heading);
}

.logo__icon {
  width: 32px;
  height: 32px;
}

.logo__text span {
  color: var(--color-accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-primary);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: none;
  background: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-heading);
  transition: transform 0.2s ease;
}

@media (max-width: 768px) {
  .nav__list {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .nav.open .nav__list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn--primary {
  background-color: var(--color-primary);
  color: white;
}

.btn--primary:hover {
  background-color: var(--color-primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--secondary:hover {
  background-color: var(--color-primary);
  color: white;
}

.btn--white {
  background-color: white;
  color: var(--color-accent);
}

.btn--white:hover {
  background-color: var(--color-surface);
  color: var(--color-accent);
  transform: translateY(-1px);
}

.btn--large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ===== Hero Section ===== */
.hero {
  padding: calc(72px + var(--space-4xl)) 0 var(--space-4xl);
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero__content {
  max-width: 600px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(14, 165, 233, 0.1));
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
}

.hero__badge strong {
  background: var(--color-primary);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.hero h1 {
  margin-bottom: var(--space-lg);
}

.hero .lead {
  margin-bottom: var(--space-xl);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.hero__image {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Cards ===== */
.card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card--surface {
  background: var(--color-surface);
  border: none;
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(14, 165, 233, 0.1));
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
}

.card h3 {
  margin-bottom: var(--space-sm);
}

.card p {
  color: var(--color-text-light);
  margin-bottom: 0;
}

/* ===== Pricing Cards ===== */
.pricing-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  border: 2px solid var(--color-border);
  transition: all 0.3s ease;
}

.pricing-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-xl);
}

.pricing-card--featured {
  border-color: var(--color-primary);
  position: relative;
}

.pricing-card--featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.pricing-card__header {
  text-align: center;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-lg);
}

.pricing-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: var(--space-sm);
}

.pricing-card__price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1;
}

.pricing-card__price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-light);
}

.pricing-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-top: var(--space-sm);
}

.pricing-card__features {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.pricing-card__features li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-success);
  margin-top: 2px;
}

.pricing-card .btn {
  width: 100%;
}

/* ===== Stats ===== */
.stats {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat__value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.section--gradient .stat__value {
  color: white;
}

.stat__label {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.section--gradient .stat__label {
  color: rgba(255, 255, 255, 0.8);
}

/* ===== Steps ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  counter-reset: step;
}

@media (max-width: 768px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  text-align: center;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
}

.step h3 {
  margin-bottom: var(--space-sm);
}

.step p {
  color: var(--color-text-light);
  font-size: 0.9375rem;
}

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-lg) 0;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-heading);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-question svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer__content {
  padding-bottom: var(--space-lg);
  color: var(--color-text-light);
}

/* ===== Legal Citations ===== */
.citation {
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.citation__source {
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: var(--space-xs);
}

.citation__text {
  font-style: italic;
  color: var(--color-text-light);
  margin-bottom: 0;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-heading);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  color: white;
  margin-bottom: var(--space-md);
}

.footer__desc {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.footer__powered {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer__powered img {
  height: 20px;
  opacity: 0.7;
}

.footer h4 {
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
}

.footer__links {
  list-style: none;
}

.footer__links li {
  margin-bottom: var(--space-sm);
}

.footer__links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: white;
}

.footer__bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.875rem;
}

.footer__legal {
  display: flex;
  gap: var(--space-lg);
}

.footer__legal a {
  color: rgba(255, 255, 255, 0.5);
}

.footer__legal a:hover {
  color: white;
}

/* ===== Utilities ===== */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-lg); }
.mt-3 { margin-top: var(--space-xl); }
.mt-4 { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-lg); }
.mb-3 { margin-bottom: var(--space-xl); }
.mb-4 { margin-bottom: var(--space-2xl); }

.max-w-prose {
  max-width: 65ch;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* ===== Form Elements ===== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-heading);
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-light);
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
