/* ==========================================================================
   faq.css — Как подключить + FAQ | Alisa AI Bridge
   Depends on theme.css (tokens, base, layout helpers, buttons, cards).
   ========================================================================== */

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */

.connect-hero {
  background: linear-gradient(160deg, var(--bg) 55%, var(--bg-warm) 100%);
  padding-bottom: 0;
  overflow: hidden;
  position: relative;
}

.connect-hero__inner {
  max-width: 700px;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.connect-hero__inner h1 {
  margin-top: 0.5rem;
}

.connect-hero__lead {
  margin-top: 1.125rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  max-width: 56ch;
}

.connect-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2rem;
}

/* ==========================================================================
   2. STEPS LIST
   ========================================================================== */

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 3rem;
  counter-reset: steps;
  list-style: none;
  padding: 0;
}

/* Step card */
.step-card {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: flex-start;
  position: relative;
  transition: box-shadow var(--t), transform var(--t);
}

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

/* Numbered circle */
.step-card__num {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(217, 119, 87, .35);
}

.step-card__num--done {
  background: #2da86a;
  box-shadow: 0 4px 14px rgba(45, 168, 106, .32);
}

/* Body */
.step-card__body {
  flex: 1;
  min-width: 0;
}

.step-card__body h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin-bottom: 0.625rem;
}

.step-card__body p {
  max-width: 70ch;
  margin-bottom: 0.75rem;
}

.step-card__body p:last-child {
  margin-bottom: 0;
}

/* Inline icon next to heading */
.step-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-sm);
  background: rgba(217, 119, 87, .10);
  color: var(--clay);
  margin-bottom: 0.875rem;
}

.step-card--done .step-card__icon {
  background: rgba(45, 168, 106, .10);
  color: #2da86a;
}

/* Action button inside step */
.step-card__action {
  margin-top: 0.5rem;
}

/* Info / success note */
.step-card__note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.875rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--r-sm);
  background: rgba(217, 119, 87, .07);
  border: 1px solid rgba(217, 119, 87, .18);
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.step-card__note svg {
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: var(--clay);
}

.step-card__note--success {
  background: rgba(45, 168, 106, .07);
  border-color: rgba(45, 168, 106, .20);
}

.step-card__note--success svg {
  color: #2da86a;
}

.step-card__note a {
  color: var(--clay);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.step-card__note a:hover {
  color: var(--clay-deep);
}

/* Connector line between cards (decorative, desktop only) */
@media (min-width: 700px) {
  .steps-list {
    position: relative;
  }

  .steps-list::before {
    content: '';
    position: absolute;
    left: clamp(1.5rem, 3vw, 2.5rem);
    top: 1.5rem;
    bottom: 1.5rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--clay) 0%, var(--gold) 100%);
    opacity: 0.22;
    border-radius: 2px;
    pointer-events: none;
  }
}

/* Mobile: stack number above body */
@media (max-width: 520px) {
  .step-card {
    flex-direction: column;
    gap: 0.875rem;
  }
}

/* ==========================================================================
   3. FAQ ACCORDION
   ========================================================================== */

.faq-list {
  max-width: 780px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Individual item */
.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:first-child {
  border-top: 1px solid var(--line);
}

.faq-item__heading {
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  margin: 0;
}

/* Trigger button */
.faq-item__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  transition: color var(--t);
  line-height: 1.4;
}

.faq-item__btn:hover {
  color: var(--clay);
}

.faq-item__btn:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Plus / minus icon */
.faq-item__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--bg-warm);
  border: 1.5px solid var(--line);
  position: relative;
  transition: background var(--t), border-color var(--t), transform var(--t);
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--ink-soft);
  border-radius: 2px;
  transition: opacity var(--t), transform var(--t), background var(--t);
}

/* Horizontal bar */
.faq-item__icon::before {
  width: 10px;
  height: 2px;
}

/* Vertical bar (hidden when open) */
.faq-item__icon::after {
  width: 2px;
  height: 10px;
}

/* Open state */
.faq-item--open .faq-item__btn {
  color: var(--clay);
}

.faq-item--open .faq-item__icon {
  background: rgba(217, 119, 87, .12);
  border-color: rgba(217, 119, 87, .35);
  transform: rotate(45deg);
}

.faq-item--open .faq-item__icon::before,
.faq-item--open .faq-item__icon::after {
  background: var(--clay);
}

/* Panel */
.faq-item__panel {
  overflow: hidden;
}

.faq-item__panel[hidden] {
  display: none;
}

.faq-item__body {
  padding-bottom: 1.375rem;
}

.faq-item__body p {
  max-width: 68ch;
  margin-bottom: 0.75rem;
}

.faq-item__body p:last-child {
  margin-bottom: 0;
}

/* Inner list within FAQ answer */
.faq-list-inner {
  list-style: none;
  padding: 0;
  margin: 0.625rem 0 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.faq-list-inner li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  padding-left: 0.25rem;
}

.faq-list-inner li::before {
  content: '';
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--clay);
  margin-top: 0.45em;
}

.faq-list-inner--ordered {
  counter-reset: faq-ol;
}

.faq-list-inner--ordered li {
  counter-increment: faq-ol;
}

.faq-list-inner--ordered li::before {
  content: counter(faq-ol) '.';
  background: none;
  border-radius: 0;
  width: auto;
  height: auto;
  font-weight: 700;
  color: var(--clay);
  font-size: 0.875rem;
  margin-top: 0;
  flex-shrink: 0;
}

/* code inline */
.faq-item__body code {
  display: inline-block;
  padding: 0.15em 0.45em;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85em;
  color: var(--clay-deep);
  word-break: break-all;
}

/* ==========================================================================
   4. INLINE LINKS (clay colour)
   ========================================================================== */

.link-clay {
  color: var(--clay);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(217, 119, 87, .45);
  transition: color var(--t), text-decoration-color var(--t);
}

.link-clay:hover {
  color: var(--clay-deep);
  text-decoration-color: var(--clay-deep);
}

/* ==========================================================================
   5. FINAL CTA SECTION
   ========================================================================== */

.connect-cta__inner {
  text-align: center;
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: var(--r-lg);
  max-width: 820px;
  margin-inline: auto;
}

.connect-cta__inner .eyebrow {
  display: block;
  margin-bottom: 0.625rem;
}

.connect-cta__inner h2 {
  margin-bottom: 1rem;
}

.connect-cta__inner p {
  max-width: 58ch;
  margin-inline: auto;
  margin-bottom: 0;
}

.connect-cta__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* ==========================================================================
   6. RESPONSIVE
   ========================================================================== */

@media (max-width: 600px) {
  .connect-hero__cta {
    flex-direction: column;
  }

  .connect-hero__cta .btn {
    width: 100%;
    justify-content: center;
  }

  .connect-cta__btns {
    flex-direction: column;
  }

  .connect-cta__btns .btn {
    width: 100%;
    justify-content: center;
  }

  .faq-item__btn {
    padding: 1rem 0;
  }
}

@media (max-width: 400px) {
  .step-card__num {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.125rem;
  }
}
