@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #10141c;
  --ink-soft: #3a4454;
  --paper: #f2f4f8;
  --paper-2: #e4e9f1;
  --line: #c5cedc;
  --accent: #0b57d0;
  --accent-ink: #0846a8;
  --signal: #e11d48;
  --ok: #0f766e;
  --err: #be123c;
  --warn: #b45309;
  --surface: #ffffff;
  --font: 'Bricolage Grotesque', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-optical-sizing: auto;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(16, 20, 28, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(16, 20, 28, 0.035) 1px, transparent 1px),
    radial-gradient(900px 480px at 0% 0%, rgba(11, 87, 208, 0.12), transparent 60%),
    radial-gradient(700px 420px at 100% 10%, rgba(225, 29, 72, 0.07), transparent 55%);
  background-size: 48px 48px, 48px 48px, auto, auto;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.wrap {
  width: min(1040px, calc(100% - 2.5rem));
  margin: 0 auto;
}

/* ——— Nav ——— */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0 0;
  animation: rise .6s var(--ease) both;
}
.brand {
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.05em;
  color: var(--ink);
  text-decoration: none;
  border: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.brand::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-left: 4px;
  background: var(--signal);
  border-radius: 1px;
  transform: translateY(-2px);
  animation: blink 2.4s var(--ease) infinite;
}
.brand:hover { color: var(--ink); }
.nav-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.nav-meta a {
  border: 0;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}
.nav-meta a:hover { color: var(--signal); }

/* ——— Hero ——— */
.hero {
  padding: 3.25rem 0 2.25rem;
  max-width: 38rem;
  animation: rise .7s var(--ease) .05s both;
}
.hero .kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
}
.hero h1 {
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  margin: 0 0 1rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
  font-weight: 500;
  max-width: 32rem;
  line-height: 1.45;
}

/* ——— Layout ——— */
.grid-2 {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 2.5rem;
  animation: rise .75s var(--ease) .1s both;
}
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; gap: 1.5rem; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.6rem 1.7rem;
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--ink) 8%, transparent);
}

.panel-quiet {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0.4rem 0 0;
}

label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.45rem;
}

input[type="text"],
input[type="url"],
input[type="password"],
input[type="number"] {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: 0;
  padding: 0.9rem 1rem;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--accent) 25%, transparent);
}
.field { margin-bottom: 1.15rem; }
.hint {
  color: var(--ink-soft);
  font-size: 0.84rem;
  margin-top: 0.4rem;
  font-weight: 500;
}

/* ——— Buttons ——— */
.btn {
  appearance: none;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  letter-spacing: -0.02em;
  border-radius: 0;
  padding: 0.9rem 1.35rem;
  background: var(--ink);
  color: #fff;
  transition: transform .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent);
}
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-accent {
  background: var(--accent);
  border-color: var(--accent-ink);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
}
.btn-ghost:hover {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--paper-2);
}
.btn-danger {
  color: var(--err);
  border-color: color-mix(in srgb, var(--err) 40%, var(--line));
}
.btn-danger:hover {
  border-color: var(--err);
  color: var(--err);
  box-shadow: 3px 3px 0 #ffe4e6;
}
.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

/* ——— Progress ——— */
.progress {
  height: 6px;
  background: var(--paper-2);
  overflow: hidden;
  margin: 1.15rem 0 0.65rem;
  border: 1px solid var(--line);
}
.progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .4s var(--ease);
  position: relative;
}
.progress > i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: sheen 1.2s linear infinite;
}

.status-line {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  min-height: 1.35em;
}
.status-line.ok { color: var(--ok); font-weight: 500; }
.status-line.err { color: var(--err); font-weight: 500; }

/* ——— Jobs ——— */
.section-title {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}
.jobs {
  margin-top: 0.25rem;
  display: grid;
  gap: 0;
  border-top: 1.5px solid var(--ink);
}
.job {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem 1.25rem;
  align-items: center;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
  animation: rise .5s var(--ease) both;
}
.job-url {
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-all;
  font-size: 0.98rem;
}
.job-meta {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  margin-top: 0.25rem;
}
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border: 1px solid currentColor;
  border-radius: 0;
  color: var(--accent);
}
.badge.failed { color: var(--err); }
.badge.running, .badge.pending { color: var(--warn); }
.badge.done { color: var(--ok); }

/* ——— Features ——— */
.features h2 {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
}
.features ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 0.85rem;
}
.features li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.65rem;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.35;
}
.features li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  padding-top: 0.15rem;
}

/* ——— Login ——— */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 840px) {
  .login-shell { grid-template-columns: 1fr; }
}
.login-brand {
  background: var(--ink);
  color: #f2f4f8;
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  min-height: 42vh;
}
.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(242,244,248,0.06) 1px, transparent 1px),
    linear-gradient(rgba(242,244,248,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.login-brand .brand {
  color: #fff;
  font-size: 1.7rem;
  position: relative;
  z-index: 1;
  width: fit-content;
}
.login-brand .brand::after { background: var(--signal); }
.login-brand-copy {
  position: relative;
  z-index: 1;
  animation: rise .7s var(--ease) .08s both;
}
.login-brand-copy h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0 0 1rem;
  max-width: 11ch;
}
.login-brand-copy p {
  margin: 0;
  color: rgba(242, 244, 248, 0.72);
  font-size: 1.05rem;
  font-weight: 500;
  max-width: 28ch;
  line-height: 1.4;
}
.login-form-side {
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  animation: rise .65s var(--ease) .12s both;
}
.login-card {
  width: min(380px, 100%);
}
.login-card h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 0.35rem;
}
.login-card .sub {
  color: var(--ink-soft);
  margin: 0 0 1.6rem;
  font-weight: 500;
}
.alert {
  background: #fff1f2;
  color: var(--err);
  border: 1px solid color-mix(in srgb, var(--err) 30%, transparent);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.demo-pill {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.demo-pill code {
  font-family: var(--mono);
  color: var(--ink);
  background: var(--paper-2);
  padding: 0.1rem 0.35rem;
}

.footer {
  padding: 1.75rem 0 2.5rem;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}
.footer code {
  font-family: var(--mono);
  background: var(--paper-2);
  padding: 0.05rem 0.3rem;
}

.exports {
  margin-bottom: 2rem;
  animation: rise .8s var(--ease) .15s both;
}

/* ——— Public landing ——— */
.hero-public {
  max-width: 42rem;
  padding-bottom: 2.75rem;
}
.hero-public h1 {
  font-size: clamp(3rem, 9vw, 5rem);
  margin-bottom: 1.15rem;
}
.hero-lead {
  font-size: 1.2rem !important;
  color: var(--ink) !important;
  max-width: 36rem !important;
  margin-bottom: 0.75rem !important;
}
.hero-sub {
  margin: 0 0 1.5rem !important;
  color: var(--ink-soft) !important;
  font-size: 1.02rem !important;
  font-weight: 500 !important;
  max-width: 34rem !important;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.hero-cta .btn {
  border-bottom: 0;
  text-decoration: none;
}
.hero-cta .btn-ghost {
  background: #fff;
}

.why {
  padding: 2.5rem 0 1rem;
  border-top: 1.5px solid var(--ink);
  animation: rise .75s var(--ease) .12s both;
}
.why-intro {
  max-width: 40rem;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 1.05rem;
  margin: 0 0 1.75rem;
  line-height: 1.45;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 700px) {
  .why-grid { grid-template-columns: 1fr; }
}
.why-card {
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--ink) 6%, transparent);
}
.why-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.why-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}
.why-note {
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, #fff);
  margin-bottom: 2rem;
}
.why-note p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.45;
}
.why-note strong {
  color: var(--ink);
}

.tool {
  padding: 1rem 0 0.5rem;
  animation: rise .8s var(--ease) .14s both;
}
.tool-intro {
  max-width: 38rem;
  color: var(--ink-soft);
  font-weight: 500;
  margin: 0 0 1.5rem;
}
.features code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--paper-2);
  padding: 0.05rem 0.3rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
@keyframes sheen {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

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