/* =========================================================
   WORK — glowing project cards + interactive case studies
   ========================================================= */
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spinAng { to { --ang: 360deg; } }

.work { z-index: 4; }
.work-wrap { padding-top: 130px; padding-bottom: 120px; }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 56px; }
.work-head > div { display: flex; flex-direction: column; gap: 18px; }
.work-note { max-width: 340px; color: var(--muted-d); }
.work-note .mono { display: block; margin-top: 10px; color: var(--paper); }

.pgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; }
.pcard { grid-column: span 5; }
.pcard.pc-wide { grid-column: span 7; }

/* ---------- card ---------- */
.pcard {
  --ang: 0deg;
  position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 580px;
  border-radius: 30px; text-decoration: none; color: var(--paper);
  background: linear-gradient(180deg, #13131B, #0C0C12);
  transform: perspective(1400px) rotateX(var(--trx, 0deg)) rotateY(var(--try, 0deg));
  transition: transform .6s var(--ease);
}
.pcard:hover { color: var(--paper); }
.pcard.is-tilting { transition: transform .12s linear; }
/* animated glowing border ring */
.pcard::before, .pcard::after {
  content: ""; position: absolute; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--ang),
    rgba(255,255,255,.07) 0deg, var(--c1) 55deg, var(--c2) 100deg, rgba(255,255,255,.07) 160deg,
    rgba(255,255,255,.07) 230deg, var(--c3) 290deg, rgba(255,255,255,.07) 345deg);
  animation: spinAng 7s linear infinite;
}
.pcard::before {
  inset: 0; padding: 1.5px; z-index: 2; opacity: .6; transition: opacity .4s ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.pcard::after { inset: 10px; z-index: -1; filter: blur(30px); opacity: .16; transition: opacity .5s ease; }
.pcard:hover::before, .pcard:focus-visible::before { opacity: 1; }
.pcard:hover::after, .pcard:focus-visible::after { opacity: .55; }
.pcard:focus-visible { outline: none; }
.pcard-spot {
  position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(460px circle at var(--sx, 50%) var(--sy, 50%), color-mix(in srgb, var(--c1) 20%, transparent), transparent 60%);
}
.pcard:hover .pcard-spot { opacity: 1; }

.pcard-media { position: relative; z-index: 1; height: 330px; margin: 10px 10px 0; border-radius: 22px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pcard-info { position: relative; z-index: 3; flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 24px 28px 28px; }
.pcard-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted-d); }
.pcard h3 { font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 85; font-size: clamp(1.9rem, 2.7vw, 2.6rem); line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; }
.pcard p { color: var(--muted-d); font-size: 15.5px; max-width: 540px; }
.pcard-foot { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.pcard .tags { margin: 0; }
.pcard-open {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.18); font-weight: 700; font-size: 14px;
  transition: background-color .35s ease, border-color .35s ease, color .35s ease;
}
.pcard-open svg { transition: transform .35s var(--ease); }
.pcard:hover .pcard-open { background: var(--c1); border-color: var(--c1); color: #0B0B0F; }
.pcard:hover .pcard-open svg { transform: translateX(3px); }

/* media: Appetizer fan of real screenshots */
.pm-app { background: radial-gradient(70% 90% at 50% 100%, rgba(26,188,165,.85), #06211D 72%); }
.fan { position: relative; width: 100%; height: 100%; }
.fan-phone {
  position: absolute; left: 50%; bottom: -46px; width: 150px; aspect-ratio: 720 / 1561; padding: 5px; border-radius: 26px;
  background: #15151B; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.16), 0 30px 50px -18px rgba(0,0,0,.7);
  transition: transform .8s var(--ease);
}
.fan-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 21px; display: block; }
.fp-c { width: 166px; z-index: 2; transform: translateX(-50%); }
.fp-l { transform: translateX(-145%) translateY(34px) rotate(-10deg); }
.fp-r { transform: translateX(45%) translateY(34px) rotate(10deg); }
.pcard:hover .fp-c { transform: translateX(-50%) translateY(-18px); }
.pcard:hover .fp-l { transform: translateX(-172%) translateY(14px) rotate(-15deg); }
.pcard:hover .fp-r { transform: translateX(72%) translateY(14px) rotate(15deg); }
.pill-live { position: absolute; top: 16px; left: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(6,33,29,.7); border: 1px solid rgba(255,255,255,.16); font-size: 12.5px; font-weight: 700; backdrop-filter: blur(8px); }
.pill-live .dot { width: 7px; height: 7px; }

/* media: Pip */
.pm-pip { background: radial-gradient(60% 75% at 50% 62%, rgba(255,138,61,.55), #15163A 72%); }
.pip-hero { width: 168px; height: 168px; filter: drop-shadow(0 24px 30px rgba(0,0,0,.45)); animation: pipBob 4.2s ease-in-out infinite; transition: scale .6s var(--ease); }
.pcard:hover .pip-hero { scale: 1.08; }
@keyframes pipBob { 0%, 100% { translate: 0 0; rotate: -2deg; } 50% { translate: 0 -12px; rotate: 2deg; } }
.pip-orbit { position: absolute; inset: 0; }
.po-chip { position: absolute; padding: 7px 12px; border-radius: 999px; font-family: var(--f-mono); font-size: 12px; background: rgba(14,16,36,.66); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); animation: bob 5s ease-in-out infinite; }
.po1 { top: 16%; left: 10%; } .po2 { top: 22%; right: 9%; animation-delay: -1.2s; }
.po3 { bottom: 20%; left: 13%; animation-delay: -2.4s; } .po4 { bottom: 14%; right: 12%; animation-delay: -3.3s; }
.po1 { color: #6DF2C4; } .po2 { color: #FFB27A; }

/* media: SevenFold + Briefing reuse the browser/terminal mockups from style.css */
.pcard .browser, .pcard .terminal, .pcard .pdf { transition: transform .8s var(--ease); }
.pcard:hover .browser { transform: translateY(-8px) scale(1.02); }
.pcard:hover .terminal { transform: translateX(-38px) translateY(-6px); }
.pcard:hover .pdf { transform: rotate(2deg) translateY(-12px); }

.work-cta { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line-d); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }

/* ============ CASE STUDY OVERLAY ============ */
.case {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #07070B; color: var(--paper); overflow: hidden;
}
.case::backdrop { background: rgba(5, 5, 8, .5); }
.case[open] { animation: caseIn .8s var(--ease) both; }
.case.is-closing { animation: caseOut .5s var(--ease) both; }
@keyframes caseIn { from { clip-path: circle(0px at var(--ox, 50%) var(--oy, 50%)); } to { clip-path: circle(150vmax at var(--ox, 50%) var(--oy, 50%)); } }
@keyframes caseOut { from { clip-path: circle(150vmax at var(--ox, 50%) var(--oy, 50%)); } to { clip-path: circle(0px at var(--ox, 50%) var(--oy, 50%)); } }
.case-particles { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.case-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.case-bar {
  position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 28px;
  background: linear-gradient(180deg, rgba(7,7,11,.92), rgba(7,7,11,0));
}
.case-crumb { color: var(--muted-d); }
.case-close {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: var(--paper); backdrop-filter: blur(10px);
  transition: background-color .3s ease, color .3s ease;
}
.case-close:hover { background: var(--paper); color: var(--ink); }
.case-body { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; padding: 10px 28px 120px; }
.case-body > * { animation: csRise .9s var(--ease) both; }
.case-body > *:nth-child(2) { animation-delay: .12s; } .case-body > *:nth-child(3) { animation-delay: .22s; } .case-body > *:nth-child(n+4) { animation-delay: .3s; }
@keyframes csRise { from { opacity: 0; transform: translateY(40px); } }

.cs-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: end; padding: 40px 0 56px; border-bottom: 1px solid var(--line-d); }
.cs-kicker { font-family: var(--f-mono); font-size: 13px; color: var(--c1); letter-spacing: .06em; text-transform: uppercase; }
.cs-title { font-family: var(--f-display); font-weight: 900; font-variation-settings: "wdth" 75; font-size: clamp(3.4rem, 10vw, 9.5rem); line-height: .84; letter-spacing: -0.02em; text-transform: uppercase; margin: 16px 0 20px; }
.cs-title::after { content: ""; display: block; width: 120px; height: 6px; margin-top: 18px; border-radius: 3px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.cs-tagline { font-size: 20px; color: #D7D7E0; max-width: 560px; line-height: 1.5; }
.cs-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: 20px; overflow: hidden; background: var(--line-d); border: 1px solid var(--line-d); }
.cs-meta div { padding: 18px 20px; background: rgba(13,13,19,.88); display: flex; flex-direction: column; gap: 4px; }
.cs-meta span { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted-d); text-transform: uppercase; letter-spacing: .06em; }
.cs-meta b { font-size: 15.5px; }
.cs-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; }

.cs-section { padding: 72px 0; border-bottom: 1px solid var(--line-d); }
.cs-section:last-child { border-bottom: 0; }
.cs-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 32px; }
.cs-h h2 { font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 85; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; text-transform: uppercase; letter-spacing: -0.02em; }
.cs-h p { color: var(--muted-d); max-width: 420px; }
.cs-h .eyebrow { display: block; margin-bottom: 12px; color: var(--c1); }

.cs-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cs-ov { padding: 26px; border-radius: 22px; background: rgba(255,255,255,.035); border: 1px solid var(--line-d); backdrop-filter: blur(6px); }
.cs-ov span { display: block; font-family: var(--f-mono); font-size: 12px; color: var(--c1); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .06em; }
.cs-ov p { color: #D0D0DA; }

/* glowing frame shared by the interactive + map */
.cs-frame { --ang: 0deg; position: relative; border-radius: 28px; background: rgba(12,12,18,.78); backdrop-filter: blur(8px); isolation: isolate; }
.cs-frame::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--ang), rgba(255,255,255,.08) 0deg, var(--c1) 60deg, var(--c2) 110deg, rgba(255,255,255,.08) 170deg, rgba(255,255,255,.08) 250deg, var(--c3) 300deg, rgba(255,255,255,.08) 350deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinAng 9s linear infinite;
}

/* ---------- detail map ---------- */
.cs-mapwrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
.cs-map { position: relative; height: 520px; padding: 0; }
.cs-map svg.mlines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.mlines path { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 1.5; stroke-dasharray: 5 7; animation: dash 1.6s linear infinite; transition: stroke .3s ease, stroke-width .3s ease, opacity .3s ease; }
.mlines path.on { stroke: var(--c1); stroke-width: 2.5; filter: drop-shadow(0 0 6px var(--c1)); }
.cs-map.has-active .mlines path:not(.on) { opacity: .4; }
.mnode {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); z-index: 3;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 132px; max-width: 176px; padding: 11px 14px; border-radius: 16px;
  background: rgba(20,20,28,.92); border: 1px solid rgba(255,255,255,.14); color: var(--paper); text-align: left; cursor: pointer;
  transition: border-color .3s ease, box-shadow .3s ease, transform .4s var(--ease), background-color .3s ease;
}
.mnode b { font-size: 14px; line-height: 1.2; }
.mnode small { font-family: var(--f-mono); font-size: 11px; color: var(--muted-d); }
.mnode:hover { border-color: rgba(255,255,255,.4); transform: translate(-50%, -50%) scale(1.05); }
.mnode.is-active { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 18%, #14141C); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 22%, transparent), 0 0 30px color-mix(in srgb, var(--c1) 45%, transparent); }
.mnode.is-linked { border-color: color-mix(in srgb, var(--c1) 60%, transparent); }
.mdetail { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.mdetail .eyebrow { color: var(--c1); }
.mdetail h3 { font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 88; font-size: 1.7rem; line-height: 1.05; }
.mdetail p { color: #D0D0DA; }
.mdetail .mlinks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.mdetail .mlinks button { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-d); background: transparent; color: var(--muted-d); font-size: 12.5px; cursor: pointer; }
.mdetail .mlinks button:hover { color: var(--paper); border-color: rgba(255,255,255,.35); }
.mhint { font-family: var(--f-mono); font-size: 12px; color: var(--muted-d); }

/* ---------- features + stack ---------- */
.cs-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cs-feat { position: relative; padding: 28px 28px 28px 76px; border-radius: 22px; background: rgba(255,255,255,.035); border: 1px solid var(--line-d); transition: border-color .3s ease, transform .4s var(--ease); }
.cs-feat:hover { border-color: color-mix(in srgb, var(--c1) 60%, transparent); transform: translateY(-4px); }
.cs-feat i { position: absolute; left: 26px; top: 26px; font-style: normal; font-family: var(--f-mono); font-size: 13px; color: var(--c1); }
.cs-feat h3 { font-size: 18px; margin-bottom: 6px; }
.cs-feat p { color: var(--muted-d); font-size: 15px; }
.cs-stack { display: flex; flex-wrap: wrap; gap: 10px; }
.cs-stack span { padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line-d); font-weight: 600; font-size: 14px; }
.cs-next {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; width: 100%; margin-top: 8px; padding: 36px; border-radius: 28px; cursor: pointer;
  background: rgba(255,255,255,.035); border: 1px solid var(--line-d); color: var(--paper); text-align: left; transition: background-color .4s ease, border-color .4s ease;
}
.cs-next:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.3); }
.cs-next span { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted-d); display: block; margin-bottom: 8px; }
.cs-next b { font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 80; font-size: clamp(2rem, 5vw, 4rem); line-height: .95; text-transform: uppercase; }
.cs-next svg { flex-shrink: 0; width: 48px; height: 48px; transition: transform .4s var(--ease); }
.cs-next:hover svg { transform: translateX(8px); }

/* ---------- interactive widgets ---------- */
.cs-play { padding: 32px; }
.btn-c { background: var(--c1); color: #0B0B0F; }
.btn-c:hover { background: var(--c2); color: #0B0B0F; }
.btn-o { background: transparent; color: var(--paper); border: 1px solid rgba(255,255,255,.22); }
.btn-o:hover { border-color: var(--paper); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Appetizer: real-app carousel */
.w-app { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 44px; align-items: center; }
.wa-phone { position: relative; width: 290px; aspect-ratio: 720 / 1561; padding: 9px; border-radius: 46px; background: linear-gradient(145deg, #3A3A44, #121217 40%, #2A2A32); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18), 0 40px 80px -30px rgba(0,0,0,.8), 0 0 80px -20px color-mix(in srgb, var(--c1) 60%, transparent); touch-action: pan-y; cursor: grab; user-select: none; }
.wa-phone:active { cursor: grabbing; }
.wa-screen { position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: #000; }
.wa-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: translateX(30%) scale(.96); transition: opacity .5s ease, transform .7s var(--ease); pointer-events: none; }
.wa-screen img.is-on { opacity: 1; transform: none; }
.wa-screen img.is-prev { transform: translateX(-30%) scale(.96); }
.wa-island { position: absolute; top: 18px; left: 50%; width: 88px; height: 26px; margin-left: -44px; border-radius: 16px; background: #000; z-index: 2; }
.wa-tabs { display: flex; flex-direction: column; gap: 10px; }
.wa-tab { position: relative; overflow: hidden; display: grid; grid-template-columns: 42px 1fr; gap: 4px 14px; padding: 16px 18px; border-radius: 18px; text-align: left; cursor: pointer; background: rgba(255,255,255,.03); border: 1px solid var(--line-d); color: var(--paper); transition: background-color .3s ease, border-color .3s ease; }
.wa-tab i { grid-row: span 2; font-style: normal; font-family: var(--f-mono); font-size: 13px; color: var(--muted-d); padding-top: 3px; }
.wa-tab b { font-size: 17px; }
.wa-tab small { color: var(--muted-d); font-size: 14px; }
.wa-tab.is-on { background: color-mix(in srgb, var(--c1) 14%, transparent); border-color: color-mix(in srgb, var(--c1) 60%, transparent); }
.wa-tab.is-on i { color: var(--c1); }
.wa-tab::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--c1); transform: scaleX(0); transform-origin: left; }
.wa-tab.is-on.is-auto::after { animation: waFill 3.6s linear forwards; }
@keyframes waFill { to { transform: scaleX(1); } }
.wa-ctrl { display: flex; gap: 10px; margin-top: 6px; }

/* Pip: living pet + model router */
.w-pip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; }
.pip-shot { margin: 28px 0 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-d); background: #07070b; box-shadow: 0 24px 50px -20px rgba(0,0,0,.7); }
.pip-shot img { width: 100%; height: auto; display: block; }
.pip-shot figcaption { padding: 12px 18px; font-size: 12px; color: var(--muted-d); border-top: 1px solid var(--line-d); }
.wp-pet { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px; border-radius: 22px; background: radial-gradient(70% 70% at 50% 40%, rgba(255,138,61,.25), transparent 70%), rgba(255,255,255,.03); border: 1px solid var(--line-d); position: relative; overflow: hidden; }
.wp-svg { width: 190px; height: 190px; transition: transform .4s var(--ease); filter: drop-shadow(0 20px 24px rgba(0,0,0,.45)); }
.wp-svg .eye { transform-box: fill-box; transform-origin: center; transition: transform .35s var(--ease), height .3s ease, y .3s ease; animation: pipBlink 4.5s infinite; }
.wp-svg.is-jump { animation: pipJump .7s var(--ease); }
@keyframes pipJump { 30% { transform: translateY(-26px) rotate(-6deg) scale(1.06); } 60% { transform: translateY(0) scale(.96, 1.04); } }
@keyframes pipBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.wp-mood { width: 100%; max-width: 320px; }
.wp-mood-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.wp-mood-row b { color: var(--c2); }
.wp-bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.wp-bar i { display: block; height: 100%; width: var(--m, 60%); border-radius: inherit; background: linear-gradient(90deg, #FF8A3D, #6DF2C4); transition: width .6s var(--ease); }
.wp-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.wp-note { font-family: var(--f-mono); font-size: 12px; color: var(--muted-d); text-align: center; }
.heart { position: absolute; z-index: 4; color: #FF8A3D; font-size: 22px; pointer-events: none; animation: heartUp 1.2s var(--ease) forwards; }
@keyframes heartUp { to { transform: translate(var(--hx), -120px) scale(1.4); opacity: 0; } }
.wp-router { display: flex; flex-direction: column; gap: 14px; }
.wp-router h3 { font-size: 18px; }
.wp-router > p { color: var(--muted-d); font-size: 15px; }
.wr-prompts { display: flex; flex-direction: column; gap: 8px; }
.wr-prompt { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line-d); color: var(--paper); text-align: left; cursor: pointer; font-size: 14.5px; transition: border-color .3s ease, background-color .3s ease; }
.wr-prompt small { font-family: var(--f-mono); color: var(--muted-d); white-space: nowrap; }
.wr-prompt.is-on { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 12%, transparent); }
.wr-flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 6px; }
.wr-router { padding: 12px 16px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.3); font-family: var(--f-mono); font-size: 12.5px; text-align: center; }
.wr-arrow { height: 2px; background: linear-gradient(90deg, transparent, var(--c1)); position: relative; overflow: hidden; }
.wr-arrow::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #fff, transparent); transform: translateX(-100%); }
.wr-flow.is-go .wr-arrow::after { animation: sweep .6s ease; }
@keyframes sweep { to { transform: translateX(100%); } }
.wr-models { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wr-model { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line-d); transition: all .35s ease; }
.wr-model b { display: block; font-size: 14px; }
.wr-model small { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted-d); }
.wr-model.is-on { border-color: var(--c2); background: color-mix(in srgb, var(--c2) 14%, transparent); box-shadow: 0 0 24px color-mix(in srgb, var(--c2) 35%, transparent); }

/* SevenFold: launch planner */
.w-sf { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; }
.sf-opts { display: flex; flex-direction: column; gap: 10px; }
.sf-opts h3 { font-size: 18px; margin-bottom: 4px; }
.sf-opt { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.03); border: 1px solid var(--line-d); cursor: pointer; transition: border-color .3s ease, background-color .3s ease; }
.sf-opt input { appearance: none; flex-shrink: 0; width: 42px; height: 24px; border-radius: 12px; background: rgba(255,255,255,.15); position: relative; cursor: pointer; transition: background-color .3s ease; margin-top: 2px; }
.sf-opt input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.sf-opt input:checked { background: var(--c1); }
.sf-opt input:checked::after { transform: translateX(18px); }
.sf-opt input:focus-visible { outline: 2px solid var(--c2); outline-offset: 3px; }
.sf-opt b { display: block; font-size: 15.5px; }
.sf-opt small { color: var(--muted-d); font-size: 13.5px; }
.sf-opt:has(input:checked) { border-color: color-mix(in srgb, var(--c1) 60%, transparent); background: color-mix(in srgb, var(--c1) 10%, transparent); }
.sf-timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; display: flex; flex-direction: column; gap: 12px; }
.sf-timeline::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--c1), var(--c2)); border-radius: 2px; }
.sf-step { position: relative; padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,.035); border: 1px solid var(--line-d); animation: sfIn .55s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.sf-step::before { content: ""; position: absolute; left: -25px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: #07070B; border: 2px solid var(--c1); }
.sf-step b { font-size: 15.5px; }
.sf-step p { color: var(--muted-d); font-size: 14px; }
.sf-step small { display: inline-block; margin-top: 6px; font-family: var(--f-mono); font-size: 11.5px; color: var(--c2); }
.sf-count { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted-d); margin-bottom: 12px; }
@keyframes sfIn { from { opacity: 0; transform: translateX(20px); } }

/* Briefing: run the pipeline */
.w-br { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.br-term { border-radius: 18px; background: #050507; border: 1px solid var(--line-d); overflow: hidden; }
.br-term pre { margin: 0; min-height: 280px; padding: 18px 20px; font-family: var(--f-mono); font-size: 13.5px; line-height: 1.9; color: #D9D9E2; white-space: pre-wrap; }
.br-term .ln { display: block; animation: rise .35s var(--ease) both; }
.br-ctrl { display: flex; gap: 10px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.br-ctrl .mono { color: var(--muted-d); }
.br-pdf { position: relative; min-height: 380px; border-radius: 16px; background: #FBFAF6; color: var(--ink); padding: 26px 24px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); transform-origin: top center; opacity: .25; filter: blur(2px); transition: opacity .6s ease, filter .6s ease, transform .8s var(--ease); transform: rotate(2deg) translateY(10px); }
.br-pdf.is-ready { opacity: 1; filter: none; transform: none; }
.br-pdf h3 { font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; text-transform: uppercase; }
.br-pdf .br-date { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }
.br-pdf .br-label { margin: 16px 0 8px; font-family: var(--f-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.br-task { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #EAE7DF; font-size: 14.5px; cursor: pointer; }
.br-task input { width: 18px; height: 18px; margin-top: 2px; accent-color: #2F4BFF; cursor: pointer; }
.br-task:has(input:checked) span { text-decoration: line-through; color: var(--muted); }
.br-due { margin-left: auto; font-family: var(--f-mono); font-size: 11px; color: #C2410C; white-space: nowrap; }
.br-sample { position: absolute; top: 14px; right: 14px; font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); border: 1px solid #E2DED5; padding: 3px 8px; border-radius: 999px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .pcard, .pcard.pc-wide { grid-column: span 12; }
  .cs-hero { grid-template-columns: 1fr; }
  .cs-mapwrap { grid-template-columns: 1fr; }
  .w-app, .w-pip, .w-sf, .w-br { grid-template-columns: 1fr; }
  .wa-phone { margin: 0 auto; }
}
@media (max-width: 760px) {
  .work-wrap { padding-top: 100px; padding-bottom: 80px; }
  .pcard { min-height: 0; }
  .pcard-media { height: 270px; }
  .fan-phone { width: 120px; } .fp-c { width: 134px; }
  .pip-hero { width: 130px; height: 130px; }
  .case-body { padding: 0 18px 90px; }
  .case-bar { padding: 12px 16px; }
  .cs-overview, .cs-features { grid-template-columns: 1fr; }
  .cs-section { padding: 52px 0; }
  .cs-play { padding: 20px; }
  .cs-map { height: auto !important; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
  .cs-map svg.mlines { display: none; }
  .mnode { position: static; transform: none; max-width: none; width: 100%; }
  .mnode:hover { transform: none; }
  .wa-phone { width: 240px; }
  .wr-models { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pcard::before, .pcard::after, .cs-frame::before { animation: none; }
  .case[open], .case.is-closing, .case-body > * { animation: none; }
}
