/* Find Washroom — FAQ page.
   Layers on top of city-pages.css: same cream/ink/accent system, same
   border and hard-shadow language. Only FAQ-specific pieces live here. */

:root {
  /* same curve as .community-toast in community.css — one shared value, not a near-duplicate */
  --faq-ease: cubic-bezier(.2, .8, .2, 1);
  /* lets block-size animate to and from `auto` on the accordion panel */
  interpolate-size: allow-keywords;
}

.faq-page .faq-hero { padding: 1.9rem 0 1.6rem; }

.faq-page .faq-hero h1 {
  max-width: 16ch;
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  line-height: .98;
}

:lang(pa) .faq-page .faq-hero h1,
.faq-page:lang(pa) .faq-hero h1 { text-transform: none; }

/* ---- section jump nav ---- */

.faq-jump {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  padding-bottom: .35rem;
}

.faq-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: .4rem 1rem;
  font-size: .85rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform .18s var(--faq-ease), box-shadow .18s var(--faq-ease), background-color .18s var(--faq-ease);
}

/* hover motion only where a real pointer exists — a tap on touch would otherwise
   leave the pill stuck in its hover state */
@media (hover: hover) and (pointer: fine) {
  .faq-jump a:hover {
    background: var(--yellow);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--ink);
  }
}

.faq-jump a:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

/* ---- groups ---- */

.faq-group { scroll-margin-top: 1.5rem; }

.faq-group h2 {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  max-width: 20ch;
}

.faq-group-index {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: .42em;
  font-weight: 950;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* ---- accordion ---- */

.faq-page .faq-list {
  margin-top: 1.4rem;
  display: grid;
  gap: .8rem;
}

.faq-page .faq-item {
  overflow: hidden;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 0;
  transition: box-shadow .22s var(--faq-ease), transform .22s var(--faq-ease);
}

@media (hover: hover) and (pointer: fine) {
  .faq-page .faq-item:hover { box-shadow: 6px 6px 0 var(--ink); }
}

.faq-page .faq-item[open] { box-shadow: 6px 6px 0 var(--ink); }

/* press feedback on the accordion header — the main interactive element on this page.
   Uses the site's neo-brutalist "press into the shadow" idiom, not scale(). */
.faq-page .faq-item:has(summary:active) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.faq-page .faq-item summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
  line-height: 1.35;
}

.faq-page .faq-item summary::-webkit-details-marker { display: none; }
.faq-page .faq-item summary::marker { content: ""; }

.faq-q {
  flex: 1 1 auto;
  font-size: clamp(1rem, 1.9vw, 1.1rem);
  text-wrap: pretty;
}

/* plus sign that turns into a minus when the answer opens */
.faq-page .faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  background:
    linear-gradient(var(--ink) 0 0) center / 14px 3px no-repeat,
    linear-gradient(var(--ink) 0 0) center / 3px 14px no-repeat;
  border: 3px solid var(--ink);
  border-radius: 50%;
  transition: transform .3s var(--faq-ease), background-color .22s var(--faq-ease);
}

.faq-page .faq-item[open] summary::after {
  background:
    linear-gradient(var(--ink) 0 0) center / 14px 3px no-repeat,
    linear-gradient(var(--ink) 0 0) center / 3px 0 no-repeat;
  background-color: var(--yellow);
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.1rem 1.15rem;
  border-top: 3px dashed color-mix(in srgb, var(--ink) 28%, transparent);
  margin-top: 0;
}

.faq-answer p {
  max-width: 68ch;
  padding-top: .95rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.65;
  text-wrap: pretty;
}

/* Height animation where the browser supports it; elsewhere the panel
   simply appears, which is the current behaviour everywhere on the site. */
@supports selector(details::details-content) {
  .faq-page .faq-item::details-content {
    block-size: 0;
    overflow: hidden;
    opacity: 0;
    transition: content-visibility .32s var(--faq-ease), block-size .32s var(--faq-ease), opacity .24s var(--faq-ease);
    transition-behavior: allow-discrete;
  }

  .faq-page .faq-item[open]::details-content {
    block-size: auto;
    opacity: 1;
  }
}

/* ---- closing call to action ---- */

.faq-outro .section-intro { max-width: 62ch; }
.faq-outro .hero-actions { margin-top: 1.5rem; }

@media (max-width: 760px) {
  .faq-page .faq-hero { padding: 1rem 0 1.2rem; }
  .faq-page .lede { margin-top: .85rem; font-size: 1rem; }
  .faq-jump { gap: .45rem; }
  .faq-jump a { font-size: .8rem; padding: .35rem .8rem; }
  .faq-group h2 { gap: .55rem; }
  .faq-page .faq-item summary { padding: .85rem .9rem; gap: .75rem; }
  .faq-answer { padding: 0 .9rem 1rem; }
  .faq-outro .secondary-link { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-jump a,
  .faq-page .faq-item,
  .faq-page .faq-item summary::after,
  .faq-page .faq-item::details-content {
    transition: none;
  }
}

/* ---- About / Privacy (info-page) ---- */

.info-page .faq-hero h1 { max-width: 18ch; }

.info-section h2 {
  max-width: 24ch;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
}

.info-section p {
  max-width: 68ch;
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  text-wrap: pretty;
}

.info-section p strong { font-weight: 900; }

.info-outro { display: grid; gap: 1.1rem; }

.info-updated {
  font-size: .85rem;
  font-weight: 800;
  opacity: .6;
}

.info-outro .hero-actions { margin-top: 0; }

@media (max-width: 760px) {
  .info-section p { margin-top: .85rem; }
  .info-outro .primary-link,
  .info-outro .secondary-link { width: 100%; }
}
