:root {
  --bg: #0c0c0e;
  --panel: #141416;
  --panel-2: #1a1a1e;
  --line: rgba(255, 255, 255, 0.1);
  --text: #eceae4;
  --muted: #9a9790;
  --faint: #6e6b65;
  --white: #f7f5f0;
  --accent: #d4c4a8;
  --ok: #8fbf8f;
  --warn: #d4b06a;
  --max: 72rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Opening soar */
.soar-stage {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
  animation: soarStageOut 0.55s ease 3.35s forwards;
}

.soar-bird {
  position: absolute;
  width: min(42vw, 420px);
  height: auto;
  left: -28%;
  bottom: 12%;
  opacity: 0;
  will-change: transform, opacity;
  animation: soarAcross 3.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s forwards;
}

@keyframes soarAcross {
  0% {
    opacity: 0;
    transform: translate3d(0, 18%, 0) scale(0.72) rotate(-10deg);
  }
  12% { opacity: 1; }
  100% {
    opacity: 1;
    transform: translate3d(145vw, -72vh, 0) scale(1.05) rotate(8deg);
  }
}

@keyframes soarStageOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.page {
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: pageIn 0.7s ease 2.85s forwards;
}

.page.no-soar {
  opacity: 1;
  animation: none;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .soar-stage,
  .soar-bird,
  .page {
    animation: none !important;
  }
  .soar-stage { display: none; }
  .page { opacity: 1; }
}

code, .mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}

pre.out {
  margin: 0;
  padding: 1rem 1.1rem;
  background: #0a0a0c;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: auto;
  max-height: 28rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #c8c4ba;
  white-space: pre-wrap;
  word-break: break-word;
}

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--white);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand img {
  width: 2.4rem;
  height: auto;
  object-fit: contain;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.15rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover,
.nav-chip:hover { color: var(--white); }

.nav-cta,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--white);
  color: #111 !important;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
}

.nav-btn,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
}

.nav-btn:hover,
.btn-ghost:hover { color: var(--white); border-color: rgba(255,255,255,0.25); }

.nav-chip {
  color: var(--accent);
  text-decoration: none;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) var(--pad) clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--white);
}

.lede {
  margin: 0 0 1.5rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--white);
  text-decoration: none;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
}

.hero-mark {
  margin: 0;
  justify-self: end;
  width: min(100%, 22rem);
}

.hero-mark img {
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(1.05);
}

.banner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--pad);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(212, 196, 168, 0.08), transparent);
}

.banner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 48rem;
}

.banner strong { color: var(--accent); }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--pad);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--white);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.model {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) 1fr;
  gap: 1.5rem 2.25rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.model:last-of-type { border-bottom: 1px solid var(--line); }

.model-meta h3 {
  margin: 0 0 0.35rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
}

.role {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.status {
  margin: 0 0 1rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.spec-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  color: var(--faint);
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.spec-list li:first-child { border-top: 0; }
.spec-list span:last-child { color: var(--accent); text-align: right; }

.model-body p {
  margin: 0 0 0.85rem;
  color: var(--text);
}

.model-body h4 {
  margin: 1.35rem 0 0.5rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.model-body ul,
.model-body ol {
  margin: 0.5rem 0 0.85rem;
  padding: 0 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.model-body li + li { margin-top: 0.3rem; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 1rem;
}

.chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(255,255,255,0.03);
}

.example {
  margin: 0.75rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

.example .label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.example + .example { margin-top: 0.6rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.card {
  padding: 1.25rem 1.35rem;
  border-radius: 0.9rem;
  background: var(--panel);
  border: 1px solid var(--line);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--white);
  font-weight: 500;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card .tag {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: var(--faint);
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

/* Auth */
.auth-shell {
  max-width: 28rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 4rem) var(--pad);
}

.auth-shell h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  font-weight: 500;
  color: var(--white);
}

.auth-shell .lede { margin-bottom: 1.5rem; }

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.auth-tabs button {
  flex: 1;
  padding: 0.55rem;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
}

.auth-tabs button.is-active {
  background: var(--panel);
  color: var(--white);
  border-color: rgba(255,255,255,0.2);
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--white);
  font: inherit;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.45;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(212, 196, 168, 0.55);
}

.auth-status {
  min-height: 1.4rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
  color: var(--accent);
}

.btn-block {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.65rem;
  background: var(--white);
  color: #111;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-block:disabled { opacity: 0.55; cursor: wait; }

.fineprint {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--faint);
}

/* Playground */
.play-top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.play-top h1 {
  margin: 0 0 0.25rem;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--white);
}

.play-quota {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
}

.play-quota .pill {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.play-tabs {
  max-width: var(--max);
  margin: 1.25rem auto 0;
  padding: 0 var(--pad);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.play-tabs button {
  padding: 0.7rem 1rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  margin-bottom: -1px;
}

.play-tabs button.is-active {
  color: var(--white);
  border-bottom-color: var(--accent);
}

.play-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 3rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
  align-items: start;
}

.gate {
  max-width: 36rem;
  margin: 3rem auto;
  padding: 0 var(--pad);
  text-align: center;
}

.gate h1 {
  color: var(--white);
  font-weight: 500;
}

.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 176, 106, 0.35);
  color: var(--warn);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.key-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.key-meta {
  display: block;
  margin-top: 0.2rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  color: var(--faint);
}

.field input[type="file"] {
  padding: 0.55rem 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .hero,
  .model,
  .play-grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero-mark {
    justify-self: start;
    order: -1;
    width: min(100%, 14rem);
  }
}
