{"version":3,"file":"FieldRamp.a4NatpVC.mjs","names":[],"sources":["https:/framerusercontent.com/modules/sd4qawyGGGzq6jbJgpTU/oSn1yCsJi8UxLZBpxQkI/FieldRamp.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Field Ramp — the closing-band ground.\n *\n * WHY THIS EXISTS\n * A flat solid colour reads inert, and the house rule is that every colour\n * field gets a subtle two-stop ramp of its own base. Framer cannot help here:\n * putting a CSS gradient into a native node's `backgroundColor` silently\n * becomes OPAQUE BLACK (it has blacked out a whole hero before), and\n * `backgroundColor` / `backgroundImage` are mutually exclusive, so a baked\n * gradient PNG would evict the colour and band at 8 bits over a 500px field.\n * Hence a code component: pure CSS, resolution independent, one instance per\n * band with its own props.\n *\n * THREE LAYERS, TOP TO BOTTOM\n *   1. KEY LIGHT   a warm cream wash from the upper left. This is the brand's\n *                  lighting direction (the object studies use the same one) and\n *                  it is what stops a dark band reading as a flat wall: the\n *                  field gets a direction, so anything sitting on it has a\n *                  reason to be brighter on one side. OFF by default\n *                  (keyStrength 0) so existing instances are untouched.\n *   2. HORIZON     the platform blue rising from below the bottom edge.\n *                  `glowRise` above 100 is deliberate: it puts the ellipse\n *                  centre off-frame so only its upper arc shows, which is a\n *                  horizon rather than a spotlight.\n *   3. BASE        the ramp itself, radial from the top edge (default) or a\n *                  linear ramp at `baseAngle` when a field wants a directional\n *                  fall, with an optional `mid` stop for a three-stop ramp.\n *\n * PLACEMENT — IT ALWAYS FILLS ITS PARENT\n * The plugin cannot set position or pins on a ComponentInstance, and Framer\n * has been seen dropping a freshly created instance at `left:-300px` inside a\n * wrapper that was meant to hold it at 100%/100%. So the component does not\n * trust the geometry it is handed: it spreads `props.style` first and then\n * forces absolute / inset 0 / no transform. Drop it in any wrapper Frame\n * (absolute inset 0, zIndex 0, overflow hidden) and it fills that wrapper\n * whatever Framer wrote on the instance. Same pattern as the DotGrid wrappers.\n *\n * Defaults reproduce the original ink treatment exactly — key off, no mid\n * stop, radial base — so nothing changes on an instance that does not opt in.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 460\n * @framerDisableUnlink\n */export default function FieldRamp(props){const{base=\"rgb(23, 26, 33)\",mid=\"\",midAt=44,deep=\"rgb(10, 11, 15)\",baseStyle=\"radial\",baseAngle=168,topLift=150,glow=\"rgb(7, 112, 207)\",glowTop=\"\",glowStrength=.72,glowFalloff=.42,glowSpread=78,glowRise=132,glowEnd=72,keyColor=\"rgb(255, 253, 245)\",keyStrength=0,keyX=14,keyY=-6,keySpread=58,radius=\"0px\"}=props;const layers=[];// 1. Key light. Three stops of one hue so it dissolves instead of ending\n// in a visible ellipse edge. Omitted entirely at strength 0.\nif(keyStrength>0){const k=a=>withAlpha(keyColor,a);layers.push(`radial-gradient(${keySpread}% ${Math.round(keySpread*1.28)}% at ${keyX}% ${keyY}%,`+` ${k(keyStrength)} 0%,`+` ${k(keyStrength*.375)} 40%,`+` ${k(0)} 70%)`);}// 2. Horizon. `glowTop` lets the core of the arc run a lighter blue than\n// its falloff, which is what keeps a blue-on-blue field from going muddy.\nif(glowStrength>0){const core=(glowTop||\"\").trim()||glow;layers.push(`radial-gradient(${glowSpread}% ${Math.round(glowSpread*1.38)}% at 50% ${glowRise}%,`+` ${withAlpha(core,glowStrength)} 0%,`+` ${withAlpha(glow,glowStrength*glowFalloff)} 42%,`+` ${withAlpha(glow,0)} ${glowEnd}%)`);}// 3. Base ramp.\nconst midStop=(mid||\"\").trim()?` ${mid} ${clampPct(midAt)}%,`:\"\";layers.push(baseStyle===\"linear\"?`linear-gradient(${baseAngle}deg, ${base} 0%,${midStop} ${deep} 100%)`:`radial-gradient(120% ${topLift}% at 50% 0%, ${base} 0%,${midStop} ${deep} 70%)`);return /*#__PURE__*/_jsx(\"div\",{style:{// Framer's geometry first, then override everything positional:\n// see PLACEMENT above. Opacity / visibility from the canvas survive.\n...props.style,position:\"absolute\",top:0,right:0,bottom:0,left:0,width:\"100%\",height:\"100%\",transform:\"none\",borderRadius:radius,background:layers.join(\", \")}});}/** Re-emit any css colour string as rgba() with the alpha we want. */function withAlpha(c,a){const s=(c||\"\").trim();const m=s.match(/^rgba?\\(([^)]+)\\)$/i);if(m){const parts=m[1].split(\",\").map(p=>p.trim());const[r,g,b]=parts;return`rgba(${r}, ${g}, ${b}, ${round(a)})`;}const hex=s.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);if(hex){let h=hex[1];if(h.length===3)h=h[0]+h[0]+h[1]+h[1]+h[2]+h[2];const n=parseInt(h,16);return`rgba(${n>>16&255}, ${n>>8&255}, ${n&255}, ${round(a)})`;}// Unknown format (a named colour, or a colour-style path that got\n// coerced): fall back to the brand blue rather than rendering nothing.\nreturn`rgba(7, 112, 207, ${round(a)})`;}function round(a){return Math.max(0,Math.min(1,Math.round(a*1e3)/1e3));}function clampPct(v){return Math.max(1,Math.min(99,Math.round(v)));}addPropertyControls(FieldRamp,{base:{type:ControlType.Color,title:\"Top\",defaultValue:\"rgb(23, 26, 33)\",description:\"Top of the ramp. Match any cap frame above the band to this.\"},mid:{type:ControlType.String,title:\"Mid\",defaultValue:\"\",description:\"Optional third stop, e.g. rgb(11, 66, 120). Empty = two-stop ramp.\"},midAt:{type:ControlType.Number,title:\"Mid at\",defaultValue:44,min:5,max:95,step:1,unit:\"%\"},deep:{type:ControlType.Color,title:\"Bottom\",defaultValue:\"rgb(10, 11, 15)\"},baseStyle:{type:ControlType.Enum,title:\"Ramp\",options:[\"radial\",\"linear\"],optionTitles:[\"From top edge\",\"Directional\"],defaultValue:\"radial\"},baseAngle:{type:ControlType.Number,title:\"Angle\",defaultValue:168,min:0,max:359,step:1,unit:\"\\xb0\",hidden:p=>p.baseStyle!==\"linear\"},topLift:{type:ControlType.Number,title:\"Top lift\",defaultValue:150,min:60,max:260,step:5,unit:\"%\",hidden:p=>p.baseStyle===\"linear\"},glow:{type:ControlType.Color,title:\"Horizon\",defaultValue:\"rgb(7, 112, 207)\"},glowTop:{type:ControlType.String,title:\"Horizon core\",defaultValue:\"\",description:\"Optional lighter blue for the core of the arc. Empty = same as Horizon.\"},glowStrength:{type:ControlType.Number,title:\"Horizon\",defaultValue:.72,min:0,max:1,step:.02,description:\"0 turns the horizon off and leaves the plain ramp.\"},glowFalloff:{type:ControlType.Number,title:\"Falloff\",defaultValue:.42,min:.1,max:1,step:.01,description:\"Alpha of the mid stop as a fraction of Horizon. Higher spreads the light further.\"},glowSpread:{type:ControlType.Number,title:\"Spread\",defaultValue:78,min:20,max:160,step:1,unit:\"%\"},glowRise:{type:ControlType.Number,title:\"Rise\",defaultValue:132,min:80,max:200,step:1,unit:\"%\",description:\"Above 100 keeps the ellipse centre below the frame, so only its arc shows.\"},glowEnd:{type:ControlType.Number,title:\"Horizon end\",defaultValue:72,min:40,max:99,step:1,unit:\"%\"},keyColor:{type:ControlType.Color,title:\"Key light\",defaultValue:\"rgb(255, 253, 245)\"},keyStrength:{type:ControlType.Number,title:\"Key\",defaultValue:0,min:0,max:.4,step:.01,description:\"Warm wash from the upper left. 0 = off. Around 0.16 gives a lit field rather than a flat wall.\"},keyX:{type:ControlType.Number,title:\"Key X\",defaultValue:14,min:-20,max:120,step:1,unit:\"%\",hidden:p=>!p.keyStrength},keyY:{type:ControlType.Number,title:\"Key Y\",defaultValue:-6,min:-40,max:120,step:1,unit:\"%\",hidden:p=>!p.keyStrength},keySpread:{type:ControlType.Number,title:\"Key spread\",defaultValue:58,min:20,max:140,step:1,unit:\"%\",hidden:p=>!p.keyStrength},radius:{type:ControlType.String,title:\"Radius\",defaultValue:\"0px\",description:\"Only needed when the ramp is not inside a clipping parent.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FieldRamp\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerIntrinsicHeight\":\"460\",\"framerContractVersion\":\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