:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --text: #272935;
  --muted: #626777;
  --line: #dedfeb;
  --accent: #1f7a6d;
  --accent-strong: #145f56;
  --accent-soft: #e7f5f0;
  --blue: #315f9f;
  --ink: #17181f;
  --danger: #c92727;
  --shadow: 0 18px 45px rgba(25, 26, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(31, 122, 109, 0.12), transparent 24%),
    var(--bg);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.page-loader.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loader-mark {
  display: inline-grid;
  min-width: 92px;
  min-height: 92px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: 0 24px 54px rgba(31, 122, 109, 0.24);
  color: #fff;
  font-weight: 950;
  animation: loaderPulse 950ms ease-in-out infinite alternate;
}

@keyframes loaderPulse {
  from {
    transform: scale(0.96);
  }

  to {
    transform: scale(1.02);
  }
}

.webgl-bg {
  position: fixed;
  inset: 64px 0 0;
  z-index: 0;
  width: 100%;
  height: calc(100vh - 64px);
  pointer-events: none;
  opacity: 0.46;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  min-width: 42px;
  min-height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  text-transform: lowercase;
  transform: rotate(-3deg);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.tool-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
}

.tool-nav-item {
  width: auto;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.tool-nav-item:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.tool-nav-item[aria-selected="true"] {
  background: var(--accent);
  color: #fff;
}

.app-dot {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, #a3a7b4 0 16%, transparent 17%),
    radial-gradient(circle at 50% 86%, #a3a7b4 0 31%, transparent 32%),
    #fff;
}

.logout-form {
  margin: 0;
}

.logout-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.88rem;
  transition: border-color 160ms ease, color 160ms ease;
}

.logout-button:hover {
  border-color: color-mix(in srgb, var(--accent), var(--line) 35%);
  color: var(--accent-strong);
}

.repo-link,
.primary-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.repo-link {
  padding: 0 16px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface-strong);
}

.repo-link:hover {
  border-color: color-mix(in srgb, var(--accent), var(--line) 35%);
  color: var(--accent-strong);
}

.primary-link {
  width: fit-content;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 36px rgba(31, 122, 109, 0.18);
}

.primary-link:hover {
  background: var(--accent-strong);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 96px;
}

.showcase-shell {
  display: grid;
  gap: 72px;
  padding-top: 44px;
}

.hero {
  display: grid;
  min-height: min(640px, calc(100vh - 120px));
  align-items: center;
  gap: 38px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero-copy p:not(.eyebrow),
.section-heading p,
.feature-band p {
  max-width: 690px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-terminal {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(222, 223, 235, 0.88);
  border-radius: 8px;
  background: #17181f;
  box-shadow: var(--shadow);
  color: #cfe7de;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.5;
}

.intro {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.eyebrow,
.tool-number {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 900px;
  color: #30313d;
  font-size: clamp(2.25rem, 5vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.alert {
  width: min(760px, 100%);
  margin: 28px auto 0;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--danger), transparent 64%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--danger), transparent 92%);
  color: var(--danger);
  font-weight: 700;
}

.tools {
  margin-top: 34px;
}

.tool {
  display: grid;
  justify-items: center;
  gap: 28px;
  min-height: 360px;
  padding: 0;
  text-align: center;
}

.tool[hidden] {
  display: none;
}

.tool-copy {
  display: grid;
  justify-items: center;
  gap: 12px;
}

h2 {
  color: #30313d;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  color: #30313d;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.demo-section {
  display: grid;
  gap: 26px;
}

.demo-nav {
  justify-content: center;
}

.demo-tools {
  min-height: 360px;
}

.feature-band {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 28px 0 18px;
  border-top: 1px solid var(--line);
}

.feature-band > div {
  display: grid;
  align-content: start;
  gap: 10px;
}

.feature-band h2 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.feature-band a {
  color: var(--blue);
  font-weight: 800;
}

.tool-copy p {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.45;
}

.tool form,
.login-form {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(560px, 100%);
  margin: 0;
}

.dropzone {
  display: grid;
  width: 100%;
  min-height: 118px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 38%),
    var(--accent);
  box-shadow: var(--shadow);
  color: #fff;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dropzone:hover,
.dropzone:focus-within {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 38%),
    var(--accent-strong);
  box-shadow: 0 22px 50px rgba(31, 122, 109, 0.22);
  transform: translateY(-1px);
}

input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

[data-file-label] {
  max-width: 100%;
  padding: 0 22px;
  overflow: hidden;
  color: inherit;
  font-size: clamp(1.25rem, 3.5vw, 2rem);
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.tool form > button,
.login-form > button {
  width: min(300px, 100%);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(25, 26, 38, 0.08);
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.tool form > button:hover,
.login-form > button:hover {
  border-color: color-mix(in srgb, var(--accent), var(--line) 30%);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

button:active,
.dropzone:active {
  transform: translateY(0);
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 64px);
  place-items: start center;
}

.login-panel {
  display: grid;
  width: min(520px, 100%);
  justify-items: center;
  gap: 24px;
  padding-top: 26px;
  text-align: center;
}

.login-panel h1 {
  font-size: clamp(2.25rem, 5vw, 3.8rem);
}

.login-form {
  padding: 24px;
  border: 1px solid rgba(222, 223, 235, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-form label {
  display: grid;
  width: 100%;
  gap: 8px;
  text-align: left;
}

.login-form label span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 0 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-form input:focus {
  border-color: color-mix(in srgb, var(--accent), var(--line) 20%);
  box-shadow: 0 0 0 4px rgba(31, 122, 109, 0.13);
}

.login-form > button {
  background: var(--accent);
  color: #fff;
}

.login-form > button:hover {
  background: var(--accent-strong);
  color: #fff;
}

@media (max-width: 780px) {
  .webgl-bg {
    inset: 116px 0 0;
    height: calc(100vh - 116px);
  }

  .topbar {
    display: grid;
    gap: 12px;
    justify-items: start;
    padding: 12px 16px;
  }

  .showcase-topbar {
    display: flex;
    align-items: center;
  }

  .topbar-actions,
  .tool-nav {
    width: 100%;
  }

  .topbar-actions {
    display: grid;
    gap: 10px;
  }

  .app-dot {
    display: none;
  }

  .tool-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tool-nav-item {
    min-width: 0;
    padding: 0 10px;
  }

  .shell {
    padding-top: 42px;
  }

  .showcase-shell {
    gap: 54px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 16px;
  }

  .feature-band {
    grid-template-columns: 1fr;
  }

  .logout-button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .dropzone {
    min-height: 108px;
  }
}
