/* ==========================================================================
   Tasty Design — interactive layer
   Hero that answers the mouse, custom cursor, tilt cards, magnetic buttons,
   shop-first home. Pointer effects only run on fine pointers; everything
   settles to a still layout with prefers-reduced-motion.
   ========================================================================== */

/* ------------------------------------------------------------------ hero */
.hx {
  --mx: 0; --my: 0; --gx: 50%; --gy: 40%;
  position: relative; min-height: 100svh; display: grid; align-items: center;
  padding: 8rem 0 5rem; overflow: hidden; background: var(--ink); color: #fff; isolation: isolate;
}
.hx__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at var(--gx) var(--gy), rgba(255, 59, 92, 0.32), transparent 62%),
    radial-gradient(60vmax 40vmax at 50% 120%, rgba(255, 59, 92, 0.12), transparent 70%);
  transition: background-position 0.2s linear;
}
.hx__inner { position: relative; z-index: 3; text-align: center; display: grid; justify-items: center; }
.hx__title {
  font-size: clamp(3rem, 9.4vw, 9.5rem); line-height: 0.92; letter-spacing: -0.045em; max-width: 12ch;
  transform: translate3d(calc(var(--mx) * -10px), calc(var(--my) * -8px), 0);
}
.hx__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hx__title .line > span { display: block; }
.js .hx__title .line > span { transform: translateY(105%); transition: transform 1.1s var(--ease-out); }
.js .hx__title.is-visible .line > span { transform: none; }

.hx__sub { margin-top: clamp(1.4rem, 3vw, 2.2rem); font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--on-dark); max-width: 34ch; line-height: 1.45; }
.hx__word {
  position: relative; display: inline-block; font-family: var(--font-display); font-weight: 800;
  color: #fff; padding: 0 0.12em; transition: color 0.3s var(--ease);
}
.hx__word::after {
  content: ''; position: absolute; left: 0.1em; right: 0.1em; bottom: 0.02em; height: 0.16em;
  background: var(--pink); transform-origin: left; transition: transform 0.5s var(--ease-out), height 0.4s var(--ease-out);
  z-index: -1;
}
.hx[data-mode='menu'] .hx__word[data-mode-trigger='menu']::after,
.hx[data-mode='website'] .hx__word[data-mode-trigger='website']::after { height: 1.05em; }
.hx__word:not(:hover)::after { transform: scaleX(1); }

.hx__actions { margin-top: clamp(2rem, 4vw, 2.8rem); display: flex; flex-wrap: wrap; justify-content: center; gap: 0.85rem; }

.hx__scroll { position: absolute; left: 50%; bottom: 1.6rem; z-index: 3; transform: translateX(-50%); padding: 0.5rem; }
.hx__scroll i { display: block; width: 1px; height: 46px; background: linear-gradient(var(--pink), transparent); animation: scrollPulse 2.2s var(--ease) infinite; }

/* floating cards: menus by default, website shots when "website" is active */
.hx__floats { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hx__card {
  --d: 1; position: absolute; margin: 0; border-radius: 14px; overflow: hidden; background: #111;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  transform: translate3d(calc(var(--mx) * var(--d) * 34px), calc(var(--my) * var(--d) * 28px + var(--sy, 0px)), 0) rotate(var(--r, 0deg));
  will-change: transform;
}
.hx__card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.8s var(--ease), transform 1.2s var(--ease-out); }
.hx__card .hx__w { opacity: 0; transform: scale(1.12); }
.hx[data-mode='website'] .hx__card .hx__w { opacity: 1; transform: none; }
.hx[data-mode='website'] .hx__card .hx__m { opacity: 0; transform: scale(0.94); }
.hx__card--1 { --d: 1.2; --r: -8deg; width: clamp(120px, 15vw, 230px); aspect-ratio: 4 / 5; left: 5%; top: 16%; }
.hx__card--2 { --d: 0.6; --r: 6deg; width: clamp(100px, 11vw, 170px); aspect-ratio: 4 / 5; left: 13%; bottom: 9%; opacity: 0.8; }
.hx__card--3 { --d: 0.9; --r: 7deg; width: clamp(130px, 16vw, 250px); aspect-ratio: 4 / 5; right: 5%; top: 13%; }
.hx__card--4 { --d: 0.45; --r: -5deg; width: clamp(90px, 9vw, 150px); aspect-ratio: 4 / 5; right: 17%; bottom: 7%; opacity: 0.75; }
.hx__card--5 { --d: 1.5; --r: -3deg; width: clamp(80px, 8vw, 130px); aspect-ratio: 4 / 5; left: 47%; top: 9%; opacity: 0.5; filter: blur(1px); }
.hx__card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 11, 0.35)); }

@media (max-width: 760px) {
  .hx { padding-top: 7rem; }
  .hx__card { opacity: 0.42 !important; filter: none !important; }
  .hx__card--1 { left: -6%; top: 13%; }
  .hx__card--3 { right: -8%; top: 52%; }
  .hx__card--2 { left: 4%; bottom: 4%; }
  .hx__card--4 { right: 6%; bottom: 3%; }
  .hx__card--5 { left: 60%; top: 6%; }
}
@media (hover: none), (pointer: coarse) {
  .hx__card { animation: hxFloat 7s var(--ease) infinite alternate; animation-delay: calc(var(--d) * -3s); }
}
@keyframes hxFloat { to { translate: 0 -14px; } }

/* --------------------------------------------------------------- marquee */
.marquee--fx { background: var(--pink); border: 0; padding-block: 0.95rem; }
.marquee--fx .marquee__track { animation: none; }
.marquee--fx span { color: #fff; }
.marquee--fx span em { color: var(--ink); }
.no-fx .marquee--fx .marquee__track { animation: marquee 32s linear infinite; }

/* ------------------------------------------------------------ shop home */
.shop-home { background: #fff; color: var(--on-light); padding-block: clamp(3.5rem, 7vw, 6rem) clamp(4.5rem, 9vw, 7.5rem); scroll-margin-top: 70px; }
.shop-home__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.shop-home__head .shop-count { margin: 0; }
.chips { display: flex; gap: 0.55rem; overflow-x: auto; padding-bottom: 0.3rem; margin-bottom: 1.2rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line-light); background: #fff; color: var(--on-light);
  border-radius: 999px; padding: 0.6rem 1.15rem; font-size: 0.82rem; font-weight: 500; cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }

.page-fx .product-grid > * { animation: cardIn 0.8s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(0.98); } }

/* tilt + glare (product and website cards) */
.page-fx .product-card, .page-fx .work__media {
  --rx: 0deg; --ry: 0deg; --px: 50%; --py: 50%;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--ease-out), box-shadow 0.4s var(--ease);
  transform-style: preserve-3d;
}
.page-fx .product-card.is-tilting, .page-fx .work__media.is-tilting { transition: transform 0.08s linear, box-shadow 0.4s var(--ease); }
.page-fx .product-card:hover { box-shadow: 0 30px 60px rgba(10, 10, 11, 0.16); }
.page-fx .product-card__media::after, .page-fx .work__media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s var(--ease);
  background: radial-gradient(circle at var(--px) var(--py), rgba(255, 255, 255, 0.35), transparent 55%);
}
.page-fx .is-tilting .product-card__media::after, .page-fx .work__media.is-tilting::after { opacity: 1; }

/* ------------------------------------------------------------ websites */
.wx { background: var(--ink); color: #fff; padding-block: clamp(5rem, 10vw, 8.5rem); scroll-margin-top: 40px; }
.wx__head { display: grid; gap: 1.2rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 22ch; }
.wx__head .h2 { color: #fff; }
.wx__head .lede { color: var(--on-dark-dim); max-width: 40ch; }
.wx .work__card .work__name { color: #fff; margin-top: 1.3rem; }
.wx .work__card .work__tag { color: var(--pink); }
.wx .work__card .work__desc { color: var(--on-dark-dim); }
.wx .work__open { color: #fff; }
.wx .work__open:hover { color: var(--pink); }
.wx .work__media img { aspect-ratio: 16 / 11; }
.wx__cta { margin-top: clamp(3rem, 6vw, 4.5rem); display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* --------------------------------------------------------------- footer */
.site-footer--mini { padding-block: 2rem; }
.mini-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; }
.mini-footer__mail { font-size: 0.88rem; color: rgba(255, 255, 255, 0.74); transition: color 0.3s var(--ease); }
.mini-footer__mail:hover { color: var(--pink); }
@media (max-width: 640px) { .mini-footer { flex-direction: column; text-align: center; } }

/* ------------------------------------------------------------- cursor */
.cursor { display: none; }
.has-cursor .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor label, .has-cursor [role='button'] { cursor: none; }
.has-cursor input, .has-cursor textarea, .has-cursor select { cursor: auto; }
.cursor__dot, .cursor__ring { position: absolute; left: 0; top: 0; border-radius: 999px; will-change: transform; }
.cursor__dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--pink); }
.cursor__ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1.5px solid rgba(255, 59, 92, 0.75);
  display: grid; place-items: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), margin 0.35s var(--ease-out), background 0.3s var(--ease), border-color 0.3s var(--ease), opacity 0.3s;
}
.cursor__label { font: 600 0.62rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: #fff; opacity: 0; transition: opacity 0.2s; }
.cursor.is-link .cursor__ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: rgba(255, 59, 92, 0.14); }
.cursor.has-label .cursor__ring { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: var(--pink); border-color: var(--pink); }
.cursor.has-label .cursor__label { opacity: 1; }
.cursor.has-label .cursor__dot, .cursor.is-text .cursor__dot { opacity: 0; }
.cursor.is-text .cursor__ring { opacity: 0; }
.cursor.is-hidden { opacity: 0; }

[data-magnetic] { transition: transform 0.45s var(--ease-out), box-shadow 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .hx__card, .hx__title { transform: none !important; animation: none !important; }
  .page-fx .product-grid > * { animation: none; }
}

.wx .work__tag, .wx .work__desc { display: none; }
.wx__head { max-width: 860px; }
@media (max-width: 940px) {
  .filters { visibility: hidden; transition: transform 0.3s var(--ease-out), visibility 0s linear 0.3s; }
  .filters.is-open { visibility: visible; transition: transform 0.3s var(--ease-out); }
}
