/* Method · Data → Hero, scroll-driven. The visitor's scroll moves through 4 stages; each stage appears as a whole. */
.mscroll { --ms-bg: #1C1A19; --ms-panel: #24211F; --ms-line: #3A3532; --ms-soft: #2E2A27; --ms-text: #F4EFEA; --ms-muted: #B8ABA0; --ms-light: #D9C4B5; --ms-accent: var(--accent, #87574A);
  position: relative; height: 420vh; margin-top: clamp(32px, 4vw, 56px); }
.ms-stage { position: sticky; top: 76px; height: calc(100vh - 92px); height: calc(100svh - 92px); max-height: 820px; display: flex; flex-direction: column;
  background: var(--ms-bg); color: var(--ms-text); border-radius: 6px; padding: clamp(16px, 2.4vw, 32px); overflow: hidden; }
.ms-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ms-bar button { all: unset; cursor: pointer; position: relative; padding: 12px 0 4px; min-height: 32px; font: 500 11px/1.3 var(--sans, system-ui); letter-spacing: .14em; text-transform: uppercase; color: #8C817A; transition: color .3s; }
.ms-bar button:focus-visible { outline: 1px solid var(--ms-light); outline-offset: 4px; }
.ms-bar button b { font-weight: 500; color: var(--ms-accent); margin-right: 6px; }
.ms-bar button::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--ms-line); }
.ms-bar button i { position: absolute; top: 0; left: 0; height: 1px; width: calc(var(--f, 0) * 100%); background: var(--ms-light); }
.ms-bar button.on { color: var(--ms-text); }
.ms-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-top: 20px; }
.ms-copy { position: relative; height: 100%; min-height: 0; }
.ms-panel { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; transform: translateY(18px); transition: opacity .45s ease, transform .6s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.ms-panel.on { opacity: 1; transform: none; pointer-events: auto; }
.ms-panel h3 { font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 50px); line-height: 1.04; margin: 0; text-wrap: balance; color: var(--ms-text); }
.ms-panel p { color: var(--ms-muted); font-size: 15px; font-weight: 300; line-height: 1.6; max-width: 48ch; margin: 12px 0 0; }
.ms-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.ms-chips span { font-size: 13px; padding: 7px 12px; border: 1px solid var(--ms-line); border-radius: 999px; color: var(--ms-light); }
.ms-bp { margin-top: 20px; max-width: 600px; }
.ms-bp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.ms-bp-head span:first-child { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ms-light); }
.ms-bp-head span:last-child { font-size: 12px; font-weight: 300; color: #8C817A; text-align: right; }
.ms-bp-row { display: grid; grid-template-columns: 1.1fr 1.6fr 1.4fr 1fr; gap: 4px; }
.ms-bp-seg { padding: 10px 12px; border-radius: 3px; background: var(--ms-soft); border-top: 2px solid var(--ms-accent); }
.ms-bp-seg b { display: block; font-size: 12px; font-weight: 500; }
.ms-bp-seg span { font-size: 11px; font-weight: 300; color: var(--ms-muted); }
.ms-bp-static { margin: 10px 0 0 !important; font-size: 12px !important; color: #8C817A !important; }

/* the frame */
.ms-frame { position: relative; justify-self: end; width: 100%; max-width: 440px; aspect-ratio: 3 / 4; max-height: 100%; border: 1px solid var(--ms-line); border-radius: 4px; overflow: hidden; background: var(--ms-panel); }
.ms-frame > * { position: absolute; }
.ms-frame * { transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1), clip-path 1s cubic-bezier(.2,.7,.2,1), width .9s cubic-bezier(.2,.7,.2,1); }
.ms-hero { inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(0 0 100% 0); }
.ms-wash { inset: 0; background: linear-gradient(160deg, #8D857A 0%, #D2A495 42%, #7C423F 74%, #55121B 100%); opacity: 0; }
.ms-guides { inset: 0; width: 100%; height: 100%; opacity: .25; }
.ms-guides line { stroke: var(--ms-light); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 5; }
.ms-scan { left: 0; right: 0; top: 0; height: 1px; background: var(--ms-light); box-shadow: 0 0 18px 4px rgba(217,196,181,.35); opacity: 0; }
.ms-src { width: 40%; padding: 10px 12px; border-radius: 6px; background: rgba(28,26,25,.88); border: 1px solid var(--ms-line); font-size: 11.5px; color: var(--ms-light); opacity: 0; transform: translate(-50%, -50%) scale(.4); }
.ms-src em { display: block; height: 4px; border-radius: 2px; margin-top: 7px; background: var(--ms-soft); }
.ms-src em + em { width: 70%; }
.ms-sig { left: 10%; right: 10%; display: grid; grid-template-columns: 42% 1fr; gap: 10px; align-items: center; font-size: 11.5px; color: var(--ms-light); opacity: 0; transform: translateY(10px); }
.ms-sig .tr { height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.ms-sig .tr b { display: block; height: 100%; width: 0; background: var(--ms-accent); border-radius: 3px; }
.ms-sw { display: flex; gap: 6px; opacity: 0; }
.ms-sw span { width: 18px; height: 18px; border-radius: 50%; }
.ms-mix { inset: 0; overflow: hidden; opacity: 0; }
.ms-blob { position: absolute; left: 50%; top: 50%; width: 70%; aspect-ratio: 1; border-radius: 50%; filter: blur(36px); opacity: .85; animation: ms-swirl 7s ease-in-out infinite; animation-delay: var(--dl); }
.ms-core { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--ms-text); transform: translate(-50%, -50%); box-shadow: 0 0 30px 12px rgba(217,196,181,.45); animation: ms-pulse 1.75s ease-in-out infinite; }
.ms-pour { position: absolute; left: var(--sx); top: var(--sy); padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(217,196,181,.45); background: rgba(28,26,25,.7); font-size: 10.5px; letter-spacing: .06em; color: var(--ms-text); white-space: nowrap; opacity: 0; transform: translate(-50%, -50%); }
.ms-mixcap, .ms-cap { left: 12px; bottom: 10px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.ms-mixcap { position: absolute; color: var(--ms-light); }
.ms-cap { color: var(--ms-muted); }
.ms-br { width: 15%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.8); opacity: 0; --c: #F4EFEA; --k: 12px;
  background: linear-gradient(var(--c),var(--c)) top left/var(--k) 1.5px no-repeat, linear-gradient(var(--c),var(--c)) top left/1.5px var(--k) no-repeat, linear-gradient(var(--c),var(--c)) top right/var(--k) 1.5px no-repeat, linear-gradient(var(--c),var(--c)) top right/1.5px var(--k) no-repeat, linear-gradient(var(--c),var(--c)) bottom left/var(--k) 1.5px no-repeat, linear-gradient(var(--c),var(--c)) bottom left/1.5px var(--k) no-repeat, linear-gradient(var(--c),var(--c)) bottom right/var(--k) 1.5px no-repeat, linear-gradient(var(--c),var(--c)) bottom right/1.5px var(--k) no-repeat; }
.ms-tag { max-width: 90%; overflow: hidden; text-overflow: ellipsis; padding: 6px 10px; border-radius: 999px; background: rgba(28,26,25,.82); border: 1px solid rgba(217,196,181,.35); font-size: 11px; color: var(--ms-text); white-space: nowrap; opacity: 0; transform: translateY(8px); }

/* stage 1 · Data sourcing */
.ms-frame[data-step="0"] .ms-src { opacity: 1; transform: translate(-50%, -50%); }
.ms-frame[data-step="0"] .ms-scan { opacity: .9; animation: ms-scan 2.2s ease-in-out infinite; }
/* stage 2 · Insight mining */
.ms-frame[data-step="1"] .ms-wash { opacity: .55; }
.ms-frame[data-step="1"] .ms-sig, .ms-frame[data-step="1"] .ms-sw { opacity: 1; transform: none; }
.ms-frame[data-step="1"] .ms-sig .tr b { width: var(--w); }
/* stage 3 · Creative direction: the creative mix */
.ms-frame[data-step="2"] .ms-wash { opacity: .15; }
.ms-frame[data-step="2"] .ms-guides { opacity: .3; }
.ms-frame[data-step="2"] .ms-mix { opacity: 1; }
.ms-frame[data-step="2"] .ms-pour { animation: ms-pour 4.2s cubic-bezier(.5,0,.3,1) infinite; }
.ms-frame[data-step="2"] .ms-cap, .ms-frame[data-step="3"] .ms-cap { opacity: 0; }
/* stage 4 · Hero output */
.ms-frame[data-step="3"] .ms-hero { clip-path: inset(0 0 0 0); }
.ms-frame[data-step="3"] .ms-guides { opacity: 0; }
.ms-frame[data-step="3"] .ms-br { opacity: 1; transform: translate(-50%, -50%); }
.ms-frame[data-step="3"] .ms-tag { opacity: 1; transform: none; transition-delay: .5s; }

@keyframes ms-scan { 0%, 100% { top: 0; } 50% { top: 100%; } }
@keyframes ms-swirl { 0% { transform: translate(-50%, -50%) rotate(var(--a)) translateX(42%) scale(1); } 50% { transform: translate(-50%, -50%) rotate(calc(var(--a) + 180deg)) translateX(6%) scale(.75); } 100% { transform: translate(-50%, -50%) rotate(calc(var(--a) + 360deg)) translateX(42%) scale(1); } }
@keyframes ms-pour { 0% { opacity: 0; left: var(--sx); top: var(--sy); transform: translate(-50%, -50%) scale(1); } 12% { opacity: 1; } 60% { opacity: 1; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.7); } 78%, 100% { opacity: 0; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.2); } }
@keyframes ms-pulse { 50% { transform: translate(-50%, -50%) scale(1.6); box-shadow: 0 0 50px 20px rgba(217,196,181,.55); } }

@media (max-width: 799px) {
  .ms-stage { top: 64px; height: calc(100svh - 76px); }
  .ms-grid { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 14px; padding-top: 12px; }
  .ms-frame { order: -1; justify-self: center; height: 42svh; width: auto; max-width: 100%; }
  .ms-panel { justify-content: flex-start; }
  .ms-panel h3 { font-size: 28px; }
  .ms-panel p { font-size: 14px; }
  .ms-chips { margin-top: 12px; } .ms-chips span { font-size: 12px; padding: 5px 10px; }
  .ms-bar button { font-size: 9.5px; letter-spacing: .08em; }
  .ms-bar button b { display: block; margin: 0 0 2px; }
  .ms-src { font-size: 10px; padding: 7px 9px; }
  .ms-tag, .ms-pour { font-size: 10px; }
  .ms-bp { margin-top: 12px; }
  .ms-bp-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-bp-head span:last-child { display: none; }
  .ms-bp-seg { padding: 7px 10px; }
  .ms-bp-static { display: none; }
}
@media (hover: none) { .ms-bar button { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) {
  .ms-panel { transform: none; }
  .ms-frame[data-step="0"] .ms-scan { animation: none; opacity: 0; }
  .ms-blob, .ms-core { animation: none; }
  .ms-frame[data-step="2"] .ms-pour { animation: none; opacity: 1; }
}
