/* ==========================================================================
   Drift Patches landing page (/drift-patches)
   Art direction: a patch maker's pinboard. Warm cream paper, real cut-out
   patches with their own shadows, big editorial type (Bricolage Grotesque
   with Instrument Serif italics), one orange accent.
   Motion (GSAP, Lenis, Swiper) is layered on in js/drift-patches.js; every
   section reads and works without it.
   ========================================================================== */

.page-dp {
  --cream: #efe9df;
  --cream-2: #e6dfd2;
  --cream-line: #d9d0c0;
  --star: #f5a524;
  --star-off: rgba(10, 18, 34, .18);
  --f-display: "Bricolage Grotesque", var(--f-head);
  --f-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --hdr: 78px;
  background: var(--cream);
}
.page-dp main em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--orange); }

/* ---------- Shared pieces ---------- */
.dpx-eyebrow { display: flex; align-items: center; gap: .7rem; margin: 0 0 1.4rem; font: 600 .8rem var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.dpx-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--orange); }
.dpx-eyebrow--light { color: var(--on-ink-muted); }
.dpx-h2 { font: 700 clamp(2.3rem, 1.3rem + 3.6vw, 4.6rem)/.98 var(--f-display); letter-spacing: -.045em; color: var(--ink); margin: 0 0 1.2rem; }
.dpx-h2 em { font-size: 1.08em; }
.dpx-h2--light { color: var(--white); }

.dpx-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .8rem; overflow: hidden; isolation: isolate;
  min-height: 60px; padding: 0 1.6rem 0 1.9rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--orange); color: var(--white); text-decoration: none; font: 700 1.05rem var(--f-display); letter-spacing: -.01em;
  box-shadow: 0 14px 30px -10px rgba(242, 106, 18, .6);
  transition: box-shadow .3s, transform .3s;
}
.dpx-btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: translateY(101%); transition: transform .45s cubic-bezier(.7, 0, .2, 1); }
.dpx-btn:hover { color: var(--white); box-shadow: 0 18px 34px -12px rgba(10, 18, 34, .55); }
.dpx-btn:hover::before { transform: none; }
.dpx-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s; }
.dpx-btn:hover svg { transform: translateX(4px); }
.dpx-btn--full { width: 100%; }
.dpx-btn--ghost { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
.dpx-btn--ghost::before { background: var(--white); }
.dpx-btn--ghost:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--white); }
.dpx-signup .dpx-btn::before { background: var(--white); }
.dpx-signup .dpx-btn:hover { color: var(--ink); }


/* Text pieces split by GSAP: lines are clipped so words rise into view */
.dpx-line { overflow: clip; padding-bottom: .06em; margin-bottom: -.06em; }

/* ---------- Hero: promise bar + copy + patch studio ---------- */
.dpx-hero {
  position: relative; overflow: hidden; color: var(--on-ink);
  padding: 0 0 clamp(56px, 8vh, 104px);
  background:
    radial-gradient(55% 70% at 100% 0%, rgba(11, 111, 208, .28), rgba(11, 111, 208, 0) 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(242, 106, 18, .14), rgba(242, 106, 18, 0) 70%),
    var(--ink);
}
.dpx-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 80% at 30% 40%, #000 20%, transparent 75%);
}

/* Promise bar: what every order includes (facts only) */
.dpx-promise { position: relative; z-index: 1; list-style: none; margin: 0 0 clamp(32px, 5vh, 60px); padding: .85rem var(--gutter); display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2.2rem; border-bottom: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); font: 600 .88rem var(--f-display); color: var(--on-ink); }
.dpx-promise li { display: inline-flex; align-items: center; gap: .5rem; }
.dpx-promise svg { width: 18px; height: 18px; fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 699px) {
  .dpx-promise { flex-wrap: nowrap; justify-content: flex-start; gap: 1.4rem; overflow-x: auto; scrollbar-width: none; white-space: nowrap; font-size: .8rem; margin-bottom: 28px;
    mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .dpx-promise::-webkit-scrollbar { display: none; }
  .dpx-promise li { flex: none; }
}

.dpx-hero__grid { position: relative; z-index: 1; display: grid; gap: clamp(40px, 5vw, 72px); align-items: center; }
@media (min-width: 1000px) { .dpx-hero__grid { grid-template-columns: 1fr 1.02fr; } }

.dpx-kicker { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1.6rem; padding: .45rem 1rem .45rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); font: 700 .9rem var(--f-display); color: var(--white); }
.dpx-kicker span:last-child { font-weight: 500; color: var(--on-ink-muted); }
.dpx-kicker__mark { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(242, 106, 18, .22); }
.dpx-h1 { font: 800 clamp(2.7rem, 1.3rem + 3.6vw, 5.1rem)/.98 var(--f-display); letter-spacing: -.045em; color: var(--white); margin: 0 0 1.5rem; }
.dpx-h1 em { font-size: 1.08em; letter-spacing: -.01em; padding-right: .05em; }
.dpx-lede { margin: 0 0 2.2rem; max-width: 48ch; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.65; color: #c3cddc; }
.dpx-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
@media (max-width: 559px) { .dpx-hero__actions { gap: .6rem; } .dpx-hero__actions .dpx-btn { flex: 1 1 0; min-height: 52px; padding: 0 .9rem; font-size: .95rem; gap: .5rem; } .dpx-hero__actions .dpx-btn svg { width: 18px; height: 18px; } }

/* Patch studio */
.dpx-studio { position: relative; border-radius: 28px; overflow: hidden; background: var(--white); color: var(--ink); box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .08); }
.dpx-studio__view { position: relative; aspect-ratio: 16 / 8; display: grid; place-items: center; overflow: hidden; background: #0d1729; isolation: isolate; }
.dpx-studio__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 60%; filter: grayscale(1) contrast(1.1) brightness(.9); transform: scale(1.06); }
.dpx-studio__view::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(45% 60% at 50% 52%, rgba(10, 18, 34, .25), rgba(10, 18, 34, .82) 100%), linear-gradient(180deg, rgba(11, 111, 208, .25), rgba(10, 18, 34, .5)); }
.dpx-studio__patch { width: 40%; height: auto; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .55)); transform-origin: 50% 55%; }
.dpx-studio__printed { max-width: 26ch; margin: 0; padding: 1.2rem 1.4rem; border-radius: 18px; background: rgba(255, 255, 255, .92); text-align: center; font: italic 400 1.3rem/1.25 var(--f-serif); color: var(--ink); }
.dpx-studio__printed[hidden], .dpx-studio__patch[hidden] { display: none; }
.dpx-studio__badge { position: absolute; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem; border-radius: 999px; background: rgba(10, 18, 34, .6); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .16); font: 600 .78rem var(--f-display); color: var(--white); }
.dpx-machine__dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .2); animation: dpx-pulse 2s ease-in-out infinite; }
@keyframes dpx-pulse { 50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } }
.dpx-studio__summary { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; margin: 0; padding: .45rem 1rem; border-radius: 999px; white-space: nowrap; background: rgba(255, 255, 255, .95); font: 700 .82rem var(--f-display); color: var(--ink); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }

.dpx-studio__panel { padding: clamp(18px, 2vw, 26px); display: grid; gap: .8rem; }
.dpx-studio__h { margin: 0; font: 800 1.15rem var(--f-display); letter-spacing: -.02em; }
.dpx-pick { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.dpx-pick legend { float: left; width: 100%; margin: 0 0 .4rem; padding: 0; display: flex; align-items: center; gap: .5rem; font: 600 .78rem var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dpx-pick legend span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--white); font: 800 .7rem var(--f-display); letter-spacing: 0; }
.dpx-chip { position: relative; cursor: pointer; }
.dpx-chip input { position: absolute; opacity: 0; pointer-events: none; }
.dpx-chip span { display: inline-block; padding: .42rem .78rem; border-radius: 999px; border: 1.5px solid #dcd6ca; background: var(--white); font: 600 .82rem var(--f-display); color: var(--ink); transition: background-color .2s, border-color .2s, color .2s; }
.dpx-chip:hover span { border-color: var(--ink); }
.dpx-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.dpx-chip input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.dpx-studio__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin-top: .3rem; }
.dpx-studio__actions .dpx-btn { flex: 1 1 220px; }
.dpx-studio__alt { font: 700 .92rem var(--f-display); color: var(--ink); text-underline-offset: 4px; }
.dpx-studio__alt:hover { color: var(--orange-ink); }
.dpx-studio__note { margin: 0; font-size: .8rem; color: var(--muted); }

@media (max-width: 699px) { .dpx-studio__view { aspect-ratio: 4 / 3; } .dpx-studio__patch { width: 54%; } }
@media (prefers-reduced-motion: reduce) { .dpx-machine__dot { animation: none; } }

/* ---------- Signup ---------- */
.dpx-signup { position: relative; overflow: hidden; padding: clamp(72px, 9vw, 128px) 0; scroll-margin-top: var(--hdr); }
.dpx-signup > .wrap { position: relative; z-index: 2; }
.dpx-signup .dpx-float { filter: drop-shadow(0 22px 26px rgba(60, 40, 20, .25)); }
.dpx-signup__panel { position: relative; overflow: hidden; display: grid; gap: clamp(32px, 5vw, 72px); padding: clamp(28px, 5vw, 72px); border-radius: clamp(24px, 3vw, 40px); color: var(--on-ink); background: radial-gradient(60% 80% at 0% 0%, rgba(242, 106, 18, .22), rgba(242, 106, 18, 0) 60%), radial-gradient(60% 80% at 100% 100%, rgba(11, 111, 208, .3), rgba(11, 111, 208, 0) 60%), var(--ink); box-shadow: 0 50px 100px -40px rgba(10, 18, 34, .6); }
@media (min-width: 1000px) { .dpx-signup__panel { grid-template-columns: .9fr 1.1fr; align-items: center; } }
.dpx-signup__perks { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .9rem; }
.dpx-signup__perks li { display: flex; gap: .9rem; align-items: center; font-size: 1.02rem; }
.dpx-signup__perks li::before { content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(242, 106, 18, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f26a12' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }

.dpx-form { gap: 1.1rem; }
.dpx-form__grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .dpx-form__grid { grid-template-columns: 1fr 1fr; } }
.dpx-form .field label { font: 600 .9rem var(--f-display); color: var(--on-ink); }
.dpx-form .opt { color: var(--on-ink-muted); }
.dpx-form .field input[type="text"], .dpx-form .field input[type="email"], .dpx-form .field select {
  min-height: 56px; color: var(--white); background-color: rgba(255, 255, 255, .06); border: 1.5px solid rgba(255, 255, 255, .14); border-radius: 14px;
}
.dpx-form .field select { background-image: linear-gradient(45deg, transparent 50%, var(--on-ink) 50%), linear-gradient(135deg, var(--on-ink) 50%, transparent 50%); }
.dpx-form .field select option { color: var(--text); }
.dpx-form .field input::placeholder { color: rgba(238, 242, 248, .35); }
.dpx-form .field input:focus, .dpx-form .field select:focus { background-color: rgba(255, 255, 255, .1); border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242, 106, 18, .22); }
.dpx-form .field__err { color: #ffb4a8; }
.dpx-form [aria-invalid="true"] { border-color: #ff8a7a !important; }
.dpx-consent { padding: 1rem 1.1rem; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1.5px dashed rgba(255, 255, 255, .2); }
.dpx-consent input { accent-color: var(--orange); }
.dpx-form .dpx-consent label { font: 400 .95rem/1.5 var(--f-body); color: var(--on-ink); }
.dpx-consent__err { grid-column: 1 / -1; }
.dpx-form__end { display: grid; gap: .9rem; }
.dpx-form__note { margin: 0; font-size: .86rem; color: var(--on-ink-muted); text-align: center; }
.dpx-form__note a { color: var(--on-ink); }
.dpx-signup .alert { margin-bottom: 1.2rem; }

/* ---------- Work: horizontal gallery ---------- */
.dpx-work { position: relative; background: var(--cream); }
.dpx-work__pin { position: relative; overflow: hidden; }
.dpx-work__track { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(56px, 6vw, 88px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.dpx-work__track::-webkit-scrollbar { display: none; }
.dpx-work__intro { flex: none; width: min(86vw, 520px); scroll-snap-align: start; }
.dpx-work__hint { margin: 1.4rem 0 0; display: inline-flex; gap: .6rem; align-items: center; font: 600 .9rem var(--f-display); color: var(--muted); }
.dpx-work__hint span { color: var(--orange); letter-spacing: -.1em; }
.dpx-work__list { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(16px, 2.4vw, 36px); }
.dpx-piece { flex: none; width: clamp(240px, 26vw, 380px); scroll-snap-align: center; }
.dpx-piece:nth-child(odd) { margin-top: clamp(0px, 6vh, 64px); }
.dpx-piece figure { margin: 0; }
.dpx-piece__stage { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 28px; background: radial-gradient(60% 60% at 50% 45%, #faf6ef 0%, var(--cream-2) 100%); box-shadow: inset 0 0 0 1px rgba(10, 18, 34, .05); overflow: hidden; }
.dpx-piece__stage img { width: 84%; height: auto; filter: drop-shadow(0 16px 18px rgba(60, 40, 20, .18)); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.dpx-piece:hover .dpx-piece__stage img { transform: scale(1.06) rotate(-2deg); }
.dpx-piece figcaption { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: .8rem; padding: 1rem .3rem 0; }
.dpx-piece__no { font: italic 400 1.4rem var(--f-serif); color: var(--orange); }
.dpx-piece__name { font: 700 1.05rem/1.25 var(--f-display); color: var(--ink); letter-spacing: -.02em; }
.dpx-piece__type { font: 600 .72rem var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .35em .8em; border: 1px solid var(--cream-line); border-radius: 999px; }
.dpx-work__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(20px, 3vw, 36px); height: 2px; background: var(--cream-line); display: none; }
.dpx-work__bar span { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
/* When GSAP pins the gallery, the track moves instead of scrolling */
.dpx-work.is-pinned .dpx-work__pin { height: calc(100svh - var(--hdr)); display: flex; align-items: center; }
.dpx-work.is-pinned .dpx-work__track { overflow: visible; scroll-snap-type: none; padding-right: 12vw; will-change: transform; }
.dpx-work.is-pinned .dpx-work__bar { display: block; }

/* ---------- Knowledge base ---------- */
.dpx-kb { background: var(--ink); color: var(--on-ink); padding: clamp(80px, 10vw, 140px) 0; scroll-margin-top: var(--hdr); }
.dpx-kb__grid { display: grid; gap: clamp(40px, 6vw, 88px); align-items: start; }
@media (min-width: 1000px) {
  .dpx-kb__grid { grid-template-columns: .85fr 1.15fr; }
  .dpx-kb__intro { position: sticky; top: calc(var(--hdr) + 32px); }
}
.dpx-kb__lede { max-width: 40ch; margin: 0 0 1.8rem; color: #c3cddc; font-size: 1.08rem; }
.dpx-kb__search { position: relative; margin-bottom: 1.1rem; }
.dpx-kb__search[hidden], .dpx-kb__cats[hidden] { display: none; }
.dpx-kb__search svg { position: absolute; left: 18px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; fill: none; stroke: var(--on-ink-muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.dpx-kb__search input { width: 100%; min-height: 58px; padding: 0 1.2rem 0 3.2rem; border-radius: 16px; border: 1.5px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: var(--white); font: 500 1rem var(--f-body); transition: border-color .2s, background-color .2s, box-shadow .2s; }
.dpx-kb__search input::placeholder { color: rgba(238, 242, 248, .4); }
.dpx-kb__search input:focus { outline: none; border-color: var(--orange); background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 4px rgba(242, 106, 18, .22); }
.dpx-kb__cats { display: flex; flex-wrap: wrap; gap: .45rem; }
.dpx-kb__cat { padding: .5rem .95rem; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .16); background: transparent; color: var(--on-ink); font: 600 .84rem var(--f-display); cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.dpx-kb__cat:hover { border-color: rgba(255, 255, 255, .5); }
.dpx-kb__cat[aria-pressed="true"] { background: var(--white); border-color: var(--white); color: var(--ink); }
.dpx-kb__cat:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.dpx-kb__help { margin: 1.6rem 0 0; color: var(--on-ink-muted); font-size: .95rem; }
.dpx-kb__help a { color: var(--white); }

.dpx-kb__list { display: grid; gap: 2.2rem; }
.dpx-kb__group[hidden] { display: none; }
.dpx-kb__gh { margin: 0 0 .9rem; font: 600 .78rem var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--orange); }
.dpx-kb__item { border-radius: 18px; background: var(--ink-2); border: 1px solid var(--ink-3); margin-bottom: .6rem; transition: border-color .25s, background-color .25s; }
.dpx-kb__item[hidden] { display: none; }
.dpx-kb__item:hover { border-color: rgba(255, 255, 255, .22); }
.dpx-kb__item[open] { background: linear-gradient(170deg, var(--ink-2), #13213a); border-color: rgba(242, 106, 18, .45); }
.dpx-kb__item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.3rem; cursor: pointer; font: 700 1.05rem/1.35 var(--f-display); color: var(--white); letter-spacing: -.01em; }
.dpx-kb__item summary::-webkit-details-marker { display: none; }
.dpx-kb__item summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 18px; }
.dpx-kb__plus { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .08); transition: background-color .25s, transform .35s; }
.dpx-kb__plus::before, .dpx-kb__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--white); }
.dpx-kb__plus::after { transform: rotate(90deg); transition: transform .35s; }
.dpx-kb__item[open] .dpx-kb__plus { background: var(--orange); transform: rotate(180deg); }
.dpx-kb__item[open] .dpx-kb__plus::after { transform: rotate(0deg); }
.dpx-kb__a { padding: 0 1.3rem 1.25rem; }
.dpx-kb__a p { margin: 0; max-width: 62ch; color: #c3cddc; line-height: 1.7; }
.dpx-kb__empty { margin: 0; padding: 1.4rem; border-radius: 18px; border: 1.5px dashed rgba(255, 255, 255, .2); color: var(--on-ink); }
.dpx-kb__empty[hidden] { display: none; }
.dpx-kb__empty a { color: var(--white); }
@media (prefers-reduced-motion: reduce) { .dpx-kb__plus, .dpx-kb__plus::after { transition: none; } }

/* ---------- Materials index ---------- */
.dpx-mats { background: var(--cream); padding: clamp(80px, 10vw, 140px) 0; }
.dpx-mats__grid { display: grid; gap: clamp(40px, 6vw, 96px); align-items: center; }
@media (min-width: 1000px) { .dpx-mats__grid { grid-template-columns: 1fr 1fr; } }
.dpx-index { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1.5px solid var(--cream-line); }
.dpx-index li { border-bottom: 1.5px solid var(--cream-line); }
.dpx-index__btn { width: 100%; display: grid; grid-template-columns: 3rem 1fr auto; align-items: center; gap: 1rem; padding: 1.05rem .2rem; border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); }
.dpx-index__no { font: italic 400 1.3rem var(--f-serif); color: var(--muted); transition: color .25s; }
.dpx-index__name { font: 700 clamp(1.5rem, 1.1rem + 1.4vw, 2.4rem)/1.1 var(--f-display); letter-spacing: -.04em; color: #9a917f; transition: color .3s, transform .4s cubic-bezier(.2, .7, .2, 1); }
.dpx-index__arrow { font-size: 1.4rem; color: var(--orange); opacity: 0; transform: translateX(-10px); transition: opacity .3s, transform .3s; }
.dpx-index__btn:hover .dpx-index__name, .dpx-index__btn[aria-selected="true"] .dpx-index__name { color: var(--ink); transform: translateX(10px); }
.dpx-index__btn[aria-selected="true"] .dpx-index__no { color: var(--orange); }
.dpx-index__btn[aria-selected="true"] .dpx-index__arrow { opacity: 1; transform: none; }
.dpx-index__btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.dpx-mats__panel { position: relative; padding: clamp(24px, 3vw, 40px); border-radius: 32px; background: radial-gradient(60% 60% at 50% 40%, #fbf8f2, var(--cream-2)); }
.dpx-mats__stage { aspect-ratio: 1.15; display: grid; place-items: center; }
.dpx-mats__stage img { width: 74%; height: auto; filter: drop-shadow(0 22px 24px rgba(60, 40, 20, .2)); }
.dpx-mats__stage img[hidden] { display: none; }
.dpx-mats__none { max-width: 22ch; text-align: center; font: italic 400 clamp(1.6rem, 1.2rem + 1vw, 2.2rem)/1.2 var(--f-serif); color: var(--ink); margin: 0; }
.dpx-mats__none[hidden] { display: none; }
.dpx-mats__what { margin: 1rem 0 .4rem; font: 600 1.15rem/1.45 var(--f-display); color: var(--ink); }
.dpx-mats__best { margin: 0; color: var(--muted); }
.dpx-mats__best span { font-weight: 700; color: var(--orange-ink); }

/* ---------- Close ---------- */
.dpx-close { position: relative; overflow: hidden; background: var(--ink); color: var(--on-ink); padding: clamp(110px, 14vw, 200px) 0; text-align: center; }
.dpx-close__inner { position: relative; z-index: 2; }
.dpx-mega { font: 800 clamp(3rem, 1rem + 7.6vw, 8.6rem)/.9 var(--f-display); letter-spacing: -.06em; color: var(--white); margin: 0 auto 1.6rem; max-width: 12ch; }
.dpx-close__p { max-width: 46ch; margin: 0 auto 2.4rem; font-size: 1.12rem; color: #c3cddc; }
.dpx-close__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin: 0; }
.dpx-close__floats { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.dpx-float { position: absolute; display: block; height: auto; will-change: transform; pointer-events: none; }
.dpx-close .dpx-float { filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .45)); opacity: .9; }
.dpx-float--c1 { width: clamp(110px, 13vw, 220px); left: 4%; top: 10%; rotate: -12deg; }
.dpx-float--c2 { width: clamp(120px, 14vw, 240px); right: 5%; top: 8%; rotate: 10deg; }
.dpx-float--c3 { width: clamp(100px, 12vw, 200px); left: 9%; bottom: 8%; rotate: 8deg; }
.dpx-float--c4 { width: clamp(100px, 11vw, 190px); right: 10%; bottom: 10%; rotate: -8deg; }
@media (max-width: 899px) { .dpx-float--c1 { top: 3%; left: -20px; } .dpx-float--c2 { top: 2%; right: -24px; } .dpx-float--c3 { bottom: 2%; left: -16px; } .dpx-float--c4 { bottom: 2%; right: -16px; } .dpx-close .dpx-float { opacity: .55; } }
@media (max-width: 599px) { .dpx-close__actions .dpx-btn { width: 100%; } }

/* Before JS runs, keep animated pieces visible; JS hides them right before animating. */
@media (prefers-reduced-motion: reduce) {
  .dpx-btn, .dpx-btn::before, .dpx-piece__stage img, .dpx-index__name { transition: none; }
}

/* ==========================================================================
   Attraction layer: headline rotor, cursor glow, depth patches, fan, steps
   ========================================================================== */

/* Headline lines rise in from a clip; the italic word swaps with the material */
.dpx-l { display: block; overflow: clip; padding-bottom: .08em; margin-bottom: -.08em; }
.dpx-l > span { display: block; }
.dpx-rotor { display: inline-grid; vertical-align: top; overflow: clip; padding: 0 .12em .06em 0; margin-bottom: -.06em; }
.dpx-rotor__w { grid-area: 1 / 1; justify-self: start; }
.dpx-rotor__w:not(.is-on) { visibility: hidden; }

/* Soft spotlight that follows the cursor across the hero */
.dpx-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 30%), rgba(242, 106, 18, .13), rgba(11, 111, 208, .06) 40%, transparent 70%); }
.dpx-hero:hover .dpx-glow { opacity: 1; }

/* Out-of-focus patches deep in the background */
.dpx-ghost { position: absolute; z-index: 0; pointer-events: none; height: auto; opacity: .16; filter: blur(5px) saturate(.8); }
.dpx-ghost--1 { width: clamp(180px, 18vw, 300px); left: -70px; bottom: 6%; rotate: -14deg; }
.dpx-ghost--2 { width: clamp(120px, 11vw, 190px); left: 44%; bottom: -50px; rotate: 12deg; opacity: .12; }
@media (max-width: 999px) { .dpx-ghost { display: none; } }

.dpx-studio { transform-style: preserve-3d; will-change: transform; }

/* Signup: a fanned stack of real patches that spreads on hover */
.dpx-fan { display: flex; align-items: flex-end; height: 132px; margin-top: 2.4rem; padding-left: 30px; }
.dpx-fan img { width: 124px; height: auto; margin-left: -30px; filter: drop-shadow(0 18px 20px rgba(0, 0, 0, .45)); transition: transform .5s cubic-bezier(.2, .8, .2, 1.2); }
.dpx-fan img:nth-child(1) { transform: rotate(-12deg) translateY(6px); }
.dpx-fan img:nth-child(2) { transform: rotate(2deg) translateY(-8px); z-index: 1; }
.dpx-fan img:nth-child(3) { transform: rotate(13deg) translateY(4px); }
.dpx-signup__panel:hover .dpx-fan img:nth-child(1) { transform: rotate(-18deg) translate(-18px, 0); }
.dpx-signup__panel:hover .dpx-fan img:nth-child(2) { transform: rotate(0deg) translateY(-18px); }
.dpx-signup__panel:hover .dpx-fan img:nth-child(3) { transform: rotate(19deg) translate(18px, 0); }
@media (max-width: 599px) { .dpx-fan { height: 100px; } .dpx-fan img { width: 92px; margin-left: -22px; } }

/* How it works: five steps joined by a line that draws as you scroll */
.dpx-how { background: var(--cream); padding: clamp(72px, 9vw, 128px) 0; }
.dpx-how__head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.dpx-steps-wrap { position: relative; }
.dpx-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem 1.5rem; position: relative; }
@media (min-width: 900px) { .dpx-steps { grid-template-columns: repeat(5, 1fr); } }
.dpx-steps__line { position: absolute; background: var(--cream-line); border-radius: 2px; overflow: hidden; }
.dpx-steps__line span { position: absolute; inset: 0; background: var(--orange); transform-origin: 0 0; }
@media (min-width: 900px) {
  .dpx-steps__line { left: 10%; right: 10%; top: 27px; height: 3px; }
  .dpx-steps__line span { transform: scaleX(var(--p, 1)); }
  .dpx-step { text-align: center; }
  .dpx-step__no { margin-inline: auto; }
  .dpx-step p { max-width: 24ch; margin-inline: auto; }
}
@media (max-width: 899px) {
  .dpx-steps__line { left: 27px; top: 28px; bottom: 28px; width: 3px; }
  .dpx-steps__line span { transform: scaleY(var(--p, 1)); }
  .dpx-step { padding-left: 80px; }
  .dpx-step .dpx-step__no { position: absolute; left: 0; top: 0; }
}
.dpx-step { position: relative; }
.dpx-step__no { position: relative; z-index: 1; width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 1.2rem; border-radius: 50%; background: var(--orange); color: var(--white); font: 800 1.25rem var(--f-display); box-shadow: 0 0 0 6px var(--cream), 0 14px 28px -10px rgba(242, 106, 18, .7); transition: background-color .4s, color .4s, box-shadow .4s; }
.js-motion .dpx-step:not(.is-lit) .dpx-step__no { background: var(--white); color: var(--muted); box-shadow: 0 0 0 6px var(--cream), inset 0 0 0 2px var(--cream-line); }
.dpx-step__h { font: 800 1.2rem var(--f-display); letter-spacing: -.02em; color: var(--ink); margin: 0 0 .4rem; }
.dpx-step p { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) { .dpx-fan img, .dpx-glow, .dpx-step__no { transition: none; } }

/* Request form extras (bottom form) */
.dpx-form__grid--3 { border-radius: 16px; }
@media (min-width: 640px) { .dpx-form__grid--3 { grid-template-columns: repeat(3, 1fr); } }
.dpx-form .field textarea { width: 100%; min-height: 96px; padding: .85rem 1.1rem; font: inherit; color: var(--white); background-color: rgba(255, 255, 255, .06); border: 1.5px solid rgba(255, 255, 255, .14); border-radius: 14px; resize: vertical; }
.dpx-form .field textarea::placeholder { color: rgba(238, 242, 248, .35); }
.dpx-form .field textarea:focus { outline: none; background-color: rgba(255, 255, 255, .1); border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242, 106, 18, .22); }
.dpx-consent--opt { border-style: solid; border-color: rgba(255, 255, 255, .1); background: transparent; }
.dpx-form .dpx-consent .opt { color: var(--on-ink-muted); font-size: .82rem; }

/* ==========================================================================
   Phone layout fixes
   ========================================================================== */
@media (max-width: 899px) {
  /* Patch wall: intro on top, patches in a swipeable row underneath */
  .dpx-work__track { display: block; overflow: visible; padding: clamp(56px, 12vw, 80px) 0 clamp(48px, 10vw, 72px); }
  .dpx-work__intro { width: auto; padding: 0 var(--gutter); margin-bottom: 1.6rem; }
  .dpx-work__intro .dpx-h2 { margin-bottom: .6rem; }
  .dpx-work__hint { margin-top: .4rem; }
  .dpx-work__list { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 0 var(--gutter) 8px; scrollbar-width: none; gap: 14px; }
  .dpx-work__list::-webkit-scrollbar { display: none; }
  .dpx-piece { width: 72vw; max-width: 320px; scroll-snap-align: start; }
  .dpx-piece:nth-child(odd) { margin-top: 0; }
  .dpx-piece__stage { border-radius: 22px; }

  /* Materials: heading, then the picture, then the list, so a tap shows its result */
  .dpx-mats__grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .dpx-mats__list { display: contents; }
  .dpx-mats__list .dpx-eyebrow { order: 1; }
  .dpx-mats__list .dpx-h2 { order: 2; margin-bottom: 1.4rem; }
  .dpx-mats__panel { order: 3; padding: 16px 18px 18px; border-radius: 24px; }
  .dpx-mats__stage { aspect-ratio: 16 / 10; }
  .dpx-mats__stage img { width: 52%; }
  .dpx-mats__what { font-size: 1rem; margin-top: .4rem; }
  .dpx-mats__best { font-size: .92rem; }
  .dpx-index { order: 4; margin-top: 1.2rem; }
  .dpx-index__btn { padding: .8rem .2rem; }
  .dpx-index__name { font-size: 1.35rem; }

  /* Bottom form: no decorative patches crowding the panel or the fields */
  .dpx-signup .dpx-close__floats, .dpx-fan { display: none; }
  .dpx-signup__perks { margin-top: 1.4rem; }
}
@media (max-width: 599px) {
  .dpx-signup { padding: 48px 0 64px; }
  .dpx-signup__panel { padding: 24px 18px; border-radius: 24px; gap: 28px; }
  .dpx-how, .dpx-kb, .dpx-mats { padding: 64px 0; }
  .dpx-kb__item summary { padding: 1rem 1.05rem; font-size: 1rem; }
  .dpx-kb__a { padding: 0 1.05rem 1.1rem; }
}

/* Knowledge base "show all" toggle (only used on small screens) */
.dpx-kb__more { justify-self: start; display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.3rem; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .22); background: transparent; color: var(--white); font: 700 .95rem var(--f-display); cursor: pointer; }
.dpx-kb__more:hover { background: var(--white); color: var(--ink); }
.dpx-kb__more[hidden] { display: none; }
