/* SS Bucket Biryani website: FAQ. Loaded after site.css, whose tokens, header, footer and motion it uses.
   The Figma has no FAQ, so the page is made of the site's own pieces at Careers' sizes: its red opening with two
   ribbons (here they carry the questions people ask most), white cards on cream, the S coin. --u is one pixel at
   1512 px: 1px from 1512 px up, less below, so the opening keeps its proportions as the window narrows.

   This is the design canvas's faq.css, rule for rule. What the site adds changes nothing of how the page looks
   at rest:
   - each ribbon's words sit in a track that runs along it (.fq-ribbon__track, in section 1), as on Careers;
   - "What the site adds", at the end: how the opening arrives and its ribbons run, and what the keyboard and
     a link to one question (/faq#halal) need: an answer is not clipped once it is open (a focus ring inside
     it is whole) and takes no part while it slides shut, and a linked question's list arrives in place, with
     the question 104 px from the top of the window, not 96 (room for its focus ring under the header). */

.faq-page {
  --panel: #FBE4C2;
  --ink-copy: #3B0A0D;
  --gold-light: #F2C46B;
  --dark: #2A0508;
  --shade: rgba(60, 0, 0, .35);
  /* lets an answer's height grow from 0 to auto (Chrome); elsewhere it opens at once */
  interpolate-size: allow-keywords;
}
.faq-page main { --u: min(1px, calc(100cqw / 1512)); }

/* ---------- Shared pieces ---------- */
.fq-eyebrow { font-family: var(--font-serif); font-size: 12px; line-height: 18px; letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.fq-eyebrow--cream { color: var(--cream); }
.fq-eyebrow--gold { color: var(--gold-light); }
.fq-wrap { width: calc(885 * var(--u)); margin-inline: auto; }

/* ---------- 1. The opening: questions, answered ---------- */
.fq-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(300 * var(--u)) var(--gutter) calc(96 * var(--u)); background: var(--red); color: var(--cream); text-align: center; }
/* two ribbons cross the opening, one each way, as on Careers */
.fq-ribbons { position: absolute; left: 0; right: 0; top: calc(153 * var(--u)); height: calc(112 * var(--u)); }
.fq-ribbon { position: absolute; left: calc(-91 * var(--u)); display: flex; width: max(calc(1693 * var(--u)), calc(100% + 182 * var(--u))); overflow: hidden; padding: max(6px, calc(10 * var(--u))) 0 max(8px, calc(13 * var(--u))); transform-origin: 0 0; box-shadow: 0 5px 13px rgba(60, 0, 0, .3); white-space: nowrap; }
/* each ribbon's words are one long row (the track), which runs along the ribbon where motion is on */
.fq-ribbon__track { display: flex; flex: none; }
.fq-ribbon li { display: flex; flex: none; align-items: center; gap: max(18px, calc(33 * var(--u))); padding: 0 max(10px, calc(16 * var(--u))) 0 max(10px, calc(17 * var(--u))); font-family: var(--font-condensed); font-size: max(15px, calc(22 * var(--u))); line-height: 1.05; letter-spacing: .06em; text-transform: uppercase; }
.fq-ribbon li::after { content: ""; flex: none; width: max(6px, calc(9 * var(--u))); aspect-ratio: 1; rotate: 45deg; background: var(--gold-light); }
.fq-ribbon--light { top: calc(66 * var(--u)); rotate: -2deg; background: var(--cream); color: var(--maroon); }
.fq-ribbon--dark { top: 0; rotate: 2deg; background: var(--dark); color: var(--cream); }
.fq-hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; max-width: 886px; margin-inline: auto; }
.fq-hero__title { margin-top: 14px; font-family: var(--font-condensed); font-weight: 400; font-size: max(64px, calc(118 * var(--u))); line-height: .924; text-transform: uppercase; }
.fq-hero__title em { font-style: normal; color: var(--dark); }
.fq-hero__text { max-width: 520px; margin-top: 18px; font-size: 15px; line-height: 24px; }
/* the topics, as links down the page */
.fq-topics ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }
.fq-topics a { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 7px 16px; border: 1.6px solid var(--cream); border-radius: var(--radius-pill); font-weight: 500; font-size: 13px; line-height: 16px; color: var(--cream); transition: background-color .3s var(--tap), color .3s var(--tap); }
/* a 44 px target round each */
.fq-topics a::after { content: ""; position: absolute; inset: -5px -4px; }
.fq-topics a:hover { background: var(--cream); color: var(--maroon); }
/* two stickers either side of the title, cut out with Careers' cream edge */
.fq-hero__sticker { position: absolute; z-index: 1; max-width: none; filter: drop-shadow(2px 0 0 var(--cream)) drop-shadow(-2px 0 0 var(--cream)) drop-shadow(0 2px 0 var(--cream)) drop-shadow(0 -2px 0 var(--cream)) drop-shadow(0 11px 11px var(--shade)); }
.fq-hero__sticker--bucket { left: calc(50% - 432 * var(--u)); top: calc(404 * var(--u)); width: calc(128 * var(--u)); rotate: -10deg; }
.fq-hero__sticker--box { left: calc(50% + 302 * var(--u)); top: calc(298 * var(--u)); width: calc(102 * var(--u)); rotate: 12deg; }
.fq-check { position: absolute; left: 0; right: 0; bottom: 0; display: flex; overflow: hidden; height: 24px; }
.fq-check img { flex: none; width: auto; max-width: none; height: 100% !important; }

/* ---------- 2. The topics ---------- */
.fq-topic { padding: calc(64 * var(--u)) var(--gutter) 0; background: var(--cream); scroll-margin-top: 24px; }
.fq-topic:first-child { padding-top: calc(88 * var(--u)); }
.fq-topic__grid { display: grid; grid-template-columns: calc(290 * var(--u)) minmax(0, 1fr); column-gap: calc(40 * var(--u)); align-items: start; padding-top: calc(40 * var(--u)); border-top: 1.6px solid rgba(126, 13, 18, .16); }
.fq-topic:first-child .fq-topic__grid { padding-top: 0; border-top: 0; }
.fq-topic__num { display: block; font-family: var(--font-condensed); font-size: max(48px, calc(66 * var(--u))); line-height: .9; color: var(--red); }
.fq-topic__title { margin-top: 10px; font-family: var(--font-condensed); font-weight: 400; font-size: max(36px, calc(48 * var(--u))); line-height: .95; text-transform: uppercase; color: var(--maroon); }
.fq-topic__line { margin-top: 10px; font-size: 15px; line-height: 24px; color: var(--ink-copy); }
.fq-list { display: grid; gap: 11px; }
/* a question is a white card; it opens to its answer */
.fq-item { border-radius: 16px; background: var(--white); scroll-margin-top: 96px; transition: box-shadow .3s var(--tap); }
.fq-q { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding: 16px 18px 16px 22px; border-radius: 16px; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 19px; line-height: 24px; color: var(--maroon); font-synthesis: none; transition: color .3s var(--tap); }
.fq-q::-webkit-details-marker { display: none; }
/* plus, and minus when open */
.fq-q__icon { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--red); transition: background-color .3s var(--tap); }
.fq-q__icon::before, .fq-q__icon::after { content: ""; position: absolute; left: 11px; top: 17px; width: 14px; height: 2px; border-radius: 1px; background: var(--cream); }
.fq-q__icon::after { rotate: 90deg; }
.fq-item[open] .fq-q__icon { background: var(--maroon); }
.fq-item[open] .fq-q__icon::after { rotate: 0deg; }
.fq-a { padding: 0 72px 22px 22px; font-size: 15px; line-height: 24px; color: var(--ink-copy); }
/* lines of about 75 letters at most, where the card is wide */
.fq-a p { max-width: 64ch; }
.fq-a a { font-weight: 500; color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.fq-a a:hover { color: var(--maroon); }
@media (hover: hover) {
  .fq-item:hover { box-shadow: 0 14px 28px rgba(126, 13, 18, .14); }
  .fq-q:hover { color: var(--red); }
}

/* ---------- 3. Still have a question ---------- */
.fq-ask { padding: calc(96 * var(--u)) var(--gutter) calc(104 * var(--u)); background: var(--cream); }
.fq-ask__card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px 48px; padding: 56px 56px 56px 64px; border-radius: 28px; background: var(--maroon); color: var(--cream); }
.fq-ask__coin { position: absolute; left: -26px; top: -38px; width: 88px; rotate: -12deg; filter: drop-shadow(0 10px 14px var(--shade)); }
.fq-ask__title { margin-top: 12px; font-family: var(--font-condensed); font-weight: 400; font-size: max(44px, calc(72 * var(--u))); line-height: .931; text-transform: uppercase; }
.fq-ask__title em { font-style: normal; color: var(--gold-light); }
.fq-ask__text { max-width: 400px; margin-top: 14px; font-size: 15px; line-height: 24px; }
.fq-ask__actions { display: grid; gap: 11px; min-width: 250px; }
.fq-ask__actions .btn-compact { justify-content: flex-start; }
.fq-ask__actions .btn-compact .icon { font-size: 17px; }

/* ---------- Motion: a pressed question opens and closes its answer ---------- */
[data-motion="on"] .fq-item::details-content { block-size: 0; overflow-y: clip; transition: block-size var(--dur-short) var(--ease-out), content-visibility var(--dur-short) allow-discrete; }
[data-motion="on"] .fq-item[open]::details-content { block-size: auto; }
[data-motion="on"] .fq-q__icon::after { transition: rotate var(--dur-hover) var(--ease-out); }

/* ---------- Narrower windows ---------- */
@container page (max-width: 1100px) {
  .fq-wrap { width: min(100%, 885px); }
  .fq-topic__grid { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); column-gap: 32px; }
}
@container page (max-width: 900px) {
  .fq-hero { padding-top: 236px; padding-bottom: 88px; }
  .fq-ribbons { top: 96px; height: 96px; }
  .fq-ribbon--light { top: 48px; }
  .fq-hero__sticker--bucket { left: calc(50% - 330px); top: 330px; width: 84px; }
  .fq-hero__sticker--box { left: calc(50% + 246px); top: 240px; width: 68px; }
  /* three topics a line, not five and one */
  .fq-topics ul { max-width: 520px; }
  /* the topic's number beside its title, the questions under them */
  .fq-topic { padding-top: 56px; }
  .fq-topic:first-child { padding-top: 64px; }
  .fq-topic__grid { grid-template-columns: minmax(0, 1fr); row-gap: 24px; padding-top: 40px; }
  .fq-topic__head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: end; }
  .fq-topic__num { grid-row: 1 / span 2; align-self: start; padding-top: 4px; }
  .fq-topic__title { margin-top: 0; }
  .fq-topic__line { margin-top: 6px; }
  .fq-ask { padding-top: 88px; padding-bottom: 88px; }
  .fq-ask__card { grid-template-columns: minmax(0, 1fr); padding: 52px 40px 40px; }
  .fq-ask__actions { display: flex; flex-wrap: wrap; min-width: 0; }
}
@container page (max-width: 760px) {
  .fq-hero__title { font-size: clamp(56px, 16cqw, 96px); }
  .fq-hero__sticker { display: none; }
  .fq-q { gap: 14px; min-height: 64px; padding: 14px 14px 14px 18px; font-size: 17px; line-height: 22px; }
  .fq-q__icon { width: 32px; height: 32px; }
  .fq-q__icon::before, .fq-q__icon::after { left: 9px; top: 15px; }
  .fq-a { padding: 0 18px 18px; }
  .fq-ask__card { padding: 48px 24px 28px; border-radius: 22px; }
  .fq-ask__coin { left: 18px; top: -34px; width: 68px; }
}
@container page (max-width: 480px) {
  .fq-topics ul { max-width: none; }
  .fq-ask__actions { display: grid; }
}

/* ==========================================================================
   What the site adds (its motion hangs off data-motion="on": see the motion notes in site.css)
   ========================================================================== */

/* The opening moves as Careers' does. Its two ribbons slide in along themselves, one from each side, and then run
   without end, one each way, while the opening is on screen (ribbon-run is in site.css): a track holds its words
   eight times over and runs the length of one, so where it starts again cannot be seen. A round is longer here
   than on Careers, whose words are shorter, so it takes 13 s where Careers' takes 11 and the ribbons pass at the
   same pace. The two stickers pop in beside the title. They turn about their own middles, so they grow where
   they stand (Careers' turn about a corner, and are carried across as they pop). */
[data-motion="on"] .fq-ribbon--dark { --from-x: -8%; }
[data-motion="on"] .fq-ribbon--light { --from-x: 8%; }
.fq-ribbon__track { --run: -12.5%; }
[data-motion="on"] .fq-hero[data-live] .fq-ribbon__track { animation: ribbon-run 13s linear infinite; }
[data-motion="on"] .fq-hero[data-live] .fq-ribbon--light .fq-ribbon__track { animation-direction: reverse; }

/* An answer is clipped only while it slides open or shut. Open, nothing clips it: the focus ring of a link in its
   first line reaches a few pixels above the answer, and would lose its top edge. */
[data-motion="on"] .fq-item[open]::details-content { overflow-y: visible; transition: block-size var(--dur-short) var(--ease-out), content-visibility var(--dur-short) allow-discrete, overflow-y 0s var(--dur-short) allow-discrete; }

/* While an answer slides shut it is still drawn, and Chrome lets Tab into its links: the keyboard would be on a
   link nobody can see, and a moment later nowhere. For as long as the slide lasts the answer takes no part
   (inert), and no longer: a closed answer has to stay within reach of the browser's own find-in-page, which opens
   the question it finds the words in, and that search does not look inside what is inert. */
[data-motion="on"] .fq-item:not([open])::details-content { animation: answer-shut var(--dur-short); }
@keyframes answer-shut { from, to { interactivity: inert; } }

/* The question an address points at (/faq#halal) is where the browser brings the page, and it goes on aiming at it
   while the page arrives. Its list arrives without rising, or the page would come to rest a rise too far down,
   with the question under the header. */
[data-motion="on"] .fq-list:has(.fq-item:target) { --from-y: 0px; }
/* It arrives with keyboard focus on it, and its focus ring reaches 6 px above it. The header's band is up to 94 px
   tall, so at the canvas's 96 px the ring's top edge lay under the header whenever the header was showing. */
.fq-item { scroll-margin-top: 104px; }
