:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #edf2ef;
  background: #090c0e;
  font-synthesis: none;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #b9ffeb; outline-offset: 4px; }
a { color: inherit; }

.shell { max-width: 100rem; margin: 0 auto; padding: 0 clamp(1rem, 4.4vw, 4.5rem); }
.site-header, .site-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.site-header { min-height: clamp(4.25rem, 9vh, 5.75rem); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-size: 1.16rem; font-weight: 670; letter-spacing: -.04em; }
.brand img { border-radius: .58rem; }
.home-link { color: #aebdb8; font-size: .9rem; text-decoration: none; padding: .65rem 0 .65rem .65rem; }
.home-link:hover { color: #f3fff8; text-decoration: underline; text-underline-offset: .3em; }

.garden {
  --accent: #99f4d8;
  --accent-rgb: 153, 244, 216;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: clamp(36rem, calc(100svh - 8.5rem), 56rem);
  overflow: hidden;
  border: 1px solid #263632;
  border-radius: 1.35rem;
  background: #070d0e;
}
.garden[data-mode="orbit"] { --accent: #b4beff; --accent-rgb: 180, 190, 255; }
.garden[data-mode="drift"] { --accent: #ffb58d; --accent-rgb: 255, 181, 141; }
.field {
  position: absolute;
  z-index: -2;
  inset: 0;
  cursor: crosshair;
  touch-action: pan-y pinch-zoom;
  background: radial-gradient(ellipse at 68% 43%, rgba(var(--accent-rgb), .065), transparent 60%), #070d0e;
}
.field canvas { width: 100%; height: 100%; display: block; pointer-events: none; }
.garden::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #080e10 0%, #080e10eb 15%, #080e10ad 27%, #080e1040 41%, transparent 55%), linear-gradient(0deg, #080d0ee8 0%, transparent 23%);
}
.frame { position: absolute; inset: 1.25rem; pointer-events: none; z-index: -1; }
.frame i { width: .75rem; height: .75rem; position: absolute; border: 0 solid rgba(var(--accent-rgb), .36); }
.frame i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.frame i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.frame i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.frame i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

.intro { align-self: center; width: fit-content; padding: 2rem 0 3rem clamp(2.25rem, 5.7vw, 5.5rem); pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: .56rem; margin: 0 0 1.65rem; color: var(--accent); font: .78rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.eyebrow img { width: 1.15rem; height: 1.15rem; }
h1 { margin: 0; font: 400 clamp(5rem, 8.6vw, 9rem)/.83 Georgia, "Times New Roman", serif; letter-spacing: -.088em; }
h1 em { font-weight: 400; color: var(--accent); }
.description { max-width: 28ch; margin: 2rem 0 0; color: #b7c6c0; font-size: clamp(1rem, 1.35vw, 1.16rem); line-height: 1.6; text-wrap: pretty; }

.view-controls { position: absolute; top: 2rem; right: 2rem; display: flex; gap: .5rem; }
.icon-button { display: grid; width: 2.75rem; height: 2.75rem; place-items: center; border: 1px solid #31413d; border-radius: .56rem; background: #0a1214d9; color: #c2d3cd; }
.icon-button:hover { border-color: var(--accent); color: var(--accent); }
.icon-button svg, .pulse svg { width: 1.2rem; height: 1.2rem; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.icon-button .play-icon, .paused .pause-icon { display: none; }
.paused .play-icon { display: block; }

.deck {
  display: grid;
  grid-template-columns: max-content minmax(7.5rem, 1fr) max-content;
  align-items: end;
  gap: clamp(1rem, 2.7vw, 3.25rem);
  margin: 0 clamp(1.75rem, 3.55vw, 3.5rem) clamp(1.75rem, 3.35vw, 3.15rem);
  padding: .9rem 1rem .95rem;
  border: 1px solid #2b3a36;
  border-radius: .8rem;
  background: #0c1516eb;
  box-shadow: 0 1rem 2.5rem #0005;
}
.label, .energy output { color: #a9bfb7; font: .75rem/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.forms > .label { display: block; margin-bottom: .52rem; }
.form-buttons { display: flex; gap: .3rem; }
.form-buttons button { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: 0 .85rem; min-height: 2.7rem; border: 1px solid transparent; border-radius: .45rem; background: #121e20; color: #b4c6c0; font-size: .89rem; }
.form-buttons button:hover { color: #f5fff9; border-color: #52665e; }
.form-buttons button[aria-pressed="true"] { color: var(--accent); border-color: rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .10); }
.swatch { width: .42rem; height: .42rem; border-radius: 50%; background: #99f4d8; }
[data-scene="orbit"] .swatch { background: #b4beff; }
[data-scene="drift"] .swatch { background: #ffb58d; }
.energy-label { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.energy output { color: var(--accent); letter-spacing: 0; }
.energy input { --energy: 55%; display: block; width: 100%; min-height: 2.7rem; margin: .52rem 0 0; appearance: none; background: transparent; color: var(--accent); cursor: pointer; }
.energy input::-webkit-slider-runnable-track { height: .25rem; border-radius: 1rem; background: linear-gradient(90deg, var(--accent) var(--energy), #35443f var(--energy)); }
.energy input::-moz-range-track { height: .25rem; border-radius: 1rem; background: linear-gradient(90deg, var(--accent) var(--energy), #35443f var(--energy)); }
.energy input::-webkit-slider-thumb { appearance: none; width: .94rem; height: .94rem; margin-top: -.345rem; border: 0; border-radius: 50%; background: currentColor; box-shadow: 0 0 .8rem rgba(var(--accent-rgb), .35); }
.energy input::-moz-range-thumb { width: .94rem; height: .94rem; border: 0; border-radius: 50%; background: currentColor; }
.pulse { display: flex; justify-content: center; align-items: center; gap: .58rem; min-height: 2.7rem; padding: 0 1.18rem; border: 1px solid transparent; border-radius: .45rem; background: var(--accent); color: #101b18; font-size: .9rem; font-weight: 720; white-space: nowrap; }
.pulse:hover { background: #eefcf5; }
.pulse:active { background: white; box-shadow: 0 0 1.1rem rgba(var(--accent-rgb), .5); }
.site-footer { min-height: 3.25rem; color: #8c9d97; font: .75rem/1.4 var(--mono); }
kbd { padding: .18rem .35rem; border: 1px solid #34423e; border-radius: .24rem; color: #cddad5; font: inherit; }
.notice { position: absolute; right: 1rem; bottom: 7.25rem; left: 1rem; margin: auto; width: fit-content; padding: .6rem .85rem; background: #12201e; border-radius: .4rem; }
.garden.immersive { position: fixed; z-index: 1; inset: 0; min-height: 0; overflow: auto; border: 0; border-radius: 0; }
body:has(.immersive) { overflow: hidden; }
[hidden] { display: none !important; }

@media (max-width: 45rem) {
  .garden { min-height: max(42rem, calc(100svh - 7.25rem)); grid-template-rows: 1fr auto; }
  .garden::before { background: linear-gradient(180deg, #080e10de 0%, #080e10b3 17%, #080e1026 44%, transparent 56%, #080d0ef0 94%); }
  .intro { align-self: start; padding: 3.65rem 1.6rem 0; }
  .eyebrow { margin-bottom: .95rem; font-size: .7rem; }
  h1 { font-size: clamp(3.55rem, 12vw, 5.7rem); line-height: .86; }
  .description { margin-top: 1rem; max-width: 29ch; line-height: 1.48; }
  .frame { inset: .75rem; }
  .view-controls { top: 1rem; right: 1rem; gap: .3rem; }
  .deck { grid-template-columns: minmax(0, 1fr) max-content; gap: .6rem 1rem; margin: 0 .85rem .85rem; padding: .75rem; }
  .forms { grid-column: 1 / -1; }
  .form-buttons { display: grid; grid-template-columns: repeat(3, 1fr); }
  .form-buttons button { padding-inline: .3rem; }
  .keyboard { display: none; }
}

@media (max-width: 24rem) {
  .shell { padding-inline: .65rem; }
  .intro { padding-inline: 1.2rem; }
  .deck { margin-inline: .6rem; gap: .55rem .7rem; }
  .pulse { padding-inline: .65rem; }
}

@media (pointer: coarse) {
  .keyboard { display: none; }
}
