/* Studio showcase: homepage Reel + /studio Infinite Canvas.
   Uses the site's tokens (--paper, --ink, --muted, --line, --accent) and its data-theme switch. */
.st-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.st-blue { color: #8aa4ff; }

/* ---------- pieces ---------- */
.st-piece { position: relative; display: block; text-align: left; border: 0; padding: 0; margin: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: none; }
.st-piece:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 16px; }
.st-cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; align-items: baseline; }
.st-cap b { font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.st-cap span { font-size: 12px; color: var(--muted); text-align: right; }

.st-browser { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14); }
.st-chrome { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #1c1f26; }
.st-chrome i { width: 8px; height: 8px; border-radius: 50%; background: #4a4f5a; }
.st-chrome span { margin-left: 10px; font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: #9aa0ab; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.st-viewport { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: #e9ecef; }
.st-viewport img { display: block; width: 100%; height: auto; transform: translateY(0); transition: transform 7s cubic-bezier(.45,0,.25,1); }
.st-piece:hover .st-viewport img, .st-viewport.is-auto img { transform: translateY(calc(-100% + var(--vh, 300px))); }
.st-viewport.is-auto img { transition-duration: 12s; }

.st-art { position: absolute; inset: 0; display: grid; align-content: end; padding: 22px; overflow: hidden; }
.st-art strong { position: relative; font-size: clamp(16px, 2vw, 24px); letter-spacing: -.035em; line-height: 1.04; font-weight: 720; }
.st-art-trader { background: radial-gradient(circle at 75% 30%, #233041, transparent 55%), #0b0f14; color: #fff; }
.st-art-trader::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 34px 34px; }
.st-art-trader svg { position: absolute; left: 8%; top: 16%; width: 84%; height: 46%; }
.st-art-transmuter { background: radial-gradient(circle at 50% 38%, #1d1a3a, #06060a 70%); color: #f5efe0; }
.st-hex { position: absolute; left: 50%; top: 36%; width: 70px; height: 70px; transform: translate(-50%, -50%); }

.st-film { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.st-film video { display: block; width: 100%; height: 100%; object-fit: cover; }
.st-play { position: absolute; left: 14px; bottom: 14px; display: inline-flex; gap: 8px; align-items: center; padding: 7px 11px; border-radius: 999px; background: rgba(0,0,0,.58); color: #fff; font: 600 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; }
.st-play::before { content: ""; border-left: 7px solid #fff; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }

.st-post { border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 24px 60px rgba(0,0,0,.3); background: #111; }
.st-post img { display: block; width: 100%; height: 100%; object-fit: cover; }

.st-phone { position: relative; aspect-ratio: 9 / 19; border-radius: 40px; padding: 10px; background: linear-gradient(145deg, #2a2d33, #0f1013); box-shadow: 0 24px 60px rgba(0,0,0,.3), inset 0 0 0 1.5px rgba(255,255,255,.12); }
.st-screen { height: 100%; border-radius: 31px; overflow: hidden; background: #e8f3ef; }
.st-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.st-notch { position: absolute; top: 18px; left: 50%; width: 30%; height: 20px; transform: translateX(-50%); border-radius: 999px; background: #0b0c0e; z-index: 2; }

/* ---------- homepage Reel ---------- */
#studio { padding-bottom: 60px; }
.st-reel { position: relative; width: min(calc(100% - 24px), 1500px); margin-inline: auto; border-radius: 28px; overflow: hidden; background: #0d0f14; color: #eef1f6; box-shadow: 0 26px 66px rgba(30,44,92,.13); }
.st-reel .st-cap b { color: #eef1f6; }
.st-reel .st-cap span { color: #8b919c; }
.st-reel-pin { height: min(78vh, 720px); min-height: 520px; display: flex; align-items: center; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.st-reel-pin::-webkit-scrollbar { display: none; }
.st-reel.is-live .st-reel-pin { overflow: hidden; scroll-snap-type: none; }
.st-reel-track { display: flex; align-items: center; gap: 72px; padding: 0 6vw; height: 100%; width: max-content; }
.st-room { display: flex; align-items: center; gap: 36px; height: 100%; }
.st-room > .st-piece, .st-room > .st-fan, .st-room > .st-tilt { scroll-snap-align: center; }
.st-room-label { writing-mode: vertical-rl; transform: rotate(180deg); display: flex; align-items: center; height: 56%; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.1); font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .3em; text-transform: uppercase; color: #8b919c; }
.st-room-label b { color: #eef1f6; margin-bottom: 14px; }
.st-reel-open { width: min(360px, 74vw); scroll-snap-align: start; }
.st-reel-open p { margin: 16px 0 0; color: #a9afba; font-size: 17px; line-height: 1.45; letter-spacing: -.01em; }
.st-count { display: flex; gap: 22px; margin-top: 26px; }
.st-count div { font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .08em; color: #8b919c; }
.st-count b { display: block; font: 700 32px/1.1 Inter, ui-sans-serif, -apple-system, sans-serif; letter-spacing: -.04em; color: #eef1f6; text-transform: none; }
.st-reel .w-web { width: min(560px, 74vw); }
.st-reel .w-film { width: min(620px, 78vw); }
.st-reel .w-post { width: min(250px, 52vw); }
.st-reel .w-phone { width: min(270px, 58vw); }
.st-fan { display: flex; align-items: center; }
.st-fan .st-piece { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.st-fan .st-piece:nth-child(1) { transform: rotate(-5deg) translateY(10px); }
.st-fan .st-piece:nth-child(2) { transform: rotate(2deg) translateY(-18px); margin-left: -40px; z-index: 2; }
.st-fan .st-piece:nth-child(3) { transform: rotate(6deg) translateY(14px); margin-left: -40px; }
.st-fan:hover .st-piece:nth-child(1) { transform: rotate(-2deg) translateX(-30px); }
.st-fan:hover .st-piece:nth-child(3) { transform: rotate(3deg) translateX(30px); }
.st-tilt { transition: transform .25s ease-out; }
.st-reel-end { width: min(400px, 76vw); scroll-snap-align: center; }
.st-reel-end h3 { margin: 12px 0 24px; font-size: clamp(34px, 4.2vw, 56px); letter-spacing: -.05em; line-height: .96; font-weight: 720; }
.st-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border-radius: 999px; background: #315cff; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; transition: transform .2s ease, background .2s ease; }
.st-btn:hover { transform: translateY(-2px); background: #2448e0; }
.st-reel-bar { position: absolute; left: 28px; right: 28px; bottom: 20px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.1); }
.st-reel-bar span { display: block; height: 100%; width: 0; border-radius: 2px; background: #8aa4ff; }
.st-reel-rooms { position: absolute; top: 20px; right: 26px; color: #8b919c; }
@media (max-width: 900px) {
  .st-reel { width: calc(100% - 12px); border-radius: 20px; }
  .st-reel-track { gap: 40px; padding: 0 20px; }
  .st-reel-pin { min-height: 480px; height: 72vh; }
  .st-room { gap: 24px; }
  .st-reel-rooms { display: none; }
}

/* ---------- viewer ---------- */
dialog.st-viewer { width: min(1100px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 18px; background: #000; color: #fff; overflow: hidden; }
dialog.st-viewer.is-post { width: min(560px, 94vw); }
dialog.st-viewer::backdrop { background: rgba(5,6,10,.84); }
.st-viewer-media video, .st-viewer-media img { display: block; width: 100%; height: auto; max-height: calc(92vh - 56px); object-fit: contain; background: #000; }
.st-viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; }
.st-viewer-close { border: 1px solid rgba(255,255,255,.25); background: none; color: #fff; border-radius: 999px; padding: 7px 12px; cursor: pointer; font: inherit; }

/* ---------- /studio Infinite Canvas ---------- */
.st-page main { position: relative; z-index: 2; }
.st-page-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding: 48px 0 24px; }
.st-page-head h1 { margin: 0; font-size: clamp(48px, 7vw, 104px); line-height: .9; letter-spacing: -.06em; font-weight: 760; }
.st-page-head h1 span { color: var(--accent); }
.st-page-head p { margin: 0; max-width: 42ch; color: var(--muted); font-size: 16px; line-height: 1.5; }
.st-canvas { position: relative; width: min(calc(100% - 24px), 1600px); margin: 0 auto 40px; height: calc(100vh - 230px); min-height: 520px; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background-color: color-mix(in srgb, var(--paper) 88%, #000 4%); background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1.2px, transparent 1.3px); background-size: 26px 26px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.st-canvas.is-dragging { cursor: grabbing; }
.st-world { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-origin: 0 0; will-change: transform; }
.st-item { position: absolute; left: var(--x); top: var(--y); width: var(--w); transition: opacity .35s ease, filter .35s ease; }
.st-item.is-dim { opacity: .14; filter: grayscale(1); pointer-events: none; }
.st-tilted { transform: rotate(var(--r)); transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.st-item:hover .st-tilted, .st-item.is-focused .st-tilted { transform: none; }
.st-canvas .st-cap b { color: var(--ink); }
.st-canvas-ui { position: absolute; left: 14px; right: 14px; top: 14px; z-index: 3; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.st-canvas-ui > * { pointer-events: auto; }
.st-seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 86%, transparent); }
.st-seg button { border: 0; background: none; color: var(--ink); padding: 7px 12px; border-radius: 999px; font: inherit; font-size: 12.5px; cursor: pointer; }
.st-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.st-seg [data-zoom] { min-width: 34px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.st-canvas-hint { position: absolute; left: 50%; bottom: 14px; z-index: 3; transform: translateX(-50%); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 88%, transparent); color: var(--muted); white-space: nowrap; pointer-events: none; }

/* phones and touch: the canvas becomes a simple scrolling grid */
.st-canvas.is-grid { height: auto; min-height: 0; cursor: auto; touch-action: auto; user-select: auto; -webkit-user-select: auto; padding: 72px 16px 24px; background-image: none; }
.st-canvas.is-grid .st-world { position: static; width: auto; height: auto; transform: none !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 34px 20px; align-items: start; }
.st-canvas.is-grid .st-item { position: static; width: auto; }
.st-canvas.is-grid .st-item[data-type="social"], .st-canvas.is-grid .st-item[data-type="app"] { max-width: 300px; }
.st-canvas.is-grid .st-tilted { transform: none; }
.st-canvas.is-grid .st-item.is-dim { opacity: 1; filter: none; pointer-events: auto; }
.st-canvas.is-grid [data-zoom], .st-canvas.is-grid .st-canvas-hint { display: none; }
.st-canvas.is-grid .st-zoom { display: none; }
@media (max-width: 760px) { .st-canvas-ui { left: 10px; right: 10px; } .st-seg button { padding: 7px 10px; } }

@media (prefers-reduced-motion: reduce) {
  .st-viewport img, .st-fan .st-piece, .st-tilted, .st-tilt { transition: none !important; }
  .st-viewport.is-auto img { transform: none; }
}
/* fanned posts share one caption instead of three overlapping ones */
.st-fan-wrap { display: flex; flex-direction: column; align-items: center; scroll-snap-align: center; }
.st-fan .st-cap { display: none; }
.st-fan-wrap > .st-cap { width: 100%; max-width: 560px; margin-top: 26px; }
.st-reel-pin { scroll-padding-inline: 20px; }
/* website previews from a screen recording */
.st-viewport video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; background: #06060a; }

/* ---------- Reel "cinema mode" (desktop, with GSAP) ----------
   The reel becomes a full-screen element clipped to the card's size (--cy/--cx/--cr), and GSAP
   opens the clip to the full screen while the work slides sideways, then closes it again.
   Negative margins keep the page spacing exactly as it was around the card. */
.st-reel.is-live {
  --card-h: max(520px, min(78vh, 720px));
  width: 100%; height: 100vh; margin-block: calc((var(--card-h) - 100vh) / 2);
  border-radius: 0; box-shadow: none;
  clip-path: inset(var(--cy, 0px) var(--cx, 0px) round var(--cr, 0px));
  will-change: clip-path;
}
.st-reel.is-live .st-reel-pin { height: 100vh; min-height: 0; }
.st-reel.is-live .st-reel-track { padding-left: calc(var(--cx0, 12px) + 5vw); padding-right: calc(var(--cx0, 12px) + 5vw); }
.st-reel.is-live .st-reel-bar { left: calc(var(--cx) + 28px); right: calc(var(--cx) + 28px); bottom: calc(var(--cy) + 20px); }
.st-reel.is-live .st-reel-rooms { top: calc(var(--cy) + 20px); right: calc(var(--cx) + 26px); }
/* room for the reel's glide-in, so the card never brushes the heading above it */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .st-reel.is-live { margin-top: calc((var(--card-h) - 100vh) / 2 + 110px); }
}
