:root {
  --ink: #09090b;
  --ink-2: #101014;
  --panel: #16161c;
  --panel-2: #1c1c24;
  --line: rgba(255, 109, 90, 0.16);
  --line-strong: rgba(244, 241, 234, 0.08);
  --coral: #ff6d5a;
  --coral-deep: #e24b3a;
  --sand: #f4f1ea;
  --sand-dim: #c9c3b6;
  --mute: #8a8478;
  --ok: #7ee787;
  --warn: #f2c94c;
  --radius: 18px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --display: "IBM Plex Sans", "Segoe UI", sans-serif;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--sand);
  font-family: var(--sans);
}

body {
  position: relative;
  overflow-x: hidden;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(255, 109, 90, 0.16), transparent 58%),
    radial-gradient(700px 420px at 92% 8%, rgba(242, 201, 76, 0.07), transparent 50%),
    radial-gradient(800px 500px at 80% 110%, rgba(126, 231, 135, 0.05), transparent 55%),
    var(--ink);
}

.bg-canvas svg {
  width: 100%;
  height: 100%;
  opacity: 0.42;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sand);
  text-decoration: none;
}

.brand img { height: 36px; width: auto; display: block; }

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, #ff8a76, #ff6d5a 42%, #c7372c);
  box-shadow: 0 10px 30px rgba(255, 109, 90, 0.28);
}

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: left;
  width: 100%;
  min-height: 420px;
  margin: 0 0 36px;
  padding: 48px 48px 52px;
  border-radius: 24px;
  background:
    url("../img/n8n-hero.webp") right center / cover no-repeat;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg,
      rgba(9, 9, 11, 0.92) 0%,
      rgba(9, 9, 11, 0.78) 34%,
      rgba(9, 9, 11, 0.28) 62%,
      rgba(9, 9, 11, 0.08) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 28rem;
}

.hero-logo {
  display: block;
  width: min(260px, 100%);
  height: auto;
  margin: 0 0 18px;
  mix-blend-mode: screen;
}

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.28;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 600;
  max-width: none;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

.lede {
  margin: 0;
  max-width: 42ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--sand-dim);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

.board {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
  max-width: 820px;
  margin: 0 auto;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  width: 100%;
  padding: 4px 8px 8px;
  margin: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 11px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--coral), transparent);
  opacity: 0.55;
}

.tl-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  text-align: center;
}

.tl-item::before { display: none; }

.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--coral);
  background: var(--ink);
}

.tl-item.is-done .tl-dot {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 109, 90, 0.18);
}

.tl-item.is-now .tl-dot {
  background: var(--sand);
  border-color: var(--sand);
}

.tl-item.is-now .tl-label { color: var(--sand); }

.tl-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--coral);
  letter-spacing: 0.12em;
}

.tl-label {
  display: block;
  margin-top: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--mute);
}

.panel {
  background: linear-gradient(180deg, rgba(28, 28, 36, 0.92), rgba(16, 16, 20, 0.94));
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(255, 109, 90, 0.04),
    0 30px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 26px 0;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: -0.03em;
}

.panel-head p {
  margin: 6px 0 0;
  color: var(--mute);
  font-size: 14px;
}

.step { display: none; padding: 22px 26px 26px; }
.step.is-on { display: block; }

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

.grid-3 {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-2 { grid-column: span 2; }
.field.span-3 { grid-column: 1 / -1; }

label, .lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--sand-dim);
}

input, select, textarea {
  width: 100%;
  border: 1px solid #2c2c36;
  background: #101014;
  color: var(--sand);
  border-radius: 12px;
  padding: 12px 13px;
  font: 15px/1.3 var(--sans);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 109, 90, 0.16);
}

.hint { font-size: 12px; color: var(--mute); }
.error { color: #ff8d7c; font-size: 12px; margin: 0; }
.hidden { display: none !important; }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--sand-dim);
}

.check input { width: auto; margin-top: 3px; }
.check a { color: var(--coral); }

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  font: 700 14px/1 var(--sans);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-ghost {
  background: transparent;
  color: var(--sand-dim);
  border: 1px solid #2c2c36;
}

.btn-coral {
  background: var(--coral);
  color: #140c0a;
  box-shadow: 0 10px 30px rgba(255, 109, 90, 0.28);
}

.btn-coral:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.slots, .plans, .pays {
  display: grid;
  gap: 10px;
}

.slots.is-off { display: none; }

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

.chip, .plan, .pay {
  border: 1px solid #2c2c36;
  background: #101014;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s;
}

.chip:hover, .plan:hover, .pay:hover { border-color: rgba(255, 109, 90, 0.45); }
.chip.is-on, .plan.is-on, .pay.is-on {
  border-color: var(--coral);
  background: #231614;
}

.chip input, .plan input, .pay input { display: none; }

.chip b, .plan b, .pay b { display: block; font-size: 14px; }
.chip small, .plan small, .pay small { color: var(--mute); font-size: 12px; }

.plan-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--coral);
}

.contract {
  border: 1px solid #2c2c36;
  border-radius: 16px;
  overflow: hidden;
  background: #0f0f13;
}

.contract-head {
  padding: 16px 18px;
  border-bottom: 1px solid #2c2c36;
  background: #141418;
}

.contract table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.contract th {
  text-align: left;
  color: var(--mute);
  font-weight: 600;
  padding: 8px 18px 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contract td { padding: 4px 18px 10px; color: var(--sand); }

.clauses {
  padding: 8px 18px 18px;
  color: var(--sand-dim);
  font-size: 13.5px;
  line-height: 1.65;
  max-height: 280px;
  overflow: auto;
}

.clauses p { margin: 0 0 10px; }

.result {
  padding: 48px 36px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.result h1 {
  font-family: var(--sans);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 8px;
}

.result p { color: var(--sand-dim); line-height: 1.6; }

.paybox {
  margin-top: 28px;
  padding: 22px 20px;
  border-radius: 16px;
  background: #1a120f;
  border: 1px solid rgba(255, 109, 90, 0.28);
}

.btn-pay {
  width: 100%;
  max-width: 420px;
  white-space: normal;
  line-height: 1.35;
  padding: 14px 22px;
}

.obs {
  margin: 28px auto 0;
  max-width: 46ch;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--mute);
}

.obs a {
  color: var(--sand-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer {
  max-width: 820px;
  margin: 48px auto 0;
  color: var(--mute);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.footer a { color: var(--sand-dim); }

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #5a2e28;
  background: #1a1010;
  color: #ffc7be;
  font-size: 14px;
}

@media (max-width: 880px) {
  .grid-2, .grid-3, .slots { grid-template-columns: 1fr; }
  .hero {
    min-height: 380px;
    padding: 32px 22px 36px;
    background-position: 68% center;
  }
  .hero::before {
    background: linear-gradient(180deg,
      rgba(9, 9, 11, 0.82) 0%,
      rgba(9, 9, 11, 0.74) 55%,
      rgba(9, 9, 11, 0.88) 100%);
  }
  .hero-inner { max-width: none; }
  .hero-logo { margin-left: auto; margin-right: auto; }
  .hero { text-align: center; }
  .lede { margin: 0 auto; }
  .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 4px 0 8px; }
  .tl-label { font-size: 12px; }
  .field.span-2, .field.span-3 { grid-column: auto; }
  .wrap { width: min(100% - 20px, 1120px); }
}
