/* =====================================================================
   Design product page: hero, galleries (browser + phone frames),
   features, integrations, related, CTA. Requires shop.css for cards.
   ===================================================================== */

/* ---- Hero ----------------------------------------------------------------- */
.d-hero {
  overflow: hidden;
  padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 112px);
  background-image:
    radial-gradient(1000px 520px at 88% -8%, rgba(148, 170, 204, .17), rgba(15, 27, 45, 0) 60%),
    radial-gradient(700px 420px at -5% 110%, rgba(10, 19, 34, .75), rgba(15, 27, 45, 0) 70%);
}
.d-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}
.d-crumbs ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 28px; font-size: var(--fs-small); }
.d-crumbs li { display: flex; align-items: center; color: var(--ivory-muted); }
.d-crumbs li + li::before { content: "/"; margin: 0 10px; color: rgba(247, 244, 238, .45); }
.section--dark .d-crumbs a { color: var(--ivory-muted); text-decoration: none; }
.section--dark .d-crumbs a:hover { color: var(--ivory); text-decoration: underline; }

.d-hero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.d-hero h1 {
  margin: 18px 0 20px;
  color: var(--ivory);
  font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  max-width: 14ch;
}
.d-hero h1:empty { min-height: 1.1em; }
.d-systems {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  list-style: none;
}
.d-systems li {
  padding: 7px 14px;
  border: 1px solid rgba(242, 162, 58, .34);
  border-radius: 999px;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--ivory);
}
.d-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.d-hero__media { margin: 0; }
.d-hero__frame {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #0F1B2D, #1F3A5F);
  box-shadow: 0 48px 90px -36px rgba(0, 0, 0, .75), 0 0 0 1px rgba(148, 170, 204, .16);
}
.d-hero__frame img { width: 100%; height: 100%; object-fit: cover; }
.d-hero__note {
  margin-top: 16px;
  font-size: .8125rem;
  color: var(--ivory-muted);
  text-align: right;
}

/* ---- Sections ------------------------------------------------------------- */
.d-sec { padding: clamp(72px, 9vw, 128px) 0; }
.d-sec--tight { padding: clamp(56px, 7vw, 88px) 0; }
.d-sec__head { max-width: 640px; margin-bottom: clamp(36px, 4.5vw, 56px); }
.d-sec__head h2 { margin-top: 14px; }
.d-sec__head .lead { margin-top: 16px; }
.d-sec__head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  max-width: none;
}
.d-sec__head--row .lead { margin-top: 0; max-width: 40ch; }
.section--ivory h2 { color: var(--navy); }
.section--dark h2 { color: var(--ivory); }

.d-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: .9375rem;
  text-decoration: none;
}
.d-link:hover { text-decoration: underline; }
.d-sec__head--row .d-link { margin-top: 0; }

.d-split {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.d-split .d-sec__head { margin-bottom: 0; }
.d-stack { display: grid; gap: 28px; }

.d-sentinel { height: 1px; margin-top: -1px; }

/* ---- Frames --------------------------------------------------------------- */
.d-slide { margin: 0; }
.frame-browser {
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(10, 19, 34, .08), 0 30px 60px -28px rgba(10, 19, 34, .45), 0 0 0 1px rgba(15, 27, 45, .1);
}
.frame-browser__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  background: #EFE6DA;
  border-bottom: 1px solid rgba(15, 27, 45, .08);
}
.frame-browser__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(15, 27, 45, .2); }
.frame-browser__bar span {
  flex: 0 1 280px;
  height: 18px;
  margin-inline: auto;
  border-radius: 6px;
  background: rgba(15, 27, 45, .07);
}
.frame-browser__screen { aspect-ratio: 16 / 10; background: #EFE6DA; }
.frame-browser__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.section--dark .frame-browser {
  background: #0A1322;
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(148, 170, 204, .2);
}
.section--dark .frame-browser__bar { background: #3A2622; border-bottom-color: rgba(148, 170, 204, .14); }
.section--dark .frame-browser__bar i { background: rgba(247, 244, 238, .22); }
.section--dark .frame-browser__bar span { background: rgba(247, 244, 238, .08); }
.section--dark .frame-browser__screen { background: #3A2622; }

.frame-phone {
  padding: 9px;
  border-radius: 40px;
  background: linear-gradient(160deg, #0A1322, #140c0a);
  box-shadow: 0 0 0 1px rgba(242, 162, 58, .28), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 40px 60px -28px rgba(0, 0, 0, .65);
}
.frame-phone__screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border-radius: 31px;
  background: #3A2622;
}
.frame-phone__screen::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 1;
  width: 30%;
  height: 20px;
  border-radius: 999px;
  background: #140c0a;
  translate: -50% 0;
}
.frame-phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---- Carousels ------------------------------------------------------------ */
.d-gallery { position: relative; }
.d-track {
  display: grid;
  grid-auto-flow: column;
  gap: clamp(16px, 2.4vw, 32px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  padding: 4px 2px 32px;
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 86, 52, .5) transparent;
  border-radius: 14px;
}
.d-track:focus-visible { outline-offset: 6px; }
.d-track > .d-slide { scroll-snap-align: start; }
.d-track--browser { grid-auto-columns: min(86%, 1000px); }
.d-track--phone { grid-auto-columns: clamp(220px, 26%, 290px); }
.section--dark .d-track { scrollbar-color: rgba(242, 162, 58, .5) transparent; }

.d-gallery__ctrl { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.d-gallery__ctrl[hidden] { display: none; }
.d-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(15, 27, 45, .3);
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out), opacity .25s var(--ease-out);
}
.d-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.d-arrow:hover { border-color: var(--navy); background: rgba(15, 27, 45, .06); }
.d-arrow[aria-disabled="true"] { opacity: .4; cursor: default; }
.section--dark .d-arrow { color: var(--ivory); border-color: rgba(247, 244, 238, .4); }
.section--dark .d-arrow:hover { border-color: var(--ivory); background: rgba(247, 244, 238, .06); }

/* ---- Features + integrations ---------------------------------------------- */
.d-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0;
  list-style: none;
  overflow: hidden;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.d-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 112px;
  padding: 26px 24px;
  background: var(--paper);
  box-shadow: 1px 0 0 var(--line-light), 0 1px 0 var(--line-light);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--navy);
}
.d-feature svg { flex: none; width: 28px; height: 28px; margin-top: -2px; color: var(--ember-ink); }
.section--dark .d-features { border-color: var(--line-dark); background: #46302A; }
.section--dark .d-feature { background: #46302A; color: var(--ivory); box-shadow: 1px 0 0 var(--line-dark), 0 1px 0 var(--line-dark); }
.section--dark .d-feature svg { color: var(--ember); }

.d-int {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--space-5) var(--space-7);
  align-items: center;
}
.d-int h2 { margin-top: 14px; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); }
.d-chips { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; }
.d-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-light);
  background: var(--paper);
  font-family: var(--font-label);
  font-weight: 500;
  font-size: .9375rem;
  color: var(--navy);
}
.d-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.section--dark .d-chip { border-color: rgba(242, 162, 58, .3); background: rgba(247, 244, 238, .05); color: var(--ivory); }
.section--dark .d-chip::before { background: var(--ember); }

/* ---- CTA + not found ------------------------------------------------------- */
.d-cta { padding: clamp(72px, 9vw, 120px) 0; text-align: center; }
.d-cta__inner { display: flex; flex-direction: column; align-items: center; }
.d-cta h2 { margin-top: 16px; max-width: 18ch; color: var(--ivory); }
.d-cta .lead { margin-top: 18px; }
.d-cta .d-hero__actions { justify-content: center; }

.d-missing { padding: clamp(96px, 12vw, 160px) 0; }
.d-missing h1 { max-width: none; }

/* ---- Responsive ------------------------------------------------------------ */
@media (max-width: 959.98px) {
  .d-hero__grid, .d-split, .d-int { grid-template-columns: 1fr; }
  .d-hero__note { text-align: left; }
  .d-track--browser { grid-auto-columns: 88%; }
  .d-track--phone { grid-auto-columns: 62%; }
}
@media (max-width: 479.98px) {
  .d-hero__actions .btn { flex: 1 1 100%; }
  .d-feature { min-height: 0; padding: 20px; }
  .d-arrow { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .d-arrow { transition: none; }
}

/* The live-showpiece button only shows for designs that have one. */
.d-hero__actions [hidden] { display: none; }
