/* Portfolio atlas — filterable catalogue of shipped products and projects.
   Uses the page's brand tokens (Plus Jakarta, --blue, ink navy family). */

.atlas {
  --atlas-ink: #e8eef7;
  --atlas-muted: rgba(232, 238, 247, 0.58);
  --atlas-faint: rgba(232, 238, 247, 0.34);
  --atlas-line: rgba(255, 255, 255, 0.1);
  --atlas-line-2: rgba(255, 255, 255, 0.18);
  --atlas-panel: #0c121c;
  --atlas-deep: #070b12;
  --atlas-film: #121a26;
  --atlas-blue: var(--blue, #726cf4);
  --atlas-blue-soft: rgba(114, 108, 244, 0.28);
  --atlas-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --atlas-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --atlas-gutter: max(24px, calc((100vw - min(1180px, 100% - 48px)) / 2));

  position: relative;
  display: block;
  width: 100%;
  clear: both;
  /* No z-index: creates overlapping stack contexts with the hero. */
  z-index: auto;
  isolation: auto;
  /* Solid opaque band — masonry wall MUST never show through */
  background: #0a0f16;
  color: var(--atlas-ink);
  padding: clamp(48px, 6vw, 72px) 0 clamp(48px, 6vw, 72px);
  overflow: visible;
}

/* Depth lives on pseudo-elements: portfolio-page.css pins the section's own
   background to an opaque colour so the hero wall can never bleed through. */
.atlas::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 42% at 12% 0%, rgba(114, 108, 244, 0.16), transparent 68%),
    radial-gradient(46% 38% at 92% 8%, rgba(96, 76, 224, 0.12), transparent 70%),
    radial-gradient(70% 50% at 50% 108%, rgba(114, 108, 244, 0.1), transparent 72%);
}

.atlas::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--atlas-line-2) 18%, var(--atlas-line-2) 82%, transparent);
}

.atlas__inner {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

/* ----- head -----
   Must be a <div>, not <header>: style.css pins every `header` fixed +
   white-header turn glass/cream, which bleeds white over this dark stage. */
.atlas__head {
  display: grid;
  gap: clamp(18px, 2.2vw, 28px);
  margin-bottom: clamp(24px, 3vw, 38px);
  /* Defensive: never inherit site chrome fixed positioning/background */
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  z-index: auto !important;
  transform: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}

/* ----- running head + display title ----- */
.atlas__kicker {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 18px);
  margin: 0;
  font-family: var(--atlas-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--atlas-faint);
}

.atlas__kicker-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--atlas-line-2), rgba(255, 255, 255, 0.02));
}

.atlas__masthead {
  display: grid;
  gap: clamp(10px, 1.2vw, 15px);
  max-width: 68ch;
}

.atlas__display {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2.3rem, 4.6vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
  color: #fff;
}

.atlas__display em {
  font-style: normal;
  background: linear-gradient(160deg, #cfccff 6%, #7b74f5 92%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.atlas__lede {
  margin: 0;
  max-width: 60ch;
  color: var(--atlas-muted);
  font-size: clamp(14.5px, 1.02vw, 16px);
  line-height: 1.7;
}

/* ----- segment switcher: two unmistakable panels ----- */
.atlas__main-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 18px);
}

.atlas-tab-btn {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.4vw, 18px);
  width: 100%;
  min-height: 94px;
  margin: 0;
  padding: clamp(16px, 1.8vw, 22px);
  border-radius: 20px;
  border: 1px solid var(--atlas-line-2);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02) 58%),
    rgba(10, 15, 24, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--atlas-muted);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 380ms var(--atlas-ease), border-color 380ms ease, box-shadow 380ms var(--atlas-ease),
    background 380ms ease;
}

.atlas-tab-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(120% 90% at 84% 0%, rgba(255, 255, 255, 0.18), transparent 62%);
  transition: opacity 380ms var(--atlas-ease);
}

.atlas-tab-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  border: 1px solid var(--atlas-line-2);
  background: rgba(255, 255, 255, 0.07);
  color: #cfcbff;
  transition: transform 420ms var(--atlas-ease), background 380ms ease, border-color 380ms ease,
    color 380ms ease;
}

.atlas-tab-btn__icon svg {
  width: 25px;
  height: 25px;
}

.atlas-tab-btn__text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.atlas-tab-btn__label {
  font-size: clamp(1.12rem, 1.9vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--atlas-ink);
}

.atlas-tab-btn__hint {
  font-family: var(--atlas-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--atlas-faint);
  transition: color 380ms ease;
}

.atlas-tab-btn__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 44px;
  margin-left: auto;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--atlas-line-2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--atlas-ink);
  font-family: var(--atlas-mono);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background 380ms ease, color 380ms ease, border-color 380ms ease;
}

.atlas-tab-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(114, 108, 244, 0.5);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.atlas-tab-btn:hover .atlas-tab-btn__icon {
  transform: translateY(-2px) scale(1.04);
  background: rgba(114, 108, 244, 0.18);
  border-color: rgba(114, 108, 244, 0.44);
  color: #fff;
}

.atlas-tab-btn:hover .atlas-tab-btn__hint {
  color: var(--atlas-muted);
}

.atlas-tab-btn:focus-visible {
  outline: 2px solid #b9b5ff;
  outline-offset: 3px;
}

.atlas-tab-btn.is-active {
  transform: none;
  background: linear-gradient(135deg, #7d77f7 0%, var(--atlas-blue) 44%, #4f47c9 100%);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 22px 48px rgba(114, 108, 244, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.atlas-tab-btn.is-active::after {
  opacity: 1;
}

.atlas-tab-btn.is-active .atlas-tab-btn__icon {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
}

.atlas-tab-btn.is-active .atlas-tab-btn__label {
  color: #fff;
}

.atlas-tab-btn.is-active .atlas-tab-btn__hint {
  color: rgba(255, 255, 255, 0.82);
}

.atlas-tab-btn.is-active .atlas-tab-btn__count {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
}

/* ----- control bar: a panel of its own, impossible to miss ----- */
.atlas__controls {
  display: grid;
  gap: clamp(14px, 1.6vw, 18px);
  padding: clamp(15px, 1.8vw, 20px);
  margin: 0 0 clamp(22px, 2.6vw, 32px);
  border-radius: 22px;
  border: 1px solid var(--atlas-line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015) 60%),
    rgba(9, 14, 22, 0.66);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.atlas__controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px clamp(16px, 2vw, 26px);
  flex-wrap: wrap;
}

.atlas__search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 320px;
  max-width: 460px;
  min-width: 0;
}

.atlas__search .search-icon {
  position: absolute;
  left: 16px;
  display: inline-flex;
  width: 17px;
  height: 17px;
  color: var(--atlas-faint);
  pointer-events: none;
  transition: color 240ms ease;
}

.atlas__search .search-icon svg {
  width: 100%;
  height: 100%;
}

.atlas__search input[type="search"] {
  width: 100%;
  height: 48px;
  padding: 0 44px;
  border-radius: 14px;
  border: 1px solid var(--atlas-line-2);
  background: rgba(5, 9, 15, 0.62);
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  outline: none;
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.atlas__search input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.atlas__search input[type="search"]::placeholder {
  color: rgba(232, 238, 247, 0.44);
}

.atlas__search input[type="search"]:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.atlas__search input[type="search"]:focus {
  background: rgba(9, 14, 22, 0.82);
  border-color: rgba(114, 108, 244, 0.85);
  box-shadow: 0 0 0 4px rgba(114, 108, 244, 0.18), 0 12px 28px rgba(0, 0, 0, 0.36);
}

.atlas__search:focus-within .search-icon {
  color: #c3bfff;
}

.atlas__search-clear {
  position: absolute;
  right: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--atlas-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--atlas-ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 200ms ease, transform 240ms var(--atlas-ease), border-color 200ms ease;
}

.atlas__search-clear:hover {
  background: rgba(114, 108, 244, 0.24);
  border-color: rgba(114, 108, 244, 0.5);
  transform: rotate(90deg);
}

.atlas__search-clear:focus-visible {
  outline: 2px solid #b9b5ff;
  outline-offset: 2px;
}

.atlas__tally {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(114, 108, 244, 0.4);
  background: linear-gradient(135deg, rgba(114, 108, 244, 0.24), rgba(114, 108, 244, 0.1));
  box-shadow: 0 0 22px rgba(114, 108, 244, 0.16);
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #cfcbff;
  white-space: nowrap;
}

.atlas__tally b {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.atlas__tally::after {
  content: " shown";
}

.atlas__tally-total {
  color: rgba(232, 238, 247, 0.6);
}

/* ----- vertical filter chips ----- */
.atlas__filter-block {
  display: grid;
  gap: 10px;
  padding-top: clamp(12px, 1.4vw, 16px);
  border-top: 1px solid var(--atlas-line);
}

.atlas__filter-label {
  margin: 0;
  font-family: var(--atlas-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--atlas-faint);
}

/* One line, always: the row swipes rather than wraps. `is-scrollable` is stamped by
   JS when the chips genuinely overrun, so the fade hint only appears then. */
.atlas__filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  min-width: 0;
  padding: 3px 0 5px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.atlas__filters::-webkit-scrollbar {
  display: none;
}

.atlas__filters.is-scrollable {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent);
}

/* Never fade the chip the keyboard just landed on. */
.atlas__filters.is-scrollable:focus-within {
  -webkit-mask-image: none;
  mask-image: none;
}

.atlas__filters button {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 12px;
  margin: 0;
  border: 1px solid var(--atlas-line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: #dfe6f2;
  -webkit-text-fill-color: currentColor;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 240ms var(--atlas-ease), background 240ms ease, border-color 240ms ease,
    box-shadow 240ms ease, color 240ms ease;
}

.atlas__filters button .filter-name {
  order: 1;
}

.atlas__filters button:hover {
  color: #fff;
  border-color: rgba(114, 108, 244, 0.55);
  background: rgba(114, 108, 244, 0.16);
  transform: translateY(-2px);
}

.atlas__filters button.is-active {
  background: linear-gradient(135deg, #7d77f7, #5b53d8);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
  box-shadow: 0 6px 18px rgba(114, 108, 244, 0.42);
}

.atlas__filters button.is-barren:not(.is-active) {
  opacity: 0.5;
}

.atlas__filters button .filter-count {
  order: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  margin-left: 7px;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--atlas-mono);
  font-size: 9.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.atlas__filters button.is-active .filter-count {
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
}

/* The way out of a filter: the pressed chip grows a dismiss glyph, so clicking it
   again reads as "clear this" rather than a dead re-select. */
.atlas__filters button .filter-x {
  order: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  margin-left: 0;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  overflow: hidden;
  transition: width 220ms var(--atlas-ease), margin 220ms var(--atlas-ease), opacity 200ms ease;
}

.atlas__filters button.is-active .filter-x {
  width: 13px;
  margin-left: 7px;
  opacity: 0.85;
}

.atlas__filters button.is-active:hover .filter-x {
  opacity: 1;
}

.atlas__filters button:focus-visible {
  outline: 2px solid #b9b5ff;
  outline-offset: 2px;
}

/* ----- catalogue list -----
   One shipment per row. Kept `.pf-grid` / `.pf-card` class names so filter +
   modal JS keep working without a rewrite. */
.pf-grid,
.pf-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pf-card {
  /* The hover lift travels through a custom property so the entrance-reveal rule
     below (higher specificity) can own `transform` without cancelling hover. */
  --pf-lift: none;
  --pf-thumb: clamp(168px, 22vw, 248px);
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 148px;
  border-radius: 16px;
  border: 1px solid var(--atlas-line);
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.012) 42%),
    var(--atlas-panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transform: var(--pf-lift);
  transition: transform 420ms var(--atlas-ease), border-color 300ms ease,
    box-shadow 420ms var(--atlas-ease), background 300ms ease;
}

/* Legacy bento size classes are inert in list mode (JS may still stamp them). */
.pf-card--hero,
.pf-card--tall,
.pf-card--wide,
.pf-card--third,
.pf-card--band,
.pf-card--solo {
  grid-column: auto;
  grid-row: auto;
  flex-direction: row;
}

.pf-card.is-out {
  display: none;
}

.pf-card__media {
  position: relative;
  flex: 0 0 var(--pf-thumb);
  width: var(--pf-thumb);
  align-self: stretch;
  min-height: 148px;
  background: var(--atlas-deep);
  overflow: hidden;
}

.pf-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 11, 18, 0) 55%, rgba(7, 11, 18, 0.35) 100%),
    linear-gradient(180deg, rgba(7, 11, 18, 0) 48%, rgba(7, 11, 18, 0.5) 100%);
  opacity: 0.7;
  transition: opacity 420ms ease;
}

.pf-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scale(1.01);
  filter: saturate(0.92) brightness(0.92);
  transition: transform 820ms var(--atlas-ease), filter 420ms ease;
}

.pf-card__code {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 10, 16, 0.66);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(232, 238, 247, 0.88);
  font-family: var(--atlas-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.pf-card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  padding: 18px clamp(16px, 2vw, 26px) 18px clamp(18px, 2.2vw, 28px);
  min-width: 0;
}

.pf-card__vertical {
  margin: 0;
  font-family: var(--atlas-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a9a4ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-card__title {
  margin: 0;
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.22;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pf-card__client {
  margin: 0;
  font-family: var(--atlas-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--atlas-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* List rows always show a short brief — no hover-gated reveal. */
.pf-card__desc {
  margin: 2px 0 0;
  max-height: 4.8em;
  opacity: 1;
  font-size: 13px;
  line-height: 1.55;
  color: var(--atlas-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pf-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pf-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-height: 48px;
  overflow: hidden;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(114, 108, 244, 0.13);
  border: 1px solid rgba(114, 108, 244, 0.26);
  color: #c6c2ff;
  font-family: var(--atlas-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pf-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #bcb8ff;
  opacity: 0.72;
  transform: none;
  transition: opacity 320ms ease, transform 360ms var(--atlas-ease), color 240ms ease;
}

.pf-card__arrow {
  display: inline-block;
  transition: transform 360ms var(--atlas-ease);
}

/* One focusable control per row, stretched over the whole panel. */
.pf-card__hit {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}

.pf-card__hit:focus-visible {
  outline: 2px solid #b9b5ff;
  outline-offset: -3px;
}

.pf-card:hover,
.pf-card:focus-within {
  --pf-lift: translateY(-3px);
  border-color: rgba(114, 108, 244, 0.48);
  background: linear-gradient(105deg, rgba(114, 108, 244, 0.1) 0%, rgba(255, 255, 255, 0.03) 48%),
    var(--atlas-panel);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(114, 108, 244, 0.14);
}

.pf-card:hover .pf-card__media img,
.pf-card:focus-within .pf-card__media img {
  transform: scale(1.05);
  filter: saturate(1.04) brightness(1.02);
}

.pf-card:hover .pf-card__media::after,
.pf-card:focus-within .pf-card__media::after {
  opacity: 0.4;
}

.pf-card:hover .pf-card__cta,
.pf-card:focus-within .pf-card__cta {
  opacity: 1;
  color: #fff;
}

.pf-card:hover .pf-card__arrow,
.pf-card:focus-within .pf-card__arrow {
  transform: translateX(4px);
}

/* Staggered entrance, armed by JS so no-JS visitors still see every row. */
.pf-grid--anim .pf-card:not(.is-in) {
  opacity: 0;
}

.pf-grid--anim .pf-card.is-in {
  animation: pfCardIn 560ms var(--atlas-ease) var(--pf-delay, 0ms) backwards;
}

@keyframes pfCardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ----- empty state ----- */
.atlas__empty {
  display: none;
  padding: clamp(38px, 6vw, 62px) 28px;
  margin: 0 0 4px;
  text-align: center;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: radial-gradient(70% 90% at 50% 0%, rgba(114, 108, 244, 0.13), transparent 70%),
    rgba(255, 255, 255, 0.02);
}

.atlas.is-empty .atlas__empty {
  display: block;
  animation: atlasFade 420ms var(--atlas-ease) both;
}

.atlas__empty-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid rgba(114, 108, 244, 0.42);
  background: rgba(114, 108, 244, 0.14);
  color: #bcb8ff;
  font-size: 18px;
}

.atlas__empty-kicker {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  text-wrap: balance;
}

.atlas__empty-copy {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--atlas-muted);
  text-wrap: pretty;
}

.atlas__empty-copy a {
  color: #bcb8ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.atlas__empty-copy a:hover {
  color: #fff;
}

.atlas__empty-reset {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 20px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid var(--atlas-line-2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--atlas-ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease, transform 220ms var(--atlas-ease);
}

.atlas__empty-reset:hover {
  background: rgba(114, 108, 244, 0.2);
  border-color: rgba(114, 108, 244, 0.55);
  transform: translateY(-2px);
}

.atlas__empty-reset:focus-visible {
  outline: 2px solid #b9b5ff;
  outline-offset: 2px;
}

@keyframes atlasFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ----- shared pill button ----- */
.pf-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7d77f7, #5b53d8);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(114, 108, 244, 0.36);
  transition: transform 260ms var(--atlas-ease), box-shadow 260ms ease, background 260ms ease;
}

.pf-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(114, 108, 244, 0.48);
}

.pf-btn:focus-visible {
  outline: 2px solid #b9b5ff;
  outline-offset: 3px;
}

.pf-btn span {
  transition: transform 260ms var(--atlas-ease);
}

.pf-btn:hover span {
  transform: translateX(4px);
}

body.pf-scroll-lock {
  overflow: hidden !important;
}

/* ----- quick-view modal ----- */
.atlas-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  background: rgba(5, 8, 13, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.atlas-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.atlas-modal-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  width: 100%;
  max-width: 1000px;
  max-height: min(88vh, 720px);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #101827, #0a0f18);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.72);
  overflow: hidden;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  transition: transform 420ms var(--atlas-ease), opacity 320ms ease;
}

.atlas-modal-backdrop.is-open .atlas-modal-dialog {
  transform: none;
  opacity: 1;
}

.atlas-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(10, 15, 24, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: background 220ms ease, transform 320ms var(--atlas-ease);
}

.atlas-modal__close:hover {
  background: rgba(114, 108, 244, 0.6);
  transform: rotate(90deg);
}

.atlas-modal__close:focus-visible {
  outline: 2px solid #b9b5ff;
  outline-offset: 2px;
}

.atlas-modal__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(114, 108, 244, 0.14), transparent 70%),
    var(--atlas-deep);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* contain, not cover: these are product screenshots — cropping loses the UI. */
.atlas-modal__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.atlas-modal__content {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  overflow-y: auto;
}

.atlas-modal__header {
  margin-bottom: 18px;
  padding-right: 46px;
}

.atlas-modal__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* The grid dropped its category badge (the segment tabs already say it), so the
   modal owns these chip styles now. */
.atlas-modal__meta .pf-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.atlas-modal__meta .pf-card__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pf-dot, #726cf4);
  box-shadow: 0 0 8px var(--pf-dot, #726cf4);
}

.atlas-modal__meta .pf-card__badge--product {
  --pf-dot: #8f8aff;
}

.atlas-modal__meta .pf-card__badge--project {
  --pf-dot: #4fd1c5;
}

.atlas-modal__header .pf-card__badge,
.atlas-modal__header .pf-card__code {
  position: static;
  top: auto;
  right: auto;
  left: auto;
  text-shadow: none;
  white-space: nowrap;
}

.atlas-modal__header .pf-card__code {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(232, 238, 247, 0.86);
}

.atlas-modal__title {
  margin: 14px 0 6px;
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #fff;
}

.atlas-modal__client {
  margin: 0 0 18px;
  font-family: var(--atlas-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 238, 247, 0.5);
}

.atlas-modal__desc {
  margin: 0 0 24px;
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(232, 238, 247, 0.76);
}

.atlas-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ----- demo request drawer ----- */
.demo-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(5, 8, 13, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: atlasFade 260ms ease both;
}

.demo-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100001;
  width: min(460px, 100vw);
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  background: linear-gradient(180deg, #101827, #0a0f18);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -30px 0 70px rgba(0, 0, 0, 0.7);
  overflow-y: auto;
  animation: drawerIn 320ms var(--atlas-ease);
}

@keyframes drawerIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.demo-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.demo-drawer__eyebrow {
  display: block;
  margin-bottom: 6px;
  font-family: var(--atlas-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #bcb8ff;
}

.demo-drawer__header h3 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.demo-drawer__close {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 28px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  transition: color 200ms ease;
}

.demo-drawer__close:hover {
  color: #fff;
}

.demo-drawer__close:focus-visible {
  outline: 2px solid #b9b5ff;
  outline-offset: 2px;
}

.demo-drawer__target {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(114, 108, 244, 0.12);
  border: 1px solid rgba(114, 108, 244, 0.26);
}

.demo-drawer__target .target-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.demo-drawer__target strong {
  color: #fff;
  font-size: 13px;
}

.demo-drawer__target .target-badge {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--atlas-blue);
  color: #fff;
  font-family: var(--atlas-mono);
  font-size: 10px;
  font-weight: 700;
}

.demo-drawer__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.demo-drawer__field label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.demo-drawer__field input,
.demo-drawer__field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--atlas-line-2);
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  outline: none;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.demo-drawer__field input:focus,
.demo-drawer__field textarea:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(114, 108, 244, 0.75);
  box-shadow: 0 0 0 4px rgba(114, 108, 244, 0.16);
}

.demo-drawer__status {
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
}

.demo-drawer__status.success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #34d399;
}

.demo-drawer__status.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.demo-drawer__submit {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #7d77f7, #5b53d8);
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(114, 108, 244, 0.4);
  cursor: pointer;
  transition: transform 220ms var(--atlas-ease), box-shadow 220ms ease;
}

.demo-drawer__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(114, 108, 244, 0.52);
}

.demo-drawer__submit:focus-visible {
  outline: 2px solid #b9b5ff;
  outline-offset: 3px;
}

/* ----- responsive ----- */
@media (max-width: 1100px) {
  .pf-card {
    --pf-thumb: clamp(150px, 24vw, 220px);
  }
}

@media (max-width: 1024px) {
  .atlas-modal-dialog {
    grid-template-columns: minmax(0, 1fr);
    max-height: 90vh;
  }

  .atlas-modal__media {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 300px;
  }
}

@media (max-width: 900px) {
  .pf-card {
    --pf-thumb: 148px;
    min-height: 0;
  }

  .pf-card__media {
    min-height: 132px;
  }

  .pf-card__body {
    padding: 16px 16px 16px 18px;
  }

  .pf-card__desc {
    -webkit-line-clamp: 2;
  }

  .atlas__controls-row {
    gap: 12px 16px;
  }

  .atlas__search {
    flex: 1 1 100%;
    max-width: none;
  }
}

@media (max-width: 767px) {
  .atlas {
    padding: 56px 0 52px;
  }

  .atlas__inner {
    width: calc(100% - 32px);
  }

  .atlas-tab-btn {
    min-height: 78px;
    gap: 12px;
    padding: 14px 15px;
  }

  .atlas-tab-btn__icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .atlas-tab-btn__icon svg {
    width: 22px;
    height: 22px;
  }

  .atlas-tab-btn__label {
    font-size: 1.05rem;
  }

  .atlas-tab-btn__hint {
    font-size: 8.5px;
    letter-spacing: 0.1em;
  }

  .atlas-tab-btn__count {
    min-width: 38px;
    padding: 5px 9px;
    font-size: 11.5px;
  }

  /* Compact stacked rows: image on top, copy below. */
  .pf-grid,
  .pf-list {
    gap: 14px;
  }

  .pf-card,
  .pf-card--hero,
  .pf-card--tall,
  .pf-card--wide,
  .pf-card--third,
  .pf-card--band,
  .pf-card--solo {
    flex-direction: column;
    --pf-thumb: auto;
    min-height: 0;
  }

  .pf-card__media {
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .pf-card__media::after {
    background: linear-gradient(180deg, rgba(7, 11, 18, 0) 48%, rgba(7, 11, 18, 0.55) 100%);
  }

  .pf-card__code {
    left: auto;
    right: 11px;
  }

  .pf-card__body {
    flex: 0 0 auto;
    padding: 15px 16px 16px;
  }

  .pf-card__title {
    font-size: 1.18rem;
  }

  .pf-card__foot {
    flex-wrap: wrap;
  }

  .atlas-modal__footer .pf-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Touch / narrow: keep brief + CTA visible without hover. */
@media (hover: none), (max-width: 767px) {
  .pf-card__desc {
    max-height: 5.2em;
    opacity: 1;
    -webkit-line-clamp: 3;
  }

  .pf-card__cta {
    opacity: 0.9;
    transform: none;
  }
}

@media (max-width: 640px) {
  .atlas__main-tabs {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .atlas__kicker span:last-of-type,
  .atlas__kicker .atlas__kicker-rule:last-of-type {
    display: none;
  }

  .atlas__display {
    font-size: clamp(2.2rem, 11.5vw, 2.9rem);
  }

  .atlas__controls {
    padding: 14px;
    border-radius: 18px;
  }

  .atlas__tally {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atlas *,
  .atlas-modal-backdrop,
  .atlas-modal-dialog,
  .demo-drawer,
  .demo-drawer-backdrop,
  .pf-btn {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }

  .atlas__filters button:hover,
  .atlas-tab-btn:hover,
  .pf-btn:hover,
  .atlas__empty-reset:hover,
  .demo-drawer__submit:hover {
    transform: none;
  }

  .atlas-tab-btn:hover .atlas-tab-btn__icon {
    transform: none;
  }

  .pf-card:hover,
  .pf-card:focus-within {
    --pf-lift: none;
  }

  .pf-card:hover .pf-card__media img,
  .pf-card:focus-within .pf-card__media img {
    transform: scale(1.01);
  }

  .pf-grid--anim .pf-card,
  .pf-grid--anim .pf-card:not(.is-in) {
    opacity: 1;
    animation: none;
  }
}
