/* =========================================================================
   Eternity Rose® — FAQ section styles
   All selectors are namespaced with `.er-faq` so this drops in safely
   alongside any other homepage CSS.

   Layout: occupies the LEFT HALF of the viewport on desktop (>= 768px),
           full width on mobile (< 768px).
   Fonts:  Cormorant Garamond (display) + Inter (body) via Google Fonts.
   ========================================================================= */


.er-faq {
  /* Theme tokens — change here to recolour without touching anything else */
  --er-bg:        #F8F4EC;            /* warm cream background       */
  --er-ink:       #1A1A1A;            /* primary headings/questions  */
  --er-body:      #4A4540;            /* answer body text            */
  --er-gold:      #B89968;            /* eyebrow + icons + dividers  */
  --er-gold-soft: rgba(184,153,104,0.35); /* hairline dividers       */

  --er-font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --er-font-body:    'Jost', system-ui, Arial, sans-serif;

  /* LEFT HALF on desktop, full width on mobile */
  width: 50%;
  box-sizing: border-box;
  background: var(--er-bg);
  padding: 80px 96px;
  font-family: var(--er-font-body);
  color: var(--er-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.er-faq *,
.er-faq *::before,
.er-faq *::after {
  box-sizing: border-box;
}

.er-faq__inner {
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- Header ---------- */

.er-faq__eyebrow {
  margin: 0 0 18px;
  font-family: var(--er-font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--er-gold);
}

.er-faq__title {
  margin: 0 0 28px;
  /* Matched to the Shop by Category heading: Cormorant Garamond ~47px,
     weight 400, title case, tight letter-spacing. Eyebrow "Frequently
     Asked" above keeps its gold italic style unchanged. */
  font-family: var(--er-font-display);
  font-weight: 400;
  font-size: clamp(37.5px, 2.45vw, 47px);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;   /* "QUESTIONS ANSWERED" (matches mobile, owner 15 Jul 2026) */
  color: var(--er-ink);
}

.er-faq__lede {
  margin: 0 0 56px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--er-ink);
}

.er-faq__lede sup {
  font-size: 0.6em;
  vertical-align: super;
  line-height: 0;
}

/* ---------- Accordion list ---------- */

.er-faq__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--er-gold-soft);
}

.er-faq__item {
  border-bottom: 1px solid var(--er-gold-soft);
}

.er-faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 28px 4px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: #4c4c4c;   /* softened question ink (matches mobile, owner 15 Jul 2026); hover/open override to gold */
  font-family: var(--er-font-display);
  font-weight: 500;
  transition: color 0.2s ease;
}

.er-faq__trigger:hover,
.er-faq__trigger:focus-visible {
  color: var(--er-gold);
  outline: none;
}

/* Open state: the question stays gold while its answer is expanded, reverting
   to ink when closed (matches mobile, owner 15 Jul 2026). Same deeper gold as
   the "Frequently Asked" eyebrow. */
.er-faq__trigger[aria-expanded="true"] {
  color: #a8801a;
}

.er-faq__question {
  flex: 1;
  font-size: 17px;
  letter-spacing: 0.02em;   /* tightened from 0.14em (caps tracking) for sentence case */
  text-transform: none;   /* sentence case, not all-caps (owner 15 Jul 2026) */
  line-height: 1.3;
}

.er-faq__question sup {
  font-size: 0.55em;
  vertical-align: super;
  line-height: 0;
  letter-spacing: 0;
}

/* + / − icon, drawn with two pseudo-elements so we can animate cleanly */
.er-faq__icon {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--er-gold);
}

.er-faq__icon::before,
.er-faq__icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.er-faq__icon::before {  /* horizontal bar */
  width: 18px;
  height: 1.5px;
  transform: translate(-50%, -50%);
}

.er-faq__icon::after {   /* vertical bar — hides when open */
  width: 1.5px;
  height: 18px;
  transform: translate(-50%, -50%);
}

.er-faq__trigger[aria-expanded="true"] .er-faq__icon::after {
  transform: translate(-50%, -50%) scaleY(0);
  opacity: 0;
}

/* ---------- Panel ---------- */

.er-faq__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.er-faq__panel-inner {
  padding: 0 4px 32px;
}

.er-faq__panel-inner p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.7;
  color: #68635e;   /* softened answer grey (matches mobile, owner 15 Jul 2026) */
  font-weight: 400;
}

.er-faq__panel-inner p:last-child {
  margin-bottom: 0;
}

.er-faq__panel-inner sup {
  font-size: 0.65em;
  vertical-align: super;
  line-height: 0;
}

/* ---------- Responsive: full width on mobile ---------- */

@media (max-width: 767px) {
  .er-faq {
    width: 100%;
    padding: 56px 24px;
  }

  .er-faq__title {
    font-size: 36px;
  }

  .er-faq__lede {
    font-size: 16px;
    margin-bottom: 40px;
  }

  .er-faq__lede br {
    display: none;
  }

  .er-faq__trigger {
    padding: 22px 2px;
    gap: 16px;
  }

  .er-faq__question {
    font-size: 14px;
    letter-spacing: 0.12em;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .er-faq__panel,
  .er-faq__icon::before,
  .er-faq__icon::after,
  .er-faq__trigger {
    transition: none;
  }
}
