/* NEXLUNE AI v37 — visual-craft.css — Visual Craft Studio (Studio 5).
   .vc-* classes for the six studio pages (index, kit, assets,
   generate, logos, exports) + the bldbrand launch screen (scoped to
   #page-team #tool-bldbrand, mirroring content.css/automation.css).
   Aurora tokens (--nx-*) and the theme vars from style.css.
   .btn-lime is NOT redeclared site-wide — it is scoped to .vc-page
   only, where the aurora fill replaces the base gradient (the base
   .btn-lime gradient fails WCAG AA at 2.72:1; the aurora fill's
   worst stop is 4.69:1 — see d1_contrast.py, v34.1).
   Every new text pair passes WCAG AA in BOTH themes
   (verified in visual-craft/w2_check.py — worst text pair 4.69:1,
   white on #6D5DF0). Gradient tiles carry NO text (icon/decoration
   only); all text sits on --surface/--surface2 or the hero. */
:root{
  --vc-border:rgba(255,255,255,.10);
  --vc-chip:rgba(255,255,255,.06);
  --vc-accent:#A78BFA;
  --vc-ok:#4ADE80;
  --vc-warn:#FBBF24;
  --vc-err:#FCA5A5;
}
html[data-theme="light"]{
  --vc-border:rgba(11,14,30,.12);
  --vc-chip:rgba(11,14,30,.05);
  --vc-accent:#4A3BC2;
  --vc-ok:#15803D;
  --vc-warn:#B45309;
  --vc-err:#B91C1C;
}
@media(prefers-color-scheme:light){
  html:not([data-theme="dark"]){
    --vc-border:rgba(11,14,30,.12);
    --vc-chip:rgba(11,14,30,.05);
    --vc-accent:#4A3BC2;
    --vc-ok:#15803D;
    --vc-warn:#B45309;
    --vc-err:#B91C1C;
  }
}

/* ---------- page shell + aurora hero ---------- */
.vc-page{max-width:1120px;margin:0 auto;padding:calc(var(--header) + var(--sat,0px) + 18px) 1rem 3rem}
.vc-page-head{display:flex;gap:1rem;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;margin-bottom:1rem}
.vc-page-head h1{font-size:1.6rem;margin:0}
.vc-lead{color:var(--muted);margin:.3rem 0 0}
.vc-back{color:var(--muted);text-decoration:none;font-size:.9rem;white-space:nowrap}
.vc-back:hover{color:var(--text)}
.vc-hero{position:relative;overflow:hidden;background:linear-gradient(120deg,#070A1A 0%,#0B1030 42%,#1B1440 78%,#241547 100%);border:1px solid rgba(139,124,255,.28);border-radius:22px;padding:26px 28px;margin-bottom:1.4rem}
.vc-hero::before{content:"";position:absolute;width:340px;height:340px;border-radius:50%;background:#22D3EE;filter:blur(120px);opacity:.16;right:-60px;top:-200px;pointer-events:none}
.vc-hero::after{content:"";position:absolute;width:300px;height:300px;border-radius:50%;background:#C026D3;filter:blur(120px);opacity:.18;right:14%;bottom:-250px;pointer-events:none}
.vc-hero h1{position:relative;z-index:1;color:#fff;font-size:1.9rem;letter-spacing:-.02em;margin:10px 0 8px}
.vc-hero h1 em{font-style:normal;background:var(--nx-word);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.vc-hero p{position:relative;z-index:1;color:rgba(255,255,255,.84);max-width:640px;margin:0;line-height:1.6}
.vc-hero .tag-pill{position:relative;z-index:1;background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.22)}
.vc-hero .vc-hero-actions{position:relative;z-index:1;display:flex;gap:.6rem;flex-wrap:wrap;margin-top:18px}
/* The hero is fixed-dark in BOTH themes, so the ghost button needs
   the white treatment (mirror #page-team .page-hero .btn-ghost in
   style.css) — the base .btn-ghost would be near-black on navy in
   the light theme. */
.vc-hero .btn-ghost{color:#fff;border-color:rgba(255,255,255,.35);background:rgba(255,255,255,.08)}
.vc-hero .btn-ghost:hover{border-color:rgba(255,255,255,.6);background:rgba(255,255,255,.14)}

/* ---------- shared bits ---------- */
.vc-hidden{display:none!important}
.vc-page h1,.vc-page h2,.vc-page h3{letter-spacing:-.02em}
.vc-page a:focus-visible,.vc-page button:focus-visible,.vc-page label:focus-visible{outline:2px solid var(--nx-violet);outline-offset:2px;border-radius:6px}
.vc-page .btn{transition:transform .15s ease,box-shadow .15s ease,background .15s ease,border-color .15s ease}
.vc-page .btn:active{transform:scale(.98)}
.vc-page .btn-ghost:hover{border-color:rgba(109,93,240,.55);background:rgba(109,93,240,.08)}
.vc-hint{color:var(--muted);font-size:.82rem;margin:.35rem 0}
.vc-ok{color:var(--vc-ok)}
.vc-warn{color:var(--vc-warn)}
.vc-label{display:block;font-size:.85rem;font-weight:600;margin:.55rem 0 .3rem;color:var(--text)}
.vc-check{display:flex;gap:.5rem;align-items:center;font-size:.9rem;font-weight:600;cursor:pointer;color:var(--text)}
.vc-check input{width:18px;height:18px;accent-color:var(--nx-violet);cursor:pointer}
.vc-input,.vc-select,.vc-textarea{width:100%;background:var(--surface2);border:1px solid var(--vc-border);border-radius:10px;color:var(--text);padding:.6rem .75rem;font-size:.92rem;font-family:inherit;transition:border-color .15s ease,box-shadow .15s ease}
.vc-input:hover,.vc-select:hover,.vc-textarea:hover{border-color:rgba(109,93,240,.4)}
.vc-input:focus,.vc-select:focus,.vc-textarea:focus{outline:2px solid var(--nx-violet);outline-offset:1px;box-shadow:0 0 0 4px rgba(109,93,240,.14),0 0 24px rgba(34,211,238,.08)}
.vc-textarea{resize:vertical;line-height:1.5}
.vc-card{position:relative;overflow:hidden;background:linear-gradient(165deg,var(--surface),var(--surface2));border:1px solid var(--vc-border);border-radius:16px;padding:1rem 1.15rem;box-shadow:var(--shadow);transition:border-color .2s ease,transform .2s ease,box-shadow .2s ease}
.vc-card::before{content:"";position:absolute;inset:0 0 auto 0;height:2px;background:var(--nx-aurora);opacity:.85}
.vc-card h2{margin:0 0 .35rem;font-size:1.05rem;font-weight:800}
.vc-card h3{margin:0 0 .35rem;font-size:1.02rem;font-weight:800}
.vc-card p{color:var(--muted);margin:.25rem 0}
.vc-card:hover{border-color:rgba(109,93,240,.4)}
/* Lift only on collection cards (kits/assets) — form cards stay put. */
.vc-kit-card:hover,.vc-asset-card:hover{transform:translateY(-3px);box-shadow:0 18px 40px rgba(0,0,0,.12),0 0 0 1px rgba(109,93,240,.25),0 0 28px rgba(109,93,240,.10)}
.vc-error{background:var(--surface2);border:1px solid var(--vc-border);border-left:4px solid var(--nx-fuchsia);border-radius:12px;padding:.85rem 1rem;margin:.7rem 0;display:none;color:var(--text)}
.vc-error.vc-show{display:block}
.vc-error b{color:var(--text)}
.vc-error p{color:var(--muted);margin:.35rem 0}
.vc-error .btn{margin-top:.4rem}
.vc-empty{background:linear-gradient(180deg,rgba(139,124,255,.07),rgba(255,255,255,.02));border:1px dashed rgba(139,124,255,.4);border-radius:12px;padding:1.2rem;text-align:center;color:var(--muted);line-height:1.6}
.vc-empty a{color:var(--vc-accent);font-weight:700}
/* Skeleton loading states (polish: never a bare "Loading…" line).
   The shimmer is killed by the site's global prefers-reduced-motion
   rule for users who ask for it. */
.vc-skeleton-grid{display:grid;gap:1rem;grid-template-columns:repeat(3,minmax(0,1fr))}
.vc-skeleton-card{height:158px;border-radius:16px;border:1px solid var(--vc-border);background:linear-gradient(90deg,var(--surface2) 25%,var(--vc-chip) 50%,var(--surface2) 75%);background-size:200% 100%;animation:vcshimmer 1.4s ease-in-out infinite}
.vc-skeleton-row{height:52px;border-radius:10px;border:1px solid var(--vc-border);background:linear-gradient(90deg,var(--surface2) 25%,var(--vc-chip) 50%,var(--surface2) 75%);background-size:200% 100%;animation:vcshimmer 1.4s ease-in-out infinite;margin-bottom:.5rem}
@keyframes vcshimmer{from{background-position:200% 0}to{background-position:-200% 0}}
.vc-pill{display:inline-block;font-size:.72rem;font-weight:700;letter-spacing:.02em;background:var(--vc-chip);border:1px solid var(--vc-border);border-radius:999px;padding:.15rem .55rem;color:var(--muted)}
.vc-row{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.vc-grid{display:grid;gap:1rem}
.vc-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.vc-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.vc-section{margin-top:1.6rem}
.vc-section h2{font-size:1.15rem;font-weight:800;margin:0 0 .7rem;position:relative;padding-bottom:9px}
.vc-section h2::after{content:"";position:absolute;left:0;bottom:0;width:36px;height:3px;border-radius:3px;background:var(--nx-aurora)}
.vc-toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);background:var(--surface);border:1px solid rgba(109,93,240,.5);color:var(--text);border-radius:12px;padding:.7rem 1.1rem;font-size:.9rem;font-weight:600;box-shadow:var(--shadow);z-index:200;display:none;max-width:calc(100vw - 32px);text-align:center}
.vc-toast.vc-show{display:block}
/* Primary CTAs on Visual Craft pages use the aurora fill (scoped
   here only — the site-wide .btn-lime is untouched). !important
   beats the base !important rules, same as the #page-team scope
   in style.css. White on the fill's worst stop is 4.69:1 (AA). */
.vc-page .btn-lime{background:var(--nx-fill)!important;box-shadow:0 12px 28px rgba(109,93,240,.45),inset 0 1px 0 rgba(255,255,255,.3)}
.vc-page .btn-lime:hover{transform:translateY(-2px);box-shadow:0 16px 36px rgba(109,93,240,.55),inset 0 1px 0 rgba(255,255,255,.3)}
.vc-page .btn-lime:disabled{opacity:.6;transform:none;box-shadow:none}

/* ---------- usage + quick actions ---------- */
.vc-usage{display:flex;gap:1rem;flex-wrap:wrap}
.vc-usage .vc-stat{background:var(--surface2);border:1px solid var(--vc-border);border-radius:12px;padding:.7rem .95rem;min-width:150px}
.vc-usage .vc-stat b{display:block;font-size:1.25rem;font-variant-numeric:tabular-nums}
.vc-usage .vc-stat span{color:var(--muted);font-size:.82rem}
.vc-tool-card{display:block;background:linear-gradient(165deg,var(--surface),var(--surface2));border:1px solid var(--vc-border);border-radius:14px;padding:.85rem .95rem;text-decoration:none;color:var(--text);transition:border-color .15s,transform .15s}
.vc-tool-card:hover{border-color:rgba(109,93,240,.55);transform:translateY(-2px)}
.vc-tool-card b{display:block;font-size:.95rem;margin-bottom:.2rem}
.vc-tool-card span{color:var(--muted);font-size:.82rem;line-height:1.4;display:block}
.vc-tool-card .vc-go{color:var(--vc-accent);font-weight:700;margin-top:.45rem}
.vc-tile{display:block;height:64px;border-radius:10px;margin-bottom:.7rem;position:relative;overflow:hidden}
.vc-tile::after{content:"";position:absolute;inset:10px;border:1px solid rgba(255,255,255,.35);border-radius:6px}
.vc-tile-card{background:linear-gradient(135deg,#DB2777,#9333EA)}
.vc-tile-print{background:linear-gradient(135deg,#1E40AF,#0E7490)}
.vc-tile-poster{background:linear-gradient(135deg,#92400E,#B45309)}
.vc-tile-flyer{background:linear-gradient(135deg,#047857,#0D9488)}
.vc-tile-mockup{background:linear-gradient(135deg,#6D28D9,#9333EA)}
.vc-tile-ad{background:linear-gradient(135deg,#B91C1C,#DC2626)}

/* ---------- kits ---------- */
.vc-kit-card{display:flex;flex-direction:column;gap:.5rem}
.vc-kit-top{display:flex;gap:.8rem;align-items:center}
.vc-kit-logo{width:52px;height:52px;border-radius:12px;object-fit:contain;background:var(--surface2);border:1px solid var(--vc-border);flex:none}
.vc-kit-logo-empty{display:grid;place-items:center;font-weight:900;font-size:22px;color:#fff;background:var(--nx-fill)}
.vc-kit-name{min-width:0}
.vc-kit-name h3{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vc-swatches{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.vc-swatch{width:26px;height:26px;border-radius:8px;border:1px solid var(--vc-border);display:inline-block;flex:none}
.vc-import-card{margin-top:1.2rem}
.vc-import-row{display:flex;gap:.9rem;align-items:center;justify-content:space-between;flex-wrap:wrap;border-top:1px solid var(--vc-border);padding:.8rem 0 0;margin-top:.8rem}
.vc-import-body{display:flex;flex-direction:column;gap:.2rem;min-width:0}
.vc-import-body b{font-size:.95rem}

/* ---------- kit editor ---------- */
.vc-kit-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:1.2rem;align-items:start}
.vc-field{margin-bottom:.9rem}
.vc-color-row{display:grid;grid-template-columns:52px 92px minmax(0,1fr) auto;gap:.5rem;align-items:center;margin-bottom:.5rem}
.vc-color-row input[type="color"]{width:52px;height:44px;border:1px solid var(--vc-border);border-radius:10px;background:var(--surface2);padding:3px;cursor:pointer}
.vc-color-row .vc-hex{font-family:ui-monospace,monospace;text-transform:uppercase}
.vc-logo-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem}
.vc-logo-slot{background:var(--surface2);border:1px solid var(--vc-border);border-radius:12px;padding:.8rem;text-align:center}
.vc-logo-slot b{display:block;font-size:.85rem;margin-bottom:.5rem}
.vc-logo-prev{min-height:76px;display:grid;place-items:center;margin-bottom:.5rem}
.vc-logo-prev img{max-height:76px;max-width:100%;object-fit:contain}
.vc-logo-slot .vc-file-btn{display:inline-block;cursor:pointer;background:var(--vc-chip);border:1px solid var(--vc-border);border-radius:999px;padding:.35rem .8rem;font-size:.82rem;font-weight:600;color:var(--text)}
.vc-logo-slot .vc-file-btn:hover{border-color:rgba(109,93,240,.55)}
.vc-version-row{display:flex;gap:.6rem;align-items:center;justify-content:space-between;padding:.55rem .4rem;border-bottom:1px solid var(--vc-border);font-size:.88rem;flex-wrap:wrap;margin:0 -.4rem;border-radius:8px;transition:background .15s ease}
.vc-version-row:hover{background:var(--vc-chip)}
.vc-version-row:last-child{border-bottom:0}
.vc-version-row .vc-hint{margin-left:.4rem}

/* ---------- guideline sheet ---------- */
.vc-sheet{background:#fff;color:#111;border-radius:14px;padding:1.4rem 1.6rem;border:1px solid var(--vc-border)}
.vc-sheet-inner h2{color:#111;margin:0 0 4px;font-size:1.4rem}
.vc-sheet-inner h3{color:#111;margin:22px 0 10px;font-size:1rem;border-bottom:1px solid #e5e7eb;padding-bottom:6px}
.vc-sheet-head p{color:#555;margin:0}
.vc-sheet-logos{display:flex;gap:14px;flex-wrap:wrap}
.vc-sheet-logo{border:1px solid #e5e7eb;border-radius:10px;padding:12px;text-align:center;min-width:140px}
.vc-sheet-logo img{max-height:80px;max-width:200px;object-fit:contain;display:block;margin:0 auto 8px}
.vc-sheet-logo span{font-size:12px;color:#555}
.vc-sheet-logo-empty{display:grid;place-items:center;min-height:80px}
.vc-sheet-table{border-collapse:collapse;width:100%}
.vc-sheet-table td,.vc-sheet-table th{border-bottom:1px solid #eee;padding:8px 6px;text-align:left;font-size:14px;color:#111}
.vc-sheet-table th{color:#555;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.vc-sheet-textchip{display:inline-block;min-width:34px;text-align:center;padding:4px 8px;border-radius:8px;font-weight:800;font-size:13px;line-height:1.2}
.vc-sheet-swatch{display:inline-block;width:28px;height:28px;border-radius:6px;border:1px solid #ddd;vertical-align:middle}
.vc-sheet-type-h{font-size:24px;font-weight:700;color:#111;margin:6px 0}
.vc-sheet-type-b{font-size:16px;color:#333;margin:6px 0}
.vc-sheet-muted{color:#666}
.vc-sheet-notes{white-space:pre-wrap;color:#333}
.vc-sheet-foot{margin-top:22px;font-size:13px;color:#666;border-top:1px solid #eee;padding-top:10px}

/* ---------- assets ---------- */
.vc-dropzone{border:2px dashed rgba(109,93,240,.5);border-radius:16px;padding:1.6rem 1rem;text-align:center;background:linear-gradient(180deg,rgba(139,124,255,.07),rgba(34,211,238,.03));cursor:pointer;transition:border-color .2s ease,background .2s ease}
.vc-dropzone:hover{border-color:var(--nx-violet)}
.vc-dropzone.vc-drop-over{border-color:var(--nx-violet);background:linear-gradient(180deg,rgba(139,124,255,.14),rgba(34,211,238,.06))}
.vc-dropzone b{display:block;font-size:1rem;margin-bottom:.3rem}
.vc-asset-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.9rem}
.vc-asset-card{display:flex;flex-direction:column;gap:.4rem}
.vc-asset-preview{height:150px;border-radius:10px;background:var(--surface2);border:1px solid var(--vc-border);display:grid;place-items:center;overflow:hidden}
.vc-asset-preview img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.vc-asset-card:hover .vc-asset-preview img{transform:scale(1.04)}
.vc-asset-icon{font-weight:800;font-size:.8rem;letter-spacing:.08em;color:var(--muted);padding:.4rem .7rem;border:1px solid var(--vc-border);border-radius:999px}
.vc-asset-name{font-size:.9rem;word-break:break-word}
.vc-filter-row{display:flex;gap:.6rem;flex-wrap:wrap;align-items:flex-end;margin-bottom:1rem}
.vc-filter-row .vc-field{margin:0;min-width:180px;flex:1}

/* ---------- generate ---------- */
.vc-gen-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:1.2rem;align-items:start}
.vc-gen-result-card img{width:100%;border-radius:12px;display:block;margin-bottom:.8rem}
.vc-gen-status{color:var(--vc-accent);font-weight:700;font-size:.9rem;min-height:1.4em}

/* ---------- logo studio ---------- */
.vc-logo-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:1.2rem;align-items:start}
.vc-logo-preview{border-radius:16px;border:1px solid var(--vc-border);overflow:hidden;background:var(--surface2);display:grid;place-items:center;padding:1rem;box-shadow:var(--shadow)}
.vc-logo-preview svg{width:100%;max-width:520px;height:auto;display:block;border-radius:12px}
.vc-variant-row{display:flex;gap:.45rem;flex-wrap:wrap}
.vc-variant-btn{background:var(--vc-chip);border:1px solid var(--vc-border);border-radius:999px;padding:.35rem .9rem;font-size:.85rem;font-weight:600;color:var(--muted);cursor:pointer}
.vc-variant-btn.vc-variant-on{background:var(--nx-fill);color:#fff;border-color:transparent}

/* ---------- bldbrand launch screen (mirror bldauto/bldchat/bldcontent:
   style.css scopes .cb-launch to #tool-bldchat only, so this file
   carries the #tool-bldbrand rules) ---------- */
#page-team #tool-bldbrand .cb-launch{max-width:640px;margin:18px 0 8px}
#page-team #tool-bldbrand .cb-launch-lead{font-size:16.5px;line-height:1.65;color:var(--text);margin:0 0 20px}
#page-team #tool-bldbrand .cb-launch-list{list-style:none;margin:0 0 24px;padding:0;display:grid;gap:12px}
#page-team #tool-bldbrand .cb-launch-list li{display:flex;gap:12px;align-items:flex-start;background:var(--surface2);border:1px solid var(--line);border-radius:14px;padding:13px 15px;font-size:14.5px;line-height:1.55;color:var(--text)}
#page-team #tool-bldbrand .cb-launch-list li b{font-weight:800}
#page-team #tool-bldbrand .cb-launch-ic{width:26px;height:26px;flex:none;border-radius:50%;background:var(--lime-soft);color:var(--lime);display:grid;place-items:center;margin-top:1px}
#page-team #tool-bldbrand .cb-launch-ic .ic{width:14px;height:14px}
#page-team #tool-bldbrand .cb-launch-cta{min-height:56px;padding:15px 26px;font-size:16px}
#page-team #tool-bldbrand .cb-launch-note{color:var(--muted);font-size:13px;margin:16px 0 0}

/* ---------- responsive ---------- */
@media (max-width:900px){
  .vc-grid-3,.vc-grid-4,.vc-asset-grid,.vc-skeleton-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .vc-kit-layout,.vc-gen-layout,.vc-logo-layout{grid-template-columns:1fr}
  .vc-logo-slots{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:560px){
  .vc-grid-3,.vc-grid-4,.vc-asset-grid,.vc-skeleton-grid{grid-template-columns:1fr}
  .vc-page-head h1{font-size:1.35rem}
  .vc-hero{padding:20px}
  .vc-hero h1{font-size:1.5rem}
  .vc-hero .vc-hero-actions .btn{width:100%;text-align:center}
  .vc-color-row{grid-template-columns:52px minmax(0,1fr);grid-auto-rows:auto}
  .vc-color-row .vc-hex{grid-column:2}
  .vc-color-row input[placeholder="Colour name"]{grid-column:1/3}
  .vc-color-row .btn{grid-column:1/3}
  .vc-logo-slots{grid-template-columns:1fr}
  .vc-sheet{padding:1rem}
  .vc-filter-row .vc-field{min-width:0}
  #page-team #tool-bldbrand .cb-launch-lead{font-size:15.5px}
  #page-team #tool-bldbrand .cb-launch-list li{padding:12px 13px;font-size:14px}
  #page-team #tool-bldbrand .cb-launch-cta{width:100%}
}

/* ---------- print: guideline sheet only ---------- */
@media print{
  body *{visibility:hidden}
  #vcSheet,#vcSheet *{visibility:visible}
  #vcSheet{position:absolute;left:0;top:0;width:100%;border:0;border-radius:0;padding:0}
  #vcSheet .vc-sheet-inner{max-width:100%}
}
