/* ============================================
   V-FAQ — Village FAQ
   "Curated Knowledge" — dramatic focus cards.
   Resting: quiet, expectant, barely styled.
   Active: the open answer commands the scene;
   siblings withdraw into respectful silence.
   ============================================ */

/* ── Scene ── */
.v-faq {
  padding: var(--space-3xl) var(--space-xl) var(--space-3xl);
  background: #eae4da;
  position: relative;
}

.v-faq.is-hidden {
  display: none;
}

.v-faq__inner {
  max-width: var(--container-narrow);
  margin: 0 auto;
  position: relative;
}

/* ── Header ── */
.v-faq__header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.v-faq__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(45, 106, 63, 0.85);
  margin-bottom: var(--space-2xl);
}

.v-faq__label::before,
.v-faq__label::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: rgba(45, 106, 63, 0.15);
}

.v-faq__title {
  font-family: 'Glacial Indifference', var(--font-display), sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-md);
}

.v-faq__intro {
  font-family: 'Cormorant Garamond', var(--font-display), serif;
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem);
  font-style: italic;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin: 0 auto;
  max-width: 42ch;
}

/* ── List ── */
.v-faq__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Item — invisible container at rest ── */
.v-faq__item {
  position: relative;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  transition:
    opacity 0.6s var(--ease-out-expo),
    transform 0.6s var(--ease-out-expo),
    background 0.6s var(--ease-out-expo),
    border-radius 0.6s var(--ease-out-expo),
    box-shadow 0.6s var(--ease-out-expo),
    margin 0.6s var(--ease-out-expo),
    padding 0.6s var(--ease-out-expo);
}

/* Thin separator between closed items */
.v-faq__item + .v-faq__item {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Remove separator when adjacent to an open card */
.v-faq__item[open] + .v-faq__item,
.v-faq__item + .v-faq__item[open] {
  border-top-color: transparent;
}

/* ── Closed hover ── */
@media (hover: hover) {
  .v-faq__item:not([open]):hover {
    background: rgba(255, 255, 255, 0.2);
  }
}

/* ── OPEN STATE — the card takes the stage ── */
.v-faq__item[open] {
  background: #f7f4f0;
  border-radius: 14px;
  margin: var(--space-lg) 0;
  padding: var(--space-sm) 0;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.03);
  border-top-color: transparent;
}

/* ── DRAMATURGY — siblings withdraw ── */
.v-faq__list:has([open]) .v-faq__item:not([open]) {
  opacity: 0.4;
}

.v-faq__list:has([open]) .v-faq__item:not([open]):hover {
  opacity: 0.7;
}

/* ── Question (summary) ── */
.v-faq__question {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  font-family: 'Glacial Indifference', var(--font-display), sans-serif;
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--color-text-primary);
  padding: var(--space-lg) var(--space-xl) var(--space-lg) var(--space-lg);
  list-style: none;
  cursor: pointer;
  transition:
    color 0.5s var(--ease-out-expo),
    font-weight 0.3s ease,
    padding 0.5s var(--ease-out-expo);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.v-faq__question::-webkit-details-marker {
  display: none;
}

/* Open question — asserts hierarchy */
.v-faq__item[open] .v-faq__question {
  color: var(--color-text-primary);
  font-weight: 600;
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-xl);
  padding-left: var(--space-xl);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: var(--space-sm);
}

/* ── Affordance: typographic dash ── */
.v-faq__question::after {
  content: '';
  flex-shrink: 0;
  margin-left: auto;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.2;
  transition:
    width 0.6s var(--ease-out-expo),
    opacity 0.6s var(--ease-out-expo);
}

/* Hover — dash asserts itself */
.v-faq__question:hover::after {
  opacity: 0.4;
  width: 28px;
}

/* Open — dash contracts, confirms selection */
.v-faq__item[open] .v-faq__question::after {
  width: 12px;
  opacity: 0.35;
}

/* ── Answer — breaks the question axis ── */
.v-faq__answer {
  padding: var(--space-xl) var(--space-xl) var(--space-3xl) calc(var(--space-xl) + 2rem);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.85;
  color: var(--color-text-secondary);
  max-width: 56ch;
}

/* Editorial entry — first paragraph carries weight */
.v-faq__answer p:first-child {
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--color-text-primary);
  opacity: 0.8;
}

.v-faq__answer p {
  margin-bottom: var(--space-lg);
}

.v-faq__answer p:last-child {
  margin-bottom: 0;
}

/* ── Section close — generous space, subtle ending ── */
.v-faq__list::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: var(--space-2xl) auto 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .v-faq {
    padding: var(--space-xl) var(--space-md) var(--space-2xl);
  }

  .v-faq__header {
    margin-bottom: var(--space-lg);
  }

  .v-faq__label {
    margin-bottom: var(--space-md);
    gap: var(--space-md);
  }

  .v-faq__title {
    margin-bottom: var(--space-sm);
  }

  .v-faq__intro {
    max-width: 36ch;
  }

  .v-faq__question {
    font-size: 1.05rem;
    padding: var(--space-md) var(--space-lg) var(--space-md) var(--space-md);
    min-height: 44px;
  }

  .v-faq__item[open] .v-faq__question {
    padding-left: var(--space-lg);
  }

  .v-faq__answer {
    padding: var(--space-md) var(--space-lg) var(--space-2xl) calc(var(--space-lg) + 1rem);
  }

  .v-faq__item[open] {
    border-radius: 10px;
    margin: var(--space-md) 0;
  }

  .v-faq__list:has([open]) .v-faq__item:not([open]) {
    opacity: 0.5;
  }

  .v-faq__list::after {
    margin-top: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .v-faq {
    padding: var(--space-lg) var(--space-md) var(--space-2xl);
  }

  .v-faq__question {
    font-size: 1rem;
    padding: var(--space-sm) var(--space-md) var(--space-sm) var(--space-md);
    min-height: 44px;
  }

  .v-faq__header {
    margin-bottom: var(--space-lg);
  }

  .v-faq__label {
    margin-bottom: var(--space-md);
    letter-spacing: 0.18em;
  }

  .v-faq__title {
    margin-bottom: var(--space-xs);
  }

  .v-faq__item[open] {
    border-radius: 8px;
    margin: var(--space-sm) 0;
    padding: var(--space-xs) 0;
  }

  .v-faq__item[open] .v-faq__question {
    padding-left: var(--space-md);
  }

  .v-faq__item:not([open]):hover {
    background: transparent;
  }

  .v-faq__answer {
    padding: var(--space-sm) var(--space-md) var(--space-xl) calc(var(--space-md) + 0.5rem);
    font-size: 0.9rem;
  }

  .v-faq__list:has([open]) .v-faq__item:not([open]) {
    opacity: 0.55;
  }

  .v-faq__list::after {
    margin-top: var(--space-lg);
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .v-faq__item,
  .v-faq__question,
  .v-faq__question::after {
    transition: none;
  }
}
