/* LocalSwarm.ai — 7 · FAQ (prefix faq-) and 8 · Final CTA (prefix cta-).
   Builds on css/base.css tokens + components; nothing here restyles a base class outside these two sections. */

/* ==========================================================================
   7 · FAQ
   ========================================================================== */
.faq-section { --faq-dur: .42s; --faq-ease: cubic-bezier(.22, .61, .36, 1); }

/* Base focus ring is yellow, which disappears on paper: navy here. */
.faq-section :focus-visible { outline-color: var(--navy); }

.faq-head { margin-bottom: clamp(30px, 4.4vw, 52px); }
.faq-section .faq-title { font-weight: 400; margin-bottom: 0; }

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

/* .faq-item carries state (.faq-item--open) and the scroll reveal; .faq-card carries the visuals,
   so the reveal transition and the card's own transitions never fight over `transition`. */
.faq-card {
  background-color: var(--white);
  border: 1px solid var(--line-light);
  border-radius: 4px;
  transition: border-color .25s ease, background-color .25s ease, box-shadow .35s ease;
}
.faq-item.faq-item--open .faq-card {
  border-color: rgba(247, 198, 0, .4);
  background-image: linear-gradient(rgba(247, 198, 0, .03), rgba(247, 198, 0, .03));
  box-shadow: 0 22px 44px -36px rgba(15, 23, 42, .32);
}

.faq-q { margin: 0; font: inherit; }

.faq-trigger {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: center;
  column-gap: 18px;
  width: 100%;
  padding: 22px 24px;
  text-align: left;
  color: var(--ink);
  border-radius: 3px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.faq-trigger:focus-visible { outline-offset: 2px; }

.faq-num {
  font: 800 10px/1 var(--f-code);
  letter-spacing: .16em;
  color: rgba(30, 58, 95, .45);
  transition: color .25s ease;
}
.faq-item.faq-item--open .faq-num { color: var(--navy); }

.faq-q-text {
  position: relative; top: 1px;              /* Bebas caps sit a hair high; optically centre on the icon */
  font: 400 22px/1.15 var(--f-display-2);
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink);
}

/* + / − : two bars; the vertical one swings flat when the item opens. */
.faq-icon {
  position: relative;
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(247, 198, 0, .10);
  border: 1.5px solid rgba(247, 198, 0, .30);
  transition: background-color .25s ease, border-color .25s ease;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 12px; height: 2px; margin: -1px 0 0 -6px;
  border-radius: 1px;
  background: var(--yellow-dark);
  transition: transform var(--faq-dur) var(--faq-ease), background-color .25s ease;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item.faq-item--open .faq-icon { background: var(--yellow); border-color: var(--yellow); }
.faq-item.faq-item--open .faq-icon::before,
.faq-item.faq-item--open .faq-icon::after { transform: rotate(180deg); background: var(--ink); }

@media (hover: hover) {
  .faq-item:not(.faq-item--open) .faq-card:hover { border-color: rgba(0, 0, 0, .15); }
  .faq-item.faq-item--open .faq-card:hover { border-color: rgba(247, 198, 0, .6); }
  .faq-item:not(.faq-item--open) .faq-trigger:hover .faq-icon { background: rgba(247, 198, 0, .2); border-color: rgba(247, 198, 0, .6); }
  .faq-item:not(.faq-item--open) .faq-trigger:hover .faq-num { color: var(--navy); }
}

/* Height animation: grid row 0fr -> 1fr. Without JS every answer stays open (progressive enhancement). */
.faq-panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--faq-dur) var(--faq-ease), visibility 0s linear 0s;
}
.faq-panel-inner { min-height: 0; overflow: hidden; }
.js .faq-item:not(.faq-item--open) .faq-panel { grid-template-rows: 0fr; }
/* Fallback hiding (browsers without hidden="until-found"): drop closed answers from the tab order and the
   accessibility tree once the collapse has finished. With until-found support, JS uses that instead so
   closed answers stay findable with Ctrl/Cmd+F. */
.js .faq-section:not(.faq--findable) .faq-item:not(.faq-item--open) .faq-panel {
  visibility: hidden;
  transition: grid-template-rows var(--faq-dur) var(--faq-ease), visibility 0s linear var(--faq-dur);
}

.faq-answer {
  padding: 0 70px 26px 76px;                 /* 24 pad + 34 number + 18 gap: answers align with the question text */
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-2);
  transition: opacity .3s ease .06s, transform var(--faq-dur) var(--faq-ease);
}
.faq-answer p { max-width: 62ch; }
.faq-answer strong { color: var(--ink); }
.faq-answer a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.faq-answer a:hover { color: var(--ink); text-decoration-color: var(--ink); }
.js .faq-item:not(.faq-item--open) .faq-answer { opacity: 0; transform: translateY(-6px); transition: opacity .18s ease, transform var(--faq-dur) var(--faq-ease); }

/* Opened programmatically (deep link, find-in-page): no animation. */
.faq-item--instant .faq-panel,
.faq-item--instant .faq-answer,
.faq-item--instant .faq-card,
.faq-item--instant .faq-icon,
.faq-item--instant .faq-icon::before,
.faq-item--instant .faq-icon::after { transition: none !important; }

/* Closing nudge */
.faq-more {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline;
  gap: 6px 14px;
  margin-top: clamp(32px, 4vw, 44px);
  font-size: 15px; line-height: 1.6;
  color: var(--text-2);
  text-align: center;
}
.faq-more-link {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 14px/1 var(--f-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--yellow);
  transition: border-color .2s ease;
}
.faq-more-link::after {
  content: '→'; content: '→' / '';
  font-size: 1.1em;
  transition: transform .2s var(--ease-out);
}
.faq-more-link:hover { border-color: var(--ink); }
.faq-more-link:hover::after { transform: translateX(3px); }

@media (max-width: 600px) {
  .faq-trigger {
    grid-template-columns: minmax(0, 1fr) 28px;
    column-gap: 14px;
    padding: 18px 16px 18px 18px;
  }
  .faq-num { display: none; }
  .faq-q-text { font-size: 20px; }
  .faq-answer { padding: 0 18px 22px; font-size: 15.5px; line-height: 1.7; }
}

@media (forced-colors: active) {
  .faq-card, .faq-item.faq-item--open .faq-card { border-color: CanvasText; }
  .faq-icon, .faq-item.faq-item--open .faq-icon { border-color: ButtonText; background: Canvas; }
  .faq-icon::before, .faq-icon::after,
  .faq-item.faq-item--open .faq-icon::before, .faq-item.faq-item--open .faq-icon::after { background: ButtonText; }
}


/* ==========================================================================
   8 · Final CTA
   ========================================================================== */
.section.cta-section { padding: clamp(60px, 7vw, 100px) 0; }   /* copy-only close: a tighter band */

/* Base focus ring is yellow, which vanishes on the yellow sheet: ink here. */
.cta-section :focus-visible { outline-color: var(--ink); outline-offset: 4px; }

.cta-grid { display: grid; justify-items: center; text-align: center; }   /* one centred column: the copy is the whole close */

/* ---- Copy ---- */
.cta-copy { min-width: 0; max-width: 900px; }
.cta-label { justify-content: center; }
.cta-section .cta-title {
  font-weight: 400;
  font-size: clamp(36px, 6.4vw, 84px);
  line-height: 1.02;
  margin-bottom: 26px;
  color: var(--ink);
}
.cta-title-line { display: block; }
.cta-title-tail { display: inline; }
.cta-nowrap { white-space: nowrap; }       /* only possible break: "when the wings / show up." */

.cta-body {
  max-width: 32em;
  margin: 0 auto 36px;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(0, 0, 0, .85);
}

.cta-actions { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cta-note {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; line-height: 1.5;
  color: rgba(0, 0, 0, .72);
}
.cta-note::before { content: ''; width: 6px; height: 6px; background: var(--ink); flex-shrink: 0; }

@media (max-width: 600px) {
  .cta-body { font-size: 17px; margin-bottom: 30px; }
  .cta-section .cta-btn {
    width: 100%; max-width: 400px;
    padding: 20px 24px;
    font-size: 18px;
    white-space: normal;
    text-align: center;
  }
}
