/* Marketing kits -- every page scripts/add-pages generates from
 * inventory/kits.json and templates/pages/kit.html. Loaded by those pages
 * alone, for the same reason as static/program.css: a selector here that escaped
 * its as-kit- prefix would otherwise restyle all seventy pages.
 *
 * It is linked immediately before the shim's stylesheet, so these rules win
 * over every Wix <style> block without !important.
 *
 * COLOURS AND FONTS as static/program.css has them: the brand navy and yellow
 * are the site theme's own variables, questrial is the site's only face and
 * `bold` is its synthetic bold. The rest follows the layout the business
 * supplied for the kit (Sparkling Snow Globes, 2026-10-21): a navy banner with
 * the flyer beside it, a yellow "before you post" strip, then white cards.
 *
 * TWO VIEWPORT WIDTHS, as on /stem: the mobile tree is pinned to 320px and the
 * desktop tree is never usefully narrower than 980px, so the base rules are
 * the phone and one media query adds the rest.
 */

/* ---- shared ------------------------------------------------------------- */

.as-kit {
  --as-navy: rgb(var(--color_11));
  --as-yellow: rgb(var(--color_43));
  --as-ink: #1a1f36;
  --as-body: #4a5068;
  --as-on-navy: #d9ddee;
  --as-on-navy-dim: #b9c0d8;
  --as-panel: #eef1f7;
  --as-line: #dfe3ec;
  --as-blue: #4a6fd0;
  --as-blue-dark: #3a5bb4;
  --as-ph: #ffe9a3;

  box-sizing: border-box;
  padding-bottom: 48px;
  background: #f4f5f9;
  font-family: questrial, sans-serif;
  color: var(--as-body);
}

.as-kit *,
.as-kit *::before,
.as-kit *::after { box-sizing: inherit; }

/* :where() so the reset adds no specificity -- see static/program.css for the
 * bug that taught this. */
.as-kit :where(p, h1, h2, h3, ul, li, figure) { margin: 0; padding: 0; }
.as-kit :where(ul) { list-style: none; }

.as-kit-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

.as-kit-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* A link styled as a button, and the Copy buttons. min-height keeps every
 * touch target at 44px even when a label wraps on a 320px screen. */
.as-kit-btn,
.as-kit-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--as-blue);
  color: #fff;
  font-family: questrial, sans-serif;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}

.as-kit-btn:hover,
.as-kit-btn:focus { background: var(--as-blue-dark); color: #fff; }

.as-kit-btn:focus-visible,
.as-kit-copy:focus-visible,
.as-kit-image-dl:focus-visible,
.as-kit-thumb:focus-visible {
  outline: 3px solid var(--as-yellow);
  outline-offset: 2px;
}

/* ---- breadcrumb --------------------------------------------------------- */

/* Also an .as-kit-wrap, which gives it the page's width and side gutters.
 *
 * On the navy, like every other page's breadcrumb (Castle Attack and the rest
 * carry it inside their navy banner): white underlined links and the current
 * page in bold. The navy runs the full width of the window while the text
 * keeps to the .as-kit-wrap column -- the shadow paints out to both edges and
 * the clip keeps it from spilling above or below -- so the breadcrumb and the
 * banner under it read as one block. */
.as-kit-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 14px;
  padding-bottom: 0;
  font-size: 15px;
  color: var(--as-on-navy);
  background: var(--as-navy);
  box-shadow: 0 0 0 100vmax var(--as-navy);
  clip-path: inset(0 -100vmax);
}

.as-kit-crumbs a { color: #fff; text-decoration: underline; }
.as-kit-crumbs a:hover,
.as-kit-crumbs a:focus { color: var(--as-yellow); }
.as-kit-crumbs [aria-current] { color: #fff; font-weight: bold; }

/* ---- banner ------------------------------------------------------------- */

.as-kit-hero {
  padding: 20px 0;
  background: var(--as-navy);
}

.as-kit-eyebrow {
  color: var(--as-yellow);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.as-kit-h1 {
  margin-top: 10px;
  color: #fff;
  font-size: 34px;
  font-weight: bold;
  line-height: 1.05;
  text-transform: uppercase;
}

.as-kit-h1-game { display: block; }

.as-kit-intro {
  margin-top: 14px;
  color: var(--as-on-navy);
  font-size: 16px;
  line-height: 1.5;
}

.as-kit-flyers {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.as-kit-flyer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
}

.as-kit-flyer-text { display: flex; flex-direction: column; gap: 3px; }
.as-kit-flyer-name { color: #fff; font-size: 18px; font-weight: bold; }
.as-kit-flyer-size { color: var(--as-on-navy-dim); font-size: 13px; }
.as-kit-flyer-tip { margin-top: 4px; color: var(--as-on-navy); font-size: 14px; line-height: 1.45; }

.as-kit-flyers-note {
  margin-top: 14px;
  color: var(--as-on-navy-dim);
  font-size: 14px;
  line-height: 1.5;
}

.as-kit-preview {
  max-width: 240px;
  margin: 28px auto 0;
}

/* No aspect-ratio: the width and height add-pages writes are the flyer's
 * own, so a print flyer is shown whole instead of losing its bottom strip
 * to a 4:5 box. */
.as-kit-preview-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* ---- before you post ---------------------------------------------------- */

/* The posting reminder: one quiet line directly under the Social Media Copy
 * heading, next to the posts it is about. */
.as-kit-card-note {
  margin: -8px 0 16px;
  color: var(--as-body);
  font-size: 14px;
  line-height: 1.5;
}

.as-kit-note-h {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The placeholders a library has to replace, wherever they appear. */
.as-kit-ph {
  padding: 0 2px;
  border-radius: 3px;
  background: var(--as-ph);
  color: inherit;
}

/* ---- cards -------------------------------------------------------------- */

.as-kit-card {
  margin-top: 20px;
  padding: 20px 16px;
  border: 1px solid var(--as-line);
  border-radius: 12px;
  background: #fff;
}

.as-kit-h2 {
  color: var(--as-ink);
  font-size: 22px;
  font-weight: bold;
  line-height: 1.2;
  text-transform: uppercase;
}

.as-kit-card > .as-kit-h2 { margin-bottom: 16px; }

.as-kit-posts { display: grid; gap: 16px; }

.as-kit-post {
  padding: 16px;
  border-radius: 10px;
  background: var(--as-panel);
}

.as-kit-post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.as-kit-post-h {
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.as-kit-post-h-fb { color: #1877f2; }
.as-kit-post-h-ig { color: #d62976; }

/* Secondary to the blue buttons: a white chip, so three of them on one page
 * do not compete with Edit in Canva. */
.as-kit-copy {
  min-width: 96px;
  padding: 8px 16px;
  border: 1px solid var(--as-line);
  background: #fff;
  color: var(--as-ink);
  font-size: 13px;
}

.as-kit-copy:hover,
.as-kit-copy:focus { background: var(--as-panel); }

/* Set by the shim for two seconds after a successful copy. */
.as-kit-copy[data-as-copied] {
  border-color: #2e8b57;
  background: #e8f6ee;
  color: #1f6b41;
}

/* The copy exactly as it will be pasted: its line breaks are its own. */
.as-kit-text {
  color: var(--as-ink);
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.as-kit-text-wide {
  padding: 16px;
  border-radius: 10px;
  background: var(--as-panel);
}

/* ---- images ------------------------------------------------------------- */

.as-kit-images-note {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.as-kit-images {
  display: grid;
  gap: 18px;
}

/* The download control sits on the picture, as on the site's Wix galleries
 * (shim/arrayscape.css, .as-gal-dl): their icon, on a navy square in the
 * corner. With a mouse it appears on hover or focus; on a touch screen,
 * which has no hover to reveal it, it is always shown. It stays a real link
 * with an aria-label, so it works with no script and reads to screen
 * readers as "Download image N". */
.as-kit-image { position: relative; }

.as-kit-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 300 / 169;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.as-kit-thumb:hover { opacity: 0.88; }

.as-kit-image-dl {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(46, 63, 102, 0.75);
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.as-kit-image-dl:hover,
.as-kit-image-dl:focus { background: rgba(46, 63, 102, 0.95); }

.as-kit-dl-icon { display: block; width: 26px; height: 26px; }

@media (hover: hover) {
  .as-kit-image-dl { opacity: 0; }
  .as-kit-image:hover .as-kit-image-dl,
  .as-kit-image:focus-within .as-kit-image-dl { opacity: 1; }
}

/* ---- desktop ------------------------------------------------------------ */

@media (min-width: 601px) {
  .as-kit-wrap { padding-left: 32px; padding-right: 32px; }

  .as-kit-hero { padding: 24px 0; }

  .as-kit-hero-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    align-items: start;
    gap: 48px;
  }

  .as-kit-h1 { font-size: 52px; }
  .as-kit-intro { font-size: 18px; }

  .as-kit-flyer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  /* Beside text, the button keeps its natural width and the text wraps
   * instead; without this the flex row squeezes the label onto two lines. */
  .as-kit-flyer .as-kit-btn { flex: 0 0 auto; }

  .as-kit-preview { margin: 0; }

  .as-kit-card { margin-top: 24px; padding: 28px; }
  .as-kit-h2 { font-size: 26px; }
  .as-kit-posts { grid-template-columns: 1fr 1fr; gap: 20px; }
  .as-kit-images { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
