/* ==========================================================================
   s10 : FAQ
   Centered, narrow PARCHMENT "breather" panel. A calm visual rest after the
   device-heavy run. ONE signature motion: a smooth accordion height-expand
   driven by grid-template-rows (0fr -> 1fr), animating real height cheaply
   without JS measurement or layout thrash elsewhere. Native <details>/<summary>
   underneath, so it is fully usable with no JS and with reduced motion.

   Local parchment palette: this panel deliberately inverts to a light surface,
   so it defines its own dark-on-parchment text colours from the brand
   --parchment / --gold tokens. All other sections stay dark; this one sheet of
   paper is the breather guardrail called out in the brief.
   ========================================================================== */

#s10 {
  /* parchment-local colours, derived from brand tokens */
  --s10-ink:       #2A2620;   /* warm near-black ink on parchment */
  --s10-ink-dim:   #5C554A;   /* secondary ink */
  --s10-line:      rgba(42,38,32,0.14);
  --s10-line-soft: rgba(42,38,32,0.09);
  --s10-gold:      #8A6A2A;   /* darkened gold that passes contrast on parchment */
  --s10-hover:     rgba(42,38,32,0.035);
}

/* ---- the parchment panel: a sheet laid on the dark desk ------------------ */
#s10 .s10-panel {
  max-width: 760px;
  margin-inline: auto;
  background:
    linear-gradient(180deg, #F4EEE2 0%, var(--parchment) 38%, #ECE3D2 100%);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(28px, 4.4vw, 56px) clamp(22px, 4vw, 56px);
  /* a soft printed-paper depth; no animated shadow */
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 28px 60px -28px rgba(0,0,0,0.55),
    0 6px 18px -10px rgba(0,0,0,0.4);
  position: relative;
}
/* faint warm edge so the sheet reads as a discrete object on the dark bg */
#s10 .s10-panel::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgba(138,106,42,0.18) inset;
  pointer-events: none;
}

/* ---- header -------------------------------------------------------------- */
#s10 .s10-head { text-align: center; margin-bottom: clamp(20px, 3vw, 36px); }
#s10 .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  justify-content: center;
  color: var(--s10-ink-dim);
  margin-bottom: var(--sp-3);
}
#s10 .eyebrow::before,
#s10 .eyebrow::after {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(138,106,42,0.55));
}
#s10 .eyebrow::after { background: linear-gradient(90deg, rgba(138,106,42,0.55), transparent); }
#s10 .eyebrow .accent { color: var(--s10-gold); }
#s10 .s10-title {
  color: var(--s10-ink);
  margin-top: var(--sp-2);
}
#s10 .s10-sub {
  color: var(--s10-ink-dim);
  font-size: var(--fs-body);
  line-height: 1.5;
  max-width: 44ch;
  margin: var(--sp-2) auto 0;
}

/* ---- the list ------------------------------------------------------------ */
#s10 .s10-list {
  border-top: 1px solid var(--s10-line);
}
#s10 .s10-item {
  border-bottom: 1px solid var(--s10-line);
}
/* kill the native disclosure triangle across engines */
#s10 .s10-q { list-style: none; }
#s10 .s10-q::-webkit-details-marker { display: none; }

/* ---- the question (summary) --------------------------------------------- */
#s10 .s10-q {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
  padding: clamp(16px, 2vw, 22px) clamp(8px, 1.4vw, 14px);
  color: var(--s10-ink);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(17px, 0.6vw + 15px, 21px);
  line-height: 1.3;
  border-radius: var(--radius-sm);
  transition: color var(--t-fast) var(--ease-out),
              background-color var(--t-fast) var(--ease-out);
}
#s10 .s10-q__txt { flex: 1 1 auto; }
#s10 .s10-q:hover { background: var(--s10-hover); }
#s10 .s10-q:hover .s10-q__txt { color: var(--s10-gold); }
#s10 .s10-item[open] > .s10-q { color: var(--s10-gold); }

/* visible focus state (keyboard) */
#s10 .s10-q:focus-visible {
  outline: 2px solid var(--s10-gold);
  outline-offset: 2px;
}

/* chevron: a rotating caret built from two bars, transform-only */
#s10 .s10-q__chev {
  flex: 0 0 auto;
  position: relative;
  width: 14px; height: 14px;
  margin-right: 2px;
  transform: rotate(0deg);
  transition: transform .42s var(--ease-out);
}
#s10 .s10-q__chev::before,
#s10 .s10-q__chev::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 9px; height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.85;
}
#s10 .s10-q__chev::before { transform: translate(-72%, -50%) rotate(45deg); }
#s10 .s10-q__chev::after  { transform: translate(-28%, -50%) rotate(-45deg); }
#s10 .s10-item[open] > .s10-q .s10-q__chev { transform: rotate(180deg); }

/* ---- the answer: SIGNATURE MOTION (grid-rows height expand) -------------- */
#s10 .s10-a__wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .46s var(--ease-out);
}
#s10 .s10-a {
  min-height: 0;            /* lets the 0fr row actually collapse */
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .3s var(--ease-out) .04s,
              transform .34s var(--ease-out) .04s;
}
#s10 .s10-a p {
  color: var(--s10-ink-dim);
  font-size: var(--fs-body);
  line-height: 1.6;
  padding: 2px clamp(8px, 1.4vw, 14px) clamp(18px, 2.2vw, 24px) clamp(8px, 1.4vw, 14px);
  margin: 0;
}

/* OPEN state. The JS keeps the item [open] for the whole animation, and
   toggles .is-open to drive the expand; CSS resolves the rest. When JS is
   absent, [open] alone opens it (see no-JS block below). */
#s10 .s10-item.is-open > .s10-a__wrap { grid-template-rows: 1fr; }
#s10 .s10-item.is-open > .s10-a__wrap > .s10-a {
  opacity: 1;
  transform: translateY(0);
}

/* ---- NO-JS fallback: native <details> opens instantly, fully visible ---- */
/* When the JS controller has NOT claimed the section, .s10-list lacks
   .s10-js. In that case any [open] item shows its answer with no animation. */
#s10 .s10-list:not(.s10-js) .s10-item[open] > .s10-a__wrap { grid-template-rows: 1fr; }
#s10 .s10-list:not(.s10-js) .s10-item[open] > .s10-a__wrap > .s10-a {
  opacity: 1;
  transform: none;
}

/* ---- reveal: the whole panel rises in once (kit data-reveal) ------------- */
/* (handled by the shared scroll-reveal utility on .s10-panel) */

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 560px) {
  #s10 .s10-panel { padding: 26px 18px; }
  #s10 .s10-q { gap: var(--sp-2); padding-inline: 4px; }
  #s10 .s10-a p { padding-inline: 4px; }
}

/* ---- reduced motion: no expand animation, instant + readable ------------- */
@media (prefers-reduced-motion: reduce) {
  #s10 .s10-a__wrap { transition: none; }
  #s10 .s10-a { transition: none; }
  #s10 .s10-q,
  #s10 .s10-q__chev { transition: none; }
}
