/*
 * Generated by scripts/port-css.mjs from the CSS Modules that preceded
 * this theme. Edit the rules here — the generator is kept for reference,
 * not re-run against a moved target.
 */

/* ─── components/ui/Chip.module.css ─────────────────────────────────────── */
/**
 * The filter pill, shared by the gift builder and /shop.
 *
 * Solid, borderless, and coloured by its rail: each chip fills with the
 * `--tint` set by the `t-*` classes in globals, and deepens to `--tint-deep`
 * when it's the chosen one. The colour carries all the state, so there is no
 * outline and no dot to read.
 */
.us-chip {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: none;
  background: var(--tint, var(--lilac));
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  transition:
    color 0.25s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.us-chip > * { position: relative; z-index: 1; }

/* the deep tint sweeps up from the bottom, so hover previews being chosen */
.us-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--tint-deep, var(--lilac-deep));
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

/*
 * Hover is a *preview* of being chosen, so it is deliberately kept short of
 * the chosen state — see the ring on [data-active] below. With both rendering
 * identically (white label, -2px lift, sweep fully up) clicking a chip under
 * the pointer changed nothing on screen at all, so the click read as dead
 * even though the filter had applied.
 *
 * Gated on a real hovering pointer. On a touchscreen `:hover` latches after a
 * tap and does not clear until something else is tapped, which would leave a
 * chip that is merely the last one touched looking exactly like the chosen one.
 */
@media (hover: hover) {
  .us-chip:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--tint-deep, var(--lilac-deep)) 30%, transparent);
  }
  .us-chip:hover::before { transform: translateY(0); }
}

/* The press itself, so the click lands even where hover already darkened the
   chip. Fast and on the way down — this is acknowledgement, not decoration. */
.us-chip:not([data-empty='true']):active {
  transform: translateY(-1px) scale(0.96);
  transition-duration: 0.06s;
}

.us-chip:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Chosen. The ring is what hover never gets, so the difference between
   "pointer is here" and "this one is on" survives the pointer sitting on it. */
.us-chip[data-active='true'] {
  color: var(--white);
  font-weight: 600;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 2px var(--white),
    0 0 0 4px var(--tint-deep, var(--lilac-deep)),
    0 6px 18px color-mix(in srgb, var(--tint-deep, var(--lilac-deep)) 38%, transparent);
}
.us-chip[data-active='true']::before { transform: translateY(0); }

.us-chip-label { letter-spacing: -0.005em; }

/* the live match count — a pip, not a floating number */
.us-chip-count {
  min-width: 1.35em;
  padding: 0.16em 0.4em;
  margin-right: -0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--ink-60);
  transition: background 0.25s ease, color 0.25s ease;
}
.us-chip:hover .us-chip-count,
.us-chip[data-active='true'] .us-chip-count {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
}

/* a combination that yields nothing: visible, legible, not tappable */
.us-chip[data-empty='true'] {
  cursor: default;
  background: rgba(20, 16, 26, 0.05);
  color: var(--ink-30);
}
.us-chip[data-empty='true']:hover {
  color: var(--ink-30);
  transform: none;
  box-shadow: none;
}
.us-chip[data-empty='true']:hover::before { transform: translateY(101%); }
.us-chip[data-empty='true'] .us-chip-count {
  background: rgba(20, 16, 26, 0.05);
  color: var(--ink-30);
}

@media (prefers-reduced-motion: reduce) {
  .us-chip,
  .us-chip:hover,
  .us-chip[data-active='true'] { transform: none; }
  .us-chip::before { transition: none; }
}

/* ─── components/ui/MagneticButton.module.css ─────────────────────────────────────── */
.us-mag { display: inline-block; }

.us-mag-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
}

.us-mag-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--lilac-deep);
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}
.us-mag-btn:hover::before { transform: translateY(0); }

.us-mag-btn > * { position: relative; z-index: 1; }

.us-mag-arrow { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.us-mag-btn:hover .us-mag-arrow { transform: translateX(4px); }
.us-mag-arrow path { stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.us-mag-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink-12); }
.us-mag-ghost:hover { color: var(--white); border-color: transparent; }

/* ─── components/ui/ProductImage.module.css ─────────────────────────────────────── */
.us-tile {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 1);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tint-soft, var(--lilac-soft));
  display: grid;
  place-items: center;
}

/* `contain`, not `cover`: these are transparent cut-outs already centred on a
   square canvas with a fixed margin baked in by scripts/prep-product-assets.mjs,
   so cropping them to the tile would clip the product and lose that margin. */
.us-tile-photo { width: 100%; height: 100%; object-fit: contain; }

/* ─ placeholder ─ */
.us-tile-ph { width: 100%; height: 100%; display: block; }
.us-tile-ph-blob { fill: var(--tint, var(--lilac)); opacity: 0.55; }
.us-tile-ph-shape { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; opacity: 0.82; }
.us-tile-ph-fill { fill: var(--white); }
.us-tile-ph-dot { fill: var(--ink); opacity: 0.82; }

.us-tile-tag {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-60);
  backdrop-filter: blur(6px);
}

/* ─── components/ui/DrawnUnderline.module.css ─────────────────────────────────────── */
.us-underline {
  position: absolute;
  left: 0;
  bottom: -0.12em;
  width: 100%;
  height: 0.34em;
  overflow: visible;
  pointer-events: none;
}
.us-underline-path {
  fill: none;
  stroke: var(--stroke, var(--pink-deep));
  stroke-width: 7;
  stroke-linecap: round;
}

/* ─── components/ui/LogoLoop.module.css ─────────────────────────────────────── */
.us-loop {
  /* Full-bleed: cancel the section gutter, and the rail on the right. */
  margin-inline: calc(var(--gutter) * -1) calc((var(--gutter) + var(--rail)) * -1);
  border-top: 1px solid var(--ink-12);
  padding-top: 1.1rem;
}

.us-loop-label {
  padding-inline: var(--gutter);
  margin-bottom: 0.9rem;
}

.us-loop-viewport {
  position: relative;
  overflow: hidden;
  /* Feather both ends so logos arrive and leave instead of popping. */
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.us-loop-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.us-loop-half { display: flex; }
.us-loop-set { display: flex; align-items: center; }

.us-loop-item {
  display: grid;
  place-items: center;
  padding-inline: clamp(1.5rem, 3.4vw, 3.2rem);
  /* Brand colours stay on. A little transparency is all that keeps the strip
     from competing with the headline. */
  opacity: 0.82;
  transition: opacity 0.35s ease;
}

.us-loop-item:hover { opacity: 1; }

.us-loop-item img {
  height: calc(26px * var(--logo-scale, 1));
  width: auto;
  object-fit: contain;
}

.us-loop-wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--grey);
  white-space: nowrap;
}

/* No tween runs under reduced motion, so let the strip be scrolled by hand. */
@media (prefers-reduced-motion: reduce) {
  .us-loop-viewport { overflow-x: auto; }
  .us-loop-track { width: auto; }
  .us-loop-half:last-child { display: none; }
}

@media (max-width: 899px) {
  .us-loop-item { padding-inline: 1.3rem; }
  .us-loop-item img { height: calc(22px * var(--logo-scale, 1)); }
}

/* ─── components/art/Doodle.module.css ─────────────────────────────────────── */
/*
 * `app/globals.css` resets `img, svg, video { display: block; max-width: 100% }`.
 * Both halves of that bite a decorative SVG: block display puts a doodle used as
 * punctuation on a line of its own, and the max-width silently clamps a
 * full-bleed one to its container. Hence the three variants.
 */
.us-doodle {
  display: block;
  overflow: visible; /* round caps overshoot the viewBox */
  color: var(--doodle, var(--tint-deep, var(--lilac-deep)));
  pointer-events: none;
}

.us-doodle-inline {
  display: inline-block;
  vertical-align: -0.1em;
}

.us-doodle-bleed {
  max-width: none;
  width: 100%;
}

.us-doodle-stroke {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.us-doodle-fill { fill: currentColor; }

/* Anything meant to read as centred inside `.section` is half a rail off, because
   `.section` reserves --rail on the right for SectionRail. Self-disables under
   900px where --rail is 0. */
.us-doodle-centred { transform: translateX(calc(var(--rail) / 2)); }

/* ─── components/art/Cast.module.css ─────────────────────────────────────── */
/*
 * `app/globals.css` resets `img, svg, video { display: block; max-width: 100% }`,
 * so the image inside is already block-level; what it needs is to fill the
 * wrapper, which is the thing sections size and position.
 *
 * The wrapper carries the position and the transform, and the <img> carries
 * nothing — GSAP writes to the wrapper for entrances and drift, and to the
 * image for a couple of the idle loops, so the two never fight over one matrix.
 */
.us-cast {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  /* Sections opt a character in front of their content by raising this; the
     default sits it in the same layer the doodles use. */
  z-index: var(--cast-z, 0);
}

.us-cast img {
  width: 100%;
  height: auto;
}

/*
 * The admin's nudge: an offset from the tuned position, applied inside the
 * wrapper so it never shares a matrix with `castIn()`'s entrance, idle loops or
 * pointer drift, which all write to `.cast`. Only a nudged slot carries a
 * transform at all, so an untouched character renders exactly as before.
 * Desktop only, like the tuning it adjusts.
 */
.us-cast-nudge { display: block; }

@media (min-width: 900px) {
  .us-cast-nudge[data-nudged] {
    transform: translate(var(--nx, 0px), var(--ny, 0px)) rotate(var(--nr, 0deg)) scale(var(--ns, 1));
  }
}

/*
 * A character added in the admin (`CastExtras`). It has no hand-tuned rule of
 * its own, so everything about where it sits is inline; this only names it so
 * the overlap sweep — which finds artwork by `deco` in the class — can see it,
 * and lifts it into the same layer the tuned placements use.
 */
.us-cast-deco-extra { --cast-z: 1; }

/*
 * Desktop is what is being judged on this build, and a character sized against
 * a 1500px stage is a character that eats a phone. Opt out per placement with
 * `mobile="off"` rather than hiding the layer wholesale — Rex peering over the
 * shelf still works at 390px, the pair of dogs watching the brand rows does not.
 */
@media (max-width: 899px) {
  .us-cast[data-mobile='off'] { display: none; }
}

/*
 * `?cast=off` — the review switch, matching `?hero=` and `?art=`.
 *
 * CSS *and* an early return in `castIn()`: this rule is what stops them
 * painting, and the early return is what stops the idle loops running for
 * elements nobody can see.
 */
[data-cast-mode='off'] .us-cast { display: none; }
