@font-face {
  font-family: "Integral";
  src: url("font/integral.otf") format("opentype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070908;
  --panel: rgba(15, 18, 16, .86);
  --line: rgba(255, 255, 255, .11);
  --muted: #8e9690;
  --green: #69ff41;
  --cream: #eceee8;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 78% 12%, rgba(105, 255, 65, .1), transparent 27rem),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 72px 72px, 72px 72px, auto;
  font-family: Inter, Arial, sans-serif;
}

button, input { font: inherit; }

.demo-nav {
  width: min(1240px, calc(100% - 3rem));
  min-height: 5rem;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .67rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.demo-nav a {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--cream);
  text-decoration: none;
}

.demo-nav a span { color: var(--green); font-size: 1rem; }

main {
  width: min(1240px, calc(100% - 3rem));
  margin: auto;
  padding: 6rem 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(15rem, .7fr);
  gap: 3rem;
  align-items: end;
  margin-bottom: 4rem;
}

.intro .eyebrow {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.eyebrow i {
  display: inline-block;
  width: .48rem;
  height: .48rem;
  margin-right: .6rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 1rem var(--green);
}

h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(3.8rem, 8vw, 8rem);
  font-weight: 400;
  line-height: .78;
  letter-spacing: -.065em;
}

h1 em { color: var(--green); font-weight: 400; }

.intro > p:last-child {
  max-width: 31rem;
  margin: 0;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.8;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(18rem, .68fr) minmax(0, 1.32fr);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  overflow: hidden;
  background: rgba(3, 4, 3, .72);
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, .35);
}

.controls {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border-right: 1px solid var(--line);
}

.panel-label, .preview-bar {
  color: var(--muted);
  font-size: .63rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.controls label {
  display: block;
  margin: 5rem 0 .8rem;
  font-size: .78rem;
  font-weight: 600;
}

.controls input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(105, 255, 65, .55);
  padding: .55rem 0 .75rem;
  outline: 0;
  color: var(--cream);
  background: transparent;
  font-family: "Integral", monospace;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  text-transform: uppercase;
}

.controls input:focus { border-color: var(--green); }

.controls > p {
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.6;
}

.controls button {
  width: 100%;
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--green);
  border-radius: 999px;
  cursor: pointer;
  color: #071005;
  background: var(--green);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: transform .25s ease, box-shadow .25s ease;
}

.controls button:hover {
  transform: translateY(-2px);
  box-shadow: 0 .8rem 2.5rem rgba(105, 255, 65, .2);
}

.specs {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.specs span { font-size: .72rem; }
.specs small { display: block; margin-bottom: .38rem; color: var(--muted); }

.preview {
  min-width: 0;
  margin: 0;
  padding: clamp(1rem, 2vw, 1.6rem);
}

.preview-bar {
  display: flex;
  justify-content: space-between;
  padding: .35rem .2rem 1rem;
}

#render-state { color: var(--green); }

#poster {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .8rem;
  background: #12220f;
}

#toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  padding: .85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  opacity: 0;
  transform: translateY(1rem);
  color: var(--cream);
  background: #111511;
  font-size: .76rem;
  transition: .25s ease;
  pointer-events: none;
}

#toast.is-visible { opacity: 1; transform: none; }

@media (max-width: 780px) {
  .demo-nav, main { width: min(100% - 2rem, 40rem); }
  .demo-nav > span { display: none; }
  main { padding: 3.5rem 0 6rem; }
  .intro { grid-template-columns: 1fr; gap: 1.6rem; }
  h1 { font-size: clamp(3.6rem, 17vw, 5.7rem); line-height: .82; }
  .workspace { grid-template-columns: 1fr; }
  .controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .controls label { margin-top: 3rem; }
  .specs { margin-top: 2rem; }
}
