/* ==========================================================================
   4BIT DIGITAL STUDIO — components.css
   Reusable UI: glass, buttons, brand mark, nav, cursor, cards, forms
   ========================================================================== */

/* ==========================================================================
   AMBIENT BACKGROUND
   ========================================================================== */
.bg-layers {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--void);
}

/* faint technical grid — a nod to the pixel logo */
.bg-grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 78%);
}

.bg-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .5;
  will-change: transform;
}
.bg-aurora--1 {
  width: 46vw; height: 46vw; min-width: 380px; min-height: 380px;
  top: -14vw; left: -8vw;
  background: radial-gradient(circle, rgba(245,69,58,.5), transparent 68%);
  animation: drift1 26s var(--e-in-out) infinite alternate;
}
.bg-aurora--2 {
  width: 40vw; height: 40vw; min-width: 320px; min-height: 320px;
  top: 22vh; right: -10vw;
  background: radial-gradient(circle, rgba(234,42,128,.44), transparent 68%);
  animation: drift2 32s var(--e-in-out) infinite alternate;
}
.bg-aurora--3 {
  width: 52vw; height: 34vw; min-width: 340px;
  bottom: -12vw; left: 24vw;
  background: radial-gradient(circle, rgba(120,40,190,.3), transparent 70%);
  animation: drift3 38s var(--e-in-out) infinite alternate;
}

.bg-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%,  transparent 40%, rgba(0,0,0,.55) 100%),
    radial-gradient(ellipse 100% 60% at 50% 100%, transparent 45%, rgba(0,0,0,.7) 100%);
}

.bg-noise {
  position: absolute; inset: -200%;
  opacity: .038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}

/* ==========================================================================
   LIQUID GLASS
   ========================================================================== */
.glass {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(165%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(165%);
  border-radius: var(--r-lg);
  box-shadow: var(--glass-shadow);
  isolation: isolate;
}

/* refracted hairline edge — brighter where light would catch */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    150deg,
    rgba(255,255,255,.34) 0%,
    rgba(255,255,255,.06) 26%,
    rgba(255,255,255,.02) 52%,
    rgba(238,46,92,.28) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

/* slow travelling specular sheen */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.055) 47%, transparent 56%);
  background-size: 260% 100%;
  background-position: 160% 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .5s;
}
.glass:hover::after { opacity: 1; animation: sheen 1.1s var(--e-out); }

.glass--panel { border-radius: var(--r-xl); }

/* ==========================================================================
   BRAND MARK — the four bits
   ========================================================================== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex-shrink: 0;
}

.brand__mark {
  position: relative;
  width: 28px;
  aspect-ratio: 1;
  flex-shrink: 0;
}
.brand__mark i,
.preloader__mark .pl-bit,
.process__mark i {
  position: absolute;
  width: 33.333%;
  height: 33.333%;
  left: calc(var(--bx) * 33.333%);
  top:  calc(var(--by) * 33.333%);
  /* the gradient is sized to the full 3x3 grid so every square carries
     the correct slice of the brand ramp, exactly like the logo file */
  background-image: var(--brand-grad);
  background-size: 300% 300%;
  background-position: calc(var(--bx) * 50%) calc(var(--by) * 50%);
}

.brand__mark i {
  transition: transform .5s var(--e-spring), filter .4s;
}
.brand:hover .brand__mark i { filter: drop-shadow(0 0 8px rgba(238,46,92,.9)); }
.brand:hover .brand__mark i:nth-child(1) { transform: translate(-14%, -14%); }
.brand:hover .brand__mark i:nth-child(2) { transform: translate(14%, -14%); }
.brand:hover .brand__mark i:nth-child(3) { transform: scale(1.18); }
.brand:hover .brand__mark i:nth-child(4) { transform: translate(14%, 14%); }

.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text b {
  font-family: var(--f-display);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.brand--lg .brand__mark { width: 44px; }
.brand--lg .brand__text b { font-size: 1.6rem; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  --btn-py: .82rem;
  --btn-px: 1.5rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: var(--btn-py) var(--btn-px);
  border-radius: var(--r-pill);
  font-family: var(--f-display);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow var(--d-fast) var(--e-out), color var(--d-fast), background-color var(--d-fast);
}
.btn__label { position: relative; z-index: 2; }
.btn__icon {
  position: relative;
  z-index: 2;
  width: 1.05em; height: 1.05em;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--d-fast) var(--e-out);
}
.btn:hover .btn__icon { transform: translate(3px, -3px); }

.btn--sm { --btn-py: .6rem; --btn-px: 1.15rem; font-size: var(--t-xs); }
.btn--lg { --btn-py: 1.05rem; --btn-px: 2.1rem; font-size: var(--t-base); }
.btn--block { display: flex; width: 100%; }

/* primary — brand gradient with a liquid highlight that swells on hover */
.btn--primary {
  background: var(--brand-grad);
  background-size: 200% 200%;
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,.3) inset,
    0 8px 26px -10px rgba(238,46,92,.85);
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.42), transparent 55%);
  opacity: 0;
  transition: opacity var(--d-mid) var(--e-out);
}
.btn--primary:hover {
  box-shadow:
    0 1px 0 rgba(255,255,255,.45) inset,
    0 14px 40px -10px rgba(238,46,92,1);
}
.btn--primary:hover::before { opacity: 1; }

/* ghost — glass pill */
.btn--ghost {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 0 0 1px var(--glass-brd) inset, 0 1px 0 rgba(255,255,255,.08) inset;
  color: var(--text);
}
.btn--ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--brand-grad);
  opacity: 0;
  transition: opacity var(--d-mid) var(--e-out);
}
.btn--ghost:hover {
  color: #fff;
  box-shadow: 0 0 0 1px transparent inset, 0 12px 34px -12px rgba(238,46,92,.8);
}
.btn--ghost:hover::before { opacity: 1; }

.btn:disabled, .btn[aria-busy="true"] { opacity: .55; pointer-events: none; }

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  padding: .85rem var(--pad-x) 0;
  transition: transform .5s var(--e-out);
}
.header.is-hidden { transform: translateY(-135%); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: var(--container);
  margin-inline: auto;
  padding: .55rem .55rem .55rem 1.1rem;
  border-radius: var(--r-pill);
  transition: background-color var(--d-mid), box-shadow var(--d-mid), padding var(--d-mid) var(--e-out);
}
.glass--nav {
  background: rgba(8, 11, 18, .5);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
}
.header.is-scrolled .header__inner {
  background: rgba(8, 11, 18, .82);
  box-shadow:
    0 1px 0 rgba(255,255,255,.06) inset,
    0 18px 44px -22px rgba(0,0,0,.95);
}

.nav { margin-inline: auto; }
.nav__list { display: flex; align-items: center; gap: .2rem; }

.nav__link {
  position: relative;
  display: block;
  padding: .55rem .95rem;
  border-radius: var(--r-pill);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--text-soft);
  transition: color var(--d-fast);
}
.nav__link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 1px rgba(255,255,255,.07) inset;
  opacity: 0;
  transform: scale(.86);
  transition: opacity var(--d-fast) var(--e-out), transform var(--d-fast) var(--e-spring);
}
.nav__link span { position: relative; }
.nav__link:hover { color: var(--text); }
.nav__link:hover::before { opacity: 1; transform: scale(1); }

.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 14px; height: 2px;
  translate: -50% 0;
  border-radius: 2px;
  background: var(--brand-grad);
  box-shadow: 0 0 10px rgba(238,46,92,.9);
}

.header__actions { display: flex; align-items: center; gap: .5rem; }

@media (max-width: 1000px) {
  .nav { display: none; }
  .header__actions { margin-left: auto; }
}
@media (max-width: 560px) {
  .header__actions .btn--primary { display: none; }
}

/* burger */
.burger {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  box-shadow: 0 0 0 1px var(--glass-brd) inset;
}
.burger span {
  position: absolute;
  left: 50%; translate: -50% 0;
  width: 17px; height: 1.8px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .4s var(--e-out), opacity .25s;
}
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 24px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

@media (max-width: 1000px) { .burger { display: block; } }

/* ==========================================================================
   MOBILE MENU
   ========================================================================== */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  align-items: start;
  padding: calc(var(--header-h) + 1.2rem) var(--pad-x) var(--pad-x);
  background: rgba(3, 5, 9, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--e-out), visibility .4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }

.mobile-menu__panel {
  padding: 1.4rem;
  border-radius: var(--r-xl);
  /* the menu carries the product shelves as well as the pages now, so on a
     short screen it scrolls rather than running off the bottom */
  max-height: calc(100svh - var(--header-h) - 2.4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(-14px) scale(.98);
  opacity: 0;
  transition: transform .5s var(--e-out), opacity .4s;
}
.mobile-menu.is-open .mobile-menu__panel { transform: none; opacity: 1; }

.mobile-menu__list li + li { border-top: 1px solid rgba(255,255,255,.06); }
.mobile-menu__list a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem .4rem;
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 6vw, 2rem);
  font-weight: 600;
  letter-spacing: -.03em;
  transition: color var(--d-fast), padding-left var(--d-fast) var(--e-out);
}
.mobile-menu__list a:hover { color: var(--brand-2); padding-left: 1.1rem; }
.mm-idx {
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .2em;
  color: var(--text-dim);
}

.mobile-menu__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.06);
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--text-soft);
}

/* ==========================================================================
   SCROLL PROGRESS
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
  pointer-events: none;
}
.scroll-progress i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--brand-grad);
  box-shadow: 0 0 14px rgba(238,46,92,.9);
}

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */
.cursor {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: none;
}
html.has-cursor .cursor { display: block; }
html.has-cursor,
html.has-cursor a,
html.has-cursor button,
html.has-cursor [data-tilt] { cursor: none; }

/* Position comes from the `translate` property (set in main.js) so the press
   state below can use `scale` without moving the ring — see initCursor(). */
.cursor__dot,
.cursor__ring {
  position: absolute;
  top: 0; left: 0;
  border-radius: 50%;
  will-change: translate, scale;
}
.cursor__dot {
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--brand-2);
  box-shadow: 0 0 12px rgba(238,46,92,1);
  transition: opacity .2s, width .25s var(--e-out), height .25s var(--e-out);
}
.cursor__ring {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(255,255,255,.45);
  transition: width .35s var(--e-spring), height .35s var(--e-spring),
              margin .35s var(--e-spring), background-color .3s, border-color .3s,
              scale .2s var(--e-out);
}
.cursor__label {
  font-family: var(--f-mono);
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: #fff;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .25s, transform .3s var(--e-spring);
}

/* hover state over links / buttons */
html.cursor-hover .cursor__ring {
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-color: transparent;
  background: rgba(238,46,92,.22);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
html.cursor-hover .cursor__dot { opacity: 0; }

/* labelled state (e.g. "VIEW") */
html.cursor-label .cursor__ring {
  width: 82px; height: 82px; margin: -41px 0 0 -41px;
  border-color: transparent;
  background: var(--brand-grad);
  box-shadow: 0 10px 40px -10px rgba(238,46,92,.9);
}
html.cursor-label .cursor__label { opacity: 1; transform: none; }
html.cursor-label .cursor__dot { opacity: 0; }

html.cursor-down .cursor__ring { scale: .82; }

@media (hover: none), (pointer: coarse) {
  html.has-cursor .cursor { display: none; }
  html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: auto; }
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--void);
  transition: opacity .7s var(--e-out), visibility .7s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }

.preloader__inner { display: grid; justify-items: center; gap: 1.6rem; width: min(240px, 62vw); }

.preloader__mark {
  position: relative;
  width: 66px;
  aspect-ratio: 1;
}
.preloader__mark .pl-bit {
  opacity: 0;
  transform: scale(.2);
  animation: bitIn .7s var(--e-spring) forwards;
}
.preloader__mark .pl-bit:nth-child(1) { animation-delay: .05s; }
.preloader__mark .pl-bit:nth-child(2) { animation-delay: .17s; }
.preloader__mark .pl-bit:nth-child(3) { animation-delay: .29s; }
.preloader__mark .pl-bit:nth-child(4) { animation-delay: .41s; }

.preloader__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: .24em;
  color: var(--text-mute);
}
.preloader__count { color: var(--text); font-weight: 700; }

.preloader__bar {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.preloader__bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--brand-grad);
  box-shadow: 0 0 12px rgba(238,46,92,.9);
  transition: width .25s var(--e-out);
}

/* ==========================================================================
   CARDS (services + generic)
   ========================================================================== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 2.4vw, 2.2rem);
  border-radius: var(--r-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  isolation: isolate;
  transform-style: preserve-3d;
  transition: box-shadow var(--d-mid) var(--e-out), background-color var(--d-mid);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(255,255,255,.3), rgba(255,255,255,.03) 34%, rgba(255,255,255,0) 62%, rgba(238,46,92,.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 4;
  transition: opacity var(--d-mid);
}

/* pointer-tracked spotlight */
.card__glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    rgba(238,46,92,.20),
    rgba(245,69,58,.09) 32%,
    transparent 62%
  );
  opacity: 0;
  transition: opacity var(--d-mid) var(--e-out);
  pointer-events: none;
  z-index: 1;
}
.card:hover .card__glow { opacity: 1; }
.card:hover {
  background: var(--glass-bg-2);
  box-shadow:
    0 1px 0 0 rgba(255,255,255,.1) inset,
    0 30px 70px -24px rgba(0,0,0,.95),
    0 0 60px -28px rgba(238,46,92,.75);
}

.card__body { position: relative; z-index: 2; display: flex; flex-direction: column; gap: .85rem; height: 100%; }

.card__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: .35rem;
  border-radius: 15px;
  background: rgba(255,255,255,.045);
  box-shadow: 0 0 0 1px rgba(255,255,255,.09) inset, 0 1px 0 rgba(255,255,255,.12) inset;
  transition: background-color var(--d-mid), box-shadow var(--d-mid), transform var(--d-mid) var(--e-spring);
}
.card__icon svg {
  width: 24px; height: 24px;
  fill: none; stroke: url(#gradBrand);
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--d-mid) var(--e-spring);
}
.card:hover .card__icon {
  background: rgba(238,46,92,.14);
  box-shadow: 0 0 0 1px rgba(238,46,92,.4) inset, 0 8px 26px -10px rgba(238,46,92,.8);
  transform: translateZ(28px);
}
.card:hover .card__icon svg { transform: scale(1.1) rotate(-4deg); }

.card__title {
  font-size: var(--t-lg);
  letter-spacing: -.035em;
  transform: translateZ(0);
  transition: transform var(--d-mid) var(--e-out);
}
.card:hover .card__title { transform: translateZ(22px); }

.card__text { color: var(--text-soft); font-size: var(--t-sm); line-height: 1.68; }

.card__num {
  position: absolute;
  top: clamp(1.2rem, 2vw, 1.7rem);
  right: clamp(1.2rem, 2vw, 1.7rem);
  z-index: 2;
  font-family: var(--f-mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--text-dim);
  transition: color var(--d-mid);
}
.card:hover .card__num { color: var(--brand-2); }

/* ==========================================================================
   CHIPS
   ========================================================================== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: auto;
  padding-top: .9rem;
}
.chips li {
  padding: .3rem .68rem;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.045);
  box-shadow: 0 0 0 1px rgba(255,255,255,.07) inset;
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .07em;
  color: var(--text-mute);
  transition: color var(--d-fast), background-color var(--d-fast), box-shadow var(--d-fast);
}
.card:hover .chips li { color: var(--text-soft); box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset; }

/* ==========================================================================
   FILTERS
   ========================================================================== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
}
.filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .6rem 1.15rem;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  box-shadow: 0 0 0 1px var(--glass-brd) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--text-soft);
  overflow: hidden;
  isolation: isolate;
  transition: color var(--d-fast), box-shadow var(--d-fast);
}
.filter span {
  font-family: var(--f-mono);
  font-size: .58rem;
  letter-spacing: .1em;
  color: var(--text-dim);
  transition: color var(--d-fast);
}
.filter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--brand-grad);
  opacity: 0;
  transition: opacity var(--d-fast) var(--e-out);
}
.filter:hover { color: var(--text); }
.filter.is-active { color: #fff; box-shadow: 0 8px 26px -12px rgba(238,46,92,.9); }
.filter.is-active::before { opacity: 1; }
.filter.is-active span { color: rgba(255,255,255,.7); }

/* ==========================================================================
   SOCIALS
   ========================================================================== */
.socials { display: flex; flex-wrap: wrap; gap: .5rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  background: var(--glass-bg);
  box-shadow: 0 0 0 1px var(--glass-brd) inset;
  color: var(--text-soft);
  overflow: hidden;
  isolation: isolate;
  transition: color var(--d-fast), transform var(--d-fast) var(--e-spring), box-shadow var(--d-fast);
}
.socials a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--brand-grad);
  opacity: 0;
  transition: opacity var(--d-fast);
}
.socials a svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.socials a:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px transparent inset, 0 12px 26px -12px rgba(238,46,92,.9);
}
.socials a:hover::before { opacity: 1; }
.socials a { position: relative; }

.socials--sm a { width: 34px; height: 34px; border-radius: 10px; }
.socials--sm a svg { width: 15px; height: 15px; }

/* ==========================================================================
   FORM
   ========================================================================== */
.form { display: grid; gap: 1.5rem; align-content: start; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field { position: relative; }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 1.5rem .95rem .6rem;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: rgba(255,255,255,.028);
  box-shadow: 0 0 0 1px rgba(255,255,255,.07) inset;
  color: var(--text);
  font-size: var(--t-sm);
  transition: background-color var(--d-fast), box-shadow var(--d-fast);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-mute) 50%),
                    linear-gradient(135deg, var(--text-mute) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 4px), calc(100% - 15px) calc(50% + 4px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.field select option { background: var(--ink-1); color: var(--text); }

/* direct child only — the checkbox <label>s inside .pickers must not be
   caught by this, or they all stack on the same absolute coordinates */
.field > label {
  position: absolute;
  left: .95rem;
  top: 1.05rem;
  font-size: var(--t-sm);
  color: var(--text-mute);
  pointer-events: none;
  transform-origin: 0 0;
  transition: transform .28s var(--e-out), color .28s;
}
.field > label em { font-style: normal; color: var(--text-dim); }

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label {
  transform: translateY(-.72rem) scale(.76);
  color: var(--text-soft);
}
/* select has no :placeholder-shown — drive it from a JS-set class */
/* a <select> always renders its selected option, so its label can never sit
   over the control as a placeholder — keep it floated at all times */
.field--select > label { transform: translateY(-.72rem) scale(.76); }
.field--select.has-value > label { color: var(--text-soft); }

.field__line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}
.field__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-grad);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .45s var(--e-out);
}
.field input:focus ~ .field__line::after,
.field textarea:focus ~ .field__line::after,
.field select:focus ~ .field__line::after { transform: scaleX(1); }

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset;
}

/* taken out of flow so .field__line stays flush against the control
   instead of being pushed down by the error slot */
.field__error {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: .3rem;
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .05em;
  color: #FF6B7E;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--d-fast), transform var(--d-fast);
}
.field.is-invalid .field__error { opacity: 1; transform: none; }
.field.is-invalid input,
.field.is-invalid textarea { box-shadow: 0 0 0 1px rgba(255,107,126,.5) inset; }
.field.is-invalid .field__line { background: rgba(255,107,126,.4); }

/* checkbox pickers */
.field--chips { border: none; }
.field--chips legend {
  padding: 0 0 .7rem;
  font-size: var(--t-sm);
  color: var(--text-mute);
}
.pickers { display: flex; flex-wrap: wrap; gap: .5rem; }
.picker { position: relative; cursor: pointer; }
.picker input { position: absolute; opacity: 0; width: 0; height: 0; }
.picker span {
  display: block;
  padding: .5rem 1rem;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.03);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
  font-size: var(--t-xs);
  font-weight: 500;
  color: var(--text-soft);
  transition: all var(--d-fast) var(--e-out);
}
.picker:hover span { color: var(--text); box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset; }
.picker input:checked + span {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(238,46,92,.9);
}
.picker input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: 3px; }

.form__status {
  min-height: 1.4em;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: .05em;
  text-align: center;
}
.form__status.is-ok { color: #34D399; }
.form__status.is-err { color: #FF6B7E; }

/* ==========================================================================
   IMAGE VIEWER
   Shared by the case study gallery and the product gallery. Driven by
   initProject() in main.js: any .shot__open button on the page feeds it.
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,4,8,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn .3s var(--e-out);
}
@keyframes fadeIn { from { opacity: 0; } }

.lightbox__stage {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1rem;
  justify-items: center;
  max-width: min(1200px, 100%);
  animation: lbIn .4s var(--e-out);
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(.96) translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 76svh;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 50px 110px -40px rgba(0,0,0,1);
}
.lightbox__stage figcaption {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: .08em;
  color: var(--text-soft);
  text-align: center;
  max-width: 60ch;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset;
  color: var(--text-soft);
  transition: color var(--d-fast), background var(--d-fast), transform var(--d-fast) var(--e-out);
}
.lightbox__close:hover,
.lightbox__nav:hover { color: #fff; background: var(--brand-2); }
.lightbox__close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.lightbox__close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.lightbox__nav { top: 50%; translate: 0 -50%; }
.lightbox__nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__nav--prev { left: clamp(.6rem, 2.5vw, 2rem); }
.lightbox__nav--prev svg { rotate: 180deg; }
.lightbox__nav--next { right: clamp(.6rem, 2.5vw, 2rem); }
.lightbox__nav--prev:hover { transform: translateX(-3px); }
.lightbox__nav--next:hover { transform: translateX(3px); }
.lightbox__nav[hidden] { display: none; }

.lightbox__count {
  position: absolute;
  left: 50%; bottom: clamp(.8rem, 2.5vw, 1.6rem);
  translate: -50% 0;
  z-index: 3;
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .22em;
  color: var(--text-mute);
}

@media (prefers-reduced-motion: reduce) {
  .lightbox__stage, .lightbox__backdrop { animation: none; }
}

/* ==========================================================================
   LIST CONTROLS
   The filter-as-you-type box, the layout switch and the "nothing matches"
   line. Shared by the team directory and the product shelf.
   ========================================================================== */
.dsearch { position: relative; flex: 1 1 250px; min-width: 200px; }
.dsearch__icon {
  position: absolute;
  left: 1rem; top: 50%;
  translate: 0 -50%;
  width: 16px; height: 16px;
  fill: none; stroke: var(--text-mute);
  stroke-width: 1.8; stroke-linecap: round;
  pointer-events: none;
}
.dsearch input {
  width: 100%;
  padding: .82rem 2.7rem .82rem 2.8rem;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  box-shadow: 0 0 0 1px var(--glass-brd) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: var(--t-sm);
  color: var(--text);
  transition: box-shadow var(--d-fast);
}
.dsearch input::placeholder { color: var(--text-dim); }
.dsearch input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.dsearch input:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--brand-2) inset, 0 0 0 4px rgba(var(--brand-rgb, 238 46 92), .14);
}
.dsearch__clear {
  position: absolute;
  right: .55rem; top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: var(--text-mute);
  transition: color var(--d-fast), background-color var(--d-fast);
}
.dsearch__clear:hover { color: var(--text); background: rgba(255,255,255,.07); }
.dsearch__clear[hidden] { display: none; }
.dsearch__clear svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.viewswitch {
  display: inline-flex;
  gap: .25rem;
  margin-left: auto;
  padding: .28rem;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  box-shadow: 0 0 0 1px var(--glass-brd) inset;
}
.viewswitch__btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem 1rem;
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-mute);
  transition: color var(--d-fast), background var(--d-fast), box-shadow var(--d-fast);
}
.viewswitch__btn:hover { color: var(--text-soft); }
.viewswitch__btn.is-active {
  color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 8px 22px -12px rgba(var(--brand-rgb, 238 46 92), .9);
}
.viewswitch__ico { display: grid; gap: 2px; }
.viewswitch__ico--grid { grid-template-columns: repeat(2, 5px); }
.viewswitch__ico--grid i { width: 5px; height: 5px; border-radius: 1.5px; background: currentColor; }
.viewswitch__ico--rows { width: 13px; }
.viewswitch__ico--rows i { height: 2px; border-radius: 1px; background: currentColor; }

.directory__empty {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  color: var(--text-mute);
}
.directory__empty[hidden] { display: none; }
.directory__empty .link { font: inherit; cursor: pointer; }

@media (max-width: 620px) {
  .viewswitch { margin-left: 0; }
  .viewswitch__btn > span:not(.viewswitch__ico) { display: none; }
  .viewswitch__btn { padding: .55rem .85rem; }
}


/* ==========================================================================
   GENERATED PRODUCT ARTWORK
   A digital product rarely has a photograph, and a shelf of grey rectangles
   looks broken rather than empty — so when a record has no cover image we
   draw one from its category: a browser window, a handset, a poster, an
   isometric cube, a component sheet, a waveform, a deck of cards.
   Six colourways, sampled from the same family as the portfolio plates.
   ========================================================================== */
.plate {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  background:
    radial-gradient(120% 100% at 20% 0%, var(--a1) 0%, transparent 55%),
    radial-gradient(90% 90% at 90% 100%, var(--a2) 0%, transparent 60%),
    linear-gradient(150deg, var(--a3), var(--ink-0));
  box-shadow: 0 0 0 1px rgba(255,255,255,.07) inset;
  isolation: isolate;
}

.plate[data-art="1"] { --a1: rgba(245,69,58,.85);  --a2: rgba(234,42,128,.7);  --a3: rgba(90,30,140,.6); }
.plate[data-art="2"] { --a1: rgba(40,90,200,.7);   --a2: rgba(234,42,128,.65); --a3: rgba(20,25,45,.9); }
.plate[data-art="3"] { --a1: rgba(255,120,40,.75); --a2: rgba(238,46,92,.8);   --a3: rgba(60,20,30,.9); }
.plate[data-art="4"] { --a1: rgba(200,200,215,.5); --a2: rgba(238,46,92,.6);   --a3: rgba(30,35,55,.95); }
.plate[data-art="5"] { --a1: rgba(40,190,160,.55); --a2: rgba(234,42,128,.6);  --a3: rgba(25,30,50,.9); }
.plate[data-art="6"] { --a1: rgba(150,60,220,.65); --a2: rgba(245,69,58,.65);  --a3: rgba(20,22,40,.9); }

.plate--sm { aspect-ratio: 16 / 10; border-radius: var(--r-sm); }
.plate--lg { aspect-ratio: 5 / 4; border-radius: var(--r-lg); }

.plate img { width: 100%; height: 100%; object-fit: cover; }
.plate--img { background: var(--ink-1); }

/* a soft moving highlight, so the tiles are not dead flat */
.plate__glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.22), transparent 45%);
  opacity: .5;
  mix-blend-mode: overlay;
  transition: opacity var(--d-mid) var(--e-out), transform 1.4s var(--e-out);
}
.plate__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(80% 80% at 50% 40%, #000 20%, transparent 90%);
  -webkit-mask-image: radial-gradient(80% 80% at 50% 40%, #000 20%, transparent 90%);
}

/* ---- shared inner furniture --------------------------------------------- */
.plate__win,
.plate__device,
.plate__kit,
.plate__deck,
.plate__cube,
.plate__shapes,
.plate__wave {
  position: absolute;
  z-index: 2;
  transition: transform .7s var(--e-out);
}

.plate__screen i,
.plate__kit i,
.plate__tabs i,
.plate__deck i,
.plate__lines i {
  display: block;
  background: rgba(255,255,255,.24);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255,255,255,.16) inset;
}

/* ---- browser window (website themes) ------------------------------------ */
.plate--browser .plate__win {
  inset: 14% 10% -14% 10%;
  border-radius: 10px 10px 0 0;
  background: rgba(10,14,24,.72);
  box-shadow: 0 0 0 1px rgba(255,255,255,.13) inset, 0 30px 60px -30px rgba(0,0,0,.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
}
.plate__chrome {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  background: rgba(255,255,255,.06);
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
.plate__chrome i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
}
.plate__chrome i:first-child { background: var(--brand-1); }
.plate__url {
  flex: 1;
  height: 8px;
  margin-left: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,.11);
}
.plate--browser .plate__screen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 12px;
}
.plate--browser .plate__screen i:nth-child(1) { grid-column: 1 / -1; height: 34px; background: rgba(255,255,255,.32); }
.plate--browser .plate__screen i:nth-child(2) { height: 30px; }
.plate--browser .plate__screen i:nth-child(3) { height: 30px; }
.plate--browser .plate__screen i:nth-child(4) { height: 30px; }
.plate--browser .plate__screen i:nth-child(5) { grid-column: 1 / -1; height: 10px; width: 60%; }

/* ---- handset (apps) ------------------------------------------------------ */
.plate--phone .plate__device {
  top: 12%; bottom: -12%;
  left: 50%;
  translate: -50% 0;
  width: 40%;
  min-width: 92px;
  border-radius: 18px 18px 0 0;
  background: rgba(8,11,20,.8);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.16) inset, 0 30px 60px -28px rgba(0,0,0,.95);
  overflow: hidden;
}
.plate__notch {
  display: block;
  width: 34%;
  height: 6px;
  margin: 7px auto 0;
  border-radius: 99px;
  background: rgba(255,255,255,.22);
}
.plate--phone .plate__screen {
  display: grid;
  gap: 6px;
  padding: 10px;
}
.plate--phone .plate__screen i:nth-child(1) { height: 40px; background: rgba(255,255,255,.34); }
.plate--phone .plate__screen i:nth-child(2) { height: 12px; }
.plate--phone .plate__screen i:nth-child(3) { height: 12px; width: 70%; }
.plate--phone .plate__screen i:nth-child(4) { height: 24px; background: var(--brand-grad); }
.plate__tabs {
  display: flex;
  justify-content: space-around;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255,255,255,.05);
}
.plate__tabs i { width: 12%; height: 5px; border-radius: 99px; }
.plate__tabs i:first-child { background: var(--brand-2); }

/* ---- poster (graphics) --------------------------------------------------- */
.plate--poster .plate__shapes { inset: 16% 14% 26% 14%; }
.plate__shapes i {
  position: absolute;
  display: block;
  mix-blend-mode: screen;
}
.plate__shapes i:nth-child(1) {
  left: 0; top: 8%;
  width: 46%; aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brand-grad);
  opacity: .92;
}
.plate__shapes i:nth-child(2) {
  right: 4%; top: 0;
  width: 42%; aspect-ratio: 1;
  background: rgba(255,255,255,.16);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.4) inset;
  rotate: 12deg;
}
.plate__shapes i:nth-child(3) {
  left: 26%; bottom: 0;
  width: 0; height: 0;
  border-left: 34px solid transparent;
  border-right: 34px solid transparent;
  border-bottom: 58px solid rgba(255,255,255,.26);
}
.plate--poster .plate__lines {
  position: absolute;
  z-index: 2;
  left: 14%; right: 14%; bottom: 12%;
  display: grid;
  gap: 5px;
}
.plate__lines i:nth-child(1) { height: 7px; width: 70%; background: rgba(255,255,255,.5); }
.plate__lines i:nth-child(2) { height: 5px; width: 45%; }
.plate__lines i:nth-child(3) { height: 5px; width: 58%; }

/* ---- isometric cube (3D) ------------------------------------------------- */
.plate--cube .plate__cube {
  left: 50%; top: 46%;
  width: 42%;
  aspect-ratio: 1;
  translate: -50% -50%;
  transform-style: preserve-3d;
}
.plate__cube i {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(255,255,255,.55);
  background: linear-gradient(140deg, rgba(255,255,255,.1), transparent);
}
.plate__cube i:nth-child(1) { transform: rotateX(60deg) rotateZ(45deg) translateZ(28px); border-color: rgba(255,255,255,.75); }
.plate__cube i:nth-child(2) { transform: rotateX(60deg) rotateZ(45deg) translateZ(-2px); opacity: .55; }
.plate__cube i:nth-child(3) {
  transform: rotateX(60deg) rotateZ(45deg) translateZ(14px);
  border-style: dashed;
  border-color: rgba(255,255,255,.4);
  background: none;
}
.plate__floor {
  position: absolute;
  left: 50%; bottom: 16%;
  translate: -50% 0;
  width: 60%; height: 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.28), transparent 75%);
  filter: blur(3px);
}

/* ---- component sheet (UI kits) ------------------------------------------- */
.plate--grid .plate__kit {
  inset: 18% 14%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 9px;
}
.plate__kit i { border-radius: 6px; background: rgba(255,255,255,.14); box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset; }
.plate__kit i:nth-child(1) { background: var(--brand-grad); box-shadow: none; }
.plate__kit i:nth-child(2) { border-radius: 99px; }
.plate__kit i:nth-child(4) { border-radius: 50%; }
.plate__kit i:nth-child(5) { grid-column: span 2; border-radius: 99px; }

/* ---- waveform (motion) --------------------------------------------------- */
.plate--wave .plate__wave {
  inset: 26% 12%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}
.plate__wave i {
  flex: 1;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.25));
  opacity: .55;
  height: 40%;
}
/* A fixed profile rather than a generated one: the same waveform on every
   card, on every browser, with no trigonometry and no script. */
.plate__wave i:nth-child(1)  { height: 26%; }
.plate__wave i:nth-child(2)  { height: 44%; }
.plate__wave i:nth-child(3)  { height: 68%; }
.plate__wave i:nth-child(4)  { height: 52%; }
.plate__wave i:nth-child(5)  { height: 84%; }
.plate__wave i:nth-child(6)  { height: 38%; }
.plate__wave i:nth-child(7)  { height: 62%; }
.plate__wave i:nth-child(8)  { height: 96%; }
.plate__wave i:nth-child(9)  { height: 54%; }
.plate__wave i:nth-child(10) { height: 72%; }
.plate__wave i:nth-child(11) { height: 34%; }
.plate__wave i:nth-child(12) { height: 88%; }
.plate__wave i:nth-child(13) { height: 58%; }
.plate__wave i:nth-child(14) { height: 30%; }
.plate__wave i:nth-child(15) { height: 66%; }
.plate__wave i:nth-child(16) { height: 46%; }
.plate__wave i:nth-child(17) { height: 76%; }
.plate__wave i:nth-child(18) { height: 28%; }
.plate__wave i:nth-child(3n) { background: var(--brand-grad); opacity: .95; }
.plate__head {
  position: absolute;
  z-index: 3;
  left: 38%; top: 18%; bottom: 18%;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 12px rgba(255,255,255,.9);
}

/* ---- deck (bundles) ------------------------------------------------------ */
.plate--stack .plate__deck {
  inset: 20% 20%;
}
.plate__deck i {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(12,16,28,.85);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.2) inset, 0 20px 40px -22px rgba(0,0,0,.9);
  transition: transform .6s var(--e-out);
}
.plate__deck i:nth-child(1) { transform: translate(-14%, -14%) rotate(-7deg); }
.plate__deck i:nth-child(2) { transform: translate(0, 0) rotate(2deg); background: rgba(20,24,40,.9); }
.plate__deck i:nth-child(3) { transform: translate(14%, 14%) rotate(9deg); background: var(--brand-grad); }


/* ==========================================================================
   PRODUCTS MEGA MENU
   Drops out of the Products link in the header: a rail of shelves, every
   product with its one-line pitch, and a preview card that follows the
   pointer. It opens on hover in pure CSS — products.js only adds click,
   keyboard and touch control, the shelf filtering and the preview swap — so
   the menu is not something that can fail to load.

   Three things can open it: hovering the item, focusing anything inside it,
   or the .is-open class the script adds. That is why the same trio of
   selectors is repeated for each part of the panel — every piece animates in
   on its own delay, and all three routes have to drive all of them.
   ========================================================================== */
.nav__item--mega { display: flex; align-items: center; gap: .05rem; }

.nav__caret {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  margin-left: -.35rem;
  border-radius: 50%;
  color: var(--text-mute);
  transition: color var(--d-fast), background-color var(--d-fast);
}
.nav__caret svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: rotate var(--d-mid) var(--e-spring);
}
.nav__caret:hover { color: var(--text); background: rgba(255,255,255,.06); }

/* ---- the panel ----------------------------------------------------------- */
.mega {
  /* The header pill is the nearest positioned ancestor, and an absolute box
     resolves against its padding box — which is the pill's full width. So
     the panel lines up with the pill exactly, at any viewport. */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  margin-top: .95rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(.986);
  transform-origin: 50% 0;
  pointer-events: none;
  /* leaving: a beat of grace before it goes, so a pointer that clips the
     edge of the link on its way past does not slam the panel shut */
  transition:
    opacity .3s var(--e-out) .16s,
    transform .44s var(--e-out) .16s,
    visibility 0s linear .46s;
}

/* The delay on the way in is deliberate hover intent: sweeping across the nav
   on the way to Journal should not fire the panel. */
.nav__item--mega:hover .mega,
.nav__item--mega:focus-within .mega,
.mega.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition:
    opacity .34s var(--e-out) .09s,
    transform .5s var(--e-out) .09s,
    visibility 0s linear .09s;
}

/* Escape closes it even while the pointer is still resting on the link. */
.nav__item--mega.is-shut .mega {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(.986);
  pointer-events: none;
  transition-delay: 0s;
}

/* Bridges the gap between the header pill and the panel, so a pointer
   travelling down does not cross dead space and close it. */
.mega::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -1.2rem;
  height: 1.3rem;
}

.nav__item--mega:hover .nav__caret svg,
.nav__item--mega:focus-within .nav__caret svg,
.nav__caret[aria-expanded="true"] svg { rotate: 180deg; }

.nav__item--mega:hover .nav__link,
.nav__item--mega:focus-within .nav__link { color: var(--text); }
.nav__item--mega:hover .nav__link::before,
.nav__item--mega:focus-within .nav__link::before { opacity: 1; transform: scale(1); }

.mega__panel {
  overflow: hidden;
  max-height: calc(100svh - var(--header-h) - 2.5rem);
  background: rgba(9, 12, 20, .88);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
}

.mega__grid {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr) 288px;
}

/* ---- the rail ------------------------------------------------------------ */
.mega__rail {
  position: relative;
  display: grid;
  align-content: start;
  gap: 1px;
  padding: 1rem .8rem;
  border-right: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.018);
}

/* one lit tile that slides to whichever shelf is active */
.mega__glow {
  position: absolute;
  left: .6rem; right: .6rem; top: 1rem;
  height: var(--glow-h, 42px);
  border-radius: 12px;
  background: var(--brand-grad-soft);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb, 238 46 92), .28) inset;
  transform: translateY(var(--glow-y, 0px));
  transition: transform .42s var(--e-spring), height .3s var(--e-out);
  pointer-events: none;
}

.mega__tab {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .65rem;
  padding: .62rem .7rem;
  border-radius: 12px;
  text-align: left;
  color: var(--text-mute);
  opacity: 0;
  transform: translateX(-10px);
  transition: color var(--d-fast), opacity .34s var(--e-out), transform .44s var(--e-out);
}
.nav__item--mega:hover .mega__tab,
.nav__item--mega:focus-within .mega__tab,
.mega.is-open .mega__tab {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--t, 0) * 26ms + 90ms);
}
.mega__tab:nth-of-type(1) { --t: 0; }
.mega__tab:nth-of-type(2) { --t: 1; }
.mega__tab:nth-of-type(3) { --t: 2; }
.mega__tab:nth-of-type(4) { --t: 3; }
.mega__tab:nth-of-type(5) { --t: 4; }
.mega__tab:nth-of-type(6) { --t: 5; }
.mega__tab:nth-of-type(7) { --t: 6; }
.mega__tab:nth-of-type(n+8) { --t: 7; }

.mega__tab:hover,
.mega__tab.is-active { color: var(--text); }

.mega__tab-ico {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 1px rgba(255,255,255,.07) inset;
  color: var(--text-mute);
  transition: color var(--d-fast), background var(--d-fast);
}
.mega__tab-ico svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mega__tab:hover .mega__tab-ico,
.mega__tab.is-active .mega__tab-ico { color: var(--brand-2); background: rgba(var(--brand-rgb, 238 46 92), .16); }

.mega__tab-label { font-size: var(--t-sm); font-weight: 500; letter-spacing: -.01em; }
.mega__tab-num {
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: .1em;
  color: var(--text-dim);
}
.mega__tab.is-active .mega__tab-num { color: var(--brand-2); }

.mega__rail-cta {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .5rem;
  padding: .62rem .7rem;
  border-top: 1px solid rgba(255,255,255,.07);
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-mute);
  opacity: 0;
  transition: color var(--d-fast), opacity .34s var(--e-out);
}
.nav__item--mega:hover .mega__rail-cta,
.nav__item--mega:focus-within .mega__rail-cta,
.mega.is-open .mega__rail-cta { opacity: 1; transition-delay: .3s; }
.mega__rail-cta:hover { color: var(--brand-2); }
.mega__rail-cta svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--d-fast) var(--e-out); }
.mega__rail-cta:hover svg { transform: translate(2px, -2px); }

/* ---- the list ------------------------------------------------------------ */
.mega__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 2px;
  padding: .8rem;
  /* fits fourteen products without a scrollbar; more than that scrolls */
  max-height: 440px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.mitem {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  padding: .5rem .6rem;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(12px);
  transition:
    background var(--d-fast),
    box-shadow var(--d-fast),
    opacity .34s var(--e-out),
    transform .46s var(--e-out);
}
/* staggered on the way in only — a staggered close just feels slow */
.nav__item--mega:hover .mitem,
.nav__item--mega:focus-within .mitem,
.mega.is-open .mitem {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 15ms + 100ms);
}

.mitem:hover,
.mitem:focus-visible,
.mitem.is-on {
  background: rgba(255,255,255,.045);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
}
.mitem.is-off { display: none; }

/* re-entry when a shelf is picked, so the column does not simply snap */
.mitem.is-in { animation: mitemIn .38s var(--e-out) backwards; animation-delay: calc(var(--n, 0) * 22ms); }
@keyframes mitemIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.mitem__art { display: block; }
.mitem__art .plate { aspect-ratio: 46 / 34; border-radius: 8px; }
.mitem__art .plate__grid { display: none; }

.mitem__text { display: grid; gap: .1rem; min-width: 0; }
.mitem__text b {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--f-display);
  font-size: .87rem;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--d-fast);
}
.mitem:hover .mitem__text b,
.mitem.is-on .mitem__text b { color: var(--text); }
.mitem__text em {
  font-style: normal;
  font-size: .72rem;
  line-height: 1.4;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mitem__badge {
  flex-shrink: 0;
  padding: .1em .4em;
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: .52rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}
.mitem__badge--new  { background: rgba(33,208,122,.9); }
.mitem__badge--hot  { background: var(--brand-grad); }
.mitem__badge--up   { background: rgba(99,102,241,.9); }
.mitem__badge--free { background: rgba(233,196,106,.92); color: #241a05; }

.mitem__price {
  font-family: var(--f-mono);
  font-size: .72rem;
  color: var(--text-mute);
  transition: color var(--d-fast);
}
.mitem:hover .mitem__price,
.mitem.is-on .mitem__price { color: var(--brand-2); }

.mega__none {
  grid-column: 1 / -1;
  padding: 2rem .6rem;
  text-align: center;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--text-dim);
}
.mega__none[hidden] { display: none; }

/* ---- the preview --------------------------------------------------------- */
.mega__card {
  padding: .8rem .8rem .8rem 0;
  opacity: 0;
  transform: translateX(14px);
  transition: opacity .4s var(--e-out), transform .52s var(--e-out);
}
.nav__item--mega:hover .mega__card,
.nav__item--mega:focus-within .mega__card,
.mega.is-open .mega__card { opacity: 1; transform: none; transition-delay: .14s; }

.mega__card-link {
  display: grid;
  align-content: start;
  gap: .55rem;
  height: 100%;
  padding: .8rem;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.03);
  box-shadow: 0 0 0 1px rgba(255,255,255,.07) inset;
  transition: box-shadow var(--d-fast), background var(--d-fast);
}
.mega__card-link:hover {
  background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb, 238 46 92), .45) inset;
}

/* the crossfade when the pointer moves to another product */
.mega__card-art,
.mega__card-body { transition: opacity .18s var(--e-out), transform .28s var(--e-out); }
.mega__card.is-swapping .mega__card-art,
.mega__card.is-swapping .mega__card-body { opacity: 0; transform: translateY(6px); }

.mega__card-art { display: block; }
.mega__card-art .plate { aspect-ratio: 16 / 10; border-radius: 10px; }

.mega__card-body { display: grid; gap: .35rem; }
.mega__card-kind {
  font-family: var(--f-mono);
  font-size: .58rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand-2);
}
.mega__card-title {
  font-family: var(--f-display);
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.25;
  color: var(--text);
}
.mega__card-text { font-size: .76rem; line-height: 1.55; color: var(--text-mute); }

.mega__card-points { display: grid; gap: .3rem; margin-top: .15rem; }
.mega__card-points span {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .45rem;
  align-items: start;
  font-size: .72rem;
  line-height: 1.45;
  color: var(--text-soft);
}
.mega__card-points svg { width: 12px; height: 12px; margin-top: .18rem; fill: none; stroke: var(--brand-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.mega__card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .7rem;
  margin-top: .35rem;
  padding-top: .6rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.mega__card-price { display: flex; align-items: baseline; gap: .35rem; }
.mega__card-price s { font-size: .68rem; color: var(--text-dim); }
.mega__card-price b {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.03em;
}
.mega__card-go {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mute);
  transition: color var(--d-fast);
}
.mega__card-go svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--d-fast) var(--e-out); }
.mega__card-link:hover .mega__card-go { color: var(--brand-2); }
.mega__card-link:hover .mega__card-go svg { transform: translate(2px, -2px); }

/* ---- the strip ----------------------------------------------------------- */
.mega__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1.4rem;
  padding: .7rem 1.1rem;
  border-top: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.022);
  opacity: 0;
  transition: opacity .36s var(--e-out);
}
.nav__item--mega:hover .mega__foot,
.nav__item--mega:focus-within .mega__foot,
.mega.is-open .mega__foot { opacity: 1; transition-delay: .26s; }

.mega__foot a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .74rem;
  color: var(--text-mute);
  transition: color var(--d-fast);
}
.mega__foot a:hover { color: var(--text); }
.mega__foot svg { width: 14px; height: 14px; fill: none; stroke: var(--brand-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mega__foot-cta { margin-left: auto; }
.mega__foot-cta svg { stroke-width: 2.2; transition: transform var(--d-fast) var(--e-out); }
.mega__foot-cta:hover svg { transform: translate(2px, -2px); }

@media (max-width: 1120px) {
  .mega__grid { grid-template-columns: 200px minmax(0, 1fr) 250px; }
  .mega__list { grid-template-columns: 1fr; max-height: 330px; }
}
@media (max-width: 1000px) {
  .nav__caret, .mega { display: none; }
}

/* ---- the same shelves, on a phone ---------------------------------------- */
.mm-count {
  margin-left: .5rem;
  padding: .1em .45em;
  border-radius: 5px;
  background: rgba(var(--brand-rgb, 238 46 92), .16);
  font-family: var(--f-mono);
  font-size: .6rem;
  font-style: normal;
  color: var(--brand-2);
}
.mm-shelves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .3rem;
  padding: 0 0 .9rem;
}
.mm-shelves a {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .65rem;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
  font-size: .78rem;
  color: var(--text-mute);
}
.mm-shelves a:hover { color: var(--text); }
.mm-shelves svg { width: 14px; height: 14px; fill: none; stroke: var(--brand-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mm-shelves span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-shelves em { margin-left: auto; font-family: var(--f-mono); font-size: .62rem; font-style: normal; color: var(--text-dim); }

@media (prefers-reduced-motion: reduce) {
  .mega,
  .mega__tab,
  .mega__card,
  .mega__foot,
  .mega__rail-cta,
  .mitem { transition-duration: .01ms; transition-delay: 0s; transform: none; }
  .nav__item--mega:hover .mega,
  .nav__item--mega:focus-within .mega,
  .mega.is-open { transform: none; }
  .mega__glow { transition: none; }
  .mitem.is-in { animation: none; }
  .nav__caret svg { transition: none; }
}
