:root {
  color-scheme: dark;
  --ink: #f8f2df;
  --muted: rgba(248, 242, 223, 0.68);
  --bg: #111316;
  --panel: rgba(255, 255, 255, 0.08);
  --rule: rgba(255, 255, 255, 0.16);
  --green: #58d68d;
  --red: #ff5a76;
  --gold: #ffd45a;
  --blue: #69b7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 8%, rgba(88, 214, 141, 0.22), transparent 22rem),
    radial-gradient(circle at 88% 20%, rgba(105, 183, 255, 0.2), transparent 24rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lab-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 3rem) 0 3rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.35fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  min-height: 42vh;
  padding: clamp(2rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 8ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
}

.hero p:last-child {
  max-width: 34rem;
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.5;
}

.cauldron {
  position: relative;
  min-height: 18rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.liquid {
  position: absolute;
  inset: auto 1rem 1rem;
  height: 46%;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--blue), var(--red));
  animation: brew 4s ease-in-out infinite alternate;
}

.bubble {
  position: absolute;
  width: 1.8rem;
  height: 1.8rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  animation: rise 3.2s ease-in-out infinite;
}

.bubble-one {
  left: 24%;
  bottom: 38%;
}

.bubble-two {
  left: 54%;
  bottom: 48%;
  animation-delay: 0.6s;
}

.bubble-three {
  left: 72%;
  bottom: 34%;
  animation-delay: 1.1s;
}

@keyframes brew {
  from { filter: hue-rotate(0deg); transform: translateY(0); }
  to { filter: hue-rotate(24deg); transform: translateY(-0.4rem); }
}

@keyframes rise {
  0%, 100% { transform: translateY(0) scale(0.9); opacity: 0.6; }
  50% { transform: translateY(-2rem) scale(1.1); opacity: 1; }
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(22rem, 0.75fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding-top: clamp(1.2rem, 3vw, 2rem);
}

.mixer,
.recipe {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
}

.mixer {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.5rem);
}

label {
  display: grid;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 800;
}

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

.mixer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

button {
  min-height: 2.8rem;
  padding: 0 1rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  color: var(--bg);
  background: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: var(--gold);
  opacity: 1;
}

.recipe {
  padding: clamp(1rem, 2vw, 1.5rem);
}

.recipe-kicker {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}

.recipe h2 {
  margin-top: 0.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

pre {
  min-height: 17rem;
  margin: 1rem 0 0;
  padding: 1rem;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
  font: 0.96rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.copy-status {
  min-height: 1.4rem;
  margin-top: 0.8rem;
  color: var(--green);
  font-size: 0.92rem;
}

html[data-embed="site"] .lab-shell {
  width: min(1120px, calc(100% - 1.5rem));
  padding-top: 1rem;
}

html[data-embed="site"] .hero {
  min-height: auto !important;
  padding: 2rem 0 !important;
}

@media (max-width: 840px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .cauldron {
    max-width: 18rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .liquid,
  .bubble {
    animation: none;
  }
}
