@font-face {
  font-family: "Space Grotesk Variable";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/space-grotesk.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/ibm-plex-mono.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #07090a;
  --ink: #f2f4f1;
  --muted: #94a0a5;
  --line: rgb(216 226 231 / 14%);
  --line-strong: rgb(216 226 231 / 34%);
  --surface: #0d1114;
  --accent: #b8dce7;
  --accent-strong: #d8eef4;
  --danger: #ef9a9a;
  font-family: "Space Grotesk Variable", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 7%, rgb(184 220 231 / 6%), transparent 31%),
    linear-gradient(180deg, rgb(255 255 255 / 1.2%), transparent 22%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.topbar,
footer {
  position: fixed;
  z-index: 10;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 clamp(20px, 4vw, 48px);
  border-color: var(--line);
  background: rgb(7 9 10 / 84%);
  backdrop-filter: blur(18px);
}

.topbar {
  top: 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 42px;
  height: 40px;
  object-fit: contain;
  filter: invert(1);
}

.environment,
.eyebrow,
footer {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.environment {
  color: var(--muted);
}

.topbar-actions,
.user-profile {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 18px;
}

.user-profile {
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}

.user-copy {
  display: grid;
  line-height: 1.2;
  text-align: right;
}

.user-copy strong,
.user-copy span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.user-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.signout {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.signout:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.shell {
  display: grid;
  min-height: 100vh;
  padding: 96px clamp(24px, 6vw, 88px) 92px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .7fr);
  align-items: center;
  gap: clamp(40px, 7vw, 104px);
  width: min(1380px, 100%);
  margin: auto;
}

.hero-copy {
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--accent);
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(44px, 5.6vw, 80px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: .99;
}

.lede {
  max-width: 600px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
}

.signin {
  margin-top: 42px;
}

#google-signin {
  min-height: 44px;
}

.signin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  min-height: 48px;
  gap: 12px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--bg);
  background: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.signin-button:hover {
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-1px);
}

.signin-button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 4px;
}

.signin-button svg {
  width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 2px;
  background: #fff;
}

.signin-message {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.terms {
  max-width: 520px;
  margin: 16px 0 0;
  color: #6f7a7f;
  font-size: 11px;
  line-height: 1.55;
}

.terms a {
  color: var(--muted);
  text-underline-offset: 2px;
}

.terms a:hover {
  color: var(--ink);
}

.hero-media {
  align-self: center;
  width: 100%;
  max-width: 520px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 34px 90px rgb(0 0 0 / 34%);
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-media figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.hero-media figcaption span:first-child {
  color: var(--ink);
}

.generator {
  display: grid;
  grid-template-columns: minmax(280px, .7fr) minmax(420px, 1fr);
  align-items: start;
  gap: clamp(48px, 8vw, 128px);
  width: min(1180px, 100%);
  margin: auto;
}

.generator-heading h1 {
  font-size: clamp(42px, 5vw, 68px);
}

.generation-form {
  display: grid;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 34px 90px rgb(0 0 0 / 25%);
}

.generation-form label {
  margin-bottom: 9px;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.generation-form select,
.generation-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  background: #090c0e;
  font: inherit;
  outline: none;
}

.generation-form select {
  min-height: 46px;
  margin-bottom: 28px;
  padding: 0 14px;
}

.generation-form textarea {
  min-height: 210px;
  padding: 14px;
  line-height: 1.5;
  resize: vertical;
}

.generation-form select:focus,
.generation-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.generation-form textarea::placeholder {
  color: #5f696d;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
}

#prompt-count {
  color: #6f7a7f;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.generate-button {
  min-width: 130px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--bg);
  background: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.generate-button:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.generate-button:disabled {
  cursor: wait;
  opacity: .55;
}

.generation-message {
  margin: 18px 0 0;
  font-size: 13px;
}

.generation-message[data-kind="error"] {
  color: var(--danger);
}

.generation-message[data-kind="success"] {
  color: #8fbda1;
}

footer {
  bottom: 0;
  height: 52px;
  border-top: 1px solid var(--line);
  color: #6f7a7f;
}

.system-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.system-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8fbda1;
  box-shadow: 0 0 12px rgb(143 189 161 / 55%);
}

@media (max-width: 900px) {
  .shell {
    padding-top: 104px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .generator {
    grid-template-columns: 1fr;
  }

  .hero-media {
    max-width: 680px;
  }
}

@media (max-width: 560px) {
  .environment {
    display: none;
  }

  .user-copy {
    display: none;
  }

  .shell {
    padding: 100px 20px 92px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .signin-button {
    width: 100%;
  }

  .hero-media figcaption span:last-child,
  footer > span:first-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
