:root {
  color-scheme: dark;
  --ink: #f4efe6;
  --muted: #8b93a0;
  --line: #2f3336;
  --bg: #000;
  --night: #05060c;
  --search-h: 64px;
  --banner-h: min(56vh, 540px);
  --ease: cubic-bezier(.4, .05, .2, 1);
  --fade: 3.4s;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
button, input { font: inherit; color: inherit; }
img, video { max-width: 100%; }

.opening {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--night);
  opacity: 1;
  transition: opacity .8s ease;
}
.opening.leave { opacity: 0; }

.stage, .banner-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--night);
}

.frame {
  position: absolute;
  inset: 0;
}
.frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  filter: brightness(.9) saturate(.88);
  transition: opacity var(--fade) var(--ease), transform var(--fade) var(--ease), filter var(--fade) var(--ease);
}
.frame img.is-on { opacity: 1; }

.veil, .rays, .quote, .credit { pointer-events: none; }

.veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 36%, rgba(5, 6, 12, 0) 0%, rgba(5, 6, 12, .2) 34%, rgba(5, 6, 12, .72) 68%, #05060c 100%),
    linear-gradient(to top, rgba(5, 6, 12, .92) 0%, rgba(5, 6, 12, .45) 24%, rgba(5, 6, 12, .08) 52%, rgba(5, 6, 12, .45) 100%);
  transition: background var(--fade) var(--ease);
}

.rays {
  position: absolute;
  inset: -20%;
  opacity: 0;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 228, 180, .55), rgba(255, 206, 130, .08) 28%, transparent 58%),
    conic-gradient(from 200deg at 50% 42%, transparent 0 42%, rgba(255, 220, 160, .22) 48%, transparent 54%, rgba(255, 236, 200, .16) 68%, transparent 76%);
  filter: blur(6px);
  mix-blend-mode: screen;
  transition: opacity var(--fade) var(--ease);
}

.quote {
  position: absolute;
  left: 50%;
  bottom: 11%;
  transform: translateX(-50%);
  width: min(18em, calc(100% - 56px));
  margin: 0;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.8rem, 4.4vw, 3.5rem);
  line-height: 1.12;
  color: #f7f1e6;
  text-shadow: 0 10px 40px rgba(0, 0, 0, .7);
  z-index: 2;
  transition: opacity 2s var(--ease);
}
.quote.is-long { font-size: clamp(1.35rem, 2.8vw, 2.25rem); width: min(22em, calc(100% - 48px)); }

.stage.ascend .frame img.is-on,
.banner-stage.ascend .frame img.is-on {
  transform: translateY(-4%) scale(1.07);
  filter: brightness(1.22) saturate(.82) contrast(1.03);
}
.stage.ascend .veil,
.banner-stage.ascend .veil {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(5, 6, 12, 0) 0%, rgba(5, 6, 12, .2) 18%, rgba(5, 6, 12, .88) 58%, #020308 100%);
}
.stage.ascend .rays,
.banner-stage.ascend .rays { opacity: 1; }
.stage.ascend .quote,
.banner-stage.ascend .quote { opacity: 0; }

.credit {
  position: absolute;
  left: 16px;
  bottom: 12px;
  z-index: 3;
  margin: 0;
  font-size: 10px;
  letter-spacing: .04em;
  color: rgba(247, 241, 230, .42);
}
.credit a { color: inherit; }

.skip {
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 4;
  border: 0;
  background: transparent;
  color: rgba(247, 241, 230, .4);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px;
}
.skip:hover, .skip:focus-visible { color: rgba(247, 241, 230, .75); }

.search-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: var(--search-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(16px);
}

.search {
  display: flex;
  align-items: center;
  width: min(560px, 100%);
  height: 42px;
  border-radius: 999px;
  background: #202327;
  border: 1px solid transparent;
}
.search:focus-within { border-color: #1d9bf0; background: #000; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0 18px;
  outline: none;
  font-size: 15px;
}
.search input::-webkit-search-cancel-button { display: none; }
.grok {
  width: 36px;
  height: 36px;
  margin-right: 4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #e7e9ea;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.grok svg { width: 18px; height: 18px; display: block; }
.grok:hover, .grok[aria-pressed="true"] { color: #8ecbff; }

.answer {
  position: fixed;
  top: calc(var(--search-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  z-index: 35;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(14, 16, 20, .96);
  border: 1px solid var(--line);
  color: #e7e9ea;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.answer a { color: #8ecbff; }

.banner {
  position: fixed;
  top: var(--search-h);
  left: 0;
  right: 0;
  height: var(--banner-h);
  z-index: 20;
  background: var(--night);
  transition: transform .55s var(--ease);
}
body.tuck .banner {
  transform: translateY(calc(-100% - var(--search-h)));
  pointer-events: none;
}
.banner .quote {
  bottom: 22px;
  font-size: clamp(1.35rem, 2.7vw, 2.45rem);
  width: min(20em, calc(100% - 40px));
}

.feed {
  width: min(1240px, calc(100% - 20px));
  margin: 0 auto;
  min-height: 100vh;
  padding: calc(var(--search-h) + var(--banner-h) + 8px) 0 80px;
}
.await {
  margin: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.post { border-bottom: 1px solid var(--line); padding: 12px 16px; }
.post img, .post video, .post audio, .post iframe {
  width: 100%;
  display: block;
  border-radius: 16px;
  background: #16181c;
}
.post video, .post iframe { aspect-ratio: 16 / 10; border: 0; }
.post audio { height: 48px; }

.plus, .gate {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 40;
  transform: translate(-50%, -50%);
}
.plus {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #0f1419;
  font-size: 42px;
  font-weight: 300;
  line-height: 58px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
.plus:hover { background: #e7e9ea; }

.gate input, .member-form input {
  width: 220px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(12, 14, 18, .82);
  text-align: center;
  outline: none;
  letter-spacing: .2em;
}
.gate input:focus, .member-form input:focus { border-color: rgba(255, 255, 255, .45); }
.gate input.bad, .member-form input.bad { border-color: #c45b4a; }

.drop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, .62);
  display: grid;
  place-items: center;
}
.drop-box {
  position: relative;
  width: min(440px, calc(100% - 48px));
  height: min(280px, 46vh);
  border-radius: 28px;
  border: 1.5px dashed rgba(255, 255, 255, .45);
  background: rgba(14, 16, 20, .88);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.drop-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop-box.over { border-color: #fff; background: rgba(255, 255, 255, .06); }
.drop-box.bad { border-color: #c45b4a; }
.drop-mark {
  font-size: 64px;
  font-weight: 300;
  line-height: 1;
  color: #fff;
}

.member-body {
  min-height: 100vh;
  background:
    radial-gradient(700px 380px at 50% 0%, rgba(255, 214, 150, .08), transparent 60%),
    var(--night);
}
.member-body.is-gate { display: grid; place-items: center; }
.studio {
  width: min(720px, calc(100% - 32px));
  margin: 28px auto 64px;
}
.studio-head, .plain li, .grok-form, .file-add {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.studio-mark {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 2rem;
}
.tool {
  margin-top: 22px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.tool h2 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
.hint { color: var(--muted); font-size: 14px; }
.plain { list-style: none; margin: 0 0 12px; padding: 0; }
.plain li { padding: 8px 0; }
.plain input[type="text"], .stack input, .stack textarea, .grok-form textarea, #page-form input[type="text"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(0, 0, 0, .35);
  padding: 10px 12px;
}
.quiet, .solid {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  padding: 8px 14px;
}
.quiet { background: transparent; color: #c9c2b6; }
.solid { background: #f4efe6; color: #14120e; font-weight: 650; }
.solid:disabled { opacity: .4; }
.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.stack { display: grid; gap: 8px; }
.grok-log {
  max-height: 280px;
  overflow: auto;
  margin-bottom: 10px;
}
.grok-log p { margin: 0 0 8px; white-space: pre-wrap; }
.from-you { color: #f4efe6; }
.from-grok { color: #e7c98a; }
.grok-form textarea { flex: 1; resize: vertical; }
.file-add input { max-width: 220px; }
.feature {
  margin: 0 16px 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.feature h2 { margin: 0 0 6px; font-size: 1rem; }
.feature p { margin: 0; color: #d7dde6; }

@media (max-width: 700px) {
  :root { --banner-h: 68vh; --search-h: 56px; }
  .feed { border: 0; }
  .quote { bottom: 14%; }
}

@media (prefers-reduced-motion: reduce) {
  .frame img, .veil, .rays, .quote, .banner, .opening { transition: none; }
  .stage.ascend .frame img.is-on, .banner-stage.ascend .frame img.is-on { transform: none; }
}
