@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
  --bg: #090c14;
  --bg-soft: #101728;
  --panel: #121b2c;
  --panel-soft: #18243a;
  --text: #e7eefc;
  --muted: #9fb1ce;
  --line: #27344f;
  --line-strong: #3a4d70;
  --primary: #3fd2ff;
  --primary-strong: #1eb8e6;
  --secondary-bg: #1d2b43;
  --secondary-text: #d7e7ff;
  --danger: #ff7f8f;
  --success: #43dd9f;
  --radius: 14px;
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, #1e2f52 0%, transparent 45%),
    radial-gradient(circle at 90% 0%, #173353 0%, transparent 42%),
    linear-gradient(180deg, #070b13 0%, var(--bg) 100%);
  min-height: 100vh;
}

a {
  color: inherit;
}

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

.narrow {
  width: min(760px, 92vw);
}

.site-header {
  border-bottom: 1px solid rgba(163, 187, 228, 0.16);
  background: rgba(8, 12, 19, 0.75);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.page-content {
  padding: 2.2rem 0 3rem;
  display: grid;
  gap: 1rem;
}

.panel {
  background: linear-gradient(180deg, rgba(29, 43, 67, 0.82), rgba(20, 31, 50, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.hero {
  border: 1px solid rgba(96, 135, 197, 0.35);
  border-radius: 18px;
  background:
    radial-gradient(circle at 80% 5%, rgba(63, 210, 255, 0.17), transparent 36%),
    linear-gradient(140deg, rgba(16, 26, 44, 0.95), rgba(9, 14, 26, 0.95));
  padding: 2rem;
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 1rem;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin: 0.4rem 0 0.8rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.kicker {
  margin: 0;
  color: #8cd8ef;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
}

.lead {
  color: var(--muted);
  line-height: 1.65;
}

.hero-preview h3 {
  margin-top: 0;
}

.hero-actions,
.button-row,
.button-stack {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.button-stack {
  flex-direction: column;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.64rem 1.1rem;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-primary {
  color: #04222c;
  background: var(--primary);
  border-color: #61dbff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.btn-success {
  color: #032214;
  background: var(--success);
  border-color: #6cefc0;
}

.btn-secondary {
  color: var(--secondary-text);
  background: var(--secondary-bg);
  border-color: var(--line-strong);
}

.examples {
  display: grid;
  gap: 1rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
}

.section-head h2 {
  margin: 0;
}

.pair-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.pair-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #131d30, #0f1829);
  padding: 0.75rem;
  display: grid;
  gap: 0.7rem;
  opacity: 0;
  transform: translateY(10px);
}

.pair-photo,
.pair-model {
  display: grid;
  gap: 0.35rem;
}

.pair-photo img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #2f4060;
  background: #0d1524;
}

.chip {
  width: fit-content;
  font-size: 0.78rem;
  color: #b5c5df;
  border: 1px solid #2b3f63;
  background: #131f33;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

model-viewer {
  width: 100%;
  height: 260px;
  border-radius: 10px;
  border: 1px solid #2f4060;
  background: radial-gradient(circle at top, #314b76, #10192a 64%);
}

.cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.cta-strip h3 {
  margin: 0;
}

.auth-gate {
  text-align: center;
  padding: 2.4rem 1rem;
}

.auth-pending #appFlow {
  visibility: hidden;
}

.flow-header {
  margin-bottom: 1rem;
}

.flow-header h1 {
  margin: 0 0 0.4rem;
}

.flow-tabs {
  display: inline-flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 12, 21, 0.64);
}

.flow-tab {
  font-size: 0.8rem;
  color: #98adce;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}

.flow-tab.is-active {
  color: #072230;
  background: var(--primary);
}

.stage {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 17, 30, 0.55);
  padding: 1rem;
}

.stage.is-active {
  display: block;
}

.field-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

input[type="file"],
input[type="text"] {
  width: 100%;
  max-width: 720px;
  padding: 0.65rem 0.72rem;
  border: 1px solid #334665;
  border-radius: 8px;
  background: #0f192a;
  color: var(--text);
  font-family: inherit;
}

.preview-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.preview-item {
  border: 1px solid #30415f;
  border-radius: 10px;
  overflow: hidden;
  background: #101c30;
}

.preview-item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.preview-item figcaption {
  font-size: 0.8rem;
  color: #b4c6e2;
  padding: 0.45rem 0.5rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.summary-line {
  margin: 0.8rem 0 0;
}

.status-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.status-top h2 {
  margin: 0;
}

.status-pill {
  border: 1px solid #36527c;
  background: #15263f;
  color: #c2d9fb;
  border-radius: 999px;
  padding: 0.3rem 0.72rem;
  font-size: 0.82rem;
}

.status-pill.is-done {
  border-color: #287350;
  background: #123525;
  color: #89e5b9;
}

.status-pill.is-failed {
  border-color: #7a3345;
  background: #381723;
  color: #ffb4c0;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0;
  display: grid;
  gap: 0.45rem;
}

.timeline li {
  border: 1px solid #2f4365;
  border-radius: 8px;
  padding: 0.52rem 0.68rem;
  color: #9eb4d6;
  background: #0f1a2c;
}

.timeline li.current {
  border-color: #4f6da0;
  color: #d8e7ff;
  background: #182844;
}

.timeline li.done {
  border-color: #2f7657;
  color: #9de6bf;
  background: #122d22;
}

.timeline li.failed {
  border-color: #7e3446;
  color: #ffb8c4;
  background: #341925;
}

.job-details {
  margin-top: 1rem;
  border-top: 1px dashed #304260;
  padding-top: 0.8rem;
}

.job-details summary {
  cursor: pointer;
  color: #aec3e7;
  font-weight: 500;
}

.job-id-actions {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.stl-panel {
  margin-top: 1rem;
  border: 1px solid #314769;
  border-radius: 10px;
  padding: 0.8rem;
  background: #0e192b;
}

.stl-panel h3 {
  margin: 0 0 0.6rem;
}

.stl-panel model-viewer {
  height: 280px;
  margin-bottom: 0.8rem;
}

.print-badge {
  display: inline-block;
  border: 1px solid #2b7656;
  background: #153927;
  color: #9de5bf;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.history-wrap {
  margin-top: 1rem;
  border: 1px solid #304260;
  border-radius: 12px;
  background: rgba(9, 16, 29, 0.6);
  padding: 0.85rem;
}

.jobs-list {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
  display: grid;
  gap: 0.55rem;
}

.job-item {
  border: 1px solid #2f4366;
  border-radius: 9px;
  background: #0f1b2f;
  padding: 0.55rem 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.job-item-main {
  display: grid;
  gap: 0.16rem;
}

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

.profile-list {
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 0.45rem 0.8rem;
}

.profile-list dt {
  font-weight: 700;
  color: #c9dcff;
}

.profile-list dd {
  margin: 0;
}

.fade-up {
  animation: fadeUp 500ms ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1000px) {
  .hero-split {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}
