/* ==========================================================================
   WESTON CLICK — faq.css
   Page-specific styles for faq.html only.
   The accordion component itself lives in base.css; this file handles the
   hero and the FAQ-specific spacing, deep links and deep-link highlight.
   ========================================================================== */

/* ==========================================================================
   HERO — centred "ask" hero (.fhero)
   Spotlight + outlined question marks drifting, an ask bar that rotates
   through real questions, and two marquee rows of deep-linking chips.
   ========================================================================== */
.fhero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(36px, 4vw, 56px);
}
.fhero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.fhero__spot {
  position: absolute;
  left: 50%; top: -22%;
  width: min(1200px, 150vw);
  height: 90%;
  translate: -50% 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(var(--accent-bright-rgb), .2), rgba(146, 228, 200, .08) 45%, transparent 70%);
}
/* Giant outlined question marks. */
.fhero__q {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(var(--accent-rgb), .12);
  animation: fhero-float 12s var(--ease-soft) infinite alternate;
}
.fhero__q--1 { font-size: 300px; left: -2%; top: 8%; rotate: -14deg; }
.fhero__q--2 { font-size: 220px; right: 2%; top: 4%; rotate: 16deg; animation-delay: -4s; }
.fhero__q--3 { font-size: 140px; right: 20%; bottom: 18%; rotate: -8deg; animation-delay: -8s; -webkit-text-stroke-color: rgba(245, 181, 68, .25); }
@keyframes fhero-float { to { translate: 0 -26px; rotate: 0deg; } }

.fhero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: calc(var(--header-space) + clamp(44px, 4.8vw, 80px));
}

/* --- Floating side pieces (desktop only) --- */
.fhero__person {
  position: absolute;
  left: var(--gutter);
  top: calc(var(--header-space) + 90px);
  width: 170px;
  margin: 0;
  animation: fhero-bob 7s var(--ease-soft) infinite;
}
.fhero__person img {
  width: 170px; height: 170px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 8%;
  background:
    radial-gradient(circle at 50% 40%, #fff, transparent 60%),
    linear-gradient(160deg, var(--brand-100), var(--brand-50));
  filter: grayscale(1);
  border: 6px solid #fff;
  box-shadow: var(--shadow-lg);
}
.fhero__person figcaption {
  position: absolute;
  right: -46px;
  top: -14px;
  padding: 9px 14px;
  border-radius: 16px 16px 16px 4px;
  background: var(--ink-900);
  color: #fff;
  font-family: Caveat, var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.fhero__stat {
  position: absolute;
  right: var(--gutter);
  top: calc(var(--header-space) + 150px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 22px;
  border-radius: 22px;
  text-align: left;
  background: linear-gradient(145deg, var(--brand-500), var(--accent));
  color: rgba(255, 255, 255, .8);
  font-size: var(--fs-xs);
  line-height: 1.4;
  rotate: 5deg;
  box-shadow: 0 24px 48px -20px rgba(var(--accent-rgb), .7);
  animation: fhero-bob 7s var(--ease-soft) infinite;
  animation-delay: -3.5s;
}
.fhero__stat strong {
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
}
@keyframes fhero-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* --- Head --- */
.fhero__badge {
  padding: 7px 16px;
  border-radius: var(--r-pill);
  background: #FFF6E3;
  border: 1px solid #F5DDA6;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8A5A00;
}
.fhero__title {
  margin-top: clamp(18px, 2vw, 24px);
  max-width: 15ch;
  font-size: clamp(2.2rem, 1.1rem + 3.4vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: var(--ink-900);
  text-wrap: balance;
}
/* Highlighter that sweeps across once the title reveals. */
.fhero__accent {
  display: inline-block;
  padding-inline: .12em;
  color: var(--accent);
  background: linear-gradient(transparent 58%, rgba(var(--accent-bright-rgb), .28) 58% 90%, transparent 90%) no-repeat 0 0 / 0% 100%;
  transition: background-size 1s .5s var(--ease-out);
}
.fhero__title.is-revealed .fhero__accent,
.fhero__title:not([data-reveal]) .fhero__accent { background-size: 100% 100%; }

.fhero__sub {
  margin-top: 16px;
  font-size: clamp(1.02rem, .96rem + .35vw, 1.2rem);
  color: var(--ink-500);
}

/* --- Ask bar --- */
.fask {
  --h: 64px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100%, 580px);
  height: var(--h);
  margin-top: clamp(26px, 3vw, 36px);
  padding: 0 8px 0 20px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1.5px solid var(--line);
  box-shadow: 0 20px 50px -24px rgba(15, 26, 22, .3), 0 0 0 6px rgba(var(--accent-bright-rgb), .06);
  text-align: left;
  transition: border-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.fask:hover {
  border-color: var(--brand-300);
  transform: translateY(-2px);
  box-shadow: 0 26px 56px -24px rgba(var(--accent-rgb), .45), 0 0 0 8px rgba(var(--accent-bright-rgb), .1);
}
.fask__icon { flex: none; width: 22px; color: var(--ink-400); }
.fask__icon svg { width: 22px; height: 22px; }
/* Vertical rotor: six stacked lines, the last a copy of the first so the
   loop resets invisibly. Each stop holds, then slides. */
.fask__rotor {
  position: relative;
  flex: 1;
  height: 1.5em;
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-900);
}
.fask__rotor span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: fhero-rotor 15s var(--ease-out) infinite;
}
@keyframes fhero-rotor {
  0%, 16%   { transform: translateY(0); }
  20%, 36%  { transform: translateY(-100%); }
  40%, 56%  { transform: translateY(-200%); }
  60%, 76%  { transform: translateY(-300%); }
  80%, 96%  { transform: translateY(-400%); }
  100%      { transform: translateY(-500%); }
}
.fask__go {
  flex: none;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-400), var(--accent));
  transition: transform var(--dur-base) var(--ease-spring);
}
.fask__go svg { width: 18px; height: 18px; }
.fask:hover .fask__go { transform: translateY(3px); }

.fhero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}
.fhero__actions .btn--primary { box-shadow: 0 14px 34px -14px rgba(var(--accent-rgb), .8); }
.fhero__note { font-size: var(--fs-xs); color: var(--ink-400); }

/* --- Chip marquee --- */
.fchips {
  display: grid;
  gap: 12px;
  margin-top: clamp(36px, 4vw, 52px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.fchips__row { display: flex; width: max-content; }
.fchips__track {
  display: flex;
  gap: 12px;
  padding-right: 12px;
  list-style: none;
  animation: fhero-marquee 40s linear infinite;
}
.fchips__row--reverse .fchips__track { animation-direction: reverse; animation-duration: 46s; }
.fchips:hover .fchips__track,
.fchips:focus-within .fchips__track { animation-play-state: paused; }
@keyframes fhero-marquee { to { transform: translateX(-100%); } }

.fchip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 12px;
  border-radius: var(--r-pill);
  background: var(--bone);
  border: 1px solid var(--line);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-700);
  white-space: nowrap;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-base) var(--ease-spring);
}
.fchip::before {
  content: "?";
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: var(--accent);
  box-shadow: var(--shadow-xs);
}
.fchip:hover,
.fchip:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .fhero__person, .fhero__stat { display: none; }
}
@media (max-width: 560px) {
  .fask { --h: 58px; padding-left: 16px; }
  .fask__rotor { font-size: .95rem; }
  .fask__go { width: 42px; height: 42px; }
  .fhero__q--1 { font-size: 200px; }
  .fhero__actions .btn--lg { width: 100%; justify-content: center; }
  .fhero__actions { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .fhero__q, .fhero__person, .fhero__stat, .fask__rotor span, .fchips__track { animation: none; }
  .fhero__accent { transition: none; background-size: 100% 100%; }
}



/* --------------------------------------------------------------------------
   SECTION 2 — FAQ LIST
   -------------------------------------------------------------------------- */
.faq-list { padding-top: clamp(32px, 4vw, 48px); }

.faq-list .accordion { border-top-color: var(--line-strong); }
.faq-list .accordion__item { scroll-margin-top: calc(var(--header-h) + 32px); }

/* Cross-links to the pages that carry the mechanism detail */
.faq-more {
  font-size: var(--fs-sm);
  font-weight: 600;
}
.faq-more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}
.faq-more a::after {
  content: "";
  width: 14px; height: 14px;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-out);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h11m0 0L9 3.5M13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h11m0 0L9 3.5M13.5 8 9 12.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.faq-more a:hover::after { transform: translateX(3px); }

/* Brief highlight when an item is opened from a deep link (see faq.js) */
.accordion__item.is-targeted {
  animation: faq-flash 2.2s var(--ease-soft) forwards;
}
@keyframes faq-flash {
  0%   { background-color: rgba(var(--accent-rgb), .07); }
  100% { background-color: transparent; }
}
