/*
 * Zoey Made — scallop frame.
 *
 * The signature Zoey Made motif: a row of pastel half-ovals that bookends the site, once
 * at the very top and once at the very bottom. It is decoration and nothing else — no
 * text, no controls, no state — so it is hidden from assistive technology in markup and
 * has no behaviour at all.
 *
 *   <div class="zoey-scallop-frame zoey-scallop-frame--top" aria-hidden="true"></div>
 *   <div class="zoey-scallop-frame zoey-scallop-frame--bottom" aria-hidden="true"></div>
 *
 * Place it as a top-level element of a template, outside the header and footer, so the
 * frame and the shell stay structurally independent and either can change without the
 * other. At that level it is already the full width of the page, which is why nothing
 * here reaches for 100vw — that would add the scrollbar's width and scroll the page
 * sideways.
 *
 * Colour lives in the SVG rather than here. An external file used as a background cannot
 * read a custom property, so the seven fills are the palette's own hex values, copied
 * from theme.json and from nowhere else.
 */

.zoey-scallop-frame {
  /* Shallow enough to read as trim rather than as a band of its own. Everything else
     about the shape is derived from this one value. */
  --zoey-scallop-frame-height: clamp(24px, 3vw, 36px);

  display: block;
  block-size: var(--zoey-scallop-frame-height);
  background-image: url("../../svg/scallop-frame.svg");
  background-repeat: repeat-x;
  /* `auto` takes the width from the file's own aspect ratio, so a scallop keeps its
     proportions at every viewport width: what changes with the width is how many
     scallops fit, never their shape. */
  background-size: auto var(--zoey-scallop-frame-height);
  /* Centred, so the partial scallops at the left and right edges are the same width as
     each other and read as deliberate rather than as a pattern that ran out. */
  background-position: center;
}

/*
 * The top frame is the asset as drawn, so it needs no rule of its own; the class names
 * the instance and is the hook if the two ends ever diverge.
 *
 * The bottom frame is that same asset mirrored, which is the whole reason there is one
 * file rather than two. Mirroring keeps the flat edge against the edge of the page and
 * the scallops facing the content at both ends.
 */
.zoey-scallop-frame--bottom {
  transform: scaleY(-1);
}
