/* ==========================================================================
   Components — Buttons, service rows, stats, shared UI
   ========================================================================== */

/* --- Buttons --- */

.btn-primary {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-button);
  letter-spacing: var(--tracking-button);
  padding: 14px 32px;
  border: none;
  border-radius: var(--border-radius-button);
  cursor: pointer;
  transition: background var(--duration-fast) ease;
  text-decoration: none;
}

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

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary--large {
  padding: 16px 40px;
}

/* --- Text Links --- */

.link-text {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-body);
  transition: text-decoration-color var(--duration-fast) ease;
}

.link-text:hover {
  text-decoration-color: transparent;
}

/* --- Arrow Links --- */

.link-arrow {
  color: var(--color-accent);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-body);
}

.link-arrow::after {
  content: ' \2192';
  transition: margin-left var(--duration-fast) ease;
  margin-left: 0;
}

.link-arrow:hover::after {
  margin-left: 4px;
}

/* --- Section Labels --- */

.section-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-secondary);
  line-height: var(--leading-small);
}

/* --- Horizontal Dividers --- */

.divider {
  border: none;
  border-top: 1px solid var(--color-divider);
  width: 100%;
}

/* --- Service Rows --- */

.service-row {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: var(--grid-gutter);
  align-items: start;
  padding: var(--space-lg) 0;
  transition: background var(--duration-medium) ease;
  margin: 0 calc(-1 * var(--space-sm));
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
  border-radius: 4px;
}

.service-row:hover {
  background: var(--color-surface-hover);
}

.service-row:hover .service-title {
  color: var(--color-accent);
}

.service-number {
  font-family: var(--font-display);
  font-size: var(--text-body);
  color: var(--color-secondary);
  min-width: 2em;
}

.service-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  color: var(--color-primary);
  transition: color var(--duration-medium) ease;
}

.service-description {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-secondary);
  max-width: var(--body-max-width);
}

@media (max-width: 767px) {
  .service-row {
    grid-template-columns: auto 1fr;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .service-description {
    grid-column: 1 / -1;
  }
}

/* --- Process Steps --- */

.process-step {
  position: relative;
  padding-left: var(--space-xl);
  padding-bottom: var(--space-3xl);
}

.process-step::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: var(--color-divider);
}

.process-step:last-child::before {
  display: none;
}

.process-step:last-child {
  padding-bottom: 0;
}

.process-phase {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--space-xs);
}

.process-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.process-text {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-secondary);
  max-width: var(--body-max-width);
}

/* --- Stat Callouts --- */

.stat-item {
  margin-bottom: var(--space-xl);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1.1;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-secondary);
}

/* --- Testimonial Quotes --- */

.testimonial {
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-accent);
  margin-bottom: var(--space-xl);
}

.testimonial-quote {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-style: italic;
  line-height: var(--leading-h3);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.testimonial-author {
  font-family: var(--font-body);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-secondary);
}

/* --- Credibility Bar --- */

.credibility-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: var(--tracking-wide);
  color: var(--color-secondary);
}

.credibility-bar span {
  white-space: nowrap;
}

.credibility-separator {
  color: var(--color-secondary);
}

@media (max-width: 767px) {
  .credibility-bar {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .credibility-separator {
    display: none;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

/* --- CTA Group --- */

.cta-group {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

/* --- Scroll Reveal --- */

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity var(--duration-reveal) var(--ease-default),
              transform var(--duration-reveal) var(--ease-default);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-group > *:nth-child(1) { transition-delay: 0s; }
.reveal-group > *:nth-child(2) { transition-delay: var(--stagger-delay); }
.reveal-group > *:nth-child(3) { transition-delay: calc(var(--stagger-delay) * 2); }
.reveal-group > *:nth-child(4) { transition-delay: calc(var(--stagger-delay) * 3); }
.reveal-group > *:nth-child(5) { transition-delay: calc(var(--stagger-delay) * 4); }
.reveal-group > *:nth-child(6) { transition-delay: calc(var(--stagger-delay) * 5); }

/* --- Form Fields --- */

.form-field {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea,
.form-select {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-primary);
  background: var(--color-white);
  border: 1px solid var(--color-divider);
  border-radius: var(--border-radius-button);
  padding: 12px var(--space-sm);
  transition: border-color var(--duration-fast) ease,
              outline-color var(--duration-fast) ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 0;
  border-color: var(--color-accent);
}

.form-textarea {
  resize: vertical;
  min-height: 160px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-sm) center;
  padding-right: var(--space-xl);
}

/* --- Form Checkbox (GDPR consent) --- */

.form-field--checkbox {
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);
}

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  cursor: pointer;
}

.form-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.form-checkbox-text {
  font-family: var(--font-body);
  font-size: var(--text-small);
  line-height: var(--leading-small);
  color: var(--color-secondary);
}

.form-checkbox-text a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-checkbox-text a:hover {
  text-decoration-color: transparent;
}

/* --- Focus States (Accessibility) --- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
