/* Site v4 (2026-11-09): gilt frame + show ticket kit. Loaded on every page by js/layout.js.
   Site-wide template: photos sit in antique gilt frames, names and prices sit on show-ticket stubs
   (the user liked the Shop v2 frames and the thanks-page ticket). Restraint: cream page, big margins,
   thin gold. The home page does not use this kit.
   v6 (2026-11-09): the user chose the hang look (css/hang.css, default); this frame kit stays as the
   ?look=frame fallback. No cherub illustrations on any page: the cherub is the cursor only.
   Frame art: img/shop/frame-rect|oval|arch.webp (same files as the Shop page). */

/* ---------- 1. stretchable rectangular gilt frame (any aspect ratio) ----------
   <div class="gilt"><div class="gilt-in"><img></div></div>  or  <div class="gilt"><img></div>
   The rect frame art is drawn with border-image, so corners stay crisp at any size. */
.gilt { --gb: clamp(16px, 1.9vw, 24px); position: relative; display: block; padding: calc(var(--gb) * .8); }
.gilt::after,
.window::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border: var(--gb) solid transparent;
  border-image: url("../img/shop/frame-rect.webp") 46 / var(--gb) round; /* v18: round keeps the milgrain beads round */
  filter: saturate(.62) sepia(.12) brightness(1.05) drop-shadow(0 6px 10px rgba(74, 58, 46, .16));
}
.gilt > .gilt-in { position: relative; display: block; overflow: hidden; background: var(--cream); }
.gilt > img, .gilt > .gilt-in > img { display: block; width: 100%; }
.gilt-sm { --gb: 10px; }
.gilt-xs { --gb: 7px; }

/* ---------- 2. shaped gilt frames (oval / arch / rect overlay), same as the Shop page ----------
   <div class="gf oval"><div class="gf-photo"><img></div><img class="gf-gilt" src="img/shop/frame-oval.webp" alt=""></div>
   Put it in a .gf-box to give every shape the same height (stubs and titles line up). */
.gf { position: relative; width: 100%; aspect-ratio: 484 / 620; margin-inline: auto; }
.gf.oval { aspect-ratio: 1024 / 1407; } /* 2026-11-13: oval + arch redrawn from scratch at ~1400px tall (old 620px art was soft) */
.gf.arch { aspect-ratio: 980 / 1453; }
.gf-box { aspect-ratio: 484 / 620; display: flex; align-items: flex-end; justify-content: center; }
.gf-box > .gf { height: 100%; width: auto; max-width: 100%; }
.gf-photo { position: absolute; overflow: hidden; background: var(--cream); }
.gf.oval .gf-photo { inset: 16.49% 11.23% 8.67% 11.23%; border-radius: 50%; } /* photo runs ~8 art px under the gilt sight edge */
.gf.arch .gf-photo { inset: 5.99% 8.62% 5.78% 8.62%; border-radius: 999px 999px 0 0; }
.gf.rect .gf-photo { inset: 7.4% 9.6% 7.5% 9.6%; }
.gf-photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gf-gilt {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2;
  filter: saturate(.62) sepia(.12) brightness(1.05) drop-shadow(0 6px 10px rgba(74, 58, 46, .16));
}

/* ---------- 3. show tickets ----------
   a) vertical stub (name on top, perforation, "Admit one" + price below): .tix > .tix-in > .tix-top + .tix-bot
   b) one-line ticket (stub on the left, perforation, details + price): .tix-row > .stub + .main
   c) card ticket (stub runs down the left side): .tix-card (used by the Not cheap / Not fast cards) */
.tix {
  --cut: 44px;
  background: var(--butter-soft); border-radius: 9px; padding: 5px;
  filter: drop-shadow(0 2px 4px rgba(74, 58, 46, .09));
  -webkit-mask: radial-gradient(circle 11px at 0 calc(100% - var(--cut)), #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 11px at 100% calc(100% - var(--cut)), #0000 97%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 11px at 0 calc(100% - var(--cut)), #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 11px at 100% calc(100% - var(--cut)), #0000 97%, #000) right / 51% 100% no-repeat;
}
.tix-in { border: 1px solid var(--gold-line); border-radius: 6px; }
.tix-top { padding: 18px 24px 16px; }
.tix-bot {
  height: calc(var(--cut) - 6px); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 20px; border-top: 1.5px dashed var(--gold-line);
}
.tix .admit, .tix-row .stub, .tix-card .stub { font-family: var(--fell); font-size: 12px; letter-spacing: .2em; color: var(--gold); white-space: nowrap; text-transform: uppercase; }
.tix .price { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: .02em; color: var(--ink); font-variant-numeric: lining-nums; }

.tix-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch;
  background: var(--butter-soft); border-radius: 9px; padding: 5px; max-width: none !important;
  filter: drop-shadow(0 2px 4px rgba(74, 58, 46, .09));
  -webkit-mask: radial-gradient(circle 10px at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 10px at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 10px at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 10px at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
}
.tix-row > .stub, .tix-row > .main { display: flex; align-items: center; border: 1px solid var(--gold-line); }
.tix-row > .stub { flex-direction: column; justify-content: center; gap: 2px; padding: 8px 14px 8px 20px; border-right: 0; border-radius: 6px 0 0 6px; line-height: 1.35; text-align: center; }
.tix-row > .stub i { font-style: normal; font-size: 13px; letter-spacing: 0; }
.tix-row > .main { justify-content: space-between; gap: 14px; padding: 10px 20px 10px 18px; border-left: 1.5px dashed var(--gold-line); border-radius: 0 6px 6px 0; }
.tix-row .ships { font-size: 17px; color: var(--ink-soft); line-height: 1.35; }
.tix-row .price { font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.1; color: var(--ink); font-variant-numeric: lining-nums; white-space: nowrap; }

.tix-card {
  --stub: 58px;
  position: relative; display: grid; grid-template-columns: var(--stub) minmax(0, 1fr);
  background: var(--butter-soft); border-radius: 16px; padding: 7px;
  filter: drop-shadow(0 4px 10px rgba(74, 58, 46, .09));
  -webkit-mask: radial-gradient(circle 11px at var(--stub) 0, #0000 97%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 11px at var(--stub) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 11px at var(--stub) 0, #0000 97%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 11px at var(--stub) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
}
.tix-card > .stub {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  writing-mode: vertical-rl; transform: rotate(180deg);
  border: 1px solid var(--gold-line); border-left: 1.5px dashed var(--gold-line); border-radius: 0 10px 10px 0;
}
.tix-card > .tix-body { border: 1px solid var(--gold-line); border-left: 0; border-radius: 0 10px 10px 0; padding: clamp(24px, 3.4vw, 40px); }

/* ---------- 4. page-specific placements ---------- */

/* product page: main photo in a shaped frame, thumbnails in small frames, title + price on a ticket */
.pd-main.gf-box { aspect-ratio: 484 / 620; background: none; border: 0; border-radius: 0; overflow: visible; width: min(100%, 520px); margin-inline: auto; }
.pd-main .gf-photo img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { justify-content: center; gap: 10px; margin-top: 18px; }
.pd-thumbs button.gilt { width: 64px; height: 78px; padding: 5px; border: 0; border-radius: 0; overflow: visible; opacity: .7; }
.pd-thumbs button.gilt.is-on { opacity: 1; transform: translateY(-2px); }
.pd-thumbs button.gilt img { width: 100%; height: 100%; object-fit: cover; }
.pd-tix { margin: 0 0 26px; }
.pd-tix .tix-top { padding: 22px 26px 18px; }
.pd-tix .eyebrow { margin-bottom: 8px; }
.pd-tix .pd-title { font-size: clamp(34px, 3.6vw, 48px); margin: 0 0 8px; }
.pd-tix .pd-ooak { margin: 0; font-family: var(--fell); font-size: 13px; letter-spacing: .16em; color: var(--sage); text-transform: uppercase; }
.pd-tix .tix-bot { padding: 0 24px; }
.pd-tix { --cut: 52px; }
.pd-tix .pd-price { font-size: 30px; }
.pd .ooak-box { background: var(--card); border: 1.5px dashed var(--gold-line); border-radius: 10px; }

/* cart thumbnails */
.cart-items li { grid-template-columns: 70px 1fr auto; }
.cart-items .cart-thumb { width: 70px; height: 86px; padding: 6px; }
.cart-items .cart-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

/* DIY window previews on the Locket page: same gilt as everywhere else */
.window { --gb: clamp(12px, 1.6vw, 18px); background: none; box-shadow: none; border-radius: 0; padding: calc(var(--gb) * .8); }
.window .window-inner { border-radius: 0; }

/* policy pages: words first, only a thin gold line under the title */
.policy .page-head h1 { position: relative; padding-bottom: 18px; margin-bottom: 4px; }
.policy .page-head h1::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: min(240px, 60%); height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--gold-line) 60%, transparent);
}

@media (max-width: 640px) {
  .gilt { --gb: 14px; }
  .tix-top { padding: 14px 18px 12px; }
  .tix .price { font-size: 23px; }
  .tix-row > .stub { padding: 8px 10px 8px 16px; font-size: 10.5px; letter-spacing: .14em; }
  .tix-row > .main { padding: 10px 16px 10px 14px; }
  .tix-row .ships { font-size: 15px; }
  .tix-row .price { font-size: 26px; }
  .tix-card { --stub: 46px; }
  .pd-tix .pd-title { font-size: 34px; }
  .pd-thumbs { gap: 8px; }
  .pd-thumbs button.gilt { width: 52px; height: 64px; padding: 4px; }
  .cart-items li { grid-template-columns: 62px 1fr auto; }
  .cart-items .cart-thumb { width: 62px; height: 78px; padding: 5px; }
}
