/* myGen subdomain kit: the mygen.co.uk look ("workshop at night") for the
   generator sites (paintings, locatorbar, playerheads, structure).
   Ported from mygen.co.uk web/site.css. Each site sets its own --accent,
   the same colour it has on mygen.co.uk.

   Loaded alongside the Tailwind CDN, whose preflight comes after this file:
   rules that style form elements are written with two classes so they win. */

:root {
  --bg: #0f0d0c;
  --bg-2: #141110;
  --surface: #1a1614;
  --surface-2: #221d1a;
  --surface-3: #2b2521;
  --line: rgba(255, 236, 214, 0.08);
  --line-2: rgba(255, 236, 214, 0.15);
  --text: #f6eee6;
  --muted: #b1a497;
  --dim: #7f746a;
  --brand: #ff5a36;
  --brand-2: #ffb547;
  --brand-grad: linear-gradient(100deg, #ff4f36 0%, #ff7a2f 45%, #ffb547 100%);
  --accent: #ff6a3d;
  --radius: 18px;
  --wrap: 1200px;
  --header-h: 68px;
  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; }
::selection { background: color-mix(in srgb, var(--brand) 55%, transparent); }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.icon { width: 18px; height: 18px; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.grad { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.spotlight {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(600px circle at var(--mx, 70%) var(--my, 10%), rgba(255, 122, 47, 0.07), transparent 60%);
}
main, .site-header, .site-footer { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 21px/1 var(--display); letter-spacing: -0.03em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); object-fit: cover; object-position: top; }
.brand b { font-weight: 700; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-site { font: 500 15px/1 var(--sans); letter-spacing: 0; color: var(--muted); padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line-2); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--surface); }
.header-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- Buttons & chips ---------- */
.btn.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px;
  font: 600 15px/1 var(--sans); white-space: nowrap; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line-2);
  transition: transform .25s var(--ease), box-shadow .25s, background .2s, border-color .2s, filter .2s, opacity .2s;
}
.btn.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn.btn:active:not(:disabled) { transform: translateY(0); }
.btn.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover:not(:disabled) .icon:last-child { transform: translateX(2px); }
.btn.btn-sm { height: 36px; padding: 0 13px; font-size: 14px; border-radius: 10px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn.btn-brand { background: var(--brand-grad); color: #1a0d07; border-color: transparent; box-shadow: 0 8px 30px -10px rgba(255, 90, 54, 0.7), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.btn-brand:hover:not(:disabled) { box-shadow: 0 14px 40px -12px rgba(255, 110, 54, 0.9), inset 0 1px 0 rgba(255,255,255,.35); filter: brightness(1.05); }
.btn.btn-accent { background: var(--accent); color: #0f0d0c; border-color: transparent; box-shadow: 0 10px 34px -12px color-mix(in srgb, var(--accent) 80%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.btn-accent:hover:not(:disabled) { filter: brightness(1.08); }
.btn.btn-ghost { background: rgba(255, 240, 225, 0.04); }
.btn.btn-ghost:hover:not(:disabled) { background: rgba(255, 240, 225, 0.08); border-color: rgba(255, 236, 214, 0.25); }
.btn.btn-danger { background: rgba(248, 113, 113, 0.06); color: #fca5a5; border-color: rgba(248, 113, 113, 0.3); }
.btn.btn-danger:hover:not(:disabled) { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.5); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.chip, .kind {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  background: rgba(255, 240, 225, 0.06); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 500;
}
.kind { padding-left: 8px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, rgba(15, 13, 12, .72)); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
.kind .icon, .chip .icon { width: 14px; height: 14px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}

/* ---------- Page hero (like a project page on mygen.co.uk) ---------- */
.p-hero { position: relative; padding: 36px 0 56px; overflow: hidden; }
.p-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 80% at 85% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 0%, rgba(255, 90, 54, 0.08), transparent 70%); }
.p-hero-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 236, 214, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 236, 214, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 15%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 30%, #000 15%, transparent 75%);
}
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--dim); margin-bottom: 26px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.p-title { display: flex; align-items: center; gap: 20px; }
.p-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.p-title h1 { font-size: clamp(36px, 5.6vw, 68px); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; }
.p-tagline { font-size: clamp(17px, 1.8vw, 21px); color: var(--text); opacity: .9; margin: 22px 0 0; max-width: 680px; }
.p-meta { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 14.5px; }
.p-meta li { display: inline-flex; align-items: center; gap: 7px; }
.p-meta .icon { width: 16px; height: 16px; color: var(--accent); }
.logo-lg { width: 76px; height: 76px; flex: none; border-radius: 20px; background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  box-shadow: 0 0 0 1px var(--line-2), 0 18px 40px -16px color-mix(in srgb, var(--accent) 70%, transparent); }

/* ---------- Sections ---------- */
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; margin: 12px 0 10px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* Glow behind a framed piece, like the showcases on mygen.co.uk. */
.glow-frame { position: relative; }
.glow-frame::before { content: ''; position: absolute; inset: 12% 8%; background: var(--accent); filter: blur(80px); opacity: .18; border-radius: 50%; pointer-events: none; }
.frame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.4); }

/* Numbered steps, as in a project page's install steps. */
.step-num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); color: var(--accent); font: 700 15px/1 var(--mono); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 50px 0 30px; margin-top: 40px; background: var(--bg-2); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.footer-brand p { color: var(--muted); margin-top: 12px; max-width: 380px; font-size: 15px; }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 40px; align-content: start; }
.footer-links h4 { font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-links a { color: var(--muted); font-size: 15px; }
.footer-links a:hover { color: var(--text); }
.footer-small { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.footer-small a { color: var(--muted); }
.footer-small a:hover { color: var(--text); }

/* ---------- Generator UI (shared by the generator sites) ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-fade-in { animation: fadeIn 0.5s ease-in-out; }
.animate-slide-up { animation: slideUp 0.6s var(--ease); }
.spinner { width: 18px; height: 18px; flex: none; border: 2px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; border-radius: 50%; animation: spin 0.6s linear infinite; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

/* Surfaces, as the cards on mygen.co.uk. */
.panel { background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 70%, var(--bg))); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-accent { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface)); }
.panel-title { font: 700 21px/1.2 var(--display); letter-spacing: -0.02em; }
.modal { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 40px 100px rgba(0,0,0,.8); }

/* Drop zones. Add .dropzone-click when the whole zone opens a file picker. */
.dropzone { border: 1.5px dashed var(--line-2); border-radius: 14px; background: rgba(255, 240, 225, 0.015); transition: border-color .2s, background .2s; }
.dropzone-click { cursor: pointer; }
.dropzone-click:hover, .drop-active.drop-active { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.drop-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); color: var(--accent); }
.drop-icon .icon { width: 22px; height: 22px; }

.code { font-family: var(--mono); font-size: .88em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.link { color: var(--accent); font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--accent); }

/* Text fields. */
.field.field { padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.field::placeholder { color: var(--dim); }
.field.field:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

/* Segmented controls, as the filters on mygen.co.uk. */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.seg button { color: var(--muted); font-weight: 600; border-radius: 9px; }
.seg button:hover:not(:disabled) { color: var(--text); }
.seg button.seg-on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -2px 0 var(--accent); }

.progress-track { height: 10px; border-radius: 999px; overflow: hidden; background: var(--bg); border: 1px solid var(--line-2); }
.progress-bar { height: 100%; border-radius: 999px; background: var(--brand-grad); transition: width .3s var(--ease); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 9999px; border: 2px solid var(--bg); }

@media (max-width: 900px) {
  .nav { display: none; }
}
@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .header-actions .btn span { display: none; }
  .header-actions .btn.btn { width: 40px; padding: 0; }
  .brand-site { display: none; }
  .p-title { gap: 14px; }
  .logo-lg { width: 60px; height: 60px; border-radius: 16px; }
  .footer-links { grid-template-columns: 1fr 1fr; gap: 8px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
