/* =========================================================
   03–04 · SELECTED WORK + SERVICES — edge-lit 3D panel worlds
   ========================================================= */
.worlds { position: relative; --scroller-h: 300vh; }
.worlds__intro {
  padding: var(--section-pad) var(--gutter) 0;
  display: grid; gap: 1.2rem; justify-items: start;
}
.worlds__title { font-family: var(--serif); font-weight: 400; font-size: var(--t-display); line-height: .92; letter-spacing: -.02em; }
.worlds__lede { font-size: var(--t-lead); color: var(--silver); max-width: 34ch; }
.worlds--industries .worlds__title { color: var(--white); }
.worlds--work .worlds__title::after, .worlds--industries .worlds__title::after {
  content: ""; display: block; width: 4.5rem; height: 1px; margin-top: 1.6rem;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.worlds__scroller { position: relative; height: var(--scroller-h); }
.worlds__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  perspective: 1700px; perspective-origin: 50% 46%;
}
.worlds__stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(55% 45% at 50% 55%, rgba(199,166,106,.06), transparent 70%);
}
.worlds--industries .worlds__stage::before { background: radial-gradient(60% 50% at 50% 55%, rgba(175,199,216,.045), transparent 70%); }
.worlds__drift, .worlds__world { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.worlds__hint {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 2rem); transform: translateX(-50%);
  font-size: .6rem; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--silver-dim);
  white-space: nowrap; pointer-events: none; z-index: 2;
}
.worlds__hint-touch { display: none; }
.worlds--work .worlds__scroller { --dummy: 0; }

/* ---------- the panel: a thin slab with a lit rim ---------- */
.panel {
  --pw: clamp(300px, 29vw, 460px);
  --t: 12px;                          /* slab thickness */
  --rim: #E5C58B;
  --rim-angle: 135deg;
  --rim-o: .5;
  --shade: 0;
  position: absolute; left: 0; top: 0; width: var(--pw);
  transform-style: preserve-3d; cursor: pointer; will-change: transform;
}
.panel--work { --pw: clamp(320px, 34vw, 600px); --t: 16px; }
.panel__float, .panel__box { position: relative; transform-style: preserve-3d; }
.panel__face {
  position: relative; display: block; outline: none;
  background: #0c0d10;
  transform: translateZ(calc(var(--t) / 2));
  box-shadow:
    0 60px 110px -50px rgba(0,0,0,.95),
    0 0 50px -18px color-mix(in srgb, var(--rim) 22%, transparent);
  transition: box-shadow 1s var(--ease);
}
.panel__back {
  position: absolute; inset: 0; background: linear-gradient(160deg, #17181c, #0a0b0d);
  transform: translateZ(calc(var(--t) / -2)) rotateY(180deg);
  backface-visibility: hidden;
}
.panel__edge { position: absolute; display: block; backface-visibility: hidden; }
.panel__edge--t, .panel__edge--b { left: 0; right: 0; height: var(--t); }
.panel__edge--l, .panel__edge--r { top: 0; bottom: 0; width: var(--t); }
.panel__edge--t {
  top: 0; transform-origin: 50% 0; transform: translateZ(calc(var(--t) / -2)) rotateX(90deg);
  background: linear-gradient(90deg, #3a3326, color-mix(in srgb, var(--rim) 70%, #2a2620) 50%, #3a3326);
}
.panel__edge--b {
  bottom: 0; transform-origin: 50% 100%; transform: translateZ(calc(var(--t) / -2)) rotateX(-90deg);
  background: linear-gradient(90deg, #0e0d0b, #2a2620 50%, #0e0d0b);
}
.panel__edge--l {
  left: 0; transform-origin: 0 50%; transform: translateZ(calc(var(--t) / -2)) rotateY(-90deg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--rim) 55%, #1d1a15), #1a1814 60%, #0d0c0a);
}
.panel__edge--r {
  right: 0; transform-origin: 100% 50%; transform: translateZ(calc(var(--t) / -2)) rotateY(90deg);
  background: linear-gradient(180deg, #2c271f, #14120f 60%, #0b0a09);
}
.panel__screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.panel__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.panel__glass {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.07) 0%, transparent 32%, transparent 70%, rgba(255,255,255,.03) 100%);
}
.panel__caption {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem 1rem; align-items: baseline;
  padding: .9rem 1rem 1rem;
  border-top: 1px solid rgba(244,242,237,.06);
}
.panel--work .panel__caption { padding: 1.2rem 1.3rem 1.3rem; }
.panel__meta { font-size: .56rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--silver-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel__meta b { color: var(--gold); font-weight: 700; margin-right: .5em; }
.panel__status { font-size: .52rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.panel__status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.panel__status--coming-soon { color: var(--ice); }
.panel__status--coming-soon::before { animation: pulse 2.4s var(--ease-in-out) infinite; }
.panel__status--concept { color: var(--silver); }
@keyframes pulse { 50% { opacity: .25; } }
.panel__title { font-family: var(--serif); font-size: 1.35rem; line-height: 1.1; color: var(--white); }
.panel--work .panel__title { font-size: clamp(1.5rem, 2.1vw, 2.1rem); }
.panel__sub { grid-column: 1 / -1; font-size: .78rem; color: var(--silver); letter-spacing: .01em; }
.panel--work .panel__sub { font-size: .86rem; }
.panel__view {
  font-size: .54rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-hi); white-space: nowrap;
  opacity: 0; transform: translateX(-6px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.panel.is-active .panel__view, .panel__face:focus-visible .panel__view { opacity: 1; transform: none; }

/* rim light: a 1px gradient border that brightens and turns with the cursor */
.panel__rim {
  position: absolute; inset: 0; pointer-events: none; padding: 1px;
  background: linear-gradient(var(--rim-angle),
    color-mix(in srgb, var(--rim) 95%, white) 0%,
    color-mix(in srgb, var(--rim) 25%, transparent) 22%,
    rgba(175,199,216,.08) 55%,
    color-mix(in srgb, var(--rim) 70%, transparent) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: var(--rim-o);
  transition: opacity 1s var(--ease);
}
.panel__sheen {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.07) 48%, transparent 62%);
  transition: opacity 1s var(--ease);
}
.panel__shade { position: absolute; inset: 0; background: var(--obsidian); opacity: var(--shade); pointer-events: none; transition: opacity 1s var(--ease); }
.panel.is-active { --rim-o: 1; }
.panel.is-active .panel__face {
  box-shadow:
    0 80px 130px -50px rgba(0,0,0,.95),
    0 0 70px -14px color-mix(in srgb, var(--rim) 40%, transparent);
}
.panel.is-active .panel__sheen { opacity: 1; }
.worlds.has-active .panel:not(.is-active) { --shade: .5; }
.panel__anchor { position: absolute; left: 50%; top: 50%; width: 1px; height: 1px; pointer-events: none; }
.panel__face:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 6px; }

/* ---------- Psy Academy: an intentional teaser ---------- */
.teaser {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .7rem; text-align: center;
  background: radial-gradient(90% 80% at 50% 110%, #1d2630 0%, #0d1015 55%, #08090b 100%);
  overflow: hidden; container-type: inline-size;
}
.teaser__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(175,199,216,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(175,199,216,.07) 1px, transparent 1px);
  background-size: 8% 14%;
  -webkit-mask: radial-gradient(70% 70% at 50% 50%, #000, transparent);
  mask: radial-gradient(70% 70% at 50% 50%, #000, transparent);
}
.teaser__glow { position: absolute; left: 50%; top: 58%; width: 60%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(rgba(175,199,216,.16), transparent 65%); }
.teaser__sweep {
  position: absolute; inset: -20%; background: linear-gradient(105deg, transparent 40%, rgba(229,197,139,.12) 50%, transparent 60%);
  animation: teaserSweep 6s var(--ease-in-out) infinite;
}
@keyframes teaserSweep { 0% { transform: translateX(-60%); } 60%, 100% { transform: translateX(60%); } }
.teaser > p { position: relative; margin: 0; }
.teaser__kicker { font-size: max(.5rem, 2.1cqi); font-weight: 600; letter-spacing: .4em; text-transform: uppercase; color: var(--ice); margin-right: -.4em; }
.teaser__word { font-family: var(--serif); font-size: max(1.8rem, 10.5cqi); line-height: .95; color: var(--white); letter-spacing: .01em; }
.teaser__when {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: .4rem !important;
  padding: .55em 1.1em; border: 1px solid rgba(229,197,139,.4);
  font-size: max(.5rem, 1.9cqi); font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-hi);
}
.teaser__when i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-hi); animation: pulse 2.4s var(--ease-in-out) infinite; }

/* ---------- three more sectors ---------- */
.worlds__more { display: flex; justify-content: center; padding: 2.5rem var(--gutter) 0; }
.more-btn {
  display: inline-grid; grid-template-columns: auto auto; column-gap: 1rem; row-gap: .25rem; align-items: center; text-align: left;
  padding: 1rem 1.6rem 1rem 1.2rem; border: 1px solid var(--line-strong);
  transition: border-color .5s var(--ease), background-color .5s var(--ease);
}
.more-btn:hover { border-color: rgba(229,197,139,.5); background: rgba(229,197,139,.04); }
.more-btn__plus { grid-row: 1 / 3; position: relative; width: 26px; height: 26px; border: 1px solid rgba(229,197,139,.5); border-radius: 50%; }
.more-btn__plus::before, .more-btn__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1px; background: var(--gold-hi); transform: translate(-50%, -50%); transition: transform .5s var(--ease); }
.more-btn__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.more-btn[aria-expanded="true"] .more-btn__plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.more-btn__label { font-size: var(--t-label); font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.more-btn__list { font-size: .8rem; color: var(--silver-dim); }

/* ---------- category switch ---------- */
.category-switch {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 1.4rem); z-index: 40;
  display: flex; padding: 4px; gap: 2px;
  background: rgba(8,9,11,.78); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transform: translate(-50%, 140%); opacity: 0; pointer-events: none;
  transition: transform .8s var(--ease), opacity .8s var(--ease);
}
.category-switch.is-visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.category-switch a {
  display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem;
  font-size: .62rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--silver);
  transition: color .4s var(--ease), background-color .4s var(--ease);
}
.category-switch em { font-style: normal; font-size: .6rem; color: var(--silver-dim); letter-spacing: 0; }
.category-switch a.is-current { background: var(--white); color: var(--obsidian); }
.category-switch a.is-current em { color: var(--gold); }
.worlds .worlds__hint { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 6.2rem); }
.worlds.has-active .worlds__hint { opacity: 0; transition: opacity .6s var(--ease); }

/* ---------- compact: cinematic carousel ---------- */
.worlds.is-carousel .worlds__scroller { height: auto; }
.worlds.is-carousel .worlds__stage { position: relative; height: auto; overflow: visible; perspective: none; padding-block: 3rem 6.5rem; }
.worlds.is-carousel .worlds__drift { position: relative; left: auto; top: auto; width: auto; height: auto; transform-style: flat; }
.worlds.is-carousel .worlds__world {
  position: relative; left: auto; top: auto; width: auto; height: auto;
  display: flex; overflow-x: auto; overflow-y: visible; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; transform-style: flat;
  padding-block: 2rem 3rem;
  padding-inline: calc(50vw - var(--cw) / 2);
  --cw: min(78vw, 420px);
}
.worlds.is-carousel .worlds__world::-webkit-scrollbar { display: none; }
.worlds.is-carousel .panel { position: relative; flex: none; width: var(--cw); scroll-snap-align: center; transform-origin: 50% 50%; }
.worlds.is-carousel .panel__view { opacity: 1; transform: none; }
.worlds.is-carousel .worlds__hint { bottom: 2.4rem; }
.worlds.is-carousel .worlds__hint-desktop { display: none; }
.worlds.is-carousel .worlds__hint-touch { display: inline; }
@media (max-width: 600px) {
  .panel__caption { grid-template-columns: 1fr; }
  .panel__status { grid-row: 1; }
  .panel__view { display: none; }
  .category-switch a { padding: .65rem .8rem; letter-spacing: .16em; }
}

/* =========================================================
   PROJECT / CONCEPT MODAL
   ========================================================= */
.concept-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; }
.concept-modal__backdrop { position: absolute; inset: 0; background: rgba(8,9,11,.94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.concept-modal__frame {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) min(420px, 34vw);
  background: var(--carbon);
}
.concept-modal__preview {
  position: relative; display: grid; place-items: center; overflow: hidden;
  padding: clamp(1.5rem, 4vw, 4rem);
  background: radial-gradient(70% 60% at 50% 50%, #17191e, #0a0b0d);
}
.concept-modal__shot {
  position: relative; width: 100%; max-height: 100%; aspect-ratio: 16 / 9;
  box-shadow: 0 50px 100px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(229,197,139,.25), 0 0 80px -30px rgba(229,197,139,.25);
}
.concept-modal__shot img { display: block; width: 100%; height: 100%; object-fit: contain; background: #0b0c0e; }
.concept-modal__shot--teaser { container-type: inline-size; }
.concept-modal__aside {
  position: relative; display: flex; flex-direction: column; gap: 1.1rem;
  padding: calc(env(safe-area-inset-top, 0px) + 5.5rem) 2.6rem calc(env(safe-area-inset-bottom, 0px) + 2.2rem);
  border-left: 1px solid var(--line); overflow-y: auto;
}
.concept-modal__index { font-size: var(--t-label); font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); font-variant-numeric: tabular-nums; }
.concept-modal__cat { font-size: .66rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--silver-dim); }
.concept-modal__title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 3.2vw, 3.3rem); line-height: 1; }
.concept-modal__sub { font-size: var(--t-label); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--silver); }
.concept-modal__desc { color: var(--silver); font-size: 1rem; }
.concept-modal__list { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .4rem; }
.concept-modal__list li { padding: .45rem .8rem; border: 1px solid var(--line-strong); font-size: .74rem; color: var(--white); }
.concept-modal__aside .btn { align-self: flex-start; }
.concept-modal__nav { margin-top: auto; display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.concept-modal__nav button { font-size: .64rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--silver); padding: .5rem 0; transition: color .3s; }
.concept-modal__nav button:hover { color: var(--gold-hi); }
.concept-modal__close {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 1.7rem); right: 2.6rem;
  font-size: .66rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--silver);
  display: inline-flex; gap: .6rem; padding: .5rem 0;
}
.concept-modal__close:hover { color: var(--white); }
@media (max-width: 900px) {
  .concept-modal__frame { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
  .concept-modal__preview { padding: calc(env(safe-area-inset-top, 0px) + 4rem) 1rem 1.5rem; }
  .concept-modal__aside { border-left: 0; border-top: 1px solid var(--line); padding: 1.6rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 2rem); gap: .9rem; overflow: visible; }
  .concept-modal__close { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 1rem); right: 1rem; background: rgba(8,9,11,.8); padding: .7rem 1rem; z-index: 2; }
  .concept-modal__nav { margin-top: 1rem; }
}

/* ---------- compact carousels: directional cue ---------- */
.carousel-cue { display: none; }
.worlds.is-carousel .carousel-cue { display: block; position: absolute; inset: 0; pointer-events: none; z-index: 120; }
.carousel-cue__fade { position: absolute; top: 0; bottom: 0; width: 14vw; max-width: 90px; opacity: 0; transition: opacity .5s var(--ease); }
.carousel-cue__fade--r { right: 0; background: linear-gradient(90deg, transparent, rgba(8,9,11,.85)); }
.carousel-cue__fade--l { left: 0; background: linear-gradient(270deg, transparent, rgba(8,9,11,.85)); }
.carousel-cue.has-next .carousel-cue__fade--r, .carousel-cue.has-prev .carousel-cue__fade--l { opacity: 1; }
.carousel-cue__btn {
  position: absolute; top: 50%; pointer-events: auto; display: inline-flex; align-items: center; gap: .55rem;
  height: 44px; min-width: 44px; padding: 0 .35rem; border-radius: 999px; justify-content: center;
  background: rgba(8,9,11,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(229,197,139,.55); color: var(--gold-hi);
  box-shadow: 0 0 0 1px rgba(229,197,139,.08), 0 10px 30px -10px rgba(0,0,0,.9), 0 0 22px -6px rgba(229,197,139,.45);
  transform: translateY(-50%); opacity: 0; visibility: hidden;
  transition: opacity .45s var(--ease), visibility 0s .45s, border-color .3s var(--ease);
}
.carousel-cue__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.carousel-cue__btn--next { right: max(10px, env(safe-area-inset-right, 0px)); padding: 0 .5rem 0 1rem; }
.carousel-cue__btn--prev { left: max(10px, env(safe-area-inset-left, 0px)); }
.carousel-cue__label { font-size: .56rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--white); }
.carousel-cue.has-next .carousel-cue__btn--next, .carousel-cue.has-prev .carousel-cue__btn--prev { opacity: 1; visibility: visible; transition: opacity .45s var(--ease), visibility 0s; }
/* the label only on the opening view; afterwards the arrows stay compact */
.carousel-cue.has-prev .carousel-cue__label { display: none; }
.carousel-cue.has-prev .carousel-cue__btn--next { padding: 0 .35rem; }
.carousel-cue__btn:active { border-color: var(--gold-hi); }
.carousel-cue__btn:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 3px; }
.carousel-cue__btn--next svg { animation: cueDrift 2.8s var(--ease-in-out) infinite; }
.carousel-cue.has-prev .carousel-cue__btn--next svg { animation: none; }
.carousel-cue.is-nudging .carousel-cue__btn--next { animation: cueNudge 1.1s var(--ease-in-out) 2; }
@keyframes cueDrift { 0%, 60%, 100% { transform: translateX(0); } 30% { transform: translateX(3px); } }
@keyframes cueNudge { 0%, 100% { transform: translateY(-50%) translateX(0); } 40% { transform: translateY(-50%) translateX(-7px); box-shadow: 0 0 0 1px rgba(229,197,139,.2), 0 10px 30px -10px rgba(0,0,0,.9), 0 0 34px -4px rgba(229,197,139,.7); } }
@media (prefers-reduced-motion: reduce) {
  .carousel-cue__btn--next svg, .carousel-cue.is-nudging .carousel-cue__btn--next { animation: none; }
}
