:root {
  --ink: #fff8df;
  --muted: #d8c9ad;
  --bg: #10051b;
  --panel: rgba(31, 16, 52, 0.78);
  --panel-soft: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 232, 174, 0.18);
  --purple: #48237b;
  --wine: #8d214f;
  --gold: #d7a941;
  --emerald: #0f7566;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 10%, rgba(141, 33, 79, 0.68), transparent 28rem),
    radial-gradient(circle at 88% 4%, rgba(15, 117, 102, 0.6), transparent 24rem),
    linear-gradient(140deg, #10051b 0%, #231039 48%, #08030f 100%);
}
a { color: inherit; text-decoration: none; }
.shell { width: min(1180px, calc(100% - 32px)); margin: auto; }

header.shell { margin-bottom: 50px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
}
.brand { font-size: 1.35rem; font-weight: 950; letter-spacing: -0.05em; }
.brand span { color: var(--gold); }
.navlinks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.navlinks a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
}
.navlinks a:hover, .navlinks a.active { color: var(--ink); border-color: rgba(215, 169, 65, 0.72); }

.hero-grid, .workspace { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: 18px; }
.card, .tool-card, .panel, .controls-card {
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.045));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.hero-copy { padding: clamp(28px, 6vw, 58px); }
.kicker { margin: 0 0 12px; color: var(--gold); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem; }
h1, h2 { margin: 0; letter-spacing: -0.07em; line-height: 0.95; }
h1 { font-size: clamp(2.6rem, 7vw, 6rem); }
h2 { font-size: clamp(2rem, 5vw, 4rem); }
.lede { color: var(--muted); font-size: 1.12rem; line-height: 1.7; max-width: 760px; }
.button {
  border: 1px solid var(--line);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  font-weight: 850;
  cursor: pointer;
}
.primary { background: linear-gradient(135deg, var(--gold), #ffe18a); color: #221306; }
.ghost { background: rgba(255, 255, 255, 0.07); }
.preview-art { min-height: 390px; display: grid; place-items: center; overflow: hidden; position: relative; }
.preview-art::before { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 44%; background: conic-gradient(var(--gold), var(--wine), var(--purple), var(--emerald), var(--gold)); filter: blur(8px); opacity: 0.86; }
.sample-tile { position: relative; width: 210px; height: 210px; border-radius: 42px 90px 58px 104px; background: #f3d26c; color: #18091f; display: grid; place-items: center; text-align: center; font-weight: 950; font-size: 2rem; line-height: 0.95; box-shadow: 22px 24px 0 rgba(72, 35, 123, 0.8); }

.section-heading { margin: 44px 0 18px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-card { min-height: 220px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.18s ease, border-color 0.18s ease; }
.tool-card:hover { transform: translateY(-4px); border-color: rgba(215, 169, 65, 0.68); }
.tool-card span { color: var(--gold); font-weight: 900; }
.tool-card h3 { margin: 0; font-size: 1.55rem; letter-spacing: -0.04em; }
.tool-card p { margin: 0; color: var(--muted); line-height: 1.55; }

.page-head { padding: 24px 0 10px; }
.workspace { grid-template-columns: 390px minmax(0, 1fr); align-items: start; padding: 18px 0 34px; }
.controls-card, .panel { padding: 22px; }
.controls { display: grid; gap: 18px; }
.control { display: grid; gap: 8px; }
.control-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label, .label { color: #ffe4a6; font-weight: 800; font-size: 0.93rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.value { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 3, 15, 0.72);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}
select option { color: #12071f; }
input[type="range"] { padding: 0; accent-color: var(--gold); }
input[type="color"] { padding: 5px; }
.check-label { justify-content: flex-start; color: var(--muted); }
.check-label input { width: auto; min-height: auto; }
.preview-zone {
  min-height: 420px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  padding: 44px;
  background: radial-gradient(circle at 30% 20%, rgba(215, 169, 65, 0.2), transparent 18rem), rgba(0, 0, 0, 0.16);
  overflow: hidden;
}
.target {
  width: min(280px, 80%);
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, #f0ca5d, #8d214f);
  color: #18091f;
  font-weight: 950;
  text-align: center;
}
.code {
  min-height: 120px;
  margin: 16px 0 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(8, 3, 15, 0.9);
  color: #ffe8a8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.55;
}
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.swatch { min-height: 62px; border: 1px solid var(--line); border-radius: 16px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 38px 0; color: var(--muted); margin-top: 50px;}
.footer a { color: var(--gold); font-weight: 800; }

@media (max-width: 900px) {
  .hero-grid, .workspace, .tool-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .navlinks { justify-content: flex-start; }
  .control-row { grid-template-columns: 1fr; }
}
