/* DS Portfolio — front end. Everything is scoped to .dsp-* classes. */
.dsp-gallery, .dsp-featured, .dsp-dialog {
  --dsp-ink: #16143e; --dsp-violet: #6e00ff; --dsp-deep: #5200e0; --dsp-soft: #f8f6fc;
  --dsp-border: #e7e3f0; --dsp-muted: #5e597c; --dsp-tint: #efe9ff;
  font-family: Poppins, Helvetica, Arial, sans-serif; color: var(--dsp-ink); line-height: 1.5;
}
.dsp-gallery *, .dsp-featured *, .dsp-dialog * { box-sizing: border-box; }
.dsp-gallery [hidden], .dsp-dialog [hidden] { display: none !important; }
.dsp-gallery a, .dsp-featured, .dsp-dialog a { text-decoration: none; }
.dsp-gallery :is(button, a):focus-visible, .dsp-featured:focus-visible, .dsp-dialog :is(button, a, [tabindex]):focus-visible { outline: 3px solid var(--dsp-violet); outline-offset: 3px; }
.dsp-gallery button, .dsp-dialog button { font: inherit; cursor: pointer; }

/* ---------- Divi page helpers (hero / CTA built with native modules) ---------- */
.dsp-btns .et_pb_button_module_wrapper { display: inline-block; margin: 0 10px 10px 0 !important; }
.et_pb_module.dsp-pill { display: inline-block; width: auto; }
.dsp-proof .et_pb_text_inner { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.dsp-proof p { padding: 0 !important; position: relative; }
.dsp-proof p + p::before { content: ""; position: absolute; left: -12px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #8f73c9; }
.dsp-proof strong { color: #fff; font-weight: 700; font-size: 1.15em; }
.dsp-cta-row { display: flex; flex-wrap: wrap; align-items: center; }
.dsp-hero-col { text-align: center; }
.dsp-hero-col .et_pb_module { margin-left: auto !important; margin-right: auto !important; }
html { scroll-behavior: smooth; }
#dsp-projects { scroll-margin-top: 110px; }

/* ---------- Featured card (hero) ---------- */
.dsp-featured { display: block; position: relative; border-radius: 20px; border: 1px solid rgba(191,160,241,.42); background: linear-gradient(150deg,#3e2773,#251546); box-shadow: 0 24px 60px rgba(17,5,44,.45); color: #fff; overflow: hidden; transition: transform .25s ease, border-color .25s ease; }
.dsp-featured:hover { transform: translateY(-4px); border-color: #dfc5ff; }
.dsp-featured-screens { display: block; position: relative; aspect-ratio: 1.75; background: radial-gradient(ellipse at 72% 0%,#9573de,#4a2886 56%,#2b1851); overflow: hidden; }
.dsp-featured-desktop, .dsp-featured-phone, .dsp-card-desktop, .dsp-card-phone { display: block; position: absolute; overflow: hidden; border-style: solid; box-shadow: 0 10px 28px rgba(24,10,48,.28); }
.dsp-featured-desktop img, .dsp-featured-phone img, .dsp-card-desktop img, .dsp-card-phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; max-width: none; }
.dsp-featured-desktop { top: 10%; left: 6%; width: 76%; height: auto; aspect-ratio: 1440/850; border: 5px solid #e5d7fb; border-radius: 12px; transition: transform .4s ease; }
.dsp-featured-phone { top: 24%; right: 6%; width: 22%; height: 82%; border: 4px solid #2d1c47; border-radius: 14px; transition: transform .4s ease; }
.dsp-featured:hover .dsp-featured-desktop { transform: translateY(-6px); }
.dsp-featured:hover .dsp-featured-phone { transform: translateY(-12px); }
.dsp-featured-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; }
.dsp-featured-label small { display: block; color: #e3cdff; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; font-weight: 600; }
.dsp-featured-label strong { display: block; font-size: clamp(18px,2vw,24px); line-height: 1.2; font-weight: 700; }
.dsp-featured-label em { display: block; font-style: normal; font-size: 13.5px; color: #d9ccf2; margin-top: 2px; }
.dsp-arrow { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: #fff; color: var(--dsp-ink); font-size: 18px; transition: transform .2s ease; }
.dsp-featured:hover .dsp-arrow { transform: translate(2px,-2px) rotate(8deg); }

/* ---------- Filters ---------- */
.dsp-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.dsp-filter button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--dsp-border); background: #fff; color: var(--dsp-ink); border-radius: 50px; padding: 8px 13px; font-size: 13.5px; font-weight: 500; line-height: 1.2; transition: background .2s, border-color .2s, color .2s; }
.dsp-filter button span { font-size: 11.5px; font-weight: 600; background: var(--dsp-tint); color: var(--dsp-deep); border-radius: 20px; padding: 2px 7px; }
.dsp-filter button:hover { border-color: #d9ceff; background: var(--dsp-soft); }
.dsp-filter button[aria-pressed="true"] { background: var(--dsp-ink); border-color: var(--dsp-ink); color: #fff; }
.dsp-filter button[aria-pressed="true"] span { background: rgba(255,255,255,.16); color: #fff; }
/* Floating filter bar on the hero's bottom edge (project types). Platform dropdown sits quietly in the count row. */
.dsp-bar { position: relative; z-index: 3; width: fit-content; max-width: 100%; margin: -34px auto 0; display: flex; justify-content: center; padding: 8px; background: #fff; border: 1px solid var(--dsp-border); border-radius: 60px; box-shadow: 0 18px 50px rgba(22,20,62,.14); }
.dsp-bar .dsp-filter { justify-content: center; }
.dsp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 16px; }
.dsp-toolbar .dsp-count { margin: 0 !important; }
.dsp-filter button:disabled { opacity: .38; cursor: not-allowed; }
.dsp-filter-type button:not([aria-pressed="true"]) { border-color: transparent; }
.dsp-filter-type button:not([aria-pressed="true"]):hover { border-color: #d9ceff; }
.dsp-platform { position: relative; display: inline-flex; align-items: center; gap: 2px; margin: 0 0 0 auto; padding: 0 6px 0 14px; border: 1px solid var(--dsp-border); border-radius: 50px; background: var(--dsp-soft); cursor: pointer; }
.dsp-platform-label { font-size: 12.5px; font-weight: 500; color: var(--dsp-muted); white-space: nowrap; }
.dsp-platform-select { appearance: none; -webkit-appearance: none; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2316143e' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; field-sizing: content; padding: 8px 30px 8px 6px; font: 600 13.5px/1.2 Poppins, Helvetica, Arial, sans-serif; color: var(--dsp-ink); cursor: pointer; }
.dsp-platform-select:focus-visible { outline: 3px solid var(--dsp-violet); outline-offset: 2px; border-radius: 30px; }
.dsp-platform.is-set { background: var(--dsp-ink); border-color: var(--dsp-ink); }
.dsp-platform.is-set .dsp-platform-label { color: #cfc2ea; }
.dsp-platform.is-set .dsp-platform-select { color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.dsp-platform-select option { color: #16143e; background: #fff; }
.dsp-empty { margin: 8px 0 0 !important; padding: 28px !important; text-align: center; color: var(--dsp-muted); background: #fff; border: 1px dashed #d9ceff; border-radius: 16px; font-size: 15px; }
.dsp-reset { margin-left: 6px; border: 0; background: none; color: var(--dsp-deep); font-weight: 600; text-decoration: underline; padding: 0; }
.dsp-count { color: var(--dsp-muted); font-size: 13.5px; margin: 16px 0 14px !important; padding: 0 !important; }

/* ---------- Cards ---------- */
.dsp-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.dsp-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--dsp-border); border-radius: 16px; background: #fff; color: var(--dsp-ink); overflow: hidden; box-shadow: 0 2px 10px rgba(22,20,62,.04); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.dsp-card:hover, .dsp-card:focus-visible { transform: translateY(-5px); border-color: #c9b3ff; box-shadow: 0 18px 40px rgba(65,16,115,.14); }
.dsp-card.dsp-in { animation: dsp-in .38s ease both; }
@keyframes dsp-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.dsp-cover { display: block; position: relative; aspect-ratio: 1.6; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--cover) 12%, white), color-mix(in srgb, var(--cover) 30%, white)); }
.dsp-card-desktop { top: 13%; left: 7%; width: 78%; height: auto; aspect-ratio: 1440/850; border: 4px solid #fff; border-radius: 9px; transition: transform .45s ease; }
.dsp-card-phone { top: 30%; right: 7%; width: 21%; height: 74%; border: 3px solid #211836; border-radius: 10px; transition: transform .45s ease; }
.dsp-card:hover .dsp-card-desktop { transform: translateY(-5px); }
.dsp-card:hover .dsp-card-phone { transform: translateY(-11px); }
.dsp-cover-text { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--cover), #16143e); }
.dsp-cover-text strong { font-size: 22px; }
.dsp-cover-text small { font-size: 12px; opacity: .8; }
.dsp-result { position: absolute; left: 12px; top: 12px; z-index: 2; background: #16143e; color: #fff; font-size: 12px; font-weight: 600; border-radius: 30px; padding: 5px 11px; box-shadow: 0 6px 16px rgba(22,20,62,.25); }
.dsp-result::before { content: "\2197\00a0"; color: #b78cff; }
.dsp-card-copy { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 18px 20px 20px; }
.dsp-card-type { color: var(--dsp-deep); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.dsp-gallery h3.dsp-card-name { margin: 0; padding: 0; color: var(--dsp-ink); font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.dsp-card-hook { color: var(--dsp-muted); font-size: 14.5px; line-height: 1.55; }
.dsp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
/* Platform chips: brand tint + logo. Text shades are darkened so small text stays readable (WCAG AA). */
.dsp-chip, .dsp-meta-result { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; line-height: 1.2; color: #4b4669; background: var(--dsp-soft); border: 1px solid var(--dsp-border); border-radius: 20px; padding: 3px 9px; transition: background .2s; }
.dsp-chip svg, .dsp-filter-platform button svg { width: 12px; height: 12px; flex: none; fill: currentColor; }
.dsp-chip--wordpress { --b: #1e6a8d; }
.dsp-chip--woocommerce { --b: #7f54b3; }
.dsp-chip--shopify { --b: #4a7a2c; }
.dsp-chip--nextjs { --b: #000000; }
.dsp-chip[class*="dsp-chip--"] { color: var(--b); background: color-mix(in srgb, var(--b) 8%, white); border-color: color-mix(in srgb, var(--b) 30%, white); }
.dsp-card:hover .dsp-chip[class*="dsp-chip--"] { background: color-mix(in srgb, var(--b) 14%, white); }
.dsp-explore { margin-top: auto; padding-top: 10px; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; color: var(--dsp-deep); font-weight: 600; font-size: 14px; }
.dsp-explore span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--dsp-tint); transition: background .2s, color .2s, transform .2s; }
.dsp-card:hover .dsp-explore span { background: var(--dsp-violet); color: #fff; transform: rotate(8deg); }

/* ---------- Dialog ---------- */
html.dsp-lock { overflow: hidden; }
.dsp-dialog { width: min(980px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: 20px; background: #fff; box-shadow: 0 30px 90px rgba(23,9,50,.5); overflow: hidden; display: none; flex-direction: column; }
.dsp-dialog[open] { display: flex; animation: dsp-pop .28s ease; }
@keyframes dsp-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.dsp-dialog::backdrop { background: rgba(18,12,43,.72); backdrop-filter: blur(3px); }
.dsp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 26px 16px; border-bottom: 1px solid var(--dsp-border); }
.dsp-type { margin: 0 0 2px !important; padding: 0 !important; color: var(--dsp-deep); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.dsp-dialog h2 { margin: 0; padding: 0; color: var(--dsp-ink); font-size: clamp(22px,3vw,32px); font-weight: 700; line-height: 1.15; }
.dsp-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dsp-meta .dsp-meta-result { background: #16143e; color: #fff; border-color: #16143e; font-weight: 600; }
.dsp-close, .dsp-back { flex: none; background: #fff; color: var(--dsp-ink); border: 1px solid var(--dsp-border); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.dsp-close:hover, .dsp-back:hover { background: var(--dsp-soft); border-color: #d9ceff; }
.dsp-close span { font-size: 17px; }
.dsp-body { overflow: auto; overscroll-behavior: contain; padding: 18px 26px 6px; flex: 1; }
.dsp-devices { display: grid; grid-template-columns: 1.65fr 1fr .58fr; gap: clamp(10px,2.4vw,26px); align-items: end; padding: clamp(14px,3vw,30px); background: radial-gradient(ellipse at 52% 0%, #eee0ff, #f8f6fc 65%); border-radius: 16px; }
.dsp-device { min-width: 0; display: grid; gap: 8px; justify-items: center; background: none; border: 0; padding: 0; color: var(--dsp-ink); }
.dsp-frame { position: relative; display: block; width: 100%; overflow: hidden; background: #251941; border: clamp(3px,.5vw,6px) solid #251941; border-radius: clamp(6px,1vw,12px); box-shadow: 0 12px 26px rgba(40,24,69,.25); transition: border-color .2s; }
.dsp-device[data-device="desktop"] .dsp-frame { aspect-ratio: 1440/850; }
.dsp-device[data-device="tablet"] .dsp-frame { aspect-ratio: 820/1000; }
.dsp-device[data-device="mobile"] .dsp-frame { aspect-ratio: 390/844; border-radius: clamp(10px,1.6vw,18px); }
.dsp-frame img { display: block; width: 100%; height: auto; max-width: none; transform: translateY(0); transition: transform .8s ease; will-change: transform; }
.dsp-frame-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 12px; background: linear-gradient(135deg, var(--cover, #6e00ff), #16143e); }
.dsp-device:not(:disabled):hover .dsp-frame { border-color: var(--dsp-violet); }
.dsp-scroll-tag { position: absolute; right: 6px; bottom: 6px; background: rgba(22,20,62,.82); color: #fff; font-size: 10.5px; font-weight: 600; border-radius: 20px; padding: 3px 8px; pointer-events: none; transition: opacity .3s; }
.dsp-device:hover .dsp-scroll-tag { opacity: 0; }
.dsp-device-label { font-size: 13px; font-weight: 600; }
.dsp-hint { margin: 10px 0 0 !important; padding: 0 !important; color: var(--dsp-muted); font-size: 13px; text-align: center; }
.dsp-graph { margin: 18px 0 0; padding: 14px; border: 1px solid var(--dsp-border); border-radius: 14px; background: #fff; }
.dsp-graph figcaption { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--dsp-ink); }
.dsp-graph img { display: block; width: 100%; height: auto; border-radius: 8px; }
.dsp-brief { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px 0 12px; }
.dsp-brief section { background: var(--dsp-soft); border-radius: 14px; padding: 16px 18px; }
.dsp-brief h3 { margin: 0 0 6px; padding: 0; font-size: 15px; font-weight: 700; color: var(--dsp-ink); }
.dsp-brief ul { margin: 0; padding: 0 0 0 18px; list-style: disc; }
.dsp-brief li, .dsp-brief p { color: #4b4669; font-size: 14.5px; line-height: 1.6; margin: 0; padding: 0; }
.dsp-zoom { padding-bottom: 12px; }
.dsp-scroller { margin-top: 12px; max-height: calc(100dvh - 300px); min-height: 240px; overflow: auto; border: 1px solid var(--dsp-border); border-radius: 12px; background: #f1eef8; overscroll-behavior: contain; }
.dsp-scroller img { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.dsp-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 26px; border-top: 1px solid var(--dsp-border); background: #fff; }
.dsp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dsp-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 50px; padding: 11px 22px; background: var(--dsp-violet); color: #fff !important; font-size: 14px; font-weight: 600; line-height: 1.2; transition: background .2s; }
.dsp-btn:hover { background: var(--dsp-deep); }
.dsp-btn-ghost { background: var(--dsp-tint); color: var(--dsp-deep) !important; }
.dsp-btn-ghost:hover { background: #e2d6ff; }
.dsp-nav { display: flex; gap: 8px; }
.dsp-nav button { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--dsp-border); border-radius: 12px; padding: 7px 12px; background: #fff; color: var(--dsp-ink); text-align: left; line-height: 1.25; }
.dsp-nav button:hover { background: var(--dsp-soft); border-color: #ceb6f6; }
.dsp-prev { min-width: 44px; justify-content: center; }
.dsp-next small { display: block; color: var(--dsp-deep); font-size: 11.5px; }
.dsp-next strong { display: block; font-size: 13.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .dsp-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
}
@media (max-width: 640px) {
  .dsp-grid { grid-template-columns: 1fr; }
  /* Phone: every option visible at once in a 2-column grid; one tap, no sideways scrolling. */
  .dsp-bar { width: 100%; margin-top: -30px; padding: 8px; border-radius: 18px; }
  .dsp-filter-type { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
  .dsp-filter-type button { justify-content: space-between; padding: 10px 12px; font-size: 13px; border-radius: 12px; text-align: left; line-height: 1.25; }
  .dsp-toolbar { margin: 20px 0 12px; }
  .dsp-platform-label { font-size: 12px; }
  /* Phone: dialog becomes a bottom sheet. */
  .dsp-dialog { width: 100%; max-height: 94dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .dsp-dialog[open] { animation: dsp-sheet .3s ease; }
  @keyframes dsp-sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .dsp-top { padding: 16px 16px 12px; }
  .dsp-top::before { content: ""; position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #d9d4e6; }
  .dsp-body { padding: 14px 16px 4px; }
  .dsp-devices { grid-template-columns: 1fr .5fr; }
  .dsp-device[data-device="tablet"] { display: none; }
  .dsp-brief { grid-template-columns: 1fr; gap: 10px; }
  .dsp-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .dsp-actions { width: 100%; }
  .dsp-actions .dsp-btn { flex: 1; justify-content: center; padding: 12px 10px; font-size: 13.5px; white-space: nowrap; }
  .dsp-proof .et_pb_text_inner { flex-direction: column; gap: 4px; }
  .dsp-proof p + p::before { display: none; }
  .dsp-nav { width: 100%; }
  .dsp-next { flex: 1; justify-content: space-between; }
}
@media (pointer: coarse) {
  .dsp-filter button, .dsp-nav button, .dsp-close, .dsp-back { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .dsp-card, .dsp-card-desktop, .dsp-card-phone, .dsp-featured, .dsp-featured-desktop, .dsp-featured-phone, .dsp-frame img { transition: none !important; transform: none !important; }
  .dsp-card.dsp-in, .dsp-dialog[open] { animation: none; }
}
