/* My Branded Can — "Two-thirds theirs" scroll story component.
   Uses the site tokens from site.css. Layout only; all motion is driven from wrap-story.js. */

.ws { position: relative; background: var(--paper); padding-block: 0; }
/* the section is tall only when the live (scroll-driven) version runs */
.ws.ws-live { height: calc(var(--ws-length, 520) * 1vh); }
.ws-sticky { position: relative; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr); grid-template-rows: minmax(0, 1fr) auto; column-gap: clamp(24px, 4vw, 64px); max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.ws-live .ws-sticky { position: sticky; top: calc(72px + env(safe-area-inset-top, 0px)); height: calc(100vh - 72px - env(safe-area-inset-top, 0px)); height: calc(100svh - 72px - env(safe-area-inset-top, 0px)); overflow: hidden; }

/* copy: the three steps share one grid cell and cross-fade */
.ws-copy { display: grid; align-items: center; min-width: 0; }
.ws-step { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 18px; will-change: opacity, transform; }
.ws-step .h1 { font-size: clamp(30px, 4vw, 58px); }
.ws-step .lead { font-size: clamp(16px, 1.35vw, 19px); }
.ws-live .ws-step[data-step="b"], .ws-live .ws-step[data-step="c"] { opacity: 0; }

/* stage */
.ws-stage { position: relative; min-width: 0; min-height: 0; }
.ws-flat { z-index: 2; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(100%, 860px); will-change: opacity, transform; }
.ws-sheet { position: relative; aspect-ratio: 2 / 1; max-width: 100%; background: var(--alloy); display: flex; container-type: inline-size; }

/* production screen: the print file open on a designer's machine */
.ws-screen { background: #161616; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px #0B0B0B, 0 40px 70px -40px rgba(17,17,17,.55); }
.ws-bar { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; background: #1F1F1F; border-bottom: 1px solid #0B0B0B; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: rgba(242,240,235,.5); }
.ws-bar i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #3A3A3A; }
.ws-file { flex: 1; min-width: 0; margin-left: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-load { flex: none; text-transform: uppercase; color: rgba(242,240,235,.78); white-space: nowrap; }
.ws-load::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; background: var(--signal); vertical-align: 1px; }
.ws-board { padding: 30px 30px 16px; background: #1A1A1A radial-gradient(rgba(242,240,235,.07) 1px, transparent 1.2px) 0 0 / 16px 16px; }
.ws-board .ws-crop { border-color: rgba(242,240,235,.45); }
.ws-board .ws-keys { color: var(--paper); }
.ws-board .ws-keys > div:first-child .ws-rule { background: var(--paper); }
/* the placeholder artwork waiting to be replaced */
.ws-ph { position: absolute; inset: 0 33.333% 0 0; display: grid; place-items: center; z-index: 0; pointer-events: none; }
.ws-ph span { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(20px, 4.6vw, 62px); font-size: 6.6cqw; line-height: .95; text-align: center; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
/* print-template detail on the blank sheet */
.ws-sheet::before { content: ""; position: absolute; inset: 0; border: 1px solid rgba(17,17,17,.35); pointer-events: none; z-index: 3; }
.ws-sheet::after { content: ""; position: absolute; top: 0; bottom: 0; left: 66.666%; border-left: 1px dashed rgba(17,17,17,.45); z-index: 3; }
.ws-template { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 12px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: rgba(17,17,17,.6); z-index: 0; }
.ws-template span:last-child { align-self: flex-end; }
.ws-crop { position: absolute; width: 14px; height: 14px; border-color: rgba(17,17,17,.55); border-style: solid; border-width: 0; z-index: 3; }
.ws-crop.tl { top: -18px; left: -18px; border-right-width: 1px; border-bottom-width: 1px; }
.ws-crop.tr { top: -18px; right: -18px; border-left-width: 1px; border-bottom-width: 1px; }
.ws-crop.bl { bottom: -18px; left: -18px; border-right-width: 1px; border-top-width: 1px; }
.ws-crop.br { bottom: -18px; right: -18px; border-left-width: 1px; border-top-width: 1px; }
.ws-brand, .ws-legal { position: relative; height: 100%; overflow: hidden; z-index: 1; }
.ws-brand { flex: 2; }
.ws-legal { flex: 1; }
.ws-brand canvas, .ws-legal canvas { display: block; width: 100%; height: 100%; }
.ws-live .ws-brand { clip-path: inset(0 100% 0 0); }
.ws-live .ws-legal { clip-path: inset(0 0 100% 0); }
/* the "print head": a thin orange line at the edge of each reveal */
.ws-head { position: absolute; z-index: 4; background: var(--signal); opacity: 0; pointer-events: none; }
.ws-head-brand { top: 0; bottom: 0; width: 2px; left: 0; }
.ws-head-legal { left: 66.666%; right: 0; height: 2px; top: 0; }

.ws-keys { display: flex; margin-top: 14px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ws-keys > div { position: relative; padding-top: 10px; }
.ws-keys > div:first-child { flex: 2; }
.ws-keys > div:last-child { flex: 1; padding-left: 2px; }
.ws-keys b { font-family: var(--display); font-stretch: 125%; font-weight: 900; margin-right: 6px; }
.ws-rule { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--ink); transform-origin: left; }
.ws-keys > div:last-child .ws-rule { background: var(--signal); left: 2px; }
.ws-live .ws-rule { transform: scaleX(0); }
.ws-live .ws-keys > div { opacity: 0; }

/* 3D can */
.ws-gl { z-index: 1; position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; pointer-events: none; }
.ws-shadow { position: absolute; width: 180px; height: 26px; margin-left: -90px; margin-top: -13px; border-radius: 50%; background: radial-gradient(closest-side, rgba(17,17,17,.32), rgba(17,17,17,0)); opacity: 0; pointer-events: none; }

/* production status readout */
.ws-status { position: absolute; top: 12px; left: 0; z-index: 4; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--graphite); opacity: 0; pointer-events: none; white-space: nowrap; }
.ws-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; background: var(--signal); vertical-align: 1px; }
.ws-static .ws-status { display: none; }

/* 2D fallback can (no WebGL) */
.ws-can2d { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: 78%; aspect-ratio: 66 / 115; opacity: 0; }
.ws-can2d .lbl { position: absolute; left: 0; right: 0; top: 2.5%; bottom: 5%; background-repeat: repeat-x; background-size: 200% 100%; }
.ws-can2d .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.5), rgba(0,0,0,.15) 8%, rgba(255,255,255,.28) 24%, rgba(255,255,255,0) 40%, rgba(0,0,0,0) 62%, rgba(0,0,0,.2) 84%, rgba(0,0,0,.55)); }
.ws-can2d .top, .ws-can2d .bot { position: absolute; left: 0; right: 0; background: linear-gradient(90deg, #7A7E83, #F4F5F6 24%, #C3C6CA 50%, #E8EAEC 66%, #6F7378); }
.ws-can2d .top { top: 0; height: 2.5%; clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); }
.ws-can2d .bot { bottom: 0; height: 5%; clip-path: polygon(0 0, 100% 0, 94% 100%, 6% 100%); }

/* footer: scroll cue + progress */
.ws-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 14px 22px; border-top: 1px solid var(--rule); }
.ws-cue { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); white-space: nowrap; }
.ws-cue span { display: inline-block; color: var(--signal); margin-left: 6px; }
.ws-progress { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); }
.ws-progress li { position: relative; padding-top: 8px; min-width: 64px; }
.ws-progress li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--rule); }
.ws-progress li i { position: absolute; top: 0; left: 0; height: 2px; width: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.ws-progress li.on { color: var(--ink); }

@media (max-width: 860px) {
  .ws-board { padding: 22px 22px 12px; }
  .ws-bar { height: 26px; padding: 0 10px; font-size: 9.5px; gap: 6px; }
  .ws-bar i { width: 7px; height: 7px; }
  .ws-load::before { width: 5px; height: 5px; margin-right: 5px; }
  .ws-sticky { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .ws-copy { padding-top: 22px; align-items: start; }
  .ws-step { gap: 10px; }
  .ws-step .h1 { font-size: clamp(28px, 7.4vw, 40px); }
  .ws-step .label { font-size: 11.5px; }
  .ws-progress { gap: 10px; font-size: 11px; }
  .ws-progress li { min-width: 0; }
  .ws-cue { font-size: 11.5px; }
  .ws-keys { font-size: 11px; }
}
@media (max-width: 420px) { .ws-progress li:nth-child(n) { display: block; } .ws-cue { display: none; } }

/* static version: reduced motion, or no JavaScript */
.ws-static .ws-sticky { grid-template-rows: auto; row-gap: 40px; padding-block: clamp(64px, 9vw, 120px); }
.ws-static .ws-copy { display: flex; flex-direction: column; gap: 40px; }
.ws-static .ws-stage { display: flex; flex-direction: column; gap: 48px; align-items: center; }
.ws-static .ws-flat { position: relative; left: auto; top: auto; transform: none; width: 100%; }
.ws-static .ws-gl { position: relative; inset: auto; height: 520px; opacity: 1; }
.ws-static .ws-shadow, .ws-static .ws-foot { display: none; }
