/* "Inside a cabinet": 3D cabinet moved with arrow buttons (home). Mobile first; a normal section, no scroll-jacking.
   Phone order: title, cabinet, arrows, step text, buttons. Desktop: copy on the left, cabinet on the right. */
.c3d { position: relative; padding-block: clamp(64px, 9vw, 120px); background: #0c0c0c; color: #f2f1ee; overflow: hidden; }
.c3d__grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "nav" "panels" "cta"; gap: 18px; }
.c3d__head { grid-area: head; display: grid; gap: 12px; justify-items: start; }
.c3d .ws-eyebrow { background: rgba(255, 255, 255, 0.08); color: #f2f1ee; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.c3d .ws-eyebrow::before { background: radial-gradient(circle at 50% 50%, #0c0c0c 0 3px, transparent 3.5px), linear-gradient(135deg, #ecc98a, #8a5e2c); }
.c3d__title { margin: 0; color: #f2f1ee; }
.c3d__lead { margin: 0; max-width: 46ch; font-size: 16px; line-height: 1.55; color: rgba(242, 241, 238, 0.78); }

.c3d__stage { grid-area: stage; position: relative; width: 100%; aspect-ratio: 5 / 4; max-height: 56svh; border-radius: 24px; overflow: hidden; background: #111; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); touch-action: pan-y; }
.c3d__backdrop { position: absolute; inset: 0; background: radial-gradient(70% 55% at 50% 40%, rgba(205, 161, 97, 0.2), transparent 70%), radial-gradient(120% 80% at 50% 100%, #1c1712, #0c0c0c 70%); }
.c3d__stage::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background-image: linear-gradient(rgba(227, 204, 152, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(227, 204, 152, 0.05) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%); }
.c3d__scene { position: absolute; inset: 0; z-index: 2; }
.c3d__scene canvas { width: 100% !important; height: 100% !important; display: block; }
.c3d__labels { position: absolute; inset: 0; pointer-events: none; }
.c3d__tag { position: absolute; left: 0; top: 0; padding: 4px 8px; border-radius: 6px; font: 600 11px/1 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.02em; color: #0c0c0c; background: #e3cc98; white-space: nowrap; opacity: 0; will-change: transform, opacity; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.c3d__swipe { position: absolute; z-index: 3; left: 50%; bottom: 10px; translate: -50% 0; margin: 0; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); font: 500 10.5px/1.2 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(242, 241, 238, 0.75); white-space: nowrap; pointer-events: none; }

.c3d__nav { grid-area: nav; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.c3d__arrow { width: 52px; height: 52px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: linear-gradient(135deg, #ecc98a, #b78543); color: #0c0c0c; box-shadow: 0 6px 20px rgba(205, 161, 97, 0.35); transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s; }
.c3d__arrow svg { width: 24px; height: 24px; }
.c3d__arrow:hover:not(:disabled) { transform: scale(1.06); box-shadow: 0 8px 26px rgba(205, 161, 97, 0.5); }
.c3d__arrow:active:not(:disabled) { transform: scale(0.96); }
.c3d__arrow:disabled { opacity: 0.28; cursor: default; box-shadow: none; }
.c3d__arrow:focus-visible { outline: 2px solid #f2f1ee; outline-offset: 3px; }
.c3d__count { min-width: 0; display: grid; justify-items: center; gap: 6px; text-align: center; font: 500 12px/1.3 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(242, 241, 238, 0.7); }
.c3d__count b { color: #f2f1ee; font-weight: 600; }
.c3d__name { color: #cda161; overflow-wrap: anywhere; }
.c3d__rule { display: block; width: 100%; max-width: 140px; height: 2px; border-radius: 2px; background: rgba(242, 241, 238, 0.15); overflow: hidden; }
.c3d__rule b { display: block; height: 100%; background: #cda161; transform-origin: left; transform: scaleX(0.2); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }

.c3d__panels { grid-area: panels; }
.c3d__panel { display: grid; gap: 10px; padding: 18px 20px; border-radius: 20px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.c3d__panel[hidden] { display: none; }
.c3d__panel + .c3d__panel { margin-top: 12px; }
/* All step texts share one grid cell, so the box always has the height of the longest step:
   the arrows and the buttons under it never move when the step changes. */
.is-js .c3d__panels { display: grid; }
.is-js .c3d__panel { grid-area: 1 / 1; margin-top: 0; }
.is-js .c3d__panel.is-off { visibility: hidden; }
.is-js .c3d__panel:not(.is-off) { animation: c3d-in 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes c3d-in { from { opacity: 0; transform: translateY(8px); } }
.c3d__step { margin: 0; font: 500 11px/1.5 "Geist Mono", ui-monospace, monospace; letter-spacing: 0.14em; text-transform: uppercase; color: #cda161; }
.c3d__h { margin: 0; font: 700 21px/1.2 "Bricolage Grotesque", sans-serif; letter-spacing: -0.03em; color: #f2f1ee; }
.c3d__text { margin: 0; color: rgba(242, 241, 238, 0.8); font-size: 15px; line-height: 1.55; }
.c3d__chips { display: inline-flex; gap: 6px; padding: 4px; margin-top: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); justify-self: start; }
.c3d__chip { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: rgba(242, 241, 238, 0.8); font: 600 14px/1 "Inter", sans-serif; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.c3d__chip[aria-pressed="true"] { background: #cda161; color: #0c0c0c; }
.c3d__chip:focus-visible { outline: 2px solid #f2f1ee; outline-offset: 2px; }
.c3d__cta { grid-area: cta; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 4px; }
.c3d .ws-btn--primary { --cta: #cda161; --on-cta: #0c0c0c; --cta-chip: #0c0c0c; --on-cta-chip: #cda161; }
.c3d__link { color: #f2f1ee; font-weight: 600; text-underline-offset: 4px; }

/* Without JS: no 3D and no arrows, the five steps as a list. */
.c3d:not(.is-js) .c3d__stage, .c3d:not(.is-js) .c3d__nav { display: none; }
@media (max-width: 360px) { .c3d__arrow { width: 46px; height: 46px; } .c3d__count { font-size: 11px; letter-spacing: 0.08em; } .c3d__panel { padding: 16px; } .c3d__h { font-size: 19px; } }

@media (min-width: 900px) {
  .c3d__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-areas: "head stage" "panels stage" "nav stage" "cta stage"; grid-template-rows: auto auto auto 1fr; column-gap: clamp(32px, 5vw, 72px); row-gap: 22px; align-items: start; }
  .c3d__stage { aspect-ratio: auto; height: min(620px, 74vh); max-height: none; align-self: center; }
  .c3d__nav { grid-template-columns: auto auto auto; justify-content: start; gap: 18px; }
  /* Fixed width: a long step name never pushes the right arrow sideways. */
  .c3d__count { justify-items: start; text-align: left; width: 230px; }
  .c3d__lead { font-size: 18px; }
  .c3d__h { font-size: clamp(24px, 2.2vw, 30px); }
  .c3d__panel { padding: 24px 26px; }
  .c3d__tag { font-size: 12px; padding: 5px 9px; }
  .c3d__swipe { display: none; }
}
