:root {
  --ink: #14201c;
  --ink-soft: #2a3a34;
  --paper: #e8f0ec;
  --mist: #c5d8cf;
  --acid: #c8f542;
  --coral: #ff5a3c;
  --line: rgba(20, 32, 28, 0.14);
  --shadow: rgba(20, 32, 28, 0.18);
  --radius: 18px;
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 700px at 8% -10%, #d7ebe2 0%, transparent 55%),
    radial-gradient(900px 600px at 100% 0%, #ffe1d8 0%, transparent 50%),
    linear-gradient(165deg, #f3faf6 0%, #e4eee9 45%, #dfe9e3 100%);
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.045;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.orb {
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  z-index: 0;
  animation: drift 14s ease-in-out infinite;
}

.orb-a {
  width: 280px;
  height: 280px;
  left: -60px;
  top: 30%;
  background: rgba(200, 245, 66, 0.35);
}

.orb-b {
  width: 340px;
  height: 340px;
  right: -80px;
  bottom: 10%;
  background: rgba(255, 90, 60, 0.22);
  animation-delay: -5s;
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -24px, 0) scale(1.06); }
}

.top,
.stage,
.foot {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  animation: rise 0.7s ease both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.7rem;
  background: var(--ink);
  color: var(--acid);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  transform: rotate(-6deg);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-tag {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

.stage {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 3rem;
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.hero {
  padding: clamp(0.5rem, 2vw, 1rem) 0 0;
  animation: rise 0.8s ease 0.08s both;
}

.hero-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero-line {
  display: block;
}

.hero-line.accent {
  color: transparent;
  background: linear-gradient(105deg, var(--coral) 0%, #ff8a4c 45%, #c8f542 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead {
  margin: 0 0 1.4rem;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cta-row,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  appearance: none;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--ink);
  color: var(--acid);
}

.btn-primary:hover:not(:disabled) {
  background: #0d1613;
}

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(20, 32, 28, 0.06);
}

.workspace {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  align-items: stretch;
  animation: rise 0.9s ease 0.16s both;
}

.preview-wrap {
  position: relative;
  min-height: 320px;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 10px,
      rgba(20, 32, 28, 0.03) 10px,
      rgba(20, 32, 28, 0.03) 11px
    );
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
}

#canvas {
  width: min(100%, 520px);
  height: auto;
  max-height: 70vh;
  border-radius: 12px;
  background: #111;
  box-shadow: 0 18px 40px var(--shadow);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#canvas.is-ready {
  opacity: 1;
  transform: scale(1);
}

.hint {
  position: absolute;
  margin: 0;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.hint.is-hidden {
  opacity: 0;
}

.controls {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
}

.field {
  display: grid;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input[type="text"] {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input[type="text"]:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(200, 245, 66, 0.35);
}

.field.range em {
  font-style: normal;
  color: var(--ink);
}

.field input[type="range"] {
  width: 100%;
  accent-color: var(--coral);
}

.foot {
  padding: 1rem clamp(1.25rem, 4vw, 3rem) 2rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(2.3rem, 11vw, 3.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
