/*
 * FCOS Components — Higher-level Composed Components
 * Usage: <link rel="stylesheet" href="fcos-components.css">
 * Requires: fcos-ui.css (for CSS variables and base utilities)
 * Version: 1.0.0
 */


/* ==========================================================================
   1. HERO SECTIONS
   ========================================================================== */

.hero {
  width: 100%;
  padding: 80px 24px;
  position: relative;
}

.hero-centered {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1160px;
  margin-inline: auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-s);
  line-height: 1.7;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-centered .hero-actions {
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 20px;
}


/* ==========================================================================
   2. FEATURE GRIDS
   ========================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  border-color: var(--border-s);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-s);
  line-height: 1.6;
}

.features-alternating {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.features-alternating .feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.features-alternating .feature-row:nth-child(even) {
  direction: rtl;
}

.features-alternating .feature-row:nth-child(even) > * {
  direction: ltr;
}


/* ==========================================================================
   3. PRICING COMPONENTS
   ========================================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.pricing-card:hover {
  border-color: var(--border-s);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius-pill);
}

.pricing-card h3 {
  font-size: 1.125rem;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.pricing-card .price span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-m);
}

.pricing-card .price-desc {
  font-size: 13px;
  color: var(--text-m);
  margin-bottom: 24px;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.pricing-card ul li {
  font-size: 14px;
  color: var(--text-s);
  padding-left: 24px;
  position: relative;
}

.pricing-card ul li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-s);
  margin-bottom: 32px;
}


/* ==========================================================================
   4. TESTIMONIALS
   ========================================================================== */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.testimonial-quote {
  position: relative;
  padding-left: 20px;
}

.testimonial-quote::before {
  content: '\201C';
  position: absolute;
  left: -4px;
  top: -12px;
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
}

.testimonial-card p {
  font-size: 14px;
  color: var(--text-s);
  line-height: 1.7;
  font-style: italic;
}

.testimonial-card .author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.testimonial-card .author img,
.testimonial-card .author .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-light);
  flex-shrink: 0;
}

.testimonial-card .author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.testimonial-card .author-title {
  font-size: 12px;
  color: var(--text-m);
}

.testimonial-slider {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.testimonial-slider .testimonial-card {
  min-width: 320px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.testimonial-slider::-webkit-scrollbar {
  height: 4px;
}

.testimonial-slider::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 2px;
}

.testimonial-slider::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 2px;
}


/* ==========================================================================
   5. FAQ ACCORDION
   ========================================================================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item.open {
  border-color: var(--border-s);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: color var(--transition);
}

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

.faq-question::after {
  content: '\25BC';
  font-size: 10px;
  color: var(--text-m);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

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

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

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 20px 16px;
}

.faq-answer p {
  font-size: 14px;
  color: var(--text-s);
  line-height: 1.7;
}


/* ==========================================================================
   6. FOOTER
   ========================================================================== */

.footer {
  width: 100%;
  padding: 48px 24px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 32px;
  max-width: 1160px;
  margin-inline: auto;
  padding-bottom: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand .logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-m);
  line-height: 1.6;
}

.footer h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-m);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-s);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-s);
  transition: all var(--transition);
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  max-width: 1160px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-m);
}


/* ==========================================================================
   7. CTA SECTIONS
   ========================================================================== */

.cta-section {
  text-align: center;
  padding: 64px 24px;
  background: var(--accent-light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.cta-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 750;
  color: var(--text);
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 1rem;
  color: var(--text-s);
  margin-bottom: 24px;
  max-width: 480px;
  margin-inline: auto;
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cta-banner p {
  font-size: 15px;
  color: var(--text-s);
  flex: 1;
}

.cta-banner strong {
  color: var(--text);
}


/* ==========================================================================
   8. TIMELINE
   ========================================================================== */

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline-line {
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -40px;
  top: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  z-index: 1;
}

.timeline-item h4 {
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-item .timeline-date {
  font-size: 12px;
  color: var(--text-m);
  margin-bottom: 8px;
}

.timeline-item p {
  font-size: 14px;
  color: var(--text-s);
  line-height: 1.6;
}


/* ==========================================================================
   9. STEPS / PROGRESS
   ========================================================================== */

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  counter-reset: step;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-m);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}

/* Connector line between steps */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 2px;
  background: var(--border);
}

.step .step-label {
  font-size: 13px;
  font-weight: 550;
  color: var(--text-m);
  transition: color var(--transition);
}

.step.active::before {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.step.active .step-label {
  color: var(--accent);
}

.step.completed::before {
  content: '\2713';
  border-color: var(--success);
  color: var(--success);
  background: rgba(122, 189, 106, 0.12);
}

.step.completed .step-label {
  color: var(--success);
}

.step.completed:not(:last-child)::after {
  background: var(--success);
}


/* ==========================================================================
   10. PAGE HEADER
   ========================================================================== */

.page-header {
  padding: 32px 0;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.02em;
}

.page-header .subtitle {
  font-size: 15px;
  color: var(--text-s);
  margin-top: 6px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-m);
  margin-bottom: 12px;
}

.breadcrumbs a {
  color: var(--text-m);
  transition: color var(--transition);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span.separator {
  font-size: 10px;
}

.breadcrumbs .current {
  color: var(--text-s);
}


/* ==========================================================================
   11. RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  .hero {
    padding: 48px 16px;
  }

  .hero-split {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .hero-split .hero-actions {
    justify-content: center;
  }

  /* Reverse image to top on mobile */
  .hero-split > :last-child {
    order: -1;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .features-alternating .feature-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .features-alternating .feature-row:nth-child(even) {
    direction: ltr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-inline: auto;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-slider .testimonial-card {
    min-width: 280px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .cta-banner {
    flex-direction: column;
    text-align: center;
  }

  .steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .step {
    flex-direction: row;
    text-align: left;
    gap: 12px;
  }

  .step::before {
    margin-bottom: 0;
  }

  .step:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 32px 12px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .feature-card {
    padding: 20px;
  }

  .pricing-card {
    padding: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-section {
    padding: 40px 16px;
  }

  .cta-banner {
    padding: 16px 20px;
  }
}
