:root {
  color-scheme: dark;
  font-family: "Manrope", sans-serif;
  background: #060710;
  color: #f3f0ff;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; overflow: hidden; }

body {
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at 50% 48%, rgba(55, 40, 100, .16), transparent 30%),
    linear-gradient(145deg, #05060d 0%, #090914 50%, #05060c 100%);
}

canvas, .grain, .nebula { position: fixed; inset: 0; pointer-events: none; }
#stars { width: 100%; height: 100%; }

.grain {
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.nebula { filter: blur(65px); opacity: .28; border-radius: 50%; }
.nebula-one { width: 40vw; height: 40vw; left: -23vw; top: 22%; background: #2e2476; }
.nebula-two { width: 30vw; height: 30vw; inset: auto -17vw -12vw auto; background: #43245c; }

main { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 32px; }

.brand {
  position: absolute; top: 34px; left: 42px; display: flex; align-items: center; gap: 11px;
  font: 400 10px/1 "DM Mono", monospace; letter-spacing: .28em; color: #aaa4bd;
}
.brand span { width: 6px; height: 6px; border: 1px solid #a790ea; border-radius: 50%; box-shadow: 0 0 12px #b9a7ff; }

.composer { width: min(680px, 100%); text-align: center; transform: translateY(-2vh); }
.eyebrow { margin: 0 0 24px; color: #9289a6; font: 300 11px/1.2 "DM Mono", monospace; letter-spacing: .2em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(54px, 8vw, 92px); line-height: .95; letter-spacing: -.065em; font-weight: 300; }
.intro { margin: 28px 0 44px; color: #9994a8; font-size: 14px; font-weight: 300; }

.input-shell {
  display: flex; align-items: flex-end; gap: 12px; padding: 9px 9px 9px 22px;
  background: rgba(17, 17, 29, .75); border: 1px solid rgba(196, 183, 232, .15);
  border-radius: 12px; box-shadow: 0 18px 70px rgba(0, 0, 0, .32), inset 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(18px); transition: border .25s, box-shadow .25s;
}
.input-shell:focus-within { border-color: rgba(187, 164, 255, .44); box-shadow: 0 18px 70px rgba(0,0,0,.38), 0 0 0 3px rgba(130, 96, 221, .07); }
textarea { resize: none; overflow: hidden; min-height: 24px; max-height: 110px; flex: 1; border: 0; outline: 0; padding: 12px 0 10px; background: transparent; color: #eeeaf8; font: 300 15px/1.5 "Manrope", sans-serif; }
textarea::placeholder { color: #625e6f; }
button { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; height: 43px; padding: 0 17px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; background: #ece7f7; color: #15131b; font: 500 11px/1 "DM Mono", monospace; letter-spacing: .08em; cursor: pointer; transition: transform .2s, background .2s; }
button:hover { background: #fff; transform: translateY(-1px); }
button:active { transform: scale(.98); }
button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.form-meta { display: flex; justify-content: space-between; padding: 13px 3px 0; color: #575362; font: 300 9px/1 "DM Mono", monospace; letter-spacing: .16em; }

.privacy { position: absolute; bottom: 30px; display: flex; align-items: center; gap: 8px; margin: 0; color: #585563; font: 300 10px/1 "DM Mono", monospace; letter-spacing: .05em; }
.privacy svg { width: 12px; fill: currentColor; }
.support {
  position: absolute; right: 42px; bottom: 28px; display: flex; align-items: center; gap: 20px;
  max-width: 480px; padding-left: 19px; border-left: 1px solid rgba(196, 183, 232, .15);
}
.support p { margin: 0; }
.support-title { color: #aaa4bd; font: 400 10px/1.2 "DM Mono", monospace; letter-spacing: .14em; text-transform: uppercase; }
.support-copy { margin-top: 7px !important; color: #625e70; font-size: 11px; font-weight: 300; }
.support-cta { height: 36px; padding: 0 13px; background: rgba(17, 17, 29, .72); color: #b8b0c9; border-color: rgba(196, 183, 232, .15); white-space: nowrap; }
.support-cta:hover { background: rgba(31, 28, 46, .9); color: #eeeaf8; }
.support-cta span { color: #8576ae; font-size: 13px; }
.kofi-dialog { width: min(440px, calc(100vw - 32px)); height: min(650px, calc(100svh - 32px)); padding: 0; overflow: hidden; border: 1px solid rgba(196, 183, 232, .2); border-radius: 14px; background: #0d0d17; color: #f3f0ff; box-shadow: 0 30px 100px rgba(0, 0, 0, .72); }
.kofi-dialog::backdrop { background: rgba(3, 3, 8, .72); backdrop-filter: blur(8px); }
.kofi-dialog-bar { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 18px; border-bottom: 1px solid rgba(196, 183, 232, .12); }
.kofi-dialog-bar p { margin: 0; color: #aaa4bd; font: 400 10px/1 "DM Mono", monospace; letter-spacing: .15em; text-transform: uppercase; }
.kofi-close { width: 34px; height: 34px; justify-content: center; padding: 0; border: 0; background: transparent; color: #777183; font: 300 22px/1 "Manrope", sans-serif; }
.kofi-close:hover { background: rgba(255,255,255,.04); color: #eeeaf8; }
.kofi-frame { display: block; width: 100%; height: calc(100% - 48px); border: 0; background: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.released {
  position: fixed; z-index: 4; left: 50%; top: 57%; width: min(560px, 78vw); margin: 0;
  color: rgba(236, 230, 255, .88); text-align: center; font-size: clamp(15px, 2.2vw, 23px); font-weight: 300;
  line-height: 1.5; letter-spacing: .01em; pointer-events: none; text-shadow: 0 0 18px rgba(177, 150, 255, .35);
  animation: release 4.6s cubic-bezier(.16,.8,.3,1) forwards;
  text-wrap: break-word; word-break: break-word; hyphens: auto;
}
@keyframes release {
  0% { opacity: 0; transform: translate(-50%, 20px) scale(.98); filter: blur(3px); letter-spacing: .01em; }
  12% { opacity: .92; transform: translate(-50%, 0) scale(1); filter: blur(0); }
  50% { opacity: .58; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--drift)), -150px) scale(.82); filter: blur(10px); letter-spacing: .12em; }
}

.composer.pulse { animation: composer-pulse .6s ease-out; }
@keyframes composer-pulse { 50% { transform: translateY(-2vh) scale(.992); opacity: .7; } }

@media (max-width: 600px) {
  main { padding: 22px; }
  .brand { top: 25px; left: 24px; }
  .composer { transform: translateY(-4vh); }
  .intro { line-height: 1.6; margin: 24px auto 36px; max-width: 280px; }
  .input-shell { padding-left: 16px; }
  button { width: 43px; padding: 0; justify-content: center; }
  button span { display: none; }
  .privacy { bottom: 22px; }
  .privacy { left: 24px; bottom: 18px; }
  .support { right: 24px; bottom: 62px; max-width: calc(100% - 48px); }
  .support-copy { display: none; }
  .support-cta { width: auto; padding: 0 13px; }
  .support-cta span { display: inline; }
  .kofi-dialog { height: calc(100svh - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .released { animation-duration: 1.2s; }
  button, .input-shell { transition: none; }
}
