/* ===== FAQ page (faq-aqua.html) ===== */
/* Shares style-aqua.css's design language -- these rules only add the
   page-specific chrome. The accordion itself reuses .faq-section /
   .faq-glow / .faq-card / .faq-badge / .faq-heading / .faq-list /
   .faq-item* exactly as already built (index.html / integrations-aqua.html
   / automations-aqua.html), unmodified -- one .faq-card per category
   instead of the single mini-list those pages embed. New "faqp-" prefixed
   classes below are page-specific chrome that doesn't exist elsewhere
   (nav-without-hero-video band, hero heading/search, category tabs). */

/* ----- Hero -----
   Built as one photo hero (same structural pattern as about/contact/
   automations etc): full-bleed image + scrim, nav sitting flush on top
   of it, then the heading/search/category-pills content below the nav,
   all layered above the image via z-index. Nothing here lives in a
   separate light-bg band anymore -- the pills are now part of the hero
   itself, styled as frosted glass to sit on the photo instead of the
   solid-white pills the old light section used. */

.faqp-hero {
  position: relative;
  overflow: hidden;
  padding: 0 var(--space-3) var(--space-6);
}

.faqp-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.faqp-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(21, 58, 80, 0.25), rgba(21, 58, 80, 0.15));
}

.faqp-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  padding-top: var(--space-7);
  text-align: center;
}

.faqp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: var(--space-3);
}

.faqp-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-amber);
}

.faqp-heading {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: var(--space-4);
}

.faqp-heading-sans {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}

.faqp-heading-serif {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
}

.faqp-search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto var(--space-5);
}

.faqp-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.faqp-search-input {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px 13px 44px;
  border-radius: var(--radius-ui);
  border: 0.5px solid var(--border);
  background: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.faqp-search-input::placeholder {
  color: var(--text-secondary);
}

.faqp-search-input:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(170, 208, 226, 0.2);
}

/* ----- Category sidebar + content grid -----
   Left-aligned vertical category list next to the active category's
   Q&A, instead of the old centered pill row above a stack of cards --
   click a category on the left, the content on the right swaps (same
   js/faq-page.js show/hide logic, untouched, just re-laid-out). Sticky
   on desktop so the list stays put while the right side's accordion
   grows/shrinks as items expand. */

.faqp-body-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-5);
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.faqp-tabs-row {
  position: sticky;
  top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.faqp-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  background: none;
  border: none;
  padding: 10px 0 10px 22px;
  cursor: pointer;
  white-space: normal;
  line-height: 1.35;
  transition: color 0.3s var(--ease);
}

.faqp-tab::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.faqp-tab:hover {
  color: rgba(255, 255, 255, 0.85);
}

.faqp-tab.active {
  color: #ffffff;
}

.faqp-tab.active::before {
  width: 20px;
  background: var(--accent-amber);
}

/* ----- Accordion cards group: .faq-section/.faq-glow provide the ember
   background; one .faq-card per category sits inside it, shown/hidden by
   js/faq-page.js based on the active tab or the live search term. ----- */

.faqp-cards-group {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.faqp-no-results {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
  .faqp-body-grid {
    grid-template-columns: 1fr;
  }

  .faqp-tabs-row {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding: 0 var(--space-3);
    margin: 0 calc(var(--space-3) * -1) var(--space-2);
  }

  .faqp-tabs-row::-webkit-scrollbar {
    display: none;
  }

  .faqp-tab {
    scroll-snap-align: start;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.08);
  }

  .faqp-tab::before {
    display: none;
  }

  .faqp-tab.active {
    background: var(--accent-amber);
    color: var(--text-primary);
  }
}

@media (max-width: 768px) {
  .faqp-search-input {
    font-size: 16px; /* >=16px keeps iOS Safari from auto-zooming on focus */
  }
}

/* ----- Hero floating Q&A widgets -----
   Same component as engine-text-to-text-aqua.html's
   .engine-float-card-left/-right (reused verbatim: structure, avatar
   rings, idle-bob keyframes, entrance animation, the 1400px hide
   threshold), just re-painted for this hero -- true glassmorphic
   bubbles instead of TTT's solid white/amber chat-bubble look, since
   this hero already leans on liquid glass everywhere else (badge,
   pills, search). Positioned relative to .faqp-hero-inner (already
   position:relative), vertically centered on it the same way TTT's
   cards center on .engines-widget. Copy verbatim from the FAQ list
   itself (Security & Compliance, Q1) rather than invented copy. */

.engine-float-card {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 190px;
  opacity: 0;
}

.engine-float-card-left {
  left: 0;
  transform: translate(calc(-100% - 28px), -50%);
  animation: heroFloatInLeft 0.7s ease-out forwards, engineFloatBobLeft 3s ease-in-out infinite;
  animation-delay: 1.2s, 1.9s;
}

.engine-float-card-right {
  right: 0;
  justify-content: flex-end;
  transform: translate(calc(100% + 28px), -50%);
  animation: heroFloatInRight 0.7s ease-out forwards, engineFloatBobRight 3.2s ease-in-out infinite;
  animation-delay: 1.6s, 2.4s;
}

.engine-float-avatar-ring {
  flex-shrink: 0;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 2px;
}

.engine-float-avatar-ring-user {
  background: var(--accent-steel);
}

.engine-float-avatar-ring-bot {
  background: var(--accent-amber);
  color: var(--dark-bg);
}

.engine-float-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

/* True glassmorphic surface -- transparent enough that the hero
   image/glow visibly blurs through, not a flat color. Text left-aligned
   regardless of the page's centered text-align context. */
.engine-float-bubble {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  color: #ffffff;
}

.engine-float-bubble-ai {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* ----- Two Q&A pairs, crossfading in sync (left question <-> right
   answer change together) -- same absolute-stack crossfade technique
   as TTT's own typing-indicator/reply swap, just carrying a second
   real Q&A pair instead of a typing state. Both verbatim from the FAQ
   list (Security & Compliance Q1, Company Q1). ----- */
.engine-float-bubble-stack {
  position: relative;
  flex: 1;
  min-height: 74px;
}

.engine-float-bubble-stack .engine-float-bubble {
  position: absolute;
  top: 0;
  width: max-content;
  max-width: 100%;
}

.engine-float-card-left .engine-float-bubble-stack .engine-float-bubble {
  left: 0;
}

.engine-float-card-right .engine-float-bubble-stack .engine-float-bubble {
  right: 0;
}

.engine-float-bubble-q1,
.engine-float-bubble-a1 {
  animation: engineQaCycle1 8s ease-in-out infinite;
}

.engine-float-bubble-q2,
.engine-float-bubble-a2 {
  animation: engineQaCycle2 8s ease-in-out infinite;
}

@keyframes engineQaCycle1 {
  0%, 42% { opacity: 1; }
  50%, 92% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes engineQaCycle2 {
  0%, 42% { opacity: 0; }
  50%, 92% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .engine-float-bubble-q2,
  .engine-float-bubble-a2 {
    display: none;
  }
  .engine-float-bubble-q1,
  .engine-float-bubble-a1 {
    animation: none;
    opacity: 1;
  }
}

@keyframes engineFloatBobLeft {
  0%, 100% { transform: translate(calc(-100% - 28px), -50%); }
  50% { transform: translate(calc(-100% - 28px), calc(-50% - 5px)); }
}

@keyframes engineFloatBobRight {
  0%, 100% { transform: translate(calc(100% + 28px), -50%); }
  50% { transform: translate(calc(100% + 28px), calc(-50% - 5px)); }
}

@media (prefers-reduced-motion: reduce) {
  .engine-float-card-left,
  .engine-float-card-right {
    animation: none;
    opacity: 1;
  }
  .engine-float-card-left { transform: translate(calc(-100% - 28px), -50%); }
  .engine-float-card-right { transform: translate(calc(100% + 28px), -50%); }
}

/* Same threshold as TTT: below 1400px there's no longer real side
   margin to hold a 190px card clear of the centered hero content. */
@media (max-width: 1399px) {
  .engine-float-card {
    display: none;
  }
}
