/* =========================================================================
   Kuumba — warehousing components
   Loaded after main.css and pages.css on services/warehouse-management.html
   and stocktake-drone.html. Renders sit on a Porcelain "stage": a soft,
   neutral studio panel, never a dark product shot.
   Order: 1 stage + chips · 2 drone chapter (service page) · 3 drone hero ·
   4 feature rows · 5 numbered list · 6 exception list mock · 7 fit flow ·
   8 render gallery
   ========================================================================= */

/* ---------- 1. Stage (a render on Porcelain) ---------- */
.dstage {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--r-xl);
  background: radial-gradient(120% 90% at 50% 28%, #F2F2F0 0%, #E3E3E0 62%, #D7D7D3 100%);
  box-shadow: inset 0 0 0 1px rgba(28, 26, 24, .05);
}
.dstage__img { position: relative; z-index: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.015); }
.dstage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(130% 100% at 50% 40%, rgba(251, 251, 250, 0) 62%, rgba(28, 26, 24, .08) 100%); }
.dstage__chips { position: absolute; inset: auto 20px 20px 20px; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; }
.dstage__chips .chip { background: rgba(255, 255, 255, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(28, 26, 24, .06), 0 6px 18px -10px rgba(28, 26, 24, .25); }
.dstage__chips .chip .ic { color: var(--accent); }
.dstage__note { position: absolute; top: 18px; right: 20px; z-index: 2; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: rgba(28, 26, 24, .5); }

/* The render hovers, very slowly. Motion only. */
@keyframes k-dhover { from { transform: translateY(.8%) scale(1.015); } to { transform: translateY(-1.2%) scale(1.015); } }
.motion .dstage--float .dstage__img { animation: k-dhover 6.5s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
.paused .dstage--float .dstage__img { animation: none; }

/* ---------- 2. "Meet the stocktake drone" chapter (service page) ---------- */
.dch { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
.dch .dstage { aspect-ratio: 4 / 3; }
.dch__body .eyebrow { gap: 12px; }
.dch__body .lede { margin-top: 24px; }
.dch__body .dlist { margin-top: clamp(28px, 3vw, 40px); }
.dch__link { margin-top: 32px; }
.dtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.dtile { display: grid; gap: 12px; }
.dtile__media { position: relative; overflow: hidden; border-radius: var(--r-lg); aspect-ratio: 16 / 10; background: #D9D9D5; }
.dtile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.dtile:hover .dtile__media img { transform: scale(1.03); }
.dtile figcaption { font-size: 14px; line-height: 20px; color: var(--muted); }
.dtile figcaption b { color: var(--ink); font-weight: 500; }
@media (max-width: 960px) {
  .dch { grid-template-columns: 1fr; }
  .dch .dstage { border-radius: var(--r-lg); }
}
@media (max-width: 600px) { .dtiles { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- 3. Drone page hero ---------- */
.dhero { padding-top: clamp(112px, 12vw, 152px); padding-bottom: clamp(56px, 7vw, 96px); overflow: clip; }
.dhero__head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px clamp(40px, 6vw, 96px); align-items: end; margin-bottom: clamp(36px, 4.4vw, 64px); }
.dhero__title { max-width: 13ch; }
.dhero .phero__sub { margin-top: 0; max-width: 44ch; }
.dhero .dstage { aspect-ratio: 16 / 9; }
.dhero .dstage__img { object-position: 50% 58%; }
@media (max-width: 900px) {
  .dhero__head { grid-template-columns: 1fr; }
  .dhero .phero__sub { margin-top: 4px; }
  .dhero .dstage { aspect-ratio: 4 / 3; border-radius: var(--r-lg); }
  .dstage__chips { inset: auto 14px 14px 14px; gap: 6px; }
  .dstage__note { top: 14px; right: 16px; }
}
@media (max-width: 520px) { .dstage__chips .chip:nth-child(n+3) { display: none; } }

/* ---------- 4. Feature rows (media beside copy) ---------- */
.dfeat { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.dfeat--flip .dfeat__media { order: 2; }
.dfeat__media { position: relative; overflow: hidden; border-radius: var(--r-xl); background: #1E1F22; }
.dfeat__media img { width: 100%; height: auto; }
.dfeat__media.dstage { background: radial-gradient(120% 90% at 50% 28%, #F2F2F0 0%, #E3E3E0 62%, #D7D7D3 100%); }
.dfeat__cap { position: absolute; left: 20px; bottom: 16px; z-index: 2; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .86); }
.dstage .dfeat__cap { color: rgba(28, 26, 24, .55); }
.dfeat__body .lede { margin-top: 24px; }
.dfeat__body .dlist, .dfeat__body .dolist-w { margin-top: clamp(28px, 3vw, 40px); }
@media (max-width: 900px) {
  .dfeat { grid-template-columns: 1fr; gap: 32px; }
  .dfeat--flip .dfeat__media { order: 0; }
  .dfeat__media { border-radius: var(--r-lg); }
}

/* ---------- 5. Numbered list ---------- */
.dlist { border-top: 1px solid var(--line); counter-reset: dl; }
.dlist li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 16px; padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.dlist li::before { counter-increment: dl; content: counter(dl, decimal-leading-zero); grid-row: 1 / span 2; padding-top: 3px; font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.dlist h3 { font-size: 19px; line-height: 26px; font-weight: 500; letter-spacing: -0.01em; }
.dlist p { color: var(--muted); max-width: 52ch; text-wrap: pretty; }

/* check-mark variant, used on the dark-free copy columns */
.dolist-w { display: grid; }
.dolist-w li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); color: #3A3835; }
.dolist-w .ic { width: 18px; height: 18px; margin-top: 3px; color: var(--ink); }
.dolist-w b { font-weight: 500; color: var(--ink); }

/* ---------- 6. Exception list (illustrative product view) ---------- */
.exl { border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float); overflow: hidden; }
.exl__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.exl__title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.exl__title .brand__tile { width: 20px; height: 20px; }
.exl__title small { font-size: 13px; font-weight: 400; color: var(--muted); }
.exl__sum { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 14px 22px; background: var(--rail); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.exl__sum b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.exl__table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.exl__table th, .exl__table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.exl__table th:first-child, .exl__table td:first-child { padding-left: 22px; }
.exl__table th:last-child, .exl__table td:last-child { padding-right: 22px; }
.exl__table thead th { font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.exl__table td { font-variant-numeric: tabular-nums; color: #3A3835; }
.exl__table td.n { text-align: right; }
.exl__table th.n { text-align: right; }
.exl__table tbody tr:last-child td { border-bottom: 0; }
.exl__loc { font-weight: 500; color: var(--ink); white-space: nowrap; }
.cause { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding-inline: 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--sunken); color: var(--ink); }
.cause::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.cause--ghost { background: #FBEFE2; color: #8A5414; }
.cause--slot { background: var(--accent-soft); color: #4B33D6; }
.cause--recv { background: #E7F2EC; color: #24613F; }
.exl__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.exl__foot .tag--needs { height: 28px; }
@media (max-width: 760px) {
  .exl { border-radius: var(--r-lg); }
  .exl__table .hide-s { display: none; }
  .exl__table th, .exl__table td { padding: 11px 8px; }
  .exl__table th:first-child, .exl__table td:first-child { padding-left: 16px; }
  .exl__table th:last-child, .exl__table td:last-child { padding-right: 16px; }
  .exl__head, .exl__sum, .exl__foot { padding-inline: 16px; }
}

/* ---------- 7. How it fits: a four-step flow ---------- */
.fit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: fit; }
.fit li { position: relative; display: grid; align-content: start; gap: 10px; padding: 24px 22px 26px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.fit li + li::before { content: ""; position: absolute; left: -12px; top: 38px; width: 12px; height: 1px; background: var(--faint); }
.fit__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--sunken); }
.fit li:last-child .fit__icon { background: var(--ink); color: #fff; }
.fit__k { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fit h3 { font-size: 19px; line-height: 25px; font-weight: 500; letter-spacing: -0.01em; }
.fit p { color: var(--muted); font-size: 15px; line-height: 22px; text-wrap: pretty; }
@media (max-width: 1000px) { .fit { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fit li:nth-child(3)::before { display: none; } }
@media (max-width: 560px) { .fit { grid-template-columns: 1fr; } .fit li + li::before { left: 42px; top: -12px; width: 1px; height: 12px; } .fit li:nth-child(3)::before { display: block; } }

/* ---------- 8. Render gallery ---------- */
.dgal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dgal figure { display: grid; gap: 12px; }
.dgal .dstage { aspect-ratio: 4 / 3; border-radius: var(--r-lg); }
.dgal figcaption { font-size: 14px; line-height: 20px; color: var(--muted); }
.dgal figcaption b { display: block; color: var(--ink); font-weight: 500; }
@media (max-width: 900px) { .dgal { grid-template-columns: 1fr; } }
.eyebrow .tag { text-transform: none; letter-spacing: 0; height: 22px; font-size: 11.5px; }
