/* ==========================================================================
   Superium — showcase (demo.html)
   --------------------------------------------------------------------------
   Deliberately its own visual layer: a dark presentation shell wrapped around
   light preview cards, so the product being shown never competes with the
   page showing it.

   Prefix `d-` keeps it fully separate from the `sp-` template styles — a
   buyer can delete this file and demo.html without touching the theme.
   ========================================================================== */

body.d-page {
  --d-bg: #0d1017;
  --d-surface: #151a23;
  --d-surface-2: #1c222d;
  --d-text: #f3f5f8;
  --d-soft: #b6bdc9;
  --d-muted: #7d8695;
  --d-line: #262d3a;
  --d-brand: #f2600c;
  --d-brand-2: #ffb27a;

  background: var(--d-bg);
  color: var(--d-text);
}

.d-container {
  inline-size: 100%;
  max-inline-size: 1240px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* Header ------------------------------------------------------------------ */

.d-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  background: rgba(13, 16, 23, 0.88);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--d-line);
}

.d-header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 14px;
}

.d-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--d-brand);
  flex-shrink: 0;
}

.d-logo > span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.d-logo b {
  font-size: 1rem;
  font-weight: 800;
}

.d-logo small {
  font-size: 0.625rem;
  color: var(--d-muted);
}

.d-tag {
  padding: 3px 9px;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--d-brand-2);
  background: rgba(242, 96, 12, 0.14);
  border-radius: 999px;
  align-self: center;
}

.d-nav {
  display: none;
  gap: 22px;
  margin-inline-start: auto;
}

@media (min-width: 900px) {
  .d-nav {
    display: flex;
  }
}

.d-nav a {
  font-size: 0.8125rem;
  color: var(--d-soft);
  transition: color 0.2s;
}

.d-nav a:hover {
  color: var(--d-text);
}

.d-header .d-btn {
  margin-inline-start: auto;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .d-header .d-btn {
    margin-inline-start: 0;
  }
}

/* Buttons ----------------------------------------------------------------- */

.d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.d-btn--primary {
  background: var(--d-brand);
  color: #fff;
}

.d-btn--primary:hover {
  background: #d34e05;
}

.d-btn--ghost {
  border-color: var(--d-line);
  color: var(--d-soft);
}

.d-btn--ghost:hover {
  border-color: var(--d-muted);
  color: var(--d-text);
}

.d-btn--sm {
  padding: 6px 13px;
  font-size: 0.75rem;
}

.d-btn--lg {
  padding: 13px 26px;
  font-size: 0.875rem;
}

/* Hero -------------------------------------------------------------------- */

.d-hero {
  padding-block: clamp(40px, 7vw, 88px);
  background:
    radial-gradient(90% 70% at 85% 0%, rgba(242, 96, 12, 0.16), transparent 60%),
    var(--d-bg);
  border-block-end: 1px solid var(--d-line);
}

.d-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

@media (min-width: 1000px) {
  .d-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 48px;
  }
}

.d-eyebrow {
  display: inline-block;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--d-brand-2);
  background: rgba(242, 96, 12, 0.14);
  border-radius: 999px;
  margin-block-end: 18px;
}

.d-hero h1 {
  font-family: var(--sp-font-display);
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.d-hero h1 em {
  font-style: normal;
  color: var(--d-brand);
}

.d-lead {
  margin-block-start: 18px;
  max-inline-size: 52ch;
  font-size: 0.9375rem;
  line-height: 2.1;
  color: var(--d-soft);
}

.d-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: 26px;
}

.d-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-block-start: 32px;
  padding-block-start: 24px;
  border-block-start: 1px solid var(--d-line);
}

.d-stats div {
  display: flex;
  flex-direction: column;
}

.d-stats dt {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--d-brand);
  line-height: 1.2;
}

.d-stats dd {
  margin: 0;
  font-size: 0.75rem;
  color: var(--d-muted);
}

/* The hero preview is a lightbox trigger, not a link — this showcase never
   navigates into the template, it only shows it. */
.d-hero-media {
  position: relative;
  display: block;
  inline-size: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

/* The captures run the whole length of a page, so every frame that shows one
   inline is a fixed window onto its top; the full thing opens in the
   lightbox. */
.d-hero-media {
  aspect-ratio: 16 / 12;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--d-line);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.d-hero-media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: top center;
}

.d-hero-media-hint {
  position: absolute;
  inset-block-end: 14px;
  inset-inline-end: 14px;
  padding: 6px 13px;
  font-size: 0.6875rem;
  color: var(--d-text);
  background: rgba(13, 16, 23, 0.82);
  border: 1px solid var(--d-line);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* Sections ---------------------------------------------------------------- */

.d-section {
  padding-block: clamp(40px, 6vw, 76px);
}

.d-section--alt {
  background: var(--d-surface);
  border-block: 1px solid var(--d-line);
}

.d-section-head {
  max-inline-size: 62ch;
  margin-block-end: 34px;
}

.d-section-head h2 {
  font-family: var(--sp-font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 800;
}

.d-section-head p {
  margin-block-start: 10px;
  font-size: 0.875rem;
  line-height: 2.1;
  color: var(--d-soft);
}

.d-section-head code,
.d-footer code {
  padding: 1px 6px;
  font-size: 0.8125rem;
  color: var(--d-brand-2);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
}

/* Homepage cards ---------------------------------------------------------- */

.d-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

@media (min-width: 800px) {
  .d-home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.d-home-card {
  display: flex;
  flex-direction: column;
  background: var(--d-surface);
  border: 1px solid var(--d-line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}

.d-home-card:hover {
  transform: translateY(-4px);
  border-color: var(--d-muted);
}

.d-home-shot {
  display: block;
  inline-size: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--d-surface-2);
  border-block-end: 1px solid var(--d-line);
}

.d-home-shot img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: top center;
}

.d-home-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.d-home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.d-home-head h3 {
  font-size: 0.9375rem;
  font-weight: 800;
}

.d-swatches {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.d-swatches span {
  inline-size: 16px;
  block-size: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.d-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.d-chips span {
  padding: 4px 10px;
  font-size: 0.6875rem;
  color: var(--d-soft);
  background: var(--d-surface-2);
  border-radius: 999px;
}

.d-home-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-block-start: auto;
}

.d-home-actions .d-btn {
  cursor: zoom-in;
}

/* Gallery ----------------------------------------------------------------- */

.d-group {
  margin-block-end: 44px;
}

.d-group:last-child {
  margin-block-end: 0;
}

.d-group-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-block-end: 18px;
  padding-block-end: 12px;
  border-block-end: 1px solid var(--d-line);
}

.d-group-head h3 {
  font-size: 1.0625rem;
  font-weight: 800;
}

.d-group-head p {
  font-size: 0.8125rem;
  color: var(--d-muted);
}

.d-count {
  margin-inline-start: auto;
  font-size: 0.75rem;
  color: var(--d-brand-2);
}

.d-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  .d-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .d-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.d-card {
  display: flex;
  flex-direction: column;
  background: var(--d-bg);
  border: 1px solid var(--d-line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.25s;
}

.d-card:hover {
  border-color: var(--d-muted);
}

.d-card-shot {
  display: block;
  inline-size: 100%;
  padding: 0;
  border: none;
  cursor: zoom-in;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--d-surface-2);
  border-block-end: 1px solid var(--d-line);
}

.d-card-shot img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s;
}

.d-card-shot:hover img {
  transform: scale(1.03);
}

.d-shot-missing {
  display: grid;
  place-items: center;
  block-size: 100%;
  font-size: 0.75rem;
  color: var(--d-muted);
}

.d-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.d-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.d-card-head h4 {
  font-size: 0.875rem;
  font-weight: 700;
}

.d-card-head code {
  font-size: 0.6875rem;
  color: var(--d-muted);
  direction: ltr;
}

.d-card-body p {
  font-size: 0.75rem;
  line-height: 1.95;
  color: var(--d-muted);
  flex: 1;
}

.d-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.d-mobile-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  font-size: 0.6875rem;
  color: var(--d-soft);
  background: none;
  border: 1px solid var(--d-line);
  border-radius: 9px;
  cursor: zoom-in;
}

.d-mobile-badge:hover {
  border-color: var(--d-muted);
  color: var(--d-text);
}

/* Components -------------------------------------------------------------- */

.d-comp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 860px) {
  .d-comp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.d-comp-col {
  border: 1px solid var(--d-line);
  border-radius: 14px;
  overflow: hidden;
}

.d-comp-label {
  padding: 11px 16px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--d-soft);
  background: var(--d-surface);
  border-block-end: 1px solid var(--d-line);
}

/* Inside this block the sp-theme-- class supplies real template tokens, so
   the components render exactly as they do on their pages. */
.d-comp-surface {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: var(--sp-bg);
  color: var(--sp-text);
}

.d-comp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Features ---------------------------------------------------------------- */

.d-features {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

@media (min-width: 640px) {
  .d-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .d-features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.d-feature {
  padding: 18px;
  background: var(--d-bg);
  border: 1px solid var(--d-line);
  border-radius: 12px;
}

.d-feature-icon {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  margin-block-end: 12px;
  color: var(--d-brand);
  background: rgba(242, 96, 12, 0.13);
  border-radius: 10px;
}

.d-feature h4 {
  font-size: 0.875rem;
  font-weight: 700;
}

.d-feature p {
  margin-block-start: 7px;
  font-size: 0.75rem;
  line-height: 1.95;
  color: var(--d-muted);
}

/* Footer ------------------------------------------------------------------ */

.d-footer {
  padding-block: 40px 24px;
  border-block-start: 1px solid var(--d-line);
}

.d-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
}

.d-footer-grid p {
  max-inline-size: 62ch;
}

.d-footer b {
  display: block;
  margin-block-end: 10px;
  font-size: 0.875rem;
}

.d-footer p {
  font-size: 0.8125rem;
  line-height: 2;
  color: var(--d-muted);
}

.d-footer a {
  display: block;
  margin-block-end: 7px;
  font-size: 0.8125rem;
  color: var(--d-soft);
}

.d-footer a:hover {
  color: var(--d-brand-2);
}

.d-footer pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 0.75rem;
  line-height: 1.9;
  background: var(--d-surface);
  border: 1px solid var(--d-line);
  border-radius: 9px;
}

.d-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-block-start: 30px;
  padding-block-start: 18px;
  border-block-start: 1px solid var(--d-line);
  font-size: 0.75rem;
  color: var(--d-muted);
  text-align: center;
}

.d-footer-bottom a {
  color: var(--d-brand-2);
}

.d-footer-bottom a:hover {
  text-decoration: underline;
}

/* Lightbox ---------------------------------------------------------------- */

.d-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  background: rgba(6, 8, 12, 0.94);
}

.d-lightbox[hidden] {
  display: none;
}

/* A capture is a whole page, thousands of pixels tall. The figure is the
   scroller: the image keeps its full width and the viewer scrolls it the way
   they would scroll the page itself. */
.d-lightbox-figure {
  margin: 0;
  inline-size: min(1200px, 100%);
  max-block-size: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  border-radius: 10px;
}

.d-lightbox-figure img {
  inline-size: 100%;
  block-size: auto;
  border-radius: 10px;
  border: 1px solid var(--d-line);
  background: var(--d-surface-2);
}

/* Mobile captures are 390px wide — blowing one up to 1200px would just make a
   soft, oversized phone screen. */
.d-lightbox-figure.is-narrow {
  inline-size: min(430px, 100%);
}

.d-lightbox-figure figcaption {
  position: sticky;
  inset-block-end: 0;
  padding: 6px 14px;
  font-size: 0.8125rem;
  color: var(--d-soft);
  background: rgba(6, 8, 12, 0.9);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.d-lightbox-close {
  position: absolute;
  inset-block-start: 18px;
  inset-inline-end: 18px;
  display: grid;
  place-items: center;
  inline-size: 42px;
  block-size: 42px;
  color: var(--d-text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--d-line);
  border-radius: 50%;
  cursor: pointer;
}

.d-lightbox-nav {
  display: grid;
  place-items: center;
  inline-size: 46px;
  block-size: 46px;
  flex-shrink: 0;
  color: var(--d-text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--d-line);
  border-radius: 50%;
  cursor: pointer;
}

.d-lightbox-nav:hover,
.d-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 640px) {
  .d-lightbox-nav {
    position: absolute;
    inset-block-end: 20px;
  }

  .d-lightbox-prev {
    inset-inline-end: 24px;
  }

  .d-lightbox-next {
    inset-inline-start: 24px;
  }
}
