/* The showcase of the signature designs (src/pages/signature.mjs), 2026-10-20.
   On top of site.css and home.css: the hx- type and buttons, paper, ink and tape yellow.
   Each design carries its own colour (--tint, from its finishes) into its tiles and frame.
   The evening render swaps in on "Lights down"; without motion it simply switches. */

/* ---------- hero: the words left, every design as a tile on the right ---------- */
.sg-hero { position: relative; padding: calc(var(--hx-head) + clamp(1.6rem, 4vw, 3.6rem)) 0 clamp(2.8rem, 6vw, 5.2rem); overflow: hidden; }
.sg-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(80% 90% at 75% 45%, #000 20%, transparent 80%); mask-image: radial-gradient(80% 90% at 75% 45%, #000 20%, transparent 80%); }
.sg-hero-in { max-width: 1480px; margin: 0 auto; padding: 0 var(--hx-gut); display: grid; grid-template-columns: minmax(0, 5.4fr) minmax(0, 6.6fr); gap: clamp(1.8rem, 4vw, 4.6rem); align-items: center; }
.sg-h1 { font-size: clamp(2.4rem, 4vw, 4.8rem); font-weight: 850; font-stretch: 112%; letter-spacing: -.045em; line-height: .92; margin: 0 0 1.4rem; text-wrap: balance; }
.sg-h1 span:first-child { display: block; }
/* the tape under the second half, on every line it wraps to */
.sg-h1 span + span { padding-bottom: .04em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background-image: repeating-linear-gradient(90deg, var(--hx-ink) 0 2px, transparent 2px 12px), linear-gradient(var(--hx-tape), var(--hx-tape));
  background-repeat: no-repeat; background-position: 0 100%, 0 100%; background-size: 100% .08em, 100% .2em; animation: sg-tape 1.1s .3s cubic-bezier(.2, .7, .1, 1) both; }
@keyframes sg-tape { from { background-size: 0 .08em, 0 .2em; } }
.sg-hero .hx-lede { max-width: 46ch; }

.sg-mosaic { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.sg-tile { grid-column: span var(--span, 4); min-width: 0; animation: sg-in .8s var(--ease) both calc(var(--i, 0) * 70ms + .12s); }
@keyframes sg-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.sg-tile a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--hx-ink); border: 1px solid var(--hx-line);
  background: radial-gradient(90% 80% at 50% 40%, #fff 0%, #f1ede6 70%, #e6e0d5 100%);
  background: radial-gradient(90% 80% at 50% 40%, #fff 0%, color-mix(in srgb, var(--tint) 14%, #f4f0e9) 66%, color-mix(in srgb, var(--tint) 32%, #e9e3d8) 100%);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.sg-tile img { position: absolute; left: 6%; top: 5%; width: 88%; height: 76%; object-fit: contain; transition: transform .7s var(--ease); }
.sg-tile-n { position: absolute; left: 14px; bottom: 11px; font-weight: 800; font-stretch: 106%; font-size: clamp(.95rem, 1.2vw, 1.12rem); letter-spacing: -.01em; }
.sg-tile-p { position: absolute; right: 14px; bottom: 13px; font-size: .78rem; font-weight: 650; color: var(--hx-mute); }
/* the prices on the tiles: what they leave out, right under them */
.sg-mosaic-wrap { min-width: 0; }
.sg-hero-tail { margin: .7rem 0 0; font-size: .8rem; color: var(--hx-mute); text-align: right; }
/* a narrow tile (a row of four) has no room for the name and the price side by side: the price goes under the name */
.sg-tile a { container-type: inline-size; }
@container (max-width: 230px) {
  .sg-tile img { height: 66%; top: 4%; }
  .sg-tile-n { bottom: 25px; }
  .sg-tile-p { left: 14px; right: auto; bottom: 9px; font-size: .74rem; }
}
.sg-tile a:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: 0 24px 40px -26px rgba(0, 0, 0, .5); }
.sg-tile a:hover img { transform: scale(1.06); }

/* ---------- how one design becomes yours ---------- */
.sg-steps-band { padding: clamp(3rem, 7vw, 5.4rem) 0; background: var(--hx-card); border-top: 1px solid var(--hx-line); }
.sg-h2 { font-size: clamp(2rem, 3.8vw, 3.6rem); font-weight: 820; font-stretch: 108%; letter-spacing: -.035em; line-height: .98; max-width: 20ch; margin: 0 0 1.2rem; text-wrap: balance; }
.sg-steps { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.sg-steps li { position: relative; counter-increment: s; padding: 2.4rem 1.4rem 1.6rem; border-radius: 20px; background: var(--hx-paper); border: 1px solid var(--hx-line); overflow: hidden; }
.sg-steps li::before { content: counter(s); position: absolute; top: 1.05rem; left: 1.4rem; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--hx-tape); box-shadow: inset 0 0 0 2px var(--hx-ink); font-weight: 800; font-size: .9rem; }
.sg-steps li::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--hx-tape) repeating-linear-gradient(90deg, var(--hx-ink) 0 1px, transparent 1px 8px) top / 100% 55% no-repeat; }
.sg-steps b { display: block; margin: 1.6rem 0 .45rem; font-size: clamp(1.3rem, 1.8vw, 1.7rem); font-weight: 800; font-stretch: 106%; letter-spacing: -.02em; line-height: 1.1; }
.sg-steps p { margin: 0; color: #3a3732; line-height: 1.5; }

/* ---------- the pet picker and the chip row ---------- */
.sg-six { scroll-margin-top: var(--hx-head); }
.sg-pick { position: relative; background: var(--hx-ink); color: var(--hx-paper); padding: 2.2rem 0 1.8rem; }
.sg-pick::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: var(--hx-tape) repeating-linear-gradient(90deg, var(--hx-ink) 0 1.5px, transparent 1.5px 10px) top / 100% 40% no-repeat; }
.sg-pick-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1rem 3rem; align-items: center; }
.sg-pick-l { display: grid; gap: .35rem; }
.sg-pick-l b { font-size: clamp(1.5rem, 2.4vw, 2.2rem); font-weight: 820; font-stretch: 106%; letter-spacing: -.025em; line-height: 1.05; }
.sg-pick-l span { color: rgba(242, 239, 233, .72); line-height: 1.45; max-width: 46ch; }
.sg-pick-f select { display: block; width: 100%; -webkit-appearance: none; appearance: none; padding: .95rem 3rem .95rem 1.1rem; border-radius: 14px; border: 2px solid var(--hx-tape); cursor: pointer;
  font: 650 1.05rem/1.2 var(--hx-font); color: var(--hx-ink);
  background: var(--hx-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23141414' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 1.1rem center / 14px 9px; }
.sg-pick-f select:focus-visible { outline: 3px solid var(--hx-tape); outline-offset: 3px; }
.sg-pick-s { min-height: 1.45em; margin: .7rem 0 0; color: var(--hx-tape); font-weight: 650; font-size: .92rem; line-height: 1.45; }

.sg-chips { position: sticky; top: var(--hx-head); z-index: 30; display: flex; gap: .45rem; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: .7rem var(--hx-gut);
  background: rgba(242, 239, 233, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--hx-line); }
.sg-chips::-webkit-scrollbar { display: none; }
.sg-chips a { flex: none; display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--hx-line-2); text-decoration: none; font: 650 .9rem/1 var(--hx-font); color: var(--hx-ink); transition: background .2s, color .2s, box-shadow .2s; }
.sg-chips a:first-child { margin-left: auto; }
.sg-chips a:last-child { margin-right: auto; }
.sg-chips a::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--tint); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.sg-chips a:hover { box-shadow: inset 0 0 0 1.5px var(--hx-ink); }
.sg-chips a[aria-current] { background: var(--hx-ink); color: var(--hx-paper); box-shadow: none; }

/* ---------- the designs: the render big, the words beside it, sides alternate ---------- */
.sg-list { display: grid; gap: clamp(4rem, 9vw, 8rem); padding-top: clamp(3rem, 6vw, 5.4rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.sg-piece { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.8rem, 4.6vw, 5rem); align-items: center; scroll-margin-top: calc(var(--hx-head) + 64px); }
.sg-piece.is-flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.sg-piece.is-flip .sg-frame { order: 2; }

.sg-frame { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 28px; overflow: hidden; isolation: isolate; border: 1px solid var(--hx-line);
  background: radial-gradient(95% 85% at 50% 40%, #fff 0%, #f1ede6 66%, #e3ddd3 100%);
  background: radial-gradient(95% 85% at 50% 40%, #fff 0%, color-mix(in srgb, var(--tint) 12%, #f3efe8) 64%, color-mix(in srgb, var(--tint) 30%, #e6e0d5) 100%); }
/* the night behind the evening render: a dark room, a warm pool on the floor */
.sg-frame::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .8s var(--ease);
  background: radial-gradient(46% 26% at 50% 80%, rgba(255, 176, 92, .2), transparent 72%), radial-gradient(120% 95% at 50% 32%, #2b2e39 0%, #18191f 70%, #111216 100%); }
.sg-frame::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 16px; background: var(--hx-tape) repeating-linear-gradient(90deg, var(--hx-ink) 0 1px, transparent 1px 10px) top / 100% 32% no-repeat; }
.sg-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 5% 6% 8%; transition: opacity .8s var(--ease), transform 1.2s var(--ease); }
.sg-frame .sg-eve { opacity: 0; }
.sg-frame.is-eve::before, .sg-frame.is-eve .sg-eve { opacity: 1; }
.sg-frame.is-eve .sg-day { opacity: 0; }
.sg-piece:hover .sg-frame img { transform: scale(1.025); }
.sg-no { position: absolute; left: clamp(14px, 2vw, 26px); top: clamp(8px, 1.4vw, 16px); font-size: clamp(2.6rem, 5vw, 5rem); font-weight: 860; font-stretch: 112%; letter-spacing: -.05em; line-height: 1; color: rgba(20, 20, 20, .09); transition: color .8s; pointer-events: none; }
.sg-frame.is-eve .sg-no { color: rgba(242, 239, 233, .1); }
.sg-lights { position: absolute; right: 14px; top: 14px; z-index: 2; display: inline-flex; align-items: center; gap: .55rem; padding: .5rem .9rem .5rem .55rem; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px var(--hx-line-2); font: 680 .86rem/1 var(--hx-font); color: var(--hx-ink); transition: background .3s, color .3s; }
.sg-switch { position: relative; width: 34px; height: 20px; border-radius: 99px; background: rgba(20, 20, 20, .16); transition: background .3s; flex: none; }
.sg-switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s var(--ease), background .3s; }
.sg-lights[aria-pressed="true"] { background: rgba(20, 20, 20, .72); color: var(--hx-paper); box-shadow: inset 0 0 0 1px rgba(242, 239, 233, .2); }
.sg-lights[aria-pressed="true"] .sg-switch { background: rgba(255, 199, 44, .35); }
.sg-lights[aria-pressed="true"] .sg-switch::after { transform: translateX(14px); background: var(--hx-tape); box-shadow: 0 0 10px 2px rgba(255, 184, 102, .7); }
.sg-frame.is-loading .sg-switch::after { animation: sg-pulse .8s ease-in-out infinite alternate; }
@keyframes sg-pulse { to { opacity: .4; } }
.sg-eve-note { position: absolute; left: clamp(14px, 2vw, 26px); bottom: 26px; margin: 0; font-size: .8rem; font-weight: 600; color: rgba(242, 239, 233, .78); opacity: 0; transition: opacity .8s; pointer-events: none; }
.sg-frame.is-eve .sg-eve-note { opacity: 1; }

.sg-note { display: flex; align-items: center; gap: .7rem; margin: 0 0 .9rem; font-weight: 700; font-size: .98rem; line-height: 1.35; color: var(--hx-mute); }
.sg-note::before { content: ''; width: 34px; height: 12px; flex: none; border-radius: 2px; background: var(--hx-tape) repeating-linear-gradient(90deg, var(--hx-ink) 0 1px, transparent 1px 6px) bottom / 100% 45% no-repeat; }
.sg-name { font-size: clamp(3rem, 6.2vw, 6.2rem); font-weight: 860; font-stretch: 114%; letter-spacing: -.05em; line-height: .88; margin: 0 0 1.2rem; overflow-wrap: break-word; hyphens: auto; }
.sg-pitch { font-size: clamp(1.04rem, 1.25vw, 1.2rem); line-height: 1.55; color: #2b2925; max-width: 46ch; }

.sg-sizes { margin: 1.6rem 0 1.2rem; padding: .95rem 1.1rem 1rem; border-radius: 18px; background: var(--hx-card); border: 1px solid var(--hx-line); }
.sg-sizes-h { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 .45rem; }
.sg-sizes-h span + span { font-size: .78rem; font-weight: 650; color: var(--hx-mute); white-space: nowrap; }
.sg-sizes dl { margin: 0; }
.sg-size { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: .3rem 1rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--hx-line); }
.sg-size:first-child { border-top: 0; }
.sg-size[hidden] { display: none; }
.sg-size dt { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .45rem; font-size: .9rem; line-height: 1.25; }
.sg-size dt b { font-weight: 650; }
.sg-size dd { margin: 0; display: grid; gap: .3rem; }
.sg-size dd i { display: block; height: 9px; width: calc(var(--f, 1) * 100%); min-width: 12px; border-radius: 3px; transition: width .7s var(--ease);
  background: var(--hx-tape) repeating-linear-gradient(90deg, var(--hx-ink) 0 1px, transparent 1px 6px) top / 100% 45% no-repeat; box-shadow: inset 0 0 0 1px rgba(20, 20, 20, .2); }
.sg-size dd b { font-weight: 760; font-size: .96rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sg-size:not(.is-shown):not(.sg-yours) dd i { background-color: color-mix(in srgb, var(--hx-tape) 45%, #fff); }
.sg-tag { font-size: .64rem; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; padding: .22rem .5rem; border-radius: 99px; background: var(--hx-ink); color: var(--hx-paper); }
.sg-yours { margin: .2rem -.6rem 0; padding: .6rem; border-radius: 12px; border-top: 0; background: #fff4cc; animation: sg-in .5s var(--ease) both; }
.sg-yours .sg-tag { background: var(--hx-tape); color: var(--hx-ink); box-shadow: inset 0 0 0 1.5px var(--hx-ink); }
.sg-price { margin: 0; color: var(--hx-mute); line-height: 1.45; }
.sg-price b { color: var(--hx-ink); font-size: 1.35rem; font-weight: 820; letter-spacing: -.015em; }
.sg-ctas { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.3rem; }

/* ---------- proof, faq, end ---------- */
.sg-proof { background: var(--hx-dark); color: var(--hx-paper); padding: clamp(4rem, 9vw, 7rem) 0; }
.sg-proof .hx-kicker { color: rgba(242, 239, 233, .65); }
.sg-proof .hx-lede { color: rgba(242, 239, 233, .82); }
.sg-proof-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.4rem 4rem; align-items: center; }
.sg-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: rgba(242, 239, 233, .14); border: 1px solid rgba(242, 239, 233, .14); border-radius: 20px; overflow: hidden; }
.sg-facts div { background: var(--hx-dark); padding: 1.5rem 1.4rem 1.6rem; }
.sg-facts dt { font-size: clamp(1.9rem, 3.2vw, 3rem); font-weight: 850; font-stretch: 106%; letter-spacing: -.04em; line-height: 1; color: var(--hx-tape); }
.sg-facts dd { margin: .55rem 0 0; color: rgba(242, 239, 233, .72); line-height: 1.45; }
.sg-page .prem-band { border-bottom: 1px solid var(--hx-line); }

/* ---------- tablets and phones: one column, the tiles swipe, both buttons full width ---------- */
@media (max-width: 999px) {
  .sg-hero-in, .sg-pick-in, .sg-proof-in { grid-template-columns: minmax(0, 1fr); }
  /* the renders come straight under the words, the buttons under the renders */
  .sg-hero-in { gap: 0; }
  .sg-hero-copy { display: contents; }
  .sg-hero .hx-row { order: 2; }
  .sg-mosaic { order: 1; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; margin: 1.6rem calc(var(--hx-gut) * -1) 0; padding: 0 var(--hx-gut) 4px; scroll-padding: 0 var(--hx-gut); }
  .sg-mosaic::-webkit-scrollbar { display: none; }
  .sg-mosaic-wrap { order: 1; }
  .sg-hero-tail { margin-top: .6rem; text-align: left; }
  .sg-tile { flex: 0 0 min(72%, 360px); scroll-snap-align: start; }
  .sg-steps { grid-template-columns: minmax(0, 1fr); }
  .sg-piece, .sg-piece.is-flip { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .sg-piece.is-flip .sg-frame { order: 0; }
  .sg-frame { border-radius: 22px; }
}
@media (max-width: 760px) {
  .sg-hero { padding-top: calc(var(--hx-head) + 1.2rem); }
  .sg-h1 { font-size: clamp(2.3rem, 10.4vw, 3.2rem); }
  .sg-chips { padding: .6rem var(--hx-gut); }
  .sg-chips a { padding: .5rem .85rem; font-size: .86rem; }
  .sg-list { gap: 3.6rem; padding-top: 2rem; }
  .sg-name { font-size: clamp(2.6rem, 13vw, 3.6rem); }
  .sg-lights { right: 10px; top: 10px; font-size: .8rem; }
  .sg-ctas .hx-btn, .sg-hero .hx-row .hx-btn { flex: 1 1 100%; }
  .sg-pick { padding: 1.9rem 0 1.5rem; }
}
@media (max-width: 420px) {
  .sg-size { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .sg-facts div { padding: 1.2rem 1rem 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sg-tile, .sg-yours, .sg-h1 span + span { animation: none; }
  .sg-frame img, .sg-frame::before, .sg-tile a, .sg-tile img, .sg-size dd i { transition: none; }
}
