/* =============================================
   LetterAssist Page — Specific Styles
   ============================================= */

/* --- Hero Section --- */
.la-hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.la-hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.la-hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.la-hero-tagline {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 24px;
}

.la-hero .hero-subtitle {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 48px;
}

/* Features Grid */
.la-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.la-feature {
  padding: 28px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition);
}

.la-feature:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.la-feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 70, 229, 0.1);
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  color: var(--primary-light);
  margin: 0 auto 16px;
  transition: var(--transition);
}

.la-feature:hover .la-feature-icon {
  background: var(--gradient);
  color: #fff;
}

.la-feature h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.la-feature p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.la-hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Table of Contents Bar --- */
.la-toc-bar {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 64px;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.la-toc {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.la-toc-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.la-toc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.la-toc-link:hover,
.la-toc-link.active {
  color: var(--primary-light);
  border-color: var(--primary-light);
  background: rgba(79, 70, 229, 0.05);
}

.la-toc-link i {
  font-size: 0.8rem;
}

/* --- Legal Sections --- */
.legal-section {
  padding: 100px 0;
}

.legal-section-alt {
  background: var(--bg-surface);
}

.legal-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.legal-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.legal-header .section-subtitle {
  font-size: 0.95rem;
}

/* Legal Content Container */
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 56px;
}

.legal-section-alt .legal-content {
  background: var(--bg-elevated);
}

/* Legal Intro */
.legal-intro {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.legal-intro p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-intro p:last-child {
  margin-bottom: 0;
}

/* Legal Blocks */
.legal-block {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.legal-block:last-of-type {
  border-bottom: none;
}

.legal-block h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.legal-number {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--primary-light);
  font-weight: 600;
}

.legal-block h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 12px;
  padding-left: 16px;
  border-left: 3px solid var(--primary);
}

.legal-block p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-block p:last-child {
  margin-bottom: 0;
}

.legal-block strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Lists */
.legal-block ul,
.legal-block ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-block ul {
  list-style: none;
  padding-left: 0;
}

.legal-block ul li {
  position: relative;
  padding-left: 20px;
  padding-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.legal-block ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-light);
}

.legal-block ol {
  counter-reset: legal-step;
  list-style: none;
  padding-left: 0;
}

.legal-block ol li {
  counter-increment: legal-step;
  position: relative;
  padding-left: 36px;
  padding-bottom: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.legal-block ol li::before {
  content: counter(legal-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  font-family: var(--font-mono);
}

/* Tables */
.legal-table-wrapper {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.legal-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.legal-table-wrapper thead {
  background: rgba(79, 70, 229, 0.08);
}

.legal-table-wrapper th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.legal-table-wrapper td {
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.legal-table-wrapper tr:last-child td {
  border-bottom: none;
}

.legal-table-wrapper td strong {
  color: var(--text-primary);
}

/* Callouts */
.legal-callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  align-items: flex-start;
}

.legal-callout i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 1rem;
}

.legal-callout p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.legal-callout-warning {
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.legal-callout-warning i {
  color: #fbbf24;
}

.legal-callout-warning p {
  color: #fbbf24;
}

.legal-callout-info {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.legal-callout-info i {
  color: var(--accent-light);
}

.legal-callout-info p {
  color: var(--accent-light);
}

.legal-callout-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.legal-callout-success i {
  color: #34d399;
}

.legal-callout-success p {
  color: #34d399;
}

/* Contact Block */
.legal-contact {
  padding: 20px 24px;
  background: rgba(79, 70, 229, 0.05);
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: var(--radius-md);
  margin: 12px 0;
}

.legal-contact p {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.legal-contact p:last-child {
  margin-bottom: 0;
}

/* Acceptance Notice */
.legal-acceptance {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0 0;
  margin-top: 32px;
  border-top: 1px solid var(--border);
}

.legal-acceptance i {
  color: var(--accent);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.legal-acceptance p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .la-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .la-hero {
    padding: 120px 0 60px;
  }

  .la-features-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 36px;
  }

  .legal-content {
    padding: 32px 24px;
  }

  .legal-section {
    padding: 60px 0;
  }

  .la-toc-bar {
    top: 56px;
  }

  .la-toc {
    gap: 8px;
  }

  .la-toc-label {
    display: none;
  }

  .la-toc-link {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .la-toc-link i {
    display: none;
  }

  .legal-block h3 {
    font-size: 1.1rem;
  }

  .legal-table-wrapper {
    font-size: 0.8rem;
  }

  .legal-table-wrapper th,
  .legal-table-wrapper td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .la-hero h1 {
    font-size: 2.5rem;
  }

  .la-hero-tagline {
    font-size: 1.1rem;
  }

  .legal-content {
    padding: 24px 18px;
    border-radius: var(--radius-lg);
  }
}
